Merge remote-tracking branch 'origin/2.7'

Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: Ie71d0d5aebdd1406d94de348bcd4cfcc203a1ba9
This commit is contained in:
Eike Ziller
2013-03-08 11:39:33 +01:00
132 changed files with 4808 additions and 1587 deletions

2
.gitignore vendored
View File

@@ -32,6 +32,7 @@ Thumbs.db
*.res *.res
*.rc *.rc
*.embed.manifest *.embed.manifest
/.qmake.cache
# qtcreator generated files # qtcreator generated files
*.pro.user* *.pro.user*
@@ -138,6 +139,7 @@ tmp/
/tests/auto/cplusplus/checksymbols/tst_checksymbols /tests/auto/cplusplus/checksymbols/tst_checksymbols
/tests/auto/cplusplus/codegen/tst_codegen /tests/auto/cplusplus/codegen/tst_codegen
/tests/auto/cplusplus/cxx11/tst_cxx11 /tests/auto/cplusplus/cxx11/tst_cxx11
/tests/auto/cplusplus/lexer/tst_lexer
/tests/auto/cplusplus/misc/tst_misc /tests/auto/cplusplus/misc/tst_misc
/tests/auto/cplusplus/simplifytypes/tst_simplifytypes /tests/auto/cplusplus/simplifytypes/tst_simplifytypes
/tests/auto/cplusplus/ast/tst_ast /tests/auto/cplusplus/ast/tst_ast

View File

@@ -6,6 +6,7 @@ PRE_TARGETDEPS = $$PWD/qtcreator.sh
QMAKE_LINK = cp $$PWD/qtcreator.sh $@ && : IGNORE REST OF LINE: QMAKE_LINK = cp $$PWD/qtcreator.sh $@ && : IGNORE REST OF LINE:
QMAKE_STRIP = QMAKE_STRIP =
CONFIG -= qt separate_debug_info gdb_dwarf_index
QMAKE_CLEAN = qtcreator.sh QMAKE_CLEAN = qtcreator.sh

View File

@@ -3,7 +3,6 @@
<Name>Qt Creator</Name> <Name>Qt Creator</Name>
<Version>{version}</Version> <Version>{version}</Version>
<Title>Qt Creator {version}</Title> <Title>Qt Creator {version}</Title>
<MaintenanceTitle>Qt Creator Maintenance</MaintenanceTitle>
<Publisher>Qt Project</Publisher> <Publisher>Qt Project</Publisher>
<ProductUrl>http://qt-project.org</ProductUrl> <ProductUrl>http://qt-project.org</ProductUrl>

View File

@@ -3,7 +3,6 @@
<Name>Qt Creator</Name> <Name>Qt Creator</Name>
<Version>{version}</Version> <Version>{version}</Version>
<Title>Qt Creator {version}</Title> <Title>Qt Creator {version}</Title>
<MaintenanceTitle>Qt Creator Maintenance</MaintenanceTitle>
<Publisher>Qt Project</Publisher> <Publisher>Qt Project</Publisher>
<ProductUrl>http://qt-project.org</ProductUrl> <ProductUrl>http://qt-project.org</ProductUrl>

View File

@@ -1,19 +0,0 @@
# Add more folders to ship with the application, here
folder_01.source = qml/Transitions
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01
# Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
# CONFIG += mobility
# MOBILITY +=
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
include(qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()

View File

@@ -1,14 +0,0 @@
#include <QApplication>
#include "qmlapplicationviewer.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
viewer.setMainQmlFile(QLatin1String("qml/Transitions/main.qml"));
viewer.showExpanded();
return app.exec();
}

View File

@@ -4,7 +4,7 @@
//! [0] //! [0]
import QtQuick 1.1 import QtQuick 2.0
Rectangle { Rectangle {
id: page id: page

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
doc/images/qtcreator-deploy-android.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 95 KiB

BIN
doc/images/qtcreator-options-android.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -32,7 +32,8 @@
installed on the development PC, you can add it to \QC. You can then add a installed on the development PC, you can add it to \QC. You can then add a
\l{glossary-buildandrun-kit}{kit} \l{glossary-buildandrun-kit}{kit}
with the Android device type, the tool chain, and the Qt version for Android, with the Android device type, the tool chain, and the Qt version for Android,
to build and run applications on Android devices. to build and run applications on Android devices. You can also allow \QC to
automatically configure the kit.
The Android Debug Bridge (adb) command line tool is integrated to \QC to The Android Debug Bridge (adb) command line tool is integrated to \QC to
enable you to deploy applications to connected Android devices, to run enable you to deploy applications to connected Android devices, to run
@@ -65,8 +66,13 @@
\c {ant -version} \c {ant -version}
\li \l{http://necessitas.kde.org/necessitas/necessitas_sdk_installer.php} \li A tool chain for building applications for Android devices. You have
{Necessitas SDK} several options, such as the
\l{http://developer.android.com/sdk/index.html}{Android SDK} and
\l{http://developer.android.com/tools/sdk/ndk/index.html}
{Android NDK} from Google or the
\l{http://necessitas.kde.org/necessitas/necessitas_sdk_installer.php}
{Necessitas SDK}.
\endlist \endlist
@@ -80,31 +86,26 @@
\list 1 \list 1
\li Select \gui Tools > \gui Options > \gui {Build & Run} > \li Select \gui Tools > \gui Options > \gui {Build & Run} >
\gui {Qt Versions} > \gui Add to add Qt for Android. \gui {Qt Versions} > \gui Add to add the path to \c qmake path in
the Qt for Android SDK.
\li In the \gui {qmake location} field, add the \c qmake path from the
Qt for Android SDK
(\c {/opt/necessitas/Android/<qtversion>/bin/qmake} by default).
\li Select \gui Tools > \gui Options > \gui Android to view and edit \li Select \gui Tools > \gui Options > \gui Android to view and edit
paths to the required software. paths to the required software.
\image qtcreator-options-android.png "Android options" \image qtcreator-options-android.png "Android options"
\li Select \gui Tools > \gui Options > \gui {Build & Run} > \li Select the \gui {Automatically create kits for Android tool chains}
\gui {Qt Versions} and build the GDB Helper to make the debugging check box to allow \QC to create the kits for you. \QC displays a
output for Qt specific constructs clean and easy to read. warning if it cannot find a suitable Qt version.
\li To build the GDB Helper, select Qt for Android, select \gui Details
in the \gui Helpers section, and then select \gui Build in the
\gui {GDB Helper} field.
\li Select \gui {Start Android AVD Manager} to create Android virtual \li Select \gui {Start Android AVD Manager} to create Android virtual
devices (AVD) that enable you emulate device hardware and software devices (AVD) that enable you to emulate device hardware and software
on the Android Emulator. on the Android Emulator.
\li To specify information for the Android manifest file, select \li To specify information for the Android manifest file, select
\gui Projects > \gui Run, and then select \gui Details to view the \gui Projects > \gui Run for the \gui Android kit.
\li Select \gui Details to view the
\gui {Package configurations}. For more information about the \gui {Package configurations}. For more information about the
options you have, see options you have, see
\l{Specifying Run Settings for Android Devices}. \l{Specifying Run Settings for Android Devices}.

View File

@@ -30,29 +30,23 @@
\image qtcreator-deploy-android.png "Deploy configurations" \image qtcreator-deploy-android.png "Deploy configurations"
Select the \gui {Use device's Qt libs} option to use Qt libraries installed Select the \gui {Use Qt libraries from device} option to use Qt libraries installed
on the device. If you do not select the \gui {Use local Qt libs} option, on the device. If you also select the \gui {Use local Qt libraries} check box, \QC passes
the application needs the Ministro package to run. However, if you select special parameters to the application, forcing it to use Qt libraries from the
the \gui {Use local Qt libs} option, \QC passes special parameters to the \c{/data/local/tmp/qt} folder on the device. If you do not select it, the application needs
application, forcing it to use Qt libraries from the \c{/data/local/qt} the Ministro package to run.
folder on the device
Select the \gui {Deploy local Qt libs} option to deploy Qt libraries from Select the \gui {Deploy local Qt libraries} option to deploy Qt libraries from
the specified Qt for Android SDK (for exmple, android-lighthouse-4.8.0). the specified Qt for Android SDK (for example, android-lighthouse-4.8.0).
This option enables you to develop on the Qt framework to test it. This option enables you to develop on the Qt framework to test it. This
option automatically selects the \gui {Use local Qt libraries} check box, but you
The \gui {Deploy local Qt libs} option automatically selects the can use it also independently.
\gui {Use local Qt libs} option. It is deselected automatically after \QC
pushes the Qt libs to the device. Select the option again to push your local
Qt modifications to devices. This option takes the same effect as the
\c{push_qt_libs.sh} script thas is located in the root folder of the
Qt for Android SDK. You can also use the \gui {Use local Qt libs}
independently of the \gui {Deploy local Qt libs} option.
\section1 Installing Ministro \section1 Installing Ministro
To install Ministro, select the \gui {Install Ministro system} option. You To install Ministro, select the \gui {Install Ministro, system-wide Qt shared
can also use it to install any Android package (.apk). You can use this libraries installer} option. You
can use this option also to install any Android package (.apk). You can use this
option to install applications on an Android Virtual Device (AVD). Download option to install applications on an Android Virtual Device (AVD). Download
the Ministro .apk from the Google Market or from the the Ministro .apk from the Google Market or from the
\l{http://necessitas.kde.org/necessitas/ministro.php}{Ministro} home page. \l{http://necessitas.kde.org/necessitas/ministro.php}{Ministro} home page.

View File

@@ -153,16 +153,12 @@
\section1 Executing JavaScript Expressions \section1 Executing JavaScript Expressions
When the application is interrupted by a breakpoint, you can use the When the application is interrupted by a breakpoint, you can use the
\gui {Console} to execute JavaScript expressions in the current \gui {QML/JS Console} to execute JavaScript expressions in the current
context. To open it, choose \gui {Window > Views > Console}. context. To open it, choose \gui Window > \gui {Output Panes} > \gui {QML/JS Console}.
\image qml-script-console.png "Console view" \image qml-script-console.png "QML/JS Console"
You can type JavaScript expressions and use them to get information about For more information about using the console, see \l{QML/JS Console}.
the state or your application. You can change property values temporarily,
without editing the source, and view the results in the running application.
You can change the property values permanently in the code editor.
\section1 Applying QML Changes at Runtime \section1 Applying QML Changes at Runtime

View File

@@ -1761,7 +1761,7 @@
\li Forward-declared class or struct \li Forward-declared class or struct
\row \row
\li Add Definition in 'filename' \li Add Definition in 'filename'
\li Inserts a definition stub for a member function declaration in the \li Inserts a definition stub for a function declaration in the
implementation file. The definition is placed after that of the implementation file. The definition is placed after that of the
preceding declaration. Qualified names are minimized when possible, preceding declaration. Qualified names are minimized when possible,
instead of always being fully expanded. instead of always being fully expanded.

View File

@@ -30,24 +30,27 @@
\title Showing Task List Files in Issues Pane \title Showing Task List Files in Issues Pane
Code scanning and analysis tools create report files in ASCII format. You can use code scanning and analysis tools to examine source code. These
Usually, the report files consist of lines that contain a file name, a line tools report issues for you to fix. \QC enables you to load lists of
number, and an error message. A similar format is used for stack traces issues into the \gui Issues pane for easier navigation.
obtained from crash reports. Traditionally, you would fix the errors by
manually navigating to them and correcting them, which is tedious.
\QC makes this very easy by providing a way to load these files into \QC expects tasks to be defined in a simple line-based file format that is
the \gui{Issues} pane. You can navigate to the corresponding source easy to generate using scripts. The scripts can either convert reports from
code by clicking the error message. But first you must convert the files to other tools or create lists of issues in the \l{Task List File Format}
the \l{Task List File Format} by using conversion scripts that based on {task list format} from code. For an example of a script that checks new
standard text processing tools of the operating system. lines of code and matches them against regular expressions to generate a
task list, see \c{scripts\mytasks.pl} in the \QC repository.
In addition, you can generate task list files from code. For an example of a \section1 Managing Task List Entries
script that checks new lines of code and matches them against regular
expressions to generate a task list, see \c{scripts\mytasks.pl} in the \QC
repository.
To open task list files, choose \gui{File} > \gui{Open}. To open task list files in the \gui Issues pane, choose \gui File >
\gui Open. Right-click a task list entry to open a context menu that
contains commands for managing the entry. You can copy or remove task list
entries or navigate to the corresponding source code.
\QC monitors the loaded files and displays the changes in the \gui Issues
pane. To keep the current entries in a task list, but stop checking for
changes, select \gui {Stop Monitoring}.
\section1 Task List File Format \section1 Task List File Format

View File

@@ -197,9 +197,7 @@
If you cannot see a file in the \gui Projects view, switch to the If you cannot see a file in the \gui Projects view, switch to the
\gui {File System} view, which shows all the files in the file system. \gui {File System} view, which shows all the files in the file system.
To also show hidden files, click To also show hidden files, select \gui {Filter Files} > \gui {Show Hidden Files}.
\inlineimage qtcreator-filter.png
and select \gui {Filter Files} > \gui {Show Hidden Files}.
To keep the position in the tree synchronized with the file To keep the position in the tree synchronized with the file
opened in the editor, select \gui {Synchronize with Editor}. opened in the editor, select \gui {Synchronize with Editor}.
@@ -244,6 +242,8 @@
\li \gui{Compile Output} \li \gui{Compile Output}
\li \gui {QML/JS Console}
\li \gui {To-Do Entries} \li \gui {To-Do Entries}
\li \gui{Version Control} \li \gui{Version Control}
@@ -300,10 +300,14 @@
\image qtcreator-build-issues.png \image qtcreator-build-issues.png
Right-clicking on a line brings up a context menu with options to copy Right-clicking on a line brings up a context menu with options to remove a line, copy
the contents and to show a version control annotation view of the line its contents, or to show a version control annotation view of the line
that causes the error message. that causes the error message.
To navigate to the corresponding source code, click an issue or
select \gui {Show in Editor} in the context menu. The entry must contain the
name of the file where the issue was found.
To jump from one issue to the next or previous one, press \key F6 and To jump from one issue to the next or previous one, press \key F6 and
\key Shift+F6. \key Shift+F6.
@@ -345,6 +349,17 @@
Select the \gui {Cancel Build} button to cancel the build. Select the \gui {Cancel Build} button to cancel the build.
\section2 QML/JS Console
In the \gui {QML/JS Console}, you can type JavaScript expressions and use them to get
information about the state of your application during debugging. You can change property
values temporarily, without editing the source, and view the results in the running
application.
\image qml-script-console.png "QML/JS Console"
You can change the property values permanently in the code editor.
\section2 To-Do List \section2 To-Do List
The \gui {To-Do List Entries} pane lists the BUG, FIXME, NOTE, TODO, and The \gui {To-Do List Entries} pane lists the BUG, FIXME, NOTE, TODO, and

View File

@@ -27,7 +27,7 @@
\gui {Application Output} view. \gui {Application Output} view.
Choose \gui {Projects > Embedded Linux > Run} to view the settings for deploying Choose \gui {Projects > Embedded Linux > Run} to view the settings for deploying
the application on the connected device. For more information, see the application to the connected device. For more information, see
\l{Specifying Run Settings for Linux-Based Devices}. \l{Specifying Run Settings for Linux-Based Devices}.
Debugging works transparently if GDB server is installed on the device and Debugging works transparently if GDB server is installed on the device and

View File

@@ -34,7 +34,7 @@
\gui {Application Output} view. \gui {Application Output} view.
Choose \gui {Projects > Maemo Run} to view the settings for deploying the Choose \gui {Projects > Maemo Run} to view the settings for deploying the
application on the connected device and creating the installation package. application to the connected device and creating the installation package.
For more information, see For more information, see
\l{Specifying Run Settings for Linux-Based Devices}. \l{Specifying Run Settings for Linux-Based Devices}.

View File

@@ -39,7 +39,7 @@
\li \l{Deploying Applications to Android Devices} \li \l{Deploying Applications to Android Devices}
When you deploy the application on an Android device, \QC copies When you deploy the application to an Android device, \QC copies
the application files to the device. In addition, you can determine the application files to the device. In addition, you can determine
the Qt libraries to use. the Qt libraries to use.
\li \l{Deploying Applications to BlackBerry 10 Devices} \li \l{Deploying Applications to BlackBerry 10 Devices}
@@ -49,7 +49,7 @@
device. device.
\li \l{Deploying Applications to Linux-Based Devices} \li \l{Deploying Applications to Linux-Based Devices}
When you deploy the application on a Linux-based device, such When you deploy the application to a Linux-based device, such
as embedded Linux, MeeGo 1.2 Harmattan, or Maemo 5/Fremantle, \QC as embedded Linux, MeeGo 1.2 Harmattan, or Maemo 5/Fremantle, \QC
copies the application files to the connected device. You copies the application files to the connected device. You
can test and debug the application on the device. can test and debug the application on the device.
@@ -57,9 +57,9 @@
Maemo 5/Fremantle devices. Maemo 5/Fremantle devices.
\li \l{Deploying Applications to QNX Devices} \li \l{Deploying Applications to QNX Devices}
When you deploy the application on a BlackBerry, \QC generates a When you deploy the application to a BlackBerry, \QC generates a
BAR package in the build directory and deploys it to the connected BAR package in the build directory and deploys it to the connected
device. When you deploy it on a QNX Neutrino device, \QC copies device. When you deploy it to a QNX Neutrino device, \QC copies
the application files to the connected device. You can test and the application files to the connected device. You can test and
debug the application on the device. debug the application on the device.
\endlist \endlist

View File

@@ -24,7 +24,7 @@
/*! /*!
\contentspage index.html \contentspage index.html
\previouspage creator-glossary.html \previouspage index.html
\page creator-getting-started.html \page creator-getting-started.html
\nextpage creator-overview.html \nextpage creator-overview.html

View File

@@ -47,14 +47,15 @@
Qt applications for Android are compiled as \c {shared objects} that Qt applications for Android are compiled as \c {shared objects} that
are loaded by a Java launcher generated by the Qt for Android SDK. are loaded by a Java launcher generated by the Qt for Android SDK.
This is totally transparent to users. As Qt is composed of libraries This is totally transparent to users. As Qt is composed of libraries
referencing each other, Qt applications are only supported on referencing each other, Qt 4 applications are only supported on
Android version 1.6, or later. You must install the Qt for Android Android version 1.6, or later, and Qt 5 applications on version
SDK to develop for Android devices. 2.3.3, or later. You must install the Qt for Android SDK to develop
for Android devices.
\li \l{Connecting BlackBerry 10 Devices} \li \l{Connecting BlackBerry 10 Devices}
\QC enables you to develop, deploy and debug your Qt applications \QC enables you to develop, deploy and debug your Qt applications
on BlackBerry 10. to BlackBerry 10.
You need to install the BlackBerry 10 NDK which contains a pre-built Qt. You need to install the BlackBerry 10 NDK which contains a pre-built Qt.
You also need either a BlackBerry 10 device or the simulator. You also need either a BlackBerry 10 device or the simulator.

View File

@@ -33,10 +33,10 @@
\QC is an integrated development environment (IDE) that provides you with \QC is an integrated development environment (IDE) that provides you with
tools to design and develop applications with the Qt application framework. tools to design and develop applications with the Qt application framework.
Qt is designed for developing applications and user interfaces once and Qt is designed for developing applications and user interfaces once and
deploying them across several desktop and mobile operating systems. \QC deploying them to several desktop and mobile operating systems. \QC
provides you with tools for accomplishing your tasks throughout the whole provides you with tools for accomplishing your tasks throughout the whole
application development life-cycle, from creating a project to deploying the application development life-cycle, from creating a project to deploying the
application on the target platforms. application to the target platforms.
\table \table
\row \row

View File

@@ -18,6 +18,8 @@
\li Android \li Android
\li BlackBerry 10
\endlist \endlist
The following table summarizes operating system support for developing The following table summarizes operating system support for developing
@@ -25,8 +27,8 @@
\table \table
\header \header
\li {1,8} Operating system \li {1,9} Operating system
\li {8,1} Platform \li {9,1} Platform
\header \header
\li Desktop \li Desktop
\li \QS \li \QS
@@ -35,6 +37,7 @@
\li Generic Remote Linux \li Generic Remote Linux
\li QNX \li QNX
\li Android \li Android
\li BlackBerry 10
\row \row
\li Windows \li Windows
@@ -45,7 +48,7 @@
\li Yes \li Yes
\li Yes (see \l{Running on QNX Devices} for limitations) \li Yes (see \l{Running on QNX Devices} for limitations)
\li Yes \li Yes
\li Yes
\row \row
\li Linux \li Linux
\li Yes \li Yes
@@ -55,7 +58,8 @@
\li Yes \li Yes
\li Yes \li Yes
\li Yes \li Yes
\row \li Yes
\row
\li Mac OS X \li Mac OS X
\li Yes \li Yes
\li Yes \li Yes
@@ -64,6 +68,7 @@
\li Yes \li Yes
\li Yes \li Yes
\li Yes \li Yes
\li Yes
\endtable \endtable
\note Symbian support has been removed from \QC 2.6. To develop for Symbian, \note Symbian support has been removed from \QC 2.6. To develop for Symbian,

View File

@@ -38,9 +38,9 @@
\list \list
\li \l{Creating a Qt Quick 1 Application} \li \l{Creating a Qt Quick Application}
Learn how to use \QMLD to create a Qt Quick 1 application. Learn how to use \QMLD to create a Qt Quick application.
\li \l{Creating a Qt Widget Based Application} \li \l{Creating a Qt Widget Based Application}

View File

@@ -125,9 +125,9 @@
Use Qt Quick Components for MeeGo Harmattan to design a user Use Qt Quick Components for MeeGo Harmattan to design a user
interface with the platform look and feel interface with the platform look and feel
\li Qt Quick 1 Application (from Existing QML File) \li Qt Quick Application (from Existing QML File)
Convert existing Qt Quick 1 applications to projects that you Convert existing Qt Quick applications to projects that you
can run in \QC or deploy to mobile devices can run in \QC or deploy to mobile devices
\li Qt Console Application \li Qt Console Application

View File

@@ -44,6 +44,8 @@
\li Android Device \li Android Device
\li BlackBerry 10 Device
\li Generic Linux Device \li Generic Linux Device
\li Maemo5/Fremantle Device \li Maemo5/Fremantle Device

View File

@@ -52,5 +52,7 @@
\li Create and upload a debug token bar file when adding the device from the wizard. \li Create and upload a debug token bar file when adding the device from the wizard.
\endlist \endlist
\include qnx/creator-key-management-qnx.qdocinc
For more details please refer to the Qt-Project wiki page: \l {http://qt-project.org/wiki/BlackBerry} {http://qt-project.org/wiki/BlackBerry}. For more details please refer to the Qt-Project wiki page: \l {http://qt-project.org/wiki/BlackBerry} {http://qt-project.org/wiki/BlackBerry}.
*/ */

View File

@@ -0,0 +1,93 @@
\section2 Obtaining New Keys
To request keys from the BlackBerry Signing Authority, select
\gui {Tools > Options > BlackBerry > Keys} > \gui {Register}.
Then select the \gui {visiting this page} link, and follow the
instructions.
\image qtcreator-blackberry-obtain-keys.png "Requesting new keys"
\section2 Registering Newly Obtained Keys
After a couple of hours, you should receive two CSJ files, the PBDT and
the RDK files. Once you have received them, you can begin the key
registration using the \gui {Register Key} dialog mentioned above, located
at \gui {Tools > Options > BlackBerry > Keys > Register}.
\image qtcreator-blackberry-registerkeydialog.png "Register Key Dialog"
All you need to do is to browse for the PBDT CSJ file, and the RDK CSJ
file. If both files are located within the same directory, \QC will be
able to guess the path of one of them based on the path of the other one.
\list
\li PBDT CSJ file
The path of the PBDT CSJ file that you received from BlackBerry.
\li RDK CSJ file
The path of the RDK CSJ file that you received from BlackBerry.
\li CSJ PIN
The PIN you entered on the key request form.
\li CSK PIN
This is going to be the password used by the CSK keys.
\endlist
If this is your first run and you do not have a developer certificate yet,
make sure you check the \gui {Generate developer certificate
automatically} checkbox. \gui {Keystore password} refers to the password
used to open the container where the certificate will be stored. It is
common practice to use the same password used for the CSK file, but not
mandatory.
Once you have filled in all the relevant information, simply press \gui
{OK} and your keys will then be registered with the BlackBerry Signing Authority,
and will be ready to use.
\section2 Creating a New Certificate
To create a new developer certificate, click the \gui {Create} button to
launch the \gui {Create Certificate} dialog.
\image qtcreator-blackberry-createcertificatedialog.png "Create Certificate Dialog"
The fields you will need to fill in are:
\list
\li Path
The path to the new certificate, including the filename.
\li Author
The author, or owner of the certificate.
\li Password
The password which will be used to unlock the certificate from
they keystore.
\endlist
After filling in these fields, simply click \gui {OK} and the certificate
will be created.
\section2 Importing an Existing Certificate
If you already happen to have a certificate, and would like to use it
instead of for example having a new one automatically generated, all you
need to do is to launch the \gui {Import Certificate} dialog, clicking the
\gui {Import} button.
\image qtcreator-blackberry-importcertificatedialog.png "Import Certificate Dialog"
Once the dialog pops up, all you need to do is to browse for your new
certificate and fill in the password field.

View File

@@ -9,8 +9,8 @@
When you run the application on the BlackBerry device, \QC first creates a BAR package When you run the application on the BlackBerry device, \QC first creates a BAR package
using the settings in the Application Descriptor File. The default is to create the using the settings in the Application Descriptor File. The default is to create the
BAR package in the build directory. The BAR package is then deployed onto the BAR package in the build directory. The BAR package is then deployed to the
selected device. For more information, see \l{Deploying Applications to QNX Devices}. selected device. For more information, see \l{Deploying Applications to QNX Devices}.
Specifying run settings for QNX Neutrino devices is very similar to Specifying run settings for QNX Neutrino devices is very similar to
\l{Specifying Run Settings for Linux-Based Devices}. \l{Specifying Run Settings for Linux-Based Devices}.

View File

@@ -150,7 +150,7 @@
\li \l{Building and Running an Example} \li \l{Building and Running an Example}
\li \l{Tutorials} \li \l{Tutorials}
\list \list
\li \l{Creating a Qt Quick 1 Application} \li \l{Creating a Qt Quick Application}
\li \l{Creating a Qt Widget Based Application} \li \l{Creating a Qt Widget Based Application}
\endlist \endlist
\endlist \endlist

View File

@@ -28,19 +28,15 @@
\page creator-qml-application.html \page creator-qml-application.html
\nextpage creator-writing-program.html \nextpage creator-writing-program.html
\title Creating a Qt Quick 1 Application \title Creating a Qt Quick Application
\note We recommend that you use Qt Quick 2 to develop new applications for
platforms that run Qt 5.
This tutorial uses built-in QML elements and illustrates basic concepts of This tutorial uses built-in QML elements and illustrates basic concepts of
\l {http://qt-project.org/doc/qt-4.8/qtquick.html}{Qt Quick 1}. \l {http://qt-project.org/doc/qt-5.0/qtquick/qtquick-index.html}{Qt Quick}.
This tutorial describes how to use the \QC to implement the This tutorial describes how to use \QC to implement Qt states and transitions. We use
\l{http://qt-project.org/doc/qt-4.8/declarative-animation-states.html} \l{http://qt-project.org/doc/qt-5.0/qtquick/quick-animation.html}{Qt example code} to
{states and transitions example application}. The example application create an application that displays a Qt logo that moves between three rectangles on the
displays a Qt logo that moves between three rectangles on the page when you page when you click them.
click them.
\image qmldesigner-tutorial.png "States and transitions example" \image qmldesigner-tutorial.png "States and transitions example"
@@ -52,7 +48,11 @@
\list 1 \list 1
\li Select \gui{File > New File or Project > Applications > \li Select \gui{File > New File or Project > Applications >
Qt Quick 1 Application (Built-in Elements) > Choose}. Qt Quick 2 Application (Built-in Elements) > Choose}.
\note The QML types used in this example are also supported in Qt Quick 1. To create
this example application for platforms that run Qt 4, select \gui {Qt Quick 1
Application (Built-in Elements)}.
\li In the \gui{Name} field, type \b {Transitions}. \li In the \gui{Name} field, type \b {Transitions}.
@@ -89,7 +89,7 @@
To use the states.png image in your application, you must copy it to the To use the states.png image in your application, you must copy it to the
project directory (same subdirectory as the QML file) from the examples project directory (same subdirectory as the QML file) from the examples
directory in the Qt installation directory. For example: directory in the Qt installation directory. For example:
\c {C:\QtSDK\Examples\4.7\declarative\animation\states}. The image appears \c {C:\Qt\Qt5.0.1\5.0.1\msvc2010\examples\declarative\animation\states}. The image appears
in the \gui Resources pane. You can also use any other image or a QML in the \gui Resources pane. You can also use any other image or a QML
element, instead. element, instead.
@@ -204,7 +204,7 @@
The qml.main file should now look as follows: The qml.main file should now look as follows:
\snippet transitions/qml/Transitions/main.qml 0 \snippet transitions/main.qml 0
\li In the \gui Navigator pane, copy topLeftRect (by pressing \li In the \gui Navigator pane, copy topLeftRect (by pressing
\key {Ctrl+C}) and paste it to the canvas twice (by pressing \key {Ctrl+C}) and paste it to the canvas twice (by pressing
@@ -256,7 +256,7 @@
The qml.main file should now look as follows: The qml.main file should now look as follows:
\snippet transitions/qml/Transitions/main.qml 1 \snippet transitions/main.qml 1
\endlist \endlist
@@ -357,6 +357,6 @@
When you have completed the steps, the main.qml file should look as follows: When you have completed the steps, the main.qml file should look as follows:
\snippet transitions/qml/Transitions/main.qml 2 \snippet transitions/main.qml 2
*/ */

View File

@@ -40,7 +40,7 @@
\li \gui {Qt Quick Application} creates a Qt Quick application project \li \gui {Qt Quick Application} creates a Qt Quick application project
that can contain both QML and C++ code. The project includes a that can contain both QML and C++ code. The project includes a
QDeclarativeView. You can build the application and deploy it on QDeclarativeView. You can build the application and deploy it to
desktop and mobile target platforms. desktop and mobile target platforms.
You can select a template that uses either the built-in QML elements You can select a template that uses either the built-in QML elements
@@ -64,8 +64,8 @@
need to have the development environment installed on your need to have the development environment installed on your
computer to create and run this type of project. computer to create and run this type of project.
\li \gui {Qt Quick 1 Application (from Existing QML File)} converts \li \gui {Qt Quick Application (from Existing QML File)} converts
existing Qt Quick 1 applications to Qt Quick application projects. existing Qt Quick applications to Qt Quick application projects.
This enables you to run them from \QC and to deploy them to mobile This enables you to run them from \QC and to deploy them to mobile
devices. devices.
@@ -80,8 +80,8 @@
\section1 Creating Qt Quick UI Projects \section1 Creating Qt Quick UI Projects
Select \gui {File > New File or Project > Applications > Qt Quick UI > Select \gui File > \gui {New File or Project} > \gui Applications > \gui {Qt Quick 1 UI}
Choose} and follow the instructions of the wizard. or \gui {Qt Quick 2 UI} > \gui Choose and follow the instructions of the wizard.
\QC creates the following files: \QC creates the following files:
@@ -114,8 +114,8 @@
\note The SDK for a particular target platform might install additional \note The SDK for a particular target platform might install additional
templates for that platform. For example, the \gui {Qt Quick Application for templates for that platform. For example, the \gui {Qt Quick Application for
MeeGo Harmattan} template is installed as part of the MeeGo Harmattan tool MeeGo Harmattan} template is installed as part of the MeeGo Harmattan tool
chain and the QNX templates are installed as part of the BlackBerry NDK or chain and the BlackBerry 10 and QNX templates are installed as part of the BlackBerry 10 NDK,
the QNX SDK. BlackBerry NDK, or QNX SDK.
\QC creates the necessary boilerplate files. Some of the files are \QC creates the necessary boilerplate files. Some of the files are
specific to a particular target platform. specific to a particular target platform.
@@ -123,8 +123,9 @@
\section1 Importing QML Applications \section1 Importing QML Applications
If you have existing QML applications that you want to run in \QC or deploy If you have existing QML applications that you want to run in \QC or deploy
to mobile devices, select the \gui {Qt Quick Application (from Existing QML to mobile devices, select \gui File > \gui {New File or Project} > \gui Applications >
File)} template to import the main .qml file in your project. \gui {Qt Quick 1 Application (from Existing QML file} or \gui {Qt Quick 2 Application
(from Existing QML File)} > \gui Choose to import the main .qml file in your project.
\image qmldesigner-import-project.png "Select Existing QML File dialog" \image qmldesigner-import-project.png "Select Existing QML File dialog"

View File

@@ -74,7 +74,7 @@
\QC uses its own set of Qt Libraries located in the bundle, and therefore, \QC uses its own set of Qt Libraries located in the bundle, and therefore,
you need to configure the \QD plugins that you want to use with \QC. you need to configure the \QD plugins that you want to use with \QC.
Fore more information about how to deploy applications on Mac OS, see Fore more information about how to deploy applications to Mac OS, see
\l{http://qt-project.org/doc/qt-4.8/deployment-mac.html} \l{http://qt-project.org/doc/qt-4.8/deployment-mac.html}
{Deploying an Application on Mac OS X}. {Deploying an Application on Mac OS X}.

View File

@@ -19,6 +19,14 @@ OTHER_FILES += dist/copyright_template.txt \
qtcreator.qbp \ qtcreator.qbp \
qbs/pluginspec/pluginspec.qbs qbs/pluginspec/pluginspec.qbs
qmake_cache = $$targetPath($$IDE_BUILD_TREE/.qmake.cache)
unix: maybe_quote = \"
system("echo $${maybe_quote}$${LITERAL_HASH} config for qmake$${maybe_quote} > $$qmake_cache")
# Make sure the qbs dll ends up alongside the Creator executable.
win32:exists(src/shared/qbs/qbs.pro) {
system("echo QBS_DLLDESTDIR = $${IDE_BUILD_TREE}/bin >> $$qmake_cache")
}
contains(QT_ARCH, i386): ARCHITECTURE = x86 contains(QT_ARCH, i386): ARCHITECTURE = x86
else: ARCHITECTURE = $$QT_ARCH else: ARCHITECTURE = $$QT_ARCH
@@ -50,14 +58,19 @@ macx {
} }
} }
INSTALLER_ARCHIVE = $$OUT_PWD/qt-creator-$${PATTERN}-installer-archive.7z INSTALLER_ARCHIVE_FROM_ENV = $$(INSTALLER_ARCHIVE)
isEmpty(INSTALLER_ARCHIVE_FROM_ENV) {
INSTALLER_ARCHIVE = $$OUT_PWD/qt-creator-$${PATTERN}-installer-archive.7z
} else {
INSTALLER_ARCHIVE = $$OUT_PWD/$$(INSTALLER_ARCHIVE)
}
bindist.depends = deployqt bindist.depends = deployqt
bindist.commands = 7z a -mx9 $$OUT_PWD/qt-creator-$${PATTERN}.7z \"$$BINDIST_SOURCE\" bindist.commands = 7z a -mx9 $$OUT_PWD/qt-creator-$${PATTERN}.7z \"$$BINDIST_SOURCE\"
bindist_installer.depends = deployqt bindist_installer.depends = deployqt
bindist_installer.commands = 7z a -mx9 $$OUT_PWD/qt-creator-$${PATTERN}-installer-archive.7z \"$$BINDIST_INSTALLER_SOURCE\" bindist_installer.commands = 7z a -mx9 $${INSTALLER_ARCHIVE} \"$$BINDIST_INSTALLER_SOURCE\"
installer.depends = bindist_installer installer.depends = bindist_installer
installer.commands = $$PWD/scripts/packageIfw.py -i \"$(IFW_PATH)\" -v $${QTCREATOR_VERSION} -a \"$$INSTALLER_ARCHIVE\" "qt-creator-$${PATTERN}" installer.commands = $$PWD/scripts/packageIfw.py -i \"$(IFW_PATH)\" -v $${QTCREATOR_VERSION} -a \"$${INSTALLER_ARCHIVE}\" "qt-creator-$${PATTERN}"
win32 { win32 {
deployqt.commands ~= s,/,\\\\,g deployqt.commands ~= s,/,\\\\,g

View File

@@ -9,4 +9,4 @@ build_all:!build_pass {
CONFIG += release CONFIG += release
} }
include(../../../../../share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri) include(qml2puppet.pri)

View File

@@ -1,13 +0,0 @@
TEMPLATE = subdirs
include(qmlpuppet_utilities.pri)
exists($${QT_PRIVATE_HEADERS}/QtDeclarative/private/qdeclarativecontext_p.h) {
minQtVersion(4, 7, 1) {
SUBDIRS += qmlpuppet
} else {
warning(Qt version has to be at least 4.7.1 to build qmlpuppet.)
}
} else {
warning(Private headers for Qt required to build qmlpuppet.)
}

View File

@@ -9,4 +9,8 @@ build_all:!build_pass {
CONFIG += release CONFIG += release
} }
include(../../../../../share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri) greaterThan(QT_MAJOR_VERSION, 4) {
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x040900
}
include(qmlpuppet.pri)

File diff suppressed because it is too large Load Diff

View File

@@ -82,11 +82,9 @@ Rectangle {
anchors.rightMargin: 80 anchors.rightMargin: 80
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 20 anchors.leftMargin: 20
model: examplesModel.qtVersionModel model: qtVersionModel
onCurrentIndexChanged: { onCurrentIndexChanged: {
print("currentIndex" + currentIndex);
if (comboBox.model === undefined) if (comboBox.model === undefined)
return; return;

View File

@@ -379,6 +379,9 @@ bool Function::maybeValidPrototype(unsigned actualArgumentCount) const
for (; minNumberArguments < this->argumentCount(); ++minNumberArguments) { for (; minNumberArguments < this->argumentCount(); ++minNumberArguments) {
Argument *arg = this->argumentAt(minNumberArguments)->asArgument(); Argument *arg = this->argumentAt(minNumberArguments)->asArgument();
if (! arg) // TODO: Fix me properly - QTCREATORBUG-8316
return false;
if (arg->hasInitializer()) if (arg->hasInitializer())
break; break;
} }

View File

@@ -92,7 +92,7 @@ static void path_helper(Symbol *symbol, QList<const Name *> *names)
namespace CPlusPlus { namespace CPlusPlus {
bool compareName(const Name *name, const Name *other) static inline bool compareName(const Name *name, const Name *other)
{ {
if (name == other) if (name == other)
return true; return true;
@@ -123,6 +123,30 @@ bool compareFullyQualifiedName(const QList<const Name *> &path, const QList<cons
} }
namespace CPlusPlus {
namespace Internal {
bool operator==(const FullyQualifiedName &left, const FullyQualifiedName &right)
{
return compareFullyQualifiedName(left.fqn, right.fqn);
}
uint qHash(const FullyQualifiedName &fullyQualifiedName)
{
uint h = 0;
for (int i = 0; i < fullyQualifiedName.fqn.size(); ++i) {
if (const Name *n = fullyQualifiedName.fqn.at(i)) {
if (const Identifier *id = n->identifier()) {
h <<= 1;
h += id->hashCode();
}
}
}
return h;
}
}
}
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
// LookupContext // LookupContext
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
@@ -393,13 +417,22 @@ ClassOrNamespace *LookupContext::lookupParent(Symbol *symbol) const
} }
ClassOrNamespace::ClassOrNamespace(CreateBindings *factory, ClassOrNamespace *parent) ClassOrNamespace::ClassOrNamespace(CreateBindings *factory, ClassOrNamespace *parent)
: _factory(factory), _parent(parent), _templateId(0), _instantiationOrigin(0) : _factory(factory)
, _parent(parent)
, _scopeLookupCache(0)
, _templateId(0)
, _instantiationOrigin(0)
#ifdef DEBUG_LOOKUP #ifdef DEBUG_LOOKUP
, _name(0) , _name(0)
#endif // DEBUG_LOOKUP #endif // DEBUG_LOOKUP
{ {
} }
ClassOrNamespace::~ClassOrNamespace()
{
delete _scopeLookupCache;
}
const TemplateNameId *ClassOrNamespace::templateId() const const TemplateNameId *ClassOrNamespace::templateId() const
{ {
return _templateId; return _templateId;
@@ -464,7 +497,7 @@ QList<LookupItem> ClassOrNamespace::lookup_helper(const Name *name, bool searchI
if (name) { if (name) {
if (const QualifiedNameId *q = name->asQualifiedNameId()) { if (const QualifiedNameId *q = name->asQualifiedNameId()) {
if (! q->base()) if (! q->base()) // e.g. ::std::string
result = globalNamespace()->find(q->name()); result = globalNamespace()->find(q->name());
else if (ClassOrNamespace *binding = lookupType(q->base())) { else if (ClassOrNamespace *binding = lookupType(q->base())) {
@@ -477,23 +510,10 @@ QList<LookupItem> ClassOrNamespace::lookup_helper(const Name *name, bool searchI
// a qualified name. For instance, a nested class which is forward declared // a qualified name. For instance, a nested class which is forward declared
// in the class but defined outside it - we should capture both. // in the class but defined outside it - we should capture both.
Symbol *match = 0; Symbol *match = 0;
ClassOrNamespace *parentBinding = binding->parent(); for (ClassOrNamespace *parentBinding = binding->parent();
while (parentBinding && !match) { parentBinding && !match;
for (int j = 0; j < parentBinding->symbols().size() && !match; ++j) { parentBinding = parentBinding->parent())
if (Scope *scope = parentBinding->symbols().at(j)->asScope()) { match = parentBinding->lookupInScope(fullName);
for (unsigned i = 0; i < scope->memberCount(); ++i) {
Symbol *candidate = scope->memberAt(i);
if (compareFullyQualifiedName(
fullName,
LookupContext::fullyQualifiedName(candidate))) {
match = candidate;
break;
}
}
}
}
parentBinding = parentBinding->parent();
}
if (match) { if (match) {
LookupItem item; LookupItem item;
@@ -634,6 +654,24 @@ ClassOrNamespace *ClassOrNamespace::findType(const Name *name)
return lookupType_helper(name, &processed, /*searchInEnclosingScope =*/ false, this); return lookupType_helper(name, &processed, /*searchInEnclosingScope =*/ false, this);
} }
Symbol *ClassOrNamespace::lookupInScope(const QList<const Name *> &fullName)
{
if (!_scopeLookupCache) {
_scopeLookupCache = new QHash<Internal::FullyQualifiedName, Symbol *>;
for (int j = 0; j < symbols().size(); ++j) {
if (Scope *scope = symbols().at(j)->asScope()) {
for (unsigned i = 0; i < scope->memberCount(); ++i) {
Symbol *s = scope->memberAt(i);
_scopeLookupCache->insert(LookupContext::fullyQualifiedName(s), s);
}
}
}
}
return _scopeLookupCache->value(fullName, 0);
}
ClassOrNamespace *ClassOrNamespace::lookupType_helper(const Name *name, ClassOrNamespace *ClassOrNamespace::lookupType_helper(const Name *name,
QSet<ClassOrNamespace *> *processed, QSet<ClassOrNamespace *> *processed,
bool searchInEnclosingScope, bool searchInEnclosingScope,

View File

@@ -45,12 +45,24 @@
namespace CPlusPlus { namespace CPlusPlus {
namespace Internal {
struct FullyQualifiedName
{
QList<const Name *> fqn;
FullyQualifiedName(const QList<const Name *> &fqn)
: fqn(fqn)
{}
};
} // namespace Internal;
class CreateBindings; class CreateBindings;
class CPLUSPLUS_EXPORT ClassOrNamespace class CPLUSPLUS_EXPORT ClassOrNamespace
{ {
public: public:
ClassOrNamespace(CreateBindings *factory, ClassOrNamespace *parent); ClassOrNamespace(CreateBindings *factory, ClassOrNamespace *parent);
~ClassOrNamespace();
const TemplateNameId *templateId() const; const TemplateNameId *templateId() const;
ClassOrNamespace *instantiationOrigin() const; ClassOrNamespace *instantiationOrigin() const;
@@ -68,6 +80,8 @@ public:
ClassOrNamespace *lookupType(const Name *name); ClassOrNamespace *lookupType(const Name *name);
ClassOrNamespace *findType(const Name *name); ClassOrNamespace *findType(const Name *name);
Symbol *lookupInScope(const QList<const Name *> &fullName);
private: private:
typedef std::map<const Name *, ClassOrNamespace *, Name::Compare> Table; typedef std::map<const Name *, ClassOrNamespace *, Name::Compare> Table;
typedef std::map<const TemplateNameId *, ClassOrNamespace *, TemplateNameId::Compare> TemplateNameIdTable; typedef std::map<const TemplateNameId *, ClassOrNamespace *, TemplateNameId::Compare> TemplateNameIdTable;
@@ -115,6 +129,8 @@ private:
TemplateNameIdTable _specializations; TemplateNameIdTable _specializations;
QMap<const TemplateNameId *, ClassOrNamespace *> _instantiations; QMap<const TemplateNameId *, ClassOrNamespace *> _instantiations;
QHash<Internal::FullyQualifiedName, Symbol *> *_scopeLookupCache;
// it's an instantiation. // it's an instantiation.
const TemplateNameId *_templateId; const TemplateNameId *_templateId;
ClassOrNamespace *_instantiationOrigin; ClassOrNamespace *_instantiationOrigin;
@@ -308,7 +324,6 @@ private:
bool m_expandTemplates; bool m_expandTemplates;
}; };
bool CPLUSPLUS_EXPORT compareName(const Name *name, const Name *other);
bool CPLUSPLUS_EXPORT compareFullyQualifiedName(const QList<const Name *> &path, bool CPLUSPLUS_EXPORT compareFullyQualifiedName(const QList<const Name *> &path,
const QList<const Name *> &other); const QList<const Name *> &other);

View File

@@ -144,9 +144,15 @@ void ConsoleItem::setText(const QString &text)
} }
} }
const QString &ConsoleItem::text() const QString ConsoleItem::text() const
{ {
return m_text; return m_text;
} }
QString ConsoleItem::expression() const
{
QString text = m_text;
return text.remove(QChar(0x200b)); // ZERO WIDTH SPACE
}
} // QmlJS } // QmlJS

View File

@@ -66,7 +66,8 @@ public:
bool detachChild(int position); bool detachChild(int position);
int childNumber() const; int childNumber() const;
void setText(const QString &text); void setText(const QString &text);
const QString &text() const; QString text() const;
QString expression() const;
private: private:
ConsoleItem *m_parentItem; ConsoleItem *m_parentItem;

View File

@@ -98,6 +98,24 @@ bool Document::isQmlLikeLanguage(Document::Language language)
} }
} }
bool Document::isFullySupportedLanguage(Document::Language language)
{
switch (language) {
case JavaScriptLanguage:
case JsonLanguage:
case QmlLanguage:
case QmlQtQuick1Language:
case QmlQtQuick2Language:
return true;
case UnknownLanguage:
case QmlQbsLanguage:
case QmlProjectLanguage:
case QmlTypeInfoLanguage:
break;
}
return false;
}
Document::Document(const QString &fileName, Language language) Document::Document(const QString &fileName, Language language)
: _engine(0) : _engine(0)
, _ast(0) , _ast(0)

View File

@@ -65,6 +65,7 @@ public:
}; };
static bool isQmlLikeLanguage(Language languge); static bool isQmlLikeLanguage(Language languge);
static bool isFullySupportedLanguage(Language language);
protected: protected:
Document(const QString &fileName, Language language); Document(const QString &fileName, Language language);

View File

@@ -121,6 +121,10 @@ bool AndroidDeployStep::init()
return false; return false;
} }
m_ndkToolChainVersion = static_cast<AndroidToolChain *>(tc)->ndkToolChainVersion(); m_ndkToolChainVersion = static_cast<AndroidToolChain *>(tc)->ndkToolChainVersion();
QString arch = static_cast<Qt4Project *>(project())->rootQt4ProjectNode()->singleVariableValue(Qt4ProjectManager::AndroidArchVar);
if (!arch.isEmpty())
m_libgnustl = AndroidManager::libGnuStl(arch, m_ndkToolChainVersion);
return true; return true;
} }
@@ -259,14 +263,6 @@ int AndroidDeployStep::deviceAPILevel()
return m_deviceAPILevel; return m_deviceAPILevel;
} }
Utils::FileName AndroidDeployStep::localLibsRulesFilePath()
{
Utils::FileName fileName = AndroidManager::localLibsRulesFilePath(target());
fileName.append(QLatin1String("/rules.xml"));
return fileName;
}
unsigned int AndroidDeployStep::remoteModificationTime(const QString &fullDestination, QHash<QString, unsigned int> *cache) unsigned int AndroidDeployStep::remoteModificationTime(const QString &fullDestination, QHash<QString, unsigned int> *cache)
{ {
QString destination = QFileInfo(fullDestination).absolutePath(); QString destination = QFileInfo(fullDestination).absolutePath();
@@ -402,6 +398,22 @@ bool AndroidDeployStep::deployPackage()
remoteRoot + QLatin1String("/lib"), remoteRoot + QLatin1String("/lib"),
true, true,
QStringList() << QLatin1String("*.so")); QStringList() << QLatin1String("*.so"));
// don't use the libgnustl_shared.so from the qt directory
for (int i = 0; i < deployList.count(); ++i) {
if (deployList.at(i).remoteFileName == QLatin1String("/data/local/tmp/qt/lib/libgnustl_shared.so")) {
deployList.removeAt(i);
break;
}
}
// We want to deploy that *always*
// since even if the timestamps did not change, the toolchain might have changed
// leading to a different file
deployList.append(DeployItem(m_libgnustl,
QDateTime::currentDateTimeUtc().toTime_t(),
QLatin1String("/data/local/tmp/qt/lib/libgnustl_shared.so"), false));
collectFiles(&deployList, collectFiles(&deployList,
m_qtVersionSourcePath + QLatin1String("/plugins"), m_qtVersionSourcePath + QLatin1String("/plugins"),
remoteRoot + QLatin1String("/plugins"), remoteRoot + QLatin1String("/plugins"),

View File

@@ -87,7 +87,6 @@ public:
QString deviceSerialNumber(); QString deviceSerialNumber();
int deviceAPILevel(); int deviceAPILevel();
Utils::FileName localLibsRulesFilePath();
AndroidDeployAction deployAction(); AndroidDeployAction deployAction();
bool useLocalQtLibs(); bool useLocalQtLibs();
@@ -154,7 +153,7 @@ private:
QString m_runQASIPackagePath; QString m_runQASIPackagePath;
AndroidDeployAction m_runDeployAction; AndroidDeployAction m_runDeployAction;
QString m_ndkToolChainVersion; QString m_ndkToolChainVersion;
QString m_libgnustl;
static const Core::Id Id; static const Core::Id Id;
}; };

View File

@@ -62,7 +62,6 @@ AndroidDeployStepWidget::AndroidDeployStepWidget(AndroidDeployStep *step) :
connect(ui->deployQtLibs, SIGNAL(clicked()), SLOT(setDeployLocalQtLibs())); connect(ui->deployQtLibs, SIGNAL(clicked()), SLOT(setDeployLocalQtLibs()));
connect(ui->chooseButton, SIGNAL(clicked()), SLOT(setQASIPackagePath())); connect(ui->chooseButton, SIGNAL(clicked()), SLOT(setQASIPackagePath()));
connect(ui->useLocalQtLibs, SIGNAL(stateChanged(int)), SLOT(useLocalQtLibsStateChanged(int))); connect(ui->useLocalQtLibs, SIGNAL(stateChanged(int)), SLOT(useLocalQtLibsStateChanged(int)));
connect(ui->editRulesFilePushButton, SIGNAL(clicked()), SLOT(editRulesFile()));
connect(ui->cleanLibsPushButton, SIGNAL(clicked()), SLOT(cleanLibsOnDevice())); connect(ui->cleanLibsPushButton, SIGNAL(clicked()), SLOT(cleanLibsOnDevice()));
} }
@@ -106,11 +105,6 @@ void AndroidDeployStepWidget::useLocalQtLibsStateChanged(int state)
m_step->setUseLocalQtLibs(state == Qt::Checked); m_step->setUseLocalQtLibs(state == Qt::Checked);
} }
void AndroidDeployStepWidget::editRulesFile()
{
Core::ICore::instance()->openFiles(QStringList() << m_step->localLibsRulesFilePath().toString(), Core::ICore::SwitchMode);
}
void AndroidDeployStepWidget::cleanLibsOnDevice() void AndroidDeployStepWidget::cleanLibsOnDevice()
{ {
m_step->cleanLibsOnDevice(); m_step->cleanLibsOnDevice();

View File

@@ -53,7 +53,6 @@ private slots:
void setDeployLocalQtLibs(); void setDeployLocalQtLibs();
void setQASIPackagePath(); void setQASIPackagePath();
void useLocalQtLibsStateChanged(int); void useLocalQtLibsStateChanged(int);
void editRulesFile();
void cleanLibsOnDevice(); void cleanLibsOnDevice();
private: private:

View File

@@ -63,13 +63,6 @@ You must have Qt libraries compiled for that platform</string>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QPushButton" name="editRulesFilePushButton">
<property name="text">
<string>Edit Rules File</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">

View File

@@ -585,7 +585,12 @@ QStringList AndroidManager::availableQtLibs(ProjectExplorer::Target *target)
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target->kit()); ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target->kit());
if (tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE)) if (tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE))
return QStringList(); return QStringList();
Qt4ProjectManager::Qt4Project *project = static_cast<Qt4ProjectManager::Qt4Project *>(target->project());
QString arch = project->rootQt4ProjectNode()->singleVariableValue(Qt4ProjectManager::AndroidArchVar);
AndroidToolChain *atc = static_cast<AndroidToolChain *>(tc); AndroidToolChain *atc = static_cast<AndroidToolChain *>(tc);
QString libgnustl = libGnuStl(arch, atc->ndkToolChainVersion());
Utils::FileName readelfPath = AndroidConfigurations::instance().readelfPath(target->activeRunConfiguration()->abi().architecture(), Utils::FileName readelfPath = AndroidConfigurations::instance().readelfPath(target->activeRunConfiguration()->abi().architecture(),
atc->ndkToolChainVersion()); atc->ndkToolChainVersion());
@@ -613,6 +618,9 @@ QStringList AndroidManager::availableQtLibs(ProjectExplorer::Target *target)
mapLibs[library].dependencies = dependencies(readelfPath, libPath.absolutePath()); mapLibs[library].dependencies = dependencies(readelfPath, libPath.absolutePath());
} }
const QString library = libgnustl.mid(libgnustl.lastIndexOf(QLatin1Char('/')) + 1);
mapLibs[library] = Library();;
// clean dependencies // clean dependencies
foreach (const QString &key, mapLibs.keys()) { foreach (const QString &key, mapLibs.keys()) {
int it = 0; int it = 0;
@@ -950,5 +958,14 @@ bool AndroidManager::qtLibrariesLessThan(const Library &a, const Library &b)
return a.level < b.level; return a.level < b.level;
} }
QString AndroidManager::libGnuStl(const QString &arch, const QString &ndkToolChainVersion)
{
return AndroidConfigurations::instance().config().ndkLocation.toString()
+ QLatin1String("/sources/cxx-stl/gnu-libstdc++/")
+ ndkToolChainVersion + QLatin1String("/libs/")
+ arch
+ QLatin1String("/libgnustl_shared.so");
}
} // namespace Internal } // namespace Internal
} // namespace Qt4ProjectManager } // namespace Qt4ProjectManager

View File

@@ -112,6 +112,8 @@ public:
static QStringList prebundledLibs(ProjectExplorer::Target *target); static QStringList prebundledLibs(ProjectExplorer::Target *target);
static bool setPrebundledLibs(ProjectExplorer::Target *target, const QStringList &libs); static bool setPrebundledLibs(ProjectExplorer::Target *target, const QStringList &libs);
static QString libGnuStl(const QString &arch, const QString &ndkToolChainVersion);
private: private:
static void raiseError(const QString &reason); static void raiseError(const QString &reason);
static bool openXmlFile(QDomDocument &doc, const Utils::FileName &fileName); static bool openXmlFile(QDomDocument &doc, const Utils::FileName &fileName);

View File

@@ -421,7 +421,7 @@ QString MakefileParser::parseIdentifierBeforeAssign(const QString &line)
QString ret = line.left(end); QString ret = line.left(end);
while (end < line.size() && line[end].isSpace()) while (end < line.size() && line[end].isSpace())
++end; ++end;
return (line[end] == QLatin1Char('=')) ? ret : QString(); return (end < line.size() && line[end] == QLatin1Char('=')) ? ret : QString();
} }
void MakefileParser::addAllSources() void MakefileParser::addAllSources()

View File

@@ -323,8 +323,6 @@ bool CMakeProject::parseCMakeLists()
QStringList cxxflags; QStringList cxxflags;
foreach (const CMakeBuildTarget &buildTarget, m_buildTargets) { foreach (const CMakeBuildTarget &buildTarget, m_buildTargets) {
if (buildTarget.title.endsWith(QLatin1String("/fast")))
continue;
QString makeCommand = QDir::fromNativeSeparators(buildTarget.makeCommand); QString makeCommand = QDir::fromNativeSeparators(buildTarget.makeCommand);
int startIndex = makeCommand.indexOf(QLatin1Char('\"')); int startIndex = makeCommand.indexOf(QLatin1Char('\"'));
int endIndex = makeCommand.indexOf(QLatin1Char('\"'), startIndex + 1); int endIndex = makeCommand.indexOf(QLatin1Char('\"'), startIndex + 1);
@@ -416,8 +414,6 @@ QStringList CMakeProject::buildTargetTitles(bool runnable) const
foreach (const CMakeBuildTarget &ct, m_buildTargets) { foreach (const CMakeBuildTarget &ct, m_buildTargets) {
if (runnable && (ct.executable.isEmpty() || ct.library)) if (runnable && (ct.executable.isEmpty() || ct.library))
continue; continue;
if (ct.title.endsWith(QLatin1String("/fast")))
continue;
results << ct.title; results << ct.title;
} }
return results; return results;
@@ -426,8 +422,6 @@ QStringList CMakeProject::buildTargetTitles(bool runnable) const
bool CMakeProject::hasBuildTarget(const QString &title) const bool CMakeProject::hasBuildTarget(const QString &title) const
{ {
foreach (const CMakeBuildTarget &ct, m_buildTargets) { foreach (const CMakeBuildTarget &ct, m_buildTargets) {
if (ct.title.endsWith(QLatin1String("/fast")))
continue;
if (ct.title == title) if (ct.title == title)
return true; return true;
} }
@@ -749,8 +743,6 @@ void CMakeProject::updateRunConfigurations(Target *t)
continue; continue;
if (ct.executable.isEmpty()) if (ct.executable.isEmpty())
continue; continue;
if (ct.title.endsWith(QLatin1String("/fast")))
continue;
QList<CMakeRunConfiguration *> list = existingRunConfigurations.values(ct.title); QList<CMakeRunConfiguration *> list = existingRunConfigurations.values(ct.title);
if (!list.isEmpty()) { if (!list.isEmpty()) {
// Already exists, so override the settings... // Already exists, so override the settings...
@@ -1093,7 +1085,6 @@ void CMakeCbpParser::parseBuild()
void CMakeCbpParser::parseBuildTarget() void CMakeCbpParser::parseBuildTarget()
{ {
m_buildTargetType = false;
m_buildTarget.clear(); m_buildTarget.clear();
if (attributes().hasAttribute(QLatin1String("title"))) if (attributes().hasAttribute(QLatin1String("title")))
@@ -1101,7 +1092,8 @@ void CMakeCbpParser::parseBuildTarget()
while (!atEnd()) { while (!atEnd()) {
readNext(); readNext();
if (isEndElement()) { if (isEndElement()) {
m_buildTargets.append(m_buildTarget); if (!m_buildTarget.title.endsWith(QLatin1String("/fast")))
m_buildTargets.append(m_buildTarget);
return; return;
} else if (name() == QLatin1String("Compiler")) { } else if (name() == QLatin1String("Compiler")) {
parseCompiler(); parseCompiler();
@@ -1119,15 +1111,10 @@ void CMakeCbpParser::parseBuildTargetOption()
{ {
if (attributes().hasAttribute(QLatin1String("output"))) { if (attributes().hasAttribute(QLatin1String("output"))) {
m_buildTarget.executable = attributes().value(QLatin1String("output")).toString(); m_buildTarget.executable = attributes().value(QLatin1String("output")).toString();
} else if (attributes().hasAttribute(QLatin1String("type")) } else if (attributes().hasAttribute(QLatin1String("type"))) {
&& (attributes().value(QLatin1String("type")) == QLatin1String("1") const QString value = attributes().value(QLatin1String("type")).toString();
|| attributes().value(QLatin1String("type")) == QLatin1String("0"))) { if (value == QLatin1String("2") || value == QLatin1String("3"))
m_buildTargetType = true; m_buildTarget.library = true;
} else if (attributes().hasAttribute(QLatin1String("type"))
&& (attributes().value(QLatin1String("type")) == QLatin1String("3")
|| attributes().value(QLatin1String("type")) == QLatin1String("2"))) {
m_buildTargetType = true;
m_buildTarget.library = true;
} else if (attributes().hasAttribute(QLatin1String("working_dir"))) { } else if (attributes().hasAttribute(QLatin1String("working_dir"))) {
m_buildTarget.workingDirectory = attributes().value(QLatin1String("working_dir")).toString(); m_buildTarget.workingDirectory = attributes().value(QLatin1String("working_dir")).toString();
} }

View File

@@ -190,7 +190,6 @@ private:
QStringList m_compilerOptions; QStringList m_compilerOptions;
CMakeBuildTarget m_buildTarget; CMakeBuildTarget m_buildTarget;
bool m_buildTargetType;
QList<CMakeBuildTarget> m_buildTargets; QList<CMakeBuildTarget> m_buildTargets;
QString m_projectName; QString m_projectName;
QString m_compiler; QString m_compiler;

View File

@@ -737,6 +737,7 @@ static void assignAction(QAction *self, QAction *other)
self->setIcon(other->icon()); self->setIcon(other->icon());
self->setShortcut(other->shortcut()); self->setShortcut(other->shortcut());
self->setEnabled(other->isEnabled()); self->setEnabled(other->isEnabled());
self->setIconVisibleInMenu(other->isIconVisibleInMenu());
} }
void EditorManager::addSaveAndCloseEditorActions(QMenu *contextMenu, const QModelIndex &editorIndex) void EditorManager::addSaveAndCloseEditorActions(QMenu *contextMenu, const QModelIndex &editorIndex)

View File

@@ -319,7 +319,8 @@ static void localizedText(const QStringList &locales, QXmlStreamReader *reader,
} else { } else {
if (*currentLocale < 0 && currentText->isEmpty()) { if (*currentLocale < 0 && currentText->isEmpty()) {
*currentText = QCoreApplication::translate("Core::Internal::ExternalTool", *currentText = QCoreApplication::translate("Core::Internal::ExternalTool",
reader->readElementText().toUtf8().constData()); reader->readElementText().toUtf8().constData(),
"", QCoreApplication::UnicodeUTF8);
} else { } else {
reader->skipCurrentElement(); reader->skipCurrentElement();
} }

View File

@@ -136,6 +136,7 @@ QWidget *GeneralSettings::createPage(QWidget *parent)
m_page->autoSaveCheckBox->setChecked(EditorManager::instance()->autoSaveEnabled()); m_page->autoSaveCheckBox->setChecked(EditorManager::instance()->autoSaveEnabled());
m_page->autoSaveInterval->setValue(EditorManager::instance()->autoSaveInterval()); m_page->autoSaveInterval->setValue(EditorManager::instance()->autoSaveInterval());
m_page->resetWarningsButton->setEnabled(Core::InfoBar::anyGloballySuppressed());
connect(m_page->resetColorButton, SIGNAL(clicked()), connect(m_page->resetColorButton, SIGNAL(clicked()),
this, SLOT(resetInterfaceColor())); this, SLOT(resetInterfaceColor()));
@@ -207,7 +208,7 @@ void GeneralSettings::resetInterfaceColor()
void GeneralSettings::resetWarnings() void GeneralSettings::resetWarnings()
{ {
Core::InfoBar::clearGloballySuppressed(); Core::InfoBar::clearGloballySuppressed();
QMessageBox::information(0, tr("Reset warnings"), tr("Done")); m_page->resetWarningsButton->setEnabled(false);
} }
void GeneralSettings::resetTerminal() void GeneralSettings::resetTerminal()

View File

@@ -109,6 +109,9 @@
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QPushButton" name="resetWarningsButton"> <widget class="QPushButton" name="resetWarningsButton">
<property name="toolTip">
<string>Re-enable all warnings which were suppressed using &quot;Don't show again&quot; button (e.g. missing highlighter).</string>
</property>
<property name="text"> <property name="text">
<string comment="Button text">Reset warnings</string> <string comment="Button text">Reset warnings</string>
</property> </property>

View File

@@ -152,6 +152,11 @@ void InfoBar::clearGloballySuppressed()
ICore::settings()->setValue(QLatin1String(C_SUPPRESSED_WARNINGS), QStringList()); ICore::settings()->setValue(QLatin1String(C_SUPPRESSED_WARNINGS), QStringList());
} }
bool InfoBar::anyGloballySuppressed()
{
return !globallySuppressed.isEmpty();
}
InfoBarDisplay::InfoBarDisplay(QObject *parent) InfoBarDisplay::InfoBarDisplay(QObject *parent)
: QObject(parent) : QObject(parent)

View File

@@ -89,6 +89,7 @@ public:
static void globallySuppressInfo(Id id); static void globallySuppressInfo(Id id);
static void initializeGloballySuppressed(); static void initializeGloballySuppressed();
static void clearGloballySuppressed(); static void clearGloballySuppressed();
static bool anyGloballySuppressed();
signals: signals:
void changed(); void changed();

View File

@@ -12,7 +12,7 @@ QT += network
LIBS *= -L$$IDE_PLUGIN_PATH/QtProject LIBS *= -L$$IDE_PLUGIN_PATH/QtProject
QMAKE_RPATHDIR *= $$IDE_PLUGIN_PATH/QtProject QMAKE_RPATHDIR *= $$IDE_PLUGIN_PATH/QtProject
DESTDIR=$$IDE_APP_PATH DESTDIR=$$IDE_LIBEXEC_PATH
HEADERS = ../protocol.h \ HEADERS = ../protocol.h \
../cpasterconstants.h \ ../cpasterconstants.h \

View File

@@ -39,15 +39,19 @@
using namespace CppTools::Internal; using namespace CppTools::Internal;
using namespace Utils; using namespace Utils;
static const int MaxPendingDocuments = 10;
CppLocatorFilter::CppLocatorFilter(CppModelManager *manager) CppLocatorFilter::CppLocatorFilter(CppModelManager *manager)
: m_manager(manager), : m_manager(manager)
m_forceNewSearchList(true) , m_pendingDocumentsMutex(QMutex::Recursive)
{ {
setId("Classes and Methods"); setId("Classes and Methods");
setDisplayName(tr("C++ Classes and Methods")); setDisplayName(tr("C++ Classes and Methods"));
setShortcutString(QString(QLatin1Char(':'))); setShortcutString(QString(QLatin1Char(':')));
setIncludedByDefault(false); setIncludedByDefault(false);
m_pendingDocuments.reserve(MaxPendingDocuments);
connect(manager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)), connect(manager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
this, SLOT(onDocumentUpdated(CPlusPlus::Document::Ptr))); this, SLOT(onDocumentUpdated(CPlusPlus::Document::Ptr)));
@@ -58,13 +62,53 @@ CppLocatorFilter::CppLocatorFilter(CppModelManager *manager)
CppLocatorFilter::~CppLocatorFilter() CppLocatorFilter::~CppLocatorFilter()
{ } { }
void CppLocatorFilter::onDocumentUpdated(CPlusPlus::Document::Ptr doc)
void CppLocatorFilter::flushPendingDocument(bool force)
{ {
m_searchList[doc->fileName()] = search(doc); QMutexLocker locker(&m_pendingDocumentsMutex);
if (!force && m_pendingDocuments.size() < MaxPendingDocuments)
return;
foreach (CPlusPlus::Document::Ptr doc, m_pendingDocuments) {
QList<ModelItemInfo> &results = m_searchList[doc->fileName()];
results = search(doc, results.size() + 10);
}
m_pendingDocuments.clear();
m_pendingDocuments.reserve(MaxPendingDocuments);
}
void CppLocatorFilter::onDocumentUpdated(CPlusPlus::Document::Ptr updatedDoc)
{
QMutexLocker locker(&m_pendingDocumentsMutex);
int i = 0, ei = m_pendingDocuments.size();
for (; i < ei; ++i) {
const CPlusPlus::Document::Ptr &doc = m_pendingDocuments.at(i);
if (doc->fileName() == updatedDoc->fileName()
&& doc->revision() < updatedDoc->revision()) {
m_pendingDocuments[i] = updatedDoc;
break;
}
}
if (i == ei)
m_pendingDocuments.append(updatedDoc);
flushPendingDocument(false);
} }
void CppLocatorFilter::onAboutToRemoveFiles(const QStringList &files) void CppLocatorFilter::onAboutToRemoveFiles(const QStringList &files)
{ {
QMutexLocker locker(&m_pendingDocumentsMutex);
for (int i = 0; i < m_pendingDocuments.size(); ) {
if (files.contains(m_pendingDocuments.at(i)->fileName()))
m_pendingDocuments.remove(i);
else
++i;
}
foreach (const QString &file, files) foreach (const QString &file, files)
m_searchList.remove(file); m_searchList.remove(file);
} }
@@ -82,6 +126,8 @@ static bool compareLexigraphically(const Locator::FilterEntry &a,
QList<Locator::FilterEntry> CppLocatorFilter::matchesFor(QFutureInterface<Locator::FilterEntry> &future, const QString &origEntry) QList<Locator::FilterEntry> CppLocatorFilter::matchesFor(QFutureInterface<Locator::FilterEntry> &future, const QString &origEntry)
{ {
flushPendingDocument(true);
QString entry = trimWildcards(origEntry); QString entry = trimWildcards(origEntry);
QList<Locator::FilterEntry> goodEntries; QList<Locator::FilterEntry> goodEntries;
QList<Locator::FilterEntry> betterEntries; QList<Locator::FilterEntry> betterEntries;
@@ -140,7 +186,5 @@ void CppLocatorFilter::accept(Locator::FilterEntry selection) const
void CppLocatorFilter::reset() void CppLocatorFilter::reset()
{ {
m_searchList.clear(); m_searchList.clear();
m_previousResults.clear();
m_previousEntry.clear(); m_previousEntry.clear();
m_forceNewSearchList = true;
} }

View File

@@ -55,17 +55,20 @@ public:
protected: protected:
SearchSymbols search; SearchSymbols search;
void flushPendingDocument(bool force);
private slots: private slots:
void onDocumentUpdated(CPlusPlus::Document::Ptr doc); void onDocumentUpdated(CPlusPlus::Document::Ptr updatedDoc);
void onAboutToRemoveFiles(const QStringList &files); void onAboutToRemoveFiles(const QStringList &files);
private: private:
CppModelManager *m_manager; CppModelManager *m_manager;
QHash<QString, QList<ModelItemInfo> > m_searchList; QHash<QString, QList<ModelItemInfo> > m_searchList;
QList<ModelItemInfo> m_previousResults;
QString m_previousEntry; QString m_previousEntry;
bool m_forceNewSearchList;
mutable QMutex m_pendingDocumentsMutex;
QVector<CPlusPlus::Document::Ptr> m_pendingDocuments;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -60,10 +60,11 @@ void SearchSymbols::setSeparateScope(bool separateScope)
this->separateScope = separateScope; this->separateScope = separateScope;
} }
QList<ModelItemInfo> SearchSymbols::operator()(Document::Ptr doc, const QString &scope) QList<ModelItemInfo> SearchSymbols::operator()(Document::Ptr doc, int sizeHint, const QString &scope)
{ {
QString previousScope = switchScope(scope); QString previousScope = switchScope(scope);
items.clear(); items.clear();
items.reserve(sizeHint);
for (unsigned i = 0; i < doc->globalSymbolCount(); ++i) { for (unsigned i = 0; i < doc->globalSymbolCount(); ++i) {
accept(doc->globalSymbolAt(i)); accept(doc->globalSymbolAt(i));
} }

View File

@@ -99,7 +99,7 @@ struct CPPTOOLS_EXPORT ModelItemInfo
int column; int column;
}; };
class SearchSymbols: public std::unary_function<CPlusPlus::Document::Ptr, QList<ModelItemInfo> >, class SearchSymbols: public std::binary_function<CPlusPlus::Document::Ptr, int, QList<ModelItemInfo> >,
protected CPlusPlus::SymbolVisitor protected CPlusPlus::SymbolVisitor
{ {
public: public:
@@ -112,10 +112,10 @@ public:
void setSymbolsToSearchFor(SymbolTypes types); void setSymbolsToSearchFor(SymbolTypes types);
void setSeparateScope(bool separateScope); void setSeparateScope(bool separateScope);
QList<ModelItemInfo> operator()(CPlusPlus::Document::Ptr doc) QList<ModelItemInfo> operator()(CPlusPlus::Document::Ptr doc, int sizeHint = 500)
{ return operator()(doc, QString()); } { return operator()(doc, sizeHint, QString()); }
QList<ModelItemInfo> operator()(CPlusPlus::Document::Ptr doc, const QString &scope); QList<ModelItemInfo> operator()(CPlusPlus::Document::Ptr doc, int sizeHint, const QString &scope);
protected: protected:
using SymbolVisitor::visit; using SymbolVisitor::visit;

View File

@@ -158,13 +158,14 @@ equals(TEST, 1):!isEmpty(copydata) {
INPUT_FILE = $$IDE_SOURCE_TREE/$$TEST_DIR/simple.pro INPUT_FILE = $$IDE_SOURCE_TREE/$$TEST_DIR/simple.pro
macx: OUTPUT_DIR = $$IDE_DATA_PATH/$$TEST_DIR macx: OUTPUT_DIR = $$IDE_DATA_PATH/$$TEST_DIR
else: OUTPUT_DIR = $$IDE_BUILD_TREE/$$TEST_DIR else: OUTPUT_DIR = $$IDE_BUILD_TREE/$$TEST_DIR
testfile.target = $$OUTPUT_DIR/$$basename(INPUT_FILE)
testfile.depends = $$INPUT_FILE
win32 { win32 {
INPUT_FILE ~= s,/,\\\\,g INPUT_FILE ~= s,/,\\\\,g
OUTPUT_DIR ~= s,/,\\\\,g OUTPUT_DIR ~= s,/,\\\\,g
} else { } else {
isEmpty(QMAKE_CHK_EXISTS_GLUE):QMAKE_CHK_EXISTS_GLUE = "|| " isEmpty(QMAKE_CHK_EXISTS_GLUE):QMAKE_CHK_EXISTS_GLUE = "|| "
} }
testfile.target = test_resources
testfile.commands = ($$QMAKE_CHK_DIR_EXISTS \"$$OUTPUT_DIR\" $$QMAKE_CHK_EXISTS_GLUE $$QMAKE_MKDIR \"$$OUTPUT_DIR\") \ testfile.commands = ($$QMAKE_CHK_DIR_EXISTS \"$$OUTPUT_DIR\" $$QMAKE_CHK_EXISTS_GLUE $$QMAKE_MKDIR \"$$OUTPUT_DIR\") \
&& $$QMAKE_COPY \"$$INPUT_FILE\" \"$$OUTPUT_DIR\" && $$QMAKE_COPY \"$$INPUT_FILE\" \"$$OUTPUT_DIR\"
QMAKE_EXTRA_TARGETS += testfile QMAKE_EXTRA_TARGETS += testfile

View File

@@ -82,6 +82,7 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/imode.h> #include <coreplugin/imode.h>
#include <coreplugin/icorelistener.h> #include <coreplugin/icorelistener.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/minisplitter.h> #include <coreplugin/minisplitter.h>
#include <coreplugin/modemanager.h> #include <coreplugin/modemanager.h>
@@ -1223,6 +1224,7 @@ public slots:
bool parseArgument(QStringList::const_iterator &it, bool parseArgument(QStringList::const_iterator &it,
const QStringList::const_iterator &cend, QString *errorMessage); const QStringList::const_iterator &cend, QString *errorMessage);
bool parseArguments(const QStringList &args, QString *errorMessage); bool parseArguments(const QStringList &args, QString *errorMessage);
void parseCommandLineArguments();
DebuggerToolTipManager *toolTipManager() const { return m_toolTipManager; } DebuggerToolTipManager *toolTipManager() const { return m_toolTipManager; }
QSharedPointer<GlobalDebuggerOptions> globalDebuggerOptions() const { return m_globalDebuggerOptions; } QSharedPointer<GlobalDebuggerOptions> globalDebuggerOptions() const { return m_globalDebuggerOptions; }
@@ -1507,11 +1509,26 @@ bool DebuggerPluginPrivate::parseArguments(const QStringList &args,
return true; return true;
} }
void DebuggerPluginPrivate::parseCommandLineArguments()
{
QString errorMessage;
if (!parseArguments(m_arguments, &errorMessage)) {
errorMessage = tr("Error evaluating command line arguments: %1")
.arg(errorMessage);
qWarning("%s\n", qPrintable(errorMessage));
Core::MessageManager::instance()->printToOutputPanePopup(errorMessage);
}
if (!m_scheduledStarts.isEmpty())
QTimer::singleShot(0, this, SLOT(runScheduled()));
}
bool DebuggerPluginPrivate::initialize(const QStringList &arguments, bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
QString *errorMessage) QString *errorMessage)
{ {
Q_UNUSED(errorMessage); Q_UNUSED(errorMessage);
m_arguments = arguments; m_arguments = arguments;
if (!m_arguments.isEmpty())
connect(KitManager::instance(), SIGNAL(kitsLoaded()), this, SLOT(parseCommandLineArguments()));
// Cpp/Qml ui setup // Cpp/Qml ui setup
m_mainWindow = new DebuggerMainWindow; m_mainWindow = new DebuggerMainWindow;
@@ -2869,14 +2886,6 @@ void DebuggerPluginPrivate::extensionsInitialized()
m_mainWindow->addStagedMenuEntries(); m_mainWindow->addStagedMenuEntries();
// Do not fail to load the whole plugin if something goes wrong here.
QString errorMessage;
if (!parseArguments(m_arguments, &errorMessage)) {
errorMessage = tr("Error evaluating command line arguments: %1")
.arg(errorMessage);
qWarning("%s\n", qPrintable(errorMessage));
}
// Register factory of DebuggerRunControl. // Register factory of DebuggerRunControl.
m_debuggerRunControlFactory = new DebuggerRunControlFactory(m_plugin); m_debuggerRunControlFactory = new DebuggerRunControlFactory(m_plugin);
m_plugin->addAutoReleasedObject(m_debuggerRunControlFactory); m_plugin->addAutoReleasedObject(m_debuggerRunControlFactory);
@@ -3291,8 +3300,6 @@ void DebuggerPluginPrivate::extensionsInitialized()
m_returnWindow->setVisible(false); m_returnWindow->setVisible(false);
// time gdb -i mi -ex 'b debuggerplugin.cpp:800' -ex r -ex q bin/qtcreator.bin // time gdb -i mi -ex 'b debuggerplugin.cpp:800' -ex r -ex q bin/qtcreator.bin
if (!m_scheduledStarts.isEmpty())
QTimer::singleShot(0, this, SLOT(runScheduled()));
} }
SavedAction *DebuggerPluginPrivate::action(int code) const SavedAction *DebuggerPluginPrivate::action(int code) const

View File

@@ -60,7 +60,8 @@ ChangeSelectionDialog::ChangeSelectionDialog(const QString &workingDirectory, QW
m_gitEnvironment = GitPlugin::instance()->gitClient()->processEnvironment(); m_gitEnvironment = GitPlugin::instance()->gitClient()->processEnvironment();
connect(m_ui.changeNumberEdit, SIGNAL(textChanged(QString)), connect(m_ui.changeNumberEdit, SIGNAL(textChanged(QString)),
this, SLOT(recalculateDetails(QString))); this, SLOT(recalculateDetails(QString)));
recalculateDetails(m_ui.changeNumberEdit->text()); connect(m_ui.workingDirectoryEdit, SIGNAL(textChanged(QString)), this, SLOT(refresh()));
refresh();
} }
ChangeSelectionDialog::~ChangeSelectionDialog() ChangeSelectionDialog::~ChangeSelectionDialog()
@@ -140,5 +141,10 @@ void ChangeSelectionDialog::recalculateDetails(const QString &ref)
m_ui.detailsText->setPlainText(tr("Fetching commit data...")); m_ui.detailsText->setPlainText(tr("Fetching commit data..."));
} }
void ChangeSelectionDialog::refresh()
{
recalculateDetails(m_ui.changeNumberEdit->text());
}
} // Internal } // Internal
} // Git } // Git

View File

@@ -57,6 +57,7 @@ public slots:
private slots: private slots:
void setDetails(int exitCode); void setDetails(int exitCode);
void recalculateDetails(const QString &ref); void recalculateDetails(const QString &ref);
void refresh();
private: private:
Ui_ChangeSelectionDialog m_ui; Ui_ChangeSelectionDialog m_ui;

View File

@@ -126,6 +126,7 @@ RunSettingsWidget::RunSettingsWidget(Target *target)
m_runConfigurationsModel(new RunConfigurationModel(target, this)), m_runConfigurationsModel(new RunConfigurationModel(target, this)),
m_deployConfigurationModel(new DeployConfigurationModel(target, this)), m_deployConfigurationModel(new DeployConfigurationModel(target, this)),
m_runConfigurationWidget(0), m_runConfigurationWidget(0),
m_runConfiguration(0),
m_runLayout(0), m_runLayout(0),
m_deployConfigurationWidget(0), m_deployConfigurationWidget(0),
m_deployLayout(0), m_deployLayout(0),
@@ -360,6 +361,9 @@ void RunSettingsWidget::currentRunConfigurationChanged(int index)
if (index >= 0) if (index >= 0)
selectedRunConfiguration = m_runConfigurationsModel->runConfigurationAt(index); selectedRunConfiguration = m_runConfigurationsModel->runConfigurationAt(index);
if (selectedRunConfiguration != m_runConfiguration)
return;
m_ignoreChange = true; m_ignoreChange = true;
m_target->setActiveRunConfiguration(selectedRunConfiguration); m_target->setActiveRunConfiguration(selectedRunConfiguration);
m_ignoreChange = false; m_ignoreChange = false;

View File

@@ -106,6 +106,7 @@ private:
RunConfigurationModel *m_runConfigurationsModel; RunConfigurationModel *m_runConfigurationsModel;
DeployConfigurationModel *m_deployConfigurationModel; DeployConfigurationModel *m_deployConfigurationModel;
QWidget *m_runConfigurationWidget; QWidget *m_runConfigurationWidget;
RunConfiguration *m_runConfiguration;
QVBoxLayout *m_runLayout; QVBoxLayout *m_runLayout;
NamedWidget *m_deployConfigurationWidget; NamedWidget *m_deployConfigurationWidget;
QVBoxLayout *m_deployLayout; QVBoxLayout *m_deployLayout;

View File

@@ -81,9 +81,9 @@
namespace { namespace {
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
# define SHARE_PATH "/../Resources/qmldesigner" # define SHARE_PATH "/../Resources"
#else #else
# define SHARE_PATH "/../share/qtcreator/qmldesigner" # define SHARE_PATH "/../share/qtcreator"
#endif #endif
static QString applicationDirPath() static QString applicationDirPath()
@@ -511,8 +511,13 @@ QString NodeInstanceServerProxy::qmlPuppetApplicationName() const
QString NodeInstanceServerProxy::macOSBundlePath(const QString &path) const QString NodeInstanceServerProxy::macOSBundlePath(const QString &path) const
{ {
QString applicationPath = path; QString applicationPath = path;
if (Utils::HostOsInfo::isMacHost()) if (Utils::HostOsInfo::isMacHost()) {
applicationPath += QLatin1String("/qmlpuppet.app/Contents/MacOS"); if (hasQtQuick2(m_nodeInstanceView.data()))
applicationPath += QLatin1String("/qml2puppet.app/Contents/MacOS");
else
applicationPath += QLatin1String("/qmlpuppet.app/Contents/MacOS");
}
return applicationPath; return applicationPath;
} }

View File

@@ -532,7 +532,6 @@ QmlJSTextEditorWidget::QmlJSTextEditorWidget(QWidget *parent) :
QmlJSTextEditorWidget::~QmlJSTextEditorWidget() QmlJSTextEditorWidget::~QmlJSTextEditorWidget()
{ {
hideContextPane();
m_semanticInfoUpdater->abort(); m_semanticInfoUpdater->abort();
m_semanticInfoUpdater->wait(); m_semanticInfoUpdater->wait();
} }
@@ -668,11 +667,13 @@ void QmlJSTextEditorWidget::onDocumentUpdated(QmlJS::Document::Ptr doc)
m_futureSemanticInfoRevision = doc->editorRevision(); m_futureSemanticInfoRevision = doc->editorRevision();
m_semanticInfoUpdater->update(doc, m_modelManager->snapshot()); m_semanticInfoUpdater->update(doc, m_modelManager->snapshot());
setExtraSelections(CodeWarningsSelection, QList<QTextEdit::ExtraSelection>()); setExtraSelections(CodeWarningsSelection, QList<QTextEdit::ExtraSelection>());
} else { } else if (Document::isFullySupportedLanguage(doc->language())) {
// show parsing errors // show parsing errors
QList<QTextEdit::ExtraSelection> selections; QList<QTextEdit::ExtraSelection> selections;
appendExtraSelectionsForMessages(&selections, doc->diagnosticMessages(), document()); appendExtraSelectionsForMessages(&selections, doc->diagnosticMessages(), document());
setExtraSelections(CodeWarningsSelection, selections); setExtraSelections(CodeWarningsSelection, selections);
} else {
setExtraSelections(CodeWarningsSelection, QList<QTextEdit::ExtraSelection>());
} }
} }

View File

@@ -429,17 +429,20 @@ protected:
private: private:
void run() void run()
{ {
int nMessages = m_scopeChain.document()->diagnosticMessages().size() int nMessages = 0;
+ m_semanticInfo.semanticMessages.size() if (Document::isFullySupportedLanguage(m_scopeChain.document()->language())) {
+ m_semanticInfo.staticAnalysisMessages.size(); nMessages = m_scopeChain.document()->diagnosticMessages().size()
m_delayedUses.reserve(nMessages); + m_semanticInfo.semanticMessages.size()
m_diagnosticRanges.reserve(nMessages); + m_semanticInfo.staticAnalysisMessages.size();
m_extraFormats.reserve(nMessages); m_delayedUses.reserve(nMessages);
addMessages(m_scopeChain.document()->diagnosticMessages(), m_scopeChain.document()); m_diagnosticRanges.reserve(nMessages);
addMessages(m_semanticInfo.semanticMessages, m_semanticInfo.document); m_extraFormats.reserve(nMessages);
addMessages(m_semanticInfo.staticAnalysisMessages, m_semanticInfo.document); addMessages(m_scopeChain.document()->diagnosticMessages(), m_scopeChain.document());
addMessages(m_semanticInfo.semanticMessages, m_semanticInfo.document);
addMessages(m_semanticInfo.staticAnalysisMessages, m_semanticInfo.document);
qSort(m_delayedUses.begin(), m_delayedUses.end(), sortByLinePredicate); qSort(m_delayedUses.begin(), m_delayedUses.end(), sortByLinePredicate);
}
m_currentDelayedUse = 0; m_currentDelayedUse = 0;
m_semanticHighlighter.reportMessagesInfo(m_diagnosticRanges, m_extraFormats); m_semanticHighlighter.reportMessagesInfo(m_diagnosticRanges, m_extraFormats);

View File

@@ -112,19 +112,21 @@ void QmlTaskManager::collectMessages(
FileErrorMessages result; FileErrorMessages result;
result.fileName = fileName; result.fileName = fileName;
result.tasks = convertToTasks(document->diagnosticMessages(), if (Document::isFullySupportedLanguage(document->language())) {
Utils::FileName::fromString(fileName), result.tasks = convertToTasks(document->diagnosticMessages(),
Core::Id(Constants::TASK_CATEGORY_QML)); Utils::FileName::fromString(fileName),
Core::Id(Constants::TASK_CATEGORY_QML));
if (updateSemantic) { if (updateSemantic) {
result.tasks += convertToTasks(linkMessages.value(fileName), result.tasks += convertToTasks(linkMessages.value(fileName),
Utils::FileName::fromString(fileName), Utils::FileName::fromString(fileName),
Core::Id(Constants::TASK_CATEGORY_QML_ANALYSIS)); Core::Id(Constants::TASK_CATEGORY_QML_ANALYSIS));
Check checker(document, context); Check checker(document, context);
result.tasks += convertToTasks(checker(), result.tasks += convertToTasks(checker(),
Utils::FileName::fromString(fileName), Utils::FileName::fromString(fileName),
Core::Id(Constants::TASK_CATEGORY_QML_ANALYSIS)); Core::Id(Constants::TASK_CATEGORY_QML_ANALYSIS));
}
} }
if (!result.tasks.isEmpty()) if (!result.tasks.isEmpty())

View File

@@ -135,7 +135,7 @@ void QmlConsoleEdit::keyPressEvent(QKeyEvent *e)
// Right: Moves the cursor one character to the right. // Right: Moves the cursor one character to the right.
case Qt::Key_Right: case Qt::Key_Right:
if ( !(e->modifiers() & Qt::ControlModifier) if ( !(e->modifiers() & Qt::ControlModifier)
&& textCursor().position() <= m_startOfEditableArea) { && textCursor().position() < m_startOfEditableArea) {
QTextCursor c(textCursor()); QTextCursor c(textCursor());
c.setPosition(m_startOfEditableArea); c.setPosition(m_startOfEditableArea);
setTextCursor(c); setTextCursor(c);
@@ -213,7 +213,8 @@ void QmlConsoleEdit::handleUpKey()
if (ConsoleItem::InputType == (ConsoleItem::ItemType)model->data( if (ConsoleItem::InputType == (ConsoleItem::ItemType)model->data(
index, QmlConsoleItemModel::TypeRole).toInt()) { index, QmlConsoleItemModel::TypeRole).toInt()) {
m_historyIndex = index; m_historyIndex = index;
replaceCurrentScript(model->data(index, Qt::DisplayRole).toString()); replaceCurrentScript(
model->data(index, QmlConsoleItemModel::ExpressionRole).toString());
break; break;
} }
} }
@@ -232,10 +233,12 @@ void QmlConsoleEdit::handleDownKey()
if (ConsoleItem::InputType == (ConsoleItem::ItemType)model->data( if (ConsoleItem::InputType == (ConsoleItem::ItemType)model->data(
index, QmlConsoleItemModel::TypeRole).toInt()) { index, QmlConsoleItemModel::TypeRole).toInt()) {
m_historyIndex = index; m_historyIndex = index;
if (currentRow == model->rowCount() - 1) if (currentRow == model->rowCount() - 1) {
replaceCurrentScript(m_cachedScript); replaceCurrentScript(m_cachedScript);
else } else {
replaceCurrentScript(model->data(index, Qt::DisplayRole).toString()); replaceCurrentScript(
model->data(index, QmlConsoleItemModel::ExpressionRole).toString());
}
break; break;
} }
} }

View File

@@ -313,7 +313,7 @@ void QmlConsoleItemDelegate::setEditorData(QWidget *editor,
const QModelIndex &index) const const QModelIndex &index) const
{ {
QmlConsoleEdit *edtr = qobject_cast<QmlConsoleEdit *>(editor); QmlConsoleEdit *edtr = qobject_cast<QmlConsoleEdit *>(editor);
edtr->insertPlainText(index.data(Qt::DisplayRole).toString()); edtr->insertPlainText(index.data(QmlConsoleItemModel::ExpressionRole).toString());
} }
void QmlConsoleItemDelegate::setModelData(QWidget *editor, void QmlConsoleItemDelegate::setModelData(QWidget *editor,

View File

@@ -159,6 +159,8 @@ QVariant QmlConsoleItemModel::data(const QModelIndex &index, int role) const
return item->file; return item->file;
else if (role == QmlConsoleItemModel::LineRole) else if (role == QmlConsoleItemModel::LineRole)
return item->line; return item->line;
else if (role == QmlConsoleItemModel::ExpressionRole)
return item->expression();
else else
return QVariant(); return QVariant();
} }

View File

@@ -43,7 +43,7 @@ class QmlConsoleItemModel : public QAbstractItemModel
{ {
Q_OBJECT Q_OBJECT
public: public:
enum Roles { TypeRole = Qt::UserRole, FileRole, LineRole }; enum Roles { TypeRole = Qt::UserRole, FileRole, LineRole, ExpressionRole };
explicit QmlConsoleItemModel(QObject *parent = 0); explicit QmlConsoleItemModel(QObject *parent = 0);
~QmlConsoleItemModel(); ~QmlConsoleItemModel();

View File

@@ -242,7 +242,7 @@ void QmlConsoleView::copyToClipboard(const QModelIndex &index)
if (!index.isValid()) if (!index.isValid())
return; return;
QString contents = model()->data(index).toString(); QString contents = model()->data(index, QmlConsoleItemModel::ExpressionRole).toString();
// See if we have file and line Info // See if we have file and line Info
QString filePath = model()->data(index, QmlConsoleItemModel::FileRole).toString(); QString filePath = model()->data(index, QmlConsoleItemModel::FileRole).toString();
if (!filePath.isEmpty()) { if (!filePath.isEmpty()) {

View File

@@ -51,6 +51,7 @@
#include <projectexplorer/kitmanager.h> #include <projectexplorer/kitmanager.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <utils/filesystemwatcher.h> #include <utils/filesystemwatcher.h>
#include <qtsupport/qtsupportconstants.h>
#include <QTextStream> #include <QTextStream>
#include <QDeclarativeComponent> #include <QDeclarativeComponent>
@@ -58,6 +59,57 @@
namespace QmlProjectManager { namespace QmlProjectManager {
namespace Internal {
class QmlProjectKitMatcher : public ProjectExplorer::KitMatcher
{
public:
QmlProjectKitMatcher(const QmlProject::QmlImport &import)
: import(import)
{
}
bool matches(const ProjectExplorer::Kit *k) const
{
if (!k->isValid())
return false;
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(k);
if (dev.isNull() || dev->type() != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE)
return false;
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
if (!version || version->type() != QLatin1String(QtSupport::Constants::DESKTOPQT))
return false;
bool hasViewer;
QtSupport::QtVersionNumber minVersion;
switch (import) {
case QmlProject::UnknownImport:
minVersion = QtSupport::QtVersionNumber(4, 7, 0);
hasViewer = !version->qmlviewerCommand().isEmpty() || !version->qmlsceneCommand().isEmpty();
break;
case QmlProject::QtQuick1Import:
minVersion = QtSupport::QtVersionNumber(4, 7, 1);
hasViewer = !version->qmlviewerCommand().isEmpty();
break;
case QmlProject::QtQuick2Import:
minVersion = QtSupport::QtVersionNumber(5, 0, 0);
hasViewer = !version->qmlsceneCommand().isEmpty();
break;
}
if (version->qtVersion() >= minVersion
&& hasViewer)
return true;
return false;
}
private:
QmlProject::QmlImport import;
};
} // namespace Internal
QmlProject::QmlProject(Internal::Manager *manager, const QString &fileName) QmlProject::QmlProject(Internal::Manager *manager, const QString &fileName)
: m_manager(manager), : m_manager(manager),
m_fileName(fileName), m_fileName(fileName),
@@ -331,9 +383,22 @@ bool QmlProject::fromMap(const QVariantMap &map)
// refresh first - project information is used e.g. to decide the default RC's // refresh first - project information is used e.g. to decide the default RC's
refresh(Everything); refresh(Everything);
ProjectExplorer::Kit *defaultKit = ProjectExplorer::KitManager::instance()->defaultKit(); if (!activeTarget()) {
if (!activeTarget() && defaultKit) // find a kit that matches prerequisites (prefer default one)
addTarget(createTarget(defaultKit)); Internal::QmlProjectKitMatcher matcher(defaultImport());
ProjectExplorer::KitManager *kitManager = ProjectExplorer::KitManager::instance();
QList<ProjectExplorer::Kit*> kits = kitManager->kits(&matcher);
if (!kits.isEmpty()) {
ProjectExplorer::Kit *kit = 0;
if (kits.contains(kitManager->defaultKit())) {
kit = kitManager->defaultKit();
} else {
kit = kits.first();
}
addTarget(createTarget(kit));
}
}
// addedTarget calls updateEnabled on the runconfigurations // addedTarget calls updateEnabled on the runconfigurations
// which needs to happen after refresh // which needs to happen after refresh

View File

@@ -161,11 +161,17 @@ FORMS += \
blackberrydebugtokenrequestdialog.ui blackberrydebugtokenrequestdialog.ui
include(../../private_headers.pri) include(../../private_headers.pri)
exists($${QT_PRIVATE_HEADERS}/QtGui/private/qzipreader_p.h) {
greaterThan(QT_MAJOR_VERSION, 4) {
QT += gui-private
DEFINES += QNX_ZIP_FILE_SUPPORT DEFINES += QNX_ZIP_FILE_SUPPORT
} else { } else {
warning("The QNX plugin depends on private headers from QtGui module, to be fully functional.") exists($${QT_PRIVATE_HEADERS}/QtGui/private/qzipreader_p.h) {
warning("To fix it, pass 'QT_PRIVATE_HEADERS=$QTDIR/include' to qmake, where $QTDIR is the source directory of qt.") DEFINES += QNX_ZIP_FILE_SUPPORT
} else {
warning("The QNX plugin depends on private headers from QtGui module, to be fully functional.")
warning("To fix it, pass 'QT_PRIVATE_HEADERS=$QTDIR/include' to qmake, where $QTDIR is the source directory of qt.")
}
} }
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII

View File

@@ -98,13 +98,15 @@ void QmakeKitInformation::setup(ProjectExplorer::Kit *k)
if (!tc || !tc->suggestedMkspecList().contains(spec)) { if (!tc || !tc->suggestedMkspecList().contains(spec)) {
QList<ProjectExplorer::ToolChain *> tcList = ProjectExplorer::ToolChainManager::instance()->toolChains(); QList<ProjectExplorer::ToolChain *> tcList = ProjectExplorer::ToolChainManager::instance()->toolChains();
ProjectExplorer::ToolChain *possibleTc = 0;
foreach (ProjectExplorer::ToolChain *current, tcList) { foreach (ProjectExplorer::ToolChain *current, tcList) {
if (version->qtAbis().contains(current->targetAbi()) if (version->qtAbis().contains(current->targetAbi())) {
&& current->suggestedMkspecList().contains(spec)) { possibleTc = current;
ProjectExplorer::ToolChainKitInformation::setToolChain(k, current); if (current->suggestedMkspecList().contains(spec))
break; break;
} }
} }
ProjectExplorer::ToolChainKitInformation::setToolChain(k, possibleTc);
} }
} }

View File

@@ -609,6 +609,7 @@ void Qt4Project::updateQmlJSCodeModel()
hasQmlLib = qtLibs.contains(QLatin1String("declarative")) || hasQmlLib = qtLibs.contains(QLatin1String("declarative")) ||
qtLibs.contains(QLatin1String("qml")) || qtLibs.contains(QLatin1String("qml")) ||
qtLibs.contains(QLatin1String("quick")); qtLibs.contains(QLatin1String("quick"));
break;
} }
} }
@@ -617,7 +618,7 @@ void Qt4Project::updateQmlJSCodeModel()
// This assumption fails when there are no QDeclarativeEngine/QDeclarativeView (QtQuick 1) // This assumption fails when there are no QDeclarativeEngine/QDeclarativeView (QtQuick 1)
// or QQmlEngine/QQuickView (QtQuick 2) instances. // or QQmlEngine/QQuickView (QtQuick 2) instances.
Core::Context pl(ProjectExplorer::Constants::LANG_CXX); Core::Context pl(ProjectExplorer::Constants::LANG_CXX);
if (m_projectFiles->files[QMLType].count() && hasQmlLib) if (hasQmlLib)
pl.add(ProjectExplorer::Constants::LANG_QMLJS); pl.add(ProjectExplorer::Constants::LANG_QMLJS);
setProjectLanguages(pl); setProjectLanguages(pl);

View File

@@ -301,6 +301,7 @@ void ExamplesWelcomePage::facilitateQml(QDeclarativeEngine *engine)
if (m_showExamples) { if (m_showExamples) {
proxy->setShowTutorialsOnly(false); proxy->setShowTutorialsOnly(false);
rootContenxt->setContextProperty(QLatin1String("examplesModel"), proxy); rootContenxt->setContextProperty(QLatin1String("examplesModel"), proxy);
rootContenxt->setContextProperty(QLatin1String("qtVersionModel"), proxy->qtVersionModel());
} else { } else {
rootContenxt->setContextProperty(QLatin1String("tutorialsModel"), proxy); rootContenxt->setContextProperty(QLatin1String("tutorialsModel"), proxy);
} }

View File

@@ -4614,9 +4614,12 @@ void BaseTextEditorWidget::onCodeStylePreferencesDestroyed()
{ {
if (sender() != d->m_codeStylePreferences) if (sender() != d->m_codeStylePreferences)
return; return;
ICodeStylePreferences *prefs = TextEditorSettings::instance()->codeStyle(languageSettingsId());
if (prefs == d->m_codeStylePreferences)
prefs = 0;
// avoid failing disconnects, m_codeStylePreferences has already been reduced to QObject // avoid failing disconnects, m_codeStylePreferences has already been reduced to QObject
d->m_codeStylePreferences = 0; d->m_codeStylePreferences = 0;
setCodeStyle(TextEditorSettings::instance()->codeStyle(languageSettingsId())); setCodeStyle(prefs);
} }
void BaseTextEditorWidget::slotCodeStyleSettingsChanged(const QVariant &) void BaseTextEditorWidget::slotCodeStyleSettingsChanged(const QVariant &)

View File

@@ -41,6 +41,7 @@
#include <texteditor/texteditorsettings.h> #include <texteditor/texteditorsettings.h>
#include <texteditor/completionsettings.h> #include <texteditor/completionsettings.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <utils/qtcassert.h>
#include <QObject> #include <QObject>
#include <QList> #include <QList>
@@ -221,7 +222,7 @@ void CodeAssistantPrivate::requestProposal(AssistReason reason,
AssistKind kind, AssistKind kind,
IAssistProvider *provider) IAssistProvider *provider)
{ {
Q_ASSERT(!isWaitingForProposal()); QTC_ASSERT(!isWaitingForProposal(), return);
if (!provider) { if (!provider) {
if (kind == Completion) { if (kind == Completion) {
@@ -328,6 +329,7 @@ void CodeAssistantPrivate::displayProposal(IAssistProposal *newProposal, AssistR
void CodeAssistantPrivate::processProposalItem(IAssistProposalItem *proposalItem) void CodeAssistantPrivate::processProposalItem(IAssistProposalItem *proposalItem)
{ {
QTC_ASSERT(m_proposal, return);
proposalItem->apply(m_textEditor, m_proposal->basePosition()); proposalItem->apply(m_textEditor, m_proposal->basePosition());
destroyContext(); destroyContext();
process(); process();
@@ -335,6 +337,7 @@ void CodeAssistantPrivate::processProposalItem(IAssistProposalItem *proposalItem
void CodeAssistantPrivate::handlePrefixExpansion(const QString &newPrefix) void CodeAssistantPrivate::handlePrefixExpansion(const QString &newPrefix)
{ {
QTC_ASSERT(m_proposal, return);
const int currentPosition = m_textEditor->position(); const int currentPosition = m_textEditor->position();
m_textEditor->setCursorPosition(m_proposal->basePosition()); m_textEditor->setCursorPosition(m_proposal->basePosition());
m_textEditor->replace(currentPosition - m_proposal->basePosition(), newPrefix); m_textEditor->replace(currentPosition - m_proposal->basePosition(), newPrefix);
@@ -397,6 +400,7 @@ void CodeAssistantPrivate::notifyChange()
stopAutomaticProposalTimer(); stopAutomaticProposalTimer();
if (isDisplayingProposal()) { if (isDisplayingProposal()) {
QTC_ASSERT(m_proposal, return);
if (m_textEditor->position() < m_proposal->basePosition()) { if (m_textEditor->position() < m_proposal->basePosition()) {
destroyContext(); destroyContext();
} else { } else {

Some files were not shown because too many files have changed in this diff Show More