Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
38edea50
Commit
38edea50
authored
Feb 06, 2011
by
Alessandro Portale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renaming: QmlStandaloneApp* -> QtQuickApp*
parent
7870769a
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
154 additions
and
153 deletions
+154
-153
src/plugins/qt4projectmanager/qt4projectmanager.cpp
src/plugins/qt4projectmanager/qt4projectmanager.cpp
+2
-2
src/plugins/qt4projectmanager/qt4projectmanager.pro
src/plugins/qt4projectmanager/qt4projectmanager.pro
+7
-7
src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
+1
-1
src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
+2
-2
src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp
src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp
+3
-3
src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
+1
-1
src/plugins/qt4projectmanager/wizards/images/qtquickapp.png
src/plugins/qt4projectmanager/wizards/images/qtquickapp.png
+0
-0
src/plugins/qt4projectmanager/wizards/qtquickapp.cpp
src/plugins/qt4projectmanager/wizards/qtquickapp.cpp
+39
-39
src/plugins/qt4projectmanager/wizards/qtquickapp.h
src/plugins/qt4projectmanager/wizards/qtquickapp.h
+11
-11
src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp
src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp
+28
-28
src/plugins/qt4projectmanager/wizards/qtquickappwizard.h
src/plugins/qt4projectmanager/wizards/qtquickappwizard.h
+7
-7
src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.cpp
...ugins/qt4projectmanager/wizards/qtquickappwizardpages.cpp
+10
-10
src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.h
...plugins/qt4projectmanager/wizards/qtquickappwizardpages.h
+8
-9
src/plugins/qt4projectmanager/wizards/qtquickappwizardsourcespage.ui
.../qt4projectmanager/wizards/qtquickappwizardsourcespage.ui
+2
-2
src/plugins/qt4projectmanager/wizards/wizards.qrc
src/plugins/qt4projectmanager/wizards/wizards.qrc
+1
-1
tests/manual/appwizards/appwizards.pro
tests/manual/appwizards/appwizards.pro
+2
-2
tests/manual/appwizards/helpers.cpp
tests/manual/appwizards/helpers.cpp
+11
-11
tests/manual/appwizards/main.cpp
tests/manual/appwizards/main.cpp
+4
-4
tests/tools/qtquickappblaster/main.cpp
tests/tools/qtquickappblaster/main.cpp
+10
-10
tests/tools/qtquickappblaster/qtquickappblaster.pro
tests/tools/qtquickappblaster/qtquickappblaster.pro
+5
-3
No files found.
src/plugins/qt4projectmanager/qt4projectmanager.cpp
View file @
38edea50
...
...
@@ -41,7 +41,7 @@
#include "profilereader.h"
#include "qmakestep.h"
#include "qt4buildconfiguration.h"
#include "wizards/q
mlstandalone
app.h"
#include "wizards/q
tquick
app.h"
#include <coreplugin/icore.h>
#include <coreplugin/basefilewizard.h>
...
...
@@ -237,7 +237,7 @@ ProjectExplorer::Project *Qt4Manager::openProject(const QString &fileName)
}
}
Q
mlStandalone
App
app
;
Q
tQuick
App
app
;
updateBoilerPlateCodeFiles
(
&
app
,
canonicalFilePath
);
Qt4Project
*
pro
=
new
Qt4Project
(
this
,
canonicalFilePath
);
...
...
src/plugins/qt4projectmanager/qt4projectmanager.pro
View file @
38edea50
...
...
@@ -36,13 +36,13 @@ HEADERS += \
wizards
/
filespage
.
h
\
wizards
/
qtwizard
.
h
\
wizards
/
targetsetuppage
.
h
\
wizards
/
qmlstandaloneappwizard
.
h
\
wizards
/
qmlstandaloneappwizardpages
.
h
\
wizards
/
qtquickapp
.
h
\
wizards
/
qtquickappwizard
.
h
\
wizards
/
qtquickappwizardpages
.
h
\
wizards
/
html5app
.
h
\
wizards
/
html5appwizard
.
h
\
wizards
/
html5appwizardpages
.
h
\
wizards
/
abstractmobileapp
.
h
\
wizards
/
qmlstandaloneapp
.
h
\
wizards
/
abstractmobileappwizard
.
h
\
wizards
/
subdirsprojectwizard
.
h
\
wizards
/
subdirsprojectwizarddialog
.
h
\
...
...
@@ -102,13 +102,13 @@ SOURCES += qt4projectmanagerplugin.cpp \
wizards
/
filespage
.
cpp
\
wizards
/
qtwizard
.
cpp
\
wizards
/
targetsetuppage
.
cpp
\
wizards
/
qmlstandaloneappwizard
.
cpp
\
wizards
/
qmlstandaloneappwizardpages
.
cpp
\
wizards
/
qtquickapp
.
cpp
\
wizards
/
qtquickappwizard
.
cpp
\
wizards
/
qtquickappwizardpages
.
cpp
\
wizards
/
html5app
.
cpp
\
wizards
/
html5appwizard
.
cpp
\
wizards
/
html5appwizardpages
.
cpp
\
wizards
/
abstractmobileapp
.
cpp
\
wizards
/
qmlstandaloneapp
.
cpp
\
wizards
/
abstractmobileappwizard
.
cpp
\
wizards
/
subdirsprojectwizard
.
cpp
\
wizards
/
subdirsprojectwizarddialog
.
cpp
\
...
...
@@ -143,7 +143,7 @@ FORMS += makestep.ui \
gettingstartedwelcomepagewidget
.
ui
\
wizards
/
testwizardpage
.
ui
\
wizards
/
targetsetuppage
.
ui
\
wizards
/
q
mlstandalone
appwizardsourcespage
.
ui
\
wizards
/
q
tquick
appwizardsourcespage
.
ui
\
wizards
/
html5appwizardsourcespage
.
ui
\
wizards
/
mobilelibrarywizardoptionpage
.
ui
\
wizards
/
mobileappwizardgenericoptionspage
.
ui
\
...
...
src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
View file @
38edea50
...
...
@@ -131,7 +131,7 @@ const char * const QT_SIMULATOR_TARGET_ID = "Qt4ProjectManager.Target.QtSimulato
// 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_Q
ML_STANDALONE
=
":/wizards/images/qml_standalone
.png"
;
const
char
*
const
ICON_Q
TQUICK_APP
=
":/wizards/images/qtquickapp
.png"
;
// Env variables
const
char
*
const
QMAKEVAR_QMLJSDEBUGGER_PATH
=
"QMLJSDEBUGGER_PATH"
;
...
...
src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
View file @
38edea50
...
...
@@ -43,7 +43,7 @@
#include "wizards/testwizard.h"
#include "wizards/emptyprojectwizard.h"
#include "wizards/subdirsprojectwizard.h"
#include "wizards/q
mlstandalone
appwizard.h"
#include "wizards/q
tquick
appwizard.h"
#include "wizards/html5appwizard.h"
#include "customwidgetwizard/customwidgetwizard.h"
#include "profileeditorfactory.h"
...
...
@@ -145,7 +145,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
addAutoReleasedObject
(
new
GuiAppWizard
);
addAutoReleasedObject
(
new
ConsoleAppWizard
);
addAutoReleasedObject
(
new
MobileAppWizard
);
addAutoReleasedObject
(
new
Q
mlStandaloneAppWizard
()
);
addAutoReleasedObject
(
new
Q
tQuickAppWizard
);
addAutoReleasedObject
(
new
Html5AppWizard
);
addAutoReleasedObject
(
new
LibraryWizard
);
addAutoReleasedObject
(
new
TestWizard
);
...
...
src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp
View file @
38edea50
...
...
@@ -325,7 +325,7 @@ bool AbstractMobileApp::updateFiles(const QList<AbstractGeneratedFileInfo> &list
QFile
file
(
info
.
fileInfo
.
absoluteFilePath
());
if
(
!
file
.
open
(
QIODevice
::
WriteOnly
)
||
file
.
write
(
data
)
==
-
1
)
{
error
=
QCoreApplication
::
translate
(
"Qt4ProjectManager::Internal::Q
mlStandalone
App"
,
"Qt4ProjectManager::Internal::Q
tQuick
App"
,
"Could not write file '%1'."
).
arg
(
QDir
::
toNativeSeparators
(
info
.
fileInfo
.
canonicalFilePath
()));
return
false
;
...
...
@@ -335,8 +335,8 @@ bool AbstractMobileApp::updateFiles(const QList<AbstractGeneratedFileInfo> &list
}
#ifndef CREATORLESSTEST
// The definition of Q
mlStandalone
App::templatesRoot() for
// CREATORLESSTEST is in tests/manual/
qmlstandalone/main
.cpp
// The definition of Q
tQuick
App::templatesRoot() for
// CREATORLESSTEST is in tests/manual/
appwizards/helpers
.cpp
QString
AbstractMobileApp
::
templatesRoot
()
{
return
Core
::
ICore
::
instance
()
->
resourcePath
()
...
...
src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
View file @
38edea50
...
...
@@ -99,7 +99,7 @@ Html5AppWizard::~Html5AppWizard()
Core
::
BaseFileWizardParameters
Html5AppWizard
::
parameters
()
{
Core
::
BaseFileWizardParameters
parameters
(
ProjectWizard
);
parameters
.
setIcon
(
QIcon
(
QLatin1String
(
Constants
::
ICON_Q
ML_STANDALONE
)));
parameters
.
setIcon
(
QIcon
(
QLatin1String
(
Constants
::
ICON_Q
T_PROJECT
)));
parameters
.
setDisplayName
(
tr
(
"Html5 Application"
));
parameters
.
setId
(
QLatin1String
(
"QA.HTML5A Application"
));
parameters
.
setDescription
(
tr
(
"Creates an Html5 application project that can contain "
...
...
src/plugins/qt4projectmanager/wizards/images/q
ml_standalone
.png
→
src/plugins/qt4projectmanager/wizards/images/q
tquickapp
.png
View file @
38edea50
File moved
src/plugins/qt4projectmanager/wizards/q
mlstandalone
app.cpp
→
src/plugins/qt4projectmanager/wizards/q
tquick
app.cpp
View file @
38edea50
This diff is collapsed.
Click to expand it.
src/plugins/qt4projectmanager/wizards/q
mlstandalone
app.h
→
src/plugins/qt4projectmanager/wizards/q
tquick
app.h
View file @
38edea50
...
...
@@ -31,8 +31,8 @@
**
**************************************************************************/
#ifndef Q
MLSTANDALONE
APP_H
#define Q
MLSTANDALONE
APP_H
#ifndef Q
TQUICK
APP_H
#define Q
TQUICK
APP_H
#include "abstractmobileapp.h"
...
...
@@ -42,7 +42,7 @@
namespace
Qt4ProjectManager
{
namespace
Internal
{
class
Q
mlStandalone
App
;
class
Q
tQuick
App
;
struct
QmlModule
{
...
...
@@ -57,13 +57,13 @@ struct QmlModule
};
QmlModule
(
const
QString
&
name
,
const
QFileInfo
&
rootDir
,
const
QFileInfo
&
qmldir
,
bool
isExternal
,
Q
mlStandaloneApp
*
qmlStandalone
App
);
bool
isExternal
,
Q
tQuickApp
*
qtQuick
App
);
QString
path
(
Path
path
)
const
;
const
QString
uri
;
// "com.foo.bar"
const
QFileInfo
rootDir
;
// Location of "com/"
const
QFileInfo
qmldir
;
// 'qmldir' file.
const
bool
isExternal
;
// Either external or inside a source paths
const
Q
mlStandaloneApp
*
qmlStandalone
App
;
const
Q
tQuickApp
*
qtQuick
App
;
QHash
<
QString
,
struct
QmlCppPlugin
*>
cppPlugins
;
// Just as info. No ownership.
};
...
...
@@ -77,7 +77,7 @@ struct QmlCppPlugin
const
QFileInfo
proFile
;
// .pro file for the plugin
};
struct
Q
ml
AppGeneratedFileInfo
:
public
AbstractGeneratedFileInfo
struct
Q
tQuick
AppGeneratedFileInfo
:
public
AbstractGeneratedFileInfo
{
enum
ExtendedFileType
{
MainQmlFile
=
ExtendedFile
,
...
...
@@ -86,10 +86,10 @@ struct QmlAppGeneratedFileInfo : public AbstractGeneratedFileInfo
AppViewerHFile
};
Q
ml
AppGeneratedFileInfo
()
:
AbstractGeneratedFileInfo
()
{}
Q
tQuick
AppGeneratedFileInfo
()
:
AbstractGeneratedFileInfo
()
{}
};
class
Q
mlStandalone
App
:
public
AbstractMobileApp
class
Q
tQuick
App
:
public
AbstractMobileApp
{
public:
enum
ExtendedFileType
{
...
...
@@ -107,8 +107,8 @@ public:
ModulesDir
};
Q
mlStandalone
App
();
virtual
~
Q
mlStandalone
App
();
Q
tQuick
App
();
virtual
~
Q
tQuick
App
();
void
setMainQmlFile
(
const
QString
&
qmlFile
);
QString
mainQmlFile
()
const
;
...
...
@@ -152,4 +152,4 @@ private:
}
// namespace Internal
}
// namespace Qt4ProjectManager
#endif // Q
MLSTANDALONE
APP_H
#endif // Q
TQUICK
APP_H
src/plugins/qt4projectmanager/wizards/q
mlstandalone
appwizard.cpp
→
src/plugins/qt4projectmanager/wizards/q
tquick
appwizard.cpp
View file @
38edea50
...
...
@@ -33,9 +33,9 @@
#include "mobileappwizardpages.h"
#include "q
mlstandalone
app.h"
#include "q
mlstandalone
appwizard.h"
#include "q
mlstandalone
appwizardpages.h"
#include "q
tquick
app.h"
#include "q
tquick
appwizard.h"
#include "q
tquick
appwizardpages.h"
#include "targetsetuppage.h"
#include "qt4projectmanagerconstants.h"
...
...
@@ -59,8 +59,8 @@ public:
explicit
QmlStandaloneAppWizardDialog
(
QWidget
*
parent
=
0
);
private:
class
Q
mlStandalone
AppWizardSourcesPage
*
m_qmlSourcesPage
;
friend
class
Q
mlStandalone
AppWizard
;
class
Q
tQuick
AppWizardSourcesPage
*
m_qmlSourcesPage
;
friend
class
Q
tQuick
AppWizard
;
};
QmlStandaloneAppWizardDialog
::
QmlStandaloneAppWizardDialog
(
QWidget
*
parent
)
...
...
@@ -70,36 +70,36 @@ QmlStandaloneAppWizardDialog::QmlStandaloneAppWizardDialog(QWidget *parent)
setWindowTitle
(
tr
(
"New Qt Quick Application"
));
setIntroDescription
(
tr
(
"This wizard generates a Qt Quick application project."
));
m_qmlSourcesPage
=
new
Q
mlStandalone
AppWizardSourcesPage
;
m_qmlSourcesPage
=
new
Q
tQuick
AppWizardSourcesPage
;
addPageWithTitle
(
m_qmlSourcesPage
,
tr
(
"QML Sources"
));
}
class
Q
mlStandalone
AppWizardPrivate
class
Q
tQuick
AppWizardPrivate
{
class
Q
mlStandaloneApp
*
standaloneA
pp
;
class
Q
tQuickApp
*
a
pp
;
class
QmlStandaloneAppWizardDialog
*
wizardDialog
;
friend
class
Q
mlStandalone
AppWizard
;
friend
class
Q
tQuick
AppWizard
;
};
Q
mlStandaloneAppWizard
::
QmlStandalone
AppWizard
()
Q
tQuickAppWizard
::
QtQuick
AppWizard
()
:
AbstractMobileAppWizard
(
parameters
())
,
m_d
(
new
Q
mlStandalone
AppWizardPrivate
)
,
m_d
(
new
Q
tQuick
AppWizardPrivate
)
{
m_d
->
standaloneApp
=
new
QmlStandalone
App
;
m_d
->
app
=
new
QtQuick
App
;
m_d
->
wizardDialog
=
0
;
}
Q
mlStandaloneAppWizard
::~
QmlStandalone
AppWizard
()
Q
tQuickAppWizard
::~
QtQuick
AppWizard
()
{
delete
m_d
->
standaloneA
pp
;
delete
m_d
->
a
pp
;
delete
m_d
;
}
Core
::
BaseFileWizardParameters
Q
mlStandalone
AppWizard
::
parameters
()
Core
::
BaseFileWizardParameters
Q
tQuick
AppWizard
::
parameters
()
{
Core
::
BaseFileWizardParameters
parameters
(
ProjectWizard
);
parameters
.
setIcon
(
QIcon
(
QLatin1String
(
Constants
::
ICON_Q
ML_STANDALONE
)));
parameters
.
setIcon
(
QIcon
(
QLatin1String
(
Constants
::
ICON_Q
TQUICK_APP
)));
parameters
.
setDisplayName
(
tr
(
"Qt Quick Application"
));
parameters
.
setId
(
QLatin1String
(
"QA.QMLA Application"
));
parameters
.
setDescription
(
tr
(
"Creates a Qt Quick application project that can contain "
...
...
@@ -114,13 +114,13 @@ Core::BaseFileWizardParameters QmlStandaloneAppWizard::parameters()
return
parameters
;
}
AbstractMobileAppWizardDialog
*
Q
mlStandalone
AppWizard
::
createWizardDialogInternal
(
QWidget
*
parent
)
const
AbstractMobileAppWizardDialog
*
Q
tQuick
AppWizard
::
createWizardDialogInternal
(
QWidget
*
parent
)
const
{
m_d
->
wizardDialog
=
new
QmlStandaloneAppWizardDialog
(
parent
);
return
m_d
->
wizardDialog
;
}
void
Q
mlStandalone
AppWizard
::
projectPathChanged
(
const
QString
&
path
)
const
void
Q
tQuick
AppWizard
::
projectPathChanged
(
const
QString
&
path
)
const
{
const
QList
<
TargetSetupPage
::
ImportInfo
>
&
qtVersions
=
TargetSetupPage
::
importInfosForKnownQtVersions
(
path
);
...
...
@@ -139,33 +139,33 @@ void QmlStandaloneAppWizard::projectPathChanged(const QString &path) const
m_d
->
wizardDialog
->
m_targetsPage
->
setImportInfos
(
qmlQtVersions
);
}
void
Q
mlStandalone
AppWizard
::
prepareGenerateFiles
(
const
QWizard
*
w
,
void
Q
tQuick
AppWizard
::
prepareGenerateFiles
(
const
QWizard
*
w
,
QString
*
errorMessage
)
const
{
Q_UNUSED
(
errorMessage
)
const
QmlStandaloneAppWizardDialog
*
wizard
=
qobject_cast
<
const
QmlStandaloneAppWizardDialog
*>
(
w
);
const
QString
mainQmlFile
=
wizard
->
m_qmlSourcesPage
->
mainQmlFile
();
m_d
->
standaloneA
pp
->
setMainQmlFile
(
mainQmlFile
);
m_d
->
a
pp
->
setMainQmlFile
(
mainQmlFile
);
}
bool
Q
mlStandalone
AppWizard
::
postGenerateFilesInternal
(
const
Core
::
GeneratedFiles
&
l
,
bool
Q
tQuick
AppWizard
::
postGenerateFilesInternal
(
const
Core
::
GeneratedFiles
&
l
,
QString
*
errorMessage
)
{
const
bool
success
=
ProjectExplorer
::
CustomProjectWizard
::
postGenerateOpen
(
l
,
errorMessage
);
if
(
success
&&
!
m_d
->
standaloneA
pp
->
mainQmlFile
().
isEmpty
())
{
ProjectExplorer
::
ProjectExplorerPlugin
::
instance
()
->
setCurrentFile
(
0
,
m_d
->
standaloneA
pp
->
mainQmlFile
());
Core
::
EditorManager
::
instance
()
->
openEditor
(
m_d
->
standaloneA
pp
->
mainQmlFile
(),
if
(
success
&&
!
m_d
->
a
pp
->
mainQmlFile
().
isEmpty
())
{
ProjectExplorer
::
ProjectExplorerPlugin
::
instance
()
->
setCurrentFile
(
0
,
m_d
->
a
pp
->
mainQmlFile
());
Core
::
EditorManager
::
instance
()
->
openEditor
(
m_d
->
a
pp
->
mainQmlFile
(),
QString
(),
Core
::
EditorManager
::
ModeSwitch
);
}
return
success
;
}
AbstractMobileApp
*
Q
mlStandalone
AppWizard
::
app
()
const
AbstractMobileApp
*
Q
tQuick
AppWizard
::
app
()
const
{
return
m_d
->
standaloneA
pp
;
return
m_d
->
a
pp
;
}
AbstractMobileAppWizardDialog
*
Q
mlStandalone
AppWizard
::
wizardDialog
()
const
AbstractMobileAppWizardDialog
*
Q
tQuick
AppWizard
::
wizardDialog
()
const
{
return
m_d
->
wizardDialog
;
}
...
...
@@ -173,4 +173,4 @@ AbstractMobileAppWizardDialog *QmlStandaloneAppWizard::wizardDialog() const
}
// namespace Internal
}
// namespace Qt4ProjectManager
#include "q
mlstandalone
appwizard.moc"
#include "q
tquick
appwizard.moc"
src/plugins/qt4projectmanager/wizards/q
mlstandalone
appwizard.h
→
src/plugins/qt4projectmanager/wizards/q
tquick
appwizard.h
View file @
38edea50
...
...
@@ -31,21 +31,21 @@
**
**************************************************************************/
#ifndef Q
MLSTANDALONE
APPWIZARD_H
#define Q
MLSTANDALONE
APPWIZARD_H
#ifndef Q
TQUICK
APPWIZARD_H
#define Q
TQUICK
APPWIZARD_H
#include "abstractmobileappwizard.h"
namespace
Qt4ProjectManager
{
namespace
Internal
{
class
Q
mlStandalone
AppWizard
:
public
AbstractMobileAppWizard
class
Q
tQuick
AppWizard
:
public
AbstractMobileAppWizard
{
Q_OBJECT
public:
Q
mlStandalone
AppWizard
();
virtual
~
Q
mlStandalone
AppWizard
();
Q
tQuick
AppWizard
();
virtual
~
Q
tQuick
AppWizard
();
private:
static
Core
::
BaseFileWizardParameters
parameters
();
...
...
@@ -59,10 +59,10 @@ private:
virtual
bool
postGenerateFilesInternal
(
const
Core
::
GeneratedFiles
&
l
,
QString
*
errorMessage
);
class
Q
mlStandalone
AppWizardPrivate
*
m_d
;
class
Q
tQuick
AppWizardPrivate
*
m_d
;
};
}
// namespace Internal
}
// namespace Qt4ProjectManager
#endif // Q
MLSTANDALONE
APPWIZARD_H
#endif // Q
TQUICK
APPWIZARD_H
src/plugins/qt4projectmanager/wizards/q
mlstandalone
appwizardpages.cpp
→
src/plugins/qt4projectmanager/wizards/q
tquick
appwizardpages.cpp
View file @
38edea50
...
...
@@ -31,8 +31,8 @@
**
**************************************************************************/
#include "q
mlstandalone
appwizardpages.h"
#include "ui_q
mlstandalone
appwizardsourcespage.h"
#include "q
tquick
appwizardpages.h"
#include "ui_q
tquick
appwizardsourcespage.h"
#include <coreplugin/coreconstants.h>
#include <QtGui/QDesktopServices>
...
...
@@ -43,15 +43,15 @@
namespace
Qt4ProjectManager
{
namespace
Internal
{
class
Q
mlStandalone
AppWizardSourcesPagePrivate
class
Q
tQuick
AppWizardSourcesPagePrivate
{
Ui
::
Q
mlStandalone
AppWizardSourcesPage
ui
;
friend
class
Q
mlStandalone
AppWizardSourcesPage
;
Ui
::
Q
tQuick
AppWizardSourcesPage
ui
;
friend
class
Q
tQuick
AppWizardSourcesPage
;
};
Q
mlStandaloneAppWizardSourcesPage
::
QmlStandalone
AppWizardSourcesPage
(
QWidget
*
parent
)
Q
tQuickAppWizardSourcesPage
::
QtQuick
AppWizardSourcesPage
(
QWidget
*
parent
)
:
QWizardPage
(
parent
)
,
m_d
(
new
Q
mlStandalone
AppWizardSourcesPagePrivate
)
,
m_d
(
new
Q
tQuick
AppWizardSourcesPagePrivate
)
{
m_d
->
ui
.
setupUi
(
this
);
m_d
->
ui
.
mainQmlFileLineEdit
->
setExpectedKind
(
Utils
::
PathChooser
::
File
);
...
...
@@ -65,18 +65,18 @@ QmlStandaloneAppWizardSourcesPage::QmlStandaloneAppWizardSourcesPage(QWidget *pa
m_d
->
ui
.
newQmlRadioButton
->
setChecked
(
true
);
}
Q
mlStandaloneAppWizardSourcesPage
::~
QmlStandalone
AppWizardSourcesPage
()
Q
tQuickAppWizardSourcesPage
::~
QtQuick
AppWizardSourcesPage
()
{
delete
m_d
;
}
QString
Q
mlStandalone
AppWizardSourcesPage
::
mainQmlFile
()
const
QString
Q
tQuick
AppWizardSourcesPage
::
mainQmlFile
()
const
{
return
m_d
->
ui
.
importExistingQmlRadioButton
->
isChecked
()
?
m_d
->
ui
.
mainQmlFileLineEdit
->
path
()
:
QString
();
}
bool
Q
mlStandalone
AppWizardSourcesPage
::
isComplete
()
const
bool
Q
tQuick
AppWizardSourcesPage
::
isComplete
()
const
{
return
!
m_d
->
ui
.
importExistingQmlRadioButton
->
isChecked
()
||
m_d
->
ui
.
mainQmlFileLineEdit
->
isValid
();
...
...
src/plugins/qt4projectmanager/wizards/q
mlstandalone
appwizardpages.h
→
src/plugins/qt4projectmanager/wizards/q
tquick
appwizardpages.h
View file @
38edea50
...
...
@@ -31,32 +31,31 @@
**
**************************************************************************/
#ifndef Q
MLSTANDALONE
APPWIZARDPAGES_H
#define Q
MLSTANDALONE
APPWIZARDPAGES_H
#ifndef Q
TQUICK
APPWIZARDPAGES_H
#define Q
TQUICK
APPWIZARDPAGES_H
#include <QtGui/QWizardPage>
#include "qmlstandaloneapp.h"
namespace
Qt4ProjectManager
{
namespace
Internal
{
class
Q
mlStandalone
AppWizardSourcesPage
:
public
QWizardPage
class
Q
tQuick
AppWizardSourcesPage
:
public
QWizardPage
{
Q_OBJECT
Q_DISABLE_COPY
(
Q
mlStandalone
AppWizardSourcesPage
)
Q_DISABLE_COPY
(
Q
tQuick
AppWizardSourcesPage
)
public:
explicit
Q
mlStandalone
AppWizardSourcesPage
(
QWidget
*
parent
=
0
);
virtual
~
Q
mlStandalone
AppWizardSourcesPage
();
explicit
Q
tQuick
AppWizardSourcesPage
(
QWidget
*
parent
=
0
);
virtual
~
Q
tQuick
AppWizardSourcesPage
();
QString
mainQmlFile
()
const
;
virtual
bool
isComplete
()
const
;
private:
class
Q
mlStandalone
AppWizardSourcesPagePrivate
*
m_d
;
class
Q
tQuick
AppWizardSourcesPagePrivate
*
m_d
;
};
}
// namespace Internal
}
// namespace Qt4ProjectManager
#endif // Q
MLSTANDALONE
APPWIZARDPAGES_H
#endif // Q
TQUICK
APPWIZARDPAGES_H
src/plugins/qt4projectmanager/wizards/q
mlstandalone
appwizardsourcespage.ui
→
src/plugins/qt4projectmanager/wizards/q
tquick
appwizardsourcespage.ui
View file @
38edea50
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
Q
mlStandalone
AppWizardSourcesPage
</class>
<widget
class=
"QWizardPage"
name=
"Q
mlStandalone
AppWizardSourcesPage"
>
<class>
Q
tQuick
AppWizardSourcesPage
</class>
<widget
class=
"QWizardPage"
name=
"Q
tQuick
AppWizardSourcesPage"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
...
...
src/plugins/qt4projectmanager/wizards/wizards.qrc
View file @
38edea50
...
...
@@ -3,6 +3,6 @@
<file>images/console.png</file>
<file>images/gui.png</file>
<file>images/lib.png</file>
<file>images/q
ml_standalone
.png</file>
<file>images/q
tquickapp
.png</file>
</qresource>
</RCC>
tests/manual/appwizards/appwizards.pro
View file @
38edea50
...
...
@@ -4,11 +4,11 @@ DEFINES += \
CREATORLESSTEST
APPSOURCEDIR
=
$$
CREATORSOURCEDIR
/
src
/
plugins
/
qt4projectmanager
/
wizards
HEADERS
+=
\
$$
APPSOURCEDIR
/
q
mlstandalone
app
.
h
\
$$
APPSOURCEDIR
/
q
tquick
app
.
h
\
$$
APPSOURCEDIR
/
html5app
.
h
\
$$
APPSOURCEDIR
/
abstractmobileapp
.
h
SOURCES
+=
\
$$
APPSOURCEDIR
/
q
mlstandalone
app
.
cpp
\
$$
APPSOURCEDIR
/
q
tquick
app
.
cpp
\
$$
APPSOURCEDIR
/
html5app
.
cpp
\
$$
APPSOURCEDIR
/
abstractmobileapp
.
cpp
\
main
.
cpp
\
...
...
tests/manual/appwizards/helpers.cpp
View file @
38edea50
#include "q
mlstandalone
app.h"
#include "q
tquick
app.h"
#include "html5app.h"
#include <QtCore>
...
...
@@ -14,17 +14,17 @@ static bool writeFile(const QByteArray &data, const QString &targetFile)
return
file
.
write
(
data
)
!=
-
1
;
}
bool
Q
mlStandalone
App
::
generateFiles
(
QString
*
errorMessage
)
const
bool
Q
tQuick
App
::
generateFiles
(
QString
*
errorMessage
)
const
{
return
writeFile
(
generateFile
(
Q
ml
AppGeneratedFileInfo
::
MainCppFile
,
errorMessage
),
path
(
MainCpp
))
&&
writeFile
(
generateFile
(
Q
ml
AppGeneratedFileInfo
::
AppProFile
,
errorMessage
),
path
(
AppPro
))
&&
(
useExistingMainQml
()
?
true
:
writeFile
(
generateFile
(
Q
ml
AppGeneratedFileInfo
::
MainQmlFile
,
errorMessage
),
path
(
MainQml
)))
&&
writeFile
(
generateFile
(
Q
ml
AppGeneratedFileInfo
::
AppViewerPriFile
,
errorMessage
),
path
(
AppViewerPri
))
&&
writeFile
(
generateFile
(
Q
ml
AppGeneratedFileInfo
::
AppViewerCppFile
,
errorMessage
),
path
(
AppViewerCpp
))
&&
writeFile
(
generateFile
(
Q
ml
AppGeneratedFileInfo
::
AppViewerHFile
,
errorMessage
),
path
(
AppViewerH
))
&&
writeFile
(
generateFile
(
Q
ml
AppGeneratedFileInfo
::
SymbianSvgIconFile
,
errorMessage
),
path
(
SymbianSvgIcon
))
&&
writeFile
(
generateFile
(
Q
ml
AppGeneratedFileInfo
::
MaemoPngIconFile
,
errorMessage
),
path
(
MaemoPngIcon
))
&&
writeFile
(
generateFile
(
Q
ml
AppGeneratedFileInfo
::
DesktopFile
,
errorMessage
),
path
(
Desktop
));
return
writeFile
(
generateFile
(
Q
tQuick
AppGeneratedFileInfo
::
MainCppFile
,
errorMessage
),
path
(
MainCpp
))
&&
writeFile
(
generateFile
(
Q
tQuick
AppGeneratedFileInfo
::
AppProFile
,
errorMessage
),
path
(
AppPro
))
&&
(
useExistingMainQml
()
?
true
:
writeFile
(
generateFile
(
Q
tQuick
AppGeneratedFileInfo
::
MainQmlFile
,
errorMessage
),
path
(
MainQml
)))
&&
writeFile
(
generateFile
(
Q
tQuick
AppGeneratedFileInfo
::
AppViewerPriFile
,
errorMessage
),
path
(
AppViewerPri
))
&&
writeFile
(
generateFile
(
Q
tQuick
AppGeneratedFileInfo
::
AppViewerCppFile
,
errorMessage
),
path
(
AppViewerCpp
))
&&
writeFile
(
generateFile
(
Q
tQuick
AppGeneratedFileInfo
::
AppViewerHFile
,
errorMessage
),
path
(
AppViewerH
))
&&
writeFile
(
generateFile
(
Q
tQuick
AppGeneratedFileInfo
::
SymbianSvgIconFile
,
errorMessage
),
path
(
SymbianSvgIcon
))
&&
writeFile
(
generateFile
(
Q
tQuick
AppGeneratedFileInfo
::
MaemoPngIconFile
,
errorMessage
),
path
(
MaemoPngIcon
))
&&
writeFile
(
generateFile
(
Q
tQuick
AppGeneratedFileInfo
::
DesktopFile
,
errorMessage
),
path
(
Desktop
));
}
bool
Html5App
::
generateFiles
(
QString
*
errorMessage
)
const
...
...
tests/manual/appwizards/main.cpp
View file @
38edea50
...
...
@@ -31,7 +31,7 @@
**
**************************************************************************/
#include "q
mlstandalone
app.h"
#include "q
tquick
app.h"
#include "html5app.h"
#include <QtCore>
...
...
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
const
QString
projectPath
=
QLatin1String
(
"testprojects"
);
{
Q
mlStandalone
App
sAppNew
;
Q
tQuick
App
sAppNew
;
sAppNew
.
setProjectPath
(
projectPath
);
sAppNew
.
setProjectName
(
QLatin1String
(
"new_qml_app"
));
if
(
!
sAppNew
.
generateFiles
(
&
errorMessage
))
...
...
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
}
{
Q
mlStandalone
App
sAppImport01
;
Q
tQuick
App
sAppImport01
;
sAppImport01
.
setProjectPath
(
projectPath
);
sAppImport01
.
setProjectName
(
QLatin1String
(
"imported_scenario_01"
));
sAppImport01
.
setMainQmlFile
(
QLatin1String
(
"../appwizards/qmlimportscenario_01/myqmlapp.qml"
));
...
...
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
{
const
QString
rootPath
=
QLatin1String
(
"../appwizards/qmlimportscenario_02/"
);
Q
mlStandalone
App
sAppImport02
;
Q
tQuick
App
sAppImport02
;
sAppImport02
.
setProjectPath
(
projectPath
);
sAppImport02
.
setProjectName
(
QLatin1String
(
"imported_scenario_02"
));
sAppImport02
.
setMainQmlFile
(
rootPath
+
QLatin1String
(
"subfolder1/myqmlapp.qml"
));
...
...
tests/tools/qtquickappblaster/main.cpp
View file @
38edea50
#include "q
mlstandalone
app.h"
#include "q
tquick
app.h"
#include <QtCore>
using
namespace
Qt4ProjectManager
::
Internal
;
...
...
@@ -27,14 +27,14 @@ bool processXmlFile(const QString &xmlFile)
switch
(
token
)
{
case
QXmlStreamReader
::
StartElement
:
if
(
reader
.
name
()
==
tag_app
)
{
Q
mlStandaloneApp
qmlA
pp
;
Q
tQuickApp
a
pp
;
QFileInfo
projectPath
;
if
(
!
reader
.
attributes
().
hasAttribute
(
attrib_projectPath
))
{
qDebug
()
<<
"Project without path found"
;
continue
;
}
projectPath
=
qtDir
+
reader
.
attributes
().
value
(
attrib_projectPath
).
toString
();
qmlA
pp
.
setProjectPath
(
projectPath
.
absoluteFilePath
());
a
pp
.
setProjectPath
(
projectPath
.
absoluteFilePath
());
if
(
reader
.
attributes
().
hasAttribute
(
attrib_mainQmlFile
))
{
const
QFileInfo
qmlFileOrigin
(
qtDir
+
reader
.
attributes
().
value
(
attrib_mainQmlFile
).
toString
());
...
...
@@ -63,25 +63,25 @@ bool processXmlFile(const QString &xmlFile)
#else // Q_OS_WIN
// Implement me!
#endif // Q_OS_WIN
qmlA
pp
.
setMainQmlFile
(
qmlTargetPath
.
absoluteFilePath
()
a
pp
.
setMainQmlFile
(
qmlTargetPath
.
absoluteFilePath
()
+
QLatin1Char
(
'/'
)
+
qmlFileOrigin
.
fileName
());
}
qmlA
pp
.
setProjectName
(
reader
.
attributes
().
hasAttribute
(
attrib_projectName
)
a
pp
.
setProjectName
(
reader
.
attributes
().
hasAttribute
(
attrib_projectName
)
?
reader
.
attributes
().
value
(
attrib_projectName
).
toString
()
:
QFileInfo
(
qmlA
pp
.
mainQmlFile
()).
baseName
());
:
QFileInfo
(
a
pp
.
mainQmlFile
()).
baseName
());
if
(
reader
.
attributes
().
hasAttribute
(
attrib_screenOrientation
))
{
const
QStringRef
orientation
=
reader
.
attributes
().
value
(
attrib_screenOrientation
);
qmlA
pp
.
setOrientation
(
orientation
==
value_screenOrientationLockLandscape
?
a
pp
.
setOrientation
(
orientation
==
value_screenOrientationLockLandscape
?
AbstractMobileApp
::
ScreenOrientationLockLandscape
:
orientation
==
value_screenOrientationLockPortrait
?
AbstractMobileApp
::
ScreenOrientationLockPortrait
:
AbstractMobileApp
::
ScreenOrientationAuto
);
}
if
(
reader
.
attributes
().
hasAttribute
(
attrib_networkAccess
))
qmlA
pp
.
setNetworkEnabled
(
a
pp
.
setNetworkEnabled
(
reader
.
attributes
().
value
(
attrib_networkAccess
).
toString
()
==
QLatin1String
(
"true"
));
if
(
!
qmlA
pp
.
generateFiles
(
0
))