From 27fb96b9783ba13ce4c8bd681b73c6f3a892d90c Mon Sep 17 00:00:00 2001
From: Stephen Kelly <steveire@gmail.com>
Date: Sat, 16 Mar 2013 15:51:29 +0100
Subject: Make the QtAutomoc test compile with either Qt 4 or Qt 5

---
 Tests/QtAutomoc/calwidget.cpp | 17 ++++++++++++-----
 Tests/QtAutomoc/main.cpp      |  2 +-
 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"
-- 
cgit v0.12