From ac5fceafb00a2f007239f9b0fc89fe01a2064d62 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 20 May 2009 15:34:11 +0200 Subject: compile with -qtnamespace, clean up the example .pro files --- examples/animation/animatedtiles/animatedtiles.pro | 10 ++++++-- examples/animation/animatedtiles/main.cpp | 2 ++ examples/animation/appchooser/appchooser.pro | 5 ++-- examples/animation/easing/easing.pro | 24 ++++++++--------- examples/animation/easing/easing.qrc | 5 ++++ examples/animation/easing/main.cpp | 1 + examples/animation/easing/resources.qrc | 5 ---- examples/animation/moveblocks/moveblocks.pro | 5 ++-- .../animation/padnavigator-ng/padnavigator.pro | 12 ++++----- examples/animation/padnavigator-ng/panel.h | 4 +-- .../animation/padnavigator-ng/roundrectitem.cpp | 4 +-- examples/animation/stickman/animation.h | 2 ++ .../animation/stickman/editor/animationdialog.h | 2 ++ examples/animation/stickman/lifecycle.h | 2 ++ examples/animation/stickman/stickman.h | 2 ++ examples/animation/stickman/stickman.pro | 27 +++++++++++-------- examples/animation/sub-attaq/animationmanager.h | 2 ++ examples/animation/sub-attaq/boat.h | 2 ++ .../sub-attaq/custompropertyanimation.cpp | 7 ----- .../animation/sub-attaq/custompropertyanimation.h | 2 ++ examples/animation/sub-attaq/graphicsscene.h | 2 ++ examples/animation/sub-attaq/mainwindow.h | 3 ++- examples/animation/sub-attaq/states.h | 2 ++ examples/animation/sub-attaq/sub-attaq.pro | 15 +++++------ .../eventtransitions/eventtransitions.pro | 12 ++++----- examples/statemachine/factorial/factorial.pro | 11 ++++---- examples/statemachine/pingpong/pingpong.pro | 13 +++++----- examples/statemachine/tankgame/gameitem.h | 2 ++ examples/statemachine/tankgame/mainwindow.h | 3 +++ examples/statemachine/tankgame/plugin.h | 4 +++ examples/statemachine/tankgame/tankgame.pro | 30 +++++++++++++--------- .../statemachine/trafficlight/trafficlight.pro | 7 +---- .../statemachine/twowaybutton/twowaybutton.pro | 12 ++++----- 33 files changed, 136 insertions(+), 105 deletions(-) create mode 100644 examples/animation/easing/easing.qrc delete mode 100644 examples/animation/easing/resources.qrc diff --git a/examples/animation/animatedtiles/animatedtiles.pro b/examples/animation/animatedtiles/animatedtiles.pro index 9e9062c..1840b17 100644 --- a/examples/animation/animatedtiles/animatedtiles.pro +++ b/examples/animation/animatedtiles/animatedtiles.pro @@ -1,2 +1,8 @@ -SOURCES += main.cpp -RESOURCES += animatedtiles.qrc +SOURCES = main.cpp +RESOURCES = animatedtiles.qrc + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/animation/animatedtiles +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS animatedtiles.pro images +sources.path = $$[QT_INSTALL_EXAMPLES]/animation/animatedtiles +INSTALLS += target sources diff --git a/examples/animation/animatedtiles/main.cpp b/examples/animation/animatedtiles/main.cpp index 7988758..4b1d99d 100644 --- a/examples/animation/animatedtiles/main.cpp +++ b/examples/animation/animatedtiles/main.cpp @@ -132,6 +132,8 @@ protected: int main(int argc, char **argv) { + Q_INIT_RESOURCE(animatedtiles); + QApplication app(argc, argv); QPixmap kineticPix(":/images/kinetic.png"); diff --git a/examples/animation/appchooser/appchooser.pro b/examples/animation/appchooser/appchooser.pro index 8cda19a..847b60a 100644 --- a/examples/animation/appchooser/appchooser.pro +++ b/examples/animation/appchooser/appchooser.pro @@ -1,6 +1,5 @@ -# Input -SOURCES += main.cpp -RESOURCES += appchooser.qrc +SOURCES = main.cpp +RESOURCES = appchooser.qrc # install target.path = $$[QT_INSTALL_EXAMPLES]/animation/appchooser diff --git a/examples/animation/easing/easing.pro b/examples/animation/easing/easing.pro index fa5b22d..8e8a35f 100644 --- a/examples/animation/easing/easing.pro +++ b/examples/animation/easing/easing.pro @@ -1,16 +1,14 @@ -###################################################################### -# Automatically generated by qmake (2.01a) to 2. okt 23:22:11 2008 -###################################################################### +HEADERS = window.h \ + animation.h +SOURCES = main.cpp \ + window.cpp -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . +FORMS = form.ui -# Input -HEADERS += window.h animation.h -SOURCES += main.cpp window.cpp +RESOURCES = easing.qrc -FORMS += form.ui - -RESOURCES = resources.qrc +# install +target.path = $$[QT_INSTALL_EXAMPLES]/animation/easing +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS easing.pro images +sources.path = $$[QT_INSTALL_EXAMPLES]/animation/easing +INSTALLS += target sources diff --git a/examples/animation/easing/easing.qrc b/examples/animation/easing/easing.qrc new file mode 100644 index 0000000..7e112d3 --- /dev/null +++ b/examples/animation/easing/easing.qrc @@ -0,0 +1,5 @@ + + + images/qt-logo.png + + \ No newline at end of file diff --git a/examples/animation/easing/main.cpp b/examples/animation/easing/main.cpp index 487fa86..bd10df2 100644 --- a/examples/animation/easing/main.cpp +++ b/examples/animation/easing/main.cpp @@ -44,6 +44,7 @@ int main(int argc, char **argv) { + Q_INIT_RESOURCE(easing); QApplication app(argc, argv); Window w; w.resize(400, 400); diff --git a/examples/animation/easing/resources.qrc b/examples/animation/easing/resources.qrc deleted file mode 100644 index 7e112d3..0000000 --- a/examples/animation/easing/resources.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - images/qt-logo.png - - \ No newline at end of file diff --git a/examples/animation/moveblocks/moveblocks.pro b/examples/animation/moveblocks/moveblocks.pro index 7a82ca5..b8e88b2 100644 --- a/examples/animation/moveblocks/moveblocks.pro +++ b/examples/animation/moveblocks/moveblocks.pro @@ -1,8 +1,7 @@ -# Input -SOURCES += main.cpp +SOURCES = main.cpp # install target.path = $$[QT_INSTALL_EXAMPLES]/animation/moveblocks -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS states.pro +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS moveblocks.pro sources.path = $$[QT_INSTALL_EXAMPLES]/animation/moveblocks INSTALLS += target sources diff --git a/examples/animation/padnavigator-ng/padnavigator.pro b/examples/animation/padnavigator-ng/padnavigator.pro index 0d094c6..8e53a6d 100644 --- a/examples/animation/padnavigator-ng/padnavigator.pro +++ b/examples/animation/padnavigator-ng/padnavigator.pro @@ -1,24 +1,24 @@ -HEADERS += \ +HEADERS = \ panel.h \ roundrectitem.h \ splashitem.h -SOURCES += \ +SOURCES = \ panel.cpp \ roundrectitem.cpp \ splashitem.cpp \ main.cpp -RESOURCES += \ +RESOURCES = \ padnavigator.qrc -FORMS += \ +FORMS = \ backside.ui contains(QT_CONFIG, opengl):QT += opengl # install -target.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/padnavigator +target.path = $$[QT_INSTALL_EXAMPLES]/animation/padnavigator-ng sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS padnavigator.pro images -sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/padnavigator +sources.path = $$[QT_INSTALL_EXAMPLES]/animation/padnavigator-ng INSTALLS += target sources diff --git a/examples/animation/padnavigator-ng/panel.h b/examples/animation/padnavigator-ng/panel.h index 8ad95d9..9aca29d 100644 --- a/examples/animation/padnavigator-ng/panel.h +++ b/examples/animation/padnavigator-ng/panel.h @@ -44,11 +44,11 @@ QT_BEGIN_NAMESPACE class Ui_BackSide; +class QAnimationGroup; +class QPropertyAnimation; QT_END_NAMESPACE; class RoundRectItem; -class QAnimationGroup; -class QPropertyAnimation; class Panel : public QGraphicsView { diff --git a/examples/animation/padnavigator-ng/roundrectitem.cpp b/examples/animation/padnavigator-ng/roundrectitem.cpp index 7e7d423..2ff216c 100644 --- a/examples/animation/padnavigator-ng/roundrectitem.cpp +++ b/examples/animation/padnavigator-ng/roundrectitem.cpp @@ -45,9 +45,9 @@ RoundRectItem::RoundRectItem(const QRectF &rect, const QBrush &brush, QWidget *embeddedWidget) : QGraphicsWidget(), + m_rect(rect), brush(brush), - proxyWidget(0), - m_rect(rect) + proxyWidget(0) { if (embeddedWidget) { proxyWidget = new QGraphicsProxyWidget(this); diff --git a/examples/animation/stickman/animation.h b/examples/animation/stickman/animation.h index e6c375e..b0b39c9 100644 --- a/examples/animation/stickman/animation.h +++ b/examples/animation/stickman/animation.h @@ -47,7 +47,9 @@ #include class Frame; +QT_BEGIN_NAMESPACE class QIODevice; +QT_END_NAMESPACE class Animation { public: diff --git a/examples/animation/stickman/editor/animationdialog.h b/examples/animation/stickman/editor/animationdialog.h index 764cdaf..6025088 100644 --- a/examples/animation/stickman/editor/animationdialog.h +++ b/examples/animation/stickman/editor/animationdialog.h @@ -45,8 +45,10 @@ #include #include +QT_BEGIN_NAMESPACE class QSpinBox; class QLineEdit; +QT_END_NAMESPACE class StickMan; class Animation; class AnimationDialog: public QDialog diff --git a/examples/animation/stickman/lifecycle.h b/examples/animation/stickman/lifecycle.h index 8fd0fb2..2be4762 100644 --- a/examples/animation/stickman/lifecycle.h +++ b/examples/animation/stickman/lifecycle.h @@ -45,11 +45,13 @@ #include class StickMan; +QT_BEGIN_NAMESPACE class QStateMachine; class QAnimationGroup; class QState; class QAbstractState; class QAbstractTransition; +QT_END_NAMESPACE class GraphicsView; class LifeCycle { diff --git a/examples/animation/stickman/stickman.h b/examples/animation/stickman/stickman.h index 46863a3..6395272 100644 --- a/examples/animation/stickman/stickman.h +++ b/examples/animation/stickman/stickman.h @@ -47,7 +47,9 @@ const int LimbCount = 16; class Node; +QT_BEGIN_NAMESPACE class QTimer; +QT_END_NAMESPACE class StickMan: public QObject, public QGraphicsItem { Q_OBJECT diff --git a/examples/animation/stickman/stickman.pro b/examples/animation/stickman/stickman.pro index bfee5b0..956b49c 100644 --- a/examples/animation/stickman/stickman.pro +++ b/examples/animation/stickman/stickman.pro @@ -1,14 +1,19 @@ -###################################################################### -# Automatically generated by qmake (2.01a) ti 3. feb 19:50:14 2009 -###################################################################### - -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . +HEADERS += stickman.h \ + animation.h \ + node.h \ + lifecycle.h \ + graphicsview.h +SOURCES += main.cpp \ + stickman.cpp \ + animation.cpp \ + node.cpp \ + lifecycle.cpp \ + graphicsview.cpp include(editor/editor.pri) -# Input -HEADERS += stickman.h animation.h node.h lifecycle.h graphicsview.h -SOURCES += main.cpp stickman.cpp animation.cpp node.cpp lifecycle.cpp graphicsview.cpp +# install +target.path = $$[QT_INSTALL_EXAMPLES]/animation/stickman +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS stickman.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/animation/stickman +INSTALLS += target sources diff --git a/examples/animation/sub-attaq/animationmanager.h b/examples/animation/sub-attaq/animationmanager.h index 69ec3d7..a563c96 100644 --- a/examples/animation/sub-attaq/animationmanager.h +++ b/examples/animation/sub-attaq/animationmanager.h @@ -44,7 +44,9 @@ #include +QT_BEGIN_NAMESPACE class QAbstractAnimation; +QT_END_NAMESPACE class AnimationManager : public QObject { diff --git a/examples/animation/sub-attaq/boat.h b/examples/animation/sub-attaq/boat.h index f16074e..08a9fa2 100644 --- a/examples/animation/sub-attaq/boat.h +++ b/examples/animation/sub-attaq/boat.h @@ -50,9 +50,11 @@ class PixmapItem; class Bomb; +QT_BEGIN_NAMESPACE class QVariantAnimation; class QAbstractAnimation; class QStateMachine; +QT_END_NAMESPACE class Boat : public QGraphicsWidget { diff --git a/examples/animation/sub-attaq/custompropertyanimation.cpp b/examples/animation/sub-attaq/custompropertyanimation.cpp index f7ab269..8226cca 100644 --- a/examples/animation/sub-attaq/custompropertyanimation.cpp +++ b/examples/animation/sub-attaq/custompropertyanimation.cpp @@ -44,9 +44,6 @@ // Qt #include -QT_BEGIN_NAMESPACE - - CustomPropertyAnimation::CustomPropertyAnimation(QObject *parent) : QVariantAnimation(parent), animProp(0) { @@ -108,8 +105,4 @@ void CustomPropertyAnimation::updateState(QAbstractAnimation::State oldState, QA QVariantAnimation::updateState(oldState, newState); } - - #include "moc_custompropertyanimation.cpp" - -QT_END_NAMESPACE diff --git a/examples/animation/sub-attaq/custompropertyanimation.h b/examples/animation/sub-attaq/custompropertyanimation.h index 1dca454..8654aeb 100644 --- a/examples/animation/sub-attaq/custompropertyanimation.h +++ b/examples/animation/sub-attaq/custompropertyanimation.h @@ -44,7 +44,9 @@ #include +QT_BEGIN_NAMESPACE class QGraphicsItem; +QT_END_NAMESPACE struct AbstractProperty { diff --git a/examples/animation/sub-attaq/graphicsscene.h b/examples/animation/sub-attaq/graphicsscene.h index 70c873e..8b0ea96 100644 --- a/examples/animation/sub-attaq/graphicsscene.h +++ b/examples/animation/sub-attaq/graphicsscene.h @@ -54,7 +54,9 @@ class Torpedo; class Bomb; class PixmapItem; class ProgressItem; +QT_BEGIN_NAMESPACE class QAction; +QT_END_NAMESPACE class GraphicsScene : public QGraphicsScene { diff --git a/examples/animation/sub-attaq/mainwindow.h b/examples/animation/sub-attaq/mainwindow.h index 72d1324..87f194a 100644 --- a/examples/animation/sub-attaq/mainwindow.h +++ b/examples/animation/sub-attaq/mainwindow.h @@ -44,9 +44,10 @@ //Qt #include - class GraphicsScene; +QT_BEGIN_NAMESPACE class QGraphicsView; +QT_END_NAMESPACE class MainWindow : public QMainWindow { diff --git a/examples/animation/sub-attaq/states.h b/examples/animation/sub-attaq/states.h index 3203b3b..71375e0 100644 --- a/examples/animation/sub-attaq/states.h +++ b/examples/animation/sub-attaq/states.h @@ -52,7 +52,9 @@ class GraphicsScene; class Boat; class SubMarine; +QT_BEGIN_NAMESPACE class QStateMachine; +QT_END_NAMESPACE class PlayState : public QState { diff --git a/examples/animation/sub-attaq/sub-attaq.pro b/examples/animation/sub-attaq/sub-attaq.pro index 961a9b5..d13a099 100644 --- a/examples/animation/sub-attaq/sub-attaq.pro +++ b/examples/animation/sub-attaq/sub-attaq.pro @@ -1,14 +1,5 @@ -# ##################################################################### -# Automatically generated by qmake (2.01a) Thu Oct 9 10:53:30 2008 -# ##################################################################### -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . -QT += xml contains(QT_CONFIG, opengl):QT += opengl -# Input HEADERS += boat.h \ bomb.h \ mainwindow.h \ @@ -37,3 +28,9 @@ SOURCES += boat.cpp \ qanimationstate.cpp \ progressitem.cpp RESOURCES += subattaq.qrc + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/animation/sub-attaq +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS sub-attaq.pro pics +sources.path = $$[QT_INSTALL_EXAMPLES]/animation/sub-attaq +INSTALLS += target sources diff --git a/examples/statemachine/eventtransitions/eventtransitions.pro b/examples/statemachine/eventtransitions/eventtransitions.pro index 6a976cb..7e92cf2 100644 --- a/examples/statemachine/eventtransitions/eventtransitions.pro +++ b/examples/statemachine/eventtransitions/eventtransitions.pro @@ -1,7 +1,7 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . +SOURCES = main.cpp -# Input -SOURCES += main.cpp +# install +target.path = $$[QT_INSTALL_EXAMPLES]/statemachine/eventtransitions +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS eventtransitions.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/statemachine/eventtransitions +INSTALLS += target sources diff --git a/examples/statemachine/factorial/factorial.pro b/examples/statemachine/factorial/factorial.pro index ac79117..14a6833 100644 --- a/examples/statemachine/factorial/factorial.pro +++ b/examples/statemachine/factorial/factorial.pro @@ -1,10 +1,11 @@ -TEMPLATE = app -TARGET = QT = core win32: CONFIG += console mac:CONFIG -= app_bundle -DEPENDPATH += . -INCLUDEPATH += . -# Input SOURCES += main.cpp + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/statemachine/factorial +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS factorial.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/statemachine/factorial +INSTALLS += target sources diff --git a/examples/statemachine/pingpong/pingpong.pro b/examples/statemachine/pingpong/pingpong.pro index bff9cb8..42eab6c 100644 --- a/examples/statemachine/pingpong/pingpong.pro +++ b/examples/statemachine/pingpong/pingpong.pro @@ -1,10 +1,11 @@ QT = core -TEMPLATE = app -TARGET = win32: CONFIG += console mac:CONFIG -= app_bundle -DEPENDPATH += . -INCLUDEPATH += . -# Input -SOURCES += main.cpp +SOURCES = main.cpp + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/statemachine/pingpong +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS pingpong.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/statemachine/pingpong +INSTALLS += target sources diff --git a/examples/statemachine/tankgame/gameitem.h b/examples/statemachine/tankgame/gameitem.h index 43b8785..33caf71 100644 --- a/examples/statemachine/tankgame/gameitem.h +++ b/examples/statemachine/tankgame/gameitem.h @@ -3,7 +3,9 @@ #include +QT_BEGIN_NAMESPACE class QLineF; +QT_END_NAMESPACE class GameItem: public QObject, public QGraphicsItem { Q_OBJECT diff --git a/examples/statemachine/tankgame/mainwindow.h b/examples/statemachine/tankgame/mainwindow.h index 40e1595..391ab77 100644 --- a/examples/statemachine/tankgame/mainwindow.h +++ b/examples/statemachine/tankgame/mainwindow.h @@ -4,11 +4,14 @@ #include #include +QT_BEGIN_NAMESPACE class QGraphicsScene; class QStateMachine; class QState; +QT_END_NAMESPACE class GameOverTransition; class TankItem; + class MainWindow: public QMainWindow { Q_OBJECT diff --git a/examples/statemachine/tankgame/plugin.h b/examples/statemachine/tankgame/plugin.h index 2b48d43..006ad78 100644 --- a/examples/statemachine/tankgame/plugin.h +++ b/examples/statemachine/tankgame/plugin.h @@ -3,7 +3,9 @@ #include +QT_BEGIN_NAMESPACE class QState; +QT_END_NAMESPACE class Plugin { public: @@ -12,6 +14,8 @@ public: virtual QState *create(QState *parentState, QObject *tank) = 0; }; +QT_BEGIN_NAMESPACE Q_DECLARE_INTERFACE(Plugin, "TankPlugin") +QT_END_NAMESPACE #endif diff --git a/examples/statemachine/tankgame/tankgame.pro b/examples/statemachine/tankgame/tankgame.pro index 46cfe2e..59415be 100644 --- a/examples/statemachine/tankgame/tankgame.pro +++ b/examples/statemachine/tankgame/tankgame.pro @@ -1,13 +1,19 @@ -###################################################################### -# Automatically generated by qmake (2.01a) on 22. apr 14:11:33 2009 -###################################################################### - -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += C:/dev/kinetic/examples/statemachine/tankgame/. . - -# Input -HEADERS += mainwindow.h plugin.h tankitem.h rocketitem.h gameitem.h gameovertransition.h -SOURCES += main.cpp mainwindow.cpp tankitem.cpp rocketitem.cpp gameitem.cpp gameovertransition.cpp +HEADERS += mainwindow.h \ + plugin.h \ + tankitem.h \ + rocketitem.h \ + gameitem.h \ + gameovertransition.h +SOURCES += main.cpp \ + mainwindow.cpp \ + tankitem.cpp \ + rocketitem.cpp \ + gameitem.cpp \ + gameovertransition.cpp CONFIG += console + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/statemachine/tankgame +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS tankgame.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/statemachine/tankgame +INSTALLS += target sources diff --git a/examples/statemachine/trafficlight/trafficlight.pro b/examples/statemachine/trafficlight/trafficlight.pro index 730bd75..684575a 100644 --- a/examples/statemachine/trafficlight/trafficlight.pro +++ b/examples/statemachine/trafficlight/trafficlight.pro @@ -1,9 +1,4 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -SOURCES += main.cpp +SOURCES = main.cpp # install target.path = $$[QT_INSTALL_EXAMPLES]/statemachine/trafficlight diff --git a/examples/statemachine/twowaybutton/twowaybutton.pro b/examples/statemachine/twowaybutton/twowaybutton.pro index 6a976cb..f6cbc57 100644 --- a/examples/statemachine/twowaybutton/twowaybutton.pro +++ b/examples/statemachine/twowaybutton/twowaybutton.pro @@ -1,7 +1,7 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . +SOURCES = main.cpp -# Input -SOURCES += main.cpp +# install +target.path = $$[QT_INSTALL_EXAMPLES]/statemachine/twowaybutton +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS twowaybutton.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/statemachine/twowaybutton +INSTALLS += target sources -- cgit v0.12