diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-11-01 16:05:39 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-01 16:37:36 +0100 |
commit | dd5f1ab4541a50e963555a082534fc4275680a33 (patch) | |
tree | 638a89a73761f4f1b7e341f356deaea15efc89b3 /tests/manual/dialogs/messageboxpanel.cpp | |
parent | 59569fd0202c52a16860fba5634e743286a19fd2 (diff) | |
download | qtbase-dd5f1ab4541a50e963555a082534fc4275680a33.tar.gz |
Fix compilation of the manual dialogs test with Qt 4.
This is useful for comparisons and bug fixes.
Change-Id: Ib5c5bcb7df4b15779be0b613782206f052c94430
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests/manual/dialogs/messageboxpanel.cpp')
-rw-r--r-- | tests/manual/dialogs/messageboxpanel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/manual/dialogs/messageboxpanel.cpp b/tests/manual/dialogs/messageboxpanel.cpp index 529a8251e1..ced582981e 100644 --- a/tests/manual/dialogs/messageboxpanel.cpp +++ b/tests/manual/dialogs/messageboxpanel.cpp @@ -149,9 +149,11 @@ void MessageBoxPanel::setupMessageBox(QMessageBox &box) if (box.standardButtons() == (QMessageBox::StandardButtons) 0) box.setStandardButtons(QMessageBox::Ok); // just to have something. +#if QT_VERSION >= 0x050000 box.setCheckBox(0); if (m_checkboxText->text().length() > 0) box.setCheckBox(new QCheckBox(m_checkboxText->text())); +#endif // Qt 5 box.setIcon((QMessageBox::Icon) m_iconComboBox->currentIndex()); } @@ -176,12 +178,14 @@ void MessageBoxPanel::doExec() QString sres; sres.setNum(res, 16); m_resultLabel->setText(QString::fromLatin1("Return value (hex): %1").arg(sres)); +#if QT_VERSION >= 0x050000 if (m_msgbox->checkBox()) { if (m_msgbox->checkBox()->isChecked()) m_checkBoxResult->setText(QString::fromLatin1("Checkbox was checked")); else m_checkBoxResult->setText(QString::fromLatin1("Checkbox was not checked")); } +#endif // Qt 5 } void MessageBoxPanel::doShowApply() |