aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-29 17:29:33 +0200
committerDanilo M. <danix@danix.xyz>2026-09-29 17:29:33 +0200
commit4439dffbefcb4d2e3cff0c9e330effc47c6cb02a (patch)
treeab9eea3f196fb7a7cddcd69833155302bc69cafb
parent3524c2eb1267baf44301ea888abc784ecf85e76a (diff)
downloadqtmaildir-4439dffbefcb4d2e3cff0c9e330effc47c6cb02a.tar.gz
qtmaildir-4439dffbefcb4d2e3cff0c9e330effc47c6cb02a.zip
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 <noreply@anthropic.com>
-rw-r--r--src/mainwindow.cpp3
-rw-r--r--tests/test_mainwindow.cpp2
2 files changed, 5 insertions, 0 deletions
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()