From 46c7d8f1d23d28ca4bb8d8e940d639a2d5b1dc7f Mon Sep 17 00:00:00 2001
From: Alessandro Portale <alessandro.portale@nokia.com>
Date: Wed, 25 Aug 2010 14:25:18 +0200
Subject: [PATCH] Moving the "Qml standalone" wizards from qmlpm to qt4pm

---
 .../qmlprojectmanager/qmlprojectmanager.pro   |  18 ++----------------
 .../qmlprojectmanager/qmlprojectplugin.cpp    |   3 ---
 .../qt4projectmanager/qt4projectmanager.pro   |   8 ++++++++
 .../qt4projectmanagerconstants.h              |   1 +
 .../qt4projectmanagerplugin.cpp               |   4 ++++
 .../wizards/images/qml_standalone.png         | Bin 0 -> 586 bytes
 .../wizards/qmlstandaloneapp.cpp              |   4 ++--
 .../wizards/qmlstandaloneapp.h                |   4 ++--
 .../wizards/qmlstandaloneappwizard.cpp        |  14 +++++++-------
 .../wizards/qmlstandaloneappwizard.h          |   4 ++--
 .../qmlstandaloneappwizardoptionspage.ui      |   0
 .../wizards/qmlstandaloneappwizardpages.cpp   |   4 ++--
 .../wizards/qmlstandaloneappwizardpages.h     |   4 ++--
 .../qmlstandaloneappwizardsourcespage.ui      |   0
 .../qt4projectmanager/wizards/wizards.qrc     |   1 +
 15 files changed, 33 insertions(+), 36 deletions(-)
 create mode 100644 src/plugins/qt4projectmanager/wizards/images/qml_standalone.png
 rename src/plugins/{qmlprojectmanager => qt4projectmanager}/wizards/qmlstandaloneapp.cpp (99%)
 rename src/plugins/{qmlprojectmanager => qt4projectmanager}/wizards/qmlstandaloneapp.h (98%)
 rename src/plugins/{qmlprojectmanager => qt4projectmanager}/wizards/qmlstandaloneappwizard.cpp (96%)
 rename src/plugins/{qmlprojectmanager => qt4projectmanager}/wizards/qmlstandaloneappwizard.h (97%)
 rename src/plugins/{qmlprojectmanager => qt4projectmanager}/wizards/qmlstandaloneappwizardoptionspage.ui (100%)
 rename src/plugins/{qmlprojectmanager => qt4projectmanager}/wizards/qmlstandaloneappwizardpages.cpp (99%)
 rename src/plugins/{qmlprojectmanager => qt4projectmanager}/wizards/qmlstandaloneappwizardpages.h (97%)
 rename src/plugins/{qmlprojectmanager => qt4projectmanager}/wizards/qmlstandaloneappwizardsourcespage.ui (100%)

diff --git a/src/plugins/qmlprojectmanager/qmlprojectmanager.pro b/src/plugins/qmlprojectmanager/qmlprojectmanager.pro
index 87c286ce4ab..1e662dfc02b 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectmanager.pro
+++ b/src/plugins/qmlprojectmanager/qmlprojectmanager.pro
@@ -21,10 +21,7 @@ HEADERS += qmlproject.h \
     qmlprojectapplicationwizard.h \
     qmlprojectmanager_global.h \
     qmlprojectmanagerconstants.h \
-    qmlprojecttarget.h \
-    wizards/qmlstandaloneappwizard.h \
-    wizards/qmlstandaloneappwizardpages.h \
-    wizards/qmlstandaloneapp.h
+    qmlprojecttarget.h
 
 SOURCES += qmlproject.cpp \
     qmlprojectplugin.cpp \
@@ -36,20 +33,9 @@ SOURCES += qmlproject.cpp \
     qmlprojectrunconfiguration.cpp \
     qmlprojectrunconfigurationfactory.cpp \
     qmlprojectapplicationwizard.cpp \
-    qmlprojecttarget.cpp \
-    wizards/qmlstandaloneappwizard.cpp \
-    wizards/qmlstandaloneappwizardpages.cpp \
-    wizards/qmlstandaloneapp.cpp
+    qmlprojecttarget.cpp
 
 RESOURCES += qmlproject.qrc
 
-INCLUDEPATH += \
-    . \
-    wizards
-
-FORMS += \
-    wizards/qmlstandaloneappwizardoptionspage.ui \
-    wizards/qmlstandaloneappwizardsourcespage.ui
-
 OTHER_FILES += QmlProjectManager.pluginspec \
                QmlProject.mimetypes.xml
diff --git a/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp b/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
index 62b7d61c49d..f2d798b15dc 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
@@ -31,7 +31,6 @@
 #include "qmlprojectmanager.h"
 #include "qmlprojectimportwizard.h"
 #include "qmlprojectapplicationwizard.h"
-#include "qmlstandaloneappwizard.h"
 #include "qmlprojectconstants.h"
 #include "qmlproject.h"
 #include "qmlprojectrunconfigurationfactory.h"
@@ -77,8 +76,6 @@ bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage)
     addAutoReleasedObject(manager);
     addAutoReleasedObject(new Internal::QmlProjectRunConfigurationFactory);
     addAutoReleasedObject(new Internal::QmlRunControlFactory);
-    addAutoReleasedObject(new QmlStandaloneAppWizard(QmlStandaloneAppWizard::NewQmlFile));
-    addAutoReleasedObject(new QmlStandaloneAppWizard(QmlStandaloneAppWizard::ImportQmlFile));
     addAutoReleasedObject(new QmlProjectApplicationWizard);
     addAutoReleasedObject(new QmlProjectImportWizard);
 
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.pro b/src/plugins/qt4projectmanager/qt4projectmanager.pro
index 7fa59883e03..93086252983 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanager.pro
+++ b/src/plugins/qt4projectmanager/qt4projectmanager.pro
@@ -32,6 +32,9 @@ HEADERS += qt4deployconfiguration.h \
     wizards/filespage.h \
     wizards/qtwizard.h \
     wizards/targetsetuppage.h \
+    wizards/qmlstandaloneappwizard.h \
+    wizards/qmlstandaloneappwizardpages.h \
+    wizards/qmlstandaloneapp.h \
     qt4projectmanagerconstants.h \
     makestep.h \
     qmakestep.h \
@@ -81,6 +84,9 @@ SOURCES += qt4projectmanagerplugin.cpp \
     wizards/filespage.cpp \
     wizards/qtwizard.cpp \
     wizards/targetsetuppage.cpp \
+    wizards/qmlstandaloneappwizard.cpp \
+    wizards/qmlstandaloneappwizardpages.cpp \
+    wizards/qmlstandaloneapp.cpp \
     makestep.cpp \
     qmakestep.cpp \
     qt4runconfiguration.cpp \
@@ -108,6 +114,8 @@ FORMS += makestep.ui \
     gettingstartedwelcomepagewidget.ui \
     wizards/testwizardpage.ui \
     wizards/targetsetuppage.ui \
+    wizards/qmlstandaloneappwizardoptionspage.ui \
+    wizards/qmlstandaloneappwizardsourcespage.ui \
     librarydetailswidget.ui
 RESOURCES += qt4projectmanager.qrc \
     wizards/wizards.qrc
diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
index d7f9b5b7b61..8422c0261ac 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
+++ b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
@@ -109,6 +109,7 @@ const char * const QT_SIMULATOR_TARGET_ID("Qt4ProjectManager.Target.QtSimulatorT
 // ICONS
 const char * const ICON_QT_PROJECT = ":/qt4projectmanager/images/qt_project.png";
 const char * const ICON_WINDOW = ":/qt4projectmanager/images/window.png";
+const char * const ICON_QML_STANDALONE = ":/wizards/images/qml_standalone.png";
 
 // Env variables
 const char * const QMAKEVAR_QMLINSPECTOR_PATH = "QMLINSPECTOR_PATH";
diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
index eb0f387db00..8d69eb703f6 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
@@ -38,6 +38,7 @@
 #include "wizards/librarywizard.h"
 #include "wizards/testwizard.h"
 #include "wizards/emptyprojectwizard.h"
+#include "wizards/qmlstandaloneappwizard.h"
 #include "customwidgetwizard/customwidgetwizard.h"
 #include "profileeditorfactory.h"
 #include "qt4projectmanagerconstants.h"
@@ -139,6 +140,9 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
     MobileGuiAppWizard *mobileGuiWizard = new MobileGuiAppWizard();
     addAutoReleasedObject(mobileGuiWizard);
 
+    addAutoReleasedObject(new QmlStandaloneAppWizard(QmlStandaloneAppWizard::NewQmlFile));
+    addAutoReleasedObject(new QmlStandaloneAppWizard(QmlStandaloneAppWizard::ImportQmlFile));
+
     LibraryWizard *libWizard = new LibraryWizard;
     addAutoReleasedObject(libWizard);
     addAutoReleasedObject(new TestWizard);
diff --git a/src/plugins/qt4projectmanager/wizards/images/qml_standalone.png b/src/plugins/qt4projectmanager/wizards/images/qml_standalone.png
new file mode 100644
index 0000000000000000000000000000000000000000..23c023687188b55833eabab4f79ecefeb49e2f95
GIT binary patch
literal 586
zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H3?x5i&EaHVV3ZB;32_B-|NsB*>+9P<15jIA
zo1dSL%itR~ZuIu{ZriqP>C&b5@893Lb?c^0n=W6zeD2)2OP4MkKYskeg$uWC-P*f%
z@9y2ZA3b`sapT4_XU+gkn=)m}i4!Ld9Xhmr{rX9hCSAF5<@)vO7cX91zI^%i?c1+i
zyVl;`zGB6SdGqFN-n{wj*|R%$?wmY%^5MgWdwO~%Oqj5E@!};*mMmDXVAiZzYuB#b
zzkmO#RjVp1D{tPsdH($QHEY&9c<|uPojXU491&I2_5%ixW=W7=Fpxg1d+Fhg9Ep~1
zJd<y$dvFRZWv&i?b^eTT?;jh{pGS`+o3%fA?!BGI*3%HEc(bRAV@O5Z+6zb59ZC>r
zd+5}?d$;`R-H+et9e@Ad$b)0Tzt+_IPdCq~kvy>~XW6{X><Pb3%Rg|oKaju9d|cRW
z=W_$&Np_vi$Bqc**Ew`Gu`$OKeBHVJ{?1J%o9s6%uxLB7|LEez!{>U<lK=nX=hD7!
zDYbgF&3%WPw(XyO^iI}{jZchrys<K6v1cmJ_K7)t8C$JmJr^BpJbEd^Ct<SYTbA<a
r_S#o(oqqj`H-%+q&C|ckn^qXVye=Mn&3c+3(D@9Wu6{1-oD!M<cUm$+

literal 0
HcmV?d00001

diff --git a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneapp.cpp b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp
similarity index 99%
rename from src/plugins/qmlprojectmanager/wizards/qmlstandaloneapp.cpp
rename to src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp
index b8c6cc8fe38..399afd99ace 100644
--- a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneapp.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp
@@ -38,7 +38,7 @@
 #include <coreplugin/icore.h>
 #endif // CREATORLESSTEST
 
-namespace QmlProjectManager {
+namespace Qt4ProjectManager {
 namespace Internal {
 
 const QLatin1String qmldir("qmldir");
@@ -653,4 +653,4 @@ QList<GeneratedFileInfo> QmlStandaloneApp::fileUpdates(const QString &mainProFil
 }
 
 } // namespace Internal
-} // namespace QmlProjectManager
+} // namespace Qt4ProjectManager
diff --git a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneapp.h b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.h
similarity index 98%
rename from src/plugins/qmlprojectmanager/wizards/qmlstandaloneapp.h
rename to src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.h
index f9ce53f3e6e..84b3f3847de 100644
--- a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneapp.h
+++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.h
@@ -38,7 +38,7 @@
 #include <coreplugin/basefilewizard.h>
 #endif // CREATORLESSTEST
 
-namespace QmlProjectManager {
+namespace Qt4ProjectManager {
 namespace Internal {
 
 class QmlStandaloneApp;
@@ -201,6 +201,6 @@ private:
 };
 
 } // end of namespace Internal
-} // end of namespace QmlProjectManager
+} // end of namespace Qt4ProjectManager
 
 #endif // QMLSTANDALONEAPP_H
diff --git a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizard.cpp b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp
similarity index 96%
rename from src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizard.cpp
rename to src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp
index c26f2c44258..6e779d67a4a 100644
--- a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp
@@ -31,7 +31,7 @@
 #include "qmlstandaloneappwizardpages.h"
 #include "qmlstandaloneapp.h"
 
-#include "qmlprojectconstants.h"
+#include "qt4projectmanagerconstants.h"
 
 #include <projectexplorer/baseprojectwizarddialog.h>
 #include <projectexplorer/customwizard/customwizard.h>
@@ -48,7 +48,7 @@
 #include <QtCore/QDir>
 #include <QtCore/QFile>
 
-namespace QmlProjectManager {
+namespace Qt4ProjectManager {
 namespace Internal {
 
 class QmlStandaloneAppWizardDialog : public ProjectExplorer::BaseProjectWizardDialog
@@ -120,7 +120,7 @@ QmlStandaloneAppWizard::~QmlStandaloneAppWizard()
 Core::BaseFileWizardParameters QmlStandaloneAppWizard::parameters(WizardType type)
 {
     Core::BaseFileWizardParameters parameters(ProjectWizard);
-    parameters.setIcon(QIcon(QLatin1String(Constants::QML_WIZARD_ICON)));
+    parameters.setIcon(QIcon(QLatin1String(Constants::ICON_QML_STANDALONE)));
     parameters.setDisplayName(type == QmlStandaloneAppWizard::NewQmlFile
                               ? tr("Qt QML New Standalone Application")
                               : tr("Qt QML Imported Standalone Application"));
@@ -134,9 +134,9 @@ Core::BaseFileWizardParameters QmlStandaloneAppWizard::parameters(WizardType typ
                               : tr("Creates a standalone, mobile-deployable Qt QML application "
                                    "project. An existing QML project will be imported and a lightweight "
                                    "Qt/C++ application with a QDeclarativeView will be created for it."));
-    parameters.setCategory(QLatin1String(Constants::QML_WIZARD_CATEGORY));
-    parameters.setDisplayCategory(QCoreApplication::translate(Constants::QML_WIZARD_TR_SCOPE,
-                                                              Constants::QML_WIZARD_TR_CATEGORY));
+    parameters.setCategory(QLatin1String(Constants::QT_APP_WIZARD_CATEGORY));
+    parameters.setDisplayCategory(QCoreApplication::translate(Constants::QT_APP_WIZARD_TR_SCOPE,
+                                                              Constants::QT_APP_WIZARD_TR_CATEGORY));
     return parameters;
 }
 
@@ -207,6 +207,6 @@ void QmlStandaloneAppWizard::handleModulesChange(const QStringList &uris, const
 }
 
 } // namespace Internal
-} // namespace QmlProjectManager
+} // namespace Qt4ProjectManager
 
 #include "qmlstandaloneappwizard.moc"
diff --git a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizard.h b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.h
similarity index 97%
rename from src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizard.h
rename to src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.h
index f9dee492088..f6564d56b92 100644
--- a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizard.h
+++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.h
@@ -32,7 +32,7 @@
 
 #include <coreplugin/basefilewizard.h>
 
-namespace QmlProjectManager {
+namespace Qt4ProjectManager {
 namespace Internal {
 
 class QmlStandaloneAppWizard : public Core::BaseFileWizard
@@ -66,6 +66,6 @@ private:
 };
 
 } // end of namespace Internal
-} // end of namespace QmlProjectManager
+} // end of namespace Qt4ProjectManager
 
 #endif // QMLSTANDALONEAPPWIZARD_H
diff --git a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizardoptionspage.ui b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardoptionspage.ui
similarity index 100%
rename from src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizardoptionspage.ui
rename to src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardoptionspage.ui
diff --git a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizardpages.cpp b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.cpp
similarity index 99%
rename from src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizardpages.cpp
rename to src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.cpp
index 92ccf4e28ee..5779157d2d6 100644
--- a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizardpages.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.cpp
@@ -36,7 +36,7 @@
 #include <QtGui/QFileDialog>
 #include <QtGui/QFileDialog>
 
-namespace QmlProjectManager {
+namespace Qt4ProjectManager {
 namespace Internal {
 
 class QmlStandaloneAppWizardSourcesPagePrivate
@@ -262,4 +262,4 @@ void QmlStandaloneAppWizardOptionsPage::openSymbianSvgIcon()
 }
 
 } // namespace Internal
-} // namespace QmlProjectManager
+} // namespace Qt4ProjectManager
diff --git a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizardpages.h b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.h
similarity index 97%
rename from src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizardpages.h
rename to src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.h
index 117ead79309..a62a2169f4d 100644
--- a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizardpages.h
+++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.h
@@ -33,7 +33,7 @@
 #include <QtGui/QWizardPage>
 #include "qmlstandaloneapp.h"
 
-namespace QmlProjectManager {
+namespace Qt4ProjectManager {
 namespace Internal {
 
 class QmlStandaloneAppWizardSourcesPage : public QWizardPage
@@ -94,6 +94,6 @@ private:
 };
 
 } // end of namespace Internal
-} // end of namespace QmlProjectManager
+} // end of namespace Qt4ProjectManager
 
 #endif // QMLSTANDALONEAPPWIZARDPAGES_H
diff --git a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizardsourcespage.ui b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardsourcespage.ui
similarity index 100%
rename from src/plugins/qmlprojectmanager/wizards/qmlstandaloneappwizardsourcespage.ui
rename to src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardsourcespage.ui
diff --git a/src/plugins/qt4projectmanager/wizards/wizards.qrc b/src/plugins/qt4projectmanager/wizards/wizards.qrc
index e4633690092..5c2ce41fedb 100644
--- a/src/plugins/qt4projectmanager/wizards/wizards.qrc
+++ b/src/plugins/qt4projectmanager/wizards/wizards.qrc
@@ -3,5 +3,6 @@
         <file>images/console.png</file>
         <file>images/gui.png</file>
         <file>images/lib.png</file>
+        <file>images/qml_standalone.png</file>
     </qresource>
 </RCC>
-- 
GitLab