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

@@ -84,7 +84,7 @@ class MainWindow final : public GUIApplicationComponent<QMainWindow>
Q_DISABLE_COPY_MOVE(MainWindow)
public:
explicit MainWindow(IGUIApplication *app, WindowState initialState = WindowState::Normal);
explicit MainWindow(IGUIApplication *app, WindowState initialState = WindowState::Normal, const QString &titleSuffix = {});
~MainWindow() override;
QWidget *currentTabWidget() const;
@@ -97,12 +97,12 @@ public:
Log::MsgTypes executionLogMsgTypes() const;
void setExecutionLogMsgTypes(Log::MsgTypes value);
// Notifications properties
// Misc properties
bool isDownloadTrackerFavicon() const;
void setDownloadTrackerFavicon(bool value);
void setTitleSuffix(const QString &suffix);
void activate();
void cleanup();
@@ -207,6 +207,7 @@ private:
QFileSystemWatcher *m_executableWatcher = nullptr;
// GUI related
QString m_windowTitle;
bool m_posInitialized = false;
bool m_neverShown = true;
QPointer<QTabWidget> m_tabs;