From 86074f40121466798cdd64e07a00db2542543c52 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 14 Aug 2026 18:25:03 +0200 Subject: fix(startup): raise the config-problem modal outside the constructor showWarnings() did two separable things and one of them could not be reached from a test. It set the status label, which is harmless, and it raised a QMessageBox from the MainWindow constructor, which under the offscreen platform nothing can dismiss: the constructor never returned and the suite hung with no output, reading as an infrastructure failure rather than a test one. It splits in two. applyWarnings() keeps the status label and stays in the constructor. configProblems() returns the list, and main.cpp raises the dialog after show(), which also gives it a visible parent to sit on. The distinction between warnings and problems is preserved exactly: a keybinding being ignored interrupts startup, "no sync command configured" does not. The warning path now has its first test, using the config shape that caused the original hang. Mutation checked by putting the modal back in the constructor: the test times out at 124 rather than failing, which is the behaviour this removes. Co-Authored-By: Claude Opus 5 --- src/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 231594f..2804196 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -97,5 +97,15 @@ int main(int argc, char *argv[]) MainWindow window(config); window.show(); + // After show(), and out here rather than inside the constructor. A modal + // raised from the constructor cannot be dismissed under the offscreen + // platform, so it hung the test suite with no output (item 84). Showing it + // here also gives the dialog a visible parent to sit on. + const QStringList problems = window.configProblems(); + if (!problems.isEmpty()) { + QMessageBox::warning(&window, QObject::tr("Configuration problems"), + problems.join(QLatin1Char('\n'))); + } + return app.exec(); } -- cgit v1.2.3