OSDN Git Service

Changing template/qmljsdbg-lib as suggested in QTCREATORBUG-2885
authorAlessandro Portale <alessandro.portale@nokia.com>
Mon, 1 Nov 2010 16:03:46 +0000 (17:03 +0100)
committerAlessandro Portale <alessandro.portale@nokia.com>
Mon, 1 Nov 2010 16:03:46 +0000 (17:03 +0100)
- Renaming the screen orientation enum and keys
- Explicit constructors
- Virtual destructors
- Renamed some occurences of 'Qml' in comments to 'QML'
- Adding descriptive comments to all generated files which should
  not be touched by the user.
- Adding missing license headers to the qmljsdebugger sources

Task-Number: QTCREATORBUG-2885
Reviewed-by: Friedemann Kleint
Reviewed-by: dt
31 files changed:
share/qtcreator/qml/qmljsdebugger/editor/boundingrecthighlighter.cpp
share/qtcreator/qml/qmljsdebugger/editor/boundingrecthighlighter.h
share/qtcreator/qml/qmljsdebugger/editor/colorpickertool.cpp
share/qtcreator/qml/qmljsdebugger/editor/colorpickertool.h
share/qtcreator/qml/qmljsdebugger/editor/editor.pri
share/qtcreator/qml/qmljsdebugger/editor/qmltoolbar.cpp
share/qtcreator/qml/qmljsdebugger/editor/qmltoolbar.h
share/qtcreator/qml/qmljsdebugger/editor/subcomponenteditortool.cpp
share/qtcreator/qml/qmljsdebugger/editor/subcomponenteditortool.h
share/qtcreator/qml/qmljsdebugger/editor/subcomponentmasklayeritem.cpp
share/qtcreator/qml/qmljsdebugger/editor/subcomponentmasklayeritem.h
share/qtcreator/qml/qmljsdebugger/editor/toolbarcolorbox.cpp
share/qtcreator/qml/qmljsdebugger/editor/toolbarcolorbox.h
share/qtcreator/qml/qmljsdebugger/editor/zoomtool.cpp
share/qtcreator/qml/qmljsdebugger/editor/zoomtool.h
share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri
share/qtcreator/qml/qmljsdebugger/qmljsdebugger.pri
share/qtcreator/qml/qmljsdebugger/qmljsdebugger.pro
share/qtcreator/templates/mobileapp/main.cpp
share/qtcreator/templates/mobileapp/mainwindow.cpp
share/qtcreator/templates/mobileapp/mainwindow.h
share/qtcreator/templates/qmlapp/app.pro
share/qtcreator/templates/qmlapp/main.cpp
share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.cpp
share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.h
share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.pri
share/qtcreator/templates/shared/deployment.pri
src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp
src/plugins/qt4projectmanager/wizards/abstractmobileapp.h
src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp
src/plugins/qt4projectmanager/wizards/mobileappwizardpages.h

index c1daee8..dcd5390 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #include "boundingrecthighlighter.h"
 #include "qdeclarativeviewobserver.h"
 #include "qmlobserverconstants.h"
index 2463d78..f24c300 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #ifndef BOUNDINGRECTHIGHLIGHTER_H
 #define BOUNDINGRECTHIGHLIGHTER_H
 
index bf52075..7063daa 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #include "colorpickertool.h"
 #include "qdeclarativeviewobserver.h"
 
index 748ad58..7dbcdef 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #ifndef COLORPICKERTOOL_H
 #define COLORPICKERTOOL_H
 
index 150ca7d..c54c839 100644 (file)
@@ -1,3 +1,6 @@
+# This file is part of Qt Creator
+# It enables debugging of Qt Quick applications
+
 INCLUDEPATH += $$PWD
 
 HEADERS += \
index 355a13b..24bd5c4 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #include <QLabel>
 #include <QIcon>
 #include <QAction>
index 77685b9..cc5b7a8 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #ifndef QMLTOOLBAR_H
 #define QMLTOOLBAR_H
 
index 700c0ec..8ee3366 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #include "subcomponenteditortool.h"
 #include "../qdeclarativeviewobserver_p.h"
 #include "subcomponentmasklayeritem.h"
index c1652dd..8d26f19 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #ifndef SUBCOMPONENTEDITORTOOL_H
 #define SUBCOMPONENTEDITORTOOL_H
 
index 1e8ff42..dfa8220 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #include "subcomponentmasklayeritem.h"
 #include "qmlobserverconstants.h"
 #include "qdeclarativeviewobserver.h"
index 37759eb..ea312ba 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #ifndef SUBCOMPONENTMASKLAYERITEM_H
 #define SUBCOMPONENTMASKLAYERITEM_H
 
index dd6eb7e..c7ad17a 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #include "toolbarcolorbox.h"
 #include "qmlobserverconstants.h"
 
index d4be792..39e8396 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #ifndef ToolBarColorBox_H
 #define ToolBarColorBox_H
 
index c1d3100..4a3b0ff 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #include "zoomtool.h"
 #include "../qdeclarativeviewobserver_p.h"
 
index 299efee..e341e72 100644 (file)
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
 #ifndef ZOOMTOOL_H
 #define ZOOMTOOL_H
 
index 5013580..06b9b4e 100644 (file)
@@ -1,3 +1,6 @@
+# This file is part of Qt Creator
+# It enables debugging of Qt Quick applications
+
 QT += declarative script
 INCLUDEPATH += $$PWD/include
 DEPENDPATH += $$PWD $$PWD/include editor $$PWD/qt-private
index a4abeb9..5743fca 100644 (file)
@@ -1,3 +1,6 @@
+# This file is part of Qt Creator
+# It enables debugging of Qt Quick applications
+
 INCLUDEPATH += $$PWD/include
 DEPENDPATH += $PPWD/include
 QT += declarative script
index 013795a..c46322e 100644 (file)
@@ -1,3 +1,6 @@
+# This file is part of Qt Creator
+# It enables debugging of Qt Quick applications 
+
 TEMPLATE = lib
 CONFIG+=dll
 TARGET = QmlJSDebugger
index 59b7394..355b1b1 100644 (file)
@@ -7,7 +7,7 @@ int main(int argc, char *argv[])
     QApplication app(argc, argv);
 
     MainWindow mainWindow;
-    mainWindow.setOrientation(MainWindow::Auto); // ORIENTATION
+    mainWindow.setOrientation(MainWindow::ScreenOrientationAuto); // ORIENTATION
 
 #ifdef Q_OS_SYMBIAN
     mainWindow.showFullScreen();
index d08587c..0ea8b51 100644 (file)
@@ -1,3 +1,11 @@
+/*
+  This file was generated by the Mobile Qt Application wizard of Qt Creator.
+  MainWindow is a convenience class containing mobile device specific code
+  such as screen orientation handling.
+  It is recommended not to modify this file, since newer versions of Qt Creator
+  may offer an updated version of it.
+*/
+
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
 
@@ -21,13 +29,13 @@ MainWindow::~MainWindow()
     delete ui;
 }
 
-void MainWindow::setOrientation(Orientation orientation)
+void MainWindow::setOrientation(ScreenOrientation orientation)
 {
 #ifdef Q_OS_SYMBIAN
-    if (orientation != Auto) {
+    if (orientation != ScreenOrientationAuto) {
 #if defined(ORIENTATIONLOCK)
         const CAknAppUiBase::TAppUiOrientation uiOrientation =
-                (orientation == LockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
+                (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
                     : CAknAppUi::EAppUiOrientationLandscape;
         CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
         TRAPD(error,
@@ -41,13 +49,13 @@ void MainWindow::setOrientation(Orientation orientation)
 #elif defined(Q_WS_MAEMO_5)
     Qt::WidgetAttribute attribute;
     switch (orientation) {
-    case LockPortrait:
+    case ScreenOrientationLockPortrait:
         attribute = Qt::WA_Maemo5PortraitOrientation;
         break;
-    case LockLandscape:
+    case ScreenOrientationLockLandscape:
         attribute = Qt::WA_Maemo5LandscapeOrientation;
         break;
-    case Auto:
+    case ScreenOrientationAuto:
     default:
         attribute = Qt::WA_Maemo5AutoOrientation;
         break;
index ce2919b..7080a66 100644 (file)
@@ -1,3 +1,11 @@
+/*
+  This file was generated by the Mobile Qt Application wizard of Qt Creator.
+  MainWindow is a convenience class containing mobile device specific code
+  such as screen orientation handling.
+  It is recommended not to modify this file, since newer versions of Qt Creator
+  may offer an updated version of it.
+*/
+
 #ifndef MAINWINDOW_H
 #define MAINWINDOW_H
 
@@ -11,16 +19,16 @@ class MainWindow : public QMainWindow
 {
     Q_OBJECT
 public:
-    enum Orientation {
-        LockPortrait,
-        LockLandscape,
-        Auto
+    enum ScreenOrientation {
+        ScreenOrientationLockPortrait,
+        ScreenOrientationLockLandscape,
+        ScreenOrientationAuto
     };
 
-    MainWindow(QWidget *parent = 0);
-    ~MainWindow();
+    explicit MainWindow(QWidget *parent = 0);
+    virtual ~MainWindow();
 
-    void setOrientation(Orientation orientation);
+    void setOrientation(ScreenOrientation orientation);
 
 private:
     Ui::MainWindow *ui;
index f70458d..73a99b8 100644 (file)
@@ -5,7 +5,7 @@ folder_01.target = qml
 DEPLOYMENTFOLDERS = folder_01
 # DEPLOYMENTFOLDERS_END #
 
-# Additional import path used to resolve Qml modules in Creator's code model
+# Additional import path used to resolve QML modules in Creator's code model
 # QML_IMPORT_PATH #
 QML_IMPORT_PATH =
 
index 1407091..f4da658 100644 (file)
@@ -7,7 +7,7 @@ int main(int argc, char *argv[])
 
     QmlApplicationViewer viewer;
     viewer.addImportPath(QLatin1String("modules")); // ADDIMPORTPATH
-    viewer.setOrientation(QmlApplicationViewer::Auto); // ORIENTATION
+    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); // ORIENTATION
     viewer.setMainQmlFile(QLatin1String("qml/app/main.qml")); // MAINQML
     viewer.show();
 
index 3e2ed95..8c7755c 100644 (file)
@@ -1,3 +1,12 @@
+/*
+  This file was generated by the Qt Quick Application wizard of Qt Creator.
+  QmlApplicationViewer is a convenience class containing mobile device specific
+  code such as screen orientation handling. Also QML paths and debugging are
+  handled here.
+  It is recommended not to modify this file, since newer versions of Qt Creator
+  may offer an updated version of it.
+*/
+
 #include "qmlapplicationviewer.h"
 
 #include <QtCore/QCoreApplication>
@@ -77,13 +86,13 @@ void QmlApplicationViewer::addImportPath(const QString &path)
     engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path));
 }
 
-void QmlApplicationViewer::setOrientation(Orientation orientation)
+void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
 {
 #ifdef Q_OS_SYMBIAN
-    if (orientation != Auto) {
+    if (orientation != ScreenOrientationAuto) {
 #if defined(ORIENTATIONLOCK)
         const CAknAppUiBase::TAppUiOrientation uiOrientation =
-                (orientation == LockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
+                (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
                     : CAknAppUi::EAppUiOrientationLandscape;
         CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
         TRAPD(error,
@@ -97,13 +106,13 @@ void QmlApplicationViewer::setOrientation(Orientation orientation)
 #elif defined(Q_WS_MAEMO_5)
     Qt::WidgetAttribute attribute;
     switch (orientation) {
-    case LockPortrait:
+    case ScreenOrientationLockPortrait:
         attribute = Qt::WA_Maemo5PortraitOrientation;
         break;
-    case LockLandscape:
+    case ScreenOrientationLockLandscape:
         attribute = Qt::WA_Maemo5LandscapeOrientation;
         break;
-    case Auto:
+    case ScreenOrientationAuto:
     default:
         attribute = Qt::WA_Maemo5AutoOrientation;
         break;
index e051961..3f11aee 100644 (file)
@@ -1,3 +1,12 @@
+/*
+  This file was generated by the Qt Quick Application wizard of Qt Creator.
+  QmlApplicationViewer is a convenience class containing mobile device specific
+  code such as screen orientation handling. Also QML paths and debugging are
+  handled here.
+  It is recommended not to modify this file, since newer versions of Qt Creator
+  may offer an updated version of it.
+*/
+
 #ifndef QMLAPPLICATIONVIEWER_H
 #define QMLAPPLICATIONVIEWER_H
 
 
 class QmlApplicationViewer : public QDeclarativeView
 {
+    Q_OBJECT
+
 public:
-    enum Orientation {
-        LockPortrait,
-        LockLandscape,
-        Auto
+    enum ScreenOrientation {
+        ScreenOrientationLockPortrait,
+        ScreenOrientationLockLandscape,
+        ScreenOrientationAuto
     };
 
-    QmlApplicationViewer(QWidget *parent = 0);
+    explicit QmlApplicationViewer(QWidget *parent = 0);
     virtual ~QmlApplicationViewer();
 
     void setMainQmlFile(const QString &file);
     void addImportPath(const QString &path);
-    void setOrientation(Orientation orientation);
+    void setOrientation(ScreenOrientation orientation);
     void show();
 
 private:
index 5c8ff05..09fd0ef 100644 (file)
@@ -1,5 +1,8 @@
-# This file should not be edited.
-# Future versions of Qt Creator might offer updated versions of this file.
+# This file was generated by the Qt Quick Application wizard of Qt Creator.
+# The code below adds the QmlApplicationViewer to the project and handles the
+# activation of QML debugging.
+# It is recommended not to modify this file, since newer versions of Qt Creator
+# may offer an updated version of it.
 
 QT += declarative
 
index 7ec5a99..e65eeb3 100644 (file)
@@ -1,5 +1,8 @@
-# This file should not be edited.
-# Future versions of Qt Creator might offer updated versions of this file.
+# This file was generated by an application wizard of Qt Creator.
+# The code below handles deployment to Symbian and Maemo, aswell as copying
+# of the application data to shadow build directories on desktop.
+# It is recommended not to modify this file, since newer versions of Qt Creator
+# may offer an updated version of it.
 
 defineTest(qtcAddDeployment) {
 for(deploymentfolder, DEPLOYMENTFOLDERS) {
index 3c5b4a1..01e32da 100644 (file)
@@ -68,7 +68,7 @@ const QString AbstractMobileApp::FileStubVersion(QLatin1String("version"));
 const int AbstractMobileApp::StubVersion = 1;
 
 AbstractMobileApp::AbstractMobileApp()
-    : m_orientation(Auto), m_networkEnabled(false)
+    : m_orientation(ScreenOrientationAuto), m_networkEnabled(false)
 {
 }
 
@@ -85,12 +85,12 @@ QString AbstractMobileApp::symbianUidForPath(const QString &path)
             + QString::fromLatin1("%1").arg(hash, 7, 16, QLatin1Char('0')).right(7).toUpper();
 }
 
-void AbstractMobileApp::setOrientation(Orientation orientation)
+void AbstractMobileApp::setOrientation(ScreenOrientation orientation)
 {
     m_orientation = orientation;
 }
 
-AbstractMobileApp::Orientation AbstractMobileApp::orientation() const
+AbstractMobileApp::ScreenOrientation AbstractMobileApp::orientation() const
 {
     return m_orientation;
 }
@@ -210,14 +210,14 @@ QByteArray AbstractMobileApp::generateMainCpp(QString *errorMessage) const
         if (line.contains(QLatin1String("// ORIENTATION"))) {
             const char *orientationString;
             switch (orientation()) {
-            case LockLandscape:
-                orientationString = "LockLandscape";
+            case ScreenOrientationLockLandscape:
+                orientationString = "ScreenOrientationLockLandscape";
                 break;
-            case LockPortrait:
-                orientationString = "LockPortrait";
+            case ScreenOrientationLockPortrait:
+                orientationString = "ScreenOrientationLockPortrait";
                 break;
-            case Auto:
-                orientationString = "Auto";
+            case ScreenOrientationAuto:
+                orientationString = "ScreenOrientationAuto";
                 break;
             }
             insertParameter(line, mainWindowClassName() + QLatin1String("::")
@@ -258,7 +258,7 @@ QByteArray AbstractMobileApp::generateProFile(QString *errorMessage) const
         if (line.contains(QLatin1String("# TARGETUID3"))) {
             valueOnNextLine = symbianTargetUid();
         } else if (line.contains(QLatin1String("# ORIENTATIONLOCK"))
-            && orientation() == Auto) {
+            && orientation() == ScreenOrientationAuto) {
             uncommentNextLine = true;
         } else if (line.contains(QLatin1String("# NETWORKACCESS"))
             && !networkEnabled()) {
index 8aa04c0..4190fe1 100644 (file)
@@ -70,10 +70,10 @@ struct AbstractGeneratedFileInfo
 class AbstractMobileApp : public QObject
 {
 public:
-    enum Orientation {
-        LockLandscape,
-        LockPortrait,
-        Auto
+    enum ScreenOrientation {
+        ScreenOrientationLockLandscape,
+        ScreenOrientationLockPortrait,
+        ScreenOrientationAuto
     };
 
     enum FileType {
@@ -95,8 +95,8 @@ public:
 
     virtual ~AbstractMobileApp();
 
-    void setOrientation(Orientation orientation);
-    Orientation orientation() const;
+    void setOrientation(ScreenOrientation orientation);
+    ScreenOrientation orientation() const;
     void setProjectName(const QString &name);
     QString projectName() const;
     void setProjectPath(const QString &path);
@@ -164,7 +164,7 @@ private:
     QString m_symbianSvgIcon;
     QString m_maemoPngIcon;
     QString m_symbianTargetUid;
-    Orientation m_orientation;
+    ScreenOrientation m_orientation;
     bool m_networkEnabled;
 };
 
index 0c6b696..01d64e1 100644 (file)
@@ -60,11 +60,11 @@ MobileAppWizardOptionsPage::MobileAppWizardOptionsPage(QWidget *parent)
         SLOT(openMaemoPngIcon()));
 
     m_d->ui.orientationBehaviorComboBox->addItem(tr("Automatically Rotate Orientation"),
-        AbstractMobileApp::Auto);
+        AbstractMobileApp::ScreenOrientationAuto);
     m_d->ui.orientationBehaviorComboBox->addItem(tr("Lock to Landscape Orientation"),
-        AbstractMobileApp::LockLandscape);
+        AbstractMobileApp::ScreenOrientationLockLandscape);
     m_d->ui.orientationBehaviorComboBox->addItem(tr("Lock to Portrait Orientation"),
-        AbstractMobileApp::LockPortrait);
+        AbstractMobileApp::ScreenOrientationLockPortrait);
 }
 
 MobileAppWizardOptionsPage::~MobileAppWizardOptionsPage()
@@ -72,7 +72,7 @@ MobileAppWizardOptionsPage::~MobileAppWizardOptionsPage()
     delete m_d;
 }
 
-void MobileAppWizardOptionsPage::setOrientation(AbstractMobileApp::Orientation orientation)
+void MobileAppWizardOptionsPage::setOrientation(AbstractMobileApp::ScreenOrientation orientation)
 {
     QComboBox *const comboBox = m_d->ui.orientationBehaviorComboBox;
     for (int i = 0; i < comboBox->count(); ++i)
@@ -82,10 +82,10 @@ void MobileAppWizardOptionsPage::setOrientation(AbstractMobileApp::Orientation o
         }
 }
 
-AbstractMobileApp::Orientation MobileAppWizardOptionsPage::orientation() const
+AbstractMobileApp::ScreenOrientation MobileAppWizardOptionsPage::orientation() const
 {
     const int index = m_d->ui.orientationBehaviorComboBox->currentIndex();
-    return static_cast<AbstractMobileApp::Orientation>(m_d->ui.orientationBehaviorComboBox->itemData(index).toInt());
+    return static_cast<AbstractMobileApp::ScreenOrientation>(m_d->ui.orientationBehaviorComboBox->itemData(index).toInt());
 }
 
 QString MobileAppWizardOptionsPage::symbianSvgIcon() const
index 92e3fa5..4b803b2 100644 (file)
@@ -46,8 +46,8 @@ public:
     explicit MobileAppWizardOptionsPage(QWidget *parent = 0);
     virtual ~MobileAppWizardOptionsPage();
 
-    void setOrientation(AbstractMobileApp::Orientation orientation);
-    AbstractMobileApp::Orientation orientation() const;
+    void setOrientation(AbstractMobileApp::ScreenOrientation orientation);
+    AbstractMobileApp::ScreenOrientation orientation() const;
     QString symbianSvgIcon() const;
     void setSymbianSvgIcon(const QString &icon);
     QString maemoPngIcon() const;