diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index fbfeb5aeaba..ad11e687dd2 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -3749,7 +3749,15 @@ For more information on the options you have, see \l{Specifying Build Settings}. - \section1 Troubleshooting Build Issues + \section1 Building for Symbian + + The tool chain for building applications locally on the development PC for + the \gui {Symbian Device} target is only supported on Windows. + If you develop on Linux or Mac OS, you must use the Remote Compiler + interface to a compilation service at Forum Nokia. For more information, + see \l{Building with Remote Compiler}. + + \section2 Troubleshooting Build Issues If you cannot build the application for a Symbian device, check that: diff --git a/share/qtcreator/templates/mobileapp/app.pro b/share/qtcreator/templates/mobileapp/app.pro index 3e62a194b54..ecff9d59446 100644 --- a/share/qtcreator/templates/mobileapp/app.pro +++ b/share/qtcreator/templates/mobileapp/app.pro @@ -4,14 +4,6 @@ # dir1.source = mydir DEPLOYMENTFOLDERS = # file1 dir1 -# Avoid auto screen rotation -# ORIENTATIONLOCK # -DEFINES += ORIENTATIONLOCK - -# Needs to be defined for Symbian -# NETWORKACCESS # -DEFINES += NETWORKACCESS - # TARGETUID3 # symbian:TARGET.UID3 = 0xE1111234 @@ -22,6 +14,10 @@ symbian:TARGET.UID3 = 0xE1111234 # and 0x2002CCCF value if protected UID is given to the application #symbian:DEPLOYMENT.installer_header = 0x2002CCCF +# Allow network access on Symbian +# NETWORKACCESS # +symbian:TARGET.CAPABILITY += NetworkServices + # If your application uses the Qt Mobility libraries, uncomment # the following lines and add the respective components to the # MOBILITY variable. diff --git a/share/qtcreator/templates/mobileapp/mainwindow.cpp b/share/qtcreator/templates/mobileapp/mainwindow.cpp index 2f228d20e58..f8cffe1c254 100644 --- a/share/qtcreator/templates/mobileapp/mainwindow.cpp +++ b/share/qtcreator/templates/mobileapp/mainwindow.cpp @@ -11,13 +11,6 @@ #include -#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK) -#include -#include -#include -#include -#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK - MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { @@ -31,40 +24,45 @@ MainWindow::~MainWindow() void MainWindow::setOrientation(ScreenOrientation orientation) { -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) + // If the version of Qt on the device is < 4.7.2, that attribute won't work if (orientation != ScreenOrientationAuto) { -#if defined(ORIENTATIONLOCK) - const CAknAppUiBase::TAppUiOrientation uiOrientation = - (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait - : CAknAppUi::EAppUiOrientationLandscape; - CAknAppUi* appUi = dynamic_cast (CEikonEnv::Static()->AppUi()); - TRAPD(error, - if (appUi) - appUi->SetOrientationL(uiOrientation); - ); - Q_UNUSED(error) -#else // ORIENTATIONLOCK - qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."); -#endif // ORIENTATIONLOCK + const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); + if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { + qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); + return; + } } -#elif defined(Q_WS_MAEMO_5) +#endif // Q_OS_SYMBIAN + Qt::WidgetAttribute attribute; switch (orientation) { +#if QT_VERSION < 0x040702 + // Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes case ScreenOrientationLockPortrait: - attribute = Qt::WA_Maemo5PortraitOrientation; + attribute = static_cast(128); break; case ScreenOrientationLockLandscape: - attribute = Qt::WA_Maemo5LandscapeOrientation; + attribute = static_cast(129); break; - case ScreenOrientationAuto: default: - attribute = Qt::WA_Maemo5AutoOrientation; + case ScreenOrientationAuto: + attribute = static_cast(130); break; - } +#else // QT_VERSION < 0x040702 + case ScreenOrientationLockPortrait: + attribute = Qt::WA_LockPortraitOrientation; + break; + case ScreenOrientationLockLandscape: + attribute = Qt::WA_LockLandscapeOrientation; + break; + default: + case ScreenOrientationAuto: + attribute = Qt::WA_AutoOrientation; + break; +#endif // QT_VERSION < 0x040702 + }; setAttribute(attribute, true); -#else // Q_OS_SYMBIAN - Q_UNUSED(orientation); -#endif // Q_OS_SYMBIAN } void MainWindow::showExpanded() diff --git a/share/qtcreator/templates/qmlapp/app.pro b/share/qtcreator/templates/qmlapp/app.pro index 5b4346773b8..bf48f9be7ad 100644 --- a/share/qtcreator/templates/qmlapp/app.pro +++ b/share/qtcreator/templates/qmlapp/app.pro @@ -9,14 +9,6 @@ DEPLOYMENTFOLDERS = folder_01 # QML_IMPORT_PATH # QML_IMPORT_PATH = -# Avoid auto screen rotation -# ORIENTATIONLOCK # -DEFINES += ORIENTATIONLOCK - -# Needs to be defined for Symbian -# NETWORKACCESS # -DEFINES += NETWORKACCESS - # TARGETUID3 # symbian:TARGET.UID3 = 0xE1111234 @@ -27,6 +19,10 @@ symbian:TARGET.UID3 = 0xE1111234 # 0x2002CCCF value if protected UID is given to the application #symbian:DEPLOYMENT.installer_header = 0x2002CCCF +# Allow network access on Symbian +# NETWORKACCESS # +symbian:TARGET.CAPABILITY += NetworkServices + # Define QMLJSDEBUGGER to allow debugging of QML in debug builds # (This might significantly increase build time) # DEFINES += QMLJSDEBUGGER diff --git a/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.cpp b/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.cpp index 3310826e333..b0688a29fb7 100644 --- a/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.cpp +++ b/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -27,13 +27,6 @@ #include #endif -#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK) -#include -#include -#include -#include -#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK - #if defined(QMLJSDEBUGGER) // Enable debugging before any QDeclarativeEngine is created @@ -108,40 +101,45 @@ void QmlApplicationViewer::addImportPath(const QString &path) void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) { -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) + // If the version of Qt on the device is < 4.7.2, that attribute won't work if (orientation != ScreenOrientationAuto) { -#if defined(ORIENTATIONLOCK) - const CAknAppUiBase::TAppUiOrientation uiOrientation = - (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait - : CAknAppUi::EAppUiOrientationLandscape; - CAknAppUi* appUi = dynamic_cast (CEikonEnv::Static()->AppUi()); - TRAPD(error, - if (appUi) - appUi->SetOrientationL(uiOrientation); - ); - Q_UNUSED(error) -#else // ORIENTATIONLOCK - qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."); -#endif // ORIENTATIONLOCK + const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); + if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { + qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); + return; + } } -#elif defined(Q_WS_MAEMO_5) +#endif // Q_OS_SYMBIAN + Qt::WidgetAttribute attribute; switch (orientation) { +#if QT_VERSION < 0x040702 + // Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes case ScreenOrientationLockPortrait: - attribute = Qt::WA_Maemo5PortraitOrientation; + attribute = static_cast(128); break; case ScreenOrientationLockLandscape: - attribute = Qt::WA_Maemo5LandscapeOrientation; + attribute = static_cast(129); break; - case ScreenOrientationAuto: default: - attribute = Qt::WA_Maemo5AutoOrientation; + case ScreenOrientationAuto: + attribute = static_cast(130); break; - } +#else // QT_VERSION < 0x040702 + case ScreenOrientationLockPortrait: + attribute = Qt::WA_LockPortraitOrientation; + break; + case ScreenOrientationLockLandscape: + attribute = Qt::WA_LockLandscapeOrientation; + break; + default: + case ScreenOrientationAuto: + attribute = Qt::WA_AutoOrientation; + break; +#endif // QT_VERSION < 0x040702 + }; setAttribute(attribute, true); -#else // Q_OS_SYMBIAN - Q_UNUSED(orientation); -#endif // Q_OS_SYMBIAN } void QmlApplicationViewer::showExpanded() diff --git a/share/qtcreator/templates/shared/deployment.pri b/share/qtcreator/templates/shared/deployment.pri index 4daf170464e..25af78746fb 100644 --- a/share/qtcreator/templates/shared/deployment.pri +++ b/share/qtcreator/templates/shared/deployment.pri @@ -21,8 +21,6 @@ MAINPROFILEPWD = $$PWD symbian { isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone - contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices } else:win32 { copyCommand = for(deploymentfolder, DEPLOYMENTFOLDERS) { diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index 6b54749050c..7a6edc1779a 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -43,7 +43,7 @@ Attach to process ID: - Prozess-Id: + Prozess-ID: @@ -702,7 +702,7 @@ Could not find commits of id '%1' on %2. - Es konnten keine Abgaben des Datums %2 mit der Id '%1' gefunden werden. + Es konnten keine Abgaben des Datums %2 mit der ID '%1' gefunden werden. No cvs executable specified! @@ -771,7 +771,7 @@ Describe all files matching commit id - Alle zur Commit-Id gehörenden Dateien beschreiben: + Alle zur Commit-ID gehörenden Dateien beschreiben: Timeout: @@ -795,7 +795,7 @@ When checked, all files touched by a commit will be displayed when clicking on a revision number in the annotation view (retrieved via commit ID). Otherwise, only the respective file will be displayed. - Wenn die Option aktiviert ist, werden beim Klick auf die Revisionsnummer in der Annotationsansicht alle Dateien angezeigt, die zu einer Abgabe gehören (mittels Commit-Id bestimmt). Ansonsten wird nur die betreffende Datei angezeigt. + Wenn die Option aktiviert ist, werden beim Klick auf die Revisionsnummer in der Annotationsansicht alle Dateien angezeigt, die zu einer Abgabe gehören (mittels Commit-ID bestimmt). Ansonsten wird nur die betreffende Datei angezeigt. @@ -2008,6 +2008,10 @@ Sollen sie überschrieben werden? Yes, I know what I am doing. Ja, Ich bin mir dessen bewusst. + + &Refactor + &Refactoring + Unused variable Unbenutzte Variable @@ -2303,7 +2307,7 @@ Sollen sie überschrieben werden? Debugger::Internal::AttachExternalDialog Process ID - Prozess-Id + Prozess-ID Name @@ -3595,11 +3599,11 @@ Sie haben die Wahl zwischen Abwarten oder Abbrechen. Debugger::Internal::ThreadsHandler Thread&nbsp;id: - Thread-Id: + Thread-ID: Target&nbsp;id: - Ziel-Id: + Ziel-ID: Name: @@ -3647,7 +3651,7 @@ Sie haben die Wahl zwischen Abwarten oder Abbrechen. Thread ID - Thread-Id + Thread-ID @@ -3677,7 +3681,7 @@ Sie haben die Wahl zwischen Abwarten oder Abbrechen. Process started, PID: 0x%1, thread id: 0x%2, code segment: 0x%3, data segment: 0x%4. - Der Prozess wurde gestartet, PID: 0x%1, Thread-Id: 0x%2, Code-Segment: 0x%3, Datensegment: 0x%4. + Der Prozess wurde gestartet, PID: 0x%1, Thread-ID: 0x%2, Code-Segment: 0x%3, Datensegment: 0x%4. The reported code segment address (0x%1) might be invalid. Symbol resolution or setting breakoints may not work. @@ -9804,7 +9808,7 @@ Bitte prüfen Sie, ob das Gerät verbunden ist und die Anwendung 'TRK' Application running with pid %1. - Die Anwendung läuft mit der Prozess-Id: %1. + Die Anwendung läuft mit der Prozess-ID: %1. Finished. @@ -12770,7 +12774,7 @@ p, li { white-space: pre-wrap; } Qt4ProjectManager::Internal::S60Devices::Device Id: - Id: + ID: Name: @@ -14801,11 +14805,11 @@ Sie können die Änderungen in einem Stash ablegen oder rücksetzen.QmlDesigner::NavigatorTreeModel Invalid Id - Ungültige Id + Ungültige ID %1 is an invalid id - %1 ist keine gültige Id + %1 ist keine gültige ID Warning @@ -15094,7 +15098,7 @@ Sie können die Änderungen in einem Stash ablegen oder rücksetzen. New id: - Neue Id: + Neue ID: Unused variable @@ -15102,11 +15106,11 @@ Sie können die Änderungen in einem Stash ablegen oder rücksetzen. Refactoring - Refaktorisierung + Refactoring Rename id '%1'... - Id '%1' Umbenennen + ID '%1' umbenennen @@ -15596,15 +15600,15 @@ Sie können die Änderungen in einem Stash ablegen oder rücksetzen. expected id - Id erwartet + ID erwartet using string literals for ids is discouraged - Von der Verwendung von Zeichenketten-Literalen als Ids wird abgeraten + Von der Verwendung von Zeichenketten-Literalen als IDs wird abgeraten ids must be lower case - Ids müssen mit einem Kleinbuchstaben beginnen + IDs müssen mit einem Kleinbuchstaben beginnen @@ -16866,7 +16870,7 @@ Haben Sie Qemu gestartet? Id - Id + ID @@ -17988,11 +17992,11 @@ Es wird versucht eine Paketdatei zu erstellen, es können aber Probleme auftrete QmlDesigner::PropertyEditor Invalid Id - Ungültige Id + Ungültige ID %1 is an invalid id - %1 ist keine gültige Id + %1 ist keine gültige ID @@ -18023,16 +18027,16 @@ Es wird versucht eine Paketdatei zu erstellen, es können aber Probleme auftrete Only alphanumeric characters and underscore allowed. Ids must begin with a lowercase letter. Es sind nur alphanumerische Zeichen und Unterstriche zulässig. -Ids müssen außerdem mit einem Kleinbuchstaben beginnen. +IDs müssen außerdem mit einem Kleinbuchstaben beginnen. Ids have to be unique. - Ids müssen eindeutig sein. + IDs müssen eindeutig sein. Invalid Id: %1 %2 - Ungültige Id: %1 + Ungültige ID: %1 %2 @@ -18047,7 +18051,7 @@ Ids müssen außerdem mit einem Kleinbuchstaben beginnen. QmlDesigner::QmlModelView Invalid Id - Ungültige Id + Ungültige ID @@ -19329,7 +19333,7 @@ Server: %2. Cannot attach to PID 0 - Der Debugger kann nicht an die Prozess-Id 0 angehängt werden + Der Debugger kann nicht an die Prozess-ID 0 angehängt werden Process %1 @@ -19450,7 +19454,7 @@ Das Setzen von Haltepunkten nach Dateinamen und Zeilennummern könnte nicht funk Debugger::Internal::TcfTrkGdbAdapter Process started, PID: 0x%1, thread id: 0x%2, code segment: 0x%3, data segment: 0x%4. - Der Prozess wurde gestartet, PID: 0x%1, Thread-Id: 0x%2, Code-Segment: 0x%3, Datensegment: 0x%4. + Der Prozess wurde gestartet, PID: 0x%1, Thread-ID: 0x%2, Code-Segment: 0x%3, Datensegment: 0x%4. The reported code segment address (0x%1) might be invalid. Symbol resolution or setting breakoints may not work. diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp index f354d373e4b..d815b143f42 100644 --- a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp +++ b/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp @@ -62,7 +62,8 @@ const QString AbstractMobileApp::FileStubVersion(QLatin1String("version")); const int AbstractMobileApp::StubVersion = 3; AbstractMobileApp::AbstractMobileApp() - : m_orientation(ScreenOrientationAuto), m_networkEnabled(false) + : m_orientation(ScreenOrientationAuto) + , m_networkEnabled(true) { } @@ -253,9 +254,6 @@ QByteArray AbstractMobileApp::generateProFile(QString *errorMessage) const while (!(line = in.readLine()).isNull()) { if (line.contains(QLatin1String("# TARGETUID3"))) { valueOnNextLine = symbianTargetUid(); - } else if (line.contains(QLatin1String("# ORIENTATIONLOCK")) - && orientation() == ScreenOrientationAuto) { - uncommentNextLine = true; } else if (line.contains(QLatin1String("# NETWORKACCESS")) && !networkEnabled()) { uncommentNextLine = true; diff --git a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp index a1915f96430..e8f0d6bdebc 100644 --- a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp @@ -145,8 +145,7 @@ void QmlStandaloneAppWizard::prepareGenerateFiles(const QWizard *w, Q_UNUSED(errorMessage) const QmlStandaloneAppWizardDialog *wizard = qobject_cast(w); const QString mainQmlFile = wizard->m_qmlSourcesPage->mainQmlFile(); - if (!mainQmlFile.isEmpty()) - m_d->standaloneApp->setMainQmlFile(mainQmlFile); + m_d->standaloneApp->setMainQmlFile(mainQmlFile); } bool QmlStandaloneAppWizard::postGenerateFilesInternal(const Core::GeneratedFiles &l,