summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-03-16 14:51:29 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-03-16 17:55:22 (GMT)
commit27fb96b9783ba13ce4c8bd681b73c6f3a892d90c (patch)
tree1ac38f360124737081e6f380689d2f7e60b337ec /Tests
parent03b0ceebe5f8ca27b54a2d09ad38fb89c298f800 (diff)
downloadCMake-27fb96b9783ba13ce4c8bd681b73c6f3a892d90c.zip
CMake-27fb96b9783ba13ce4c8bd681b73c6f3a892d90c.tar.gz
CMake-27fb96b9783ba13ce4c8bd681b73c6f3a892d90c.tar.bz2
Make the QtAutomoc test compile with either Qt 4 or Qt 5
Diffstat (limited to 'Tests')
-rw-r--r--Tests/QtAutomoc/calwidget.cpp17
-rw-r--r--Tests/QtAutomoc/main.cpp2
2 files changed, 13 insertions, 6 deletions
diff --git a/Tests/QtAutomoc/calwidget.cpp b/Tests/QtAutomoc/calwidget.cpp
index 24f3b4e..cbfa5a8 100644
--- a/Tests/QtAutomoc/calwidget.cpp
+++ b/Tests/QtAutomoc/calwidget.cpp
@@ -38,7 +38,14 @@
**
****************************************************************************/
- #include <QtGui>
+ #include <QComboBox>
+ #include <QGridLayout>
+ #include <QLabel>
+ #include <QGroupBox>
+ #include <QCheckBox>
+ #include <QDateEdit>
+ #include <QCalendarWidget>
+ #include <QTextCharFormat>
#include "calwidget.h"
@@ -414,10 +421,10 @@
QComboBox *Window::createColorComboBox()
{
QComboBox *comboBox = new QComboBox;
- comboBox->addItem(tr("Red"), Qt::red);
- comboBox->addItem(tr("Blue"), Qt::blue);
- comboBox->addItem(tr("Black"), Qt::black);
- comboBox->addItem(tr("Magenta"), Qt::magenta);
+ comboBox->addItem(tr("Red"), QColor(Qt::red));
+ comboBox->addItem(tr("Blue"), QColor(Qt::blue));
+ comboBox->addItem(tr("Black"), QColor(Qt::black));
+ comboBox->addItem(tr("Magenta"), QColor(Qt::magenta));
return comboBox;
}
diff --git a/Tests/QtAutomoc/main.cpp b/Tests/QtAutomoc/main.cpp
index d952171..bd80180 100644
--- a/Tests/QtAutomoc/main.cpp
+++ b/Tests/QtAutomoc/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QApplication>
#include "codeeditor.h"
#include "calwidget.h"