diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-11-14 09:34:38 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-11-14 09:34:38 (GMT) |
commit | 0b90bb86d2ef0b925158a9cf185981eaea1776c2 (patch) | |
tree | dad0948b20e5a644e5a653a3251b1fc6514f7f00 | |
parent | bc992fd8381697f57c6abb13b5fa17167d98867a (diff) | |
parent | 11a6d868b5613dd7fdbef02198aaf9566fcd1f17 (diff) | |
download | Qt-0b90bb86d2ef0b925158a9cf185981eaea1776c2.zip Qt-0b90bb86d2ef0b925158a9cf185981eaea1776c2.tar.gz Qt-0b90bb86d2ef0b925158a9cf185981eaea1776c2.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Fix for QMessageBox's autotest.
Fix for the button size calculation in qmessagebox.cpp
-rw-r--r-- | src/gui/dialogs/qmessagebox.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qmessagebox/tst_qmessagebox.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index 149e267..ba00cd8 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -153,7 +153,7 @@ public: expandedTo(QApplication::globalStrut()); opt.text = label(HideLabel); sz = fm.size(Qt::TextShowMnemonic, opt.text); - ret.expandedTo(style()->sizeFromContents(QStyle::CT_PushButton, &opt, sz, this). + ret = ret.expandedTo(style()->sizeFromContents(QStyle::CT_PushButton, &opt, sz, this). expandedTo(QApplication::globalStrut())); return ret; } diff --git a/tests/auto/qmessagebox/tst_qmessagebox.cpp b/tests/auto/qmessagebox/tst_qmessagebox.cpp index ed085ce..06e242c 100644 --- a/tests/auto/qmessagebox/tst_qmessagebox.cpp +++ b/tests/auto/qmessagebox/tst_qmessagebox.cpp @@ -720,7 +720,8 @@ void tst_QMessageBox::detailsButtonText() QAbstractButton* btn = NULL; foreach(btn, list) { if (btn && (btn->inherits("QPushButton"))) { - if (btn->text() != QMessageBox::tr("OK") && btn->text() != QMessageBox::tr("Show Details...")) { + if (btn->text().remove("&") != QMessageBox::tr("OK") + && btn->text() != QMessageBox::tr("Show Details...")) { QFAIL(qPrintable(QString("Unexpected messagebox button text: %1").arg(btn->text()))); } } |