diff --git a/dist/changes-2.2.0 b/dist/changes-2.2.0 index f8d99e8e2ea..b7130550e63 100644 --- a/dist/changes-2.2.0 +++ b/dist/changes-2.2.0 @@ -9,20 +9,107 @@ git log --cherry-pick --pretty=oneline origin/master...origin/2.1 General * Added support for running user defined external tools (Tools->External) + * Moved toolchain definitions out of Qt versions. You can now define + toolchains in Tools->Options->ToolChains. Creator now supports + more than one instance of each kind of toolchain. Editing * Add new Inkpot color scheme * Moved 'Open in External Editor' to Tools->External->Text + * Add UTF-8 BOM support Project Support + * QMake project support should be more robust against syntax errors + * Treatment of command line arguments of processes started from build + and run configurations underwent heavy modifications: + - argument lists use native shell syntax; this affects quoting and + environment variable expansion most + - the SOURCEDIR and BUILDDIR environment variables were replaced + with %{sourceDir} and %{buildDir} macros + - this affects working directories and executable paths as well Debugging + * Rewrote debugging engine using the Microsoft Console Debugger (CDB) + for debugging executables built with Microsoft Visual Studio, + resulting in significant speed-up and better display of data + types, supporting both 32bit and 64bit versions of the + Debugging Tools for Windows. + * Made it possible to pin debugger tooltips. + * Reworked global architecture to allow multiple debugging sessions (for + different projects, combined Qml/C++ debugging, project 'snapshots', ...) + * Reworked breakpoint handling: new special breakpoint types for "break + on throw", "break on main", data breakpoints. + * Introduce combined c++/qml debugging (combined stack, cross-step) + * Rework per-type and per-item selection of display formats + * New dumpers for QTextCursor, QTextDocument, __m128, QScriptValue + QBasicAtomicPointer, bit fields, boost::shared_ptr + * Improve dumpers for QRegion, QVariant (custom types), QSharedPointer, + QMultiMap (QTCREATORBUG-3122), QObject, QWeakPointer + * Make alphabetic structure member sorting optional + * Make dumpers robust in case of missing debug information + * Improve python dumper profiling support + * Improve stepping performance + * Enable breakpoint setting from a disassembler view, QTCREATORBUG-3667 + * Fix display of shadowed variables. + * Fix display of data containing quoote characters, QTCREATORBUG-3084 + * Fix display of C style 'typedef struct X { ... } X; + * Fix stack/break view updates after manual module loading, QTCREATORBUG-3427 + * Fix 'Jump To/Run to' when in instruction-wise mode + * Several fixed to the "watcher" handling + * Allow re-running debugger engines, QTCREATORBUG-3073 + * Robust process control after -exec-interrupt errors, QTCREATORBUG-2850 + * Robust detection of Qt-in-namespace builds + * Handle "live updates" in the memory view + * Make memory view writable + * Improve starting debugger session directly from the command line + +BinEditor: + * Visualize data differences after updates + * Fix selection if cursor is left of anchor + * Allow copying also if selection is "backwards" + * Do not draw blinking cursor when there is a selection + Help +C++ Support + * Add QuickFix for implementing setters/getters for a Q_PROPERTY + * Add documentation about QuickFixes + * Fix switch statement indentation for GNU and Whitesmiths + style, QTCREATORBUG-2994 + * Fix indentation of labels + QML/JS Support + * Gui cosmetics in JS debugger: Show stack frame level, only valid + line numbers in stack view, do not show function code, show dummy + child entry for empty arrays + * Add wizard for creating JavaScript files, QTCREATORBUG-3070 + * Add local-file completion for url properties, QTCREATORBUG-2619 + * Add warning about invalid files in url properties + * Add file name completion in imports, QTCREATORBUG-3067 + * Add a locator filter for JS functions, QTCREATORBUG-2607 + * Add JSlint-style warnings about common JS pitfalls, QTCREATORBUG-3071 + * Add completion for attached properties like Component.onCompleted + * Allow QML modules to ship predumped type description files. + * Reenable instantiating component scope detection, QTCREATORBUG-2835 + * Improve error reporting of failed plugin dumps + * Complete a trailing '{' for 'A on b' object bindings, QTCREATORBUG-2642 + * Highlight capitalized types, QTCREATORBUG-2658 + * Re-dump a plugin if the shared library/dll changes, QTCREATORBUG-3047 + * Build qmldump in debug and release version on Windows, QTCREATORBUG-3549 + * Change qmldump to output QML instead of XML + * Fix automatic '.' import to also pick up QML modules, QTCREATORBUG-3768 + * Fix code model update when files are renamed, QTCREATORBUG-2986 + * Fix incorrect completion when brace is on separate line, QTCREATORBUG-2658 + * Fix quote autoinsertion in string literals, QTCREATORBUG-2155, QTCREATORBUG-3244 + * Fix '{' not being an electric character, QTCREATORBUG-3405 + * Fix indentation of 'foo: Namesp.Type {', QTCREATORBUG-3371 FakeVim: + * Implement Ctrl-N/Ctrl-P + * Implement 's' in visual block mode + * Fix Alt-Gr handling on Windows + * Handle more Ctrl-W + commands Platform Specific @@ -33,6 +120,7 @@ Linux (GNOME and KDE) Windows Symbian Target + * Added support for the new on-device debugging agent (CODA) Maemo Target @@ -41,6 +129,14 @@ Designer Version control plugins Wizards + * Support new keywords %MONTH% and %DAY% for C++ template file + +Misc + * Create infrastructure to setup "soft dependencies" between plugins + * Add a little tool 'qtpromaker' doing the job of 'qmake -project', but + much faster to make Qt Creator usable to quickly inspect and navigate + "alien" codebases a way to easily set up dummy .pro files is needed. + * Start documenting Qt Creator's coding style guidelines Additional credits go to: * The Inkpot color scheme was based on the Vim color scheme by diff --git a/doc/images/qtcreator-class-info-qt-gui.png b/doc/images/qtcreator-class-info-qt-gui.png index dd8cbeda472..ebee4e42699 100644 Binary files a/doc/images/qtcreator-class-info-qt-gui.png and b/doc/images/qtcreator-class-info-qt-gui.png differ diff --git a/doc/images/qtcreator-gs-build-example-targets.png b/doc/images/qtcreator-gs-build-example-targets.png index 1c20d8d11ee..2dafc3108f1 100644 Binary files a/doc/images/qtcreator-gs-build-example-targets.png and b/doc/images/qtcreator-gs-build-example-targets.png differ diff --git a/doc/images/qtcreator-intro-and-location-qt-gui.png b/doc/images/qtcreator-intro-and-location-qt-gui.png index 1cb08a694e3..74c0e31bd8f 100644 Binary files a/doc/images/qtcreator-intro-and-location-qt-gui.png and b/doc/images/qtcreator-intro-and-location-qt-gui.png differ diff --git a/doc/images/qtcreator-mobile-project-qt-versions.png b/doc/images/qtcreator-mobile-project-qt-versions.png index 455214c3022..bd2f6ec64c7 100644 Binary files a/doc/images/qtcreator-mobile-project-qt-versions.png and b/doc/images/qtcreator-mobile-project-qt-versions.png differ diff --git a/doc/images/qtcreator-new-project-qt-versions-qt-gui.png b/doc/images/qtcreator-new-project-qt-versions-qt-gui.png index 3f7834cc728..fa52ed70075 100644 Binary files a/doc/images/qtcreator-new-project-qt-versions-qt-gui.png and b/doc/images/qtcreator-new-project-qt-versions-qt-gui.png differ diff --git a/doc/images/qtcreator-new-project-summary-qt-gui.png b/doc/images/qtcreator-new-project-summary-qt-gui.png index 4e3bfc9ec64..8a01db5340a 100644 Binary files a/doc/images/qtcreator-new-project-summary-qt-gui.png and b/doc/images/qtcreator-new-project-summary-qt-gui.png differ diff --git a/doc/images/qtcreator-publish-maemo-extras.png b/doc/images/qtcreator-publish-maemo-extras.png new file mode 100644 index 00000000000..30a80a21a78 Binary files /dev/null and b/doc/images/qtcreator-publish-maemo-extras.png differ diff --git a/doc/images/qtcreator-symbian-run-settings.png b/doc/images/qtcreator-symbian-run-settings.png index 39656b41c89..50fc30fd348 100644 Binary files a/doc/images/qtcreator-symbian-run-settings.png and b/doc/images/qtcreator-symbian-run-settings.png differ diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index 3793049ebaa..89e0ab2c890 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -130,15 +130,17 @@ \o \l{Debugging the Example Application} \o \l{Interacting with the Debugger} \o \l{Setting Up Debugger} - \o \l{Debugger Modes of Operation} + \o \l{Launching the Debugger in Different Modes} \o \l{Using Debugging Helpers} \o \l{Debugging Qt Quick Projects} + \o \l{Troubleshooting Debugger} \endlist \o \l{Using the Maemo Emulator} \o \l{Deploying Applications to Mobile Devices} \list \o \l{Deploying Applications to Symbian Devices} \o \l{Deploying Applications to Maemo Devices} + \o \l{Publishing Maemo Applications to Extras-devel} \o \l{Publishing Applications to Ovi Store} \o \l{Building with Remote Compiler} \endlist @@ -1165,7 +1167,7 @@ \image qmldesigner-qml-components.png "QML Components pane" The \gui {Resources} pane displays the images and other files that you copy to - the project folder. + the project folder (to the same subfolder as the QML files). \section1 Specifying Element Properties @@ -2924,7 +2926,7 @@ select the type of your project. The contents of the wizard dialogs depend on the project type and - the build targets that you select in the \gui {Qt Versions} dialog. + the build targets that you select in the \gui {Target Setup} dialog. Follow the instructions of the wizard. For examples of creating different types of projects, see @@ -3070,7 +3072,7 @@ installed on the development PC. Select the Qt versions that you want to use to build the project for each target. - \image qtcreator-open-project-targets.png "Qt Versions dialog" + \image qtcreator-open-project-targets.png "Target Setup dialog" The status \gui New indicates that Qt Creator did not find an existing build for a particular development environment (Qt version) and target. Therefore, @@ -4133,7 +4135,7 @@ The tool tip of the target selector shows more details about the actual device that will be used when you run your application. - \o Start the \gui{App TRK} application on your device. + \o Start the debugging agent (CODA or App TRK) application on your device. \o Click the \gui Run button. @@ -4153,10 +4155,10 @@ \o The Nokia USB drivers that come with \e{PC Suite} or \e{Ovi Suite} have been installed on the development PC. \o The device is connected through USB cable in \e{PC Suite} mode. - \o \gui{App TRK} is running on the device, using the USB connection, + \o The debugging agent (CODA or App TRK) is running on the device, using + the USB connection, with the status \e connected. - \o The device is detected and selected in the run configuration - details. + \o The device is detected and selected in the \gui {Run Settings}. \endlist If this does not help to solve your problem, search the qt-creator@trolltech.com @@ -4474,7 +4476,7 @@ You can also pass command line arguments to your application on the device. Press the \gui{Device info button} to get more information about the selected - device, such as the CPU type and the running TRK version. + device, such as the CPU type and the running debugging agent version. \image qtcreator-symbian-run-settings.png "Run settings for Symbian devices" @@ -4565,7 +4567,7 @@ \contentspage index.html \previouspage creator-deployment-symbian.html \page creator-deployment-maemo.html - \nextpage creator-publish-ovi.html + \nextpage creator-publishing-to-maemo-extras.html \title Deploying Applications to Maemo Devices @@ -4609,7 +4611,8 @@ in the \gui {Package version} field. You can specify information that users see on a delivery channel, such as - Ovi Store. You can specify a short description of the application, package + Ovi Store or Maemo.org. You can specify a short description of the + application, package name, and application icon. The Debian control file contains an application icon in encoded form. To add the @@ -4632,6 +4635,73 @@ */ +/*! + \contentspage index.html + \previouspage creator-deployment-maemo.html + \page creator-publishing-to-maemo-extras.html + \nextpage creator-publish-ovi.html + + \title Publishing Maemo Applications to Extras-devel + + Extras is the primary repository for Maemo applications where most + community software can be found. You can browse the applications available + in Extras at \l{http://maemo.org/downloads/Maemo5/}{Maemo Downloads}. + + You can publish both free and commercial applications to Extras. Free + applications must be open source and pass through a QA process. + Commercial applications are usually closed, binary only, and the publisher + is responsible for assuring their quality and security. + + You can upload free applications as Debian packages to + \l{http://wiki.maemo.org/Extras-devel}{Extras-devel} at Maemo.org to share + new updates to your application and to start the community QA process. + You need a \l{https://garage.maemo.org/}{Garage} account for the uploads, + but the package itself does not need to be hosted in the Garage. + + You can use the \gui {Publish for Fremantle Extras-devel Free Repository} + wizard to create a source archive and, optionally, upload it to a build + server for compiling and packaging. The package is then moved to the + Extras-devel repository. From there on, you must follow the standard + Maemo processes to get the application published to Extras. + + The wizard checks that the package contains all the information that is + required to publish applications on Extras: package description and + Package Manager icon. For more information about entering this information, + see \l{Creating Debian Installation Packages}. + + To use the publishing wizard: + + \list 1 + + \o Select the \gui {Maemo5} build target for your project. + + \o Choose \gui {Build > Publish Project}. + + \o Select \gui {Publish for Fremantle Extras-devel Free Repository}, + and then select \gui {Start Wizard}. + + \o Select the Qt version and device type to build against and click + \gui Next. + + To create a source archive without uploading it to the build + server, select the \gui {Only create source package, do not upload} + check box. + + \o In the \gui {Garage account name} field, enter your login name, or + select \gui {Get an account} to create a new account. + + \image qtcreator-publish-maemo-extras.png "Upload Settings dialog" + + You can also select \gui {Request upload rights} to use the Maemo + Extras Assistant to validate your Garage account. + + \o Select \gui Commit to publish the application. + + \endlist + +*/ + + /*! \contentspage index.html \previouspage creator-maemo-emulator.html @@ -4654,6 +4724,7 @@ \list \o \l{Deploying Applications to Symbian Devices} \o \l{Deploying Applications to Maemo Devices} + \o \l{Publishing Maemo Applications to Extras-devel} \o \l{Publishing Applications to Ovi Store} \o \l{Building with Remote Compiler} \endlist @@ -5007,17 +5078,32 @@ /*! \contentspage index.html - \previouspage creator-deployment-maemo.html + \previouspage creator-publishing-to-maemo-extras.html \page creator-publish-ovi.html \nextpage creator-remote-compiler.html \title Publishing Applications to Ovi Store + Ovi Store is the global content market of Nokia, which reaches millions of + people worldwide. Consumers can access Ovi Store through either of these + platforms: + + \list + + \o Ovi Store applications on mobile devices + + \o Web browsers on desktop computers, laptops, netbooks, and tablets + + \endlist + + Consumers have access to a wide selection of content and can download + content in a few easy clicks. + The process and requirements to publish Qt applications to Ovi Store are described in the \l {http://wiki.forum.nokia.com/index.php/Guide_to_Publishing_Qt_Applications_to_the_Ovi_Store}{Guide to Publishing Qt Applications to the Ovi Store} wiki. - This section describes how to use Qt Creator publishing wizards to + This section describes how to generate installation packages that you can publish to Ovi Store. @@ -5262,9 +5348,9 @@ \o In the \gui {Create in} field, enter the path for the project files. For example, \c {C:\Qt\examples}, and then click \gui{Next}. - The \gui{Qt Versions} dialog opens. + The \gui{Target Setup} dialog opens. - \image qtcreator-mobile-project-qt-versions.png "Qt Versions dialog" + \image qtcreator-mobile-project-qt-versions.png "Target Setup dialog" \o Select \gui Maemo, \gui {Qt Simulator}, and \gui {Symbian Device} targets, and click \gui{Next}. @@ -5282,7 +5368,7 @@ and landscape, and then click \gui{Next}. \note This dialog opens only if you select \gui Maemo5 or - \gui {Symbian Device} target in the \gui {Qt Versions} dialog. + \gui {Symbian Device} target in the \gui {Target Setup} dialog. The \gui {Symbian Specific} dialog opens. @@ -5449,11 +5535,11 @@ \list 1 - \o Install Qt libraries, Qt mobile libraries, and the TRK - debugging application on the device. For more information, + \o Install Qt libraries, Qt mobile libraries, and a + debugging agent on the device. For more information, see \l{Setting Up Development Environment for Symbian}. - \o Start TRK on the device. + \o Start the debugging agent, App TRK or CODA, on the device. \o Click the \gui {Target Selector} and select \gui {Symbian Device}. @@ -5508,7 +5594,7 @@ to build the application and run it in Qt Simulator. \o To see the compilation progress, press \key{Alt+4} to open the - \gui Compile Output pane. + \gui {Compile Output} pane. The \gui Build progress bar on the toolbar turns green when the project is successfully built. The application opens in Qt Simulator. @@ -5522,7 +5608,7 @@ mobile functions and create your own scripts. \o To test the application on a Symbian device, install Qt libraries - and the TRK debugging application on the device. For more information, + and a debugging agent on the device. For more information, see \l{Setting Up Development Environment for Symbian}. \o Click the \gui {Target Selector} and select \gui {Symbian Device}. @@ -5578,7 +5664,7 @@ screen and two empty rectangles. To use the states.png image in your application, you must copy it to the project - directory from the examples directory in the + directory (same subdirectory as the QML file) from the examples directory in the Qt installation directory. For example: \c {C:\QtSDK\Examples\4.7\declarative\animation\states}. The image appears in the \gui Resources pane. You can also use any other image or a QML element, instead. @@ -5876,9 +5962,9 @@ \o In the \gui {Create in} field, enter the path for the project files. For example, \c {C:\Qt\examples}, and then click \gui{Next}. - The \gui {Qt Versions} dialog opens. + The \gui {Target Setup} dialog opens. - \image qtcreator-new-project-qt-versions-qt-gui.png "Qt Versions dialog" + \image qtcreator-new-project-qt-versions-qt-gui.png "Target Setup dialog" \o Select the Qt versions to use as build targets for your project, and click \gui{Next}. @@ -6792,12 +6878,13 @@ requirements for installation. Typically, the interaction between Qt Creator and the native debugger is set up automatically and you do not need to do anything. - \o \l{Debugger Modes of Operation} describes the operating modes in which the + \o \l{Launching the Debugger in Different Modes} describes the operating modes in which the debugger plugin runs, depending on where and how the process is started and run. \o \l{Using Debugging Helpers} describes how to get more detailed data on complex data. + \o \l{Debugging Qt Quick Projects} describes how to debug Qt Quick projects. \endlist @@ -6810,7 +6897,7 @@ \page creator-debugger-operating-modes.html \nextpage creator-debugging-helpers.html - \title Debugger Modes of Operation + \title Launching the Debugger in Different Modes The debugger plugin runs in different operating modes depending on where and how the process is started and run. Some of the modes are only available for @@ -6834,14 +6921,14 @@ \o \bold Post-mortem to debug crashed processes on Windows. - \o \bold TRK to debug processes running on a Symbian device. + \o \bold On-device to debug processes running on a mobile device. \endlist \note Debugging QML and JavaScript is supported only in plain mode. When you click the \gui {Start Debugging} button, the debugger is launched - in the appropriate operating mode (plain, terminal, or TRK), based on the + in the appropriate operating mode (plain, terminal, or on-device), based on the build and run settings for the active project. Select \gui Debug menu options to launch the debugger in the other modes. @@ -6899,18 +6986,16 @@ on Windows. Click the \gui {Debug in Qt Creator} button in the error message that is displayed by the Windows operating system. - \section2 TRK Mode + \section2 On-device Mode - The TRK mode is a special mode available only for Symbian. It - debugs processes running on a Symbian - device using the App TRK application that runs on the device. - - To launch the debugger in the TRK mode, open the project, select Symbian as the - target, and click the \gui {Start Debugging} button. - - For more information on setting up Symbian projects, see - \l{Setting Up Development Environment for Symbian}. + The on-device mode is a special mode available for run configurations + targeting mobile devices. It debugs processes running on mobile + devices using on-device debugging agents, such as CODA on Symbian and + gdbserver on Maemo and MeeGo. + To launch the debugger in the on-device mode, open the project, select a + run configuration that targets a mobile device, and click the + \gui {Start Debugging} button. */ @@ -7001,16 +7086,16 @@ \o gcc \o gdb \o Yes - \o TRK + \o On-device \row \o Maemo \o gcc \o gdb \o Yes - \o Remote + \o On-device \endtable - For more information on the debugger modes, see \l{Debugger Modes of Operation}. + For more information on the debugger modes, see \l{Launching the Debugger in Different Modes}. \omit @@ -7038,9 +7123,10 @@ \o RemoteGdbAdapter interacts with the gdbserver running on Linux. - \o TrkGdbAdapter interacts with Symbian devices. The gdb protocol and - the gdb serial protocol are used between gdb and the adapter. The TRK - protocol is used between the adapter and AppTRK running on the device. + \o CodaGdbAdapter interacts with Symbian devices. The gdb protocol and + the gdb serial protocol are used between gdb and the adapter. The + target communication framework (TCF) protocol is used between the + adapter and the CODA debugging agent running on the device. \endlist @@ -7062,23 +7148,26 @@ \o Notes \row \o Gdb - \o On Linux, install version 7.0.1, 7.1, or preferably, 7.2 or - later. On Mac OS X, install Apple gdb version 6.3.50-20050815 - (build 1344) or later. + \o On Linux and Windows, use the Python-enabled gdb versions that + are installed when you install Qt Creator and Qt SDK. On Mac OS X, + use the gdb provided with Xcode. + For a custom target, you can build your own Python-enabled gdb. + Follow the instructions on + \l{http://developer.qt.nokia.com/wiki/QtCreatorBuildGdb}{Building Gdb}. \row \o Debugging tools for Windows \o Using this engine requires you to install the \e{Debugging tools for Windows} - \l{http://www.microsoft.com/whdc/devtools/debugging/installx86.Mspx}{32-bit} + \l{http://www.microsoft.com/whdc/devtools/debugging/installx86.Mspx} or - \l{http://www.microsoft.com/whdc/devtools/debugging/install64bit.Mspx}{64-bit} + \l{http://www.microsoft.com/whdc/devtools/debugging/install64bit.Mspx} package (Version 6.11.1.404 for the 32-bit or the 64-bit version of Qt Creator, respectively), - which is freely available for download from the - \l{http://msdn.microsoft.com/en-us/default.aspx} + which are freely available for download from the + \l{http://msdn.microsoft.com/en-us/default.aspx}{Microsoft Developer Network}. - {Microsoft Developer Network}. The Qt Creator help browser does + The Qt Creator help browser does not allow you to download files, and therefore, you must copy the above links to a browser. @@ -7108,12 +7197,12 @@ flag in your run configuration, in \gui Projects mode. In the run configuration, select \gui{Use debug version of frameworks}. - For more detailed information about debugging on the Mac, see: - \l http://developer.apple.com/mac/library/technotes/tn2004/tn2124.html + For more detailed information about debugging on the Mac OS X, see: + \l{http://developer.apple.com/mac/library/technotes/tn2004/tn2124.html}{Mac OS X Debugging Magic}. - \note The Mac OS X Snow Leopard (10.6) has a bug, that can be worked - around as described in the link provided below: - \l http://bugreports.qt.nokia.com/browse/QTBUG-4962. + \note The Mac OS X Snow Leopard (10.6) has a bug that might cause the + application to crash. For a workaround, see: + \l{http://bugreports.qt.nokia.com/browse/QTBUG-4962}{QTBUG-4962}. \endtable @@ -7175,9 +7264,9 @@ features (like QtWebKit) are used. The debugger is launched in the appropriate operating mode (plain, terminal, - or TRK), based on the build and run settings for the active project. + or on-device), based on the build and run settings for the active project. Select \gui Debug menu options to launch the debugger in other modes. - For more information, see \l{Debugger Modes of Operation}. + For more information, see \l{Launching the Debugger in Different Modes}. \note Debugging QML and JavaScript is supported only in plain mode. @@ -7567,6 +7656,36 @@ \section1 Debugging Helpers Based on Python + Qt Creator uses gdb builds that enable Python scripting to display + information in the \gui {Locals and Watchers} view. When Python scripting + is used, code (Debugging helpers) does not need to be injected into the + debugged process to nicely display QStringList or \c std::map contents, for + example. + + The code injection caused problems and put an extra stress on the debugged + process. You can now easily extend the debugging helpers to other types. No + compilation is required, just adding a few lines of Python. + + Python scripting vastly reduces the communication overhead compared + with the previous solution. However, there are some obstacles: + + \list + + \o There is no Python-enabled gdb for Mac OS. Mac OS continues + injection with C++ based debugging helpers. + + \o On the Symbian platform, an on-device debugging agent restricts the + communication between gdb and the device. Therefore, extracting + QObject properties, for example, is not possible. + + \o There is no gdb to communicate with MSVC compiled applications on + Windows. So information can be displayed nicely only in a limited + fashion by using a cdb extension DLL. + + \endlist + + \section2 Extending the Python Based Debugging Helpers + On platforms featuring a Python-enabled version of the gdb debugger, the data extraction is done by a Python script. This is more robust as the script execution is separated from the debugged process. It @@ -7786,7 +7905,8 @@ Uses gdb to call the function \c func on the value specified by \a {item.value} and output the resulting item. This function is not available when debugging core dumps and it is not available - on the Symbian platform due to restrictions imposed by AppTRK. + on the Symbian platform due to restrictions imposed by the on-device + debugging agent. \o \gui{putItem(self, item)} - The "master function", handling basic types, references, pointers and enums directly, iterates @@ -7848,6 +7968,17 @@ \note QML Observer requires Qt 4.7.1 or later. + \section1 Enabling Debugging Helpers for Qt's Bootstrapped Applications + + Qt's bootstrapped applications (such as moc and qmake) are built in a way + that is incompatible with the default build of the debugging helpers. To + work around this, add gdbmacros.cpp to the compiled sources in the + application Makefile. + + Choose \gui {Tools > Options > Debugger > Debugging Helper > Use debugging + helper from custom location}, and specify an invalid location, such as + \c{/dev/null}. + */ @@ -7960,7 +8091,7 @@ \contentspage index.html \previouspage creator-debugging-helpers.html \page creator-debugging-qml.html - \nextpage creator-maemo-emulator.html + \nextpage creator-troubleshooting-debugging.html \title Debugging Qt Quick Projects @@ -8362,9 +8493,9 @@ \o Click \gui{Next}. - The \gui {Qt Versions} dialog opens. + The \gui {Target Setup} dialog opens. - \image qmldesigner-new-project-qt-versions.png "Qt Versions dialog" + \image qmldesigner-new-project-qt-versions.png "Target Setup dialog" \o Select the Qt versions to use as build targets for your project, and then click \gui{Next}. @@ -8382,7 +8513,7 @@ and landscape, and then click \gui Next. \note This dialog opens only if you select \gui Maemo5 or - \gui {Symbian Device} target in the \gui {Qt Versions} dialog. + \gui {Symbian Device} target in the \gui {Target Setup} dialog. The \gui {Symbian Specific} dialog opens. @@ -9222,7 +9353,7 @@ /*! \contentspage index.html - \previouspage creator-debugging-qml.html + \previouspage creator-troubleshooting-debugging.html \page creator-maemo-emulator.html \nextpage creator-deployment.html @@ -10394,8 +10525,9 @@ \list - \o Debugging large applications on Symbian devices using the Symbian S^3 - operating system might not work, because the TRK debug agent might not be able to + \o Debugging large applications on Symbian devices using the Symbian^3 + operating system might not work, because the on-device debugging agent + might not be able to access memory when the operating system starts paging. This causes breakpoint handling and symbol resolution to fail. For more information, see \l{http://bugreports.qt.nokia.com/browse/QTCREATORBUG-2158}{QTCREATORBUG-2158}. @@ -10421,8 +10553,7 @@ by 'Wave \reg Systems' is installed and active (causing crashes in \c{vxvault.dll)}). \o Gdb may take long to load debugging symbols, especially from large - libraries like \c libQtWebKit. Starting the debugging module can - take up to several minutes without visible progress. + libraries. \o Setting breakpoints in code that is compiled into the binary more than once does not work. @@ -10789,201 +10920,67 @@ /*! \contentspage index.html - \previouspage creator-task-lists.html - \page creator-faq.html - \nextpage creator-help.html + \previouspage creator-debugging-qml.html + \page creator-troubleshooting-debugging.html + \nextpage creator-maemo-emulator.html - \title FAQ + \title Troubleshooting Debugger - This section lists some frequently asked questions about Qt Creator and - answers to them. + This section lists some typical problems that you might encounter while + debugging and solutions for them. - \section1 General - - \section2 How do I reset all Qt Creator settings? - - Qt Creator creates two files and a directory: \c QtCreator.db, - \c QtCreator.ini, and \c qtcreator. The location depends on the platform. - On Linux, Unix, and Mac OS, the files are located in \c {~/.config/Nokia}, - on Windows XP in - \c {:\Documents and Settings\\Application Data\Nokia}, and - on Windows Vista and Windows 7 in - \c {:\Users\\AppData\Roaming\Nokia}. For all versions, - try this path: \c {APPDATA\Nokia}. - - \section2 Qt Creator comes with MinGW, should I use this version with Qt? - - Until Qt both Qt and Qt Creator have been shipping with a MinGW version which uses MinGW 3.4. Starting with the 1.2.90 Tech Preview, Qt Creator ships with a more recent MinGW GCC 4.4, which Qt 4.6 final will also be using. GCC 3.4 and GCC 4.4 are not binary compatible. So if you try to use Qt 4.6 beta and before with Qt Creator 1.2.90 and older, tell Qt Creator to use the MinGW from Qt by setting “MinGw location” to the according MinGW directory in Tools –> Options –> Qt4 –> Qt Versions. - - \section2 Qt Creator does not find a helper application, such as git or a compiler. - - Make sure the application is in your system PATH when starting Qt Creator. - Also select \gui {Tools > Options} to check the settings specified for the - application. Many plugins specify either the path to the tool they need or - the environment they run in. - - This is especially relevant for the Mac OS where \c {/usr/local/bin} might - not be in the path when Qt Creator is started. - - \section2 How do I change the language for Qt Creator? - - Qt Creator has been localized into several languages. If the system - language is one of the supported languages, it is automatically selected. - To change the language, select \gui {Tools > Options > Environment} and - select a language in the \gui Language field. The change takes effect after - you restart Qt Creator. - - \section1 Qt Designer - - \section2 Custom widgets not loaded in Design mode even though it works in standalone \QD. - - \QD fetches plugins from standard locations and loads the plugins that - match its build key. The locations are different for standalone and - integrated \QD. - - For more information, see \l{Adding Qt Designer Plugins}. - - \section1 Help - - \section2 The Qt Reference Documentation missing and context help cannot find topics. - - Qt Creator comes fully integrated with Qt documentation and - examples using the Qt Help plugin. - - \note The integrated Qt Reference Documentation is only available for Qt - 4.4 and later. - - Qt Creator, \QSDK, and other Qt deliverables contain documentation - as .qch files. All the documentation is accessible in the \gui Help mode. - - To view the documentation that is available and to add documentation, - select \gui {Tools > Options... > Help > Documentation}. - - For more information, see \l{Adding External Documentation}. - - \section1 Debugger - - \section2 The debugger does not work. - - First, make sure you use at least version 1.2.1. Several debugger related bug fixed in this version. Then, there is a “Debugger View” (under “Debug –> Views –> Debugger”). - -Note: Up to Qt Creator 1.2, the view was called “Gdb View”. The contents of the pane on the right hand side is most helpful. It is advised to attach it to any debugger related report on the mailing list (qt-creator@trolltech.com) or to put it on http://creator.pastebin.com [creator.pastebin.com] before asking people on IRC (#qt-creator at FreeNode). - - \section2 Does debugging on Mac need some special setup? - - If you want to debug into frameworks, such as Qt code, you need to set - - \c{?1 DYLD_IMAGE_SUFFIX=_debug} - - -(there is an option for that in the Qt4 run configuration). Also XCode 3.x is preferred. - - \section2 The built-in debugger is slow during startup and runtime, especially on Windows. - - The debugger which ships with Creator in the Qt SDK on Windows is GDB from MinGW. Unfortunately, GDB is quite slow on Windows in general. Qt Creator interacts with GDB and adds custom dumpers for Qt types, and is thus not the problem of the slowness. Note that Creator can be used with MSVC on Windows, too – even for debugging. - - \section2 How do I enable the debugging helpers for Qt’s bootstrapped applications (moc, qmake, etc) - - The bootstrapped applications are built in a way that is incompatible with - the default build of the debugging helpers. To work around this, add - gdbmacros.cpp to the compiled sources in the application Makefile. - - Choose \gui {Tools > Options > Debugger > Debugging Helper > Use debugging - helper from custom location}, and specify an invalid location, such as - \c{/dev/null}. - - For more information, see \l{Using Debugging Helpers}. - - \section2 The debugger does not hit my breakpoints + \section1 Debugger Does Not Hit Breakpoints You might have created a release build that does not contain debug - information. A gcc debug build should have the “-g” option on the compiler command line. Check that this option is present in the “Compile output” pane (Alt-4). If not, adjust your build settings in the “Project” tab. + information. A GNU Compiler Collection (GCC) debug build has the \c {-g} + option on the compiler command line. Check that this option is present in + the \gui {Compile Output} pane. If it is not, adjust your build settings + in the \gui {Projects} mode. -When using the Locals & Watches window to inspect a pointer variable, expanding the variable’s tree item shows another tree item level instead of directly showing the members of the pointer variable. That’s ugly. + \section1 Debugger Does Not Work -There’s a “Dereference pointers automatically” item in the Locals and Watchers context menu. + If the debugger does not work properly, try the following: - \section2 If I have a choice of gdb versions, which should I use? + \list 1 - Use the gdb version delivered with Qt Creator or Qt SDK. Except for Mac OS, + \o Make sure you use at least Qt Creator 2.1. + \o In the \gui Debug mode, select \gui {Windows > Views > Debugger + Log} to open the \gui {Debugger Log} view. Browse the contents of + the pane on the right hand side to find out what went wrong. + Always attach the contents of the pane to debugger-related + questions to the Qt Creator mailing list (qt-creator@trolltech.com) + or paste them to + \l{http://creator.pastebin.com}{creator.pastebin.com} before + asking questions in the IRC (on the #qt-creator channel at + FreeNode). -?1 sudo dpkg -i gdb_6.8-3ubuntu2_[arch].deb + \endlist + \section1 Directly Displaying Pointer Variable Members - \section2 The debugger tells me for some variables that are definitely in scope. What happened? + When you use the \gui {Locals and Watchers} view to inspect a pointer + variable and expand the variable tree item, another tree item level + is displayed. To directly display the members of the pointer variable, + select \gui {Dereference Pointers Automatically} in the context menu in the + \gui {Locals and Watchers} view. -The message is created by the debugging helpers. Qt Creator posts an expression to the gdb command line to invoke the debugging helpers, including the address of the object to examine. In some cases this address is modified by gdb before actually calling the helper function. It is unclear why and when this happens, but if it happens, the debugging helpers operate on wrong data and come to wrong conclusions, the most likely outcome is that it will find garbage and declare the variable as . + \section1 Built-in Debugger Is Slow During Startup and Runtime - \section2 What’s up with Python in the debugger? + The Qt Creator for Windows installation packages install gdb from MinGW. + Unfortunately, gdb is quite slow on Windows. Qt Creator does not cause + this, as it interacts with gdb and adds custom dumpers for Qt types. -Qt Creator is able to take advantage of using gdb builds that enable python scripting. It is currently only used for creating the contents of the Locals and Watcher view, but we might use it for stack display later. Using python scripting has three major advantages for us: - -There is no need to inject code (“Debugging helpers”) into the debugged process to “nicely display”, say, QStringList or std::map contents. The code injection was a constant source of trouble and introduced extra stress on the debugged process, something one usually does not want when debugging. -It is now easily possible to extend the “Debugging helpers” to other types. No compilation required, just a few lines of python. -Python scripting vastly reduces the communication overhead compared to the previous “pure MI” based solution. -So while in theory all is fine now, in practice there are some obstacles: - -There is no python-enabled gdb for Mac. Mac will have to continue injection with C++ based debugging helpers. -On the Symbian platform and the AppTRK tool used artificially restricts gdb’s ability to talk to the device, so extracting e.g. QObject properties is not possible. -There is no gdb to talk to MSVC compiled applications on Windows. So “nice display” only works in a limited fashion using injection of C++ based Debugging helpers and cdb. -Also, the official gdb 7.0 release will not work as it crashes quite often due to http://sourceware.org/bugzilla/show_bug.cgi?id=10884 [sourceware.org] - -Official gdb 7.0.1 works, but requires a few nasty workarounds on the Creator side as it does not have all the python features Qt Creators would like to use. Find updated sources for Ubuntu 9.10 (Karmic) by adding the following to your /etc/apt/sources.list: - - -?123 deb http://ppa.launchpad.net/daniel-molkentin/gdb/ubuntu karmic main deb-src http://ppa.launchpad.net/daniel-molkentin/gdb/ubuntu karmic main - - -To use Qt Creator’s new python based gdb integration you need - -gdb 7.0.1 or later – or – -self-compiled gdb from Archer: -Python 2.5 or later (Kubuntu: python2.6-dev) -A gdb from Archer: -Checkout the sources: - -?123 git clone git://sourceware.org/git/archer.git cd archer git checkout -b archer-tromey-python origin/archer-tromey-python - -Build it: - -?12 ./configure —with-python —disable-werror make - -Your new gdb will emerge as gdb/gdb -Point Creator’s gdb path (Options –> Debugger –> Gdb –> Gdb Location) to your Python-enabled gdb or use the QTC_DEBUGGER_PATH environment variable -Start debugging as usual. -Go to the Debugger –> Views –> Debugger view to check if everything is ok. Close to the beginning there is a command ‘help bb’ issued, check whether it returns with a ‘done’ or an ‘error’ reply. - - \section2 Are there prebuilt gdb binaries you recommend? - -Yes: - -For Linux/x86: ftp://ftp.qt.nokia.com/misc/gdb/gdb-python-linux-i686 [ftp.qt.nokia.com] -For Linux/x86_64: ftp://ftp.qt.nokia.com/misc/gdb/gdb-python-linux-x86_64 [ftp.qt.nokia.com] -Why is stepping into functions in shared libraries so slow on Linux? - -There was a gdb bug (http://sourceware.org/bugzilla/show_bug.cgi?id=11198 [sourceware.org]) which has been fixed by now. It has also been suggested that - - -?1 sudo apt-get install libc6-dbg - - -solves the problem on Ubuntu machines. - - \section1 Code Editor - - How can I get code-completion to work on the standard headers and phonon? - - That does work only with builds from March 31 2009 or newer. - - \section1 Compilation - - How can I make use of my multi-core CPU with Qt Creator? - -On Linux and Mac OS X, go to Project Mode, select your configuration in the build settings tab, locate the Build Steps entry and add -j where is the amount of cores in your CPU. - -On Windows, nmake does not support the -j parameter. Instead, we provide a drop-in replacement called jom. You can download a precompiled version of jom from the Qt FTP. Put jom.exe in a location in PATH. Go to the location described above and set jom.exe as the make command. Note: Unlike GNU make, jom will automatically detect your cores and will spawn as many parallel processes as your CPU has cores. You can override this behavior by using the -j parameter as described above. + \note You can use Qt Creator with MSVC on Windows for debugging. + \section1 Debugger Displays Message + The message is created by the debugging helpers. Qt Creator posts an + expression to the gdb command line to invoke the debugging helpers. + The expression includes the address of the object to examine. This + address might be modified by gdb before the helper function is called. It + is unclear why and when this happens, but if it happens, the debugging + helpers operate on wrong data and come to wrong conclusions. Most likely, + they find garbage and declare the variable to be . */ diff --git a/doc/symbiandev.qdoc b/doc/symbiandev.qdoc index eac78a8782a..07b1b43848b 100644 --- a/doc/symbiandev.qdoc +++ b/doc/symbiandev.qdoc @@ -56,6 +56,17 @@ the required applications on Symbian devices. You can also use any of the standard methods for installing applications. + To debug applications on Symbian devices by using the Qt Creator \gui Debug + mode, you must install an on-device debugging agent on the device. You have + a choice between App TRK and CODA debugging agents. For more information, + see + \if defined(qcmanual) + \l{Using On-device Debugging Agents}. + \else + \e \l{http://doc.qt.nokia.com/qtcreator-latest/creator-developing-symbian.html}{Using On-device Debugging Agents}. + \endif + + 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 @@ -72,14 +83,9 @@ following: \list \o The Nokia USB drivers that come with \e{PC Suite} or \e{Ovi Suite} - \o The - \if defined(qcmanual) - \l{http://tools.ext.nokia.com/trk/}{App TRK} - \else - \e {App TRK} - \endif - application for your device - \o \e Qt installed on the device + \o An on-device debugging agent, \e {App TRK} or \e CODA, installed on + the device + \o \e Qt installed on the device \o \e {Qt Mobility APIs} installed on the device, if you use them in applications \o \e {QtWebKit} installed on the device, if you use web functionality @@ -98,6 +104,7 @@ to install Carbide.c++ v2.0.0 or higher. \endif + \section1 Installing Required Applications on Devices Separate installation packages are provided for Symbian^3 and Symbian^1 @@ -127,8 +134,7 @@ \o Choose \gui {Start > Qt SDK > Symbian^3 Qt 4.7.2 > Install TRK (Debug Agent) for Symbian^3 on Device} and follow the instructions on the screen to install - the TRK - debugging application to the device. + the App TRK debugging agent to the device. \o Choose \gui {Start > Qt SDK > Symbian^3 Qt 4.7.2 > Install QtWebKit for for Qt 4.7.2 on Symbian^3 Device} and follow the @@ -157,8 +163,7 @@ \o Choose \gui {Start > Qt SDK > Symbian^1 Qt 4.7.2 > Install TRK (Debug Agent)} for the type of the connected device and follow the instructions on the screen to install - the TRK - debugging application to the device. + the App TRK debugging agent to the device. \o Choose \gui {Start > Qt SDK > Symbian^1 Qt 4.7.2 > Install QtWebKit for for Qt 4.7.2 on Symbian^1 Device} and follow the @@ -169,7 +174,59 @@ In addition, you can install an example application and demos to Symbian^1 devices. + \if defined(qcmanual) + \section1 Using On-device Debugging Agents + + CODA is a new on-device debugging agent that will eventually replace App TRK. + You can choose which debugging agent to use in the \gui {Run Settings} for + the project. + + CODA offers the following benefits: + + \list + + \o Extended error information + + \o Debugging over WLAN + + \o Extended information about the device + + \endlist + + CODA differs from App TRK in the following ways: + + \list + + \o Coda does not support debugging over a Bluetooth connection. + + \o Coda supports only Symbian^1 and Symbian^3 devices. It does not + support S60 3rd Edition devices. + + \endlist + + \section2 Installing Debugging Agents + + You can download CODA from the + \l{http://tools.ext.nokia.com/coda/}{CODA download server}: + + \list + + \o Symbian^1 versions of CODA are located in the pf5250 folder. + + \o Symbian^3 versions of CODA are located in the tb92 folder. + + \endlist + + The builds that are marked as \e delta builds work on top of App TRK, and + therefore, App TRK and CODA can co-exist on a device. Other than the delta + builds cannot be installed on a device where App TRK is installed. + + The \QSDK installation program creates a shortcut for installing + App TRK on Symbian devices, but you can also download and install it + separately from the + \l{http://tools.ext.nokia.com/trk/}{App TRK download server}. + \section1 Adding Symbian Platform SDKs \QSDK contains all the tools you need for developing Qt applications for @@ -177,7 +234,7 @@ install additional Symbian Platform SDKs: \list - \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/} + \o \l{http://www.forum.nokia.com/info/sw.nokia.com/id/ec866fab-4b76-49f6-b5a5-af0631419e9c/S60_All_in_One_SDKs.html} {S60 Platform SDK 3rd Edition FP1 or higher}. \o Either the GCCE ARM Toolchain that is included in the Symbian SDKs, or RVCT 2.2 [build 686] or later (which is not available free @@ -229,7 +286,8 @@ The tool tip of the target selector shows more details about the actual device that will be used when you run your application. - \o Start the \gui{App TRK} application on your device and deny the + \o Start the debugging application, App TRK or CODA, on the device and + deny the Bluetooth connection. \o Select \gui Options to select USB as connection type. diff --git a/qtcreator.pri b/qtcreator.pri index 99eb0fa1258..2d6bf5bb781 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -146,12 +146,6 @@ unix { UI_DIR = $${OUT_PWD}/.uic } -linux-g++* { - # Bail out on non-selfcontained libraries. Just a security measure - # to prevent checking in code that does not compile on other platforms. - QMAKE_LFLAGS += -Wl,--allow-shlib-undefined -Wl,--no-undefined -} - win32-msvc* { #Don't warn about sprintf, fopen etc being 'unsafe' DEFINES += _CRT_SECURE_NO_WARNINGS diff --git a/share/qtcreator/qml/qmljsdebugger/editor/abstractliveedittool.cpp b/share/qtcreator/qml/qmljsdebugger/editor/abstractliveedittool.cpp index 433e18227aa..a4b491a3822 100644 --- a/share/qtcreator/qml/qmljsdebugger/editor/abstractliveedittool.cpp +++ b/share/qtcreator/qml/qmljsdebugger/editor/abstractliveedittool.cpp @@ -88,11 +88,7 @@ bool AbstractLiveEditTool::topItemIsMovable(const QList & itemLi QGraphicsItem *firstSelectableItem = topMovableGraphicsItem(itemList); if (firstSelectableItem == 0) return false; - - QDeclarativeItem *declarativeItem - = dynamic_cast(firstSelectableItem->toGraphicsObject()); - - if (declarativeItem != 0) + if (toQDeclarativeItem(firstSelectableItem) != 0) return true; return false; @@ -122,7 +118,7 @@ bool AbstractLiveEditTool::topItemIsResizeHandle(const QList &/* QDeclarativeItem *AbstractLiveEditTool::toQDeclarativeItem(QGraphicsItem *item) { - return dynamic_cast(item->toGraphicsObject()); + return qobject_cast(item->toGraphicsObject()); } QGraphicsItem *AbstractLiveEditTool::topMovableGraphicsItem(const QList &itemList) diff --git a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp index 22ae3d6da09..0d169b83d21 100644 --- a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp +++ b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp @@ -63,24 +63,56 @@ const char * const KEY_TOOLBOX_GEOMETRY = "toolBox/geometry"; const int SceneChangeUpdateInterval = 5000; + +class ToolBox : public QWidget +{ + Q_OBJECT + +public: + ToolBox(QWidget *parent = 0); + ~ToolBox(); + + QmlToolBar *toolBar() const { return m_toolBar; } + +private: + QSettings m_settings; + QmlToolBar *m_toolBar; +}; + +ToolBox::ToolBox(QWidget *parent) + : QWidget(parent, Qt::Tool) + , m_settings(QLatin1String("Nokia"), QLatin1String("QmlObserver"), this) + , m_toolBar(new QmlToolBar) +{ + setWindowFlags((windowFlags() & ~Qt::WindowCloseButtonHint) | Qt::CustomizeWindowHint); + setWindowTitle(tr("Qt Quick Toolbox")); + + QVBoxLayout *verticalLayout = new QVBoxLayout; + verticalLayout->setMargin(0); + verticalLayout->addWidget(m_toolBar); + setLayout(verticalLayout); + + restoreGeometry(m_settings.value(QLatin1String(KEY_TOOLBOX_GEOMETRY)).toByteArray()); +} + +ToolBox::~ToolBox() +{ + m_settings.setValue(QLatin1String(KEY_TOOLBOX_GEOMETRY), saveGeometry()); +} + + QDeclarativeViewObserverPrivate::QDeclarativeViewObserverPrivate(QDeclarativeViewObserver *q) : q(q), designModeBehavior(false), showAppOnTop(false), executionPaused(false), slowdownFactor(1.0f), - toolBar(0), - toolBox(0), - settings(0) + toolBox(0) { } QDeclarativeViewObserverPrivate::~QDeclarativeViewObserverPrivate() { - if (toolBar) { - settings->setValue(QLatin1String(KEY_TOOLBOX_GEOMETRY), - toolBar->window()->saveGeometry()); - } } QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObject *parent) : @@ -96,9 +128,6 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObje data->boundingRectHighlighter = new BoundingRectHighlighter(this); data->subcomponentEditorTool = new SubcomponentEditorTool(this); data->currentTool = data->selectionTool; - data->settings = new QSettings(QLatin1String("Nokia"), - QLatin1String("QmlObserver"), - this); // to capture ChildRemoved event when viewport changes data->view->installEventFilter(this); @@ -169,7 +198,7 @@ void QDeclarativeViewObserver::setObserverContext(int contextIndex) void QDeclarativeViewObserverPrivate::_q_setToolBoxVisible(bool visible) { -#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) +#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR) if (!toolBox && visible) createToolBox(); if (toolBox) @@ -416,7 +445,7 @@ void QDeclarativeViewObserverPrivate::_q_clearComponentCache() void QDeclarativeViewObserverPrivate::_q_removeFromSelection(QObject *obj) { QList items = selectedItems(); - if (QGraphicsItem *item = dynamic_cast(obj)) + if (QGraphicsItem *item = qobject_cast(obj)) items.removeOne(item); setSelectedItems(items); } @@ -481,8 +510,8 @@ void QDeclarativeViewObserver::setDesignModeBehavior(bool value) { emit designModeBehaviorChanged(value); - if (data->toolBar) - data->toolBar->setDesignModeBehavior(value); + if (data->toolBox) + data->toolBox->toolBar()->setDesignModeBehavior(value); data->debugService->setDesignModeBehavior(value); data->designModeBehavior = value; @@ -878,7 +907,10 @@ QRectF QDeclarativeViewObserver::adjustToScreenBoundaries(const QRectF &bounding void QDeclarativeViewObserverPrivate::createToolBox() { - toolBar = new QmlToolBar; + toolBox = new ToolBox(q->declarativeView()); + + QmlToolBar *toolBar = toolBox->toolBar(); + QObject::connect(q, SIGNAL(selectedColorChanged(QColor)), toolBar, SLOT(setColorBoxColor(QColor))); @@ -912,18 +944,8 @@ void QDeclarativeViewObserverPrivate::createToolBox() QObject::connect(q, SIGNAL(zoomToolActivated()), toolBar, SLOT(activateZoom())); QObject::connect(q, SIGNAL(marqueeSelectToolActivated()), toolBar, SLOT(activateMarqueeSelectTool())); - - QVBoxLayout *verticalLayout = new QVBoxLayout; - verticalLayout->setMargin(0); - verticalLayout->addWidget(toolBar); - - toolBox = new QWidget(q->declarativeView(), Qt::Tool); - toolBox->setWindowFlags((toolBox->windowFlags() & ~Qt::WindowCloseButtonHint) - | Qt::CustomizeWindowHint); - toolBox->setWindowTitle(tr("Qt Quick Toolbox")); - toolBox->setLayout(verticalLayout); - - toolBox->restoreGeometry(settings->value(QLatin1String(KEY_TOOLBOX_GEOMETRY)).toByteArray()); } -} //namespace QmlJSDebugger +} // namespace QmlJSDebugger + +#include "qdeclarativeviewobserver.moc" diff --git a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h index 4219eeed6a9..fc15a2dbdbe 100644 --- a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h +++ b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h @@ -40,8 +40,6 @@ #include "qdeclarativeviewobserver.h" #include "qdeclarativeobserverservice.h" -QT_FORWARD_DECLARE_CLASS(QSettings) - namespace QmlJSDebugger { class JSDebuggerAgent; @@ -52,7 +50,7 @@ class ColorPickerTool; class LiveLayerItem; class BoundingRectHighlighter; class SubcomponentEditorTool; -class QmlToolBar; +class ToolBox; class CrumblePath; class AbstractLiveEditTool; @@ -93,9 +91,7 @@ public: bool executionPaused; qreal slowdownFactor; - QmlToolBar *toolBar; - QWidget *toolBox; - QSettings *settings; + ToolBox *toolBox; void setViewport(QWidget *widget); diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index 0d95c27d18f..ccb41bcdb5f 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -972,11 +972,11 @@ Sources - Quelldateien + Quelldateien Qt Sources: - Qt-Quellen: + Qt-Quellen: @@ -2297,15 +2297,15 @@ Qt Creator kann sich nicht anhängen. Breakpoint at "main" - Halte bei "main" + Halte bei "main" Break when catching exceptions - Beim Fangen von Ausnahmen anhalten + Beim Fangen von Ausnahmen anhalten Break when throwing exceptions - Beim Auslösen von Ausnahmen anhalten + Beim Auslösen von Ausnahmen anhalten Breakpoint by File and Line @@ -2321,11 +2321,11 @@ Qt Creator kann sich nicht anhängen. Breakpoint at "throw" - Halte bei "throw" + Halte bei "throw" Breakpoint at "catch" - Halte bei "catch" + Halte bei "catch" Breakpoint at Function "main()" @@ -2336,6 +2336,10 @@ Qt Creator kann sich nicht anhängen. Haeh? Unbekannter Haltepunkt-Typ + + Watchpoint at 0x%1 + Watchpoint bei 0x%1 + Enabled Aktiviert @@ -2392,6 +2396,10 @@ Qt Creator kann sich nicht anhängen. Number Zahl + + Breakpoint at "%1" + Haltepunkt bei "%1" + Function Funktion @@ -2505,11 +2513,11 @@ Qt Creator kann sich nicht anhängen. Set Breakpoint at "throw" - Haltepunkt bei "throw" setzen + Haltepunkt bei "throw" setzen Set Breakpoint at "catch" - Haltepunkt bei "catch" setzen + Haltepunkt bei "catch" setzen Add Breakpoint @@ -2936,6 +2944,10 @@ Sie haben die Wahl zwischen Abwarten oder Abbrechen. Target line hit. Stopped Zeile erreicht / Angehalten + + Value changed from %1 to %2. + Wert von %1 auf %2 geändert. + Normal Normal @@ -8109,7 +8121,7 @@ konnte dem Projekt '%2' nicht hinzugefĂĽgt werden. Session - Sitzung + Sitzung Build All @@ -8299,6 +8311,10 @@ konnte dem Projekt '%2' nicht hinzugefĂĽgt werden. Recent P&rojects Zuletzt bearbeitete P&rojekte + + Recent Sessions + Zuletzt benutzte Sitzungen + Build Project "%1" Projekt '%1" erstellen @@ -9438,35 +9454,35 @@ Wählt eine fĂĽr Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfĂĽ Qt4ProjectManager::Internal::S60DevicesPreferencePane Form - Formular + Formular Refresh - Aktualisieren + Aktualisieren S60 SDKs - S60 SDKs + S60 SDKs Error - Fehler + Fehler Add - HinzufĂĽgen + HinzufĂĽgen Change Qt version - Qt-Version ändern + Qt-Version ändern Remove - Entfernen + Entfernen Change Qt Version - Qt-Version ändern + Qt-Version ändern @@ -11450,7 +11466,7 @@ Die folgenden Encodings scheinen der Datei zu entsprechen: <not valid> Selected path is not valid: - <ungĂĽltig> + <ungĂĽltig> The path must not be empty. @@ -12080,23 +12096,23 @@ p, li { white-space: pre-wrap; } Qt4ProjectManager::Internal::S60Devices::Device Id: - ID: + ID: Name: - Name: + Name: EPOC: - EPOC: + EPOC: Tools: - Tools: + Tools: Qt: - Qt: + Qt: @@ -13158,7 +13174,7 @@ Sie können die Ă„nderungen in einem Stash ablegen oder rĂĽcksetzen. Unable to create a commit editor. - Es konnte kein Editor fĂĽr die Abgabe angelegt werden. + Es konnte kein Editor fĂĽr die Abgabe angelegt werden. Commit changes for "%1". @@ -13973,6 +13989,10 @@ Sie können die Ă„nderungen in einem Stash ablegen oder rĂĽcksetzen.The default mkspec symlink is broken. Der symbolische Link zu der Vorgabe-mkspec ist fehlerhaft. + + Failed to detect the ABI(s) used by the Qt version. + Die ABI(s) der Qt-Version konnten nicht bestimmt werden. + Desktop Qt Version is meant for the desktop @@ -16042,45 +16062,45 @@ Es wird versucht eine Paketdatei zu erstellen, es können aber Probleme auftrete Qt4ProjectManager::Internal::S60DevicesBaseWidget Default - Vorgabe + Vorgabe SDK Location - SDK-Pfad + SDK-Pfad Qt Location - Qt-Pfad + Qt-Pfad Choose Qt folder - Qt-Ordner + Qt-Ordner Qt4ProjectManager::Internal::S60DevicesModel No Qt installed - Qt ist nicht installiert + Qt ist nicht installiert Qt4ProjectManager::Internal::GnuPocS60DevicesWidget Step 1 of 2: Choose GnuPoc folder - Schritt 1 von 2: GnuPoc-Ordner wählen + Schritt 1 von 2: GnuPoc-Ordner wählen Step 2 of 2: Choose Qt folder - Schritt 2 von 2: Qt-Ordner wählen + Schritt 2 von 2: Qt-Ordner wählen Adding GnuPoc - GnuPoc hinzufĂĽgen + GnuPoc hinzufĂĽgen GnuPoc and Qt folders must not be identical. - GnuPoc-Ordner und Qt-Ordner mĂĽssen sich unterscheiden. + GnuPoc-Ordner und Qt-Ordner mĂĽssen sich unterscheiden. @@ -16815,7 +16835,7 @@ IDs mĂĽssen auĂźerdem mit einem Kleinbuchstaben beginnen. Double click to edit item. - <Doppelklick zum Bearbeiten> + <Doppelklick zum Bearbeiten> Add @@ -16825,6 +16845,10 @@ IDs mĂĽssen auĂźerdem mit einem Kleinbuchstaben beginnen. Remove Löschen + + Double-click to edit item. + Doppelklicken Sie zum Bearbeiten. + ImageViewer::Internal::ImageViewerToolbar @@ -17408,13 +17432,41 @@ Server: %2. The application requires the debugger engine '%1', which is disabled. Diese Anwendung erfordert den Debugger '%1', der gegenwärtig deaktiviert ist. + + The debugger engine '%1' is disabled. + Der Debugger-Engine '%1' ist deaktiviert. + + + The debugger engine '%1' required for debugging binaries of the type '%2' is not configured correctly. + Der zum Debuggen von ausfĂĽhrbaren Dateien des Typs '%2' erforderliche Debugger-Engine '%1' ist nicht richtig eingerichtet. + + + None of the debugger engines '%1' capable of debugging binaries of the type '%2' is configured correctly. + Keiner der zum Debuggen von ausfĂĽhrbaren Dateien des Typs '%2' geeigneten Debugger-Engines '%1' ist richtig eingerichtet. + + + The preferred debugger engine for debugging binaries of type '%1' is not available. +The debugger engine '%2' will be used as a fallback. +Details: %3 + Der zum Debuggen von ausfĂĽhrbaren Dateien des Typs '%1' am besten geeignete Debugger-Engine ist nicht verfĂĽgbar. +Es wird stattdesen der Debugger-Engine '%2' benutzt. +Details: %3 + + + The debugger engine '%1' preferred for debugging binaries of type %2 is disabled. + Der fĂĽr zum Debuggen von ausfĂĽhrbaren Dateien des Typs '%2' erforderliche Debugger-Engine %1 ist gegenwärtig deaktiviert. + This configuration requires the debugger engine %1, which is disabled. - Diese Konfiguration erfordert den Debugger-Engine '%1', der gegenwärtig deaktiviert ist. + Diese Konfiguration erfordert den Debugger-Engine '%1', der gegenwärtig deaktiviert ist. + + + The debugger engine '%1' preferred for debugging binaries of type %2 is not set up correctly: %3 + Der fĂĽr zum Debuggen von ausfĂĽhrbaren Dateien des Typs '%2' erforderliche Debugger-Engine %1 ist nicht richtig konfiguriert: %3 The debugger engine required for this configuration is not correctly configured. - Der fĂĽr diese Konfiguration erforderliche Debugger-Engine ist nicht richtig konfiguriert. + Der fĂĽr diese Konfiguration erforderliche Debugger-Engine ist nicht richtig konfiguriert. @@ -17589,7 +17641,11 @@ wenn es auĂźerhalb von git bash aufgerufen wird. Help::Internal::RemoteHelpFilter Online Documentation - Online-Dokumentation + Online-Dokumentation + + + Web Search + Web-Suche @@ -17795,9 +17851,13 @@ wenn es auĂźerhalb von git bash aufgerufen wird. A versioned backup of the .user settings file will be used, because the non-versioned file was created by an incompatible newer version of Qt Creator. Project settings changes made since the last time this version of Qt Creator was used with this project are ignored, and changes made now will <b>not</b> be propagated to the newer version. - Es wird eine versionierte Sicherungskopie der .user-Datei benutzt, da die aktuelle Datei von einer neuen, inkompatiblen Version von Qt Creator erzeugt wurde. + Es wird eine versionierte Sicherungskopie der .user-Datei benutzt, da die aktuelle Datei von einer neuen, inkompatiblen Version von Qt Creator erzeugt wurde. Ă„nderungen der Projekteinstellungen, die nach der letzten Benutzung dieser Version von Qt Creator fĂĽr dieses Projekt vorgenommen wurden, werden nicht berĂĽcksichtigt, und die jetzt folgenden Ă„nderungen werden <b>nicht</b> auf die neue Version ĂĽbertragen. + + <html><head/><body><p>A versioned backup of the .user settings file will be used, because the non-versioned file was created by an incompatible newer version of Qt Creator.</p><p>Project settings changes made since the last time this version of Qt Creator was used with this project are ignored, and changes made now will <b>not</b> be propagated to the newer version.</p></body></html> + <html><head/><body><p>Es wird eine versionierte Sicherungskopie der .user-Datei benutzt, da die aktuelle Datei von einer neuen, inkompatiblen Version von Qt Creator erzeugt wurde.</p><p>Ă„nderungen der Projekteinstellungen, die nach der letzten Benutzung dieser Version von Qt Creator fĂĽr dieses Projekt vorgenommen wurden, werden nicht berĂĽcksichtigt, und die jetzt folgenden Ă„nderungen werden <b>nicht</b> auf die neue Version ĂĽbertragen.</p></body></html> + Project Settings File from a different Environment? Projektdatei aus anderer Umgebung? @@ -18541,6 +18601,10 @@ Fehlerausgabe: %1 CODA CODA + + <a href="qthelp://com.nokia.qtcreator/doc/creator-developing-symbian.html">What are the prerequisites?</a> + <a href="qthelp://com.nokia.qtcreator/doc/creator-developing-symbian.html">Was sind die Voraussetzungen?</a> + Installation file: Installationspaket: @@ -18557,6 +18621,14 @@ Fehlerausgabe: %1 Device Agent Hilfsprogramm auf dem Mobilgerät + + Connecting + Verbinde + + + Unable to create CODA connection. Please try again. + Es konnte keine Vebindung zu CODA hergestellt werden. Bitte versuchen Sie es erneut. + Currently there is no information about the device for this connection type. FĂĽr diesen Verbindungstyp sind gegenwärtig keine Informationen ĂĽber das Gerät verfĂĽgbar. @@ -18659,7 +18731,7 @@ Fehlerausgabe: %1 Connecting... - Verbinde... + Verbinde... @@ -18731,6 +18803,10 @@ Bitte prĂĽfen Sie, ob das Gerät verbunden ist und die Anwendung 'TRK' Could not open local file %1: %2 Die lokale Datei %1 konnte nicht geöffnet werden: %2 + + Installation failed: %1; see %2 for descriptions of the error codes + Die Installation schlug fehl: %1; siehe %2 fĂĽr eine Beschreibung der Fehlercodes + Failed to close the remote file: %1 Die entfernte Datei konnte nicht geschlossen werden: %1 @@ -18785,7 +18861,7 @@ Bitte prĂĽfen Sie, ob das Gerät verbunden ist und die Anwendung 'TRK' Installation failed: %1 - Die Installation schlug fehl: %1 + Die Installation schlug fehl: %1 Installation @@ -19411,6 +19487,22 @@ Sie können diese Anwendung sowohl auf Desktop- als auch auf mobilen Plattformen catch catch + + fork + fork + + + exec + exec + + + vfork + vfork + + + syscall + syscall + Address (Watchpoint) Adresse (Watchpoint) @@ -19787,7 +19879,7 @@ Fehler: %2 The project files listed below do not contain Maemo deployment information, which means the respective targets cannot be deployed to and/or run on a device. Qt Creator will add the missing information to these files if you check the respective rows below. - Die unten aufgefĂĽhrten Projektdateien enthalten nicht die erforderliche Maemo-Deployment-Information, das heiĂźt, fĂĽr die betreffenden Ziele kann kein Deployment durchgefĂĽhrt werden und/oder sie können nicht auf einem Mobilgerät ausgefĂĽhrt werden. Qt Creator kann die fehlende Information zu den Dateien hinzufĂĽgen, die in der untenstehenden Liste markiert sind. + Die unten aufgefĂĽhrten Projektdateien enthalten nicht die erforderliche Maemo-Deployment-Information, das heiĂźt, fĂĽr die betreffenden Ziele kann kein Deployment durchgefĂĽhrt werden und/oder sie können nicht auf einem Mobilgerät ausgefĂĽhrt werden. Bitte wählen Sie die Projekte aus, in denen Qt Creator die fehlenden Informationen hinzufĂĽgen soll. &Check all @@ -20960,14 +21052,20 @@ Hinweis: Unter Umständen wird die lokale Datei gelöscht. 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. + + Connecting to CODA server adapter failed: + + Die Verbindung zum CODA-Server-Adapter schlug fehl: + + The reported code segment address (0x%1) might be invalid. Symbol resolution or setting breakoints may not work. - Die erhaltene Startadresse des Codesegments (%0x1) ist eventuell ungĂĽltig. Bei Auflösen von Symbolen oder beim Setzen von Haltpunkten könnten Probleme auftreten. + Die erhaltene Startadresse des Codesegments (%0x1) ist eventuell ungĂĽltig. Bei Auflösen von Symbolen oder beim Setzen von Haltpunkten könnten Probleme auftreten. Connecting to TRK server adapter failed: - Die Verbindung zum TRK-Server-Adapter schlug fehl: + Die Verbindung zum TRK-Server-Adapter schlug fehl: @@ -22271,6 +22369,10 @@ Möchten Sie sie zum Projekt hinzufĂĽgen? Connecting to '%1'... Verbinde zu '%1'... + + Unable to create CODA connection. Please try again. + Es konnte keine Vebindung zu CODA hergestellt werden. Bitte versuchen Sie es erneut. + Could not open serial device: %1 Die serielle Schnittstelle konnte nicht geöffnet werden: %1 @@ -23186,6 +23288,10 @@ Die Einstellung gestattet es, unter diesem Umständen fortzusetzen Modifies current document Ă„ndert aktuelles Dokument + + Add Tool + Werkzeug hinzufĂĽgen + Add Category Kategorie hinzufĂĽgen @@ -23306,6 +23412,10 @@ Die Einstellung gestattet es, unter diesem Umständen fortzusetzen Reset All Alle rĂĽcksetzen + + Registered MIME Types + Registrierte MIME-Typen + Core::VariableChooser @@ -23317,6 +23427,10 @@ Die Einstellung gestattet es, unter diesem Umständen fortzusetzen Select a variable to insert. Wählen Sie eine Variable aus, die eingefĂĽgt werden soll. + + Insert variable + Variablen einfĂĽgen + ToolChainOptionsPage @@ -23927,7 +24041,15 @@ Bestimmt das Verhalten bezĂĽglich der EinrĂĽckung von Fortsetzungszeilen. Core::Internal::ExternalToolModel External Tools Menu - MenĂĽ fĂĽr externe Werkzeuge + MenĂĽ fĂĽr externe Werkzeuge + + + Uncategorized + keine + + + Tools that will appear directly under the External Tools menu. + Werkzeuge, die direkt unter dem MenĂĽ Externe Werkzeuge erscheinen. New category @@ -24083,9 +24205,13 @@ Bestimmt das Verhalten bezĂĽglich der EinrĂĽckung von Fortsetzungszeilen. &Compiler path: &Compiler-Pfad: + + &ABI: + &ABI: + &Force 32bit compilation: - 32bit-Kompilierung: + 32bit-Kompilierung: @@ -24408,11 +24534,21 @@ Fehler: %2 Choose a build configuration - Build-Konfiguration wählen + Build-Konfiguration wählen Only Qt versions above 4.6.3 are made available in this wizard. This is because previous Qt Versions have limitations in building suitable sis files. + Dieser Wizard zeigt nur Qt-Versionen nach Version 4.6.3 an, da in den vorangegangenen Versionen +Einschränkungen bezĂĽglich der Erstellung von SIS-Dateien bestehen. + + + Choose a build configuration: + Build-Konfiguration wählen: + + + Only Qt versions above 4.6.3 are made available in this wizard. +Previous Qt versions have limitations in building suitable SIS files. Dieser Wizard zeigt nur Qt-Versionen nach Version 4.6.3 an, da in den vorangegangenen Versionen Einschränkungen bezĂĽglich der Erstellung von SIS-Dateien bestehen. @@ -24432,11 +24568,11 @@ Einschränkungen bezĂĽglich der Erstellung von SIS-Dateien bestehen. Global Vendor Name - Eindeutiger Anbietername + Eindeutiger Anbietername Qt Version used in builds - Bei Erstellung verwendete Qt-Version + Bei Erstellung verwendete Qt-Version Current Qt Version @@ -24444,7 +24580,7 @@ Einschränkungen bezĂĽglich der Erstellung von SIS-Dateien bestehen. App UID - UID der Anwendung + UID der Anwendung Current UID3 @@ -24452,7 +24588,7 @@ Einschränkungen bezĂĽglich der Erstellung von SIS-Dateien bestehen. Capabilities - Berechtigungen: + Berechtigungen: Current set of capabilities @@ -24466,6 +24602,26 @@ Einschränkungen bezĂĽglich der Erstellung von SIS-Dateien bestehen.Localised Vendor Names Lokalisierte Anbieternamen + + Global vendor name: + Eindeutiger Anbietername: + + + Qt version used in builds: + Bei Erstellung verwendete Qt-Version: + + + Application UID: + UID der Anwendung: + + + Capabilities: + Berechtigungen: + + + Localised vendor names: + Lokalisierte Anbieternamen: + Utils::AbstractProcess @@ -24516,30 +24672,66 @@ Einschränkungen bezĂĽglich der Erstellung von SIS-Dateien bestehen.Qt4ProjectManager::Internal::S60PublishingSisSettingsPageOvi %1 is a default vendor name used for testing and development. <br>The Vendor_Name field cannot be, or contain, the name 'Nokia' in it. <br>It is recommended to also not use the default name of 'Vendor'/'Vendor-EN', or to leave the entry blank. <br>see <a href="http://www.forum.nokia.com/Distribute/Packaging_and_signing.xhtml">Packaging and Signing</a> for guidelines.<br> - %1 ist ein zum Testen und zur Entwicklung vorgegebener Anbietername. <br>Das Feld Vendor_Name darf nicht aus dem Namen 'Nokia' bestehen oder diesen enthalten. <br>Es davon abgeraten, den Vorgabenamen 'Vendor'/'Vendor-EN' zu verwenden oder das Feld leerzulassen. <br>siehe <a href="http://www.forum.nokia.com/Distribute/Packaging_and_signing.xhtml">Paketierungs- und Signierungsrichtlinien</a>.<br> + %1 ist ein zum Testen und zur Entwicklung vorgegebener Anbietername. <br>Das Feld Vendor_Name darf nicht aus dem Namen 'Nokia' bestehen oder diesen enthalten. <br>Es davon abgeraten, den Vorgabenamen 'Vendor'/'Vendor-EN' zu verwenden oder das Feld leerzulassen. <br>siehe <a href="http://www.forum.nokia.com/Distribute/Packaging_and_signing.xhtml">Paketierungs- und Signierungsrichtlinien</a>.<br> %1 are default vendor names used for testing and development. <br>The Vendor_Name field cannot be, or contain, the name 'Nokia' in it. <br>It is recommended to also not use the default name of 'Vendor'/'Vendor-EN', or to leave the entry blank. <br>see <a href="http://www.forum.nokia.com/Distribute/Packaging_and_signing.xhtml">Packaging and Signing</a> for guidelines.<br> - %1 sind zum Testen und zur Entwicklung vorgegebene Anbieternamen. <br>Das Feld Vendor_Name darf nicht aus dem Namen 'Nokia' bestehen oder diesen enthalten. <br>Es davon abgeraten, den Vorgabenamen 'Vendor'/'Vendor-EN' zu verwenden oder das Feld leerzulassen. <br>siehe <a href="http://www.forum.nokia.com/Distribute/Packaging_and_signing.xhtml">Paketierungs- und Signierungsrichtlinien</a>.<br> + %1 sind zum Testen und zur Entwicklung vorgegebene Anbieternamen. <br>Das Feld Vendor_Name darf nicht aus dem Namen 'Nokia' bestehen oder diesen enthalten. <br>Es davon abgeraten, den Vorgabenamen 'Vendor'/'Vendor-EN' zu verwenden oder das Feld leerzulassen. <br>siehe <a href="http://www.forum.nokia.com/Distribute/Packaging_and_signing.xhtml">Paketierungs- und Signierungsrichtlinien</a>.<br> The App UID %1 is only for testing and development.<br>SIS packages built with it, cannot be distributed via the OVI Store.<br> - Die Anwendungs-UID %1 kann nur zum Testen und zur Entwicklung verwendet werden.<br>Damit erstellte SIS-Pakete können nicht ĂĽber den Ovi Store verbreitet werden.<br> + Die Anwendungs-UID %1 kann nur zum Testen und zur Entwicklung verwendet werden.<br>Damit erstellte SIS-Pakete können nicht ĂĽber den Ovi Store verbreitet werden.<br> The App UID %1 is a symbiansigned.com UID. <br>Apps with this UID will be rejected by Ovi Sign.<br>If you want to continue with this UID, sign your app on symbiansigned.com and upload the signed app to Ovi.<br> - Die Anwendungs-UID %1 wurde von symbiansigned.com vergeben.<br>Anwendungen mit dieser UID werden von Ovi Sign nicht akzeptiert.<br>Wenn Sie diese UID weiter verwenden möchten, signieren Sie bitte Ihre Anwendungauf symbiansigned.com und laden Sie die signierte Anwendung zu Ovi hoch.<br> + Die Anwendungs-UID %1 wurde von symbiansigned.com vergeben.<br>Anwendungen mit dieser UID werden von Ovi Sign nicht akzeptiert.<br>Wenn Sie diese UID weiter verwenden möchten, signieren Sie bitte Ihre Anwendungauf symbiansigned.com und laden Sie die signierte Anwendung zu Ovi hoch.<br> The App UID %1 is not an acceptable UID.<br> SIS packages built with it, cannot be signed by Ovi.<br> - Die Anwendungs-UID %1 ist ungĂĽltig.<br>Damit erstellte SIS-Pakete können nicht von Ovi signiert werden.<br> + Die Anwendungs-UID %1 ist ungĂĽltig.<br>Damit erstellte SIS-Pakete können nicht von Ovi signiert werden.<br> The App UID is a global unique indentifier of the SIS package.<br> - Die Anwendungs-UID ist ein global eindeutiger Bezeichner eines SIS-Paketes.<br> + Die Anwendungs-UID ist ein global eindeutiger Bezeichner eines SIS-Paketes.<br> To get a unique App UID for your package file,<br>please register at <a href="http://info.publish.ovi.com/">publish.ovi.com</a> + Um eine eindeutige Anwendungs-UID fĂĽr Ihre Paketdatei zu erhalten,<br>registrieren Sie sich bitte bei <a href="http://info.publish.ovi.com/">publish.ovi.com</a> + + + %1 is a default vendor name used for testing and development. <br>The Vendor_Name field cannot contain the name 'Nokia'. <br>You are advised against using the default names 'Vendor' and 'Vendor-EN'. <br>You should also not leave the entry blank. <br>see <a href="http://www.forum.nokia.com/Distribute/Packaging_and_signing.xhtml">Packaging and Signing</a> for guidelines.<br> + %1 ist ein zum Testen und zur Entwicklung vorgegebener Anbietername. <br>Das Feld Vendor_Name darf den Namen 'Nokia' nicht enthalten.<br>Es davon abgeraten, die Vorgabenamen 'Vendor' oder 'Vendor-EN' zu verwenden.<br>Das Feld sollte auch nicht leer sein.<br>siehe <a href="http://www.forum.nokia.com/Distribute/Packaging_and_signing.xhtml">Paketierungs- und Signierungsrichtlinien</a>.<br> + + + %1 is a default vendor name used for testing and development. + %1 ist ein zum Testen und zur Entwicklung vorgegebener Anbietername. + + + %1 are default vendor names used for testing and development. + %1 sind zum Testen und zur Entwicklung vorgegebene Anbieternamen. + + + %1 <br>The Vendor_Name field cannot contain the name 'Nokia'. <br>You are advised against using the default names 'Vendor' and 'Vendor-EN'. <br>You should also not leave the entry blank. <br>See <a href="http://www.forum.nokia.com/Distribute/Packaging_and_signing.xhtml">Packaging and Signing</a> for guidelines.<br> + %1 <br>Das Feld Vendor_Name darf den Namen 'Nokia' nicht enthalten.<br>Es davon abgeraten, die Vorgabenamen 'Vendor' oder 'Vendor-EN' zu verwenden.<br>Das Feld sollte auch nicht leer sein.<br>siehe <a href="http://www.forum.nokia.com/Distribute/Packaging_and_signing.xhtml">Paketierungs- und Signierungsrichtlinien</a>.<br> + + + The application UID %1 is only for testing and development.<br>SIS packages built with it cannot be distributed via the Ovi Store.<br> + Die Anwendungs-UID %1 kann nur zum Testen und zur Entwicklung verwendet werden.<br>Damit erstellte SIS-Pakete können nicht ĂĽber den Ovi Store verbreitet werden.<br> + + + The application UID %1 is a symbiansigned.com UID. <br>Applications with this UID will be rejected by Application Signing Services for Ovi Store.<br>If you want to continue with a symbiansigned.com UID, sign your application on symbiansigned.com and upload the signed application to Publish to Ovi.<br> + Die Anwendungs-UID %1 stammt von symbiansigned.com.<br>Anwendungen mit dieser UID werden von den Application Signing Services von Ovi Store zurĂĽckgewiesen.<br>Wenn Sie eine von symbiansigned.com stammende UID verwenden möchten, lassen Sie bitte Ihre Anwendung von symbiansigned.com signieren und laden die signierte Anwendung zu Publish to Ovi hoch.<br> + + + The application UID %1 is not an acceptable UID.<br>SIS packages built with it cannot be signed by Application Signing Services for Ovi Store.<br> + Die Anwendungs-UID %1 ist ungĂĽltig.<br>Damit erstellte SIS-Paketdateien können von den Application Signing Services des Ovi Store nicht signiert werden.<br> + + + The application UID is a global unique indentifier of the SIS package.<br> + Die Anwendungs-UID ist ein global eindeutiger Bezeichner eines SIS-Paketes.<br> + + + To get a unique application UID for your package file,<br>please register at <a href="http://info.publish.ovi.com/">publish.ovi.com</a> Um eine eindeutige Anwendungs-UID fĂĽr Ihre Paketdatei zu erhalten,<br>registrieren Sie sich bitte bei <a href="http://info.publish.ovi.com/">publish.ovi.com</a> @@ -24563,7 +24755,7 @@ Einschränkungen bezĂĽglich der Erstellung von SIS-Dateien bestehen.Qt4ProjectManager::Internal::S60PublishingWizardFactoryOvi Publish for Qt Symbian Application on Ovi Store - Veröffentlichen als Qt Symbian-Anwendung im Ovi-Store + Veröffentlichen als Qt Symbian-Anwendung im Ovi-Store This wizard will check your resulting sis file and some of your meta data to make sure it complies with Ovi Store submission regulations. @@ -24576,7 +24768,7 @@ You cannot use it for the Certified Signed and Manufacturer level capabilities: i.e. NetworkControl, MultimediaDD, CommDD, DiskAdmin, AllFiles, DRM and TCB Your application will also be rejected by Ovi QA if it uses an unreleased Qt Version. - Dieser Wizard prĂĽft Ihr SIS-Paketdatei und deren Metadaten um sicherzustellen, dass sie den Bestimmungen von Ovi Store entsprechen. + Dieser Wizard prĂĽft Ihr SIS-Paketdatei und deren Metadaten um sicherzustellen, dass sie den Bestimmungen von Ovi Store entsprechen. Dieser Wizard erstellt SIS-Paketdateien, die zur Veröffentlichung auf Ovi eingereicht werden können. @@ -24585,6 +24777,32 @@ Er kann nicht im Zusammenhang mit UID3s von Symbian Signed verwendet werden. Zertifikatssignierte oder Herstellerberechtigungen werden ebenfalls nicht unterstĂĽtzt, zum Beispiel: NetworkControl, MultimediaDD, CommDD, DiskAdmin, AllFiles, DRM und TCB +AuĂźerdem wird die Anwendung bei Verwendung einer nicht freigegebenen Qt-Version zurĂĽckgewiesen. + + + Publish Qt Symbian Applications to Ovi Store + Veröffentlichen als Qt Symbian-Anwendung im Ovi-Store + + + This wizard checks your project file to make sure it complies with Ovi Store submission criteria. + +The wizard creates SIS files that can be submitted to Publish to Ovi. + +You cannot use it if you use application UIDs from Symbian Signed. + +You cannot use it for the Certified Signed and Manufacturer level capabilities: +NetworkControl, MultimediaDD, CommDD, DiskAdmin, AllFiles, DRM and TCB. + +Your application will also be rejected by Ovi QA if you choose an unreleased Qt version on the next page. + Dieser Wizard prĂĽft Ihre Projektdatei um sicherzustellen, dass sie den Bestimmungen von Ovi Store entspricht. + +Dieser Wizard erstellt SIS-Paketdateien, die zur Veröffentlichung auf Ovi eingereicht werden können. + +Er kann nicht im Zusammenhang mit UIDs von Symbian Signed verwendet werden. + +Er kann ebenfalls nicht fĂĽr zertifikatssignierte oder Herstellerberechtigungen verwendet werden: +NetworkControl, MultimediaDD, CommDD, DiskAdmin, AllFiles, DRM und TCB + AuĂźerdem wird die Anwendung bei Verwendung einer nicht freigegebenen Qt-Version zurĂĽckgewiesen. @@ -24598,13 +24816,21 @@ AuĂźerdem wird die Anwendung bei Verwendung einer nicht freigegebenen Qt-Version Build Configuration Build-Konfiguration + + Project File Checks + An Projektdatei vorgenommene ĂśberprĂĽfungen + + + Creating an Uploadable SIS File + Erzeuge hochladbare SIS-Datei + .Pro File Checks - ĂśberprĂĽfung der .Pro-Dateien + ĂśberprĂĽfung der .Pro-Dateien Creating Uploadable Sis File - Erzeuge hochladbare SIS-Datei + Erzeuge hochladbare SIS-Datei @@ -24644,4 +24870,636 @@ AuĂźerdem wird die Anwendung bei Verwendung einer nicht freigegebenen Qt-Version MIME-Typen + + MemcheckConfigWidget + + Memory Analysis Options + Einstellungen zur Speicheranalyse + + + Backtrace frame count: + Stack-Frames: + + + Suppressions: + AusschlĂĽsse: + + + Add + HinzufĂĽgen + + + Remove + Löschen + + + Track origins of uninitialized memory + Herkunft von nicht initialisiertem Speicher verfolgen + + + + SuppressionDialog + + Dialog + Dialog + + + Suppression File: + Ausschluss-Datei: + + + Suppression: + AusschlĂĽsse: + + + + ValgrindConfigWidget + + Common Valgrind Options + Allgemeine Valgrind-Optionen + + + Valgrind executable: + AusfĂĽhrbare Datei von Valgrind: + + + + AnchorButtons + + Set top anchor + Oberen Anker setzen + + + Setting anchors in states is not supported. + Anker koennen nicht innerhalb von States gesetzt werden. + + + Set bottom anchor + Unteren Anker setzen + + + Set left anchor + Linken Anker setzen + + + Set right anchor + Rechten Anker setzen + + + Fill to parent + Ăśbergeordnetes Element ausfĂĽllen + + + Set vertical anchor + Vertikalen Anker setzen + + + Set horizontal anchor + Horizontalen Anker setzen + + + + ColorGroupBox + + Color editor + Farb-Editor + + + + ColorTypeButtons + + Solid color + FĂĽllfarbe + + + Gradient + Gradient + + + Transparent + Transparent + + + + Valgrind::XmlProtocol::ErrorListModel + + What + Was + + + Location + Ort + + + File + Datei + + + Line + Zeile + + + Unique + Eindeutig + + + Thread ID + Thread-ID + + + Kind + Art + + + Leaked Blocks + Nicht freigegebene Blöcke + + + Leaked Bytes + Nicht freigegebene Bytes + + + Helgrind Thread ID + Helgrind Thread-ID + + + + Valgrind::XmlProtocol + + Function: + Funktion: + + + Location: + Ort: + + + Instruction pointer: + Instruktionszeiger: + + + Object: + Objekt: + + + + Valgrind::XmlProtocol::Parser + + Could not parse hex number from "%1" (%2) + "%1" (%2) ist keine gĂĽltige Hexadezimalzahl + + + trying to read element text although current position is not start of element + es wurde versucht, Elementtext auszulesen, obwohl nicht auf Startelement positioniert + + + Unexpected child element while reading element text + Unerwartetes Unterelement angetroffen beim Lesen von Elementtext + + + Unexpected token type %1 + Unerwartetes Token %1 + + + Could not parse protocol version from "%1" + Die Protokollversion konnte nicht aus "%1" bestimmt werden + + + XmlProtocol version %1 not supported (supported version: 4) + Die Protokollversion %1 wird nicht unterstĂĽtzt (UnterstĂĽtzte Version: 4) + + + Valgrind tool "%1" not supported + Das Valgrind-Werkzeug"%1" ist nicht unterstĂĽtzt + + + Unknown memcheck error kind "%1" + Unbekannte memcheck-Fehlerkategorie "%1" + + + Unknown helgrind error kind "%1" + Unbekannte helgrind-Fehlerkategorie "%1" + + + Unknown ptrcheck error kind "%1" + Unbekannte ptrcheck-Fehlerkategorie "%1" + + + Could not parse error kind, tool not yet set. + Die Fehlerkategorie konnte nicht bestimmt werden, da kein Werkzeug aktiv ist. + + + Unknown state "%1" + Unbekannter Zustand "%1" + + + Unexpected exception caught during parsing. + Beim Parsen ist eine unerwartete Ausnahme aufgetreten. + + + + Valgrind::XmlProtocol::StackModel + + Description + Beschreibung + + + Instruction Pointer + Instruktionszeiger + + + Object + Objekt + + + Function + Funktion + + + Directory + Ordner + + + File + Datei + + + Line + Zeile + + + + Analyzer + + Analyzer + Analyse + + + + Analyzer::Internal::AnalyzerMode + + Analyze + Analyse + + + + Analyzer::AnalyzerManager + + Start &Analyzer + Analyse &starten + + + Start + Starten + + + Stop + Anhalten + + + Debug + Debug + + + Release + Release + + + Run %1 in %2 Mode? + Soll %1 im Modus %2 ausgefĂĽhrt werden? + + + <html><head/><body><p>You are trying to run the tool '%1' on an application in %2 mode. The tool is designed to be used in %3 mode.</p><p>Do you want to continue and run it in %2 mode?</p></body></html> + <html><head/><body><p>Sie versuchen, das Werkzeug '%1' mit einer Anwendung im Modus %2 zu betreiben. Das Werkzeug ist zur Verwendung im Modus %3 vorgesehen.</p><p>Möchten Sie trotzdem fortsetzen und es im Modus %2 laufen lassen?</p></body></html> + + + Run %1 in %2 mode? + Soll %1 im Modus %2 ausgefĂĽhrt werden? + + + &Do not ask again + &Nicht noch einmal nachfragen + + + + Analyzer::Internal::AnalyzerPlugin + + Analyzer + Category under which Analyzer tasks are listed in build issues view + Analyse + + + + Analyzer::Internal::AnalyzerRunConfigWidget + + Analyzer Settings + Analyse-Einstellungen + + + Available settings: %1 + VerfĂĽgbare Einstellungen: %1 + + + + Analyzer::Internal::AnalyzerRunControlFactory + + Analyzer + Analysewerkzeug + + + + Analyzer::Internal::AnalyzerRunControl + + Build Issues + Build-Probleme + + + + Analyzer::AnalyzerProjectSettings + + Analyzer Settings + Analyse-Einstellungen + + + + Analyzer::IAnalyzerTool + + Debug + Debug + + + Release + Release + + + + Debugger::Internal::DebuggerSourcePathMappingWidget + + <new source> + <neue Quelle> + + + <new target> + <neues Ziel> + + + Source path + Quellpfad + + + Target path + Zielpfad + + + Add + HinzufĂĽgen + + + Add Qt sources... + Qt-Quellen hinzufĂĽgen... + + + Remove + Löschen + + + Source Paths Mapping + Quellpfad-Zuordnung + + + <html><head/><body><p>Mappings of source file folders to be used in the debugger can be entered here.</p><p>This is useful when using a copy of the source tree at a location different from the one at which the modules where built, for example, while doing remote debugging.</body></html> + <html><head/><body><p>Hier können Zuordnungen fĂĽr die beim Debuggen benutzten Quelldateien festgelegt werden.</p><p>Das ist nĂĽtzlich, wenn eine lokale Kopie des Quelldateibaums verwendet wird, der sich von der beim Erstellen der Module verwendeten unterscheidet, zum Beispiel beim Remote-Debuggen.</body></html> + + + Add a mapping for Qt's source folders when using an unpatched version of Qt. + FĂĽgt eine Umsetzung fĂĽr die Qt-Quellen hinzu, fĂĽr den Fall, das eine nicht gepatchte Version von Qt benutzt wird. + + + The source path contained in the executable's debug information as reported by the debugger + Der in der ausfĂĽhrbaren Datei enthaltene Quellpfad, der vom Debugger verwendet wird + + + &Source path: + &Quellpfad: + + + The actual location of the source tree on the local machine + Ordner, der die Quelldateien auf dem lokalen Rechner enthält + + + &Target path: + &Zielpfad: + + + Qt Sources + Qt-Quellen + + + + Analyzer::Internal::MemcheckConfigWidget + + Valgrind Suppression File (*.supp);;All Files (*) + Valgrind Ausschlussdatei (*.supp);;Alle Dateien (*) + + + + Analyzer::Internal::MemcheckEngine + + Analyzing Memory + Analysiere Speicher + + + Analyzing memory of %1 + Analysiere Speicher von %1 + + + + Analyzer::Internal + + %1 in %2 + %1 in %2 + + + in %1 + in %1 + + + + Analyzer::Internal::MemcheckErrorView + + Copy Selection + Auswahl kopieren + + + Suppress Error + Fehler unterdrĂĽcken + + + + Analyzer::Internal::AbstractMemcheckSettings + + Memory Analysis + Speicheranalyse + + + + Analyzer::Internal::MemcheckTool + + Analyze Memory + Speicheranalyse + + + Clear + Löschen + + + Previous Item + Vorangehender Eintrag + + + Next Item + Nächster Eintrag + + + Error Filter + Fehlerfilter + + + Definite Memory Leaks + Definitive Speicherlecks + + + Possible Memory Leaks + Potentielle Speicherlecks + + + Use of Uninitialized Memory + Benutzung von nicht initialisiertem Speicher + + + Invalid Frees + UngĂĽltige Verwendung von free + + + External Errors + Externe Fehler + + + Show issues originating outside currently opened projects. + Zeigt Fehler an, deren Ursache auĂźerhalb der aktuellen Projekte liegt. + + + Suppressions + AusschlĂĽsse + + + These suppression files where used in the last memory analyzer run. + Die Ausschlussdateien wurden beim letzten Lauf der Speicheranalyse verwendet. + + + Internal Error + Interner Fehler + + + Error occurred parsing valgrind output: %1 + Fehler beim Auswerten der valgrind-Ausgabe: %1 + + + + Analyzer::Internal::SuppressionDialog + + Select Suppression File + Ausschluss-Datei wählen + + + Save Suppression + AusschlĂĽsse speichern + + + + ProjectExplorer::ToolChain + + Clone of %1 + Kopie von %1 + + + + Analyzer::Internal::ValgrindConfigWidget + + Valgrind Command + Valgrind-Kommando + + + + Analyzer::Internal::ValgrindEngine + + Valgrind options: %1 + Allgemeine Valgrind-Optionen: %1 + + + Working directory: %1 + Arbeitsverzeichnis: %1 + + + Command-line arguments: %1 + Kommandozeilenargumente: %1 + + + ** Analysing finished ** + ** Analyse beendet ** + + + ** Error: "%1" could not be started: %2 ** + ** Fehler: "%1" konnte nicht gestartet werden: %2 ** + + + ** Error: no valgrind executable set ** + ** Fehler: Es ist keine ausfĂĽhrbare Datei fĂĽr valgrind konfiguriert ** + + + ** Process Terminated ** + ** Prozess beendet ** + + + Application Output + Ausgabe der Anwendung + + + + Analyzer::Internal::ValgrindSettings + + Generic Settings + Allgemeine Einstellungen + + + + SymbianUtils::VirtualSerialDevice + + Port not found + Port nicht gefunden + + + Port in use + Der Port ist bereits in Verwendung + + + Timed out + Zeitlimit ĂĽberschritten + + + Port unreachable + Port nicht erreichbar + + + + Analyzer::Internal::AnalyzerOutputPane + + No current analysis tool + Kein aktives Analysewerkzeug + + + Analysis + Analyse + + diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp index c2e71f1e589..2e72046df8b 100644 --- a/src/plugins/analyzerbase/analyzermanager.cpp +++ b/src/plugins/analyzerbase/analyzermanager.cpp @@ -70,6 +70,7 @@ #include #include #include +#include #include #include @@ -90,6 +91,7 @@ #include #include #include +#include using namespace Core; using namespace Analyzer; @@ -464,38 +466,25 @@ void AnalyzerManager::AnalyzerManagerPrivate::startTool() const QString currentMode = buildType == ProjectExplorer::BuildConfiguration::Debug ? tr("Debug") : tr("Release"); QSettings *settings = Core::ICore::instance()->settings(); - const QString configKey = QString("%1/%2").arg(Constants::MODE_ANALYZE, "AnalyzeCorrectMode"); + const QString configKey = QLatin1String(Constants::MODE_ANALYZE) + QLatin1Char('/') + QLatin1String("AnalyzeCorrectMode"); int ret; if (settings->contains(configKey)) { ret = settings->value(configKey, QDialog::Accepted).toInt(); } else { - QDialog dialog; - dialog.setWindowTitle(tr("Run %1 in %2 mode?").arg(toolName).arg(currentMode)); - QGridLayout *layout = new QGridLayout; - QLabel *iconLabel = new QLabel; - iconLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - QIcon icon = dialog.style()->standardIcon(QStyle::SP_MessageBoxInformation); - dialog.setWindowIcon(icon); - iconLabel->setPixmap(icon.pixmap(QSize(icon.actualSize(QSize(64, 64))))); - layout->addWidget(iconLabel, 0, 0); - QLabel *textLabel = new QLabel; - textLabel->setWordWrap(true); - textLabel->setText(tr("You are trying to run %1 on an application in %2 mode. " - "%1 is designed to be used in %3 mode.\n\n" - "Do you want to continue and run %1 in %2 mode?").arg(toolName).arg(currentMode).arg(toolMode)); - layout->addWidget(textLabel, 0, 1); - QCheckBox *dontAskAgain = new QCheckBox; - dontAskAgain->setText(tr("&Do not ask again")); - layout->addWidget(dontAskAgain, 1, 0, 1, 2); - QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Yes | QDialogButtonBox::Cancel); - connect(buttons, SIGNAL(accepted()), - &dialog, SLOT(accept())); - connect(buttons, SIGNAL(rejected()), - &dialog, SLOT(reject())); - layout->addWidget(buttons, 2, 0, 1, 2); - dialog.setLayout(layout); - ret = dialog.exec(); - if (dontAskAgain->isChecked() && ret == QDialog::Accepted) + const QString title = tr("Run %1 in %2 Mode?").arg(toolName).arg(currentMode); + const QString message = tr("

You are trying to run the tool '%1' on an application in %2 mode. " + "The tool is designed to be used in %3 mode.

" + "Do you want to continue and run it in %2 mode?

"). + arg(toolName).arg(currentMode).arg(toolMode); + const QString checkBoxText = tr("&Do not ask again"); + bool checkBoxSetting = false; + const QDialogButtonBox::StandardButton button = + Utils::CheckableMessageBox::question(Core::ICore::instance()->mainWindow(), title, message, checkBoxText, + &checkBoxSetting, QDialogButtonBox::Yes|QDialogButtonBox::Cancel, + QDialogButtonBox::Cancel); + ret = button == QDialogButtonBox::Yes ? QDialog::Accepted : QDialog::Rejected; + + if (checkBoxSetting && ret == QDialog::Accepted) settings->setValue(configKey, ret); } if (ret == QDialog::Rejected) diff --git a/src/plugins/analyzerbase/analyzeroutputpane.cpp b/src/plugins/analyzerbase/analyzeroutputpane.cpp index cc384504b58..e1d8bb6b418 100644 --- a/src/plugins/analyzerbase/analyzeroutputpane.cpp +++ b/src/plugins/analyzerbase/analyzeroutputpane.cpp @@ -205,9 +205,11 @@ void AnalyzerOutputPane::createWidgets(QWidget *paneParent) m_paneWidget->setObjectName(objectName() + QLatin1String("Widget")); m_paneStackedLayout->addWidget(new QLabel(tr("No current analysis tool"))); - m_toolbarStackedWidget = new QStackedWidget; - m_toolBarSeparator = new Utils::StyledSeparator; + // Temporarily assign to (wrong) parent to suppress flicker in conjunction with QStackedWidget. + m_toolbarStackedWidget = new QStackedWidget(paneParent); m_toolbarStackedWidget->setObjectName(objectName() + QLatin1String("ToolBarStackedWidget")); + m_toolBarSeparator = new Utils::StyledSeparator(paneParent); + m_toolBarSeparator->setObjectName(objectName() + QLatin1String("ToolBarSeparator")); // Add adapters added before. const int adapterCount = m_adapters.size(); diff --git a/src/plugins/bineditor/bineditor.cpp b/src/plugins/bineditor/bineditor.cpp index 9c6e0ff387f..772fad0adb7 100644 --- a/src/plugins/bineditor/bineditor.cpp +++ b/src/plugins/bineditor/bineditor.cpp @@ -343,7 +343,7 @@ bool BinEditor::save(const QString &oldFileName, const QString &newFileName) if (oldFileName != newFileName) { QString tmpName; { - QTemporaryFile tmp; + QTemporaryFile tmp(newFileName + QLatin1String("_XXXXXX.new")); if (!tmp.open()) return false; tmpName = tmp.fileName(); diff --git a/src/plugins/coreplugin/navigationwidget.cpp b/src/plugins/coreplugin/navigationwidget.cpp index 41ec4edae0a..55d4dadaca3 100644 --- a/src/plugins/coreplugin/navigationwidget.cpp +++ b/src/plugins/coreplugin/navigationwidget.cpp @@ -79,8 +79,10 @@ NavigationWidgetPlaceHolder::NavigationWidgetPlaceHolder(Core::IMode *mode, QWid NavigationWidgetPlaceHolder::~NavigationWidgetPlaceHolder() { if (m_current == this) { - NavigationWidget::instance()->setParent(0); - NavigationWidget::instance()->hide(); + if (NavigationWidget *nw = NavigationWidget::instance()) { + nw->setParent(0); + nw->hide(); + } } } diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp index 0e2e00e4207..52be69d8c10 100644 --- a/src/plugins/cpptools/cppcodeformatter.cpp +++ b/src/plugins/cpptools/cppcodeformatter.cpp @@ -225,8 +225,9 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block) else // stream_op_cont already turnInto(stream_op_cont); break; + case T_RPAREN: case T_COMMA: - case T_SEMICOLON: leave(); continue; // always nested, propagate semicolon + case T_SEMICOLON: leave(); continue; // always nested, propagate } break; case member_init_open: diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index d0ea4ba83ab..fd71b5d3852 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -940,8 +940,15 @@ void CdbEngine::processFinished() notifyEngineShutdownOk(); } } else { - STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyEngineSpontaneousShutdown") - notifyEngineSpontaneousShutdown(); + // The QML/CPP engine relies on the standard sequence of InferiorShutDown,etc. + // Otherwise, we take a shortcut. + if (isSlaveEngine()) { + STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyInferiorExited") + notifyInferiorExited(); + } else { + STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyEngineSpontaneousShutdown") + notifyEngineSpontaneousShutdown(); + } } } diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.cpp b/src/plugins/debugger/cdb/cdbparsehelpers.cpp index 09b20f0b475..736ea512c9e 100644 --- a/src/plugins/debugger/cdb/cdbparsehelpers.cpp +++ b/src/plugins/debugger/cdb/cdbparsehelpers.cpp @@ -176,8 +176,10 @@ QByteArray cdbAddBreakpointCommand(const BreakpointParameters &bpIn, str << bp.module << '!'; str << cdbBreakPointFileName(bp, sourcePathMapping) << ':' << bp.lineNumber << '`'; break; - case Watchpoint: // Read/write 1 byte - str << "rw 1 " << hex << hexPrefixOn << bp.address << hexPrefixOff << dec; + case Watchpoint: { // Read/write, no space here + const unsigned size = bp.size ? bp.size : 1; + str << "r" << size << ' ' << hex << hexPrefixOn << bp.address << hexPrefixOff << dec; + } break; } if (bp.ignoreCount) diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro index 99c98c0d708..53a19616463 100644 --- a/src/plugins/debugger/debugger.pro +++ b/src/plugins/debugger/debugger.pro @@ -138,11 +138,7 @@ include(gdb/gdb.pri) include(script/script.pri) include(pdb/pdb.pri) include(lldb/lldbhost.pri) - -contains(QT_CONFIG, declarative) { - QT += declarative - include(qml/qml.pri) -} +include(qml/qml.pri) include(tcf/tcf.pri) include(shared/shared.pri) diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp index c37a756c991..e26828dd404 100644 --- a/src/plugins/debugger/debuggermainwindow.cpp +++ b/src/plugins/debugger/debuggermainwindow.cpp @@ -507,6 +507,7 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode) splitter->addWidget(mainWindowSplitter); splitter->setStretchFactor(0, 0); splitter->setStretchFactor(1, 1); + splitter->setObjectName(QLatin1String("DebugModeWidget")); return splitter; } diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index ce838312fc4..9d0f50a0f44 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1117,8 +1117,7 @@ DebuggerPluginPrivate::~DebuggerPluginPrivate() delete m_debuggerSettings; m_debuggerSettings = 0; - delete m_mainWindow; - m_mainWindow = 0; + // Mainwindow will be deleted by debug mode. delete m_snapshotHandler; m_snapshotHandler = 0; diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index e4d9faaf3f0..b7e4505a8b3 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -104,13 +104,14 @@ static const char *engineTypeName(DebuggerEngineType et) case Debugger::NoEngineType: break; case Debugger::GdbEngineType: - return "Gdb"; + return "Gdb engine"; case Debugger::ScriptEngineType: return "Script engine"; case Debugger::CdbEngineType: return "Cdb engine"; case Debugger::PdbEngineType: - return "Pdb engine"; case Debugger::TcfEngineType: + return "Pdb engine"; + case Debugger::TcfEngineType: return "Tcf engine"; case Debugger::QmlEngineType: return "QML engine"; @@ -129,7 +130,7 @@ static inline QString engineTypeNames(const QList &l) QString rc; foreach (DebuggerEngineType et, l) { if (!rc.isEmpty()) - rc.append(QLatin1Char(',')); + rc.append(QLatin1String(", ")); rc += QLatin1String(engineTypeName(et)); } return rc; @@ -495,6 +496,31 @@ QString ConfigurationCheck::errorDetailsString() const return errorDetails.join(QLatin1String("\n\n")); } +// Convenience helper to check whether an engine is enabled and configured +// correctly. +static inline bool canUseEngine(DebuggerEngineType et, + const DebuggerStartParameters &sp, + unsigned cmdLineEnabledEngines, + ConfigurationCheck *result) +{ + // Enabled? + if ((et & cmdLineEnabledEngines) == 0) { + result->errorDetails.push_back(DebuggerPlugin::tr("The debugger engine '%1' is disabled."). + arg(engineTypeName(et))); + return false; + } + // Configured. + switch (et) { + case Debugger::CdbEngineType: + return checkCdbConfiguration(sp, result); + case Debugger::GdbEngineType: + return checkGdbConfiguration(sp, result); + default: + break; + } + return true; +} + /*! \fn ConfigurationCheck checkDebugConfiguration(unsigned cmdLineEnabledEngines, const DebuggerStartParameters &sp) @@ -529,71 +555,56 @@ DEBUGGER_EXPORT ConfigurationCheck checkDebugConfiguration(const DebuggerStartPa qDebug() << " Required: " << engineTypeNames(requiredTypes); // Filter out disables types, command line + current settings. unsigned cmdLineEnabledEngines = debuggerCore()->enabledEngines(); -#ifdef CDB_ENABLED - if (!isCdbEngineEnabled() && !Cdb::isCdbEngineEnabled()) - cmdLineEnabledEngines &= ~CdbEngineType; -#endif #ifdef WITH_LLDB if (!Core::ICore::instance()->settings()->value(QLatin1String("LLDB/enabled")).toBool()) cmdLineEnabledEngines &= ~LldbEngineType; #else cmdLineEnabledEngines &= ~LldbEngineType; #endif - QList usableTypes; - foreach (DebuggerEngineType et, requiredTypes) - if (et & cmdLineEnabledEngines) { - usableTypes.push_back(et); + DebuggerEngineType usableType = NoEngineType; + QList unavailableTypes; + foreach (DebuggerEngineType et, requiredTypes) { + if (canUseEngine(et, sp, cmdLineEnabledEngines, &result)) { + usableType = et; + break; } else { - const QString msg = DebuggerPlugin::tr("The debugger engine '%1' preferred for " - "debugging binaries of type %2 is disabled."). - arg(engineTypeName(et), sp.toolChainAbi.toString()); - debuggerCore()->showMessage(msg, LogWarning); + unavailableTypes.push_back(et); + } + } + if (usableType == NoEngineType) { + if (requiredTypes.size() == 1) { + result.errorMessage = DebuggerPlugin::tr( + "The debugger engine '%1' required for debugging binaries of the type '%2'" + " is not configured correctly."). + arg(QLatin1String(engineTypeName(requiredTypes.front())), sp.toolChainAbi.toString()); + } else { + result.errorMessage = DebuggerPlugin::tr( + "None of the debugger engines '%1' capable of debugging binaries of the type '%2'" + " is configured correctly."). + arg(engineTypeNames(requiredTypes), sp.toolChainAbi.toString()); } - if (usableTypes.isEmpty()) { - result.errorMessage = DebuggerPlugin::tr("This configuration requires the debugger engine %1, which is disabled."). - arg(QLatin1String(engineTypeName(usableTypes.front()))); return result; } if (debug) - qDebug() << " Usable engines: " << engineTypeNames(usableTypes); - // Configuration check: Strip off non-configured engines, find first one to use. - while (!usableTypes.isEmpty()) { - bool configurationOk = true; - switch (usableTypes.front()) { - case Debugger::CdbEngineType: - configurationOk = checkCdbConfiguration(sp, &result); - break; - case Debugger::GdbEngineType: - configurationOk = checkGdbConfiguration(sp, &result); - break; - default: - break; - } - if (configurationOk) { - break; - } else { - const QString msg = DebuggerPlugin::tr("The debugger engine '%1' preferred " - "for debugging binaries of type %2 is not set up correctly: %3"). - arg(engineTypeName(usableTypes.front()), sp.toolChainAbi.toString(), - result.errorDetails.isEmpty() ? QString() : result.errorDetails.back()); - debuggerCore()->showMessage(msg, LogWarning); - usableTypes.pop_front(); - } - } - if (debug) - qDebug() << "Configured engines: " << engineTypeNames(usableTypes); - if (usableTypes.isEmpty()) { - result.errorMessage = DebuggerPlugin::tr("The debugger engine required for this configuration is not correctly configured."); - return result; + qDebug() << "Configured engine: " << engineTypeName(usableType); + // Inform verbosely about MinGW-gdb/CDB fallbacks. Do not complain about LLDB, for now. + if (!result.errorDetails.isEmpty() && unavailableTypes.count(LldbEngineType) != unavailableTypes.size()) { + const QString msg = DebuggerPlugin::tr( + "The preferred debugger engine for debugging binaries of type '%1' is not available.\n" + "The debugger engine '%2' will be used as a fallback.\nDetails: %3"). + arg(sp.toolChainAbi.toString(), engineTypeName(usableType), + result.errorDetails.join(QString(QLatin1Char('\n')))); + debuggerCore()->showMessage(msg, LogWarning); + showMessageBox(QMessageBox::Warning, "Warning", msg); } // Anything left: Happy. result.errorMessage.clear(); result.errorDetails.clear(); if (qmlLanguage && cppLanguage) { result.masterSlaveEngineTypes.first = QmlCppEngineType; - result.masterSlaveEngineTypes.second = usableTypes.front(); + result.masterSlaveEngineTypes.second = usableType; } else { - result.masterSlaveEngineTypes.first = usableTypes.front(); + result.masterSlaveEngineTypes.first = usableType; } if (debug) qDebug() << engineTypeName(result.masterSlaveEngineTypes.first) << engineTypeName(result.masterSlaveEngineTypes.second); diff --git a/src/plugins/debugger/gdb/codagdbadapter.cpp b/src/plugins/debugger/gdb/codagdbadapter.cpp index 5b0dbd4f151..be67ddb0b42 100644 --- a/src/plugins/debugger/gdb/codagdbadapter.cpp +++ b/src/plugins/debugger/gdb/codagdbadapter.cpp @@ -1033,8 +1033,8 @@ void CodaGdbAdapter::startAdapter() } else { m_codaDevice = SymbianUtils::SymbianDeviceManager::instance() ->getCodaDevice(parameters.remoteChannel); - bool ok = m_codaDevice && m_codaDevice->device()->isOpen(); + bool ok = !m_codaDevice.isNull() && m_codaDevice->device()->isOpen(); if (!ok) { QString msg = QString("Couldn't open serial device %1") .arg(parameters.remoteChannel); diff --git a/src/plugins/designer/designerconstants.h b/src/plugins/designer/designerconstants.h index a14c4ee4ab4..cdb9f8243f1 100644 --- a/src/plugins/designer/designerconstants.h +++ b/src/plugins/designer/designerconstants.h @@ -42,7 +42,6 @@ namespace Constants { const char * const INFO_READ_ONLY = "DesignerXmlEditor.ReadOnly"; const char * const K_DESIGNER_XML_EDITOR_ID = "FormEditor.DesignerXmlEditor"; const char * const C_DESIGNER_XML_EDITOR = "Designer Xml Editor"; -const char * const DESIGNER_XML_EDITOR_ID ="DesignerXmlEditor"; const char * const C_DESIGNER_XML_DISPLAY_NAME = QT_TRANSLATE_NOOP("Designer", "Form Editor"); const char * const SETTINGS_CATEGORY = "P.Designer"; diff --git a/src/plugins/designer/formeditorfactory.cpp b/src/plugins/designer/formeditorfactory.cpp index 5ff57e40c7c..8917c8fd811 100644 --- a/src/plugins/designer/formeditorfactory.cpp +++ b/src/plugins/designer/formeditorfactory.cpp @@ -65,7 +65,7 @@ FormEditorFactory::FormEditorFactory() QString FormEditorFactory::id() const { - return QLatin1String(DESIGNER_XML_EDITOR_ID); + return QLatin1String(K_DESIGNER_XML_EDITOR_ID); } QString FormEditorFactory::displayName() const diff --git a/src/plugins/designer/formeditorstack.cpp b/src/plugins/designer/formeditorstack.cpp index 98c44d03650..3df5e1f1901 100644 --- a/src/plugins/designer/formeditorstack.cpp +++ b/src/plugins/designer/formeditorstack.cpp @@ -186,8 +186,8 @@ void FormEditorStack::modeAboutToChange(Core::IMode *m) if (Designer::Constants::Internal::debug && m) qDebug() << "FormEditorStack::modeAboutToChange" << m->id(); - // Sync the editor when leaving design mode - if (m && m->id() == QLatin1String(Core::Constants::MODE_DESIGN)) + // Sync the editor when entering edit mode + if (m && m->id() == QLatin1String(Core::Constants::MODE_EDIT)) foreach(const EditorData &data, m_formEditors) data.formWindowEditor->syncXmlEditor(); } diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp index 841e5474860..36e2c599835 100644 --- a/src/plugins/genericprojectmanager/genericproject.cpp +++ b/src/plugins/genericprojectmanager/genericproject.cpp @@ -207,28 +207,23 @@ void GenericProject::refresh(RefreshOptions options) CPlusPlus::CppModelManagerInterface *modelManager = CPlusPlus::CppModelManagerInterface::instance(); - if (m_toolChain && modelManager) { - const QByteArray predefinedMacros = m_toolChain->predefinedMacros(); - + if (modelManager) { CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this); - pinfo.defines = predefinedMacros; - pinfo.defines += '\n'; - pinfo.defines += m_defines; - QStringList allIncludePaths; - QStringList allFrameworkPaths; + if (m_toolChain) { + pinfo.defines = m_toolChain->predefinedMacros(); + pinfo.defines += '\n'; - foreach (const HeaderPath &headerPath, m_toolChain->systemHeaderPaths()) { - if (headerPath.kind() == HeaderPath::FrameworkHeaderPath) - allFrameworkPaths.append(headerPath.path()); - else - allIncludePaths.append(headerPath.path()); + foreach (const HeaderPath &headerPath, m_toolChain->systemHeaderPaths()) { + if (headerPath.kind() == HeaderPath::FrameworkHeaderPath) + pinfo.frameworkPaths.append(headerPath.path()); + else + pinfo.includePaths.append(headerPath.path()); + } } - allIncludePaths += this->allIncludePaths(); - - pinfo.frameworkPaths = allFrameworkPaths; - pinfo.includePaths = allIncludePaths; + pinfo.includePaths += allIncludePaths(); + pinfo.defines += m_defines; // ### add _defines. pinfo.sourceFiles = files(); @@ -335,6 +330,8 @@ void GenericProject::setToolChain(ToolChain *tc) return; m_toolChain = tc; + refresh(Configuration); + emit toolChainChanged(m_toolChain); } @@ -426,13 +423,14 @@ bool GenericProject::fromMap(const QVariantMap &map) } QString id = map.value(QLatin1String(TOOLCHAIN_KEY)).toString(); + const ToolChainManager *toolChainManager = ToolChainManager::instance(); + if (!id.isNull()) { - setToolChain(ToolChainManager::instance()->findToolChain(id)); + setToolChain(toolChainManager->findToolChain(id)); } else { - QList tcs = - ToolChainManager::instance()->findToolChains(Abi::hostAbi()); + QList tcs = toolChainManager->findToolChains(Abi::hostAbi()); if (tcs.isEmpty()) - tcs = ToolChainManager::instance()->toolChains(); + tcs = toolChainManager->toolChains(); if (!tcs.isEmpty()) setToolChain(tcs.at(0)); } @@ -470,9 +468,9 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericTarget *target) connect(m_toolChainChooser, SIGNAL(activated(int)), this, SLOT(toolChainSelected(int))); connect(m_target->genericProject(), SIGNAL(toolChainChanged(ProjectExplorer::ToolChain*)), this, SLOT(toolChainChanged(ProjectExplorer::ToolChain*))); - connect(ProjectExplorer::ToolChainManager::instance(), SIGNAL(toolChainAdded(ToolChain*)), + connect(ProjectExplorer::ToolChainManager::instance(), SIGNAL(toolChainAdded(ProjectExplorer::ToolChain*)), this, SLOT(updateToolChainList())); - connect(ProjectExplorer::ToolChainManager::instance(), SIGNAL(toolChainRemoved(ToolChain*)), + connect(ProjectExplorer::ToolChainManager::instance(), SIGNAL(toolChainRemoved(ProjectExplorer::ToolChain*)), this, SLOT(updateToolChainList())); } diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp index fbd8044f496..6ce7227077c 100644 --- a/src/plugins/mercurial/mercurialplugin.cpp +++ b/src/plugins/mercurial/mercurialplugin.cpp @@ -604,12 +604,8 @@ void MercurialPlugin::showCommitWidget(const QList > &st return; } - CommitEditor *commitEditor = qobject_cast(editor); - - if (!commitEditor) { - outputWindow->appendError(tr("Unable to create a commit editor.")); - return; - } + QTC_ASSERT(qobject_cast(editor), return) + CommitEditor *commitEditor = static_cast(editor); const QString msg = tr("Commit changes for \"%1\"."). arg(QDir::toNativeSeparators(m_submitRepository)); diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp index 64a5c094cfd..5a1218d7159 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -208,7 +208,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString() << QString() << (QList() << Task(Task::Error, QLatin1String("#error Symbian error"), - QLatin1String("C:\\temp\\test\\untitled8\\main.cpp"), 7, + QLatin1String("C:/temp/test/untitled8/main.cpp"), 7, Constants::TASK_CATEGORY_COMPILE)) << QString(); // Symbian reports #warning(s) twice (using different syntax). @@ -218,7 +218,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString() << QString() << (QList() << Task(Task::Warning, QLatin1String("#warning Symbian warning"), - QLatin1String("C:\\temp\\test\\untitled8\\main.cpp"), 8, + QLatin1String("C:/temp/test/untitled8/main.cpp"), 8, Constants::TASK_CATEGORY_COMPILE)) << QString(); QTest::newRow("GCCE #warning2") @@ -243,7 +243,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() Constants::TASK_CATEGORY_COMPILE) << Task(Task::Error, QLatin1String("undefined reference to `MainWindow::doSomething()'"), - QLatin1String("C:\\temp\\test\\untitled8/main.cpp"), 8, + QLatin1String("C:/temp/test/untitled8/main.cpp"), 8, Constants::TASK_CATEGORY_COMPILE) << Task(Task::Error, QLatin1String("collect2: ld returned 1 exit status"), @@ -264,7 +264,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() Constants::TASK_CATEGORY_COMPILE) << Task(Task::Error, QLatin1String("undefined reference to `MainWindow::doSomething()'"), - QLatin1String("C:\\temp\\test\\untitled8/main.cpp"), -1, + QLatin1String("C:/temp/test/untitled8/main.cpp"), -1, Constants::TASK_CATEGORY_COMPILE) << Task(Task::Error, QLatin1String("collect2: ld returned 1 exit status"), @@ -279,7 +279,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << (QList() << Task(Task::Error, QLatin1String("file not recognized: File format not recognized"), - QLatin1String("c:\\Qt\\4.6\\lib/QtGuid4.dll"), -1, + QLatin1String("c:/Qt/4.6/lib/QtGuid4.dll"), -1, Constants::TASK_CATEGORY_COMPILE)) << QString(); QTest::newRow("Invalid rpath") @@ -511,11 +511,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() Constants::TASK_CATEGORY_COMPILE) << Task(Task::Error, QLatin1String("undefined reference to `vtable for QPlotAxis'"), - QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"), 26, + QLatin1String("M:/Development/x64/QtPlot/qplotaxis.cpp"), 26, Constants::TASK_CATEGORY_COMPILE) << Task(Task::Error, QLatin1String("undefined reference to `vtable for QPlotAxis'"), - QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"), 26, + QLatin1String("M:/Development/x64/QtPlot/qplotaxis.cpp"), 26, Constants::TASK_CATEGORY_COMPILE) << Task(Task::Error, QLatin1String("collect2: ld returned 1 exit status"), diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index d853595fbc8..073aa6e702b 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -528,6 +528,7 @@ QList Internal::GccToolChainFactory::autoDetectToolchains(const QSt tc->setCompilerPath(compilerPath); tc->setDebuggerCommand(debuggerPath); tc->setTargetAbi(abi); + tc->setDisplayName(tc->defaultDisplayName()); // reset displayname result.append(tc.take()); } diff --git a/src/plugins/projectexplorer/gnumakeparser.cpp b/src/plugins/projectexplorer/gnumakeparser.cpp index c6d660b6a35..7095595d3af 100644 --- a/src/plugins/projectexplorer/gnumakeparser.cpp +++ b/src/plugins/projectexplorer/gnumakeparser.cpp @@ -456,12 +456,7 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling() QFETCH(Task, outputTask); // setup files: - QString tempdir; -#if defined Q_OS_WIN - tempdir = QDir::fromNativeSeparators(qgetenv("TEMP")); -#else - tempdir = QLatin1String("/tmp"); -#endif + QString tempdir = QDir::tempPath(); tempdir.append(QChar('/')); tempdir.append(QUuid::createUuid().toString()); tempdir.append(QChar('/')); diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 99f4877eb31..df7fbc8098a 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -329,6 +329,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er this, SLOT(startupProjectChanged())); connect(d->m_session, SIGNAL(dependencyChanged(ProjectExplorer::Project*,ProjectExplorer::Project*)), this, SLOT(updateActions())); + connect(d->m_session, SIGNAL(sessionLoaded()), + this, SLOT(updateActions())); + connect(d->m_session, SIGNAL(sessionLoaded()), + this, SLOT(updateWelcomePage())); d->m_proWindow = new ProjectWindow; diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h index 4873b9689cb..11389dc6e8c 100644 --- a/src/plugins/projectexplorer/projectexplorer.h +++ b/src/plugins/projectexplorer/projectexplorer.h @@ -215,6 +215,7 @@ private slots: void updateVariable(const QString &variable); void publishProject(); + void updateWelcomePage(); #ifdef WITH_TESTS void testGccOutputParsers_data(); @@ -252,7 +253,6 @@ private: IRunControlFactory *findRunControlFactory(RunConfiguration *config, const QString &mode); void addToRecentProjects(const QString &fileName, const QString &displayName); - void updateWelcomePage(); static ProjectExplorerPlugin *m_instance; ProjectExplorerPluginPrivate *d; diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 993142fdb49..306e933cf37 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -627,9 +627,6 @@ bool SessionManager::loadImpl(const QString &fileName) if (debug) qDebug() << "SessionManager - restoring session returned " << success; - if (success) - emit sessionLoaded(); - return success; } @@ -1031,6 +1028,7 @@ bool SessionManager::loadSession(const QString &session) if (QFileInfo(fileName).exists()) { if (loadImpl(fileName)) { updateName(session); + emit sessionLoaded(); return true; } } else { @@ -1038,6 +1036,7 @@ bool SessionManager::loadSession(const QString &session) if (!createImpl(sessionNameToFileName(session))) return false; updateName(session); + emit sessionLoaded(); return true; } return false; diff --git a/src/plugins/projectexplorer/userfileaccessor.cpp b/src/plugins/projectexplorer/userfileaccessor.cpp index adbcfaf9b03..e0fb1248e72 100644 --- a/src/plugins/projectexplorer/userfileaccessor.cpp +++ b/src/plugins/projectexplorer/userfileaccessor.cpp @@ -462,12 +462,12 @@ QVariantMap UserFileAccessor::restoreSettings(Project *project) QApplication::translate("ProjectExplorer::UserFileAccessor", "Using Old Project Settings File"), QApplication::translate("ProjectExplorer::UserFileAccessor", - "A versioned backup of the .user settings file will be used, " + "

A versioned backup of the .user settings file will be used, " "because the non-versioned file was created by an incompatible " - "newer version of Qt Creator.\n" + "newer version of Qt Creator.

" "Project settings changes made since the last time this version " "of Qt Creator was used with this project are ignored, and changes " - "made now will not be propagated to the newer version."), + "made now will not be propagated to the newer version.

"), QMessageBox::Ok); project->setProperty(USERFILE_PROP, fileName); skipBackup = true; diff --git a/src/plugins/qmldesigner/designercore/include/metainfo.h b/src/plugins/qmldesigner/designercore/include/metainfo.h index 47f5d0ec68c..20deed31da4 100644 --- a/src/plugins/qmldesigner/designercore/include/metainfo.h +++ b/src/plugins/qmldesigner/designercore/include/metainfo.h @@ -67,7 +67,7 @@ class CORESHARED_EXPORT MetaInfo friend class QmlDesigner::Internal::ModelPrivate; friend class QmlDesigner::Internal::MetaInfoParser; friend class QmlDesigner::Internal::SubComponentManagerPrivate; - friend bool QmlDesigner::operator==(const MetaInfo &, const MetaInfo &); + friend bool operator==(const MetaInfo &, const MetaInfo &); public: MetaInfo(const MetaInfo &metaInfo); diff --git a/src/plugins/qmldesigner/designercore/model/viewlogger.cpp b/src/plugins/qmldesigner/designercore/model/viewlogger.cpp index 30f3028a574..49dad5655d0 100644 --- a/src/plugins/qmldesigner/designercore/model/viewlogger.cpp +++ b/src/plugins/qmldesigner/designercore/model/viewlogger.cpp @@ -68,12 +68,7 @@ QString ViewLogger::time() const ViewLogger::ViewLogger(QObject *parent) : AbstractView(parent) { -#ifdef Q_OS_MAC - const QString tempPath = "/tmp"; -#else - const QString tempPath = QDir::tempPath(); -#endif - const QString path = tempPath + QString("/qmldesigner-logger-%1-XXXXXX.txt"). + const QString path = QDir::tempPath() + QString("/qmldesigner-logger-%1-XXXXXX.txt"). arg(QDateTime::currentDateTime().toString(Qt::ISODate). replace(':', '-')); QTemporaryFile *temporaryFile = new QTemporaryFile(path, this); diff --git a/src/plugins/qt4projectmanager/debugginghelper.ui b/src/plugins/qt4projectmanager/debugginghelper.ui index 5239efba832..d890e3e0a6b 100644 --- a/src/plugins/qt4projectmanager/debugginghelper.ui +++ b/src/plugins/qt4projectmanager/debugginghelper.ui @@ -2,42 +2,20 @@ Qt4ProjectManager::Internal::DebuggingHelper + + + 0 + 0 + 321 + 150 + + 0 - - - - Helps showing content of Qt types. Only used in older versions of gdb. - - - Gdb Helper: - - - - - - - TextLabel - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -98,13 +76,6 @@ - - - - Build - - - @@ -153,6 +124,43 @@ + + + + Helps showing content of Qt types. Only used in older versions of gdb. + + + Gdb Helper: + + + + + + + TextLabel + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Build + + + diff --git a/src/plugins/qt4projectmanager/debugginghelperbuildtask.cpp b/src/plugins/qt4projectmanager/debugginghelperbuildtask.cpp index 727abce72b6..40c6f6e0c33 100644 --- a/src/plugins/qt4projectmanager/debugginghelperbuildtask.cpp +++ b/src/plugins/qt4projectmanager/debugginghelperbuildtask.cpp @@ -39,6 +39,8 @@ #include #include #include +#include +#include #include @@ -47,7 +49,8 @@ using namespace Qt4ProjectManager::Internal; using ProjectExplorer::DebuggingHelperLibrary; -DebuggingHelperBuildTask::DebuggingHelperBuildTask(const QtVersion *version, Tools tools) +DebuggingHelperBuildTask::DebuggingHelperBuildTask(const QtVersion *version, Tools tools) : + m_tools(tools & availableTools(version)) { if (!version || !version->isValid()) return; @@ -90,37 +93,34 @@ DebuggingHelperBuildTask::DebuggingHelperBuildTask(const QtVersion *version, Too m_qmakeCommand = version->qmakeCommand(); m_makeCommand = tc->makeCommand(); m_mkspec = version->mkspec(); - - m_tools = tools; - - // Check the build requirements of the tools - - if (m_tools & QmlDump) { - if (!QmlDumpTool::canBuild(version)) { - m_tools ^= QmlDump; - } - } - - if (m_tools & QmlObserver) { - if (!QmlObserverTool::canBuild(version)) { - m_tools ^= QmlObserver; - } else { - m_tools |= QmlDebugging; - } - } - - if (m_tools & QmlDebugging) { - if (!QmlDebuggingLibrary::canBuild(version)) { - m_tools ^= QmlDebugging; - m_tools &= ~QmlObserver; // remove observer if set - } - } } DebuggingHelperBuildTask::~DebuggingHelperBuildTask() { } +DebuggingHelperBuildTask::Tools DebuggingHelperBuildTask::availableTools(const QtVersion *version) +{ + QTC_ASSERT(version, return 0; ) + // Check the build requirements of the tools + DebuggingHelperBuildTask::Tools tools = 0; + // Gdb helpers are needed on Mac/gdb only. + foreach (const ProjectExplorer::Abi &abi, version->qtAbis()) { + if (abi.os() == ProjectExplorer::Abi::MacOS) { + tools |= DebuggingHelperBuildTask::GdbDebugging; + break; + } + } + if (QmlDumpTool::canBuild(version)) + tools |= QmlDump; + if (QmlDebuggingLibrary::canBuild(version)) { + tools |= QmlDebugging; + if (QmlObserverTool::canBuild(version)) + tools |= QmlObserver; // requires QML debugging. + } + return tools; +} + void DebuggingHelperBuildTask::run(QFutureInterface &future) { future.setProgressRange(0, 5); @@ -185,8 +185,8 @@ bool DebuggingHelperBuildTask::buildDebuggingHelper(QFutureInterface &futu return false; QStringList qmakeArgs; - qmakeArgs << QLatin1String("INCLUDEPATH+=") + qmlDebuggingDirectory + "/include"; - qmakeArgs << QLatin1String("LIBS+=-L") + qmlDebuggingDirectory; + qmakeArgs << QLatin1String("INCLUDEPATH+=\"\\\"") + qmlDebuggingDirectory + "include\\\"\""; + qmakeArgs << QLatin1String("LIBS+=-L\"\\\"") + qmlDebuggingDirectory + QLatin1String("\\\"\""); if (!QmlObserverTool::build(qmlObserverDirectory, m_makeCommand, m_qmakeCommand, m_mkspec, m_environment, m_target, qmakeArgs, output, &m_errorMessage)) diff --git a/src/plugins/qt4projectmanager/debugginghelperbuildtask.h b/src/plugins/qt4projectmanager/debugginghelperbuildtask.h index 45094b0c364..20d24fe3e29 100644 --- a/src/plugins/qt4projectmanager/debugginghelperbuildtask.h +++ b/src/plugins/qt4projectmanager/debugginghelperbuildtask.h @@ -62,13 +62,15 @@ public: void run(QFutureInterface &future); + static Tools availableTools(const QtVersion *version); + signals: void finished(int qtVersionId, DebuggingHelperBuildTask::Tools tools, const QString &output); private: bool buildDebuggingHelper(QFutureInterface &future, QString *output); - Tools m_tools; + const Tools m_tools; int m_qtId; QString m_qtInstallData; diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp index 0d938dabba4..4a34ace6f42 100644 --- a/src/plugins/qt4projectmanager/makestep.cpp +++ b/src/plugins/qt4projectmanager/makestep.cpp @@ -103,6 +103,11 @@ void MakeStep::setClean(bool clean) m_clean = clean; } +bool MakeStep::isClean() const +{ + return m_clean; +} + QVariantMap MakeStep::toMap() const { QVariantMap map(ProjectExplorer::AbstractProcessStep::toMap()); @@ -163,7 +168,7 @@ bool MakeStep::init() Utils::QtcProcess::addArgs(&args, m_userArgs); - if (!m_clean) { + if (!isClean()) { if (!bc->defaultMakeTarget().isEmpty()) Utils::QtcProcess::addArg(&args, bc->defaultMakeTarget()); } @@ -172,7 +177,6 @@ bool MakeStep::init() // FIXME doing this without the user having a way to override this is rather bad // so we only do it for unix and if the user didn't override the make command // but for now this is the least invasive change - if (toolchain && toolchain->targetAbi().binaryFormat() != ProjectExplorer::Abi::PEFormat && m_makeCmd.isEmpty()) @@ -295,12 +299,17 @@ void MakeStepConfigWidget::updateDetails() emit updateSummary(); return; } + + QString args = m_makeStep->userArguments(); + if (!m_makeStep->isClean()) { + if (!bc->defaultMakeTarget().isEmpty()) + Utils::QtcProcess::addArg(&args, bc->defaultMakeTarget()); + } // -w option enables "Enter"/"Leaving directory" messages, which we need for detecting the // absolute file path // FIXME doing this without the user having a way to override this is rather bad // so we only do it for unix and if the user didn't override the make command // but for now this is the least invasive change - QString args = m_makeStep->userArguments(); ProjectExplorer::ToolChain *toolChain = bc->toolChain(); if (toolChain && toolChain->targetAbi().binaryFormat() != ProjectExplorer::Abi::PEFormat diff --git a/src/plugins/qt4projectmanager/makestep.h b/src/plugins/qt4projectmanager/makestep.h index 6cbb6e791c8..ce67269e239 100644 --- a/src/plugins/qt4projectmanager/makestep.h +++ b/src/plugins/qt4projectmanager/makestep.h @@ -99,6 +99,7 @@ public: QString userArguments(); void setUserArguments(const QString &arguments); void setClean(bool clean); + bool isClean() const; QVariantMap toMap() const; diff --git a/src/plugins/qt4projectmanager/qmldumptool.cpp b/src/plugins/qt4projectmanager/qmldumptool.cpp index 85f6ac33e81..7d83cb26b9b 100644 --- a/src/plugins/qt4projectmanager/qmldumptool.cpp +++ b/src/plugins/qt4projectmanager/qmldumptool.cpp @@ -71,7 +71,7 @@ public: : m_buildTask(new DebuggingHelperBuildTask(version, DebuggingHelperBuildTask::QmlDump)) , m_failed(false) { - qmlDumpBuilds()->insert(m_version.uniqueId(), this); + qmlDumpBuilds()->insert(version->uniqueId(), this); connect(m_buildTask, SIGNAL(finished(int,DebuggingHelperBuildTask::Tools,QString)), this, SLOT(finish(int,DebuggingHelperBuildTask::Tools,QString)), @@ -156,7 +156,6 @@ private: QList m_projectsToUpdate; Internal::DebuggingHelperBuildTask *m_buildTask; // deletes itself after run() - QtVersion m_version; bool m_failed; }; } // end of anonymous namespace diff --git a/src/plugins/qt4projectmanager/qmlobservertool.cpp b/src/plugins/qt4projectmanager/qmlobservertool.cpp index 45e51b0c59b..24a5ed99b08 100644 --- a/src/plugins/qt4projectmanager/qmlobservertool.cpp +++ b/src/plugins/qt4projectmanager/qmlobservertool.cpp @@ -59,7 +59,7 @@ bool QmlObserverTool::canBuild(const QtVersion *qtVersion) { return (qtVersion->supportsTargetId(Constants::DESKTOP_TARGET_ID) || qtVersion->supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID)) - && (qtVersion->qtVersion() > QtVersionNumber(4, 7, 1)); + && (qtVersion->qtVersion() >= QtVersionNumber(4, 7, 1)); } QString QmlObserverTool::toolForProject(ProjectExplorer::Project *project) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.ui b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.ui index 55333eb8b56..09ca4e36f9b 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.ui +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.ui @@ -322,7 +322,7 @@ - + @@ -518,8 +518,8 @@ userNameEditingFinished() - 536 - 286 + 540 + 317 422 @@ -534,8 +534,8 @@ passwordEditingFinished() - 412 - 314 + 424 + 349 423 @@ -559,22 +559,6 @@ - - removeConfigButton - clicked() - MaemoDeviceConfigurationsSettingsWidget - deleteConfig() - - - 697 - 66 - - - 513 - 101 - - - passwordButton toggled(bool) @@ -598,8 +582,8 @@ keyFileEditingFinished() - 434 - 346 + 344 + 383 257 @@ -614,8 +598,8 @@ keyFileEditingFinished() - 434 - 346 + 344 + 383 257 @@ -647,7 +631,7 @@ 697 - 165 + 163 510 @@ -662,8 +646,8 @@ authenticationTypeChanged() - 280 - 147 + 279 + 156 525 @@ -695,7 +679,7 @@ 697 - 132 + 131 358 @@ -710,8 +694,8 @@ timeoutEditingFinished() - 217 - 257 + 222 + 285 6 @@ -726,8 +710,8 @@ timeoutEditingFinished() - 217 - 257 + 222 + 285 0 @@ -774,8 +758,8 @@ showPassword(bool) - 535 - 313 + 539 + 347 3 @@ -807,7 +791,7 @@ 697 - 198 + 195 598 diff --git a/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp b/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp index c5f4bb7f71a..cc8af55573d 100644 --- a/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp @@ -118,9 +118,11 @@ bool CodaRunControl::setupLauncher() // We get the port from SymbianDeviceManager appendMessage(tr("Connecting to '%1'...").arg(m_serialPort), NormalMessageFormat); m_codaDevice = SymbianUtils::SymbianDeviceManager::instance()->getCodaDevice(m_serialPort); - - bool ok = m_codaDevice && m_codaDevice->device()->isOpen(); - if (!ok) { + if (m_codaDevice.isNull()) { + appendMessage(tr("Unable to create CODA connection. Please try again."), ErrorMessageFormat); + return false; + } + if (!m_codaDevice->device()->isOpen()) { appendMessage(tr("Could not open serial device: %1").arg(m_codaDevice->device()->errorString()), ErrorMessageFormat); return false; } diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp index 3b52bf6e088..e854368c29d 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp @@ -148,12 +148,20 @@ bool S60DeployConfiguration::isStaticLibrary(const Qt4ProFileNode &projectNode) return false; } +bool S60DeployConfiguration::hasSisPackage(const Qt4ProFileNode &projectNode) const +{ + if (projectNode.projectType() != ApplicationTemplate + && projectNode.projectType() != LibraryTemplate) + return false; + return !isStaticLibrary(projectNode); +} + QStringList S60DeployConfiguration::signedPackages() const { QList list = qt4Target()->qt4Project()->allProFiles(); QStringList result; foreach (Qt4ProFileNode *node, list) { - if (isStaticLibrary(*node)) //no sis package + if (!hasSisPackage(*node)) continue; TargetInformation ti = node->targetInformation(); if (ti.valid) @@ -176,7 +184,7 @@ QStringList S60DeployConfiguration::packageFileNamesWithTargetInfo() const QList leafs = qt4Target()->qt4Project()->allProFiles(); QStringList result; foreach (Qt4ProFileNode *qt4ProFileNode, leafs) { - if (isStaticLibrary(*qt4ProFileNode)) //no sis package + if (!hasSisPackage(*qt4ProFileNode)) continue; TargetInformation ti = qt4ProFileNode->targetInformation(); if (!ti.valid) @@ -195,7 +203,7 @@ QStringList S60DeployConfiguration::packageTemplateFileNames() const QList list = qt4Target()->qt4Project()->allProFiles(); QStringList result; foreach (Qt4ProFileNode *node, list) { - if (isStaticLibrary(*node)) //no sis package + if (!hasSisPackage(*node)) continue; TargetInformation ti = node->targetInformation(); if (ti.valid) @@ -209,7 +217,7 @@ QStringList S60DeployConfiguration::appPackageTemplateFileNames() const QList list = qt4Target()->qt4Project()->allProFiles(); QStringList result; foreach (Qt4ProFileNode *node, list) { - if (isStaticLibrary(*node)) //no sis package + if (!hasSisPackage(*node)) continue; TargetInformation ti = node->targetInformation(); if (ti.valid) diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h index 639e4bc4357..f5d8efd1fed 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h @@ -131,6 +131,7 @@ private: QString createPackageName(const QString &baseName) const; bool isDebug() const; bool isStaticLibrary(const Qt4ProFileNode &projectNode) const; + bool hasSisPackage(const Qt4ProFileNode &projectNode) const; private: ProjectExplorer::BuildConfiguration *m_activeBuildConfiguration; diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp index d92988de51a..9e054399afe 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp @@ -301,6 +301,9 @@ QWidget *S60DeployConfigurationWidget::createCommunicationChannel() communicationChannelGridLayout->addLayout(wlanChannelLayout, 1, 1); communicationChannelGroupBox->setLayout(communicationChannelGridLayout); + + updateCommunicationChannelUi(); + return communicationChannelGroupBox; } @@ -410,6 +413,33 @@ void S60DeployConfigurationWidget::setSerialPort(int index) clearDeviceInfo(); } +void S60DeployConfigurationWidget::updateCommunicationChannelUi() +{ + S60DeployConfiguration::CommunicationChannel channel = m_deployConfiguration->communicationChannel(); + if (channel == S60DeployConfiguration::CommunicationTrkSerialConnection) { + m_trkRadioButton->setChecked(true); + m_codaRadioButton->setChecked(false); + m_serialRadioButton->setChecked(true); + m_wlanRadioButton->setDisabled(true); + m_ipAddress->setDisabled(true); + m_serialPortsCombo->setDisabled(false); + updateSerialDevices(); + } else { + m_trkRadioButton->setChecked(false); + m_codaRadioButton->setChecked(true); + m_wlanRadioButton->setDisabled(false); + if (channel == S60DeployConfiguration::CommunicationCodaTcpConnection) { + m_ipAddress->setDisabled(false); + m_serialPortsCombo->setDisabled(true); + m_deviceInfoButton->setEnabled(true); + } else { + m_ipAddress->setDisabled(true); + m_serialPortsCombo->setDisabled(false); + updateSerialDevices(); + } + } +} + void S60DeployConfigurationWidget::updateCommunicationChannel() { if (!m_trkRadioButton->isChecked() && !m_codaRadioButton->isChecked()) @@ -552,6 +582,10 @@ void S60DeployConfigurationWidget::updateDeviceInfo() } else if (m_deployConfiguration->communicationChannel() == S60DeployConfiguration::CommunicationCodaSerialConnection) { const SymbianUtils::SymbianDevice commDev = currentDevice(); m_codaInfoDevice = SymbianUtils::SymbianDeviceManager::instance()->getCodaDevice(commDev.portName()); + if (m_codaInfoDevice.isNull()) { + setDeviceInfoLabel(tr("Unable to create CODA connection. Please try again."), true); + return; + } if (!m_codaInfoDevice->device()->isOpen()) { setDeviceInfoLabel(m_codaInfoDevice->device()->errorString(), true); return; diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.h b/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.h index d80479db6e2..7424eb469c1 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.h @@ -100,6 +100,7 @@ private slots: void slotWaitingForTrkClosed(); void silentInstallChanged(int); void updateCommunicationChannel(); + void updateCommunicationChannelUi(); void updateWlanAddress(const QString &address); void cleanWlanAddress(); void codaEvent(const Coda::CodaEvent &event); diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp index 6bf39e65b04..68a1cb689ec 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp @@ -384,7 +384,7 @@ void S60DeployStep::startDeployment() } } else if (m_channel == S60DeployConfiguration::CommunicationCodaSerialConnection) { appendMessage(tr("Deploying application to '%1'...").arg(m_serialPortFriendlyName), false); - m_codaDevice = SymbianUtils::SymbianDeviceManager::instance()->getCodaDevice(m_serialPortName); + m_codaDevice = SymbianUtils::SymbianDeviceManager::instance()->getCodaDevice(m_serialPortName); bool ok = m_codaDevice && m_codaDevice->device()->isOpen(); if (!ok) { QString deviceError = tr("No such port"); @@ -570,7 +570,10 @@ void S60DeployStep::handleSymbianInstall(const Coda::CodaCommandResult &result) else initFileInstallation(); } else { - reportError(tr("Installation failed: %1").arg(result.errorString())); + reportError(tr("Installation failed: %1; " + "see %2 for descriptions of the error codes") + .arg(result.errorString(), + QLatin1String("http://wiki.forum.nokia.com/index.php/Symbian_OS_Error_Codes"))); } } diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp index 2d711822247..d31aa3b26c6 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp @@ -295,12 +295,7 @@ QString S60DeviceRunConfiguration::localExecutableFileName() const if (!ti.valid) return QString(); - const ProjectExplorer::Abi hostAbi = ProjectExplorer::Abi::hostAbi(); - if (hostAbi.os() == ProjectExplorer::Abi::LinuxOS) { - return executableFromPackageUnix(ti.buildDir + QLatin1Char('/') + ti.target + QLatin1String("_template.pkg")); - } - - ProjectExplorer::ToolChain *tc = qt4Target()->activeBuildConfiguration()->toolChain(); + ProjectExplorer::ToolChain *tc = target()->activeBuildConfiguration()->toolChain(); return localExecutableFromVersion(qtVersion(), symbianTarget(), targetName(), tc); } diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index 763e2bed09c..709767aebbd 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -877,7 +877,7 @@ void Qt4Project::addDefaultBuild() void Qt4Project::proFileParseError(const QString &errorMessage) { - Core::ICore::instance()->messageManager()->printToOutputPane(errorMessage); + Core::ICore::instance()->messageManager()->printToOutputPanePopup(errorMessage); } ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4ProFileNode, Qt4BuildConfiguration *bc) diff --git a/src/plugins/qt4projectmanager/qtoptionspage.cpp b/src/plugins/qt4projectmanager/qtoptionspage.cpp index 6ad45d75f3f..8ecb72d3c45 100644 --- a/src/plugins/qt4projectmanager/qtoptionspage.cpp +++ b/src/plugins/qt4projectmanager/qtoptionspage.cpp @@ -39,10 +39,6 @@ #include "qt4projectmanagerconstants.h" #include "qt4target.h" #include "qtversionmanager.h" -#include "qmldumptool.h" -#include "qmlobservertool.h" -#include "qmldebugginglibrary.h" -#include "debugginghelperbuildtask.h" #include #include @@ -439,20 +435,22 @@ void QtOptionsPageWidget::removeQtDir() void QtOptionsPageWidget::updateDebuggingHelperUi() { - QtVersion *version = currentVersion(); + const QtVersion *version = currentVersion(); const QTreeWidgetItem *currentItem = m_ui->qtdirList->currentItem(); if (!version || !version->supportsBinaryDebuggingHelper()) { m_ui->debuggingHelperWidget->setVisible(false); } else { - bool canBuildQmlDumper = QmlDumpTool::canBuild(version); - bool canBuildQmlDebuggingLib = QmlDebuggingLibrary::canBuild(version); - bool canBuildQmlObserver = QmlObserverTool::canBuild(version); + const DebuggingHelperBuildTask::Tools availableTools = DebuggingHelperBuildTask::availableTools(version); + const bool canBuildGdbHelper = availableTools & DebuggingHelperBuildTask::GdbDebugging; + const bool canBuildQmlDumper = availableTools & DebuggingHelperBuildTask::QmlDump; + const bool canBuildQmlDebuggingLib = availableTools & DebuggingHelperBuildTask::QmlDebugging; + const bool canBuildQmlObserver = availableTools & DebuggingHelperBuildTask::QmlObserver; - bool hasGdbHelper = !version->gdbDebuggingHelperLibrary().isEmpty(); - bool hasQmlDumper = version->hasQmlDump(); - bool hasQmlDebuggingLib = version->hasQmlDebuggingLibrary(); - bool hasQmlObserver = !version->qmlObserverTool().isEmpty(); + const bool hasGdbHelper = !version->gdbDebuggingHelperLibrary().isEmpty(); + const bool hasQmlDumper = version->hasQmlDump(); + const bool hasQmlDebuggingLib = version->hasQmlDebuggingLibrary(); + const bool hasQmlObserver = !version->qmlObserverTool().isEmpty(); bool isBuildingGdbHelper = false; bool isBuildingQmlDumper = false; @@ -495,11 +493,15 @@ void QtOptionsPageWidget::updateDebuggingHelperUi() gdbHelperText = QDir::toNativeSeparators(version->gdbDebuggingHelperLibrary()); gdbHelperTextFlags = Qt::TextSelectableByMouse; } else { - gdbHelperText = tr("Not yet built."); + if (canBuildGdbHelper) { + gdbHelperText = tr("Not yet built."); + } else { + gdbHelperText = tr("Not needed."); + } } m_debuggingHelperUi->gdbHelperStatus->setText(gdbHelperText); m_debuggingHelperUi->gdbHelperStatus->setTextInteractionFlags(gdbHelperTextFlags); - m_debuggingHelperUi->gdbHelperBuildButton->setEnabled(!isBuildingGdbHelper); + m_debuggingHelperUi->gdbHelperBuildButton->setEnabled(canBuildGdbHelper && !isBuildingGdbHelper); QString qmlDumpStatusText; Qt::TextInteractionFlags qmlDumpStatusTextFlags = Qt::NoTextInteraction; @@ -535,7 +537,7 @@ void QtOptionsPageWidget::updateDebuggingHelperUi() if (qmlDebuggingLibStatusText != debugPath) { if (!qmlDebuggingLibStatusText.isEmpty() && !debugPath.isEmpty()) { - qmlDebuggingLibStatusText += QLatin1String("\n"); + qmlDebuggingLibStatusText += QLatin1Char('\n'); } qmlDebuggingLibStatusText += debugPath; } diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 6be3306c0d0..a478ec94ea2 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -177,31 +177,38 @@ QtVersionManager::QtVersionManager() // Update from 2.1 or earlier: QString mingwDir = s->value(QLatin1String("MingwDirectory")).toString(); if (!mingwDir.isEmpty()) { - ProjectExplorer::MingwToolChain *tc = createToolChain(ProjectExplorer::Constants::MINGW_TOOLCHAIN_ID); - if (tc) { - tc->setCompilerPath(QDir::fromNativeSeparators(mingwDir) + QLatin1String("/bin/gcc.exe")); - tc->setDisplayName(tr("MinGW from %1").arg(version->displayName())); - ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc); + QFileInfo fi(mingwDir + QLatin1String("/bin/g++.exe")); + if (fi.exists() && fi.isExecutable()) { + ProjectExplorer::MingwToolChain *tc = createToolChain(ProjectExplorer::Constants::MINGW_TOOLCHAIN_ID); + if (tc) { + tc->setCompilerPath(fi.absoluteFilePath()); + tc->setDisplayName(tr("MinGW from %1").arg(version->displayName())); + ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc); + } } } QString mwcDir = s->value(QLatin1String("MwcDirectory")).toString(); if (!mwcDir.isEmpty()) { - WinscwToolChain *tc = createToolChain(Constants::WINSCW_TOOLCHAIN_ID); - if (tc) { - tc->setCompilerPath(QDir::fromNativeSeparators(mwcDir) - + QLatin1String("/x86Build/Symbian_Tools/Command_Line_Tools/mwwinrc.exe")); - tc->setDisplayName(tr("WINSCW from %1").arg(version->displayName())); - ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc); + QFileInfo fi(mwcDir + QLatin1String("/x86Build/Symbian_Tools/Command_Line_Tools/mwwinrc.exe")); + if (fi.exists() && fi.isExecutable()) { + WinscwToolChain *tc = createToolChain(Constants::WINSCW_TOOLCHAIN_ID); + if (tc) { + tc->setCompilerPath(fi.absoluteFilePath()); + tc->setDisplayName(tr("WINSCW from %1").arg(version->displayName())); + ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc); + } } } QString gcceDir = s->value(QLatin1String("GcceDirectory")).toString(); if (!gcceDir.isEmpty()) { - GcceToolChain *tc = createToolChain(Constants::GCCE_TOOLCHAIN_ID); - if (tc) { - tc->setCompilerPath(QDir::fromNativeSeparators(gcceDir) - + QLatin1String("/bin/arm-none-symbianelf-g++.exe")); - tc->setDisplayName(tr("GCCE from %1").arg(version->displayName())); - ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc); + QFileInfo fi(gcceDir + QLatin1String("/bin/arm-none-symbianelf-g++.exe")); + if (fi.exists() && fi.isExecutable()) { + GcceToolChain *tc = createToolChain(Constants::GCCE_TOOLCHAIN_ID); + if (tc) { + tc->setCompilerPath(fi.absoluteFilePath()); + tc->setDisplayName(tr("GCCE from %1").arg(version->displayName())); + ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc); + } } } @@ -369,6 +376,11 @@ void QtVersionManager::writeVersionsIntoSettings() s->setValue("autodetectionSource", version->autodetectionSource()); s->setValue("S60SDKDirectory", version->systemRoot()); s->setValue(QLatin1String("SBSv2Directory"), version->sbsV2Directory()); + // Remove obsolete settings: New toolchains would be created at each startup + // otherwise, overriding manually set ones. + s->remove(QLatin1String("MingwDirectory")); + s->remove(QLatin1String("MwcDirectory")); + s->remove(QLatin1String("GcceDirectory")); ++it; } s->endArray(); diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri index 09a0eee70ec..01a7c63b6b5 100644 --- a/src/qtcreatorplugin.pri +++ b/src/qtcreatorplugin.pri @@ -60,6 +60,7 @@ macx { contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols CONFIG += plugin plugin_with_soname +linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF !macx { target.path = /$$IDE_LIBRARY_BASENAME/qtcreator/plugins/$$PROVIDER diff --git a/src/shared/symbianutils/codadevice.cpp b/src/shared/symbianutils/codadevice.cpp index 0bb3cfae978..6643d9d5de9 100644 --- a/src/shared/symbianutils/codadevice.cpp +++ b/src/shared/symbianutils/codadevice.cpp @@ -137,10 +137,10 @@ QDateTime CodaCommandResult::tcfTimeToQDateTime(quint64 tcfTimeMS) void CodaCommandError::write(QTextStream &str) const { if (isError()) { - if (timeMS) + if (debug && timeMS) str << CodaCommandResult::tcfTimeToQDateTime(timeMS).toString(Qt::ISODate) << ": "; - str << "Error code: " << code - << " '" << format << '\''; + str << "'" << format << '\'' //for symbian the format is the real error message + << " Code: " << code; if (!alternativeOrganization.isEmpty()) str << " ('" << alternativeOrganization << "', code: " << alternativeCode << ')'; } else{ diff --git a/src/tools/qml/standalone/128xBauhaus_Logo.png b/src/tools/qml/standalone/128xBauhaus_Logo.png deleted file mode 100644 index dc680dae3e0..00000000000 Binary files a/src/tools/qml/standalone/128xBauhaus_Logo.png and /dev/null differ diff --git a/src/tools/qml/standalone/16xBauhaus_Logo.png b/src/tools/qml/standalone/16xBauhaus_Logo.png deleted file mode 100644 index 851973b30ac..00000000000 Binary files a/src/tools/qml/standalone/16xBauhaus_Logo.png and /dev/null differ diff --git a/src/tools/qml/standalone/256xBauhaus_Logo.png b/src/tools/qml/standalone/256xBauhaus_Logo.png deleted file mode 100644 index 9ead12ddf2b..00000000000 Binary files a/src/tools/qml/standalone/256xBauhaus_Logo.png and /dev/null differ diff --git a/src/tools/qml/standalone/512xBauhaus_Logo.png b/src/tools/qml/standalone/512xBauhaus_Logo.png deleted file mode 100644 index d0229f9c890..00000000000 Binary files a/src/tools/qml/standalone/512xBauhaus_Logo.png and /dev/null differ diff --git a/src/tools/qml/standalone/64xBauhaus_Logo.png b/src/tools/qml/standalone/64xBauhaus_Logo.png deleted file mode 100644 index 098b823c945..00000000000 Binary files a/src/tools/qml/standalone/64xBauhaus_Logo.png and /dev/null differ diff --git a/src/tools/qml/standalone/Info.plist b/src/tools/qml/standalone/Info.plist deleted file mode 100644 index bbeb033718e..00000000000 --- a/src/tools/qml/standalone/Info.plist +++ /dev/null @@ -1,196 +0,0 @@ - - - - - CFBundleDocumentTypes - - - CFBundleTypeRole - Editor - CFBundleTypeIconFile - qtcreator.icns - CFBundleTypeExtensions - - pro - - CFBundleTypeName - Qt Project File - LSHandlerRank - Default - - - CFBundleTypeRole - Editor - CFBundleTypeExtensions - - pri - - CFBundleTypeName - Qt Project Include File - LSHandlerRank - Default - - - CFBundleTypeRole - Editor - CFBundleTypeExtensions - - qrc - - CFBundleTypeName - Qt Resource File - LSHandlerRank - Default - - - CFBundleTypeRole - Editor - CFBundleTypeExtensions - - pri - - CFBundleTypeName - Qt UI File - - - CFBundleTypeExtensions - - h - hpp - - CFBundleTypeName - Header File - CFBundleTypeOSTypes - - TEXT - utxt - - CFBundleTypeRole - Editor - - - CFBundleTypeExtensions - - cc - CC - cp - CP - cpp - CPP - cxx - CXX - c++ - C++ - - CFBundleTypeName - C++ Source File - CFBundleTypeOSTypes - - TEXT - utxt - - CFBundleTypeRole - Editor - - - CFBundleTypeExtensions - - mm - MM - - CFBundleTypeName - Objective-C++ Source File - CFBundleTypeOSTypes - - TEXT - utxt - - CFBundleTypeRole - Editor - - - CFBundleTypeExtensions - - m - - CFBundleTypeName - Objective-C Source File - CFBundleTypeOSTypes - - TEXT - utxt - - CFBundleTypeRole - Editor - - - CFBundleTypeExtensions - - c - C - - CFBundleTypeName - C Source File - CFBundleTypeOSTypes - - TEXT - utxt - - CFBundleTypeRole - Editor - - - CFBundleTypeExtensions - - txt - text - - CFBundleTypeName - Text File - CFBundleTypeOSTypes - - TEXT - - CFBundleTypeRole - Editor - - - CFBundleTypeExtensions - - * - - CFBundleTypeName - NSStringPboardType - CFBundleTypeOSTypes - - **** - - CFBundleTypeRole - Editor - - - NSHumanReadableCopyright - (C) 2008-2011 Nokia Corporation -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 plugin 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. - CFBundleIconFile - @ICON@ - CFBundlePackageType - APPL - CFBundleSignature - @TYPEINFO@ - CFBundleExecutable - @EXECUTABLE@ - CFBundleIdentifier - com.nokia.bauhaus - CFBundleVersion - 1.0.0 - CFBundleShortVersionString - 1.0.0 - - diff --git a/src/tools/qml/standalone/aboutdialog.cpp b/src/tools/qml/standalone/aboutdialog.cpp deleted file mode 100644 index acb7d664696..00000000000 --- a/src/tools/qml/standalone/aboutdialog.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** No Commercial Usage -** -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -**************************************************************************/ - -#include "aboutdialog.h" -#include "integrationcore.h" -#include "pluginmanager.h" - -#include -#include - -#include -#include -#include -#include - - -static QString aboutText = "" - "" - "

" - "

Bauhaus

" - ""; - -AboutDialog::AboutDialog(QWidget* parent): - QDialog(parent) -{ - setWindowFlags(windowFlags() | Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint); - setStyleSheet(QString("background-color: #FFFFFF;")); - - QGridLayout* dialogLayout = new QGridLayout; - setLayout(dialogLayout); - - QTextEdit* textArea = new QTextEdit(this); - textArea->setReadOnly(true); - textArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - textArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - textArea->setFrameShape(QFrame::NoFrame); - textArea->setLineWidth(0); - QImage logoImage = QImage(QString(":/128xBauhaus_Logo.png")); - textArea->document()->addResource(QTextDocument::ImageResource, QUrl("logo"), logoImage); - textArea->setHtml(aboutText); - dialogLayout->addWidget(textArea, 0, 0, 1, 3); - - QPushButton* aboutPluginsButton = new QPushButton("About Plug-ins...", this); - dialogLayout->addWidget(aboutPluginsButton, 1, 0, 1, 1); - connect(aboutPluginsButton, SIGNAL(clicked()), this, SLOT(doAboutPlugins())); - - QPushButton* aboutQtButton = new QPushButton("About Qt...", this); - dialogLayout->addWidget(aboutQtButton, 1, 1, 1, 1); - connect(aboutQtButton, SIGNAL(clicked()), qApp, SLOT(aboutQt())); - - QPushButton* closeButton = new QPushButton("Close", this); - dialogLayout->addWidget(closeButton, 1, 2, 1, 1); - connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); -} - -void AboutDialog::go(QWidget* parent) -{ - AboutDialog dialog(parent); - dialog.setWindowTitle(tr("About Bauhaus", "AboutDialog")); - dialog.exec(); -} - -void AboutDialog::doAboutPlugins() -{ - QmlDesigner::IntegrationCore *core = QmlDesigner::IntegrationCore::instance(); - QDialog* dialog = core->pluginManager()->createAboutPluginDialog(this); - dialog->setWindowFlags(Qt::Sheet); - dialog->exec(); -} diff --git a/src/tools/qml/standalone/aboutdialog.h b/src/tools/qml/standalone/aboutdialog.h deleted file mode 100644 index 91501a8eaf6..00000000000 --- a/src/tools/qml/standalone/aboutdialog.h +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** No Commercial Usage -** -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -**************************************************************************/ - -#ifndef AboutDialog_h -#define AboutDialog_h - -#include - - -/*! - This dialog could do with some animations and general beautification. - */ -class AboutDialog: public QDialog -{ - Q_OBJECT - -public: - static void go(QWidget* parent = 0); - -public slots: - void doAboutPlugins(); - -private: - AboutDialog(QWidget* parent = 0); -}; - -#endif // AboutDialog_h diff --git a/src/tools/qml/standalone/application.cpp b/src/tools/qml/standalone/application.cpp deleted file mode 100644 index 9dcf94d36ca..00000000000 --- a/src/tools/qml/standalone/application.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** No Commercial Usage -** -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -**************************************************************************/ - -#include "application.h" -#include -#include - -QString Application::sharedDirPath() -{ - QString path = QCoreApplication::applicationDirPath(); - -#ifdef Q_OS_MACX - path += "/../../.."; -#endif // Q_OS_MACX - - return QFileInfo(path + "/../../../../share/qtcreator/qmldesigner/").absoluteFilePath(); -} diff --git a/src/tools/qml/standalone/application.h b/src/tools/qml/standalone/application.h deleted file mode 100644 index 2de93c1f6c0..00000000000 --- a/src/tools/qml/standalone/application.h +++ /dev/null @@ -1,44 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** No Commercial Usage -** -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -**************************************************************************/ - -#ifndef APPLICATION_H -#define APPLICATION_H - -#include - -class Application { -public: - static QString sharedDirPath(); -}; - -#endif // APPLICATION_H diff --git a/src/tools/qml/standalone/bauhaus-logo.icns b/src/tools/qml/standalone/bauhaus-logo.icns deleted file mode 100644 index ab9758015a4..00000000000 Binary files a/src/tools/qml/standalone/bauhaus-logo.icns and /dev/null differ diff --git a/src/tools/qml/standalone/bauhaus-macos.css b/src/tools/qml/standalone/bauhaus-macos.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/tools/qml/standalone/bauhaus-windows.css b/src/tools/qml/standalone/bauhaus-windows.css deleted file mode 100644 index 6c5bf7d2c64..00000000000 --- a/src/tools/qml/standalone/bauhaus-windows.css +++ /dev/null @@ -1,3 +0,0 @@ -QStatusBar { - border-top: 1px solid #b8b9b8; -} diff --git a/src/tools/qml/standalone/bauhaus-x11.css b/src/tools/qml/standalone/bauhaus-x11.css deleted file mode 100644 index 6c5bf7d2c64..00000000000 --- a/src/tools/qml/standalone/bauhaus-x11.css +++ /dev/null @@ -1,3 +0,0 @@ -QStatusBar { - border-top: 1px solid #b8b9b8; -} diff --git a/src/tools/qml/standalone/bauhaus.css b/src/tools/qml/standalone/bauhaus.css deleted file mode 100644 index 32b97e36516..00000000000 --- a/src/tools/qml/standalone/bauhaus.css +++ /dev/null @@ -1,28 +0,0 @@ -QTreeView#widgetTreeView { - background: #bababa; - border: 0px; - font-size: 11px; - selection-color: #fff; - selection-background-color: #3875d7; - font-variant: normal; -} - -//QTreeView::item { -// padding: 3px; -//} -// -//QTreeView::item:selected { -// border: 3px solid #ff0000; -// padding: 3px; -// background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #3c77ad, stop: 1 #003882); -//} - -//QTreeView#widgetTreeView::item { -// inactive, in favour of the 2 items above (for testing, as the QTreeView seems to contain a bug which prevents border/padding to work correctly -// border: 1px solid #ff0000; -//} - -QStackedWidget#widgetTreeStack { - background: #bababa; - border: 0px; -} diff --git a/src/tools/qml/standalone/bauhaus.ico b/src/tools/qml/standalone/bauhaus.ico deleted file mode 100644 index d6e91cc255c..00000000000 Binary files a/src/tools/qml/standalone/bauhaus.ico and /dev/null differ diff --git a/src/tools/qml/standalone/bauhaus.qrc b/src/tools/qml/standalone/bauhaus.qrc deleted file mode 100644 index 51bf9077749..00000000000 --- a/src/tools/qml/standalone/bauhaus.qrc +++ /dev/null @@ -1,18 +0,0 @@ - - - toolbar-cssedit.png - toolbar-edit.png - bauhaus-windows.css - bauhaus-macos.css - bauhaus-x11.css - 128xBauhaus_Logo.png - bauhaus.css - templates/qwidget.qml - templates/qgraphicsview.qml - 64xBauhaus_Logo.png - preview.png - templates/fx.qml - 16xBauhaus_Logo.png - 256xBauhaus_Logo.png - - diff --git a/src/tools/qml/standalone/css.png b/src/tools/qml/standalone/css.png deleted file mode 100644 index 3a2c2555c41..00000000000 Binary files a/src/tools/qml/standalone/css.png and /dev/null differ diff --git a/src/tools/qml/standalone/edit.png b/src/tools/qml/standalone/edit.png deleted file mode 100644 index 2a55a4576d0..00000000000 Binary files a/src/tools/qml/standalone/edit.png and /dev/null differ diff --git a/src/tools/qml/standalone/main.cpp b/src/tools/qml/standalone/main.cpp deleted file mode 100644 index 1bceeb38c57..00000000000 --- a/src/tools/qml/standalone/main.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** No Commercial Usage -** -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -**************************************************************************/ - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include "mainwindow.h" - -enum { - debug = false -}; - -static void doStyling(QApplication& app) -{ - QString ws; -#ifdef Q_WS_MAC - ws = "macos"; -#endif // Q_WS_MAC - -#ifdef Q_WS_WIN - ws = "windows"; -#endif // Q_WS_WIN - -#ifdef Q_WS_X11 - ws = "x11"; -#endif // Q_WS_X11 - - QFile platformCssFile(QString(":/bauhaus-%1.css").arg(ws)); - platformCssFile.open(QIODevice::ReadOnly | QIODevice::Text); - QTextStream platformCssStream(&platformCssFile); - QString styleSheet(platformCssStream.readAll()); - platformCssFile.close(); - - QFile genericCssFile(QLatin1String(":/bauhaus.css")); - genericCssFile.open(QIODevice::ReadOnly | QIODevice::Text); - QTextStream genericCssStream(&genericCssFile); - styleSheet.append(genericCssStream.readAll()); - genericCssFile.close(); - - app.setStyleSheet(styleSheet); -} - -static void parseArguments(const QStringList& argumentList, MainWindow& mainWindow) -{ - QStringList passArgumentList; - passArgumentList.append("--no-resync"); - passArgumentList.append("-h"); - passArgumentList.append("-graphicssystem"); - - for (int i = 1; i < argumentList.size(); ++i) { - if (argumentList[i].at(0) == QLatin1Char('-')) { - if (argumentList[i] == "--file" || argumentList[i] == "-file" || argumentList[i] == "-f") { - ++i; - if (i < argumentList.size()) { - mainWindow.openFile(argumentList[i]); - } else { - mainWindow.doOpen(); - } - } else if (argumentList[i] == "--help" || argumentList[i] == "-h") { - qWarning() << "Usage: bauhaus [OPTION...]\n"; - qWarning() << " -f, --file open this file"; - qWarning() << " --no-resync disable rewriter"; - exit(0); - } else if (passArgumentList.contains(argumentList[i].split('=').first())) { - } else { - qWarning() << "bauhaus: unrecognized option "<< argumentList[i]; - qWarning() << "Try `bauhaus --help'"; - exit(1); - } - } else { - mainWindow.openFile(argumentList[i]); - } - } -} - -static QStringList pluginPaths() -{ - QStringList result; -#ifdef Q_OS_MAC - result += QCoreApplication::applicationDirPath() + "/../PlugIns/Bauhaus/ItemLibs"; -#else // Q_OS_MAC - result += QCoreApplication::applicationDirPath() + "/../lib/itemlibs"; -#endif // Q_OS_MAC - - return result; -} - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - Q_INIT_RESOURCE(bauhaus); - - doStyling(app); - -#ifdef Q_WS_X11 - QIcon applicationIcon; - applicationIcon.addFile(":/16xBauhaus_Log"); - applicationIcon.addFile(":/64xBauhaus_Logo.png"); - applicationIcon.addFile(":/128xBauhaus_Logo.png"); - applicationIcon.addFile(":/256xBauhaus_Logo.png"); - Q_ASSERT(!applicationIcon.isNull()); - app.setWindowIcon(applicationIcon); -#endif - - QCoreApplication::setOrganizationName("Nokia"); - QCoreApplication::setOrganizationDomain("nokia.com"); - QCoreApplication::setApplicationName("Bauhaus"); - - try { - QmlDesigner::IntegrationCore core; - core.pluginManager()->setPluginPaths(pluginPaths()); - - MainWindow mainWindow; - mainWindow.show(); - - parseArguments(app.arguments(), mainWindow); - -// if (mainWindow.documentCount() == 0) -// mainWindow.showWelcomeScreen(); -// - return app.exec(); - - } catch (const QmlDesigner::Exception &exception) { - qWarning() << exception; - return -1; - } -} diff --git a/src/tools/qml/standalone/mainwindow.cpp b/src/tools/qml/standalone/mainwindow.cpp deleted file mode 100644 index a365f8a1424..00000000000 --- a/src/tools/qml/standalone/mainwindow.cpp +++ /dev/null @@ -1,569 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** No Commercial Usage -** -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -**************************************************************************/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "aboutdialog.h" -#include "allpropertiesviewcontroller.h" -#include "designdocumentcontroller.h" -#include "multipledocumentscontroller.h" -#include "mainwindow.h" -#include "stylemanager.h" -#include "widgetboxcontroller.h" -#include "navigatorcontroller.h" -#include "stateseditorcontroller.h" -#include "xuifiledialog.h" -#include "welcomescreen.h" - -using namespace QmlDesigner; - -class StyleAction: public QAction -{ -public: - StyleAction(const QString& text, const QString& styleName, QObject* parent): QAction(text, parent), m_styleName(styleName) {} - StyleAction(const QString& text, QObject* parent): QAction(text, parent), m_styleName(QString()) {} - - QString styleName() const { return m_styleName; } - -private: - QString m_styleName; -}; - -MainWindow::MainWindow(QWidget* parent): - QMainWindow(parent), - m_shutdown(false), - m_lastPath(QString()), - m_documentCount(0), - m_menuBar(new QMenuBar(this)), - m_itemLibraryController(new ItemLibraryController(this)), - m_navigatorController(new NavigatorController(this)), - m_statesEditorController(new StatesEditorController(this)), - m_propertiesViewController(new AllPropertiesViewController(this)), - m_multipleDocumentsController(new MultipleDocumentsController(this)), - m_recentFilesMenu(0), - m_mainArea(new QStackedWidget(this)), - m_welcomeScreen(new WelcomeScreen(this)) -{ - // setWindowFlags(Qt::MacWindowToolBarButtonHint); -// setUnifiedTitleAndToolBarOnMac(true); - setObjectName(QLatin1String("mainWindow")); - setWindowTitle(tr("Bauhaus", "MainWindowClass")); - resize(1046, 700); - - QFile file(":/qmldesigner/stylesheet.css"); - file.open(QFile::ReadOnly); - QString styleSheet = QLatin1String(file.readAll()); - setStyleSheet(styleSheet); - - setMenuBar(m_menuBar); - - createMenus(); - createMainArea(); - createStatusBar(); - - updateActions(); - updateMainArea(); - - connect(m_multipleDocumentsController, SIGNAL(documentCountChanged(unsigned)), this, SLOT(documentCountChanged(unsigned))); - connect(m_welcomeScreen, SIGNAL(newFile(QString)), this, SLOT(newFile(QString))); - connect(m_welcomeScreen, SIGNAL(openFile(QString)), this, SLOT(openFile(QString))); -} - -MainWindow::~MainWindow() -{ - m_documentActions.clear(); -} - -int MainWindow::documentCount() const -{ - return m_documentCount; -} - -void MainWindow::closeEvent(QCloseEvent *event) -{ - m_shutdown = true; - m_multipleDocumentsController->closeAll(true); - event->setAccepted(false); -} - -void MainWindow::doQuit() -{ - m_shutdown = true; - m_multipleDocumentsController->closeAll(true); -} - -void MainWindow::createMenus() -{ - // File menu: - QMenu* fileMenu = new QMenu(tr("&File"), m_menuBar); - m_menuBar->addMenu(fileMenu); - - QAction* newAction = new QAction(tr("&New..."), fileMenu); - newAction->setShortcut(QKeySequence(tr("Ctrl+N"))); - connect(newAction, SIGNAL(triggered()), this, SLOT(doNew())); - fileMenu->addAction(newAction); - - QAction* openAction = new QAction(tr("&Open..."), fileMenu); - openAction->setShortcut(QKeySequence(tr("Ctrl+O"))); - connect(openAction, SIGNAL(triggered()), this, SLOT(doOpen())); - fileMenu->addAction(openAction); - - m_recentFilesMenu = new QMenu(tr("Recent Files"), fileMenu); - connect(m_recentFilesMenu, SIGNAL(aboutToShow()), this, SLOT(showRecentFilesMenu())); - fileMenu->addMenu(m_recentFilesMenu); - - fileMenu->addSeparator(); - - QAction* saveAction = new QAction(tr("&Save"), fileMenu); - saveAction->setShortcut(QKeySequence(tr("Ctrl+S"))); - connect(saveAction, SIGNAL(triggered()), m_multipleDocumentsController, SLOT(doSave())); - fileMenu->addAction(saveAction); - m_documentActions.append(saveAction); - - QAction* saveAsAction = new QAction(tr("Save &As..."), fileMenu); - connect(saveAsAction, SIGNAL(triggered()), m_multipleDocumentsController, SLOT(doSaveAs())); - fileMenu->addAction(saveAsAction); - m_documentActions.append(saveAsAction); - - fileMenu->addSeparator(); - - m_previewAction = new QAction(tr("&Preview"), fileMenu); - m_previewAction->setShortcut(QKeySequence(tr("Ctrl+R"))); -// m_previewAction->setIcon(QIcon(":/preview.png")); - m_previewAction->setCheckable(true); - connect(m_previewAction, SIGNAL(toggled(bool)), m_multipleDocumentsController, SLOT(doPreview(bool))); - connect(m_multipleDocumentsController, SIGNAL(previewVisibilityChanged(bool)), m_previewAction, SLOT(setChecked(bool))); - fileMenu->addAction(m_previewAction); - m_documentActions.append(m_previewAction); - - m_previewWithDebugAction = new QAction(tr("&Preview with Debug"), fileMenu); - m_previewWithDebugAction->setShortcut(QKeySequence(tr("Ctrl+D"))); - m_previewWithDebugAction->setCheckable(true); - connect(m_previewWithDebugAction, SIGNAL(toggled(bool)), m_multipleDocumentsController, SLOT(doPreviewWithDebug(bool))); - connect(m_multipleDocumentsController, SIGNAL(previewWithDebugVisibilityChanged(bool)), m_previewWithDebugAction, SLOT(setChecked(bool))); - fileMenu->addAction(m_previewWithDebugAction); - m_documentActions.append(m_previewWithDebugAction); - -#ifndef Q_WS_MAC - fileMenu->addSeparator(); -#endif // !Q_WS_MAC - - QAction* quitAction = new QAction(tr("&Quit"), fileMenu); - quitAction->setShortcut(QKeySequence(tr("Ctrl+Q"))); - fileMenu->addAction(quitAction); - connect(quitAction, SIGNAL(triggered()), this, SLOT(doQuit())); - - // Edit menu: - QMenu* editMenu = new QMenu(tr("&Edit"), m_menuBar); - m_menuBar->addMenu(editMenu); - - QAction* undoAction = m_multipleDocumentsController->undoAction(); - undoAction->setParent(editMenu); - undoAction->setShortcut(tr("Ctrl+Z")); - editMenu->addAction(undoAction); - - QAction* redoAction = m_multipleDocumentsController->redoAction(); - redoAction->setParent(editMenu); -#ifdef Q_WS_WIN - redoAction->setShortcut(tr("Ctrl+Y")); -#else // !Q_WS_WIN - redoAction->setShortcut(tr("Ctrl+Shift+Z")); -#endif // Q_WS_WIN - editMenu->addAction(redoAction); - - editMenu->addSeparator(); - - QAction *copyAction = new QAction(tr("&Copy"), editMenu); - connect(copyAction, SIGNAL(triggered()), m_multipleDocumentsController, SLOT(doCopy())); - copyAction->setShortcuts(QList() << QKeySequence(QKeySequence::Copy)); - editMenu->addAction(copyAction); - m_documentActions.append(copyAction); - - QAction *cutAction = new QAction(tr("&Cut"), editMenu); - connect(cutAction, SIGNAL(triggered()), m_multipleDocumentsController, SLOT(doCut())); - cutAction->setShortcuts(QList() << QKeySequence(QKeySequence::Cut)); - editMenu->addAction(cutAction); - m_documentActions.append(cutAction); - - QAction *pasteAction = new QAction(tr("&Paste"), editMenu); - connect(pasteAction, SIGNAL(triggered()), m_multipleDocumentsController, SLOT(doPaste())); - pasteAction->setShortcuts(QList() << QKeySequence(QKeySequence::Paste)); - editMenu->addAction(pasteAction); - m_documentActions.append(pasteAction); - - QAction *deleteAction = new QAction(tr("&Delete"), editMenu); - connect(deleteAction, SIGNAL(triggered()), m_multipleDocumentsController, SLOT(doDelete())); - deleteAction->setShortcuts(QList() << QKeySequence(tr("Del")) << QKeySequence(tr("Backspace"))); - editMenu->addAction(deleteAction); - m_documentActions.append(deleteAction); - - // View menu: - QMenu* viewMenu = new QMenu(tr("&View"), m_menuBar); - m_menuBar->addMenu(viewMenu); -// -// m_showNewLookPropertiesAction = viewMenu->addAction(tr("&New Look Properties")); -// m_showNewLookPropertiesAction->setCheckable(true); -// m_showNewLookPropertiesAction->setEnabled(false); -// connect(m_showNewLookPropertiesAction, SIGNAL(triggered()), m_propertiesViewController, SLOT(showNewLookProperties())); -// m_documentActions.append(m_showNewLookPropertiesAction); -// -// m_showTraditionalPropertiesAction = viewMenu->addAction(tr("&Traditional Properties")); -// m_showTraditionalPropertiesAction->setCheckable(true); -// m_showTraditionalPropertiesAction->setEnabled(false); -// connect(m_showTraditionalPropertiesAction, SIGNAL(triggered()), m_propertiesViewController, SLOT(showTraditionalProperties())); -// m_documentActions.append(m_showTraditionalPropertiesAction); -// -// QActionGroup* propertiesLookGroup = new QActionGroup(this); -// propertiesLookGroup->addAction(m_showNewLookPropertiesAction); -// propertiesLookGroup->addAction(m_showTraditionalPropertiesAction); -// m_showNewLookPropertiesAction->setChecked(true); - -// viewMenu->addSeparator(); - -#ifdef ENABLE_TEXT_VIEW - QAction* showFormAction = m_multipleDocumentsController->showFormAction(viewMenu); - viewMenu->addAction(showFormAction); - QAction* showTextAction = m_multipleDocumentsController->showTextAction(viewMenu); - viewMenu->addAction(showTextAction); - - QActionGroup* formTextGroup = new QActionGroup(this); - formTextGroup->addAction(showFormAction); - formTextGroup->addAction(showTextAction); - showFormAction->setChecked(true); - - viewMenu->addSeparator(); -#endif // ENABLE_TEXT_VIEW - - // Style selection: -// QMenu* styleMenu = viewMenu->addMenu("&Style"); -// QActionGroup* styleGroup = new QActionGroup(this); -// -// StyleAction* defaultStyleAction = new StyleAction("&Default", viewMenu); -// styleMenu->addAction(defaultStyleAction); -// defaultStyleAction->setCheckable(true); -// styleGroup->addAction(defaultStyleAction); -// connect(defaultStyleAction, SIGNAL(triggered()), this, SLOT(styleActionTriggered())); -// -// styleMenu->addSeparator(); -// -// foreach (const QString styleName, StyleManager::styles()) { -// StyleAction* styleAction = new StyleAction(styleName, styleName, viewMenu); -// styleMenu->addAction(styleAction); -// styleAction->setCheckable(true); -// styleGroup->addAction(styleAction); -// connect(styleAction, SIGNAL(triggered()), this, SLOT(styleActionTriggered())); -// } -// -// defaultStyleAction->setChecked(true); - - // Help menu: - QMenu* helpMenu = new QMenu(tr("&Help"), this); - helpMenu->setObjectName(QString::fromAscii("helpMenu")); - m_menuBar->addMenu(helpMenu); - - QAction* aboutAppAction = new QAction(tr("&About..."), this); - aboutAppAction->setObjectName(QString::fromAscii("aboutAppAction")); - connect(aboutAppAction, SIGNAL(triggered()), this, SLOT(doAbout())); - helpMenu->addAction(aboutAppAction); -} - -void MainWindow::showRecentFilesMenu() -{ - m_recentFilesMenu->clear(); - foreach (const QString &path, recentFiles()) { - QAction *action = m_recentFilesMenu->addAction(path); - action->setData(path); - connect(action, SIGNAL(triggered()), this, SLOT(doOpen())); - } -} - -void MainWindow::styleActionTriggered() -{ - //### remove setStyle() -// StyleAction* source = dynamic_cast(sender()); -// -// if (source) { -// QString styleName = source->styleName(); -// -// if (styleName.isNull()) { -// } else { -// StyleManager::setStyle(styleName); -// } -// } -} - -void MainWindow::createMainArea() -{ - QSplitter* mainSplitter = new QSplitter(this); - mainSplitter->setObjectName("mainSplitter"); - - // Left area: - QSplitter* leftSplitter = new QSplitter(mainSplitter); - leftSplitter->setObjectName("leftSplitter"); - leftSplitter->setOrientation(Qt::Vertical); - { - QSizePolicy policy = leftSplitter->sizePolicy(); - policy.setHorizontalStretch(0); - policy.setHorizontalPolicy(QSizePolicy::Preferred); - leftSplitter->setSizePolicy(policy); - } - - leftSplitter->addWidget(m_navigatorController->widget()); - - QTabWidget *leftBottomTabWidget = new QTabWidget(this); - leftBottomTabWidget->addTab(m_itemLibraryController->widget(), "Library"); - leftBottomTabWidget->addTab(m_propertiesViewController->widget(), tr("Properties")); - leftSplitter->addWidget(leftBottomTabWidget); - - // right area: - QSplitter *rightSplitter = new QSplitter(mainSplitter); - rightSplitter->setObjectName("rightSplitter"); - rightSplitter->setOrientation(Qt::Vertical); - - rightSplitter->addWidget(m_statesEditorController->widget()); - rightSplitter->addWidget(m_multipleDocumentsController->tabWidget()); - { - QSizePolicy policy = m_multipleDocumentsController->tabWidget()->sizePolicy(); - policy.setHorizontalStretch(1); - policy.setHorizontalPolicy(QSizePolicy::Expanding); - m_multipleDocumentsController->tabWidget()->setSizePolicy(policy); - } - - // Finishing touches: - mainSplitter->setSizes(QList() << 240 << 530); - rightSplitter->setSizes(QList() << 100 << 400); - leftSplitter->setSizes(QList() << 300 << 300); - - // Wire everything together: - connect(m_multipleDocumentsController, SIGNAL(activeDocumentChanged(DesignDocumentController*)), - m_itemLibraryController, SLOT(show(DesignDocumentController*))); - connect(m_multipleDocumentsController, SIGNAL(documentClosed(DesignDocumentController*)), - m_itemLibraryController, SLOT(close(DesignDocumentController*))); - - connect(m_multipleDocumentsController, SIGNAL(activeDocumentChanged(DesignDocumentController*)), - m_navigatorController, SLOT(show(DesignDocumentController*))); - connect(m_multipleDocumentsController, SIGNAL(documentClosed(DesignDocumentController*)), - m_navigatorController, SLOT(close(DesignDocumentController*))); - - connect(m_multipleDocumentsController, SIGNAL(activeDocumentChanged(DesignDocumentController*)), - m_statesEditorController, SLOT(show(DesignDocumentController*))); - connect(m_multipleDocumentsController, SIGNAL(documentClosed(DesignDocumentController*)), - m_statesEditorController, SLOT(close(DesignDocumentController*))); - - connect(m_multipleDocumentsController, SIGNAL(activeDocumentChanged(DesignDocumentController*)), - m_propertiesViewController, SLOT(show(DesignDocumentController*))); - connect(m_multipleDocumentsController, SIGNAL(documentClosed(DesignDocumentController*)), - m_propertiesViewController, SLOT(close(DesignDocumentController*))); - - m_mainArea->addWidget(m_welcomeScreen); - m_mainArea->addWidget(mainSplitter); - setCentralWidget(m_mainArea); -} - -void MainWindow::createStatusBar() -{ -// statusBar(); -} - -void MainWindow::doNew() -{ -// QWizard wizard; -// Internal::FormTemplateWizardPage page; -// wizard.addPage(&page); -// wizard.setWindowTitle("New Component Wizard"); -// if (wizard.exec() != QDialog::Accepted) -// return; - - QFile file(":/qmldesigner/templates/General/Empty Fx"); - file.open(QFile::ReadOnly); - newFile(file.readAll()); -// newFile(page.templateContents().toLatin1()); -} - -void MainWindow::doOpen() -{ - if (QAction *senderAction = qobject_cast(sender())) { - if (senderAction->data().isValid()) { - // from recent files menu - QString path = senderAction->data().toString(); - openFile(path); - return; - } - } - XUIFileDialog::runOpenFileDialog(m_lastPath, this, this, SLOT(openFile(QString))); -} - -void MainWindow::openFile(const QString &fileName) -{ -// qDebug() << "openFile("+fileName+")"; -// - if (fileName.isNull()) - return; - - m_lastPath = QFileInfo(fileName).path(); - - QString errorMessage; - - QFile file(fileName); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - errorMessage = tr("Could not open file <%1>").arg(fileName); - } else { - DesignDocumentController* controller = new DesignDocumentController(m_multipleDocumentsController); - controller->setFileName(fileName); - QList errors = controller->loadMaster(file.readAll()); - if (errors.isEmpty()) { - connect(controller, SIGNAL(fileToOpen(QString)), this, SLOT(openFile(QString))); - m_multipleDocumentsController->open(controller); - addRecentFile(QFileInfo(file).absoluteFilePath()); - } else { - errorMessage = serializeErrors(errors); - delete controller; - } - } - - if (!errorMessage.isEmpty()) { - QErrorMessage msgBox(this); - msgBox.showMessage(errorMessage); - msgBox.exec(); - } -} - -void MainWindow::newFile(const QString &templateName) -{ - if (templateName.isNull()) - return; - - QFile file(templateName); - if (!file.open(QFile::ReadOnly)) - return; - - newFile(file.readAll()); -} - -void MainWindow::doAbout() -{ - AboutDialog::go(this); -} - -void MainWindow::documentCountChanged(unsigned newCount) -{ - if (m_documentCount == newCount) - return; - m_documentCount = newCount; - - if (!m_shutdown) { - updateActions(); - updateMainArea(); - } -} - -void MainWindow::updateActions() -{ - bool enable = m_documentCount != 0; - foreach (QAction *documentAction, m_documentActions) - documentAction->setEnabled(enable); -} - -void MainWindow::updateMainArea() -{ - if (m_multipleDocumentsController->activeDocumentCount() == 0) { - m_welcomeScreen->setRecentFiles(recentFiles()); - m_mainArea->setCurrentIndex(0); // welcome screen - } else { - m_mainArea->setCurrentIndex(1); - } -} - -void MainWindow::newFile(const QByteArray &templateContents) -{ - DesignDocumentController *controller = new DesignDocumentController(m_multipleDocumentsController); - QList errors = controller->loadMaster(templateContents); - - if (errors.isEmpty()) { - connect(controller, SIGNAL(fileToOpen(QString)), this, SLOT(openFile(QString))); - m_multipleDocumentsController->open(controller); - } else { - delete controller; - QErrorMessage msgBox(this); - msgBox.showMessage(serializeErrors(errors)); - msgBox.exec(); - } -} - -QStringList MainWindow::recentFiles() const -{ - const QSettings settings; - return settings.value("recentFiles", QStringList()).toStringList(); -} - -void MainWindow::addRecentFile(const QString &path) -{ - QSettings settings; - QStringList files = settings.value("recentFiles", QStringList()).toStringList(); - - files.removeAll(path); - if (files.size() > 10) - files.removeLast(); - files.prepend(path); - - settings.setValue("recentFiles", files); -} - -QString MainWindow::serializeErrors(const QList &errors) -{ - if (errors.isEmpty()) - return QString(); - QString errorMsg = tr("Qml Errors:"); - foreach (const QmlDesigner::RewriterView::Error &error, errors) { - if (!error.url().isEmpty()) - errorMsg.append(tr("\n%1 %2:%3 - %4").arg(error.url().toString(), QString(error.line()), QString(error.column()), error.description())); - else - errorMsg.append(tr("\n%1:%2 - %3").arg(QString(error.line()), QString(error.column()), error.description())); - } - return errorMsg; -} diff --git a/src/tools/qml/standalone/mainwindow.h b/src/tools/qml/standalone/mainwindow.h deleted file mode 100644 index 7e75d2896a7..00000000000 --- a/src/tools/qml/standalone/mainwindow.h +++ /dev/null @@ -1,124 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** No Commercial Usage -** -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -**************************************************************************/ - -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include -#include - -#include -#include -#include -#include - -#include "rewriterview.h" - -class QmlError; -class WelcomeScreen; - -namespace QmlDesigner { - class ItemLibraryController; - class NavigatorController; - class StatesEditorController; - class AllPropertiesViewController; - class MultipleDocumentsController; -} - -class MainWindow : public QMainWindow -{ - Q_OBJECT - -public: - MainWindow(QWidget* parent = 0); - ~MainWindow(); - - int documentCount() const; - -public slots: - void documentCountChanged(unsigned newCount); - void openFile(const QString &fileName); - void newFile(const QString &fileTemplate); - - void doNew(); - void doOpen(); - void doQuit(); - void doAbout(); - -protected: - void closeEvent(QCloseEvent *event); - -private slots: - void showRecentFilesMenu(); - void styleActionTriggered(); - -private: - void createMenus(); - void createMainArea(); - void createMainEditArea(); - void createMainStyleArea(); - void createStatusBar(); - void updateActions(); - void updateMainArea(); - - void newFile(const QByteArray &templateContents); - - QStringList recentFiles() const; - void addRecentFile(const QString &path); - - QString serializeErrors(const QList &errors); - -private: - bool m_shutdown; - QString m_lastPath; - QList m_documentActions; - unsigned int m_documentCount; - - QMenuBar* m_menuBar; - - QmlDesigner::ItemLibraryController* m_itemLibraryController; - QmlDesigner::NavigatorController* m_navigatorController; - QmlDesigner::StatesEditorController* m_statesEditorController; - QmlDesigner::AllPropertiesViewController* m_propertiesViewController; - QmlDesigner::MultipleDocumentsController* m_multipleDocumentsController; - QAction* m_previewAction; - QAction* m_previewWithDebugAction; - QAction* m_showNewLookPropertiesAction; - QAction* m_showTraditionalPropertiesAction; - QMenu* m_recentFilesMenu; - - QStackedWidget *m_mainArea; - WelcomeScreen *m_welcomeScreen; -}; - -#endif // MAINWINDOW_H diff --git a/src/tools/qml/standalone/preview.png b/src/tools/qml/standalone/preview.png deleted file mode 100644 index 496498ff9a0..00000000000 Binary files a/src/tools/qml/standalone/preview.png and /dev/null differ diff --git a/src/tools/qml/standalone/standalone.pro b/src/tools/qml/standalone/standalone.pro deleted file mode 100644 index 6b09c847ddf..00000000000 --- a/src/tools/qml/standalone/standalone.pro +++ /dev/null @@ -1,50 +0,0 @@ -!contains(QT_CONFIG, declarative) { - error("Qt is not configured with the declarative model."); -} - -TEMPLATE = app -CONFIG(debug, debug|release):CONFIG += console -TARGET = bauhaus -macx:TARGET = Bauhaus -CONFIG += qt -CONFIG += webkit -QT += gui opengl - -HEADERS += \ - aboutdialog.h \ - mainwindow.h \ - application.h \ - welcomescreen.h - -SOURCES += \ - aboutdialog.cpp \ - main.cpp \ - mainwindow.cpp \ - application.cpp \ - welcomescreen.cpp - -include(../../../libs/qmljs/qmljs-lib.pri) -HEADERS+=../../../libs/utils/changeset.h -SOURCES+=../../../libs/utils/changeset.cpp -INCLUDEPATH+=../../../libs -DEFINES+=QTCREATOR_UTILS_STATIC_LIB QML_BUILD_STATIC_LIB - -include(../../../plugins/qmldesigner/config.pri) -include(../../../plugins/qmldesigner/components/integration/integration.pri) -include(../../../plugins/qmldesigner/components/propertyeditor/propertyeditor.pri) -include(../../../plugins/qmldesigner/components/formeditor/formeditor.pri) -include(../../../plugins/qmldesigner/components/navigator/navigator.pri) -include(../../../plugins/qmldesigner/components/stateseditor/stateseditor.pri) -include(../../../plugins/qmldesigner/components/itemlibrary/itemlibrary.pri) -include(../../../plugins/qmldesigner/components/resources/resources.pri) -include(../../../plugins/qmldesigner/components/pluginmanager/pluginmanager.pri) -include(../../../plugins/qmldesigner/components/themeloader/qts60stylethemeio.pri) -include (../../../plugins/qmldesigner/core/core.pri) -RESOURCES += bauhaus.qrc -win32:RC_FILE = bauhaus.rc -macx { - ICON = bauhaus-logo.icns - QMAKE_INFO_PLIST = Info.plist -} -QMAKE_CXXFLAGS_HIDESYMS="" - diff --git a/src/tools/qml/standalone/templates/fx.qml b/src/tools/qml/standalone/templates/fx.qml deleted file mode 100644 index 9689e0c3665..00000000000 --- a/src/tools/qml/standalone/templates/fx.qml +++ /dev/null @@ -1,7 +0,0 @@ -import Qt 4.7 - -Item { - id: rootItem - width: 640 - height: 480 -} diff --git a/src/tools/qml/standalone/templates/qgraphicsview.qml b/src/tools/qml/standalone/templates/qgraphicsview.qml deleted file mode 100644 index 1c46f7347be..00000000000 --- a/src/tools/qml/standalone/templates/qgraphicsview.qml +++ /dev/null @@ -1,10 +0,0 @@ -import Qt 4.7 - -QGraphicsView { - objectName: "view" - width: 300 - height: 300 - scene: QGraphicsScene { - objectName: "scene" - } -} diff --git a/src/tools/qml/standalone/templates/qwidget.qml b/src/tools/qml/standalone/templates/qwidget.qml deleted file mode 100644 index 0c27daa325a..00000000000 --- a/src/tools/qml/standalone/templates/qwidget.qml +++ /dev/null @@ -1,9 +0,0 @@ -import Qt 4.7 - -QWidget { - objectName: "Form" - x: 300 - y: 200 - width: 455 - height: 376 -} diff --git a/src/tools/qml/standalone/toolbar-cssedit.png b/src/tools/qml/standalone/toolbar-cssedit.png deleted file mode 100644 index 423d1b04b30..00000000000 Binary files a/src/tools/qml/standalone/toolbar-cssedit.png and /dev/null differ diff --git a/src/tools/qml/standalone/toolbar-edit.png b/src/tools/qml/standalone/toolbar-edit.png deleted file mode 100644 index 8c2f4c1209a..00000000000 Binary files a/src/tools/qml/standalone/toolbar-edit.png and /dev/null differ diff --git a/src/tools/qml/standalone/welcomescreen.cpp b/src/tools/qml/standalone/welcomescreen.cpp deleted file mode 100644 index 1686a5b11a1..00000000000 --- a/src/tools/qml/standalone/welcomescreen.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** No Commercial Usage -** -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -**************************************************************************/ - -#include "welcomescreen.h" -#include "application.h" - -#include -#include -#include -#include -#include - -RecentFileModel::RecentFileModel(QObject *parent) : - QListModelInterface(parent) -{ -} - -void RecentFileModel::setRecentFiles(const QStringList &filePaths) -{ - QStringList oldPaths = m_paths; - m_paths.clear(); - if (oldPaths.size() > 0) { - emit itemsRemoved(0, oldPaths.size()); - } - - m_paths = filePaths; - - if (m_paths.size() > 0) { - emit itemsInserted(0, m_paths.size()); - } -} - -int RecentFileModel::count() const -{ - return m_paths.size(); -} - -QHash RecentFileModel::data(int index, const QList &/*roles*/) const -{ - QHash dataHash; - - dataHash.insert(NameRole, displayPath(m_paths.at(index))); - dataHash.insert(FileNameRole, m_paths.at(index)); - return dataHash; -} - -QVariant RecentFileModel::data(int index, int role) const -{ - if (role == NameRole) - return displayPath(m_paths.at(index)); - if (role == FileNameRole) - return m_paths.at(index); - return QVariant(); -} - -QList RecentFileModel::roles() const -{ - return QList() << NameRole << FileNameRole; -} - -QString RecentFileModel::toString(int role) const -{ - switch (role) { - case NameRole: return "name"; break; - case FileNameRole: return "fileName"; break; - default: Q_ASSERT_X(0, Q_FUNC_INFO, "Unknown role"); - } - return QString(); -} - -QString RecentFileModel::displayPath(const QString &filePath) const -{ - QString displayPath = filePath; - while (displayPath.length() > 25 && displayPath.contains('/')) { - displayPath.remove(0, displayPath.indexOf('/') + 1); - } - - if (displayPath != filePath) - displayPath.prepend("../"); - - return displayPath; -} - -WelcomeScreen::WelcomeScreen(QWidget *parent) : - QWidget(parent), - m_view(new QmlView(this)), - m_recentFileModel(new RecentFileModel(this)) -{ - m_view->setUrl(QUrl::fromLocalFile(Application::sharedDirPath() + "welcomescreen.qml")); - m_view->setContentResizable(true); - - QmlContext *context = m_view->rootContext(); - context->setContextProperty(QLatin1String("recentFiles"), m_recentFileModel); - - m_view->execute(); - - QObject *rootItem = m_view->root(); - connect(rootItem, SIGNAL(openFile()), this, SLOT(openFile())); - - QBoxLayout *layout = new QBoxLayout(QBoxLayout::LeftToRight, this); - layout->setMargin(0); - layout->addWidget(m_view); - - QPalette palette; - palette.setColor(QPalette::Window, QColor(0x2e, 0x2e, 0x2e)); - setPalette(palette); - setBackgroundRole(QPalette::Window); - setAutoFillBackground(true); -} - -void WelcomeScreen::setRecentFiles(const QStringList &files) -{ - m_recentFileModel->setRecentFiles(files); -} - -void WelcomeScreen::openFile() -{ - QString filePath = m_view->root()->property("selectedFile").toString(); - if (filePath.startsWith(':')) { - emit newFile(filePath); - } else { - emit openFile(filePath); - } -} diff --git a/src/tools/qml/standalone/welcomescreen.h b/src/tools/qml/standalone/welcomescreen.h deleted file mode 100644 index 8f908874286..00000000000 --- a/src/tools/qml/standalone/welcomescreen.h +++ /dev/null @@ -1,81 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** No Commercial Usage -** -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -**************************************************************************/ - -#include -#include -#include - -class QmlView; - -class RecentFileModel : public QListModelInterface { - Q_OBJECT -public: - enum Roles { - NameRole, - FileNameRole - }; - - RecentFileModel(QObject *parent = 0); - void setRecentFiles(const QStringList &filePaths); - - int count() const; - QHash data(int index, const QList &roles = QList()) const; - QVariant data(int index, int role) const; - QList roles() const; - QString toString(int role) const; -private: - QString displayPath(const QString &filePath) const; - - QStringList m_paths; -}; - -class WelcomeScreen : public QWidget { - Q_OBJECT - -public: - WelcomeScreen(QWidget *parent); - void setRecentFiles(const QStringList &recentFiles); - -signals: - void appExit(); - void openFile(const QString &filePath); - void newFile(const QString &templatePath); - -private slots: - void openFile(); - -private: - QmlView *m_view; - RecentFileModel *m_recentFileModel; -}; - diff --git a/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp b/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp index 0e89c5c6756..dc310acaf5b 100644 --- a/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp +++ b/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp @@ -71,6 +71,7 @@ private Q_SLOTS: void braceList(); void bug1(); void bug2(); + void bug3(); void switch1(); void memberInitializer(); void templates(); @@ -669,6 +670,23 @@ void tst_CodeFormatter::bug2() checkIndent(data); } +void tst_CodeFormatter::bug3() +{ + QList data; + data << Line("class AutoAttack") + << Line("{") + << Line("public:") + << Line(" AutoAttack(unsigned delay, unsigned warmup)") + << Line(" ~ : mWarmup(warmup && warmup < delay ? warmup : delay >> 2)") + << Line(" {}") + << Line(" unsigned getWarmup() const { return mWarmup; }") + << Line("private:") + << Line(" unsigned mWarmup;") + << Line("}") + ; + checkIndent(data); +} + void tst_CodeFormatter::braceList() { QList data;