diff --git a/doc/images/qml-states-example.png b/doc/images/qml-states-example.png new file mode 100644 index 0000000000000000000000000000000000000000..30514ecc4ee95952c971e5e1c86202dc0435cfe2 Binary files /dev/null and b/doc/images/qml-states-example.png differ diff --git a/doc/images/qmldesigner-transparent-button.png b/doc/images/qmldesigner-transparent-button.png new file mode 100644 index 0000000000000000000000000000000000000000..51060f2f836c781eb092fe86ec6af9c53c3f7da8 Binary files /dev/null and b/doc/images/qmldesigner-transparent-button.png differ diff --git a/doc/images/qmldesigner-tutorial-desing-mode.png b/doc/images/qmldesigner-tutorial-desing-mode.png new file mode 100644 index 0000000000000000000000000000000000000000..068f63bdfea718372774b120853eecca824f7962 Binary files /dev/null and b/doc/images/qmldesigner-tutorial-desing-mode.png differ diff --git a/doc/images/qmldesigner-tutorial-page.png b/doc/images/qmldesigner-tutorial-page.png new file mode 100644 index 0000000000000000000000000000000000000000..d6c669104e340ce5367225603824d03b6b8e5b18 Binary files /dev/null and b/doc/images/qmldesigner-tutorial-page.png differ diff --git a/doc/images/qmldesigner-tutorial-project.png b/doc/images/qmldesigner-tutorial-project.png new file mode 100644 index 0000000000000000000000000000000000000000..0ff93dd598d170a98dbd83e01cebe095c60cf4a2 Binary files /dev/null and b/doc/images/qmldesigner-tutorial-project.png differ diff --git a/doc/images/qmldesigner-tutorial-quick-toolbar.png b/doc/images/qmldesigner-tutorial-quick-toolbar.png new file mode 100644 index 0000000000000000000000000000000000000000..27292626a3dcf010217525d843010ac267c30c69 Binary files /dev/null and b/doc/images/qmldesigner-tutorial-quick-toolbar.png differ diff --git a/doc/images/qmldesigner-tutorial-state1.png b/doc/images/qmldesigner-tutorial-state1.png new file mode 100644 index 0000000000000000000000000000000000000000..6778a675ae956cd5c8a27e51278f0ea5f788dc4d Binary files /dev/null and b/doc/images/qmldesigner-tutorial-state1.png differ diff --git a/doc/images/qmldesigner-tutorial-topleftrect-layout.png b/doc/images/qmldesigner-tutorial-topleftrect-layout.png new file mode 100644 index 0000000000000000000000000000000000000000..c0f757b8303b27c1fcaac2445603b639f2f09e85 Binary files /dev/null and b/doc/images/qmldesigner-tutorial-topleftrect-layout.png differ diff --git a/doc/images/qmldesigner-tutorial-topleftrect.png b/doc/images/qmldesigner-tutorial-topleftrect.png new file mode 100644 index 0000000000000000000000000000000000000000..0b101854a60878c8d7b827839b7af1efdb6fb2bb Binary files /dev/null and b/doc/images/qmldesigner-tutorial-topleftrect.png differ diff --git a/doc/images/qmldesigner-tutorial-user-icon.png b/doc/images/qmldesigner-tutorial-user-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..d5934b7b054a616729e0cac440d9529e604b42cf Binary files /dev/null and b/doc/images/qmldesigner-tutorial-user-icon.png differ diff --git a/doc/images/qmldesigner-tutorial.png b/doc/images/qmldesigner-tutorial.png new file mode 100644 index 0000000000000000000000000000000000000000..875313918e37f55623bdc7df0d0371ed8d9c5c36 Binary files /dev/null and b/doc/images/qmldesigner-tutorial.png differ diff --git a/doc/images/qtcreator-breakdown.png b/doc/images/qtcreator-breakdown.png index d1aed6228d580aa4a09050ee235f56e1dd963602..f5b01b834ac73c74466c1ee1122d49fb02e3c156 100644 Binary files a/doc/images/qtcreator-breakdown.png and b/doc/images/qtcreator-breakdown.png differ diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index 8dfd773e3b410a27ec92eda7e2557a1327a3a9b6..500b4c88e050b963328f077746e72740f1e6ae12 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -3902,133 +3902,312 @@ \note To complete this tutorial, you must have Qt 4.7 or later installed. - This tutorial assumes that you are familiar with the \l {http://doc.qt.nokia.com/4.7/qtquick.html} - {QML declarative language}. + This tutorial uses basic elements and illustrates basic concepts of the + \l {http://doc.qt.nokia.com/4.7/qtquick.html}{QML declarative language}. - This tutorial describes how to use Qt Creator to create a small - Qt Quick application, Hello World. + This tutorial describes how to use the Qt Creator to implement the + \l{http://doc.qt.nokia.com/4.7-snapshot/declarative-animation-states.html} + {states and transitions example application}. The example application displays a user + icon that moves between three rectangles on the page when you click them. - \image qmldesigner-helloworld-edited.png "Hello World" + \image qmldesigner-tutorial.png "States and transitions example" - \section1 Creating the Hello World Project + \section1 Creating the Project \list 1 - \o Select \gui{File > New File or Project > Qt Quick Project > Qt Quick Application > Choose}. + \o Select \gui{File > New File or Project > Qt Quick Project > Qt Quick UI > + Choose}. - \image qmldesigner-new-project.png "New File or Project dialog" + \o Follow the instructions of the wizard to create a project called Transitions. - The \gui{Introduction and Project Location} dialog opens. + \o Press \key {Ctrl+R} to run the application in the QML Viewer. - \image qmldesigner-new-project-location.png "Introduction and Project Location dialog" + \endlist - \o In the \gui{Name} field, type \bold {HelloWorld}. + Qt Creator generates a default QML file that you can modify to create the main view + of the application. - \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}. + \image qmldesigner-tutorial-project.png "Transitions project in Edit mode" - The \gui {Qt Versions} dialog opens. + \section1 Creating the Main View - \image qmldesigner-new-project-qt-versions.png "Qt Versions dialog" + The main view of the application displays a user icon in the top left corner of the + screen and two empty rectangles. - \o Select the Qt versions to use as build targets for your project, - and then click \gui{Next}. + To use the user.png image in your application, you must copy it to the project + directory from the \c {\qt\examples\declarative\animation\states} directory in the + Qt installation directory. For example: + \c {C:\Qt\2010.05\qt\examples\declarative\animation\states}. The image appears + in the \gui Resources pane. You can also use any other image or a QML element, instead. - \note If you have only one Qt version installed, this dialog is skipped. + \list 1 - The \gui{Application Options} dialog opens. + \o In the \gui Projects view, double-click the main .qml file (Transitions.qml) + to open it in the code editor. - \image qtcreator-mobile-project-app-options.png "Application Options dialog" + \o Click \gui Design to open the file in \QMLD. - \o In the \gui {Orientation behavior} field, determine how the application - behaves when the orientation of the device display rotates between portrait - and landscape, and then click \gui{Next}. + \image qmldesigner-tutorial-desing-mode.png "Transitions project in Design Mode" - \note Qt Creator contains a default program icon and generates a UID for testing - the application on a device. You only need to specify the \gui {Symbian Specific} - and \gui {Maemo Specific} settings if you publish the application. + \o In the \gui Navigator pane, select \gui Text and press \key Delete to delete it. - The \gui {QML Sources} dialog opens. + \o Select \gui Rectangle to edit its properties. - \image qmldesigner-new-project-qml-sources.png "QML Sources" dialog + \image qmldesigner-tutorial-page.png "Page properties" - \o In the \gui {QML Main File} group, select \gui {Generate a .qml file}, - and then click \gui{Next}. + \list a - The \gui{Project Management} dialog opens. + \o In the \gui Id field, enter \e page, to be able to reference the rectangle + from other places. - \image qmldesigner-new-project-summary.png "Project Management dialog" + \o In the \gui Size field, set \gui W to 640 and \gui H to 480. - \o Review the project settings, and click \gui{Finish} to create the project. + \o In the \gui Colors tab, \gui Rectangle field, set the color to #343434. + + \endlist + + \o Drag and drop user.png from \gui Resources to the canvas. + + \o In the \gui Id field, enter \e userIcon. + + \image qmldesigner-tutorial-user-icon.png "User icon properties" + + \o Drag and drop a \gui Rectangle element to the canvas, and edit its properties. + + \image qmldesigner-tutorial-topleftrect.png "Rectangle properties" + + \list a + + \o In the \gui Id field, enter \e topLeftRect. + + \o In the \gui Size field, set \gui W and \gui H to 64, for the rectangle size + to match the image size. + + \o In the \gui Colors tab, \gui Rectangle field, click the + \inlineimage qmldesigner-transparent-button.png + button to make the rectangle transparent. + + \o In the \gui Border field, set the border color to #808080. + + \o In the \gui Rectangle tab, \gui Border field, set the border width to + 1. + + \o In the \gui Radius field, select 6 to create rounded corners for the + rectangle. + + \o Click \gui {Layout}, and then click the top and left anchor buttons + to anchor the rectangle to the top left corner of the page. + + \image qmldesigner-tutorial-topleftrect-layout.png "Layout tab" + + \o In the \gui Margin field for the top anchor, select 20. + + \endlist + + \o Drag and drop a \gui {Mouse Area} element on top of the rectangle, + and edit its properties: + + \list a + + \o Click \gui {Layout}, and then click the + \inlineimage qmldesigner-anchor-fill-screen.png + button to anchor the mouse area to the rectangle. + + \o In the code editor, add a pointer to a clicked expression to the mouse + area element, as illustrated by the following code snippet: + + \code + + MouseArea { + id: mouse_area1 + anchors.fill: parent + onClicked: page.state = '' + } + + \endcode + + The expression sets the state to the base state and returns the image to + its initial position. + + \endlist + + \o To make sure that the user icon appears within the rectangle even if the screen + size changes, you can anchor the icon to the x and y coordinates of the rectangle: + + \list a + + \o In the \gui Navigator, select userIcon. + + \o In the \gui Geometry tab, \gui {Position X} field, open the menu and select + \gui {Set Expression}. + + \o Enter the following expression: \c {topLeftRect.x} + + \o In the \gui Y field, set the following expression: \c {topLeftRect.y} + + \endlist + + \o Copy topLeftRect (by pressing \key {Ctrl+C}) and paste it to the canvas twice + (by pressing \key {Ctrl+V}). Qt Creator renames the new instances of the element + topLeftRect1 and topLeftRect2. + + \o Select topLeftRect1 and edit its properties: + + \list a + + \o In the \gui Id field, enter \e middleRightRect. + + \o In \gui {Layout}, select the right and vertical center anchor buttons to + anchor the rectangle to the middle right margin of the screen. + + \o In the code editor, modify the pointer to the clicked expression in the + mouse area element. The following expression sets the state to \e State1: + + \c {onClicked: page.state = 'State1'} + + You will create State1 later. + + \endlist + + \o Select topLeftRect2 and edit its properties: + + \list a + + \o In the \gui Id field, enter \e bottomLeftRect. + + \o In \gui {Layout}, select the bottom and left anchor buttons to + anchor the rectangle to the bottom left margin of the screen. + + \o In the code editor, modify the pointer to a clicked expression in the + mouse area element. The following expression sets the state to \e State2: + + \c {onClicked: page.state = 'State2'} + + You will create State2 later. + + \endlist + + \o Press \key {Ctrl+R} to run the application in the QML Viewer. \endlist - The HelloWorld project now contains the necessary files. - The \gui Projects pane in the \gui Sidebar displays the project files: + \image qmldesigner-tutorial.png "States and transitions example" - \image qmldesigner-new-project-contents.png "HelloWorld project contents" + You should see the user icon in the top left rectangle, and two additional + rectangles in the center right and bottom left of the screen. - The main.qml file contains the following example code that specifies a rectangle - and a label that contains - the text \bold {Hello World}. + You can now create additional states to add views to the application. - \code + \section1 Adding Views - import Qt 4.7 + In the .qml file, you already created pointers to two additional states: + State1 and State2. To create the states: - Rectangle { - width: 200 - height: 323 - Text { - text: "Hello World" - anchors.centerIn: parent - } - } + \list 1 - \endcode + \o Click the empty slot in the \gui States pane to create State1. + + \o Drag and drop the user icon on top of middleRightRect. + + \image qmldesigner-tutorial-state1.png "State 1" - Your application is now ready. + \o Click the empty slot in the \gui States pane to create State2. - \section1 Building and Running the Application + \o Drag and drop the user icon on top of bottomLeftRect. - Press \key {Ctrl+R} to run the application on the desktop. + \o Press \key {Ctrl+R} to run the application in the QML Viewer. - \image qmldesigner-helloworld.png "Hello World" + \endlist + + Click the rectangles to move the user icon from one rectangle to another. - \section1 Changing Hello World Properties + \section1 Adding Animation to the View - To experiment with QML and to try some of the code editor features, change the - properties of the rectangle and text. + Add transitions to define how the properties change when the user icon moves + between states. The transitions apply animations to the user icon. For example, + the user icon bounces back when it moves to the middleRightRect and eases into + bottomLeftRect. Add the transitions in the code editor. \list 1 - \o Move the cursor on \gui Rectangle and click - \inlineimage qml-toolbar-indicator.png - to open the Qt Quick toolbar for rectangles: + \o In the code editor, add the following code to specify that when moving to + State1, the x and y coordinates of the user icon change linearly over a duration + of 1 second: + + \code + + transitions: [ + Transition { + from: "*"; to: "State1" + NumberAnimation { + properties: "x,y"; + duration: 1000 + } + }, + + \endcode + + \o You can use the Qt Quick toolbar for animation to change the easing curve + type from linear to OutBounce: + + \list a + + \o Select NumberAnimation and click + \inlineimage qml-toolbar-indicator.png + to open the toolbar: + + \image qmldesigner-tutorial-quick-toolbar.png "Qt Quick toolbar for animation" - \image qml-toolbar-rectangle.png "Qt Quick Toolbar for rectangles" + \o In the \gui Easing field, select \gui Bounce. - \o Click the \gui Color box to select a color in the color picker, and click - \gui Apply. + \o In the \gui Subtype field, select \gui Out. - \o Move the cursor on \gui Text and and click - \inlineimage qml-toolbar-indicator.png - to open the Qt Quick toolbar for text: + \endlist + + \o Add the following code to specify that when moving to State2, the x and y + coordinates of the user icon change over a duration of 2 seconds, + and an InOutQuad easing function is used: + + \code + + Transition { + from: "*"; to: "State2" + NumberAnimation { + properties: "x,y"; + easing.type: Easing.InOutQuad; + duration: 2000 + } + }, + + \endcode - \image qml-toolbar-text.png "Qt Quick Toolbar for text" + \o Add the following code to specify that for any other state changes, the x + and y coordinates of the user icon change linearly over a duration of 200 + milliseconds: - \o Click the \gui Color box to select a color in the color picker, and click - \gui Apply. + \code + + Transition { + NumberAnimation { + properties: "x,y"; + duration: 200 + } + } + + \endcode + + \o Press \key {Ctrl+R} to run the application in the QML Viewer. \endlist - Try adding another rectangle to the \gui Rectangle. When you start to type, - the code completion feature of the code editor suggests properties, IDs, and - code snippets to complete the code. Select an item in the list and press - \key Tab or \key Enter to complete the code. + Click the rectangles to view the animated transitions. + + \section1 Deploying the Application to Mobile Devices - The code editor checks the code syntax and underlines syntax errors. - Move the cursor over an error to display detailed information about it. + To deploy the application to mobile devices, use the \gui {Qt Quick Application} wizard + to convert it into a Qt Quick application. For more information, see + \l{Importing QML Applications}. */ diff --git a/share/qtcreator/rss/featured.rss b/share/qtcreator/rss/featured.rss index 54626bcf015429f78d1ad07197d355e29edb50c1..eaa181fbd117caf9552b2868d778647c9a0b6039 100644 --- a/share/qtcreator/rss/featured.rss +++ b/share/qtcreator/rss/featured.rss @@ -7,14 +7,14 @@ <lastBuildDate>Fri, 17 Sep 2010 10:30:00 GMT</lastBuildDate> <language>en-us</language> <item> - <title>How to create a Qt C++ application</title> + <title>How to create a Qt Quick application</title> <category>Tutorial</category> - <link>qthelp://com.nokia.qtcreator/doc/creator-writing-program.html</link> - <guid>qthelp://com.nokia.qtcreator/doc/creator-writing-program.html</guid> + <link>qthelp://com.nokia.qtcreator/doc/creator-qml-application.html</link> + <guid>qthelp://com.nokia.qtcreator/doc/creator-qml-application.html</guid> <pubDate>Mon, 12 Sep 2005 18:37:00 GMT</pubDate> - <description><![CDATA[ This tutorial describes how to use Qt Creator to create a small Qt application, Text Finder. ]]></description> + <description><![CDATA[ This tutorial describes how to use the Qt Creator to implement the states and transitions example application. ]]></description> <image> - <link>images/qtcreator-textfinder-screenshot.png</link> + <link>images/qtquick.png</link> </image> </item> </channel> diff --git a/share/qtcreator/rss/images/qtcreator-textfinder-screenshot.png b/share/qtcreator/rss/images/qtcreator-textfinder-screenshot.png deleted file mode 100644 index 103e96cc6c7b7fac334e43d990044c0d0bba897e..0000000000000000000000000000000000000000 Binary files a/share/qtcreator/rss/images/qtcreator-textfinder-screenshot.png and /dev/null differ diff --git a/share/qtcreator/rss/images/qtquick.png b/share/qtcreator/rss/images/qtquick.png new file mode 100644 index 0000000000000000000000000000000000000000..0f02f2a404089eddc005ec7c2ce7dd9398279000 Binary files /dev/null and b/share/qtcreator/rss/images/qtquick.png differ diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index 3dfa74c5b9c13d3fe753f39b3320acea1ff2ca6d..a119db3da9a4616c88616de118f9202c159f8e23 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -19347,8 +19347,9 @@ Server: %2.</translation> <translation></translation> </message> <message> - <source>The CDB debug engine does not support the '%1</source> - <translation></translation> + <source>The CDB debug engine does not support the %1 toolchain.</source> + <extracomment>%1 is something like "GCCE" or "Intel C++ Compiler (Linux)" (see ToolChain context)</extracomment> + <translation>Der CDB-Debugger unterstützt die Toolchain '%1' nicht.</translation> </message> </context> <context> diff --git a/share/qtcreator/translations/qtcreator_fr.ts b/share/qtcreator/translations/qtcreator_fr.ts index 3d1ae5d6801681270acce0c4aa4e9f290da9b68a..b0f5888ee1f8999e93febe2c36caf42035250e8d 100644 --- a/share/qtcreator/translations/qtcreator_fr.ts +++ b/share/qtcreator/translations/qtcreator_fr.ts @@ -26700,8 +26700,9 @@ La liste du serveur était %2.</translation> <translation>Point d'observation : %1</translation> </message> <message> - <source>The CDB debug engine does not support the '%1</source> - <translation>Le moteur de débogage CDB ne supporte pas le '%1'</translation> + <source>The CDB debug engine does not support the %1 toolchain.</source> + <extracomment>%1 is something like "GCCE" or "Intel C++ Compiler (Linux)" (see ToolChain context)</extracomment> + <translation type="unfinished">Le moteur de débogage CDB ne supporte pas le '%1'</translation> </message> </context> <context> diff --git a/share/qtcreator/translations/qtcreator_ja.ts b/share/qtcreator/translations/qtcreator_ja.ts index 61a7f76303f4ef11eb00b6268e17c13560991580..96741629a06aaf30bd0378bdacb3267a51bd6c1d 100644 --- a/share/qtcreator/translations/qtcreator_ja.ts +++ b/share/qtcreator/translations/qtcreator_ja.ts @@ -22593,8 +22593,9 @@ Server list was %2.</source> <translation>監視ãƒã‚¤ãƒ³ãƒˆ: %1</translation> </message> <message> - <source>The CDB debug engine does not support the '%1</source> - <translation>CDB デãƒãƒƒã‚° エンジン㯠'%1' をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“</translation> + <source>The CDB debug engine does not support the %1 toolchain.</source> + <extracomment>%1 is something like "GCCE" or "Intel C++ Compiler (Linux)" (see ToolChain context)</extracomment> + <translation type="unfinished">CDB デãƒãƒƒã‚° エンジン㯠'%1' をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“</translation> </message> </context> <context> diff --git a/share/qtcreator/translations/qtcreator_pl.ts b/share/qtcreator/translations/qtcreator_pl.ts index 358d91e91a86b6cad02622f88372e00ff5220b9c..84e67fb7c6a986f5b85e505c7498570322b08d80 100644 --- a/share/qtcreator/translations/qtcreator_pl.ts +++ b/share/qtcreator/translations/qtcreator_pl.ts @@ -19824,12 +19824,9 @@ Lista serwera: %2.</translation> <translation>Warunkowa puÅ‚apka: %1</translation> </message> <message> - <source>The CDB debug engine does not support the '%1'</source> - <translation>Silnik debuggera CDB nie obsÅ‚uguje "%1'"</translation> - </message> - <message> - <source>The CDB debug engine does not support the '%1</source> - <translation type="obsolete">Silnik debuggera CDB nie obsÅ‚uguje "%1"</translation> + <source>The CDB debug engine does not support the %1 toolchain.</source> + <extracomment>%1 is something like "GCCE" or "Intel C++ Compiler (Linux)" (see ToolChain context)</extracomment> + <translation>Silnik debuggera CDB nie obsÅ‚uguje zestawu narzÄ™dzi "%1".</translation> </message> </context> <context> diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index a5e385a00b20f1e0ba8613add19e41784e0ebd89..3387c1fda689c57aff40790369f4abe935da5135 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -4222,8 +4222,9 @@ Qt Creator не может подключитьÑÑ Ðº нему.</translation> <translation>Точка наблюдениÑ: %1</translation> </message> <message> - <source>The CDB debug engine does not support the '%1</source> - <translation>Движок отладчика CDB не поддерживает "%1"</translation> + <source>The CDB debug engine does not support the %1 toolchain.</source> + <extracomment>%1 is something like "GCCE" or "Intel C++ Compiler (Linux)" (see ToolChain context)</extracomment> + <translation type="unfinished">Движок отладчика CDB не поддерживает "%1"</translation> </message> </context> <context> diff --git a/share/qtcreator/translations/translations.pro b/share/qtcreator/translations/translations.pro index 27da7ba2d5d14d6b13a38756c83619cc880c0e1a..684f7d42608bfa6c4ecd25aefaba48e9c0db4eca 100644 --- a/share/qtcreator/translations/translations.pro +++ b/share/qtcreator/translations/translations.pro @@ -1,6 +1,6 @@ include(../../../qtcreator.pri) -LANGUAGES = de fr ja ru +LANGUAGES = de fr ja pl ru # var, prepend, append defineReplace(prependAll) { diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index 0cf64de1eae6e1da67ffbea9744afc5f9e862cb5..b1fa28a28d6706beb930fd704a5241e51f158aa5 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -933,7 +933,8 @@ bool QmlObjectValue::hasChildInPackage() const while (it.hasNext()) { it.next(); const FakeMetaObject *other = it.value()->_metaObject; - if (other->exports().isEmpty()) + // if it has only the default no-package export, it is not really exported + if (other->exports().size() <= 1) continue; for (const FakeMetaObject *iter = other; iter; iter = iter->superClass()) { if (iter == _metaObject) // this object is a parent of other diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 1f18fe79a5b7ad1ce1fc633ee8c5ea503b3bd62e..5aa2146bdd286050133f42c4a383f8abd22674b3 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -1751,7 +1751,8 @@ bool checkCdbConfiguration(int toolChainI, QString *errorMsg, QString *settingsP case ProjectExplorer::ToolChain::INVALID: break; default: - *errorMsg = CdbEngine::tr("The CDB debug engine does not support the '%1"). + //: %1 is something like "GCCE" or "Intel C++ Compiler (Linux)" (see ToolChain context) + *errorMsg = CdbEngine::tr("The CDB debug engine does not support the %1 toolchain."). arg(ProjectExplorer::ToolChain::toolChainName(toolChain)); *settingsPage = CdbOptionsPage::settingsId(); return false; diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index f9bc025075347a40388ea8cc777daab0b3d9fef4..a867d7f971705d4dcf398a5810559c856cd6c454 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -772,6 +772,9 @@ HelpViewer* HelpPlugin::viewerForContextMode() { using namespace Core; + if (m_core->modeManager()->currentMode()->id() == Core::Constants::MODE_WELCOME) + m_core->modeManager()->activateMode(Core::Constants::MODE_EDIT); + bool showSideBySide = false; RightPanePlaceHolder *placeHolder = RightPanePlaceHolder::current(); switch (contextHelpOption()) { diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp index 579fa1d5865fa2cc65640a2f195db40bf2be939b..abbb818a117f8928bddc2a62804f213e49e32202 100644 --- a/src/plugins/qmljseditor/qmljseditor.cpp +++ b/src/plugins/qmljseditor/qmljseditor.cpp @@ -404,14 +404,14 @@ protected: virtual bool visit(AST::UiObjectBinding *ast) { - if (ast->initializer) + if (ast->initializer && ast->initializer->lbraceToken.length) _ranges.append(createRange(ast, ast->initializer)); return true; } virtual bool visit(AST::UiObjectDefinition *ast) { - if (ast->initializer) + if (ast->initializer && ast->initializer->lbraceToken.length) _ranges.append(createRange(ast, ast->initializer)); return true; } diff --git a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp index bd1f95719c417f93e5eba51df473e02da472b8de..12a04588c0462a95af037167376b99b93ed94460 100644 --- a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp +++ b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp @@ -524,7 +524,6 @@ void GettingStartedWelcomePageWidget::showFeature(int feature) ui->detailsLabel->show(); ui->detailsLabel->setOpenExternalLinks(true); } - ui->featuredImage->setScaledContents(true); } void GettingStartedWelcomePageWidget::slotNextFeature() diff --git a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui index e0b8f48e7b5e7f7d9072d6880116d96efac79964..d04f47be194b9736c20a8fca9b422825187591f9 100644 --- a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui +++ b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui @@ -389,6 +389,12 @@ </item> <item> <widget class="QFrame" name="featureFrame"> + <property name="minimumSize"> + <size> + <width>200</width> + <height>0</height> + </size> + </property> <property name="maximumSize"> <size> <width>200</width> @@ -435,6 +441,9 @@ border-bottom: 1px solid "#C9C9C9"; <property name="text"> <string notr="true"/> </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> </widget> </item> <item> diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp index 8f782bd792c6fe5ae8a9eb53d2d82f9a0b6d9527..2808520c167e85e4d641a5a6ec74474073fc4ee9 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp @@ -56,6 +56,7 @@ #include <qt4project.h> #include <qt4target.h> +#include <QtCore/QDateTime> #include <QtCore/QProcess> #include <QtCore/QProcessEnvironment> #include <QtCore/QRegExp> @@ -401,9 +402,8 @@ bool MaemoPackageCreationStep::packagingNeeded() const const int deployableCount = deployables->deployableCount(); for (int i = 0; i < deployableCount; ++i) { - if (packageInfo.lastModified() - <= QFileInfo(deployables->deployableAt(i).localFilePath) - .lastModified()) + if (isFileNewerThan(deployables->deployableAt(i).localFilePath, + packageInfo.lastModified())) return true; } @@ -423,6 +423,25 @@ bool MaemoPackageCreationStep::packagingNeeded() const return false; } +bool MaemoPackageCreationStep::isFileNewerThan(const QString &filePath, + const QDateTime &timeStamp) const +{ + QFileInfo fileInfo(filePath); + if (!fileInfo.exists() || fileInfo.lastModified() >= timeStamp) + return true; + if (fileInfo.isDir()) { + const QStringList dirContents = QDir(filePath) + .entryList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot); + foreach (const QString &curFileName, dirContents) { + const QString curFilePath + = filePath + QLatin1Char('/') + curFileName; + if (isFileNewerThan(curFilePath, timeStamp)) + return true; + } + } + return false; +} + QString MaemoPackageCreationStep::packageFilePath() const { QString error; diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h index ed5fe6efb950ec524db3b56f4cd5db98b8b76243..bacd7ec4779722b4de03f5d5e2d65ebd75b24e39 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h @@ -45,6 +45,7 @@ #include <projectexplorer/buildstep.h> QT_BEGIN_NAMESPACE +class QDateTime; class QFile; class QProcess; QT_END_NAMESPACE @@ -112,6 +113,8 @@ private: QString targetRoot() const; static QString nativePath(const QFile &file); bool packagingNeeded() const; + bool isFileNewerThan(const QString &filePath, + const QDateTime &timeStamp) const; void raiseError(const QString &shortMsg, const QString &detailedMsg = QString()); QString buildDirectory() const; diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp index 16db4f4386977cb5f78b4a880c591a21466ce9ae..db29a62e8288dab35fd422bbe3abb7f7d5b40df3 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp @@ -223,9 +223,11 @@ void MaemoSshRunner::handleUnmounted() mount(); break; case PostRunCleaning: - case StopRequested: + case StopRequested: { m_mounter->resetMountSpecifications(); - if (m_state == StopRequested) { + const bool stopRequested = m_state == StopRequested; + setState(Inactive); + if (stopRequested) { emit remoteProcessFinished(InvalidExitCode); } else if (m_exitStatus == SshRemoteProcess::ExitedNormally) { emit remoteProcessFinished(m_runner->exitCode()); @@ -233,8 +235,8 @@ void MaemoSshRunner::handleUnmounted() emit error(tr("Error running remote process: %1") .arg(m_runner->errorString())); } - setState(Inactive); break; + } default: ; } } @@ -338,8 +340,8 @@ void MaemoSshRunner::setState(State newState) void MaemoSshRunner::emitError(const QString &errorMsg) { if (m_state != Inactive) { - emit error(errorMsg); setState(Inactive); + emit error(errorMsg); } }