forked from qt-creator/qt-creator
App Wizard templates: Use com.nokia.symbian 1.1 instead of 1.0
Bumping the minimum required Qt version from 4.7.3 to 4.7.4, accordingly. Change-Id: I1f88278552c83ff18f9a710eb1f08b74f43688b8 Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
This commit is contained in:
@@ -1,33 +0,0 @@
|
|||||||
import QtQuick 1.0
|
|
||||||
import com.nokia.symbian 1.0
|
|
||||||
|
|
||||||
Window {
|
|
||||||
id: window
|
|
||||||
|
|
||||||
StatusBar {
|
|
||||||
id: statusBar
|
|
||||||
anchors.top: window.top
|
|
||||||
}
|
|
||||||
|
|
||||||
PageStack {
|
|
||||||
id: pageStack
|
|
||||||
anchors { left: parent.left; right: parent.right; top: statusBar.bottom; bottom: toolBar.top }
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolBar {
|
|
||||||
id: toolBar
|
|
||||||
anchors.bottom: window.bottom
|
|
||||||
tools: ToolBarLayout {
|
|
||||||
id: toolBarLayout
|
|
||||||
ToolButton {
|
|
||||||
flat: true
|
|
||||||
iconSource: "toolbar-back"
|
|
||||||
onClicked: pageStack.depth <= 1 ? Qt.quit() : pageStack.pop()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
pageStack.push(Qt.resolvedUrl("MainPage.qml"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import QtQuick 1.0
|
import QtQuick 1.1
|
||||||
import com.nokia.symbian 1.0
|
import com.nokia.symbian 1.1
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id: mainPage
|
id: mainPage
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import QtQuick 1.1
|
||||||
|
import com.nokia.symbian 1.1
|
||||||
|
|
||||||
|
PageStackWindow {
|
||||||
|
id: window
|
||||||
|
initialPage: MainPage {tools: toolBarLayout}
|
||||||
|
showStatusBar: true
|
||||||
|
showToolBar: true
|
||||||
|
|
||||||
|
ToolBarLayout {
|
||||||
|
id: toolBarLayout
|
||||||
|
ToolButton {
|
||||||
|
flat: true
|
||||||
|
iconSource: "toolbar-back"
|
||||||
|
onClicked: window.pageStack.depth <= 1 ? Qt.quit() : window.pageStack.pop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -261,7 +261,7 @@ void QtQuickApp::handleCurrentProFileTemplateLine(const QString &line,
|
|||||||
proFile << endl;
|
proFile << endl;
|
||||||
} else if (line.contains(QLatin1String("# QTQUICKCOMPONENTS"))) {
|
} else if (line.contains(QLatin1String("# QTQUICKCOMPONENTS"))) {
|
||||||
QString nextLine = proFileTemplate.readLine(); // eats '# CONFIG += qtquickcomponents'
|
QString nextLine = proFileTemplate.readLine(); // eats '# CONFIG += qtquickcomponents'
|
||||||
if (componentSet() == Symbian10Components)
|
if (componentSet() == Symbian11Components)
|
||||||
nextLine.remove(0, 2); // remove comment
|
nextLine.remove(0, 2); // remove comment
|
||||||
proFile << nextLine << endl;
|
proFile << nextLine << endl;
|
||||||
} else if (line.contains(QLatin1String("# HARMATTAN_BOOSTABLE"))) {
|
} else if (line.contains(QLatin1String("# HARMATTAN_BOOSTABLE"))) {
|
||||||
@@ -355,7 +355,7 @@ Core::GeneratedFiles QtQuickApp::generateFiles(QString *errorMessage) const
|
|||||||
Core::GeneratedFiles files = AbstractMobileApp::generateFiles(errorMessage);
|
Core::GeneratedFiles files = AbstractMobileApp::generateFiles(errorMessage);
|
||||||
if (!useExistingMainQml()) {
|
if (!useExistingMainQml()) {
|
||||||
files.append(file(generateFile(QtQuickAppGeneratedFileInfo::MainQmlFile, errorMessage), path(MainQml)));
|
files.append(file(generateFile(QtQuickAppGeneratedFileInfo::MainQmlFile, errorMessage), path(MainQml)));
|
||||||
if ((componentSet() == QtQuickApp::Symbian10Components)
|
if ((componentSet() == QtQuickApp::Symbian11Components)
|
||||||
|| (componentSet() == QtQuickApp::Meego10Components))
|
|| (componentSet() == QtQuickApp::Meego10Components))
|
||||||
files.append(file(generateFile(QtQuickAppGeneratedFileInfo::MainPageQmlFile, errorMessage), path(MainPageQml)));
|
files.append(file(generateFile(QtQuickAppGeneratedFileInfo::MainPageQmlFile, errorMessage), path(MainPageQml)));
|
||||||
files.last().setAttributes(Core::GeneratedFile::OpenEditorAttribute);
|
files.last().setAttributes(Core::GeneratedFile::OpenEditorAttribute);
|
||||||
@@ -456,8 +456,8 @@ QList<DeploymentFolder> QtQuickApp::deploymentFolders() const
|
|||||||
QString QtQuickApp::componentSetDir(ComponentSet componentSet) const
|
QString QtQuickApp::componentSetDir(ComponentSet componentSet) const
|
||||||
{
|
{
|
||||||
switch (componentSet) {
|
switch (componentSet) {
|
||||||
case Symbian10Components:
|
case Symbian11Components:
|
||||||
return QLatin1String("symbian10");
|
return QLatin1String("symbian11");
|
||||||
case Meego10Components:
|
case Meego10Components:
|
||||||
return QLatin1String("meego10");
|
return QLatin1String("meego10");
|
||||||
case QtQuick10Components:
|
case QtQuick10Components:
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public:
|
|||||||
|
|
||||||
enum ComponentSet {
|
enum ComponentSet {
|
||||||
QtQuick10Components,
|
QtQuick10Components,
|
||||||
Symbian10Components,
|
Symbian11Components,
|
||||||
Meego10Components
|
Meego10Components
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -85,9 +85,9 @@ bool QtQuickAppWizardDialog::validateCurrentPage()
|
|||||||
{
|
{
|
||||||
if (currentPage() == m_componentOptionsPage) {
|
if (currentPage() == m_componentOptionsPage) {
|
||||||
setIgnoreGenericOptionsPage(false);
|
setIgnoreGenericOptionsPage(false);
|
||||||
if (m_componentOptionsPage->componentSet() == QtQuickApp::Symbian10Components) {
|
if (m_componentOptionsPage->componentSet() == QtQuickApp::Symbian11Components) {
|
||||||
setIgnoreGenericOptionsPage(true);
|
setIgnoreGenericOptionsPage(true);
|
||||||
targetsPage()->setMinimumQtVersion(QtSupport::QtVersionNumber(4, 7, 3));
|
targetsPage()->setMinimumQtVersion(QtSupport::QtVersionNumber(4, 7, 4));
|
||||||
QSet<QString> requiredFeatures;
|
QSet<QString> requiredFeatures;
|
||||||
requiredFeatures << Constants::QTQUICKCOMPONENTS_SYMBIAN_TARGETFEATURE_ID;
|
requiredFeatures << Constants::QTQUICKCOMPONENTS_SYMBIAN_TARGETFEATURE_ID;
|
||||||
targetsPage()->setRequiredFeatures(requiredFeatures);
|
targetsPage()->setRequiredFeatures(requiredFeatures);
|
||||||
@@ -139,7 +139,7 @@ Core::BaseFileWizardParameters QtQuickAppWizard::parameters()
|
|||||||
"Symbian Installation System (SIS) packages for this type of "
|
"Symbian Installation System (SIS) packages for this type of "
|
||||||
"projects. Moreover, you can select to use a set of premade "
|
"projects. Moreover, you can select to use a set of premade "
|
||||||
"UI components in your Qt Quick application. "
|
"UI components in your Qt Quick application. "
|
||||||
"To utilize the components, Qt 4.7.3 or newer is required."));
|
"To utilize the components, Qt 4.7.4 or newer is required."));
|
||||||
parameters.setCategory(QLatin1String(QtSupport::Constants::QML_WIZARD_CATEGORY));
|
parameters.setCategory(QLatin1String(QtSupport::Constants::QML_WIZARD_CATEGORY));
|
||||||
parameters.setDisplayCategory(QCoreApplication::translate(QtSupport::Constants::QML_WIZARD_TR_SCOPE,
|
parameters.setDisplayCategory(QCoreApplication::translate(QtSupport::Constants::QML_WIZARD_TR_SCOPE,
|
||||||
QtSupport::Constants::QML_WIZARD_TR_CATEGORY));
|
QtSupport::Constants::QML_WIZARD_TR_CATEGORY));
|
||||||
@@ -170,7 +170,7 @@ void QtQuickAppWizard::prepareGenerateFiles(const QWizard *w,
|
|||||||
d->app->setMainQml(QtQuickApp::ModeImport, mainQmlFile);
|
d->app->setMainQml(QtQuickApp::ModeImport, mainQmlFile);
|
||||||
}
|
}
|
||||||
d->app->setComponentSet(wizard->m_componentOptionsPage->componentSet());
|
d->app->setComponentSet(wizard->m_componentOptionsPage->componentSet());
|
||||||
if (d->app->componentSet() == QtQuickApp::Symbian10Components)
|
if (d->app->componentSet() == QtQuickApp::Symbian11Components)
|
||||||
d->app->setOrientation(AbstractMobileApp::ScreenOrientationImplicit);
|
d->app->setOrientation(AbstractMobileApp::ScreenOrientationImplicit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ QtQuickApp::ComponentSet QtQuickComponentSetOptionsPage::componentSet() const
|
|||||||
{
|
{
|
||||||
switch (d->ui.buttonGroup->checkedId()) {
|
switch (d->ui.buttonGroup->checkedId()) {
|
||||||
case 2: return QtQuickApp::Meego10Components;
|
case 2: return QtQuickApp::Meego10Components;
|
||||||
case 1: return QtQuickApp::Symbian10Components;
|
case 1: return QtQuickApp::Symbian11Components;
|
||||||
case 0:
|
case 0:
|
||||||
default: return QtQuickApp::QtQuick10Components;
|
default: return QtQuickApp::QtQuick10Components;
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ void QtQuickComponentSetOptionsPage::setComponentSet(QtQuickApp::ComponentSet co
|
|||||||
{
|
{
|
||||||
switch (componentSet) {
|
switch (componentSet) {
|
||||||
case QtQuickApp::Meego10Components: d->ui.meego10RadioButton->click(); break;
|
case QtQuickApp::Meego10Components: d->ui.meego10RadioButton->click(); break;
|
||||||
case QtQuickApp::Symbian10Components: d->ui.symbian10RadioButton->click(); break;
|
case QtQuickApp::Symbian11Components: d->ui.symbian10RadioButton->click(); break;
|
||||||
case QtQuickApp::QtQuick10Components:
|
case QtQuickApp::QtQuick10Components:
|
||||||
default: d->ui.qtquick10RadioButton->click(); break;
|
default: d->ui.qtquick10RadioButton->click(); break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ Requires Qt 4.7.1 or newer.</string>
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>The Qt Quick Components for Symbian are a set of ready-made components that are designed with specific native appearance for the Symbian platform.
|
<string>The Qt Quick Components for Symbian are a set of ready-made components that are designed with specific native appearance for the Symbian platform.
|
||||||
|
|
||||||
Requires Qt 4.7.3 or newer, and the component set installed for your Qt version.</string>
|
Requires Qt 4.7.4 or newer, and the component set installed for your Qt version.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
|||||||
Reference in New Issue
Block a user