summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-06-04 13:42:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-04 14:43:02 +0200
commita149d2f73ec45084c589ef4211974ba50c0d4631 (patch)
tree932112c46bd99c8d32cb1bbecff827759ce17f95 /tests/auto/widgets
parent91b0b2e1a7566dda00ec24e674784e4ccc99fea6 (diff)
Do not clear default button in QMessageBox::setDetailedText().
Store the value of QMessageBoxPrivate::autoAddOkButton temporarily when automatically adding the "Show Details..." button. Task-number: QTBUG-39334 Change-Id: I173c83893548ee83b3d8ea2743f87686c32657e7 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
index 0425db3098..f9abd50a15 100644
--- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
@@ -593,6 +593,11 @@ void tst_QMessageBox::detailsText()
QString text("This is the details text.");
box.setDetailedText(text);
QCOMPARE(box.detailedText(), text);
+ box.show();
+ QTest::qWaitForWindowExposed(&box);
+ // QTBUG-39334, the box should now have the default "Ok" button as well as
+ // the "Show Details.." button.
+ QCOMPARE(box.findChildren<QAbstractButton *>().size(), 2);
}
void tst_QMessageBox::detailsButtonText()