From 4439dffbefcb4d2e3cff0c9e330effc47c6cb02a Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 29 Sep 2026 17:29:33 +0200 Subject: fix: render the status bar as plain text A launch selector that matches nothing is echoed into the status label so the user can see which value missed. That value comes from another program's command line or from the single-instance socket, and a QLabel left at Qt::AutoText guesses whether a string is markup, so a selector shaped like HTML would have been rendered rather than shown. The format is now stated rather than guessed, the same reasoning AGENTS.md records for MessageDetailsDialog. No existing status message carries markup. Co-Authored-By: Claude Opus 5.5 --- src/mainwindow.cpp | 3 +++ tests/test_mainwindow.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4e0c487..6d2697b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -698,6 +698,9 @@ void MainWindow::buildUi() // it before the rest of the UI exists. m_statusLabel = new QLabel(this); m_statusLabel->setObjectName(QStringLiteral("statusMessage")); + // Plain text, stated rather than left to AutoText's guess: a launch + // selector from another program's command line is echoed here on a miss. + m_statusLabel->setTextFormat(Qt::PlainText); statusBar()->addWidget(m_statusLabel); // Transient messages describe an EVENT and go stale: "Sync complete" reads diff --git a/tests/test_mainwindow.cpp b/tests/test_mainwindow.cpp index e115939..66cc9b5 100644 --- a/tests/test_mainwindow.cpp +++ b/tests/test_mainwindow.cpp @@ -18031,6 +18031,8 @@ void TestMainWindow::aThreadSelectorThatIsNotHexIsRefused() QVERIFY(status); QVERIFY2(status->text().contains(QStringLiteral("0000 or tag:inbox")), "the refusal must be reported as a miss naming the value"); + // The value came from another program, so the label must not interpret it. + QCOMPARE(status->textFormat(), Qt::PlainText); } void TestMainWindow::anEmptySelectorSetChangesNothing() -- cgit v1.2.3