Make the QtAutomoc test compile with either Qt 4 or Qt 5

This commit is contained in:
Stephen Kelly 2013-03-16 15:51:29 +01:00
parent 03b0ceebe5
commit 27fb96b978
2 changed files with 13 additions and 6 deletions

View File

@ -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" #include "calwidget.h"
@ -414,10 +421,10 @@
QComboBox *Window::createColorComboBox() QComboBox *Window::createColorComboBox()
{ {
QComboBox *comboBox = new QComboBox; QComboBox *comboBox = new QComboBox;
comboBox->addItem(tr("Red"), Qt::red); comboBox->addItem(tr("Red"), QColor(Qt::red));
comboBox->addItem(tr("Blue"), Qt::blue); comboBox->addItem(tr("Blue"), QColor(Qt::blue));
comboBox->addItem(tr("Black"), Qt::black); comboBox->addItem(tr("Black"), QColor(Qt::black));
comboBox->addItem(tr("Magenta"), Qt::magenta); comboBox->addItem(tr("Magenta"), QColor(Qt::magenta));
return comboBox; return comboBox;
} }

View File

@ -38,7 +38,7 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtGui> #include <QApplication>
#include "codeeditor.h" #include "codeeditor.h"
#include "calwidget.h" #include "calwidget.h"