diff options
author | kh1 <karsten.heimrich@digia.com> | 2012-12-06 15:47:26 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@digia.com> | 2012-12-07 13:15:35 +0100 |
commit | 40b40e6274e4db14531461c455c88378d12d85f2 (patch) | |
tree | 71b74c31dd349aae200a857050747fdcc7397910 /src/libs/installer/messageboxhandler.cpp | |
parent | fd4c75df63d65e5a97ebc71c8247713ace45ffc9 (diff) |
Finally IFW compiles with Qt5 (use private headers)
Change-Id: I2604c77418e4a930bd0f76092db581fef1e45817
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Diffstat (limited to 'src/libs/installer/messageboxhandler.cpp')
-rw-r--r-- | src/libs/installer/messageboxhandler.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libs/installer/messageboxhandler.cpp b/src/libs/installer/messageboxhandler.cpp index 3c3a70ee9..dd55a9c7f 100644 --- a/src/libs/installer/messageboxhandler.cpp +++ b/src/libs/installer/messageboxhandler.cpp @@ -128,9 +128,13 @@ MessageBoxHandler *MessageBoxHandler::instance() QWidget *MessageBoxHandler::currentBestSuitParent() { - if (QApplication::type() == QApplication::Tty) { +#if QT_VERSION < 0x050000 + if (QApplication::type() == QApplication::Tty) return 0; - } +#else + if (qobject_cast<QApplication*> (qApp) == 0) + return 0; +#endif if (qApp->activeModalWidget()) return qApp->activeModalWidget(); @@ -283,8 +287,13 @@ QMessageBox::StandardButton MessageBoxHandler::showMessageBox(MessageType messag qDebug() << QString::fromLatin1("created %1 message box %2: '%3', %4").arg(messageTypeHash .value(messageType),identifier, title, text); +#if QT_VERSION < 0x050000 if (QApplication::type() == QApplication::Tty) return defaultButton; +#else + if (qobject_cast<QApplication*> (qApp) == 0) + return defaultButton; +#endif if (m_automaticAnswers.contains(identifier)) return m_automaticAnswers.value(identifier); |