diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-30 12:06:17 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-30 12:06:17 +0100 |
| commit | e7da569d1287b53ce872d9bc75e88e8c78e3af02 (patch) | |
| tree | e72b41a1df91edcddab191417af7f30ec6b2a6b3 /tests/test_mainwindow.cpp | |
| parent | 2a568ea0cce16e77f4c8391408cd996f6b576dab (diff) | |
| download | qtmaildir-e7da569d1287b53ce872d9bc75e88e8c78e3af02.tar.gz qtmaildir-e7da569d1287b53ce872d9bc75e88e8c78e3af02.zip | |
test: survive Qt 6.12 and QtWebEngine 6.140
QtWebEngine 6.140's in-process GPU thread raises SIGTRAP under the
offscreen platform and takes test_mainwindow down with it. Offscreen has
no GPU to offer, so ctest now passes --disable-gpu alongside it.
undoMovesTheMessageBack triggered Undo as soon as the file reached the
trash, but the worker moves the file before its confirmation crosses
back and pushes the MoveCommand. Under Qt 6.12 that race lost every
time and Undo ran on an empty stack. Wait for canUndo() as well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_mainwindow.cpp')
| -rw-r--r-- | tests/test_mainwindow.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_mainwindow.cpp b/tests/test_mainwindow.cpp index 5eed336..9fc8439 100644 --- a/tests/test_mainwindow.cpp +++ b/tests/test_mainwindow.cpp @@ -13736,6 +13736,11 @@ void TestMainWindow::undoMovesTheMessageBack() view->setCurrentIndex(model->index(0, 0, QModelIndex())); window.findChild<QAction *>(QStringLiteral("delete"))->trigger(); QTRY_VERIFY_WITH_TIMEOUT(folderHasMessageFile(trash, stem), 15000); + // The file reaches the trash inside the worker BEFORE its confirmation + // crosses back and pushes the MoveCommand, so the undo has to wait for + // the stack too. Triggering on the file alone undid an empty stack, which + // Qt 6.12's quicker QTRY made deterministic. + QTRY_VERIFY_WITH_TIMEOUT(window.canUndo(), 15000); window.findChild<QAction *>(QStringLiteral("undo"))->trigger(); |
