Skip to content

Commit dc6ada3

Browse files
committed
tray: add debug text for menu and tooltip for icon
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
1 parent 2604de4 commit dc6ada3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/mainwindow.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6322,7 +6322,11 @@ void MainWindow::generateSystemTrayContextMenu() {
63226322
menu->setTitle(QStringLiteral("QOwnNotes"));
63236323

63246324
// add menu entry to open the app
6325-
QAction *openAction = menu->addAction(tr("Open QOwnNotes"));
6325+
QString openActionText = tr("Open QOwnNotes");
6326+
#ifdef QT_DEBUG
6327+
openActionText += QStringLiteral(" (Debug)");
6328+
#endif
6329+
QAction *openAction = menu->addAction(openActionText);
63266330
openAction->setIcon(getSystemTrayIcon());
63276331

63286332
connect(openAction, &QAction::triggered, this, &MainWindow::showWindow);
@@ -6440,6 +6444,11 @@ void MainWindow::generateSystemTrayContextMenu() {
64406444
connect(quitAction, &QAction::triggered, this, &MainWindow::on_action_Quit_triggered);
64416445

64426446
trayIcon->setContextMenu(menu);
6447+
#ifdef QT_DEBUG
6448+
trayIcon->setToolTip(QStringLiteral("QOwnNotes (Debug)"));
6449+
#else
6450+
trayIcon->setToolTip(QStringLiteral("QOwnNotes"));
6451+
#endif
64436452
}
64446453

64456454
void MainWindow::on_action_Settings_triggered() {

0 commit comments

Comments
 (0)