Allow to set custom suffix to window title

This is to allow users to differentiate qbt instances when there are multiple running.
PR #20429.
Closes #17905.
This commit is contained in:
Chocobo1
2024-02-27 12:41:12 +08:00
committed by GitHub
parent 364bcf73ee
commit 46e8ee50c8
13 changed files with 98 additions and 27 deletions

View File

@@ -361,6 +361,8 @@ void AppController::preferencesAction()
data[u"torrent_file_size_limit"_s] = pref->getTorrentFileSizeLimit();
// Recheck completed torrents
data[u"recheck_completed_torrents"_s] = pref->recheckTorrentsOnCompletion();
// Customize application instance name
data[u"app_instance_name"_s] = app()->instanceName();
// Refresh interval
data[u"refresh_interval"_s] = session->refreshInterval();
// Resolve peer countries
@@ -943,6 +945,9 @@ void AppController::setPreferencesAction()
// Recheck completed torrents
if (hasKey(u"recheck_completed_torrents"_s))
pref->recheckTorrentsOnCompletion(it.value().toBool());
// Customize application instance name
if (hasKey(u"app_instance_name"_s))
app()->setInstanceName(it.value().toString());
// Refresh interval
if (hasKey(u"refresh_interval"_s))
session->setRefreshInterval(it.value().toInt());