summaryrefslogtreecommitdiffstats
path: root/examples/animation/sub-attaq
diff options
context:
space:
mode:
Diffstat (limited to 'examples/animation/sub-attaq')
-rw-r--r--examples/animation/sub-attaq/mainwindow.cpp12
-rw-r--r--examples/animation/sub-attaq/pixmapitem.cpp4
-rw-r--r--examples/animation/sub-attaq/sub-attaq.pro3
3 files changed, 10 insertions, 9 deletions
diff --git a/examples/animation/sub-attaq/mainwindow.cpp b/examples/animation/sub-attaq/mainwindow.cpp
index fd41cee6dc..70f0303177 100644
--- a/examples/animation/sub-attaq/mainwindow.cpp
+++ b/examples/animation/sub-attaq/mainwindow.cpp
@@ -45,13 +45,13 @@
//Qt
#include <QGraphicsView>
+#include <QApplication>
+#include <QMenu>
+#include <QMenuBar>
+#include <QLayout>
-#ifdef QT_NO_OPENGL
- #include <QtGui/QMenuBar>
- #include <QtGui/QLayout>
- #include <QtGui/QApplication>
-#else
- #include <QtOpenGL/QtOpenGL>
+#ifndef QT_NO_OPENGL
+# include <QtOpenGL/QtOpenGL>
#endif
MainWindow::MainWindow() : QMainWindow(0)
diff --git a/examples/animation/sub-attaq/pixmapitem.cpp b/examples/animation/sub-attaq/pixmapitem.cpp
index b2061dc06c..077151d708 100644
--- a/examples/animation/sub-attaq/pixmapitem.cpp
+++ b/examples/animation/sub-attaq/pixmapitem.cpp
@@ -48,9 +48,9 @@
PixmapItem::PixmapItem(const QString &fileName,GraphicsScene::Mode mode, QGraphicsItem * parent) : QGraphicsObject(parent)
{
if (mode == GraphicsScene::Big)
- pix = ":/big/" + fileName;
+ pix = QPixmap(QStringLiteral(":/big/") + fileName);
else
- pix = ":/small/" + fileName;
+ pix = QPixmap(QStringLiteral(":/small/") + fileName);
}
PixmapItem::PixmapItem(const QString &fileName, QGraphicsScene *scene) : QGraphicsObject(), pix(fileName)
diff --git a/examples/animation/sub-attaq/sub-attaq.pro b/examples/animation/sub-attaq/sub-attaq.pro
index e994694b54..6d9b3195ac 100644
--- a/examples/animation/sub-attaq/sub-attaq.pro
+++ b/examples/animation/sub-attaq/sub-attaq.pro
@@ -1,4 +1,5 @@
-contains(QT_CONFIG, opengl):QT += opengl widgets
+QT += widgets
+contains(QT_CONFIG, opengl):QT += opengl
HEADERS += boat.h \
bomb.h \
mainwindow.h \