diff --git a/dist/installer/ifw/config/config-linux.xml.in b/dist/installer/ifw/config/config-linux.xml.in
index 837d5d1dbf0..21917f13317 100644
--- a/dist/installer/ifw/config/config-linux.xml.in
+++ b/dist/installer/ifw/config/config-linux.xml.in
@@ -12,12 +12,4 @@
@homeDir@/qtcreator-{version}/opt/qtcreator-{version}
-
-
-
- I have read and understood the terms contained in the above license agreements.
- I do not accept the terms contained in the above license agreements.
-
-
-
diff --git a/dist/installer/ifw/config/config-mac.xml.in b/dist/installer/ifw/config/config-mac.xml.in
new file mode 100644
index 00000000000..f2084f2df49
--- /dev/null
+++ b/dist/installer/ifw/config/config-mac.xml.in
@@ -0,0 +1,15 @@
+
+
+ Qt Creator
+ {version}
+ Qt Creator {version}
+ Qt Project
+ http://qt-project.org
+
+ logo.png
+ watermark.png
+ Uninstall Qt Creator
+
+ @homeDir@/Applications/Qt Creator {version}
+ true
+
diff --git a/dist/installer/ifw/config/config-windows.xml.in b/dist/installer/ifw/config/config-windows.xml.in
index 4bbb77b97d2..0b3529759f8 100644
--- a/dist/installer/ifw/config/config-windows.xml.in
+++ b/dist/installer/ifw/config/config-windows.xml.in
@@ -11,12 +11,4 @@
QtCreatorUninst@rootDir@/Qt/qtcreator-{version}
-
-
-
- I have read and understood the terms contained in the above license agreements.
- I do not accept the terms contained in the above license agreements.
-
-
-
diff --git a/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs b/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs
index 02ea1d2f9c6..bc669be7bbc 100644
--- a/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs
+++ b/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs
@@ -57,7 +57,7 @@ Component.prototype.beginInstallation = function()
else if (installer.value("os") == "x11")
component.qtCreatorBinaryPath = component.qtCreatorBinaryPath + "/bin/qtcreator";
else if (installer.value("os") == "mac")
- component.qtCreatorBinaryPath = "\"" + component.qtCreatorBinaryPath + "/Qt Creator.app/Contents/MacOS/Qt Creator\"";
+ component.qtCreatorBinaryPath = component.qtCreatorBinaryPath + "/Qt Creator.app/Contents/MacOS/Qt Creator";
if ( installer.value("os") === "win" ) {
component.setStopProcessForUpdateRequest(component.qtCreatorBinaryPath, true);
@@ -202,7 +202,7 @@ Component.prototype.installationFinished = function()
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success) {
var isLaunchQtCreatorCheckBoxChecked = component.userInterface("LaunchQtCreatorCheckBoxForm").launchQtCreatorCheckBox.checked;
if (isLaunchQtCreatorCheckBoxChecked)
- installer.executeDetached(component.qtCreatorBinaryPath);
+ installer.executeDetached(component.qtCreatorBinaryPath, new Array(), "@homeDir@");
}
} catch(e) {
print(e);
diff --git a/doc/config/qt-defines.qdocconf b/doc/config/qt-defines.qdocconf
index 1ce9a8045f9..c40ccba5ca1 100644
--- a/doc/config/qt-defines.qdocconf
+++ b/doc/config/qt-defines.qdocconf
@@ -11,8 +11,7 @@ defines = Q_QDOC \
QT_DEPRECATED \
Q_NO_USING_KEYWORD \
__cplusplus \
- qtquick \
- qcmanual
+ $QTC_LICENSE_TYPE
versionsym = QT_VERSION_STR
diff --git a/doc/doc.pri b/doc/doc.pri
index a005b3f6edf..d1a5c77fc08 100644
--- a/doc/doc.pri
+++ b/doc/doc.pri
@@ -11,6 +11,8 @@ greaterThan(QT_MAJOR_VERSION, 4) {
VERSION_TAG = $$replace(QTCREATOR_VERSION, "[-.]", )
+isEmpty(LICENSE_TYPE):LICENSE_TYPE=opensource
+
# unset the installdir for qdoc, so we force generation
# of URLs for the links to the Qt documentation
QMAKE_DOCS_INSTALLDIR =
@@ -21,7 +23,7 @@ defineReplace(cmdEnv) {
}
defineReplace(qdoc) {
- return("$$cmdEnv(SRCDIR=$$PWD OUTDIR=$$1 QTC_VERSION=$$QTCREATOR_VERSION QTC_VERSION_TAG=$$VERSION_TAG QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS]) $$QDOC_BIN")
+ return("$$cmdEnv(SRCDIR=$$PWD OUTDIR=$$1 QTC_VERSION=$$QTCREATOR_VERSION QTC_VERSION_TAG=$$VERSION_TAG QTC_LICENSE_TYPE=$$LICENSE_TYPE QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS]) $$QDOC_BIN")
}
QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
diff --git a/doc/images/qmldesigner-qml-components.png b/doc/images/qmldesigner-qml-components.png
index 7045b9e1cc2..915154e9881 100644
Binary files a/doc/images/qmldesigner-qml-components.png and b/doc/images/qmldesigner-qml-components.png differ
diff --git a/doc/images/qmldesigner-visual-editor.png b/doc/images/qmldesigner-visual-editor.png
index 012faea5f72..cf0b86cf2a8 100644
Binary files a/doc/images/qmldesigner-visual-editor.png and b/doc/images/qmldesigner-visual-editor.png differ
diff --git a/doc/images/qtcreator-build-dependencies.png b/doc/images/qtcreator-build-dependencies.png
index 7f1284a50dc..97b35971be0 100644
Binary files a/doc/images/qtcreator-build-dependencies.png and b/doc/images/qtcreator-build-dependencies.png differ
diff --git a/doc/images/qtcreator-editor-settings.png b/doc/images/qtcreator-editor-settings.png
index be9c7373ca6..a6ece4ace85 100644
Binary files a/doc/images/qtcreator-editor-settings.png and b/doc/images/qtcreator-editor-settings.png differ
diff --git a/doc/images/qtcreator-fakevim-options.png b/doc/images/qtcreator-fakevim-options.png
index 5bcf99c10f5..d5e788eabe2 100644
Binary files a/doc/images/qtcreator-fakevim-options.png and b/doc/images/qtcreator-fakevim-options.png differ
diff --git a/doc/images/qtcreator-generic-highlighter.png b/doc/images/qtcreator-generic-highlighter.png
index 322d4efe626..438eda199c5 100644
Binary files a/doc/images/qtcreator-generic-highlighter.png and b/doc/images/qtcreator-generic-highlighter.png differ
diff --git a/doc/images/qtcreator-gerrit-options.png b/doc/images/qtcreator-gerrit-options.png
index cfb94493f56..21b3825a1de 100644
Binary files a/doc/images/qtcreator-gerrit-options.png and b/doc/images/qtcreator-gerrit-options.png differ
diff --git a/doc/images/qtcreator-gerrit.png b/doc/images/qtcreator-gerrit.png
index ac727ef8ef7..b02fd2a21f1 100644
Binary files a/doc/images/qtcreator-gerrit.png and b/doc/images/qtcreator-gerrit.png differ
diff --git a/doc/images/qtcreator-gs-build-example-open.png b/doc/images/qtcreator-gs-build-example-open.png
index 836ad85a38c..87512a88844 100644
Binary files a/doc/images/qtcreator-gs-build-example-open.png and b/doc/images/qtcreator-gs-build-example-open.png differ
diff --git a/doc/images/qtcreator-open-project-targets.png b/doc/images/qtcreator-open-project-targets.png
index ad1cf0cc0e0..a41e47cc482 100644
Binary files a/doc/images/qtcreator-open-project-targets.png and b/doc/images/qtcreator-open-project-targets.png differ
diff --git a/doc/images/qtcreator-qml-performance-monitor-enterprise.png b/doc/images/qtcreator-qml-performance-monitor-enterprise.png
new file mode 100644
index 00000000000..6671c66c6cc
Binary files /dev/null and b/doc/images/qtcreator-qml-performance-monitor-enterprise.png differ
diff --git a/doc/src/analyze/qtquick-profiler.qdoc b/doc/src/analyze/qtquick-profiler.qdoc
index 0f9e77ad158..458a98285f1 100644
--- a/doc/src/analyze/qtquick-profiler.qdoc
+++ b/doc/src/analyze/qtquick-profiler.qdoc
@@ -38,8 +38,8 @@
for the project. For more information, see
\l{Setting Up QML Debugging}.
- \li In the \gui Projects mode, select Qt 4.7.4 in the \gui {Qt version}
- field.
+ \li In the \gui Projects mode, select a \l{glossary-buildandrun-kit}
+ {kit} with Qt version 4.7.4 or later.
\note To profile applications on devices, you must install Qt 4.7.4
or later libraries on them.
@@ -98,6 +98,11 @@
The \gui Timeline view displays graphical representations of:
\list
+ \if defined(enterprise)
+ \li Pixmap loading times and cache sizes
+
+ \li Scene graph events
+ \endif
\li Painting operations
@@ -113,7 +118,14 @@
\endlist
+ \if defined(enterprise)
+ Information about the pixmap cache and scene graph events are only available
+ from Qt 5.1 onwards.
+
+ \image qtcreator-qml-performance-monitor-enterprise.png "QML Profiler"
+ \else
\image qtcreator-qml-performance-monitor.png "QML Profiler"
+ \endif
Each row in the timeline (6) describes a type of QML events that were
recorded. Move the cursor on an event on a row to see how long it takes and
diff --git a/doc/src/android/deploying-android.qdoc b/doc/src/android/deploying-android.qdoc
index 4003ea457e5..1c761f71c38 100644
--- a/doc/src/android/deploying-android.qdoc
+++ b/doc/src/android/deploying-android.qdoc
@@ -95,6 +95,7 @@
as part of the APK, select the \gui {Bundle Qt libraries in APK} option.
This is the default option
when developing with Qt 5.
+ It is not supported when developing with Qt 4.
\section1 Using Ministro to Install Qt Libraries
diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc
index d322ac3c336..a9636f6c5f2 100644
--- a/doc/src/debugger/creator-debugger.qdoc
+++ b/doc/src/debugger/creator-debugger.qdoc
@@ -238,11 +238,7 @@
debugging) or runs a separate process (e.g. when using GDB server
on embedded Linux). The host side typically
consists of \QC itself, often with the help of an external process, such as
- \if defined(qcmanual)
GDB or CDB.
- \else
- GDB.
- \endif
While this setup might look daunting, it is mostly invisible to
the user of \QC. To start debugging on a remote target with the
diff --git a/doc/src/editors/creator-editors-options.qdoc b/doc/src/editors/creator-editors-options.qdoc
index 18fd9ed1496..eab43bb25b4 100644
--- a/doc/src/editors/creator-editors-options.qdoc
+++ b/doc/src/editors/creator-editors-options.qdoc
@@ -35,7 +35,7 @@
\gui{Text Editor}.
These settings apply to all projects. To specify editor behavior for an
- open project, select \gui {Projects > Editor Settings}. For more
+ open project, select \gui Projects > \gui Editor. For more
information, see \l{Specifying Editor Settings}.
You can also specify indentation settings separately for C++ and QML files
diff --git a/doc/src/editors/creator-editors.qdoc b/doc/src/editors/creator-editors.qdoc
index ee7802d0f5c..e63d5dc5057 100644
--- a/doc/src/editors/creator-editors.qdoc
+++ b/doc/src/editors/creator-editors.qdoc
@@ -71,9 +71,8 @@
definition files as the primary location.
When you open a file for editing and the editor cannot find the highlight
- definition for it, an alert appears. You can turn off the alerts. You can
- also specify patterns for ignoring files. The editor will not alert you if
- highlight definitions for the ignored files are not found.
+ definition for it, an alert appears. To suppress the alerts, you can specify
+ patterns for ignoring files.
To download highlight definition files:
@@ -103,8 +102,8 @@
definition files on your system, or click \gui Browse to locate
them in the file system yourself.
- \li In the \gui {Ignored file patterns} field, specify file patterns.
- You will not receive alerts if the highlight definitions for the
+ \li In the \gui {Ignored file patterns} field, specify file patterns to
+ suppress alerts if the highlight definitions for the
specified files are not found.
\li Click \gui OK to save your changes.
@@ -890,8 +889,10 @@
\endlist
To configure the server, select \gui{Tools} > \gui{Options} >
- \gui{Code Pasting}. In \gui CodePaster, specify the host name of the
- CodePaster service. In \gui Fileshare, specify the path to a shared
+ \gui{Code Pasting} > \gui CodePaster. In the \gui Server field, specify the
+ host name of the CodePaster service.
+
+ Select \gui Fileshare to specify the path to a shared
network drive. The code snippets are copied to the drive as simple files.
You have to delete obsolete files from the drive manually.
@@ -903,6 +904,10 @@
To fetch a snippet of code from the server, select \gui{Tools} >
\gui{Code Pasting} > \gui{Fetch Snippet} or press \key{Alt+C,Alt+F}.
+ To fetch content from a URL on a CodePaster service, select \gui{Tools} >
+ \gui{Code Pasting} > \gui{Fetch from URL}. The content is opened in the code
+ editor.
+
\note To use \gui{Pastebin.Com}, configure the domain
prefix in \gui{Tools} > \gui{Options} > \gui{Code Pasting} >
\gui{Pastebin.com}.
@@ -931,6 +936,8 @@
or press \key {Alt+(}. To stop recording, select \gui {Tools > Macros >
Stop Recording Macro} or press \key {Alt+)}.
+ \note The macro recorder does not support code completion.
+
To play the last macro, select \gui {Tools > Macros > Play Last Macro} or
press \key {Alt+R}.
@@ -1104,8 +1111,8 @@
\image qtcreator-indentation.png "Text Editor Behavior options"
- To specify different settings for a particular project, select \gui {Projects >
- Editor Settings}.
+ To specify different settings for a particular project, select \gui Projects
+ > \gui Editor.
You can specify how to interpret the \key Tab and \key Backspace key
presses and how to align continuation lines.
@@ -1297,8 +1304,7 @@
\section1 Advanced Search
- To search through projects, files on a file system or the currently open
- file:
+ To search through projects, files on a file system or currently open files:
\list 1
@@ -1326,6 +1332,8 @@
\li \gui{Current File} searches only the current file.
+ \li \gui {Open Documents} searches all open files.
+
\endlist
\li Enter the text you are looking for and click \gui Search.
diff --git a/doc/src/howto/creator-vcs.qdoc b/doc/src/howto/creator-vcs.qdoc
index 669b77c3773..e9c2dd96fd4 100644
--- a/doc/src/howto/creator-vcs.qdoc
+++ b/doc/src/howto/creator-vcs.qdoc
@@ -64,7 +64,6 @@
\li Subversion
\li \l{http://subversion.apache.org/}
\li Subversion version 1.6.17 and later
- \li
\endtable
\section1 Setting Up Version Control Systems
@@ -555,10 +554,10 @@
\image qtcreator-gerrit.png
- To view details of the selected change, select \gui Diff.
+ To view details of the selected change, select \gui Show.
- To apply the selected change to the top of your local repository, select
- \gui Apply. To remove the change after testing it, select \gui Tools >
+ To cherry-pick the selected change to the local repository, select
+ \gui {Cherry Pick}. To remove the change after testing it, select \gui Tools >
\gui Git > \gui {Local Repository} > \gui Reset. In the
\gui {Undo Changes to} dialog, select the
state to reset the working directory to, and then select \gui OK.
diff --git a/doc/src/howto/qtcreator-faq.qdoc b/doc/src/howto/qtcreator-faq.qdoc
index 026eb8ef38a..77b500343ed 100644
--- a/doc/src/howto/qtcreator-faq.qdoc
+++ b/doc/src/howto/qtcreator-faq.qdoc
@@ -100,9 +100,7 @@
You can look up any issue in the
\l{http://bugreports.qt-project.org/}{Qt bug tracker}.
- \if defined(qcmanual)
\include widgets/creator-faq-qtdesigner.qdocinc
- \endif
\section1 Help Questions
diff --git a/doc/src/linux-mobile/maemodev.qdoc b/doc/src/linux-mobile/maemodev.qdoc
index ae4bfba8b08..c6b8b887f9b 100644
--- a/doc/src/linux-mobile/maemodev.qdoc
+++ b/doc/src/linux-mobile/maemodev.qdoc
@@ -19,11 +19,7 @@
/*!
\contentspage index.html
- \if defined(qcmanual)
\previouspage creator-developing-generic-linux.html
- \else
- \previouspage creator-developing-meego.html
- \endif
\page creator-developing-maemo.html
\nextpage creator-developing-meego.html
@@ -40,11 +36,9 @@
development is disabled by default. To enable it, select \gui Help >
\gui {About Plugins} > \gui {Device Support} > \gui Madde and restart \QC.
- \if defined(qcmanual)
For more
information about the Maemo 5 platform, see
\l{http://maemo.org/intro/platform/}{Software Platform} on the Maemo web site.
- \endif
For more information about developing applications for the Maemo 5
platform, select \gui {Help > Index} and look for \gui {Platform Notes},
@@ -58,10 +52,8 @@
\li Maemo 5 device: Nokia N900 with software update release 1.3
(V20.2010.36-2) or later installed.
- \if defined(qcmanual)
\li MADDE cross-platform Maemo development
tool (installed as part of the Qt 4 SDK).
- \endif
\li Nokia USB drivers.
@@ -234,13 +226,7 @@
testing. If you write applications that use Qt Mobility APIs, you might want
to test them with real user data. To create a connection as a user, specify
the \gui Username and \gui Password in \QC. For more information, see
- \if defined(qcmanual)
\l{Testing with User Data on Maemo Devices}.
- \else
- \l{http://doc.qt.digia.com/qtcreator/creator-developing-maemo.html#testing-with-user-data-on-maemo-devices}
- {Testing with User Data on Maemo Devices}.
- \endif
-
You can protect the connections between \QC and
a device by using either a password or an SSH key. If you use a password, you
@@ -250,22 +236,11 @@
If you do not have an SSH key, you can create it in \QC.
Encrypted keys are not supported. For more
information, see
- \if defined(qcmanual)
\l{Generating SSH Keys}.
- \else
- \l{http://doc.qt.digia.com/qtcreator/creator-developing-meego.html#generating-ssh-keys}
- {Generating SSH Keys}.
- \endif
-
You can view processes running on devices and kill them. For more
information, see
- \if defined(qcmanual)
\l{Managing Device Processes}.
- \else
- \l{http://doc.qt.digia.com/qtcreator/creator-developing-meego.html#managing-device-processes}
- {Managing Device Processes}.
- \endif
To configure connections between \QC and a
@@ -309,8 +284,6 @@
\endlist
- \if defined(qcmanual)
-
\li To test applications on the emulator (QEMU) separately, you must
create a connection to it from the development PC. If you installed
Qt 4 SDK, the connection is created automatically and you can omit this
@@ -330,7 +303,6 @@
connection.
\endlist
- \endif
\li Select \gui Tools > \gui Options > \gui {Build & Run} >
\gui Kits > \gui Add to add a kit for building for the device:
diff --git a/doc/src/linux-mobile/meegodev.qdoc b/doc/src/linux-mobile/meegodev.qdoc
index 982f45e0ffd..863d986eca9 100644
--- a/doc/src/linux-mobile/meegodev.qdoc
+++ b/doc/src/linux-mobile/meegodev.qdoc
@@ -21,11 +21,7 @@
\contentspage index.html
\previouspage creator-developing-maemo.html
\page creator-developing-meego.html
- \if defined(qcmanual)
\nextpage creator-developing-qnx.html
- \else
- \nextpage creator-developing-maemo.html
- \endif
\title Connecting MeeGo Harmattan Devices
@@ -39,12 +35,9 @@
development is disabled by default. To enable it, select \gui Help >
\gui {About Plugins} > \gui {Device Support} > \gui Madde and restart \QC.
- \if defined(qcmanual)
For more information about the Harmattan platform, see
\l{http://library.developer.nokia.com/topic/MeeGo_1.2_Harmattan_API/html/guide/html/Developer_Library_Harmattan_overview_5dcf.html}
{Harmattan Overview} in the MeeGo 1.2 Harmattan Developer Library.
- \endif
-
\note Qt 4 SDK does not contain the tool chains for building applications for
other MeeGo devices than MeeGo Harmattan. You can try to run applications
@@ -247,13 +240,7 @@
If you write applications that use Qt Mobility APIs, you might want to test
them with real user data. To create a connection as a user, specify the
\gui Username and \gui Password in \QC. For more information, see
- \if defined(qcmanual)
\l{Testing with User Data on MeeGo Devices}.
- \else
- \l{http://doc.qt.digia.com/qtcreator/creator-developing-meego.html#testing-with-user-data-on-meego-devices}
- {Testing with User Data on MeeGo Devices}.
- \endif
-
You can protect the connections between \QC and a device by using
either a password or an SSH key. If you use a password, you must generate it
@@ -262,23 +249,11 @@
If you do not have an SSH key, you can create it in \QC. Encrypted
keys are not supported. For more information, see
- \if defined(qcmanual)
\l{Generating SSH Keys}.
- \else
- \l{http://doc.qt.digia.com/qtcreator/creator-developing-meego.html#generating-ssh-keys}
- {Generating SSH Keys}.
- \endif
-
You can view processes running on devices and kill them. For more
information, see
- \if defined(qcmanual)
\l{Managing Device Processes}.
- \else
- \l{http://doc.qt.digia.com/qtcreator/creator-developing-meego.html#managing-device-processes}
- {Managing Device Processes}.
- \endif
-
To configure connections between \QC and a device:
@@ -324,8 +299,6 @@
\endlist
- \if defined(qcmanual)
-
\li To test applications on the emulator (QEMU), you must
create a connection to it from the development PC. If you installed
Qt 4 SDK, the connection is created automatically and you can omit this
@@ -355,8 +328,6 @@
\endlist
- \endif
-
\li Select \gui Tools > \gui Options > \gui {Build & Run} >
\gui Kits > \gui Add to add a kit for building for the device:
@@ -410,8 +381,6 @@
\endlist
- \if defined(qcmanual)
-
\section2 Testing with User Data on MeeGo Devices
To run your application as the default user, you must first assign a
@@ -436,8 +405,6 @@
\include linux-mobile/linuxdev-keys.qdocinc
\include linux-mobile/linuxdev-processes.qdocinc
- \endif
-
\section1 Troubleshooting Harmattan Connections
The addresses used in this example might be reserved by some other
diff --git a/doc/src/overview/creator-issues.qdoc b/doc/src/overview/creator-issues.qdoc
index 8713a745bc5..5b25d7476ac 100644
--- a/doc/src/overview/creator-issues.qdoc
+++ b/doc/src/overview/creator-issues.qdoc
@@ -104,11 +104,9 @@
\li Creating new CMake projects with \QC is not supported.
- \if defined(qcmanual)
\li On Windows, you must create projects for Maemo 5 and Harmattan
device types on the same partition where you installed Qt 4 SDK, \QC, and
MADDE.
- \endif
\li If error messages displayed in the \gui {Compile Output} pane contain
paths where slashes are missing (for example, C:QtSDK),
diff --git a/doc/src/overview/creator-tech-support.qdoc b/doc/src/overview/creator-tech-support.qdoc
index e62cfb29d8f..12bc9427d7f 100644
--- a/doc/src/overview/creator-tech-support.qdoc
+++ b/doc/src/overview/creator-tech-support.qdoc
@@ -51,11 +51,6 @@
\li Develop Qt applications for desktop and mobile devices
\li \l{http://qt-project.org}{Qt Developer Network}
- \row
- \li Develop Qt applications for Nokia mobile devices
- \li \l{http://www.developer.nokia.com/Develop/Qt/}
- {Nokia Developer - Qt}
-
\row
\li Participate in Qt development
\li \l{http://qt-project.org/contribute}{Contribute to Qt}
diff --git a/doc/src/overview/mobile-app-design.qdoc b/doc/src/overview/mobile-app-design.qdoc
index 11790c833c5..1063513c84e 100644
--- a/doc/src/overview/mobile-app-design.qdoc
+++ b/doc/src/overview/mobile-app-design.qdoc
@@ -115,8 +115,4 @@
\endlist
- For more information about user experience techniques for mobile devices,
- see the \l{http://www.developer.nokia.com/Resources/Library/Design_and_UX}
- on Nokia Developer.
-
*/
diff --git a/doc/src/projects/creator-projects-creating.qdoc b/doc/src/projects/creator-projects-creating.qdoc
index fcec4c51a0f..5d197a6d8c5 100644
--- a/doc/src/projects/creator-projects-creating.qdoc
+++ b/doc/src/projects/creator-projects-creating.qdoc
@@ -98,7 +98,6 @@
\list
- \if defined(qcmanual)
\li Qt GUI Application
Use \QD forms to design a Qt widget based user interface for the
@@ -110,7 +109,6 @@
mobile devices and C++ to implement the application logic.
Select this template to develop for devices that support only
Qt 4.6.x
- \endif
\li Qt Quick Application (Built-in Types)
@@ -204,6 +202,12 @@
Subprojects that enable you to structure your qmake projects as
a tree hierarchy
+ \li Code Snippet
+
+ Creates a qmake project from a code snippet. When fixing bug
+ reports that contain a code snippet, you can place the code
+ snippet into a project to compile and check it.
+
\endlist
\li Non-Qt Projects
@@ -271,18 +275,14 @@
C++ class, source, or header files that you can use to write the
application logic in both Qt Quick projects and
- \if defined(qcmanual)
Qt widget based projects
- \endif
\li Qt
\list
- \if defined(qcmanual)
\li \QD forms and \QD form classes, which specify parts of user
interfaces in Qt widget based projects
- \endif
\li Qt resource files, which allow you to store binary files in the
application executable
@@ -418,8 +418,7 @@
\li \l{Opening Projects}
\li \l{Adding Libraries to Projects}
\li \l{Adding New Custom Wizards}
- \li \l{Setting Up a CMake Project}
- \li \l{Setting Up a Generic Project}
+ \li \l{Using Other Build Systems}
\endlist
*/
diff --git a/doc/src/projects/creator-projects-generic.qdoc b/doc/src/projects/creator-projects-generic.qdoc
index f7c6f67c524..0af79f70097 100644
--- a/doc/src/projects/creator-projects-generic.qdoc
+++ b/doc/src/projects/creator-projects-generic.qdoc
@@ -45,7 +45,7 @@
\list 1
- \li Select \gui File > \gui{New File or Project} > \gui{Other Project}
+ \li Select \gui File > \gui{New File or Project} > \gui{Import Project}
> \gui{Import Existing Project}.
\li In \gui{Import Existing Project}, enter the project name
diff --git a/doc/src/projects/creator-projects-qbs.qdoc b/doc/src/projects/creator-projects-qbs.qdoc
index e92e69e947a..aacf5122010 100644
--- a/doc/src/projects/creator-projects-qbs.qdoc
+++ b/doc/src/projects/creator-projects-qbs.qdoc
@@ -26,8 +26,8 @@
The Qt Build Suite (Qbs) and the Qbs plugin are still experimental, and
therefore, you must first enable the plugin manually. If you build \QC
- yourself from our git repository, you also need to fetch the Qbs submodule to
- get Qbs support. See \l{Enabling the Qbs Plugin} below.
+ yourself from our Git repository, you also need to fetch the Qbs submodule
+ to get Qbs support.
To use Qbs to build a project, you must create a .qbs file for the project.
For more information, see the
diff --git a/doc/src/projects/creator-projects-qt-versions.qdoc b/doc/src/projects/creator-projects-qt-versions.qdoc
index 23861f54e3f..176e69892f7 100644
--- a/doc/src/projects/creator-projects-qt-versions.qdoc
+++ b/doc/src/projects/creator-projects-qt-versions.qdoc
@@ -55,14 +55,14 @@
\image qtcreator-qt4-qtversions-add.png
- \li In the \gui{Version name} field, edit the name that \QC
- suggests for the Qt version.
-
- \li In the \gui{qmake location} field, enter the path to the
- directory where the qmake executable is located.
+ \li Select the directory where the qmake executable is located.
\QC automatically determines the path to the binaries in
- the Qt installation and displays it in the dialog.
+ the Qt installation and displays it in the \gui{qmake location}
+ field.
+
+ \li In the \gui{Version name} field, edit the name that \QC
+ suggests for the Qt version.
\li In the \gui Helpers section, you can build the debugging
helpers that are available for the Qt version. This is
@@ -72,9 +72,7 @@
\endlist
- \if defined(qcmanual)
\include qnx/creator-projects-qt-version-qnx.qdocinc
- \endif
*/
diff --git a/doc/src/projects/creator-projects-running.qdoc b/doc/src/projects/creator-projects-running.qdoc
index 88efbc4bd28..7f1c20b7db3 100644
--- a/doc/src/projects/creator-projects-running.qdoc
+++ b/doc/src/projects/creator-projects-running.qdoc
@@ -41,16 +41,9 @@
For more information on the options you have, see
\l{Specifying Run Settings}.
- \if defined(qcmanual)
\include projects/creator-projects-running-desktop.qdocinc
- \endif
-
\include projects/creator-projects-running-simulator.qdocinc
-
- \if defined(qcmanual)
\include linux-mobile/creator-projects-running-generic-linux.qdocinc
\include linux-mobile/creator-projects-running-madde.qdocinc
\include qnx/creator-projects-running-qnx.qdocinc
- \endif
-
*/
diff --git a/doc/src/projects/creator-projects-settings-code-style.qdoc b/doc/src/projects/creator-projects-settings-code-style.qdoc
index 604554f219b..53351d42143 100644
--- a/doc/src/projects/creator-projects-settings-code-style.qdoc
+++ b/doc/src/projects/creator-projects-settings-code-style.qdoc
@@ -51,7 +51,7 @@
\list 1
- \li Select \gui {Projects > Code Style Settings}.
+ \li Select \gui Projects > \gui {Code Style}.
\li In the \gui Language field, select \gui C++ or \gui {Qt Quick}.
diff --git a/doc/src/projects/creator-projects-settings-editor.qdoc b/doc/src/projects/creator-projects-settings-editor.qdoc
index 513dcb29451..8d3c007d95c 100644
--- a/doc/src/projects/creator-projects-settings-editor.qdoc
+++ b/doc/src/projects/creator-projects-settings-editor.qdoc
@@ -43,7 +43,7 @@
\list 1
- \li Select \gui {Projects > Editor Settings}.
+ \li Select \gui Projects > \gui Editor.
\li In the \gui {Editor Settings} field, select \gui {Custom}.
@@ -51,7 +51,7 @@
\endlist
- \image qtcreator-editor-settings.png "Editor Settings view"
+ \image qtcreator-editor-settings.png "Editor view"
Click \gui {Restore Global} to revert to the global settings.
diff --git a/doc/src/projects/creator-projects-settings-run.qdoc b/doc/src/projects/creator-projects-settings-run.qdoc
index ccf554a9eea..06c907851f9 100644
--- a/doc/src/projects/creator-projects-settings-run.qdoc
+++ b/doc/src/projects/creator-projects-settings-run.qdoc
@@ -45,13 +45,11 @@
parsed .pro files. For more information on how the commands are constructed,
see \l{Starting External Processes}.
- \if defined(qcmanual)
\include projects/creator-projects-settings-run-desktop.qdocinc
\include projects/creator-projects-settings-run-analyze.qdocinc
\include projects/creator-projects-settings-run-debug.qdocinc
\include linux-mobile/creator-projects-settings-run-linux.qdocinc
\include qnx/creator-projects-settings-run-qnx.qdocinc
- \endif
\section1 Selecting the Run Environment
diff --git a/doc/src/qtquick/qtquick-app-development.qdoc b/doc/src/qtquick/qtquick-app-development.qdoc
index e3b40cd3be5..61caacd9a81 100644
--- a/doc/src/qtquick/qtquick-app-development.qdoc
+++ b/doc/src/qtquick/qtquick-app-development.qdoc
@@ -64,11 +64,9 @@
\section1 Related Topics
\list
- \if defined(qcmanual)
\li \l {Using Qt Quick Designer}
\li \l {Creating Buttons}
\li \l {Creating Scalable Buttons and Borders}
- \endif
\li \l {Exporting Designs from Graphics Software}
\li \l {Using QML Modules with Plugins}
diff --git a/doc/src/qtquick/qtquick-components.qdoc b/doc/src/qtquick/qtquick-components.qdoc
index 05fb8f0fe53..5d453f0f700 100644
--- a/doc/src/qtquick/qtquick-components.qdoc
+++ b/doc/src/qtquick/qtquick-components.qdoc
@@ -109,7 +109,6 @@
\endlist
- \if defined(qcmanual)
The following sections contain examples of how to create some common
components:
@@ -130,5 +129,4 @@
top level when you are done editing the component.
\image qmldesigner-breadcrumbs.png "Go into Component command"
- \endif
*/
diff --git a/doc/src/qtquick/qtquick-screens.qdoc b/doc/src/qtquick/qtquick-screens.qdoc
index 180f2d8e9d5..e9b62f89d5f 100644
--- a/doc/src/qtquick/qtquick-screens.qdoc
+++ b/doc/src/qtquick/qtquick-screens.qdoc
@@ -35,10 +35,8 @@
screens. Typically, the main qml file in a Qt Quick project specifies the
main window of an application.
- \if defined(qcmanual)
The QML files in the project folder are displayed in \gui {QML Components}
in the \gui Library pane.
- \endif
You can also use ready-made Qt Quick 1 Components (for Qt 4) to create
screens with a native look and feel for a particular target platform.
@@ -47,7 +45,6 @@
can install Qt Quick 1 Components as part of the Qt 4 SDK and the Qt Quick
Controls as part of Qt 5.1, or later.
- \if defined(qcmanual)
\section1 Adding Components to Screens
\list 1
@@ -60,7 +57,6 @@
For example, you can anchor components to a position on the screen.
\endlist
- \endif
\section1 Using Data Models
@@ -85,9 +81,7 @@
\l{http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-listmodel.html}{ListModel} and the
delegate component that creates an instance for each item in the model are
added automatically. You can edit item properties
- \if defined(qcmanual)
in the \gui Properties pane or
- \endif
in the code editor. You can also replace the default model and
delegate with other, more complex models and delegates in the code editor.
@@ -112,12 +106,9 @@
\endlist
- \if defined(qcmanual)
To lay out several items in a Column, Row, Grid, or Flow, select
the items on the canvas, and then select \gui Layout in the context
menu.
- \endif
-
\section1 Using States
@@ -127,7 +118,6 @@
controls, their properties and behavior and the available actions. For
example, you can use states to create two screens.
- \if defined(qcmanual)
To add states, click the empty slot in the \gui States pane. Then modify the
new state in the visual editor.
@@ -136,8 +126,6 @@
The properties that you change in a state are highlighted with blue color.
In the code editor, you can see the changes recorded as changes to the base
state.
- \endif
-
To keep the QML code clean, you should create a base state that contains all
the types you will need in the application. You can then create states,
@@ -160,7 +148,6 @@
\endlist
- \if defined(qcmanual)
To create screens for an application by using states:
\list 1
@@ -195,7 +182,6 @@
\endqml
\endlist
- \endif
*/
diff --git a/lib/qtcreator/qtcomponents/qtcomponents.qbs b/lib/qtcreator/qtcomponents/qtcomponents.qbs
index 83b621199f2..fc0ebf79d5c 100644
--- a/lib/qtcreator/qtcomponents/qtcomponents.qbs
+++ b/lib/qtcreator/qtcomponents/qtcomponents.qbs
@@ -6,7 +6,7 @@ Product {
Group {
name: "Resources"
qbs.install: true
- qbs.installDir: (qbs.targetOS == "windows" ? "lib/qtcreator" : project.ide_library_path)
+ qbs.installDir: (qbs.targetOS.contains("windows") ? "lib/qtcreator" : project.ide_library_path)
+ "/qtcomponents"
files: [
"*.qml",
diff --git a/qtcreator.pro b/qtcreator.pro
index 0836cf0685e..94c15ce4d2b 100644
--- a/qtcreator.pro
+++ b/qtcreator.pro
@@ -17,8 +17,16 @@ unix:!macx:!isEmpty(copydata):SUBDIRS += bin
OTHER_FILES += dist/copyright_template.txt \
$$files(dist/changes-*) \
- qtcreator.qbp \
- qbs/pluginspec/pluginspec.qbs
+ qtcreator.qbs \
+ qbs/pluginspec/pluginspec.qbs \
+ $$files(dist/installer/ifw/config/config-*) \
+ dist/installer/ifw/packages/org.qtproject.qtcreator/meta/package.xml.in \
+ dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs \
+ dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/package.xml.in \
+ dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/license.txt \
+ $$files(scripts/*.py) \
+ $$files(scripts/*.sh) \
+ $$files(scripts/*.pl)
qmake_cache = $$targetPath($$IDE_BUILD_TREE/.qmake.cache)
!equals(QMAKE_HOST.os, Windows) {
@@ -50,6 +58,9 @@ else: PLATFORM = "unknown"
PATTERN = $${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)
+macx:INSTALLER_NAME = "qt-creator-$${QTCREATOR_VERSION}"
+else:INSTALLER_NAME = "qt-creator-$${PATTERN}"
+
macx {
APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app"
BINDIST_SOURCE = "$$OUT_PWD/bin/Qt Creator.app"
@@ -83,7 +94,18 @@ bindist.commands = 7z a -mx9 $$OUT_PWD/qt-creator-$${PATTERN}.7z \"$$BINDIST_SOU
bindist_installer.depends = deployqt
bindist_installer.commands = 7z a -mx9 $${INSTALLER_ARCHIVE} \"$$BINDIST_INSTALLER_SOURCE\"
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}\" "$$INSTALLER_NAME"
+
+macx {
+ # this should be very temporary:
+ MENU_NIB = $$(MENU_NIB_FILE)
+ isEmpty(MENU_NIB): MENU_NIB = "FATAT_SET_MENU_NIB_FILE_ENV"
+ copy_menu_nib_installer.commands = cp -R \"$$MENU_NIB\" \"$${INSTALLER_NAME}.app/Contents/Resources\"
+
+ codesign_installer.commands = codesign -s \"$(SIGNING_IDENTITY)\" $(SIGNING_FLAGS) \"$${INSTALLER_NAME}.app\"
+ dmg_installer.commands = hdiutil create -srcfolder "$${INSTALLER_NAME}.app" -volname \"Qt Creator\" -format UDBZ "qt-creator-$${PATTERN}-installer.dmg" -ov -scrub -stretch 2g
+ QMAKE_EXTRA_TARGETS += codesign_installer dmg_installer copy_menu_nib_installer
+}
win32 {
deployqt.commands ~= s,/,\\\\,g
diff --git a/qtcreator.qbs b/qtcreator.qbs
index 16c1558ffc9..68d390b7787 100644
--- a/qtcreator.qbs
+++ b/qtcreator.qbs
@@ -8,32 +8,36 @@ Project {
property string ide_version_minor: '8'
property string ide_version_release: '81'
property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release
- property string ide_app_path: qbs.targetOS == "mac" ? "" : "bin"
- property string ide_app_target: qbs.targetOS == "mac" ? "Qt Creator" : "qtcreator"
+ property string ide_app_path: qbs.targetOS.contains("mac") ? "" : "bin"
+ property string ide_app_target: qbs.targetOS.contains("mac") ? "Qt Creator" : "qtcreator"
property string ide_library_path: {
- if (qbs.targetOS == "mac")
+ if (qbs.targetOS.contains("mac"))
return ide_app_target + ".app/Contents/PlugIns"
- else if (qbs.targetOS == "windows")
+ else if (qbs.targetOS.contains("windows"))
return ide_app_path
else
return "lib/qtcreator"
}
property string ide_plugin_path: {
- if (qbs.targetOS == "mac")
+ if (qbs.targetOS.contains("mac"))
return ide_library_path
- else if (qbs.targetOS == "windows")
+ else if (qbs.targetOS.contains("windows"))
return "lib/qtcreator/plugins"
else
return ide_library_path + "/plugins"
}
- property string ide_data_path: qbs.targetOS == "mac" ? ide_app_target + ".app/Contents/Resources"
- : "share/qtcreator"
- property string ide_libexec_path: qbs.targetOS == "mac" ? ide_data_path
- : ide_app_path
- property string ide_doc_path: qbs.targetOS == "mac" ? ide_data_path + "/doc"
- : "share/doc/qtcreator"
- property string ide_bin_path: qbs.targetOS == "mac" ? ide_app_target + ".app/Contents/MacOS"
- : ide_app_path
+ property string ide_data_path: qbs.targetOS.contains("mac")
+ ? ide_app_target + ".app/Contents/Resources"
+ : "share/qtcreator"
+ property string ide_libexec_path: qbs.targetOS.contains("mac")
+ ? ide_data_path
+ : ide_app_path
+ property string ide_doc_path: qbs.targetOS.contains("mac")
+ ? ide_data_path + "/doc"
+ : "share/doc/qtcreator"
+ property string ide_bin_path: qbs.targetOS.contains("mac")
+ ? ide_app_target + ".app/Contents/MacOS"
+ : ide_app_path
moduleSearchPaths: "qbs"
references: [
@@ -170,7 +174,7 @@ Project {
name: project.ide_app_target
consoleApplication: qbs.debugInformation
- cpp.rpaths: qbs.targetOS == "mac" ? ["@executable_path/.."]
+ cpp.rpaths: qbs.targetOS.contains("mac") ? ["@executable_path/.."]
: ["$ORIGIN/../lib/qtcreator"]
cpp.defines: Defaults.defines(qbs)
cpp.linkerFlags: {
@@ -205,7 +209,7 @@ Project {
Group {
name: "qtcreator.sh"
- condition: qbs.targetPlatform.indexOf("unix") != -1 && qbs.targetOS != "mac"
+ condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("mac")
files: "bin/qtcreator.sh"
qbs.install: true
qbs.installDir: "bin"
@@ -213,7 +217,7 @@ Project {
Group {
name: "QtLockedFile_unix"
- condition: qbs.targetPlatform.indexOf("unix") != -1
+ condition: qbs.targetOS.contains("unix")
files: [
"src/shared/qtlockedfile/qtlockedfile_unix.cpp"
]
@@ -221,7 +225,7 @@ Project {
Group {
name: "QtLockedFile_win"
- condition: qbs.targetOS == "windows"
+ condition: qbs.targetOS.contains("windows")
files: [
"src/shared/qtlockedfile/qtlockedfile_win.cpp"
]
diff --git a/scripts/createSourcePackages.sh b/scripts/createSourcePackages.sh
new file mode 100755
index 00000000000..6bec3202c6e
--- /dev/null
+++ b/scripts/createSourcePackages.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+## Command line parameters
+if [[ $# != 1 ]]; then
+ cat <
+
+ Creates tar and zip source package from HEAD of the main repository and submodules.
+ Files and directories are named after .
+ example:
+ $0 2.2.0-beta
+USAGE
+ exit 1
+fi
+
+VERSION=$1
+PREFIX=qt-creator-${VERSION}-src
+cd `dirname $0`/..
+RESULTDIR=`pwd`
+TEMPSOURCES=`mktemp -d -t qtcCreatorSourcePackage.XXXXXX`
+echo "Temporary directory: ${TEMPSOURCES}"
+echo "Creating tar archive..."
+
+echo " Creating tar sources of repositories..."
+git archive --format=tar --prefix=${PREFIX}/ HEAD > ${TEMPSOURCES}/__qtcreator_main.tar || exit 1
+cd src/shared/qbs || exit 1
+git archive --format=tar --prefix=${PREFIX}/src/shared/qbs/ HEAD > ${TEMPSOURCES}/__qtcreator_qbs.tar || exit 1
+
+echo " Combining tar sources..."
+cd ${TEMPSOURCES} || exit 1
+tar xf __qtcreator_main.tar || exit 1
+tar xf __qtcreator_qbs.tar || exit 1
+tar czf "${RESULTDIR}/${PREFIX}.tar.gz" ${PREFIX}/ || exit 1
+
+echo "Creating zip archive..."
+echo " Filtering binary vs text files..."
+# write filter for text files (for use with 'file' command)
+echo ".*:.*ASCII
+.*:.*directory
+.*:.*empty
+.*:.*POSIX
+.*:.*html
+.*:.*text" > __txtpattern || exit 1
+# list all files
+find ${PREFIX} > __packagedfiles || exit 1
+# record file types
+file -f __packagedfiles > __filetypes || exit 1
+echo " Creating archive..."
+# zip text files and binary files separately
+cat __filetypes | grep -f __txtpattern -v | cut -d: -f1 | zip -9q "${RESULTDIR}/${PREFIX}.zip" -@ || exit 1
+cat __filetypes | grep -f __txtpattern | cut -d: -f1 | zip -l9q "${RESULTDIR}/${PREFIX}.zip" -@ || exit 1
diff --git a/scripts/createSrcAndDocPackage.sh b/scripts/createSrcAndDocPackage.sh
deleted file mode 100755
index 29ee946effe..00000000000
--- a/scripts/createSrcAndDocPackage.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-## Command line parameters
-if [[ $# != 2 ]]; then
- cat <
-
- Creates tar and zip source package from .
- Files and directories are named after .
- example:
- $0 origin/2.2 2.2.0
-USAGE
- exit 1
-fi
-
-BRANCH=$1
-VERSION=$2
-cd `dirname $0`/..
-RESULTDIR=`pwd`
-echo "Creating tar archive..."
-git archive --format=tar --prefix=qt-creator-${VERSION}-src/ ${BRANCH} | gzip > qt-creator-${VERSION}-src.tar.gz || exit 1
-
-echo "Creating zip archive..."
-# untargz the sources for the revision into temporary dir
-TEMPSOURCES=`mktemp -d -t qtcCreatorSourcePackage.XXXXXX`
-tar xzf qt-creator-${VERSION}-src.tar.gz -C "$TEMPSOURCES" || exit 1
-cd $TEMPSOURCES || exit 1
-# write filter for text files (for use with 'file' command)
-echo ".*:.*ASCII
-.*:.*directory
-.*:.*empty
-.*:.*POSIX
-.*:.*html
-.*:.*text" > __txtpattern || exit 1
-# list all files
-find qt-creator-${VERSION}-src > __packagedfiles || exit 1
-# record file types
-file -f __packagedfiles > __filetypes || exit 1
-# zip text files and binary files separately
-cat __filetypes | grep -f __txtpattern -v | cut -d: -f1 | zip -9q "$RESULTDIR"/qt-creator-${VERSION}-src.zip -@ || exit 1
-cat __filetypes | grep -f __txtpattern | cut -d: -f1 | zip -l9q "$RESULTDIR"/qt-creator-${VERSION}-src.zip -@ || exit 1
diff --git a/scripts/makedmg.sh b/scripts/makedmg.sh
index ba21125c727..5c4f69f3a6f 100755
--- a/scripts/makedmg.sh
+++ b/scripts/makedmg.sh
@@ -12,7 +12,7 @@ cp -a "${sourceFolder}/" "${intermediateFolder}"
ln -s /Applications "${intermediateFolder}"
cp "$(dirname "${BASH_SOURCE[0]}")/../LICENSE.LGPL" "${intermediateFolder}/LICENSE_LGPL.txt"
echo Creating image...
-hdiutil create -srcfolder "${intermediateFolder}" -volname "${title}" -format UDBZ "${finalDMGName}" -ov -scrub -stretch 1g
+hdiutil create -srcfolder "${intermediateFolder}" -volname "${title}" -format UDBZ "${finalDMGName}" -ov -scrub -stretch 2g
# clean up
rm -rf "${intermediateFolder}"
diff --git a/scripts/packageIfw.py b/scripts/packageIfw.py
index db280cd12fa..aa69e0c3fad 100755
--- a/scripts/packageIfw.py
+++ b/scripts/packageIfw.py
@@ -88,7 +88,7 @@ def main():
installer_name = args[0]
config_postfix = ''
if sys.platform == 'darwin':
- installer_name = installer_name + '.dmg'
+ config_postfix = '-mac'
if sys.platform.startswith('win'):
config_postfix = '-windows'
if sys.platform.startswith('linux'):
diff --git a/share/qtcreator/dumper/gbridge.py b/share/qtcreator/dumper/gbridge.py
index 210fff5eec2..82c5aa96b14 100644
--- a/share/qtcreator/dumper/gbridge.py
+++ b/share/qtcreator/dumper/gbridge.py
@@ -32,6 +32,9 @@ def directBaseClass(typeobj, index = 0):
def createPointerValue(context, address, pointeeType):
return gdb.Value(address).cast(pointeeType.pointer())
+def createReferenceValue(context, address, referencedType):
+ return gdb.Value(address).cast(referencedType.pointer()).dereference()
+
def savePrint(output):
try:
print(output)
@@ -1006,23 +1009,6 @@ def check(exp):
if not exp:
raise RuntimeError("Check failed")
-def checkSimpleRef(ref):
- count = ref["_q_value"]
- check(count > 0)
- check(count < 1000000)
-
-def checkRef(ref):
- try:
- count = ref["atomic"]["_q_value"] # Qt 5.
- minimum = -1
- except:
- count = ref["_q_value"] # Qt 4.
- minimum = 0
- # Assume there aren't a million references to any object.
- check(count >= minimum)
- check(count < 1000000)
-
-
#def couldBePointer(p, align):
# type = lookupType("unsigned int")
# ptr = gdb.Value(p).cast(type)
@@ -1042,12 +1028,8 @@ def checkPointer(p, align = 1):
if not isNull(p):
p.dereference()
-def isAccessible(p):
- try:
- long(p)
- return True
- except:
- return False
+def pointerValue(p):
+ return long(p)
def isNull(p):
# The following can cause evaluation to abort with "UnicodeEncodeError"
@@ -2153,29 +2135,6 @@ class Dumper:
with Children(self):
self.putFields(value)
- def tryPutObjectNameValue(self, value):
- try:
- # Is this derived from QObject?
- dd = value["d_ptr"]["d"]
- privateTypeName = self.ns + "QObjectPrivate"
- privateType = lookupType(privateTypeName)
- staticMetaObject = value["staticMetaObject"]
- d_ptr = dd.cast(privateType.pointer()).dereference()
- objectName = None
- try:
- objectName = d_ptr["objectName"]
- except: # Qt 5
- p = d_ptr["extraData"]
- if not isNull(p):
- objectName = p.dereference()["objectName"]
- if not objectName is None:
- data, size, alloc = qStringData(self, objectName)
- if size > 0:
- str = readRawMemory(data, 2 * size)
- self.putValue(str, Hex4EncodedLittleEndian, 1)
- except:
- pass
-
def readRawMemory(self, base, size):
return readRawMemory(base, size)
diff --git a/share/qtcreator/dumper/lbridge.py b/share/qtcreator/dumper/lbridge.py
index 5cbbba6087d..8009b75a676 100644
--- a/share/qtcreator/dumper/lbridge.py
+++ b/share/qtcreator/dumper/lbridge.py
@@ -102,6 +102,7 @@ def call(value, func, *args):
#######################################################################
qqStringCutOff = 10000
+qqWatchpointOffset = 10000
# This is a cache mapping from 'type name' to 'display alternatives'.
qqFormats = {}
@@ -220,11 +221,11 @@ BreakpointAtCatch = 5
BreakpointAtMain = 6
BreakpointAtFork = 7
BreakpointAtExec = 8
-BreakpointAtSysCall = 10
-WatchpointAtAddress = 11
-WatchpointAtExpression = 12
-BreakpointOnQmlSignalEmit = 13
-BreakpointAtJavaScriptThrow = 14
+BreakpointAtSysCall = 9
+WatchpointAtAddress = 10
+WatchpointAtExpression = 11
+BreakpointOnQmlSignalEmit = 12
+BreakpointAtJavaScriptThrow = 13
# See db.StateType
stateNames = ["invalid", "unloaded", "connected", "attaching", "launching", "stopped",
@@ -248,26 +249,17 @@ def isNull(p):
Value = lldb.SBValue
-def checkSimpleRef(ref):
- count = int(ref["_q_value"])
- check(count > 0)
- check(count < 1000000)
-
-def checkRef(ref):
- try:
- count = int(ref["atomic"]["_q_value"]) # Qt 5.
- minimum = -1
- except:
- count = int(ref["_q_value"]) # Qt 4.
- minimum = 0
- # Assume there aren't a million references to any object.
- check(count >= minimum)
- check(count < 1000000)
+def pointerValue(value):
+ return value.GetValueAsUnsigned()
def createPointerValue(context, address, pointeeType):
addr = int(address) & 0xFFFFFFFFFFFFFFFF
return context.CreateValueFromAddress(None, addr, pointeeType).AddressOf()
+def createReferenceValue(context, address, referencedType):
+ addr = int(address) & 0xFFFFFFFFFFFFFFFF
+ return context.CreateValueFromAddress(None, addr, referencedType)
+
def impl_SBValue__add__(self, offset):
if self.GetType().IsPointerType():
if isinstance(offset, int) or isinstance(offset, long):
@@ -340,7 +332,10 @@ lldb.SBType.unqualified = lambda self: self.GetUnqualifiedType()
lldb.SBType.pointer = lambda self: self.GetPointerType()
lldb.SBType.code = lambda self: self.GetTypeClass()
lldb.SBType.sizeof = property(lambda self: self.GetByteSize())
-lldb.SBType.strip_typedefs = lambda self: self.GetCanonicalType()
+
+
+lldb.SBType.strip_typedefs = \
+ lambda self: self.GetCanonicalType() if hasattr(self, 'GetCanonicalType') else self
lldb.SBType.__orig__str__ = lldb.SBType.__str__
lldb.SBType.__str__ = lldb.SBType.GetName
@@ -466,6 +461,9 @@ class SubItem:
value = component
value.SetPreferSyntheticValue(False)
self.name = value.GetName()
+ if self.name is None:
+ d.anonNumber += 1
+ self.name = "#%d" % d.anonNumber
else:
self.name = component
self.iname = "%s.%s" % (d.currentIName, self.name)
@@ -518,6 +516,12 @@ class SubItem:
self.d.currentAddress = self.savedCurrentAddress
return True
+class UnnamedSubItem(SubItem):
+ def __init__(self, d, component):
+ self.d = d
+ self.iname = "%s.%s" % (self.d.currentIName, component)
+ self.name = None
+
class Dumper:
def __init__(self):
self.debugger = lldb.SBDebugger.Create()
@@ -851,6 +855,16 @@ class Dumper:
result += '],current-thread-id="%s"},' % self.currentThread().id
self.report(result)
+ def firstUsableFrame(self):
+ thread = self.currentThread()
+ for i in xrange(4):
+ frame = thread.GetFrameAtIndex(i)
+ lineEntry = frame.GetLineEntry()
+ line = lineEntry.GetLine()
+ if line != 0:
+ return i
+ return None
+
def reportStack(self, _ = None):
if self.process is None:
self.report('msg="No process"')
@@ -862,14 +876,11 @@ class Dumper:
n = thread.GetNumFrames()
if n > 4:
n = 4
- firstUsable = None
for i in xrange(n):
frame = thread.GetFrameAtIndex(i)
lineEntry = frame.GetLineEntry()
line = lineEntry.GetLine()
usable = line != 0
- if usable and not firstUsable:
- firstUsable = i
result += '{pc="0x%x"' % frame.GetPC()
result += ',level="%d"' % frame.idx
result += ',addr="0x%x"' % frame.GetPCAddress().GetLoadAddress(self.target)
@@ -878,9 +889,7 @@ class Dumper:
result += ',fullname="%s"' % fileName(lineEntry.file)
result += ',usable="%d"' % usable
result += ',file="%s"},' % fileName(lineEntry.file)
- if not firstUsable:
- firstUsable = 0
- result += '],hasmore="0",first-usable="%s"},' % firstUsable
+ result += '],hasmore="0"},'
self.report(result)
def putType(self, type, priority = 0):
@@ -915,8 +924,7 @@ class Dumper:
if limit is None:
return size
if limit == 0:
- #return min(size, qqStringCutOff)
- return min(size, 100)
+ return min(size, qqStringCutOff)
return min(size, limit)
def putValue(self, value, encoding = None, priority = 0):
@@ -956,6 +964,7 @@ class Dumper:
def putItem(self, value, tryDynamic=True):
#value = value.GetDynamicValue(lldb.eDynamicCanRunTarget)
typeName = value.GetTypeName()
+ value.SetPreferDynamicValue(tryDynamic)
if tryDynamic:
self.putAddress(value.address)
@@ -995,13 +1004,9 @@ class Dumper:
# References
if value.GetType().IsReferenceType():
- type = value.GetType().GetDereferencedType().GetPointerType()
- # FIXME: Find something more direct.
origType = value.GetTypeName();
- value = value.CreateValueFromAddress(value.GetName(),
- value.AddressOf().GetValueAsUnsigned(), type).Dereference()
- #value = value.cast(value.dynamic_type)
- self.putItem(value)
+ type = value.GetType().GetDereferencedType()
+ self.putItem(createReferenceValue(value, value.GetAddress(), type))
self.putBetterType(origType)
return
@@ -1014,15 +1019,16 @@ class Dumper:
self.putNumChild(0)
return
- origType = value.GetType()
innerType = value.GetType().GetPointeeType()
self.putType(innerType)
savedCurrentChildType = self.currentChildType
self.currentChildType = str(innerType)
- self.putItem(value.dereference())
- self.currentChildType = savedCurrentChildType
- self.put('origaddr="%s",' % value.address)
- return
+ inner = value.Dereference()
+ if inner.IsValid():
+ self.putItem(inner)
+ self.currentChildType = savedCurrentChildType
+ self.put('origaddr="%s",' % value.address)
+ return
#warn("VALUE: %s" % value)
#warn("FANCY: %s" % self.useFancy)
@@ -1050,9 +1056,19 @@ class Dumper:
def putFields(self, value):
n = value.GetNumChildren()
+ m = value.GetType().GetNumberOfDirectBaseClasses()
if n > 10000:
n = 10000
- for i in xrange(n):
+ # seems to happen in the 'inheritance' autotest
+ if m > n:
+ m = n
+ for i in xrange(m):
+ child = value.GetChildAtIndex(i)
+ with UnnamedSubItem(self, "@%d" % (i + 1)):
+ #self.put('iname="%s",' % self.currentIName)
+ self.put('name="[%s]",' % child.name)
+ self.putItem(child)
+ for i in xrange(m, n):
child = value.GetChildAtIndex(i)
with SubItem(self, child):
self.putItem(child)
@@ -1061,6 +1077,7 @@ class Dumper:
frame = self.currentThread().GetSelectedFrame()
self.currentIName = 'local'
self.put('data=[')
+ self.anonNumber = -1
for value in frame.GetVariables(True, True, False, False):
if self.dummyValue is None:
self.dummyValue = value
@@ -1171,7 +1188,15 @@ class Dumper:
self.report('exited={status="%s",desc="%s"}'
% (self.process.GetExitStatus(), self.process.GetExitDescription()))
if type == lldb.SBProcess.eBroadcastBitStateChanged:
- self.reportData()
+ state = self.process.GetState()
+ if state == lldb.eStateStopped:
+ usableFrame = self.firstUsableFrame()
+ if usableFrame:
+ self.currentThread().SetSelectedFrame(usableFrame)
+ self.reportStack()
+ self.reportThreads()
+ self.reportLocation()
+ self.reportVariables()
elif type == lldb.SBProcess.eBroadcastBitInterrupt:
pass
elif type == lldb.SBProcess.eBroadcastBitSTDOUT:
@@ -1193,30 +1218,37 @@ class Dumper:
self.handleEvent(event)
def describeBreakpoint(self, bp, modelId):
- cond = bp.GetCondition()
- result = 'lldbid="%s"' % bp.GetID()
+ isWatch = isinstance(bp, lldb.SBWatchpoint)
+ if isWatch:
+ result = 'lldbid="%s"' % (qqWatchpointOffset + bp.GetID())
+ else:
+ result = 'lldbid="%s"' % bp.GetID()
result += ',modelid="%s"' % modelId
+ if not bp.IsValid():
+ return
result += ',hitcount="%s"' % bp.GetHitCount()
- result += ',threadid="%s"' % bp.GetThreadID()
- try:
+ if hasattr(bp, 'GetThreadID'):
+ result += ',threadid="%s"' % bp.GetThreadID()
+ if hasattr(bp, 'IsOneShot'):
result += ',oneshot="%s"' % (1 if bp.IsOneShot() else 0)
- except:
- pass
+ if hasattr(bp, 'GetCondition'):
+ cond = bp.GetCondition()
+ result += ',condition="%s"' % binascii.hexlify("" if cond is None else cond)
result += ',enabled="%s"' % (1 if bp.IsEnabled() else 0)
result += ',valid="%s"' % (1 if bp.IsValid() else 0)
- result += ',condition="%s"' % ("" if cond is None else cond)
result += ',ignorecount="%s"' % bp.GetIgnoreCount()
result += ',locations=['
- for i in xrange(bp.GetNumLocations()):
- loc = bp.GetLocationAtIndex(i)
- addr = loc.GetAddress()
- result += '{locid="%s"' % loc.GetID()
- result += ',func="%s"' % addr.GetFunction().GetName()
- result += ',enabled="%s"' % (1 if loc.IsEnabled() else 0)
- result += ',resolved="%s"' % (1 if loc.IsResolved() else 0)
- result += ',valid="%s"' % (1 if loc.IsValid() else 0)
- result += ',ignorecount="%s"' % loc.GetIgnoreCount()
- result += ',addr="%s"},' % loc.GetLoadAddress()
+ if hasattr(bp, 'GetNumLocations'):
+ for i in xrange(bp.GetNumLocations()):
+ loc = bp.GetLocationAtIndex(i)
+ addr = loc.GetAddress()
+ result += '{locid="%s"' % loc.GetID()
+ result += ',func="%s"' % addr.GetFunction().GetName()
+ result += ',enabled="%s"' % (1 if loc.IsEnabled() else 0)
+ result += ',resolved="%s"' % (1 if loc.IsResolved() else 0)
+ result += ',valid="%s"' % (1 if loc.IsValid() else 0)
+ result += ',ignorecount="%s"' % loc.GetIgnoreCount()
+ result += ',addr="%s"},' % loc.GetLoadAddress()
result += '],'
return result
@@ -1227,6 +1259,8 @@ class Dumper:
str(args["file"]), int(args["line"]))
elif bpType == BreakpointByFunction:
bpNew = self.target.BreakpointCreateByName(args["function"])
+ elif bpType == BreakpointByAddress:
+ bpNew = self.target.BreakpointCreateByAddress(args["address"])
elif bpType == BreakpointAtMain:
bpNew = self.target.BreakpointCreateByName(
"main", self.target.GetExecutable().GetFilename())
@@ -1236,29 +1270,49 @@ class Dumper:
elif bpType == BreakpointAtCatch:
bpNew = self.target.BreakpointCreateForException(
lldb.eLanguageTypeC_plus_plus, True, False)
+ elif bpType == WatchpointAtAddress:
+ error = lldb.SBError()
+ bpNew = self.target.WatchAddress(args["address"], 4, False, True, error)
+ #warn("BPNEW: %s" % bpNew)
+ self.reportError(error)
+ elif bpType == WatchpointAtExpression:
+ # FIXME: Top level-only for now.
+ try:
+ frame = self.currentFrame()
+ value = frame.FindVariable(args["expression"])
+ error = lldb.SBError()
+ bpNew = self.target.WatchAddress(value.GetAddress(),
+ value.GetByteSize(), False, True, error)
+ except:
+ return
else:
- warn("UNKNOWN TYPE")
+ warn("UNKNOWN BREAKPOINT TYPE: %s" % bpType)
+ return
bpNew.SetIgnoreCount(int(args["ignorecount"]))
- bpNew.SetCondition(str(args["condition"]))
+ if hasattr(bpNew, 'SetCondition'):
+ bpNew.SetCondition(binascii.unhexlify(args["condition"]))
bpNew.SetEnabled(int(args["enabled"]))
- try:
+ if hasattr(bpNew, 'SetOneShot'):
bpNew.SetOneShot(int(args["oneshot"]))
- except:
- pass
return bpNew
def changeBreakpoint(self, args):
- bpChange = self.target.FindBreakpointByID(int(args["lldbid"]))
- bpChange.SetIgnoreCount(int(args["ignorecount"]))
- bpChange.SetCondition(str(args["condition"]))
- bpChange.SetEnabled(int(args["enabled"]))
- try:
- bpChange.SetOneShot(int(args["oneshot"]))
- except:
- pass
+ id = int(args["lldbid"])
+ if id > qqWatchpointOffset:
+ bp = self.target.FindWatchpointByID(id)
+ else:
+ bp = self.target.FindBreakpointByID(id)
+ bp.SetIgnoreCount(int(args["ignorecount"]))
+ bp.SetCondition(binascii.unhexlify(args["condition"]))
+ bp.SetEnabled(int(args["enabled"]))
+ if hasattr(bp, 'SetOneShot'):
+ bp.SetOneShot(int(args["oneshot"]))
def removeBreakpoint(self, args):
- return self.target.BreakpointDelete(int(args["lldbid"]))
+ id = int(args['lldbid'])
+ if id > qqWatchpointOffset:
+ return self.target.DeleteWatchpoint(id - qqWatchpointOffset)
+ return self.target.BreakpointDelete(id)
def handleBreakpoints(self, args):
result = 'bkpts=['
@@ -1391,7 +1445,6 @@ class Dumper:
self.reportData()
def updateData(self, args):
- warn("UPDATE 1")
if 'expanded' in args:
self.expandedINames = set(args['expanded'].split(','))
if 'autoderef' in args:
@@ -1404,7 +1457,6 @@ class Dumper:
self.passExceptions = int(args['passexceptions'])
self.passExceptions = True # FIXME
self.reportVariables(args)
- warn("UPDATE 2")
def disassemble(self, args):
frame = self.currentFrame();
diff --git a/share/qtcreator/dumper/qttypes.py b/share/qtcreator/dumper/qttypes.py
index 6661ec9705a..8cea2413254 100644
--- a/share/qtcreator/dumper/qttypes.py
+++ b/share/qtcreator/dumper/qttypes.py
@@ -18,23 +18,40 @@ movableTypes = set([
"QXmlStreamNotationDeclaration", "QXmlStreamEntityDeclaration"
])
-def qByteArrayData(d, value):
- private = value['d'].dereference()
- checkRef(private['ref'])
- size = int(private['size'])
- alloc = int(private['alloc'])
+def checkSimpleRef(ref):
+ count = int(ref["_q_value"])
+ check(count > 0)
+ check(count < 1000000)
+
+def checkRef(ref):
+ try:
+ count = int(ref["atomic"]["_q_value"]) # Qt 5.
+ minimum = -1
+ except:
+ count = int(ref["_q_value"]) # Qt 4.
+ minimum = 0
+ # Assume there aren't a million references to any object.
+ check(count >= minimum)
+ check(count < 1000000)
+
+
+def qByteArrayDataData(d, value):
+ checkRef(value['ref'])
+ size = int(value['size'])
+ alloc = int(value['alloc'])
try:
# Qt 5. Will fail on Qt 4 due to the missing 'offset' member.
- addr = d.addressOf(private) + int(private['offset'])
+ addr = d.addressOf(value) + int(value['offset'])
except:
# Qt 4:
- addr = private['data']
+ addr = value['data']
return createPointerValue(value, addr, d.charType()), size, alloc
-qStringData = qByteArrayData
+def qByteArrayData(d, value):
+ return d.byteArrayDataData(value['d'].dereference())
def qEncodeByteArray(d, value, limit = None):
- data, size, alloc = qByteArrayData(d, value)
+ data, size, alloc = d.byteArrayData(value)
if alloc != 0:
check(0 <= size and size <= alloc and alloc <= 100*1000*1000)
limit = d.computeLimit(size, limit)
@@ -44,7 +61,7 @@ def qEncodeByteArray(d, value, limit = None):
return s
def qEncodeString(d, value, limit = 0):
- data, size, alloc = qStringData(d, value)
+ data, size, alloc = d.stringData(value)
if alloc != 0:
check(0 <= size and size <= alloc and alloc <= 100*1000*1000)
limit = d.computeLimit(size, limit)
@@ -53,12 +70,6 @@ def qEncodeString(d, value, limit = 0):
s += "2e002e002e00"
return s
-def qPutByteArrayValue(d, value):
- d.putValue(qEncodeByteArray(d, value), Hex2EncodedLatin1)
-
-def qPutStringValue(d, value):
- d.putValue(qEncodeString(d, value), Hex4EncodedLittleEndian)
-
def mapForms():
return "Normal,Compact"
@@ -87,16 +98,21 @@ def qPutMapName(d, value):
Dumper.encodeByteArray = qEncodeByteArray
Dumper.byteArrayData = qByteArrayData
-Dumper.putByteArrayValue = qPutByteArrayValue
+Dumper.byteArrayDataData = qByteArrayDataData
+Dumper.putByteArrayValue = \
+ lambda d, value: d.putValue(d.encodeByteArray(value), Hex2EncodedLatin1)
+Dumper.putStringValue = \
+ lambda d, value: d.putValue(d.encodeString(value), Hex4EncodedLittleEndian)
+
Dumper.encodeString = qEncodeString
-Dumper.stringData = qStringData
-Dumper.putStringValue = qPutStringValue
+Dumper.stringData = Dumper.byteArrayData
Dumper.putMapName = qPutMapName
Dumper.isMapCompact = \
lambda d, keyType, valueType: qMapCompact(d.currentItemFormat(), keyType, valueType)
+# Returns True when it encounters a QObject or derived class.
def tryPutObjectNameValue(d, value):
try:
# Is this derived from QObject?
@@ -116,8 +132,9 @@ def tryPutObjectNameValue(d, value):
if size > 0:
str = d.readRawMemory(data, 2 * size)
d.putValue(str, Hex4EncodedLittleEndian, 1)
+ return True
except:
- pass
+ return False
Dumper.tryPutObjectNameValue = tryPutObjectNameValue
@@ -144,22 +161,29 @@ def qdump__QBasicAtomicPointer(d, value):
with Children(d):
d.putItem(value["_q_value"])
+def qdump__QByteArrayData(d, value):
+ data, size, alloc = d.byteArrayDataData(value)
+ d.putValue(d.readRawMemory(data, size), Hex2EncodedLatin1)
+ d.putNumChild(size)
+ if d.isExpanded():
+ d.putArrayData(d.charType(), data, size)
+
def qform__QByteArray():
return "Inline,As Latin1 in Separate Window,As UTF-8 in Separate Window"
def qdump__QByteArray(d, value):
d.putByteArrayValue(value)
- data, size, alloc = qByteArrayData(d, value)
+ data, size, alloc = d.byteArrayData(value)
d.putNumChild(size)
format = d.currentItemFormat()
if format == 1:
d.putDisplay(StopDisplay)
elif format == 2:
d.putField("editformat", DisplayLatin1String)
- d.putField("editvalue", qEncodeByteArray(d, value, None))
+ d.putField("editvalue", d.encodeByteArray(value, None))
elif format == 3:
d.putField("editformat", DisplayUtf8String)
- d.putField("editvalue", qEncodeByteArray(d, value, None))
+ d.putField("editvalue", d.encodeByteArray(value, None))
if d.isExpanded():
d.putArrayData(d.charType(), data, size)
@@ -313,47 +337,50 @@ def qdump__QTime(d, value):
d.putValue(value["mds"], MillisecondsSinceMidnight)
d.putNumChild(1)
if d.isExpanded():
- qt = d.ns + "Qt::"
+ qtdate = d.ns + "Qt::"
+ qttime = d.ns + "Qt::"
if lldbLoaded:
- qt += "DateFormat::" # FIXME: Bug?...
+ qtdate += "DateFormat::" # FIXME: Bug?...
+ qttime += "TimeSpec::"
# FIXME: This improperly uses complex return values.
with Children(d):
- d.putCallItem("toString", value, "toString", qt + "TextDate")
- d.putCallItem("(ISO)", value, "toString", qt + "ISODate")
+ d.putCallItem("toString", value, "toString", qtdate + "TextDate")
+ d.putCallItem("(ISO)", value, "toString", qtdate + "ISODate")
d.putCallItem("(SystemLocale)", value, "toString",
- qt + "SystemLocaleDate")
- d.putCallItem("(Locale)", value, "toString", qt + "LocaleDate")
- d.putCallItem("toUTC", value, "toTimeSpec", qt + "UTC")
+ qtdate + "SystemLocaleDate")
+ d.putCallItem("(Locale)", value, "toString", qtdate + "LocaleDate")
+ d.putCallItem("toUTC", value, "toTimeSpec", qttime + "UTC")
else:
d.putValue("(invalid)")
d.putNumChild(0)
+# This relies on the Qt4/Qt5 internal structure layout:
+# {sharedref(4), date(8), time(4+x)}
def qdump__QDateTime(d, value):
- try:
- # Fails without debug info.
- p = value["d"]["d"].dereference()
- except:
- d.putPlainChildren(value)
- return
- mds = int(p["time"]["mds"])
+ intType = d.lookupType("int")
+ intPtrType = intType.pointer()
+ base = pointerValue(value.cast(intPtrType))
+ mds = int(createReferenceValue(value, base + intPtrType.sizeof + 8, intType))
if mds >= 0:
- d.putValue("%s/%s" % (int(p["date"]["jd"]), mds),
- JulianDateAndMillisecondsSinceMidnight)
+ jd = int(createReferenceValue(value, base + intPtrType.sizeof, intType))
+ d.putValue("%s/%s" % (jd, mds), JulianDateAndMillisecondsSinceMidnight)
d.putNumChild(1)
if d.isExpanded():
# FIXME: This improperly uses complex return values.
with Children(d):
- qt = d.ns + "Qt::"
+ qtdate = d.ns + "Qt::"
+ qttime = d.ns + "Qt::"
if lldbLoaded:
- qt += "DateFormat::" # FIXME: Bug?...
+ qtdate += "DateFormat::" # FIXME: Bug?...
+ qttime += "TimeSpec::" # FIXME: Bug?...
d.putCallItem("toTime_t", value, "toTime_t")
- d.putCallItem("toString", value, "toString", qt + "TextDate")
- d.putCallItem("(ISO)", value, "toString", qt + "ISODate")
- d.putCallItem("(SystemLocale)", value, "toString", qt + "SystemLocaleDate")
- d.putCallItem("(Locale)", value, "toString", qt + "LocaleDate")
- d.putCallItem("toUTC", value, "toTimeSpec", qt + "UTC")
- d.putCallItem("toLocalTime", value, "toTimeSpec", qt + "LocalTime")
+ d.putCallItem("toString", value, "toString", qtdate + "TextDate")
+ d.putCallItem("(ISO)", value, "toString", qtdate + "ISODate")
+ d.putCallItem("(SystemLocale)", value, "toString", qtdate + "SystemLocaleDate")
+ d.putCallItem("(Locale)", value, "toString", qtdate + "LocaleDate")
+ d.putCallItem("toUTC", value, "toTimeSpec", qttime + "UTC")
+ d.putCallItem("toLocalTime", value, "toTimeSpec", qttime + "LocalTime")
else:
d.putValue("(invalid)")
d.putNumChild(0)
@@ -627,7 +654,7 @@ def qdump__QHostAddress(d, value):
if int(data["ipString"]["d"]["size"]):
d.putStringValue(data["ipString"])
else:
- a = long(data["a"])
+ a = int(data["a"])
a, n4 = divmod(a, 256)
a, n3 = divmod(a, 256)
a, n2 = divmod(a, 256)
@@ -684,20 +711,12 @@ def qform__QImage():
return "Normal,Displayed"
def qdump__QImage(d, value):
- try:
- painters = int(value["painters"])
- except:
- d.putPlainChildren(value)
- return
- check(0 <= painters and painters < 1000)
- d_ptr = value["d"]
- if isNull(d_ptr):
- d.putValue("(null)")
- else:
- checkSimpleRef(d_ptr["ref"])
- d.putValue("(%dx%d)" % (d_ptr["width"], d_ptr["height"]))
- bits = d_ptr["data"]
- nbytes = d_ptr["nbytes"]
+ # This relies on current QImage layout
+ intPtrType = d.lookupType("int").pointer()
+ base = createReferenceValue(value, d.addressOf(value) + 3 * intPtrType.sizeof, intPtrType)
+ width = int(base[1])
+ height = int(base[2])
+ d.putValue("(%dx%d)" % (width, height))
d.putNumChild(0)
#d.putNumChild(1)
if d.isExpanded():
@@ -710,13 +729,16 @@ def qdump__QImage(d, value):
if format == 1:
d.putDisplay(StopDisplay)
elif format == 2:
+ d_ptr = value["d"]
+ bits = d_ptr["data"]
+ nbytes = d_ptr["nbytes"]
if False:
# Take four bytes at a time, this is critical for performance.
# In fact, even four at a time is too slow beyond 100x100 or so.
d.putField("editformat", DisplayImageData)
d.put('%s="' % name)
- d.put("%08x" % int(d_ptr["width"]))
- d.put("%08x" % int(d_ptr["height"]))
+ d.put("%08x" % width)
+ d.put("%08x" % height)
d.put("%08x" % int(d_ptr["format"]))
p = bits.cast(d.intType().pointer())
for i in xrange(nbytes / 4):
@@ -731,7 +753,7 @@ def qdump__QImage(d, value):
gdb.execute("dump binary memory %s %s %s" %
(filename, cleanAddress(p), cleanAddress(p + nbytes)))
d.putDisplay(DisplayImageFile, " %d %d %d %s"
- % (d_ptr["width"], d_ptr["height"], d_ptr["format"], filename))
+ % (width, height, d_ptr["format"], filename))
def qdump__QLinkedList(d, value):
@@ -970,9 +992,6 @@ def qdump__QObject(d, value):
d_ptr = dd.cast(privateType.pointer()).dereference()
#warn("D_PTR: %s " % d_ptr)
mo = d_ptr["metaObject"]
- if not isAccessible(mo):
- d.putInaccessible()
- return
if isNull(mo):
mo = staticMetaObject
#warn("MO: %s " % mo)
@@ -1067,7 +1086,7 @@ def qdump__QObject(d, value):
for i in xrange(dynamicPropertyCount):
with SubItem(d, i):
pp = p.cast(namesType.pointer()).dereference();
- d.putField("key", qEncodeByteArray(d, pp))
+ d.putField("key", d.encodeByteArray(pp))
d.putField("keyencoded", Hex2EncodedLatin1)
qq = q.cast(valuesType.pointer().pointer())
qq = qq.dereference();
@@ -1599,7 +1618,7 @@ def qedit__QString(expr, value):
cmd = "call (%s).resize(%d)" % (expr, len(value))
gdb.execute(cmd)
d = gdb.parse_and_eval(expr)["d"]["data"]
- cmd = "set {short[%d]}%s={" % (len(value), long(d))
+ cmd = "set {short[%d]}%s={" % (len(value), pointerValue(d))
for i in range(len(value)):
if i != 0:
cmd += ','
@@ -1618,12 +1637,12 @@ def qdump__QString(d, value):
d.putDisplay(StopDisplay)
elif format == 2:
d.putField("editformat", DisplayUtf16String)
- d.putField("editvalue", qEncodeString(d, value, None))
+ d.putField("editvalue", d.encodeString(value, None))
def qdump__QStringRef(d, value):
s = value["m_string"].dereference()
- data, size, alloc = qStringData(d, s)
+ data, size, alloc = d.stringData(s)
data += 2 * int(value["m_position"])
size = value["m_size"]
s = d.readRawMemory(data, 2 * size)
@@ -1695,10 +1714,10 @@ def qdump__QUrl(d, value):
try:
# Qt 5
data = value["d"].dereference()
- str = qEncodeString(d, data["scheme"])
+ str = d.encodeString(data["scheme"])
str += "3a002f002f00"
- str += qEncodeString(d, data["host"])
- str += qEncodeString(d, data["path"])
+ str += d.encodeString(data["host"])
+ str += d.encodeString(data["path"])
d.putValue(str, Hex4EncodedLittleEndian)
except:
d.putPlainChildren(value)
@@ -1907,7 +1926,7 @@ def qedit__QVector(expr, value):
gdb.execute(cmd)
innerType = d.templateArgument(ob.type, 0)
ptr = ob["p"]["array"].cast(d.voidPtrType())
- cmd = "set {%s[%d]}%s={%s}" % (innerType, len(values), long(ptr), value)
+ cmd = "set {%s[%d]}%s={%s}" % (innerType, len(values), pointerValue(ptr), value)
gdb.execute(cmd)
@@ -2003,7 +2022,7 @@ def qdump____c_style_array__(d, value):
# Explicitly requested Local 8-bit formatting.
d.putValue(blob, Hex2EncodedLocal8Bit)
else:
- d.putValue("@0x%x" % long(value.cast(targetType.pointer())))
+ d.putValue("@0x%x" % pointerValue(value.cast(targetType.pointer())))
if d.currentIName in d.expandedINames:
p = value.address
@@ -2295,10 +2314,10 @@ def qdump__std__shared_ptr(d, value):
return
if isSimpleType(d.templateArgument(value.type, 0)):
- d.putValue("%s @0x%x" % (i.dereference(), long(i)))
+ d.putValue("%s @0x%x" % (i.dereference(), pointerValue(i)))
else:
i = expensiveDowncast(i)
- d.putValue("@0x%x" % long(i))
+ d.putValue("@0x%x" % pointerValue(i))
d.putNumChild(3)
with Children(d, 3):
@@ -2316,10 +2335,10 @@ def qdump__std__unique_ptr(d, value):
return
if isSimpleType(d.templateArgument(value.type, 0)):
- d.putValue("%s @0x%x" % (i.dereference(), long(i)))
+ d.putValue("%s @0x%x" % (i.dereference(), pointerValue(i)))
else:
i = expensiveDowncast(i)
- d.putValue("@0x%x" % long(i))
+ d.putValue("@0x%x" % pointerValue(i))
d.putNumChild(1)
with Children(d, 1):
@@ -2440,17 +2459,17 @@ def qdump__boost__bimaps__bimap(d, value):
def qdump__boost__optional(d, value):
- if value["m_initialized"] == False:
+ if int(value["m_initialized"]) == 0:
d.putValue("")
d.putNumChild(0)
else:
- d.putBetterType(value.type)
type = d.templateArgument(value.type, 0)
storage = value["m_storage"]
if type.code == ReferenceCode:
d.putItem(storage.cast(type.target().pointer()).dereference())
else:
d.putItem(storage.cast(type))
+ d.putBetterType(value.type)
def qdump__boost__shared_ptr(d, value):
@@ -2479,6 +2498,7 @@ def qdump__boost__shared_ptr(d, value):
if isSimpleType(val.type):
d.putNumChild(3)
d.putItem(val)
+ d.putBetterType(value.type)
else:
d.putEmptyValue()
@@ -2491,18 +2511,18 @@ def qdump__boost__shared_ptr(d, value):
def qdump__boost__gregorian__date(d, value):
- d.putValue(value["days_"], JulianDate)
+ d.putValue(int(value["days_"]), JulianDate)
d.putNumChild(0)
def qdump__boost__posix_time__ptime(d, item):
- ms = long(item["time_"]["time_count_"]["value_"]) / 1000
+ ms = int(item["time_"]["time_count_"]["value_"]) / 1000
d.putValue("%s/%s" % divmod(ms, 86400000), JulianDateAndMillisecondsSinceMidnight)
d.putNumChild(0)
def qdump__boost__posix_time__time_duration(d, item):
- d.putValue(long(item["ticks_"]["value_"]) / 1000, MillisecondsSinceMidnight)
+ d.putValue(int(item["ticks_"]["value_"]) / 1000, MillisecondsSinceMidnight)
d.putNumChild(0)
@@ -2569,11 +2589,11 @@ def qdump__QTJSC__JSValue(d, value):
payload = value["u"]["asBits"]["payload"]
#d.putIntItem("tag", tag)
with SubItem(d, "tag"):
- d.putValue(jstagAsString(long(tag)))
+ d.putValue(jstagAsString(int(tag)))
d.putNoType()
d.putNumChild(0)
- d.putIntItem("payload", long(payload))
+ d.putIntItem("payload", int(payload))
d.putFields(value["u"])
if tag == -2:
@@ -2607,12 +2627,12 @@ def qdump__QScriptValue(d, value):
d.putValue("(invalid)")
d.putNumChild(0)
return
- if long(dd["type"]) == 1: # Number
+ if int(dd["type"]) == 1: # Number
d.putValue(dd["numberValue"])
d.putType("%sQScriptValue (Number)" % d.ns)
d.putNumChild(0)
return
- if long(dd["type"]) == 2: # String
+ if int(dd["type"]) == 2: # String
d.putStringValue(dd["stringValue"])
d.putType("%sQScriptValue (String)" % d.ns)
return
@@ -2621,8 +2641,8 @@ def qdump__QScriptValue(d, value):
x = dd["jscValue"]["u"]
tag = x["asBits"]["tag"]
payload = x["asBits"]["payload"]
- #isValid = long(x["asBits"]["tag"]) != -6 # Empty
- #isCell = long(x["asBits"]["tag"]) == -2
+ #isValid = int(x["asBits"]["tag"]) != -6 # Empty
+ #isCell = int(x["asBits"]["tag"]) == -2
#warn("IS CELL: %s " % isCell)
#isObject = False
#className = "UNKNOWN NAME"
@@ -2639,7 +2659,7 @@ def qdump__QScriptValue(d, value):
# warn("DYNAMIC TYPE: %s" % dtype)
# warn("STATUC %s" % cell.type)
# type = cell["m_structure"]["m_typeInfo"]["m_type"]
- # isObject = long(type) == 7 # ObjectType;
+ # isObject = int(type) == 7 # ObjectType;
# className = "UNKNOWN NAME"
#warn("IS OBJECT: %s " % isObject)
@@ -2753,14 +2773,14 @@ def qdump__Utils__ElfSection(d, value):
d.putPlainChildren(value)
def qdump__CPlusPlus__Token(d, value):
- k = value["f"]["kind"];
- if long(k) == 6:
+ k = int(value["f"]["kind"])
+ if int(k) == 6:
d.putValue("T_IDENTIFIER. offset: %d, len: %d"
% (value["offset"], value["f"]["length"]))
- elif long(k) == 7:
+ elif int(k) == 7:
d.putValue("T_NUMERIC_LITERAL. offset: %d, value: %d"
% (value["offset"], value["f"]["length"]))
- elif long(k) == 60:
+ elif int(k) == 60:
d.putValue("T_RPAREN")
else:
d.putValue("Type: %s" % k)
@@ -2769,8 +2789,8 @@ def qdump__CPlusPlus__Token(d, value):
def qdump__CPlusPlus__Internal__PPToken(d, value):
k = value["f"]["kind"];
data, size, alloc = d.byteArrayData(value["m_src"])
- length = long(value["f"]["length"])
- offset = long(value["offset"])
+ length = int(value["f"]["length"])
+ offset = int(value["offset"])
#warn("size: %s, alloc: %s, offset: %s, length: %s, data: %s"
# % (size, alloc, offset, length, data))
d.putValue(encodeCharArray(data + offset, 100, length),
@@ -2909,9 +2929,9 @@ if False:
def qdump__basic__Function(d, value):
min = value["min"]
max = value["max"]
- data, size, alloc = qByteArrayData(d, value["var"])
+ data, size, alloc = d.byteArrayData(value["var"])
var = extractCString(data, 0)
- data, size, alloc = qByteArrayData(d, value["f"])
+ data, size, alloc = d.byteArrayData(value["f"])
f = extractCString(data, 0)
d.putValue("%s, %s=%f..%f" % (f, var, min, max))
d.putNumChild(0)
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.cpp
index 2a864bd20ea..561a333d4d4 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.cpp
@@ -103,12 +103,9 @@ void GraphicalNodeInstance::createEffectItem(bool createEffectItem)
s_createEffectItem = createEffectItem;
}
-void GraphicalNodeInstance::updateDirtyNodeRecursive()
+void GraphicalNodeInstance::updateAllDirtyNodesRecursive()
{
- foreach (QQuickItem *childItem, quickItem()->childItems())
- updateDirtyNodeRecursive(childItem);
-
- DesignerSupport::updateDirtyNode(quickItem());
+ updateAllDirtyNodesRecursive(quickItem());
}
GraphicalNodeInstance::~GraphicalNodeInstance()
@@ -117,27 +114,27 @@ GraphicalNodeInstance::~GraphicalNodeInstance()
designerSupport()->derefFromEffectItem(quickItem());
}
-void GraphicalNodeInstance::updateDirtyNodeRecursive(QQuickItem *parentItem) const
+void GraphicalNodeInstance::updateDirtyNodesRecursive(QQuickItem *parentItem) const
{
foreach (QQuickItem *childItem, parentItem->childItems()) {
if (!nodeInstanceServer()->hasInstanceForObject(childItem))
- updateDirtyNodeRecursive(childItem);
+ updateDirtyNodesRecursive(childItem);
}
DesignerSupport::updateDirtyNode(parentItem);
}
-void GraphicalNodeInstance::updateAllDirtyNodeRecursive(QQuickItem *parentItem) const
+void GraphicalNodeInstance::updateAllDirtyNodesRecursive(QQuickItem *parentItem) const
{
foreach (QQuickItem *childItem, parentItem->childItems())
- updateDirtyNodeRecursive(childItem);
+ updateAllDirtyNodesRecursive(childItem);
DesignerSupport::updateDirtyNode(parentItem);
}
QImage GraphicalNodeInstance::renderImage() const
{
- updateDirtyNodeRecursive(quickItem());
+ updateDirtyNodesRecursive(quickItem());
QRectF renderBoundingRect = boundingRect();
@@ -485,20 +482,6 @@ QPair GraphicalNodeInstance::anchor(const Prop
}
-static void doComponentCompleteRecursive(QQuickItem *item)
-{
- if (item) {
- if (DesignerSupport::isComponentComplete(item))
- return;
-
- foreach (QQuickItem *childItem, item->childItems())
- doComponentCompleteRecursive(childItem);
-
- static_cast(item)->componentComplete();
- }
-}
-
-
static void disableTextCursor(QQuickItem *item)
{
foreach (QQuickItem *childItem, item->childItems())
@@ -515,7 +498,7 @@ static void disableTextCursor(QQuickItem *item)
void GraphicalNodeInstance::doComponentComplete()
{
- doComponentCompleteRecursive(quickItem());
+ doComponentCompleteRecursive(quickItem(), nodeInstanceServer());
disableTextCursor(quickItem());
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.h
index 06ff5d28a49..d9996cb7377 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.h
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.h
@@ -40,7 +40,7 @@ public:
QList childItems() const;
- void updateDirtyNodeRecursive();
+ void updateAllDirtyNodesRecursive();
static void createEffectItem(bool createEffectItem);
int penWidth() const;
@@ -64,8 +64,8 @@ protected:
void setHasContent(bool hasContent);
DesignerSupport *designerSupport() const;
Qt5NodeInstanceServer *qt5NodeInstanceServer() const;
- void updateDirtyNodeRecursive(QQuickItem *parentItem) const;
- void updateAllDirtyNodeRecursive(QQuickItem *parentItem) const;
+ void updateDirtyNodesRecursive(QQuickItem *parentItem) const;
+ void updateAllDirtyNodesRecursive(QQuickItem *parentItem) const;
QRectF boundingRectWithStepChilds(QQuickItem *parentItem) const;
void resetHorizontal();
void resetVertical();
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp
index 1373360f02a..e95664f4851 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp
@@ -475,8 +475,13 @@ QList NodeInstanceServer::setupInstances(const CreateSceneC
setInstanceAuxiliaryData(container);
}
- foreach (ServerNodeInstance instance, instanceList)
+
+ QListIterator instanceListIterator(instanceList);
+ instanceListIterator.toBack();
+ while (instanceListIterator.hasPrevious()) {
+ ServerNodeInstance instance = instanceListIterator.previous();
instance.doComponentComplete();
+ }
return instanceList;
}
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp
index 262ca4fc2d7..46b90587b2c 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp
@@ -459,7 +459,7 @@ QVariant ObjectNodeInstance::fixResourcePaths(const QVariant &value)
return value;
}
-void ObjectNodeInstance::updateDirtyNodeRecursive()
+void ObjectNodeInstance::updateAllDirtyNodesRecursive()
{
}
@@ -1179,6 +1179,38 @@ QObject *ObjectNodeInstance::parentObject(QObject *object)
return object->parent();
}
+void ObjectNodeInstance::doComponentCompleteRecursive(QObject *object, NodeInstanceServer *nodeInstanceServer)
+{
+ if (object) {
+ QQuickItem *item = qobject_cast(object);
+
+ if (item && DesignerSupport::isComponentComplete(item))
+ return;
+
+ QList childList = object->children();
+
+ if (item) {
+ foreach (QQuickItem *childItem, item->childItems()) {
+ if (!childList.contains(childItem))
+ childList.append(childItem);
+ }
+ }
+
+ foreach (QObject *child, childList) {
+ if (!nodeInstanceServer->hasInstanceForObject(child))
+ doComponentCompleteRecursive(child, nodeInstanceServer);
+ }
+
+ if (item) {
+ static_cast(item)->componentComplete();
+ } else {
+ QQmlParserStatus *qmlParserStatus = dynamic_cast< QQmlParserStatus*>(object);
+ if (qmlParserStatus)
+ qmlParserStatus->componentComplete();
+ }
+ }
+}
+
ObjectNodeInstance::Pointer ObjectNodeInstance::parentInstance() const
{
QObject *parentHolder = parent();
@@ -1247,9 +1279,7 @@ bool ObjectNodeInstance::resetStateProperty(const ObjectNodeInstance::Pointer &/
void ObjectNodeInstance::doComponentComplete()
{
- QQmlParserStatus *qmlParserStatus = dynamic_cast< QQmlParserStatus*>(object());
- if (qmlParserStatus)
- qmlParserStatus->componentComplete();
+ doComponentCompleteRecursive(object(), nodeInstanceServer());
}
bool ObjectNodeInstance::isRootNodeInstance() const
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h
index 7576640d216..6c9b0eb01e5 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h
@@ -186,7 +186,7 @@ public:
static QVariant fixResourcePaths(const QVariant &value);
- virtual void updateDirtyNodeRecursive();
+ virtual void updateAllDirtyNodesRecursive();
protected:
explicit ObjectNodeInstance(QObject *object);
@@ -196,6 +196,7 @@ protected:
void deleteObjectsInList(const QQmlProperty &metaProperty);
QVariant convertSpecialCharacter(const QVariant& value) const;
static QObject *parentObject(QObject *object);
+ static void doComponentCompleteRecursive(QObject *object, NodeInstanceServer *nodeInstanceServer);
private:
QHash m_resetValueHash;
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp
index a40019c5794..548f371ac81 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp
@@ -158,7 +158,7 @@ bool ServerNodeInstance::holdsGraphical() const
void ServerNodeInstance::updateDirtyNodeRecursive()
{
- m_nodeInstance->updateDirtyNodeRecursive();
+ m_nodeInstance->updateAllDirtyNodesRecursive();
}
bool ServerNodeInstance::isSubclassOf(const QString &superTypeName) const
diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts
index 1ad93d0d9f4..8b44e4d8c3e 100644
--- a/share/qtcreator/translations/qtcreator_de.ts
+++ b/share/qtcreator/translations/qtcreator_de.ts
@@ -1777,7 +1777,7 @@
Core::ModeManagerSwitch to <b>%1</b> mode
- Gehe zu Mode <b>'%1'</b>
+ Gehe zu Modus <b>'%1'</b>
@@ -5116,6 +5116,10 @@ Grund: %3
Look-up of a stash via its descriptive message failed.Es konnte kein Stash mit der Beschreibung "%1" im Repository "%2" gefunden werden.
+
+ Cannot retrieve submodule status of "%1": %2
+ Der Status des Sub-Modules "%1" konnte nicht bestimmt werden: %2
+ There were warnings while applying "%1" to "%2":
%3
@@ -5693,7 +5697,7 @@ Jetzt Commit durchführen?
Actions on Commits...
- Aktionen bei Commits...
+ Aktionen mit Commits...Commit
@@ -6287,7 +6291,7 @@ Add, modify, and remove document filters, which determine the documentation set
Previous Page
- Vorangehender Seite
+ Vorangehende SeiteNext Page
@@ -9370,22 +9374,6 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü
Configuration unchanged, skipping qmake step.Unveränderte Konfiguration, qmake-Schritt wird übersprungen.
-
- No Qt version.
- Keine Qt-Version.
-
-
- Invalid Qt version.
- Ungültige Qt-Version.
-
-
- Requires Qt 4.7.1 or newer.
- Erfordert Qt 4.7.1 oder neuer.
-
-
- Library not available. <a href='compile'>Compile...</a>
- Bibliothek nicht verfügbar. <a href='compile'>Kompilieren...</a>
- Qt4ProjectManager::QMakeStepConfigWidget
@@ -9397,10 +9385,6 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü
The option will only take effect if the project is recompiled. Do you want to recompile now?Diese Einstellung wird nur nach einer Neuerstellung des Projekts wirksam. Möchten Sie das Projekt neu erstellen?
-
- Building helpers
- Ausgabe-Hilfsbibliothek
- <b>qmake:</b> No Qt version set. Cannot run qmake.<b>qmake:</b> Es ist keine Qt-Version eingestellt. qmake kann nicht ausgeführt werden.
@@ -20830,7 +20814,7 @@ Gibt an, wie sich die Rücktaste bezüglich Einrückung verhält.
Valgrind Suppression Files
- Valgrind-Ausschlußdateien
+ Valgrind-AusschlussdateienValgrind Suppression File (*.supp);;All Files (*)
@@ -22015,6 +21999,26 @@ Bitte verwenden Sie den Stop-Button.
Version:Version:
+
+ No Qt version.
+ Keine Qt-Version.
+
+
+ Invalid Qt version.
+ Ungültige Qt-Version.
+
+
+ Requires Qt 4.7.1 or newer.
+ Erfordert Qt 4.7.1 oder neuer.
+
+
+ Library not available. <a href='compile'>Compile...</a>
+ Bibliothek nicht verfügbar. <a href='compile'>Kompilieren...</a>
+
+
+ Building helpers
+ Erstelle Hilfsbibliotheken
+ QtSupport::Internal::QtOptionsPageWidget
@@ -34147,6 +34151,10 @@ Entfernt: %4
<b>Qbs:</b> %1<b>Qbs:</b> %1
+
+ Might make your application vulnerable. Only use in a safe environment.
+ Potentielle Sicherheitslücke, sollte nur in einer sicheren Umgebung benutzt werden.
+ Keep goingFortsetzen
@@ -34155,6 +34163,10 @@ Entfernt: %4
Properties:Eigenschaften:
+
+ Enable QML debugging:
+ QML-Debuggen aktivieren:
+ QbsProjectManager::Internal::QbsCleanStepConfigWidget
@@ -34569,13 +34581,6 @@ Entfernt: %4
Bestimmt, wie der Text in der Textzeile angezeigt wird.
-
- QtSupport::Internal::QtVersionsModel
-
- All Versions
- Alle Versionen
-
-Android::Internal::AndroidGdbServerKitInformation
@@ -35720,17 +35725,6 @@ Kurznamen können verwendet werden, sofern sie eindeutig sind.
Erstellt ein Qt Quick 2-UI-Projekt mit einer einzigen QML-Datei, die die Hauptansicht enthält und Qt Quick Controls verwendet.<br/>Sie können Qt Quick 2-UI-Projekte mit QML-Scene ohne Erstellung betrachten. Dieses Projekt erfordert, dass die Qt Quick Controls für die Qt-Version installiert sind.<br/><br/>Erfordert <b>Qt 5.1</b> oder neuer.
-
- QuickFixFactory
-
- Create Getter and Setter Member Functions
- Getter- und Setter-Funktionen erstellen
-
-
- Generate Missing Q_PROPERTY Members...
- Fehlende Q_PROPERTY-Elemente ergänzen...
-
-CppEditor::QuickFix
@@ -37034,4 +37028,33 @@ Dieser Wizard führt Sie durch die essentiellen Schritte, die zum Deployment ein
Erstellt eine C++-/Boost-Datei mit Bindings für Python
+
+ TextEditor::QuickFixFactory
+
+ Create Getter and Setter Member Functions
+ Getter- und Setter-Funktionen erstellen
+
+
+ Generate Missing Q_PROPERTY Members...
+ Fehlende Q_PROPERTY-Elemente ergänzen...
+
+
+
+ ShowEditor
+
+ Show Editor
+ Editor anzeigen
+
+
+
+ DiffEditor::DiffShowEditor
+
+ Hide Change Description
+ Beschreibung der Änderung ausblenden
+
+
+ Show Change Description
+ Beschreibung der Änderung einblenden
+
+
diff --git a/src/libs/QtcLibrary.qbs b/src/libs/QtcLibrary.qbs
index 44a6641cb85..7bc97fdb80e 100644
--- a/src/libs/QtcLibrary.qbs
+++ b/src/libs/QtcLibrary.qbs
@@ -14,8 +14,9 @@ DynamicLibrary {
return ["-Wl,-s"]
}
cpp.installNamePrefix: "@rpath/PlugIns/"
- cpp.rpaths: qbs.targetOS == "mac" ? ["@loader_path/..", "@executable_path/.."]
- : ["$ORIGIN", "$ORIGIN/.."]
+ cpp.rpaths: qbs.targetOS.contains("mac")
+ ? ["@loader_path/..", "@executable_path/.."]
+ : ["$ORIGIN", "$ORIGIN/.."]
cpp.includePaths: [ ".", ".." ]
Export {
diff --git a/src/libs/aggregation/aggregate.cpp b/src/libs/aggregation/aggregate.cpp
index e6979b0a13d..9a4f61c2a37 100644
--- a/src/libs/aggregation/aggregate.cpp
+++ b/src/libs/aggregation/aggregate.cpp
@@ -48,7 +48,8 @@
\mainclass
\threadsafe
- \brief Defines a collection of related components that can be viewed as a unit.
+ \brief The Aggregate class defines a collection of related components that
+ can be viewed as a unit.
An Aggregate is a collection of components that are handled as a unit,
such that each component exposes the properties and behavior of the
diff --git a/src/libs/cplusplus/CppDocument.cpp b/src/libs/cplusplus/CppDocument.cpp
index 0fec40050ec..301019e909a 100644
--- a/src/libs/cplusplus/CppDocument.cpp
+++ b/src/libs/cplusplus/CppDocument.cpp
@@ -382,13 +382,15 @@ void Document::addUndefinedMacroUse(const QByteArray &name, unsigned offset)
/*!
\class Document::MacroUse
- \brief Represents the usage of a macro in a \l {Document}.
+ \brief The MacroUse class represents the usage of a macro in a
+ \l {Document}.
\sa Document::UndefinedMacroUse
*/
/*!
\class Document::UndefinedMacroUse
- \brief Represents a macro that was looked up, but not found.
+ \brief The UndefinedMacroUse class represents a macro that was looked for,
+ but not found.
Holds data about the reference to a macro in an \tt{#ifdef} or \tt{#ifndef}
or argument to the \tt{defined} operator inside an \tt{#if} or \tt{#elif} that does
diff --git a/src/libs/cplusplus/PreprocessorClient.cpp b/src/libs/cplusplus/PreprocessorClient.cpp
index 7cd95e78103..5028cffd817 100644
--- a/src/libs/cplusplus/PreprocessorClient.cpp
+++ b/src/libs/cplusplus/PreprocessorClient.cpp
@@ -33,7 +33,8 @@ using namespace CPlusPlus;
/*!
\class Client
- \brief A notification interface for for C++ preprocessor.
+ \brief The Client class implements a notification interface for the
+ C++ preprocessor.
*/
/*!
diff --git a/src/libs/extensionsystem/iplugin.cpp b/src/libs/extensionsystem/iplugin.cpp
index b3cda5f508e..132e5078f38 100644
--- a/src/libs/extensionsystem/iplugin.cpp
+++ b/src/libs/extensionsystem/iplugin.cpp
@@ -35,7 +35,7 @@
/*!
\class ExtensionSystem::IPlugin
\mainclass
- \brief Base class for all plugins.
+ \brief The IPlugin class is the base class for all plugins.
The IPlugin class is an abstract class that must be implemented
once for each plugin.
diff --git a/src/libs/extensionsystem/plugindetailsview.cpp b/src/libs/extensionsystem/plugindetailsview.cpp
index cb9e792443f..a7464cce177 100644
--- a/src/libs/extensionsystem/plugindetailsview.cpp
+++ b/src/libs/extensionsystem/plugindetailsview.cpp
@@ -35,7 +35,8 @@
/*!
\class ExtensionSystem::PluginDetailsView
- \brief Widget that displays the contents of a PluginSpec.
+ \brief The PluginDetailsView class implements a widget that displays the
+ contents of a PluginSpec.
Can be used for integration in the application that
uses the plugin manager.
diff --git a/src/libs/extensionsystem/pluginerrorview.cpp b/src/libs/extensionsystem/pluginerrorview.cpp
index 81d3c63f1b8..d5c4fe7f568 100644
--- a/src/libs/extensionsystem/pluginerrorview.cpp
+++ b/src/libs/extensionsystem/pluginerrorview.cpp
@@ -35,7 +35,8 @@
/*!
\class ExtensionSystem::PluginErrorView
- \brief Widget that displays the state and error message of a PluginSpec.
+ \brief The PluginErrorView class implements a widget that displays the
+ state and error message of a PluginSpec.
Can be used for integration in the application that
uses the plugin manager.
diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp
index 373f96a9236..87fa98b9318 100644
--- a/src/libs/extensionsystem/pluginmanager.cpp
+++ b/src/libs/extensionsystem/pluginmanager.cpp
@@ -76,7 +76,8 @@ enum { debugLeaks = 0 };
\class ExtensionSystem::PluginManager
\mainclass
- \brief Core plugin system that manages the plugins, their life cycle and their registered objects.
+ \brief The PluginManager class implements the core plugin system that
+ manages the plugins, their life cycle, and their registered objects.
The plugin manager is used for the following tasks:
\list
diff --git a/src/libs/extensionsystem/pluginspec.cpp b/src/libs/extensionsystem/pluginspec.cpp
index c9ccce4ce20..ed0d3350abc 100644
--- a/src/libs/extensionsystem/pluginspec.cpp
+++ b/src/libs/extensionsystem/pluginspec.cpp
@@ -63,7 +63,8 @@
/*!
\class ExtensionSystem::PluginDependency
- \brief Struct that contains the name and required compatible version number of a plugin's dependency.
+ \brief The PluginDependency class contains the name and required compatible
+ version number of a plugin's dependency.
This reflects the data of a dependency tag in the plugin's xml description file.
The name and version are used to resolve the dependency, i.e. a plugin with the given name and
@@ -102,7 +103,8 @@
/*!
\class ExtensionSystem::PluginSpec
- \brief Contains the information of the plugins xml description file and
+ \brief The PluginSpec class contains the information of the plugin's XML
+ description file and
information about the plugin's current state.
The plugin spec is also filled with more information as the plugin
diff --git a/src/libs/extensionsystem/pluginview.cpp b/src/libs/extensionsystem/pluginview.cpp
index 5469a2fce9a..61fcc577dce 100644
--- a/src/libs/extensionsystem/pluginview.cpp
+++ b/src/libs/extensionsystem/pluginview.cpp
@@ -42,7 +42,8 @@
/*!
\class ExtensionSystem::PluginView
- \brief Widget that shows a list of all plugins and their state.
+ \brief The PluginView class implements a widget that shows a list of all
+ plugins and their state.
This can be embedded e.g. in a dialog in the application that
uses the plugin manager.
diff --git a/src/libs/qmljs/persistenttrie.cpp b/src/libs/qmljs/persistenttrie.cpp
index 15bed733fe2..e12fa90875c 100644
--- a/src/libs/qmljs/persistenttrie.cpp
+++ b/src/libs/qmljs/persistenttrie.cpp
@@ -30,7 +30,8 @@
/*!
\class QmlJS::PersistentTrie::Trie
- \brief Implements a trie that is persistent (not on disk but in memory).
+ \brief The Trie class implements a trie that is
+ persistent (not on disk but in memory).
This means that several versions can coexist, as adding an element
is non destructive, and as much as possible is shared.
diff --git a/src/libs/qmljs/qmljsbind.cpp b/src/libs/qmljs/qmljsbind.cpp
index 05d2e143df8..54b9a204f26 100644
--- a/src/libs/qmljs/qmljsbind.cpp
+++ b/src/libs/qmljs/qmljsbind.cpp
@@ -41,7 +41,7 @@ using namespace QmlJS::AST;
/*!
\class QmlJS::Bind
- \brief Collected information about a single Document.
+ \brief The Bind class collects information about a single Document.
\sa Document Context
Each Document owns an instance of Bind. It provides access to data
diff --git a/src/libs/qmljs/qmljscontext.cpp b/src/libs/qmljs/qmljscontext.cpp
index 8bcfb648ceb..ff601e37a63 100644
--- a/src/libs/qmljs/qmljscontext.cpp
+++ b/src/libs/qmljs/qmljscontext.cpp
@@ -36,7 +36,8 @@ using namespace QmlJS::AST;
/*!
\class QmlJS::Context
- \brief Holds information about relationships between documents in a Snapshot.
+ \brief The Context class holds information about relationships between
+ documents in a Snapshot.
\sa Document Link Snapshot
Contexts are usually created through Link. Once created, a Context is immutable
diff --git a/src/libs/qmljs/qmljsdocument.cpp b/src/libs/qmljs/qmljsdocument.cpp
index a7eb00c354d..b75a74aae95 100644
--- a/src/libs/qmljs/qmljsdocument.cpp
+++ b/src/libs/qmljs/qmljsdocument.cpp
@@ -39,7 +39,7 @@ using namespace QmlJS::AST;
/*!
\class QmlJS::Document
- \brief A Qml or JavaScript document.
+ \brief The Document class creates a QML or JavaScript document.
\sa Snapshot
Documents are usually created by the ModelManagerInterface
@@ -57,7 +57,7 @@ using namespace QmlJS::AST;
/*!
\class QmlJS::LibraryInfo
- \brief A Qml library.
+ \brief The LibraryInfo class creates a QML library.
\sa Snapshot
A LibraryInfo is created when the ModelManagerInterface finds
@@ -71,11 +71,10 @@ using namespace QmlJS::AST;
/*!
\class QmlJS::Snapshot
- \brief A set of Document::Ptr and LibraryInfo instances.
+ \brief The Snapshot class holds and offers access to a set of
+ Document::Ptr and LibraryInfo instances.
\sa Document LibraryInfo
- A Snapshot holds and offers access to a set of Document and LibraryInfo instances.
-
Usually Snapshots are copies of the snapshot maintained and updated by the
ModelManagerInterface that updates its instance as parsing
threads finish and new information becomes available.
diff --git a/src/libs/qmljs/qmljsevaluate.cpp b/src/libs/qmljs/qmljsevaluate.cpp
index b0ea53ec211..9f0db46a7a2 100644
--- a/src/libs/qmljs/qmljsevaluate.cpp
+++ b/src/libs/qmljs/qmljsevaluate.cpp
@@ -37,7 +37,7 @@ using namespace QmlJS;
/*!
\class QmlJS::Evaluate
- \brief Evaluates \l{AST::Node}s to \l{Value}s.
+ \brief The Evaluate class evaluates \l{AST::Node}s to \l{Value}s.
\sa Value ScopeChain
The Evaluate visitor is constructed with a ScopeChain and accepts JavaScript
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index c9b1f4381a5..c74d5c4086c 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -53,7 +53,8 @@ using namespace QmlJS::AST;
/*!
\class QmlJS::Value
- \brief Abstract base class for the result of a JS expression.
+ \brief The Value class is an abstract base class for the result of a
+ JS expression.
\sa Evaluate ValueOwner ValueVisitor
A Value represents a category of JavaScript values, such as number
diff --git a/src/libs/qmljs/qmljslink.cpp b/src/libs/qmljs/qmljslink.cpp
index 2d5672fa20e..1515286a54f 100644
--- a/src/libs/qmljs/qmljslink.cpp
+++ b/src/libs/qmljs/qmljslink.cpp
@@ -122,7 +122,7 @@ public:
/*!
\class QmlJS::Link
- \brief Creates a Context for a Snapshot.
+ \brief The Link class creates a Context for a Snapshot.
\sa Context Snapshot
Initializes a context by resolving imports. This is an expensive operation.
diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
index 1be1f2c6836..34b2eeb8560 100644
--- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
+++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
@@ -33,7 +33,8 @@ using namespace QmlJS;
/*!
\class QmlJS::ModelManagerInterface
- \brief Interface to the global state of the QmlJS code model.
+ \brief The ModelManagerInterface class acts as an interface to the
+ global state of the QmlJS code model.
\sa QmlJS::Document QmlJS::Snapshot QmlJSTools::Internal::ModelManager
The ModelManagerInterface is an interface for global state and actions in
diff --git a/src/libs/qmljs/qmljsscopechain.cpp b/src/libs/qmljs/qmljsscopechain.cpp
index a0a9bf0f912..a25c094db4d 100644
--- a/src/libs/qmljs/qmljsscopechain.cpp
+++ b/src/libs/qmljs/qmljsscopechain.cpp
@@ -36,7 +36,8 @@ using namespace QmlJS;
/*!
\class QmlJS::ScopeChain
- \brief Describes the scopes used for global lookup in a specific location.
+ \brief The ScopeChain class describes the scopes used for global lookup in
+ a specific location.
\sa Document Context ScopeBuilder
A ScopeChain is used to perform global lookup with the lookup() method and
diff --git a/src/libs/qmljs/qmljsvalueowner.cpp b/src/libs/qmljs/qmljsvalueowner.cpp
index 2c47a71f456..ac0ceb9c6a3 100644
--- a/src/libs/qmljs/qmljsvalueowner.cpp
+++ b/src/libs/qmljs/qmljsvalueowner.cpp
@@ -35,7 +35,7 @@ using namespace QmlJS;
/*!
\class QmlJS::ValueOwner
- \brief Manages the lifetime of \l{QmlJS::Value}s.
+ \brief The ValueOwner class manages the lifetime of \l{QmlJS::Value}s.
\sa QmlJS::Value
Values are usually created on a ValueOwner. When the ValueOwner is destroyed
diff --git a/src/libs/qtcomponents/styleitem/qrangemodel.cpp b/src/libs/qtcomponents/styleitem/qrangemodel.cpp
index e9425a309d1..8217ff3e44c 100644
--- a/src/libs/qtcomponents/styleitem/qrangemodel.cpp
+++ b/src/libs/qtcomponents/styleitem/qrangemodel.cpp
@@ -29,8 +29,8 @@
/*!
\class QRangeModel
- \brief The QRangeModel class, helps users to build components that depend
- on some value and/or position to be in a certain range previously defined
+ \brief The QRangeModel class helps users to build components that depend
+ on some value and/or position to be in a certain range previously defined.
With this class, the user sets a value range and a position range, which
represent the valid values/positions the model can assume. It is worth telling
diff --git a/src/libs/qtcreatorcdbext/symbolgroup.cpp b/src/libs/qtcreatorcdbext/symbolgroup.cpp
index 0a4361147f5..5fc8113fdc1 100644
--- a/src/libs/qtcreatorcdbext/symbolgroup.cpp
+++ b/src/libs/qtcreatorcdbext/symbolgroup.cpp
@@ -46,7 +46,9 @@ enum { debug = 0 };
// ------------- SymbolGroup
/*!
- \class SymbolGroup A symbol group storing a tree of expanded symbols rooted on a fake "locals" root element.
+ \class SymbolGroup
+ \brief The SymbolGroup class creates a symbol group storing a tree of
+ expanded symbols rooted on a fake "locals" root element.
Provides a find() method based on inames ("locals.this.i1.data") and
dump() methods used for GDBMI-format dumping and debug helpers.
@@ -533,8 +535,10 @@ AbstractSymbolGroupNode *SymbolGroup::find(const std::string &iname) const
/*!
\class LocalsSymbolGroup
+ \brief The LocalsSymbolGroup class creates a Symbol group representing the
+ Locals view.
- Symbol group representing the Locals view. It is firmly associated
+ It is firmly associated
with stack frame, function (module) and thread.
\ingroup qtcreatorcdbext
*/
@@ -624,7 +628,9 @@ std::string LocalsSymbolGroup::module() const
/*!
\class WatchesSymbolGroup
- Watch symbol group. Contains watches as added by Qt Creator as iname='watch.0',
+ \brief The WatchesSymbolGroup class creates a watch symbol group.
+
+ Contains watches as added by \QC as iname='watch.0',
name=''. The IDebugSymbolGroup is created without scope.
\ingroup qtcreatorcdbext
*/
diff --git a/src/libs/qtcreatorcdbext/symbolgroupnode.cpp b/src/libs/qtcreatorcdbext/symbolgroupnode.cpp
index 8e671e6451f..12e79b7372b 100644
--- a/src/libs/qtcreatorcdbext/symbolgroupnode.cpp
+++ b/src/libs/qtcreatorcdbext/symbolgroupnode.cpp
@@ -90,7 +90,8 @@ inline std::ostream &operator<<(std::ostream &str, const DebugNodeFlags &f)
/*!
\class AbstractSymbolGroupNode
- Abstract base class for a node of SymbolGroup providing the child list interface.
+ \brief The AbstractSymbolGroupNode class is an abstract base class for a
+ node of SymbolGroup providing the child list interface.
\ingroup qtcreatorcdbext
*/
AbstractSymbolGroupNode::AbstractSymbolGroupNode(const std::string &name,
@@ -207,7 +208,8 @@ void AbstractSymbolGroupNode::setParent(AbstractSymbolGroupNode *n)
/*! \class BaseSymbolGroupNode
- Base class for a node of SymbolGroup with a flat list of children.
+ \brief The BaseSymbolGroupNode class is the base class for a node of
+ SymbolGroup with a flat list of children.
\ingroup qtcreatorcdbext
*/
@@ -276,9 +278,11 @@ std::ostream &operator<<(std::ostream &str, const DEBUG_SYMBOL_PARAMETERS ¶m
return str;
}
-/*! \struct DumpParameters
+/*!
+ \class DumpParameters
- All parameters for GDBMI dumping of a symbol group in one struct.
+ \brief The DumpParameters class contains all parameters for GDBMI dumping
+ of a symbol group in one class.
The debugging engine passes maps of type names/inames to special
integer values indicating hex/dec, etc.
\ingroup qtcreatorcdbext
@@ -580,7 +584,8 @@ void ErrorSymbolGroupNode::debug(std::ostream &os, const std::string &visitingFu
/*! \class SymbolGroupNode
- \brief 'Real' node within a symbol group, identified by its index in IDebugSymbolGroup.
+ \brief The SymbolGroupNode class represents a \e real node within a symbol
+ group, identified by its index in IDebugSymbolGroup.
Provides accessors for fixed-up symbol group value and a dumping facility
consisting of:
@@ -1472,8 +1477,11 @@ static inline StringStringPair arrayIndexNameIname(int index)
/*! \class ReferenceSymbolGroupNode
- Artificial node referencing another (real) SymbolGroupNode (added symbol or
- symbol from within an expanded linked list structure). Forwards the
+ \brief The ReferenceSymbolGroupNode class is an artificial node referencing
+ another (real) SymbolGroupNode (added symbol or symbol from within an
+ expanded linked list structure).
+
+ Forwards the
dumping to the referenced node using its own name.
\ingroup qtcreatorcdbext */
@@ -1509,7 +1517,8 @@ void ReferenceSymbolGroupNode::debug(std::ostream &str, const std::string &visit
/*! \class MapNodeSymbolGroupNode
- \brief A [fake] map node with a fake array index and key/value entries consisting
+ \brief The MapNodeSymbolGroupNode class is a [fake] map node with a fake
+ array index and key/value entries consisting
of ReferenceSymbolGroupNode.
\ingroup qtcreatorcdbext
*/
@@ -1559,9 +1568,11 @@ void MapNodeSymbolGroupNode::debug(std::ostream &os, const std::string &visiting
/*! \class SymbolGroupNodeVisitor
- Visitor that takes care of iterating over the nodes and
- building the full iname path ('local.foo.bar') that is required for
- GDBMI dumping. The full name depends on the path on which a node was reached
+ \brief The SymbolGroupNodeVisitor class is a visitor that iterates over the
+ nodes and builds the full iname path ('local.foo.bar') that is required for
+ GDBMI dumping.
+
+ The full name depends on the path on which a node was reached
for referenced nodes (a linked list element can be reached via array index
or by expanding the whole structure).
visit() is not called for the (invisible) root node, but starting with the
@@ -1578,7 +1589,7 @@ std::string SymbolGroupNodeVisitor::parentIname(const std::string &iname)
}
/*! \class DebugSymbolGroupNodeVisitor
- \brief Debug output visitor.
+ \brief The DebugSymbolGroupNodeVisitor class is a debug output visitor.
\ingroup qtcreatorcdbext
*/
@@ -1597,7 +1608,8 @@ SymbolGroupNodeVisitor::VisitResult
}
/*! \class DebugFilterSymbolGroupNodeVisitor
- \brief Debug filtering output visitor.
+ \brief The DebugFilterSymbolGroupNodeVisitor class is a debug filtering
+ output visitor.
\ingroup qtcreatorcdbext
*/
@@ -1620,9 +1632,9 @@ SymbolGroupNodeVisitor::VisitResult
}
/*! \class DumpSymbolGroupNodeVisitor
-
- GDBMI dump output visitor used to report locals values back to the
- debugging engine. \ingroup qtcreatorcdbext
+ \brief The DumpSymbolGroupNodeVisitor class is a GDBMI dump output visitor
+ used to report locals values back to the debugging engine.
+ \ingroup qtcreatorcdbext
*/
DumpSymbolGroupNodeVisitor::DumpSymbolGroupNodeVisitor(std::ostream &os,
diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
index 66fc986e82e..2a1200a953f 100644
--- a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
+++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
@@ -47,15 +47,18 @@
typedef std::vector::size_type VectorIndexType;
-/*! \struct SymbolGroupValueContext
- \brief Structure to pass all IDebug interfaces required for SymbolGroupValue
+/*!
+ \class SymbolGroupValueContext
+ \brief The SymbolGroupValueContext class passes all IDebug interfaces
+ required for SymbolGroupValue.
\ingroup qtcreatorcdbext */
/*! \class SymbolGroupValue
- Flyweight tied to a SymbolGroupNode
+ \brief The SymbolGroupValue class is a flyweight tied to a SymbolGroupNode
providing a convenient operator[] (name, index) and value
getters for notation of dumpers.
+
Inaccessible members return a SymbolGroupValue in state 'invalid'.
Example:
\code
@@ -681,9 +684,12 @@ static inline std::string resolveQtSymbol(const char *symbolC,
return rc;
}
-/*! \struct QtInfo
+/*!
+ \class QtInfo
- Qt Information determined on demand: Namespace, modules and basic class
+ \brief The QtInfo class provides Qt information determined on demand.
+
+ Namespace, modules, and basic class
names containing the module for fast lookup.
\ingroup qtcreatorcdbext */
diff --git a/src/libs/ssh/sftpchannel.cpp b/src/libs/ssh/sftpchannel.cpp
index 3bad75df91d..94ce5578b6f 100644
--- a/src/libs/ssh/sftpchannel.cpp
+++ b/src/libs/ssh/sftpchannel.cpp
@@ -40,7 +40,7 @@
/*!
\class QSsh::SftpChannel
- \brief This class provides SFTP operations.
+ \brief The SftpChannel class provides SFTP operations.
Objects are created via SshConnection::createSftpChannel().
The channel needs to be initialized with
diff --git a/src/libs/ssh/ssh.qbs b/src/libs/ssh/ssh.qbs
index 91edc1414d3..111c96add99 100644
--- a/src/libs/ssh/ssh.qbs
+++ b/src/libs/ssh/ssh.qbs
@@ -54,13 +54,13 @@ QtcLibrary {
var result = [];
if (useSystemBotan)
result.push("botan-1.10")
- if (qbs.targetOS === "windows")
+ if (qbs.targetOS.contains("windows"))
result.push("advapi32", "user32")
- else if (qbs.targetOS === "linux")
+ else if (qbs.targetOS.contains("linux"))
result.push("rt", "dl");
- else if (qbs.targetOS === "mac")
+ else if (qbs.targetOS.contains("mac"))
result.push("dl");
- else if (qbs.targetPlatform.indexOf("unix") !== -1)
+ else if (qbs.targetOS.contains("unix"))
result.push("rt");
return result
}
@@ -74,7 +74,7 @@ QtcLibrary {
result.push("BOTAN_BUILD_COMPILER_IS_MSVC", "BOTAN_TARGET_OS_HAS_GMTIME_S")
if (qbs.toolchain === "gcc" || qbs.toolchain === "mingw")
result.push("BOTAN_BUILD_COMPILER_IS_GCC")
- if (qbs.targetOS === "linux")
+ if (qbs.targetOS.contains("linux"))
result.push("BOTAN_TARGET_OS_IS_LINUX", "BOTAN_TARGET_OS_HAS_CLOCK_GETTIME",
"BOTAN_TARGET_OS_HAS_DLOPEN", " BOTAN_TARGET_OS_HAS_GMTIME_R",
"BOTAN_TARGET_OS_HAS_POSIX_MLOCK", "BOTAN_HAS_DYNAMICALLY_LOADED_ENGINE",
@@ -82,12 +82,12 @@ QtcLibrary {
"BOTAN_HAS_ALLOC_MMAP", "BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM",
"BOTAN_HAS_ENTROPY_SRC_EGD", "BOTAN_HAS_ENTROPY_SRC_FTW",
"BOTAN_HAS_ENTROPY_SRC_UNIX", "BOTAN_HAS_MUTEX_PTHREAD", "BOTAN_HAS_PIPE_UNIXFD_IO")
- if (qbs.targetOS === "mac")
+ if (qbs.targetOS.contains("mac"))
result.push("BOTAN_TARGET_OS_IS_DARWIN", "BOTAN_TARGET_OS_HAS_GETTIMEOFDAY",
"BOTAN_HAS_ALLOC_MMAP", "BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM",
"BOTAN_HAS_ENTROPY_SRC_EGD", "BOTAN_HAS_ENTROPY_SRC_FTW",
"BOTAN_HAS_ENTROPY_SRC_UNIX", "BOTAN_HAS_MUTEX_PTHREAD", "BOTAN_HAS_PIPE_UNIXFD_IO")
- if (qbs.targetOS === "windows")
+ if (qbs.targetOS.contains("windows"))
result.push("BOTAN_TARGET_OS_IS_WINDOWS",
"BOTAN_TARGET_OS_HAS_LOADLIBRARY", "BOTAN_TARGET_OS_HAS_WIN32_GET_SYSTEMTIME",
"BOTAN_TARGET_OS_HAS_WIN32_VIRTUAL_LOCK", "BOTAN_HAS_DYNAMICALLY_LOADED_ENGINE",
diff --git a/src/libs/ssh/sshconnection.cpp b/src/libs/ssh/sshconnection.cpp
index 4ab8b778fd2..6e4fecb3187 100644
--- a/src/libs/ssh/sshconnection.cpp
+++ b/src/libs/ssh/sshconnection.cpp
@@ -51,7 +51,8 @@
/*!
\class QSsh::SshConnection
- \brief This class provides an SSH connection, implementing protocol version 2.0
+ \brief The SshConnection class provides an SSH connection, implementing
+ protocol version 2.0.
It can spawn channels for remote execution and SFTP operations (version 3).
It operates asynchronously (non-blocking) and is not thread-safe.
diff --git a/src/libs/ssh/sshremoteprocess.cpp b/src/libs/ssh/sshremoteprocess.cpp
index f3b58df76df..ec40f9c6f39 100644
--- a/src/libs/ssh/sshremoteprocess.cpp
+++ b/src/libs/ssh/sshremoteprocess.cpp
@@ -43,7 +43,8 @@
/*!
\class QSsh::SshRemoteProcess
- \brief This class implements an SSH channel for running a remote process.
+ \brief The SshRemoteProcess class implements an SSH channel for running a
+ remote process.
Objects are created via SshConnection::createRemoteProcess.
The process is started via the start() member function.
diff --git a/src/libs/ssh/sshremoteprocessrunner.cpp b/src/libs/ssh/sshremoteprocessrunner.cpp
index 768ae71ac75..159f5e9f77d 100644
--- a/src/libs/ssh/sshremoteprocessrunner.cpp
+++ b/src/libs/ssh/sshremoteprocessrunner.cpp
@@ -36,7 +36,8 @@
/*!
\class QSsh::SshRemoteProcessRunner
- \brief Convenience class for running a remote process over an SSH connection.
+ \brief The SshRemoteProcessRunner class is a convenience class for
+ running a remote process over an SSH connection.
*/
namespace QSsh {
diff --git a/src/libs/utils/basevalidatinglineedit.cpp b/src/libs/utils/basevalidatinglineedit.cpp
index b5b81fc1ed1..00d16d25586 100644
--- a/src/libs/utils/basevalidatinglineedit.cpp
+++ b/src/libs/utils/basevalidatinglineedit.cpp
@@ -40,7 +40,8 @@ enum { debug = 0 };
/*! \class Utils::BaseValidatingLineEdit
- \brief Base class for line edits that perform validation.
+ \brief The BaseValidatingLineEdit class is the base class for line edits
+ that perform validation.
Performs validation in a virtual validate() function to be implemented in
derived classes.
diff --git a/src/libs/utils/bracematcher.cpp b/src/libs/utils/bracematcher.cpp
index 297ca564a34..770c045e866 100644
--- a/src/libs/utils/bracematcher.cpp
+++ b/src/libs/utils/bracematcher.cpp
@@ -34,7 +34,8 @@
/*!
\class Utils::BraceMatcher
- \brief Generic autocompleter of braces and quotes.
+ \brief The BraceMatcher class implements a generic autocompleter of braces
+ and quotes.
This is a helper class for autocompleter implementations. To use it,
define "brace", "quote", and "delimiter" characters for given language.
diff --git a/src/libs/utils/checkablemessagebox.cpp b/src/libs/utils/checkablemessagebox.cpp
index ffed23c0cb4..5b455e19d9d 100644
--- a/src/libs/utils/checkablemessagebox.cpp
+++ b/src/libs/utils/checkablemessagebox.cpp
@@ -38,7 +38,8 @@
/*!
\class Utils::CheckableMessageBox
- \brief A messagebox suitable for questions with a
+ \brief The CheckableMessageBox class implements a message box suitable for
+ questions with a
"Do not ask me again" checkbox.
Emulates the QMessageBox API with
diff --git a/src/libs/utils/classnamevalidatinglineedit.cpp b/src/libs/utils/classnamevalidatinglineedit.cpp
index 4ebf220a7cb..6199d531bc3 100644
--- a/src/libs/utils/classnamevalidatinglineedit.cpp
+++ b/src/libs/utils/classnamevalidatinglineedit.cpp
@@ -37,7 +37,8 @@
/*!
\class Utils::ClassNameValidatingLineEdit
- \brief A Line edit that validates a C++ class name and emits a signal
+ \brief The ClassNameValidatingLineEdit class implements a line edit that
+ validates a C++ class name and emits a signal
to derive suggested file names from it.
*/
diff --git a/src/libs/utils/completingtextedit.cpp b/src/libs/utils/completingtextedit.cpp
index 316e819f7fa..f32dcbbf88d 100644
--- a/src/libs/utils/completingtextedit.cpp
+++ b/src/libs/utils/completingtextedit.cpp
@@ -41,7 +41,8 @@ static bool isEndOfWordChar(const QChar &c)
/*! \class Utils::CompletingTextEdit
- \brief A QTextEdit with auto-completion support
+ \brief The CompletingTextEdit class is a QTextEdit with auto-completion
+ support.
Excerpted from Qt examples/tools/customcompleter
*/
diff --git a/src/libs/utils/detailswidget.cpp b/src/libs/utils/detailswidget.cpp
index 91ecd22e298..32d54c18cba 100644
--- a/src/libs/utils/detailswidget.cpp
+++ b/src/libs/utils/detailswidget.cpp
@@ -41,7 +41,8 @@
/*!
\class Utils::DetailsWidget
- \brief Widget a button to expand a 'Details' area.
+ \brief The DetailsWidget class implements a button to expand a \e Details
+ area.
This widget is using a grid layout and places the items
in the following way:
diff --git a/src/libs/utils/elidinglabel.cpp b/src/libs/utils/elidinglabel.cpp
index fd01545ed73..7fda2539078 100644
--- a/src/libs/utils/elidinglabel.cpp
+++ b/src/libs/utils/elidinglabel.cpp
@@ -35,7 +35,8 @@
/*!
\class Utils::ElidingLabel
- \brief A label suitable for displaying elided text.
+ \brief The ElidingLabel class is a label suitable for displaying elided
+ text.
*/
namespace Utils {
diff --git a/src/libs/utils/faketooltip.cpp b/src/libs/utils/faketooltip.cpp
index c0f45e7e2d8..693dd33ea88 100644
--- a/src/libs/utils/faketooltip.cpp
+++ b/src/libs/utils/faketooltip.cpp
@@ -35,7 +35,7 @@
/*!
\class Utils::FakeToolTip
- \brief A widget that pretends to be a tooltip.
+ \brief The FakeToolTip class is a widget that pretends to be a tooltip.
By default it has Qt::WA_DeleteOnClose set.
*/
diff --git a/src/libs/utils/fancylineedit.cpp b/src/libs/utils/fancylineedit.cpp
index 6456af90424..489d3022ce5 100644
--- a/src/libs/utils/fancylineedit.cpp
+++ b/src/libs/utils/fancylineedit.cpp
@@ -72,7 +72,8 @@ static void execMenuAtWidget(QMenu *menu, QWidget *widget)
/*!
\class Utils::FancyLineEdit
- \brief A line edit with an embedded pixmap on one side that is connected to
+ \brief The FancyLineEdit class is a line edit with an embedded pixmap on
+ one side that is connected to
a menu.
Additionally, it can display a grayed hintText (like "Type Here to")
diff --git a/src/libs/utils/fancymainwindow.cpp b/src/libs/utils/fancymainwindow.cpp
index 6b90dce13c3..2c3dd06cf09 100644
--- a/src/libs/utils/fancymainwindow.cpp
+++ b/src/libs/utils/fancymainwindow.cpp
@@ -45,7 +45,8 @@ namespace Utils {
/*! \class Utils::FancyMainWindow
- \brief MainWindow with dock widgets and additional "lock" functionality
+ \brief The FancyMainWindow class is a MainWindow with dock widgets and
+ additional "lock" functionality
(locking the dock widgets in place) and "reset layout" functionality.
The dock actions and the additional actions should be accessible
diff --git a/src/libs/utils/fileinprojectfinder.cpp b/src/libs/utils/fileinprojectfinder.cpp
index d4fe24e6e88..fbf3d751e71 100644
--- a/src/libs/utils/fileinprojectfinder.cpp
+++ b/src/libs/utils/fileinprojectfinder.cpp
@@ -41,7 +41,8 @@ namespace Utils {
/*!
\class Utils::FileInProjectFinder
- \brief Helper class to find the 'original' file in the project directory for a given file url.
+ \brief The FileInProjectFinder class is a helper class to find the \e original
+ file in the project directory for a given file URL.
Often files are copied in the build + deploy process. findFile() searches for an existing file
in the project directory for a given file path:
diff --git a/src/libs/utils/filenamevalidatinglineedit.cpp b/src/libs/utils/filenamevalidatinglineedit.cpp
index 6fa95eac748..55752785d68 100644
--- a/src/libs/utils/filenamevalidatinglineedit.cpp
+++ b/src/libs/utils/filenamevalidatinglineedit.cpp
@@ -36,7 +36,10 @@
/*!
\class Utils::FileNameValidatingLineEdit
- \brief A control that let's the user choose a (base) file name, based on a QLineEdit. Has
+ \brief The FileNameValidatingLineEdit class is a control that lets the user
+ choose a (base) file name, based on a QLineEdit.
+
+ The class has
some validation logic for embedding into QWizardPage.
*/
diff --git a/src/libs/utils/filesystemwatcher.cpp b/src/libs/utils/filesystemwatcher.cpp
index 5d3f3540236..2811f8c249c 100644
--- a/src/libs/utils/filesystemwatcher.cpp
+++ b/src/libs/utils/filesystemwatcher.cpp
@@ -52,7 +52,8 @@ static inline quint64 getFileLimit()
/*!
\class Utils::FileSystemWatcher
- \brief File watcher that internally uses a centralized QFileSystemWatcher
+ \brief The FileSystemWatcher class is a file watcher that internally uses
+ a centralized QFileSystemWatcher
and enforces limits on Mac OS.
\section1 Design Considerations
diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp
index 06b8936e825..f39e5b47511 100644
--- a/src/libs/utils/fileutils.cpp
+++ b/src/libs/utils/fileutils.cpp
@@ -42,9 +42,9 @@ namespace Utils {
/*! \class Utils::FileUtils
- \brief File- and directory-related convenience functions.
+ \brief The FileUtils class contains file and directory related convenience
+ functions.
- File- and directory-related convenience functions.
*/
/*!
@@ -411,7 +411,7 @@ TempFileSaver::~TempFileSaver()
/*! \class Utils::FileName
- \brief A light-weight convenience class for filenames
+ \brief The FileName class is a light-weight convenience class for filenames.
On windows filenames are compared case insensitively.
*/
diff --git a/src/libs/utils/filewizarddialog.cpp b/src/libs/utils/filewizarddialog.cpp
index 72d63c38421..483fb7e400e 100644
--- a/src/libs/utils/filewizarddialog.cpp
+++ b/src/libs/utils/filewizarddialog.cpp
@@ -37,8 +37,10 @@
/*!
\class Utils::FileWizardDialog
- \brief Standard wizard for a single file letting the user choose name
- and path. Custom pages can be added via Core::IWizardExtension.
+ \brief The FileWizardDialog class is a standard wizard for a single file
+ letting the user choose name and path.
+
+ Custom pages can be added via Core::IWizardExtension.
*/
namespace Utils {
diff --git a/src/libs/utils/filewizardpage.cpp b/src/libs/utils/filewizardpage.cpp
index 5958e9de82e..0f0852076ed 100644
--- a/src/libs/utils/filewizardpage.cpp
+++ b/src/libs/utils/filewizardpage.cpp
@@ -33,7 +33,8 @@
/*!
\class Utils::FileWizardPage
- \brief Standard wizard page for a single file letting the user choose name
+ \brief The FileWizardPage class is a standard wizard page for a single file
+ letting the user choose name
and path.
The name and path labels can be changed. By default they are simply "Name:"
diff --git a/src/libs/utils/filterlineedit.cpp b/src/libs/utils/filterlineedit.cpp
index 5c61b25a6b2..a60dbe7878f 100644
--- a/src/libs/utils/filterlineedit.cpp
+++ b/src/libs/utils/filterlineedit.cpp
@@ -32,7 +32,8 @@
/*!
\class Utils::FilterLineEdit
- \brief A fancy line edit customized for filtering purposes with a clear button.
+ \brief The FilterLineEdit class is a fancy line edit customized for
+ filtering purposes with a clear button.
*/
namespace Utils {
diff --git a/src/libs/utils/headerviewstretcher.cpp b/src/libs/utils/headerviewstretcher.cpp
index 5bd975a491c..c42e3c19119 100644
--- a/src/libs/utils/headerviewstretcher.cpp
+++ b/src/libs/utils/headerviewstretcher.cpp
@@ -37,7 +37,8 @@ using namespace Utils;
/*!
\class Utils::HeaderViewStretcher
- \brief The class fixes QHeaderView to resize all columns to contents, except one
+ \brief The HeaderViewStretcher class fixes QHeaderView to resize all
+ columns to contents, except one
stretching column.
As opposed to standard QTreeWidget, all columns are
diff --git a/src/libs/utils/ipaddresslineedit.cpp b/src/libs/utils/ipaddresslineedit.cpp
index 115f276ad7a..f74a2c3e3ea 100644
--- a/src/libs/utils/ipaddresslineedit.cpp
+++ b/src/libs/utils/ipaddresslineedit.cpp
@@ -34,7 +34,8 @@
/*!
\class Utils::IpAddressLineEdit
- \brief A QLineEdit widget that validates the IP address inserted.
+ \brief The IpAddressLineEdit class is a QLineEdit widget that validates the
+ IP address inserted.
The valid address example is 192.168.1.12 or 192.168.1.12:8080.
*/
diff --git a/src/libs/utils/linecolumnlabel.cpp b/src/libs/utils/linecolumnlabel.cpp
index cb0eb66146f..50049b5573c 100644
--- a/src/libs/utils/linecolumnlabel.cpp
+++ b/src/libs/utils/linecolumnlabel.cpp
@@ -34,7 +34,8 @@
/*!
\class Utils::LineColumnLabel
- \brief A label suitable for displaying cursor positions, etc. with a fixed
+ \brief The LineColumnLabel class is a label suitable for displaying cursor
+ positions, and so on, with a fixed
width derived from a sample text.
*/
diff --git a/src/libs/utils/navigationtreeview.cpp b/src/libs/utils/navigationtreeview.cpp
index b98849b91a9..cdf6d3b4d69 100644
--- a/src/libs/utils/navigationtreeview.cpp
+++ b/src/libs/utils/navigationtreeview.cpp
@@ -39,7 +39,8 @@
/*!
\class Utils::NavigationTreeView
- \brief General TreeView for any Side Bar widget.
+ \brief The NavigationTreeView class implements a general TreeView for any
+ sidebar widget.
Common initialization etc, e.g. Mac specific behaviour.
\sa Core::NavigationView, Core::INavigationWidgetFactory
diff --git a/src/libs/utils/networkaccessmanager.cpp b/src/libs/utils/networkaccessmanager.cpp
index 8915275fe3e..68f48420dff 100644
--- a/src/libs/utils/networkaccessmanager.cpp
+++ b/src/libs/utils/networkaccessmanager.cpp
@@ -40,7 +40,8 @@
/*!
\class Utils::NetworkManager
- \brief Network Access Manager for use with Qt Creator.
+ \brief The NetworkManager class provides a network access manager for use
+ with \QC.
Common initialization, Qt Creator User Agent
diff --git a/src/libs/utils/newclasswidget.cpp b/src/libs/utils/newclasswidget.cpp
index 46b4892463e..df048c65256 100644
--- a/src/libs/utils/newclasswidget.cpp
+++ b/src/libs/utils/newclasswidget.cpp
@@ -39,9 +39,9 @@ enum { debugNewClassWidget = 0 };
/*! \class Utils::NewClassWidget
- \brief Utility widget for 'New Class' wizards
+ \brief The NewClassWidget class is a utility widget for 'New Class' wizards.
- Utility widget for 'New Class' wizards. Prompts the user
+ This widget prompts the user
to enter a class name (optionally derived from some base class) and file
names for header, source and form files. Has some smart logic to derive
the file names from the class name. */
diff --git a/src/libs/utils/parameteraction.cpp b/src/libs/utils/parameteraction.cpp
index 1d44a2fc390..96a51cc0ebd 100644
--- a/src/libs/utils/parameteraction.cpp
+++ b/src/libs/utils/parameteraction.cpp
@@ -32,7 +32,7 @@
/*!
\class Utils::ParameterAction
- \brief Intended for actions that act on a 'current',
+ \brief The ParameterAction class is intended for actions that act on a 'current',
string-type parameter (typically a file name), for example 'Save file %1'.
The action has 2 states:
diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp
index 2464e7df038..ea60dd770d5 100644
--- a/src/libs/utils/pathchooser.cpp
+++ b/src/libs/utils/pathchooser.cpp
@@ -46,7 +46,8 @@
/*!
\class Utils::PathChooser
- \brief A control that let's the user choose a path, consisting of a QLineEdit and
+ \brief The PathChooser class is a control that lets the user choose a path,
+ consisting of a QLineEdit and
a "Browse" button.
Has some validation logic for embedding into QWizardPage.
diff --git a/src/libs/utils/pathlisteditor.cpp b/src/libs/utils/pathlisteditor.cpp
index 7bd9c70010c..f213afda178 100644
--- a/src/libs/utils/pathlisteditor.cpp
+++ b/src/libs/utils/pathlisteditor.cpp
@@ -46,7 +46,8 @@
/*!
\class Utils::PathListEditor
- \brief A control that let's the user edit a list of (directory) paths
+ \brief The PathListEditor class is a control that lets the user edit a list
+ of (directory) paths
using the platform separator (';',':').
Typically used for
diff --git a/src/libs/utils/persistentsettings.cpp b/src/libs/utils/persistentsettings.cpp
index 2acf1927d9b..40608803248 100644
--- a/src/libs/utils/persistentsettings.cpp
+++ b/src/libs/utils/persistentsettings.cpp
@@ -43,7 +43,8 @@
/*!
\class Utils::PersistentSettingsReader
- \brief Reads a QVariantMap of arbitrary, nested data structures from a XML file.
+ \brief The PersistentSettingsReader class reads a QVariantMap of arbitrary,
+ nested data structures from an XML file.
Handles all string-serializable simple types and QVariantList and QVariantMap. Example:
\code
@@ -321,7 +322,8 @@ bool PersistentSettingsReader::load(const Utils::FileName &fileName)
/*!
\class Utils::PersistentSettingsWriter
- \brief Serializes a QVariantMap of arbitrary, nested data structures to a XML file.
+ \brief The PersistentSettingsWriter class serializes a QVariantMap of
+ arbitrary, nested data structures to an XML file.
\sa Utils::PersistentSettingsReader
*/
diff --git a/src/libs/utils/process_ctrlc_stub.qbs b/src/libs/utils/process_ctrlc_stub.qbs
index ea4319ae4ee..141b04e9f3b 100644
--- a/src/libs/utils/process_ctrlc_stub.qbs
+++ b/src/libs/utils/process_ctrlc_stub.qbs
@@ -4,7 +4,7 @@ import "../../tools/QtcTool.qbs" as QtcTool
QtcTool {
name: "qtcreator_ctrlc_stub"
consoleApplication: true
- condition: qbs.targetOS == "windows"
+ condition: qbs.targetOS.contains("windows")
files: [ "process_ctrlc_stub.cpp" ]
diff --git a/src/libs/utils/process_stub.qbs b/src/libs/utils/process_stub.qbs
index 9682edd281e..f0da7336b20 100644
--- a/src/libs/utils/process_stub.qbs
+++ b/src/libs/utils/process_stub.qbs
@@ -7,7 +7,7 @@ QtcTool {
files: {
- if (qbs.targetOS == "windows") {
+ if (qbs.targetOS.contains("windows")) {
return [ "process_stub_win.c" ]
} else {
return [ "process_stub_unix.c" ]
@@ -15,7 +15,7 @@ QtcTool {
}
cpp.dynamicLibraries: {
- if (qbs.targetOS == "windows") {
+ if (qbs.targetOS.contains("windows")) {
return [ "shell32" ]
}
}
diff --git a/src/libs/utils/projectintropage.cpp b/src/libs/utils/projectintropage.cpp
index 5755d0b2513..2e02f04cfaa 100644
--- a/src/libs/utils/projectintropage.cpp
+++ b/src/libs/utils/projectintropage.cpp
@@ -35,7 +35,8 @@
/*!
\class Utils::ProjectIntroPage
- \brief Standard wizard page for a project, letting the user choose name
+ \brief The ProjectIntroPage class is the standard wizard page for a project,
+ letting the user choose its name
and path.
Looks similar to FileWizardPage, but provides additional
diff --git a/src/libs/utils/qtcprocess.cpp b/src/libs/utils/qtcprocess.cpp
index 11da30f822f..1666d28318e 100644
--- a/src/libs/utils/qtcprocess.cpp
+++ b/src/libs/utils/qtcprocess.cpp
@@ -45,7 +45,8 @@ using namespace Utils;
/*!
\class Utils::QtcProcess
- \brief This class provides functionality for dealing with shell-quoted process arguments.
+ \brief The QtcProcess class provides functionality for dealing with
+ shell-quoted process arguments.
*/
#ifdef Q_OS_WIN
diff --git a/src/libs/utils/statuslabel.cpp b/src/libs/utils/statuslabel.cpp
index 5a7a25f5147..ed8646ed325 100644
--- a/src/libs/utils/statuslabel.cpp
+++ b/src/libs/utils/statuslabel.cpp
@@ -34,7 +34,7 @@
/*!
\class Utils::StatusLabel
- \brief A status label that displays messages for a while with a timeout.
+ \brief The StatusLabel class displays messages for a while with a timeout.
*/
namespace Utils {
diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp
index 1d68bc41d74..d744e28f985 100644
--- a/src/libs/utils/synchronousprocess.cpp
+++ b/src/libs/utils/synchronousprocess.cpp
@@ -48,8 +48,8 @@
/*!
\class Utils::SynchronousProcess
- \brief Runs a synchronous process in its own event loop
- that blocks only user input events. Thus, it allows for the gui to
+ \brief The SynchronousProcess class runs a synchronous process in its own
+ event loop that blocks only user input events. Thus, it allows for the GUI to
repaint and append output to log windows.
The stdOut(), stdErr() signals are emitted unbuffered as the process
diff --git a/src/libs/utils/tcpportsgatherer.cpp b/src/libs/utils/tcpportsgatherer.cpp
index 84eea9e5965..0f56da91e64 100644
--- a/src/libs/utils/tcpportsgatherer.cpp
+++ b/src/libs/utils/tcpportsgatherer.cpp
@@ -247,7 +247,8 @@ void TcpPortsGathererPrivate::updateNetstat()
/*!
\class Utils::TcpPortsGatherer
- \brief Gather the list of local TCP ports already in use.
+ \brief The TcpPortsGatherer class gathers the list of local TCP ports
+ already in use.
Query the system for the list of local TCP ports already in use. This information can be used
to select a port for use in a range.
diff --git a/src/libs/utils/textfileformat.cpp b/src/libs/utils/textfileformat.cpp
index 62f22bb964e..df657b7803b 100644
--- a/src/libs/utils/textfileformat.cpp
+++ b/src/libs/utils/textfileformat.cpp
@@ -58,7 +58,8 @@ QDebug operator<<(QDebug d, const TextFileFormat &format)
/*!
\class Utils::TextFileFormat
- \brief Describes the format of a text file and provides autodetection.
+ \brief The TextFileFormat class describes the format of a text file and
+ provides autodetection.
The format comprises
\list
diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs
index 347dbc7edb0..952664d4c73 100644
--- a/src/libs/utils/utils.qbs
+++ b/src/libs/utils/utils.qbs
@@ -7,7 +7,7 @@ QtcLibrary {
cpp.defines: base.concat("QTCREATOR_UTILS_LIB")
Properties {
- condition: qbs.targetOS == "windows"
+ condition: qbs.targetOS.contains("windows")
cpp.dynamicLibraries: [
"user32",
"iphlpapi",
@@ -15,7 +15,7 @@ QtcLibrary {
]
}
Properties {
- condition: qbs.targetPlatform.indexOf("unix") != -1 && qbs.targetOS != "mac"
+ condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("mac")
cpp.dynamicLibraries: ["X11"]
}
@@ -197,7 +197,7 @@ QtcLibrary {
Group {
name: "WindowsUtils"
- condition: qbs.targetOS == "windows"
+ condition: qbs.targetOS.contains("windows")
files: [
"consoleprocess_win.cpp",
"winutils.cpp",
@@ -207,7 +207,7 @@ QtcLibrary {
Group {
name: "ConsoleProcess_unix"
- condition: qbs.targetPlatform.indexOf("unix") != -1
+ condition: qbs.targetOS.contains("unix")
files: [
"consoleprocess_unix.cpp",
]
diff --git a/src/libs/utils/wizard.cpp b/src/libs/utils/wizard.cpp
index 860c69e78f2..743c628de9b 100644
--- a/src/libs/utils/wizard.cpp
+++ b/src/libs/utils/wizard.cpp
@@ -38,7 +38,7 @@
/*! \class Utils::Wizard
- \brief A wizard with a progress bar on the left.
+ \brief The Wizard class implements a wizard with a progress bar on the left.
Informs the user about the progress.
*/
diff --git a/src/libs/zeroconf/servicebrowser.cpp b/src/libs/zeroconf/servicebrowser.cpp
index b1e8eebfb50..f41a3f3bbbe 100644
--- a/src/libs/zeroconf/servicebrowser.cpp
+++ b/src/libs/zeroconf/servicebrowser.cpp
@@ -68,7 +68,8 @@ typedef long suseconds_t;
/*!
\namespace ZeroConf
- \brief namespace for zeroconf (Bonjour/DNS-SD) functionality, currently mostly for browsing services.
+ \brief The ZeroConf namespace provides zeroconf (Bonjour/DNS-SD)
+ functionality, currently mostly for browsing services.
*/
namespace { // anonymous namespace for free functions
@@ -220,9 +221,8 @@ int gQuickStop = 0;
/*!
\class ZeroConf::ErrorMessage
- \brief class representing an error message
+ \brief The ErrorMessage class represents an error message.
- very simple class representing an error message
*/
/// empty constructor (required by qRegisterMetaType)
@@ -258,7 +258,7 @@ QDebug operator<<(QDebug dbg, const ErrorMessage &eMsg)
/*!
\class ZeroConf::Service
- \brief class representing a zeroconf service
+ \brief The Service class represents a zeroconf service.
Instances of this class are basically constant, but can be outdated. They are normally accessed
through a Shared pointer.
@@ -448,7 +448,8 @@ QDebug operator<<(QDebug dbg, const Service::ConstPtr &service){
/*!
\class ZeroConf::ServiceBrowser
- \brief class that browses (searches) for a given zeronconf service
+ \brief The ServiceBrowser class browses (searches) for a given zeronconf
+ service.
The actual browsing starts only when startBrowsing() is called. If you want to receive all service
changes connect before starting browsing.
diff --git a/src/libs/zeroconf/zeroconf.qbs b/src/libs/zeroconf/zeroconf.qbs
index 2b19a6599e4..02cc7f85623 100644
--- a/src/libs/zeroconf/zeroconf.qbs
+++ b/src/libs/zeroconf/zeroconf.qbs
@@ -10,7 +10,7 @@ QtcLibrary {
cpp.defines: {
var list = base;
list.push("ZEROCONF_LIBRARY");
- if (qbs.targetOS === "linux") {
+ if (qbs.targetOS.contains("linux")) {
list.push(
"_GNU_SOURCE",
"HAVE_IPV6",
@@ -23,7 +23,7 @@ QtcLibrary {
}
Properties {
- condition: qbs.targetOS == "windows"
+ condition: qbs.targetOS.contains("windows")
cpp.dynamicLibraries: "ws2_32"
}
diff --git a/src/plugins/QtcPlugin.qbs b/src/plugins/QtcPlugin.qbs
index 7c530eb4fa4..d3476a68b3f 100644
--- a/src/plugins/QtcPlugin.qbs
+++ b/src/plugins/QtcPlugin.qbs
@@ -30,7 +30,7 @@ Product {
cpp.defines: Defaults.defines(qbs).concat([name.toUpperCase() + "_LIBRARY"])
cpp.installNamePrefix: "@rpath/PlugIns/" + provider + "/"
- cpp.rpaths: qbs.targetOS == "mac" ? ["@loader_path/../..", "@executable_path/.."]
+ cpp.rpaths: qbs.targetOS.contains("mac") ? ["@loader_path/../..", "@executable_path/.."]
: ["$ORIGIN", "$ORIGIN/..", "$ORIGIN/../.."]
cpp.linkerFlags: {
if (qbs.buildVariant == "release" && (qbs.toolchain == "gcc" || qbs.toolchain == "mingw"))
diff --git a/src/plugins/android/androiddeploystep.cpp b/src/plugins/android/androiddeploystep.cpp
index c11ced5f1e4..04eeb91f023 100644
--- a/src/plugins/android/androiddeploystep.cpp
+++ b/src/plugins/android/androiddeploystep.cpp
@@ -83,9 +83,14 @@ void AndroidDeployStep::ctor()
setDefaultDisplayName(tr("Deploy to Android device"));
m_deployAction = NoDeploy;
- if (QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(target()->kit()))
- if (qt->qtVersion() >= QtSupport::QtVersionNumber(5, 0, 0))
- m_deployAction = BundleLibraries;
+ QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(target()->kit());
+ m_bundleQtAvailable = qt && qt->qtVersion() >= QtSupport::QtVersionNumber(5, 0, 0);
+ if (m_bundleQtAvailable)
+ m_deployAction = BundleLibraries;
+
+
+ connect(ProjectExplorer::KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SLOT(kitUpdated(ProjectExplorer::Kit *)));
}
bool AndroidDeployStep::init()
@@ -157,6 +162,14 @@ bool AndroidDeployStep::fromMap(const QVariantMap &map)
if (m_deployAction == InstallQASI)
m_deployAction = NoDeploy;
+ QtSupport::BaseQtVersion *qtVersion
+ = QtSupport::QtKitInformation::qtVersion(target()->kit());
+ if (m_deployAction == BundleLibraries)
+ if (!qtVersion || qtVersion->qtVersion() < QtSupport::QtVersionNumber(5, 0, 0))
+ m_deployAction = NoDeploy; // the kit changed to a non qt5 kit
+
+ m_bundleQtAvailable = qtVersion && qtVersion->qtVersion() >= QtSupport::QtVersionNumber(5, 0, 0);
+
return ProjectExplorer::BuildStep::fromMap(map);
}
@@ -201,6 +214,24 @@ void AndroidDeployStep::processFinished()
process->deleteLater();
}
+void AndroidDeployStep::kitUpdated(Kit *kit)
+{
+ if (kit != target()->kit())
+ return;
+ QtSupport::BaseQtVersion *qtVersion
+ = QtSupport::QtKitInformation::qtVersion(target()->kit());
+
+ bool newBundleQtAvailable = qtVersion && qtVersion->qtVersion() >= QtSupport::QtVersionNumber(5, 0, 0);
+ if (m_bundleQtAvailable != newBundleQtAvailable) {
+ m_bundleQtAvailable = newBundleQtAvailable;
+
+ if (!m_bundleQtAvailable && m_deployAction == BundleLibraries)
+ m_deployAction = NoDeploy; // the kit changed to a non qt5 kit
+
+ emit deployOptionsChanged();
+ }
+}
+
void AndroidDeployStep::installQASIPackage(const QString &packagePath)
{
const QString targetArch = AndroidManager::targetArch(target());
@@ -226,6 +257,11 @@ void AndroidDeployStep::installQASIPackage(const QString &packagePath)
delete process;
}
+bool AndroidDeployStep::bundleQtOptionAvailable()
+{
+ return m_bundleQtAvailable;
+}
+
void AndroidDeployStep::setDeployAction(AndroidDeployStep::AndroidDeployAction deploy)
{
m_deployAction = deploy;
diff --git a/src/plugins/android/androiddeploystep.h b/src/plugins/android/androiddeploystep.h
index ad922c46e1d..6725020a853 100644
--- a/src/plugins/android/androiddeploystep.h
+++ b/src/plugins/android/androiddeploystep.h
@@ -96,6 +96,7 @@ public:
void cleanLibsOnDevice();
void installQASIPackage(const QString &packagePath);
+ bool bundleQtOptionAvailable();
public slots:
void setDeployAction(AndroidDeployAction deploy);
@@ -103,12 +104,14 @@ public slots:
signals:
void done();
void error();
+ void deployOptionsChanged();
private slots:
bool deployPackage();
void handleBuildOutput();
void handleBuildError();
void processFinished();
+ void kitUpdated(ProjectExplorer::Kit *kit);
private:
AndroidDeployStep(ProjectExplorer::BuildStepList *bc,
@@ -151,6 +154,7 @@ private:
AndroidDeployAction m_runDeployAction;
QString m_ndkToolChainVersion;
QString m_libgnustl;
+ bool m_bundleQtAvailable;
static const Core::Id Id;
};
diff --git a/src/plugins/android/androiddeploystepwidget.cpp b/src/plugins/android/androiddeploystepwidget.cpp
index 482051342cd..93140abf3c2 100644
--- a/src/plugins/android/androiddeploystepwidget.cpp
+++ b/src/plugins/android/androiddeploystepwidget.cpp
@@ -47,6 +47,21 @@ AndroidDeployStepWidget::AndroidDeployStepWidget(AndroidDeployStep *step) :
{
ui->setupUi(this);
+ deployOptionsChanged();
+
+ connect(ui->ministroOption, SIGNAL(clicked()), SLOT(setMinistro()));
+ connect(ui->temporaryQtOption, SIGNAL(clicked()), SLOT(setDeployLocalQtLibs()));
+ connect(ui->bundleQtOption, SIGNAL(clicked()), SLOT(setBundleQtLibs()));
+
+ connect(ui->chooseButton, SIGNAL(clicked()), SLOT(setQASIPackagePath()));
+ connect(ui->cleanLibsPushButton, SIGNAL(clicked()), SLOT(cleanLibsOnDevice()));
+
+ connect(m_step, SIGNAL(deployOptionsChanged()),
+ this, SLOT(deployOptionsChanged()));
+}
+
+void AndroidDeployStepWidget::deployOptionsChanged()
+{
switch (m_step->deployAction()) {
case AndroidDeployStep::NoDeploy:
ui->ministroOption->setChecked(true);
@@ -62,12 +77,7 @@ AndroidDeployStepWidget::AndroidDeployStepWidget(AndroidDeployStep *step) :
break;
}
- connect(ui->ministroOption, SIGNAL(clicked()), SLOT(setMinistro()));
- connect(ui->temporaryQtOption, SIGNAL(clicked()), SLOT(setDeployLocalQtLibs()));
- connect(ui->bundleQtOption, SIGNAL(clicked()), SLOT(setBundleQtLibs()));
-
- connect(ui->chooseButton, SIGNAL(clicked()), SLOT(setQASIPackagePath()));
- connect(ui->cleanLibsPushButton, SIGNAL(clicked()), SLOT(cleanLibsOnDevice()));
+ ui->bundleQtOption->setVisible(m_step->bundleQtOptionAvailable());
}
AndroidDeployStepWidget::~AndroidDeployStepWidget()
diff --git a/src/plugins/android/androiddeploystepwidget.h b/src/plugins/android/androiddeploystepwidget.h
index 8c05d0aa629..94bea1c6dee 100644
--- a/src/plugins/android/androiddeploystepwidget.h
+++ b/src/plugins/android/androiddeploystepwidget.h
@@ -56,6 +56,7 @@ private slots:
void setQASIPackagePath();
void cleanLibsOnDevice();
+ void deployOptionsChanged();
private:
virtual QString summaryText() const;
virtual QString displayName() const;
diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp
index a005e10fde6..ef467d2bca3 100644
--- a/src/plugins/android/androidrunner.cpp
+++ b/src/plugins/android/androidrunner.cpp
@@ -101,6 +101,8 @@ AndroidRunner::AndroidRunner(QObject *parent,
QByteArray which = psProc.readAll();
m_isBusyBox = which.startsWith("busybox");
+ m_checkPIDTimer.setInterval(1000);
+
connect(&m_adbLogcatProcess, SIGNAL(readyReadStandardOutput()), SLOT(logcatReadStandardOutput()));
connect(&m_adbLogcatProcess, SIGNAL(readyReadStandardError()), SLOT(logcatReadStandardError()));
connect(&m_checkPIDTimer, SIGNAL(timeout()), SLOT(checkPID()));
@@ -154,8 +156,10 @@ void AndroidRunner::checkPID()
return;
QByteArray psOut = runPs();
m_processPID = extractPid(m_packageName, psOut);
- if (m_processPID == -1)
+ if (m_processPID == -1) {
+ m_checkPIDTimer.stop();
emit remoteProcessFinished(tr("\n\n'%1' died.").arg(m_packageName));
+ }
}
void AndroidRunner::forceStop()
@@ -186,7 +190,6 @@ void AndroidRunner::start()
{
m_adbLogcatProcess.start(m_adb, selector() << _("logcat"));
m_wasStarted = false;
- m_checkPIDTimer.start(1000); // check if the application is alive every 1 seconds
QtConcurrent::run(this, &AndroidRunner::asyncStart);
}
@@ -300,6 +303,8 @@ void AndroidRunner::asyncStart()
return;
}
+ QMetaObject::invokeMethod(&m_checkPIDTimer, "start");
+
m_wasStarted = true;
if (m_useCppDebugger) {
// This will be funneled to the engine to actually start and attach
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
index 0c1b52993fa..82f5c6c9fde 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
@@ -433,7 +433,8 @@ void AutotoolsProject::updateCppCodeModel()
pinfo.appendProjectPart(part);
modelManager->updateProjectInfo(pinfo);
- modelManager->updateSourceFiles(m_files);
+ modelManager->updateSourceFiles(m_files,
+ CppTools::CppModelManagerInterface::ForcedProgressNotification);
setProjectLanguage(ProjectExplorer::Constants::LANG_CXX, !part->files.isEmpty());
}
diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp
index dbfd7e219e4..3998c3d2e3a 100644
--- a/src/plugins/bineditor/bineditorplugin.cpp
+++ b/src/plugins/bineditor/bineditorplugin.cpp
@@ -302,9 +302,9 @@ public:
emit changed();
} else {
emit aboutToReload();
- if (!open(errorString, m_fileName))
- return false;
- emit reloaded();
+ const bool success = open(errorString, m_fileName);
+ emit reloadFinished(success);
+ return success;
}
return true;
}
@@ -428,7 +428,8 @@ QStringList BinEditorFactory::mimeTypes() const
/*!
\class BINEditor::BinEditorWidgetFactory
- \brief Service registered with PluginManager to create bin editor widgets for plugins
+ \brief The BinEditorWidgetFactory class offers a service registered with
+ PluginManager to create bin editor widgets for plugins
without direct linkage.
\sa ExtensionSystem::PluginManager::getObjectByClassName, ExtensionSystem::invoke
diff --git a/src/plugins/clearcase/clearcase.qbs b/src/plugins/clearcase/clearcase.qbs
index 2264d7d47ca..4893f59ef2d 100644
--- a/src/plugins/clearcase/clearcase.qbs
+++ b/src/plugins/clearcase/clearcase.qbs
@@ -6,7 +6,7 @@ QtcPlugin {
name: "ClearCase"
// provider: "AudioCodes"
- condition: qbs.targetOS != "mac"
+ condition: !qbs.targetOS.contains("mac")
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index d69441c434e..fa278b2a1d6 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -391,7 +391,8 @@ bool CMakeProject::parseCMakeLists()
pinfo.appendProjectPart(part);
modelmanager->updateProjectInfo(pinfo);
m_codeModelFuture.cancel();
- m_codeModelFuture = modelmanager->updateSourceFiles(m_files);
+ m_codeModelFuture = modelmanager->updateSourceFiles(m_files,
+ CppTools::CppModelManagerInterface::ForcedProgressNotification);
setProjectLanguage(ProjectExplorer::Constants::LANG_CXX, !part->files.isEmpty());
}
@@ -1011,6 +1012,8 @@ void CMakeBuildSettingsWidget::openChangeBuildDirectoryDialog()
void CMakeBuildSettingsWidget::runCMake()
{
+ if (!ProjectExplorer::ProjectExplorerPlugin::instance()->saveModifiedFiles())
+ return;
CMakeProject *project = static_cast(m_buildConfiguration->target()->project());
CMakeOpenProjectWizard copw(project->projectManager(),
CMakeOpenProjectWizard::WantToUpdate,
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
index 63f13f62f92..910d027ab8f 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
@@ -115,6 +115,9 @@ void CMakeManager::runCMake(ProjectExplorer::Project *project)
if (!cmakeProject || !cmakeProject->activeTarget() || !cmakeProject->activeTarget()->activeBuildConfiguration())
return;
+ if (!ProjectExplorer::ProjectExplorerPlugin::instance()->saveModifiedFiles())
+ return;
+
CMakeBuildConfiguration *bc
= static_cast(cmakeProject->activeTarget()->activeBuildConfiguration());
diff --git a/src/plugins/coreplugin/actionmanager/actionmanager.cpp b/src/plugins/coreplugin/actionmanager/actionmanager.cpp
index b9d11a1f562..d4ed4f78404 100644
--- a/src/plugins/coreplugin/actionmanager/actionmanager.cpp
+++ b/src/plugins/coreplugin/actionmanager/actionmanager.cpp
@@ -55,7 +55,7 @@ using namespace Core::Internal;
\class Core::ActionManager
\mainclass
- \brief The action manager is responsible for registration of menus and
+ \brief The ActionManager class is responsible for registration of menus and
menu items and keyboard shortcuts.
The ActionManager is the central bookkeeper of actions and their shortcuts and layout.
diff --git a/src/plugins/coreplugin/actionmanager/commandbutton.cpp b/src/plugins/coreplugin/actionmanager/commandbutton.cpp
index 7176751112a..7f5917aa8b4 100644
--- a/src/plugins/coreplugin/actionmanager/commandbutton.cpp
+++ b/src/plugins/coreplugin/actionmanager/commandbutton.cpp
@@ -37,7 +37,8 @@ using namespace Core;
/*!
\class Core::CommandButton
- \brief A tool button associated with one of registered Command objects.
+ \brief The CommandButton class is a tool button associated with one of
+ the registered Command objects.
Tooltip of this button consists of toolTipBase property value and Command's
key sequence which is automatically updated when user changes it.
diff --git a/src/plugins/coreplugin/basefilewizard.cpp b/src/plugins/coreplugin/basefilewizard.cpp
index 9b4750fd1ee..d8c927455cc 100644
--- a/src/plugins/coreplugin/basefilewizard.cpp
+++ b/src/plugins/coreplugin/basefilewizard.cpp
@@ -100,8 +100,9 @@ void BaseFileWizardParameterData::clear()
/*!
\class Core::BaseFileWizardParameters
- \brief Parameter class for passing parameters to instances of class Wizard
- containing name, icon and such.
+ \brief The BaseFileWizardParameters class is a parameter class for
+ passing parameters to instances of the class Wizard containing name, icon,
+ and so on.
\sa Core::GeneratedFile, Core::BaseFileWizard, Core::StandardFileWizard
\sa Core::Internal::WizardEventLoop
@@ -341,7 +342,8 @@ void WizardEventLoop::rejected()
/*!
\class Core::BaseFileWizard
- \brief A generic wizard for creating files.
+ \brief The BaseFileWizard class implements a generic wizard for
+ creating files.
The abstract methods:
\list
@@ -780,7 +782,8 @@ QString BaseFileWizard::preferredSuffix(const QString &mimeType)
/*!
\class Core::StandardFileWizard
- \brief Convenience class for creating one file.
+ \brief The StandardFileWizard class is a convenience class for
+ creating one file.
It uses Utils::FileWizardDialog and introduces a new virtual to generate the
files from path and name.
diff --git a/src/plugins/coreplugin/core.qrc b/src/plugins/coreplugin/core.qrc
index 82727a3a80a..abe566a13a7 100644
--- a/src/plugins/coreplugin/core.qrc
+++ b/src/plugins/coreplugin/core.qrc
@@ -36,6 +36,7 @@
images/replace.pngimages/reset.pngimages/sidebaricon.png
+ images/topbaricon.pngimages/splitbutton_horizontal.pngimages/statusbar.pngimages/undo.png
diff --git a/src/plugins/coreplugin/coreconstants.h b/src/plugins/coreplugin/coreconstants.h
index db0b96591fa..85f219b9870 100644
--- a/src/plugins/coreplugin/coreconstants.h
+++ b/src/plugins/coreplugin/coreconstants.h
@@ -194,6 +194,7 @@ const char ICON_CLEAR[] = ":/core/images/clear.png";
const char ICON_RESET[] = ":/core/images/reset.png";
const char ICON_MAGNIFIER[] = ":/core/images/magnifier.png";
const char ICON_TOGGLE_SIDEBAR[] = ":/core/images/sidebaricon.png";
+const char ICON_TOGGLE_TOPBAR[] = ":/core/images/topbaricon.png";
const char ICON_CLOSE_DOCUMENT[] = ":/core/images/button_close.png";
const char ICON_CLOSE[] = ":/core/images/closebutton.png";
const char ICON_CLOSE_DARK[] = ":/core/images/darkclosebutton.png";
diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs
index d85541e1d0b..84a66d5bde8 100644
--- a/src/plugins/coreplugin/coreplugin.qbs
+++ b/src/plugins/coreplugin/coreplugin.qbs
@@ -25,13 +25,13 @@ QtcPlugin {
])
cpp.dynamicLibraries: {
- if (qbs.targetOS == "windows") return [
+ if (qbs.targetOS.contains("windows")) return [
"ole32",
"user32"
]
}
- cpp.frameworks: qbs.targetOS === "mac" ? ["AppKit"] : undefined
+ cpp.frameworks: qbs.targetOS.contains("mac") ? ["AppKit"] : undefined
files: [
"basefilewizard.cpp",
@@ -233,7 +233,7 @@ QtcPlugin {
Group {
name: "ProgressManager_win"
- condition: qbs.targetOS == "windows"
+ condition: qbs.targetOS.contains("windows")
files: [
"progressmanager/progressmanager_win.cpp",
]
@@ -241,7 +241,7 @@ QtcPlugin {
Group {
name: "ProgressManager_mac"
- condition: qbs.targetOS == "mac"
+ condition: qbs.targetOS.contains("mac")
files: [
"macfullscreen.h",
"macfullscreen.mm",
@@ -251,7 +251,7 @@ QtcPlugin {
Group {
name: "ProgressManager_x11"
- condition: qbs.targetPlatform.indexOf("unix") != -1 && qbs.targetOS != "mac"
+ condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("mac")
files: [
"progressmanager/progressmanager_x11.cpp",
]
diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.cpp b/src/plugins/coreplugin/dialogs/ioptionspage.cpp
index db3b8006ca6..34f1de78a2f 100644
--- a/src/plugins/coreplugin/dialogs/ioptionspage.cpp
+++ b/src/plugins/coreplugin/dialogs/ioptionspage.cpp
@@ -32,7 +32,8 @@
/*!
\class Core::IOptionsPage
\mainclass
- \brief The IOptionsPage is an interface for providing options pages.
+ \brief The IOptionsPage class is an interface for providing pages for the
+ \gui Options dialog (called \gui Preferences on Mac OS).
You need to subclass this interface and put an instance of your subclass
into the plugin manager object pool (e.g. ExtensionSystem::PluginManager::addObject).
diff --git a/src/plugins/coreplugin/dialogs/promptoverwritedialog.cpp b/src/plugins/coreplugin/dialogs/promptoverwritedialog.cpp
index 9ec8fd9f3d5..bdde354b967 100644
--- a/src/plugins/coreplugin/dialogs/promptoverwritedialog.cpp
+++ b/src/plugins/coreplugin/dialogs/promptoverwritedialog.cpp
@@ -44,9 +44,11 @@ enum { FileNameRole = Qt::UserRole + 1 };
/*!
\class Core::Internal::PromptOverwriteDialog
- \brief Prompts the user to overwrite a list of files, which he can check.
+ \brief The PromptOverwriteDialog class implements a dialog that asks
+ users whether they want to overwrite files.
- Displays the common folder and the files in a checkable list.
+ The dialog displays the common folder and the files in a list where users
+ can select the files to overwrite.
*/
static inline QString fileNameOfItem(const QStandardItem *item)
diff --git a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp
index 66d86e973ae..18d1e0f10f8 100644
--- a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp
@@ -106,7 +106,8 @@ ReadOnlyFilesDialogPrivate::~ReadOnlyFilesDialogPrivate()
/*!
* \class ReadOnlyFilesDialog
- * \brief Dialog to show a set of files which are classified as not writable.
+ * \brief The ReadOnlyFilesDialog class implements a dialog to show a set of
+ * files that are classified as not writable.
*
* Automatically checks which operations are allowed to make the file writable. These operations
* are Make Writable which tries to set the file permissions in the file system,
diff --git a/src/plugins/coreplugin/documentmanager.cpp b/src/plugins/coreplugin/documentmanager.cpp
index 03628535986..4f10f514301 100644
--- a/src/plugins/coreplugin/documentmanager.cpp
+++ b/src/plugins/coreplugin/documentmanager.cpp
@@ -52,7 +52,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -65,7 +64,7 @@
\class Core::DocumentManager
\mainclass
\inheaderfile documentmanager.h
- \brief Manages a set of IDocument objects.
+ \brief The DocumentManager class manages a set of IDocument objects.
The DocumentManager service monitors a set of IDocument's. Plugins should register
files they work with at the service. The files the IDocument's point to will be
@@ -157,7 +156,6 @@ struct DocumentManagerPrivate
QString m_projectsDirectory;
bool m_useProjectsDirectory;
QString m_buildDirectory;
- QSet m_expectedDirectories;
// When we are callling into a IDocument
// we don't want to receive a changed()
// signal
@@ -218,10 +216,9 @@ DocumentManager::DocumentManager(QMainWindow *mw)
{
d = new DocumentManagerPrivate(mw);
m_instance = this;
- connect(d->m_mainWindow, SIGNAL(windowActivated()),
- this, SLOT(mainWindowActivated()));
connect(ICore::instance(), SIGNAL(contextChanged(QList,Core::Context)),
this, SLOT(syncWithEditor(QList)));
+ qApp->installEventFilter(this);
readSettings();
}
@@ -549,46 +546,6 @@ void DocumentManager::unexpectFileChange(const QString &fileName)
updateExpectedState(fixedResolvedName);
}
-static QString dirWithTrailingSlash(const QString &directory)
-{
- static const QChar slash(QLatin1Char('/'));
- return directory.endsWith(slash) ? directory : directory + slash;
-}
-
-/*!
- * Any subsequent change to any file inside \a directory is treated as
- * an expected file change.
- *
- * \see DocumentManager::unexpectDirectoryChange(const QString &directory)
- */
-void DocumentManager::expectDirectoryChange(const QString &directory)
-{
- QTC_ASSERT(!directory.isEmpty(), return);
- d->m_expectedDirectories.insert(dirWithTrailingSlash(directory));
-}
-
-/*!
- * Any subsequent change to any file inside \a directory is unexpected again.
- *
- * \see DocumentManager::expectDirectoryChange(const QString &directory)
- */
-void DocumentManager::unexpectDirectoryChange(const QString &directory)
-{
- QTimer *timer = new QTimer;
- timer->setProperty("directory", QString(dirWithTrailingSlash(directory)));
- connect(timer, SIGNAL(timeout()), instance(), SLOT(clearExpectedDirectory()));
- timer->setSingleShot(true);
- timer->start(300);
-}
-
-
-void DocumentManager::clearExpectedDirectory()
-{
- if (QTimer *timer = qobject_cast(sender())) {
- d->m_expectedDirectories.remove(timer->property("directory").toString());
- timer->deleteLater();
- }
-}
/*!
Tries to save the files listed in \a documents. The \a cancelled argument is set to true
@@ -854,19 +811,11 @@ void DocumentManager::changedFile(const QString &fileName)
QTimer::singleShot(200, this, SLOT(checkForReload()));
}
-void DocumentManager::mainWindowActivated()
-{
- //we need to do this asynchronously because
- //opening a dialog ("Reload?") in a windowactivated event
- //freezes on Mac
- QTimer::singleShot(0, this, SLOT(checkForReload()));
-}
-
void DocumentManager::checkForReload()
{
if (d->m_changedFiles.isEmpty())
return;
- if (QApplication::activeWindow() != d->m_mainWindow)
+ if (!QApplication::activeWindow() || QApplication::activeModalWidget())
return;
if (d->m_blockActivated)
@@ -945,18 +894,9 @@ void DocumentManager::checkForReload()
continue;
// was the change unexpected?
- if ((currentState.modified != expectedState.modified
- || currentState.permissions != expectedState.permissions)
+ if ((currentState.modified != expectedState.modified || currentState.permissions != expectedState.permissions)
&& !expectedFileNames.contains(fileName)) {
- bool expectedDir = false;
- foreach (const QString &expectedDirectory, d->m_expectedDirectories) {
- if (fileName.startsWith(expectedDirectory)) {
- expectedDir = true;
- break;
- }
- }
- if (!expectedDir)
- trigger = IDocument::TriggerExternal;
+ trigger = IDocument::TriggerExternal;
}
// find out the type
@@ -1416,6 +1356,15 @@ void DocumentManager::slotExecuteOpenWithMenuAction(QAction *action)
executeOpenWithMenuAction(action);
}
+bool DocumentManager::eventFilter(QObject *obj, QEvent *e)
+{
+ if (obj == qApp && e->type() == QEvent::ApplicationActivate) {
+ // activeWindow is not necessarily set yet, do checkForReload asynchronously
+ QTimer::singleShot(0, this, SLOT(checkForReload()));
+ }
+ return false;
+}
+
// -------------- FileChangeBlocker
FileChangeBlocker::FileChangeBlocker(const QString &fileName)
diff --git a/src/plugins/coreplugin/documentmanager.h b/src/plugins/coreplugin/documentmanager.h
index 2eef97b8e4c..549d8d9bc3f 100644
--- a/src/plugins/coreplugin/documentmanager.h
+++ b/src/plugins/coreplugin/documentmanager.h
@@ -74,9 +74,6 @@ public:
static void expectFileChange(const QString &fileName);
static void unexpectFileChange(const QString &fileName);
- static void expectDirectoryChange(const QString &directory);
- static void unexpectDirectoryChange(const QString &directory);
-
// recent files
static void addToRecentFiles(const QString &fileName, const Id &editorId = Id());
Q_SLOT void clearRecentFiles();
@@ -145,15 +142,16 @@ signals:
/// emitted if one document changed its name e.g. due to save as
void documentRenamed(Core::IDocument *document, const QString &from, const QString &to);
+protected:
+ bool eventFilter(QObject *obj, QEvent *e);
+
private slots:
void documentDestroyed(QObject *obj);
void fileNameChanged(const QString &oldName, const QString &newName);
void checkForNewFileName();
void checkForReload();
void changedFile(const QString &file);
- void mainWindowActivated();
void syncWithEditor(const QList &context);
- void clearExpectedDirectory();
};
/*! The FileChangeBlocker blocks all change notifications to all IDocument * that
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 47f64a2d60d..b1c729c49b3 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -1249,8 +1249,7 @@ Core::IEditor *EditorManager::activateEditorForDocument(Core::Internal::EditorVi
if (editors.isEmpty())
return 0;
- activateEditor(view, editors.first(), flags);
- return editors.first();
+ return activateEditor(view, editors.first(), flags);
}
/* For something that has a 'QStringList mimeTypes' (IEditorFactory
diff --git a/src/plugins/coreplugin/editormanager/ieditor.cpp b/src/plugins/coreplugin/editormanager/ieditor.cpp
index d9ad75fe8e7..45ed5897df7 100644
--- a/src/plugins/coreplugin/editormanager/ieditor.cpp
+++ b/src/plugins/coreplugin/editormanager/ieditor.cpp
@@ -31,7 +31,8 @@
/*!
\class Core::IEditor
- \brief The IEditor is an interface for providing different editors for different file types.
+ \brief The IEditor class is an interface for providing different editors for
+ different file types.
Classes that implement this interface are for example the editors for
C++ files, ui-files and resource files.
diff --git a/src/plugins/coreplugin/editormanager/iexternaleditor.cpp b/src/plugins/coreplugin/editormanager/iexternaleditor.cpp
index 2189afb9d3d..4a35ba67dd6 100644
--- a/src/plugins/coreplugin/editormanager/iexternaleditor.cpp
+++ b/src/plugins/coreplugin/editormanager/iexternaleditor.cpp
@@ -33,8 +33,8 @@
\class Core::IExternalEditor
\mainclass
- \brief Core::IExternalEditor allows for registering an external
- Editor in the \gui{Open With...} dialogs .
+ \brief The IExternalEditor class enables registering an external
+ editor in the \gui{Open with} dialog.
*/
/*!
diff --git a/src/plugins/coreplugin/featureprovider.cpp b/src/plugins/coreplugin/featureprovider.cpp
index 5403491fbde..ba6510309a8 100644
--- a/src/plugins/coreplugin/featureprovider.cpp
+++ b/src/plugins/coreplugin/featureprovider.cpp
@@ -33,7 +33,8 @@
\class Core::IFeatureProvider
\mainclass
- \brief The class IFeatureProvider defines an interface to manage features for wizards
+ \brief The IFeatureProvider class defines an interface to manage features
+ for wizards.
The features provided by an object in the object pool implementing IFeatureProvider
will be respected by wizards implementing IWizard.
@@ -68,10 +69,8 @@
/*!
\class Core::Feature
- \brief This class describes a single Feature
-
- This class describes a single Feature to be used
- in Core::FeatureProvider::Features.
+ \brief The Feature class describes a single feature to be used in
+ Core::FeatureProvider::Features.
\sa Core::FeaturesSet
\sa Core::IWizard
@@ -81,12 +80,10 @@
/*!
\class Core::FeatureSet
- \brief This class is a set of features
+ \brief The FeatureSet class is a set of available or required feature sets.
- Features is used to describe available or
- required feature sets and behaves similar to QFlags.
-
- But instead of enums Features relies on string ids
+ This class behaves similarly to QFlags. However, instead of enums, Features
+ relies on string ids
and is therefore extendable.
\sa Core::Feature
diff --git a/src/plugins/coreplugin/generatedfile.cpp b/src/plugins/coreplugin/generatedfile.cpp
index 3f91be3f1c5..c0616efe797 100644
--- a/src/plugins/coreplugin/generatedfile.cpp
+++ b/src/plugins/coreplugin/generatedfile.cpp
@@ -40,7 +40,7 @@ namespace Core {
/*!
\class Core::GeneratedFile
- \brief Represents a file generated by a wizard.
+ \brief The GeneratedFile class represents a file generated by a wizard.
The Wizard class will check for each file whether it already exists and will
report any errors that may occur during creation of the files.
diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp
index 9b32e20a07c..d405a6bda49 100644
--- a/src/plugins/coreplugin/icore.cpp
+++ b/src/plugins/coreplugin/icore.cpp
@@ -47,8 +47,8 @@
/*!
\class Core::ICore
- \brief The ICore class allows access to the different part that make up
- the basic functionality of Qt Creator.
+ \brief The ICore class allows access to the different parts that make up
+ the basic functionality of \QC.
You should never create a subclass of this interface. The one and only
instance is created by the Core plugin. You can access this instance
diff --git a/src/plugins/coreplugin/icorelistener.h b/src/plugins/coreplugin/icorelistener.h
index fa918c7a2e9..9d29802dc6f 100644
--- a/src/plugins/coreplugin/icorelistener.h
+++ b/src/plugins/coreplugin/icorelistener.h
@@ -38,8 +38,8 @@ class IEditor;
/*!
\class Core::ICoreListener
- \brief Provides a hook for plugins to veto on certain events emitted from
-the core plugin.
+ \brief The ICoreListener class provides a hook for plugins to veto on certain
+ events emitted from the core plugin.
You implement this interface if you want to prevent certain events from
occurring, e.g. if you want to prevent the closing of the whole application
diff --git a/src/plugins/coreplugin/id.cpp b/src/plugins/coreplugin/id.cpp
index 939d5d44377..f3bd5d4c5dc 100644
--- a/src/plugins/coreplugin/id.cpp
+++ b/src/plugins/coreplugin/id.cpp
@@ -43,8 +43,8 @@ namespace Core {
/*!
\class Core::Id
- \brief The class Id encapsulates an identifier that is unique
- within a specific running Qt Creator process.
+ \brief The Id class encapsulates an identifier that is unique
+ within a specific running \QC process.
\c{Core::Id} is used as facility to identify objects of interest
in a more typesafe and faster manner than a plain \c QString or
diff --git a/src/plugins/coreplugin/idocument.h b/src/plugins/coreplugin/idocument.h
index 9fb5e5ab6ed..c543366316f 100644
--- a/src/plugins/coreplugin/idocument.h
+++ b/src/plugins/coreplugin/idocument.h
@@ -112,7 +112,8 @@ signals:
void changed();
void aboutToReload();
- void reloaded();
+ void reloadFinished(bool success);
+
void fileNameChanged(const QString &oldName, const QString &newName);
private:
diff --git a/src/plugins/coreplugin/images/logo/logo.qbs b/src/plugins/coreplugin/images/logo/logo.qbs
index 0ff76277f9d..47472d9bd09 100644
--- a/src/plugins/coreplugin/images/logo/logo.qbs
+++ b/src/plugins/coreplugin/images/logo/logo.qbs
@@ -1,7 +1,7 @@
import qbs.base 1.0
Product {
- condition: qbs.targetOS == "linux"
+ condition: qbs.targetOS.contains("linux")
name: "LogoImages"
Group {
diff --git a/src/plugins/coreplugin/images/topbaricon.png b/src/plugins/coreplugin/images/topbaricon.png
new file mode 100644
index 00000000000..40d0fd842ed
Binary files /dev/null and b/src/plugins/coreplugin/images/topbaricon.png differ
diff --git a/src/plugins/coreplugin/mimedatabase.cpp b/src/plugins/coreplugin/mimedatabase.cpp
index f8c66a5b249..3d84dbd113c 100644
--- a/src/plugins/coreplugin/mimedatabase.cpp
+++ b/src/plugins/coreplugin/mimedatabase.cpp
@@ -93,7 +93,8 @@ enum {
/*!
\class Core::IMagicMatcher
- \brief Interface for a Mime type magic matcher (examinig file contents).
+ \brief The IMagicMatcher class is an interface for a MIME type magic
+ matcher that examines file contents to determine the MIME type of a file.
\sa Core::MimeType, Core::MimeDatabase, Core::MagicRuleMatcher, Core::MagicRule, Core::MagicStringRule, Core::MagicByteRule, Core::GlobPattern
\sa Core::Internal::FileMatchContext, Core::Internal::BinaryMatcher, Core::Internal::HeuristicTextMagicMatcher
@@ -109,7 +110,8 @@ namespace Internal {
/*!
\class Core::Internal::FileMatchContext
- \brief Context passed on to the mime types when looking for a file match.
+ \brief The FileMatchContext class is the context passed on to the MIME
+ types when looking for a file match.
It exists to enable reading the file contents "on demand"
(as opposed to each mime type trying to open and read while checking).
@@ -173,7 +175,8 @@ QByteArray FileMatchContext::data()
/*!
\class Core::Internal::BinaryMatcher
- \brief The binary fallback matcher for mime type "application/octet-stream".
+ \brief The BinaryMatcher class is the binary fallback matcher for the MIME
+ type \c{application/octet-stream}.
\sa Core::MimeType, Core::MimeDatabase, Core::IMagicMatcher, Core::MagicRuleMatcher, Core::MagicRule, Core::MagicStringRule, Core::MagicByteRule, Core::GlobPattern
\sa Core::Internal::FileMatchContext, Core::Internal::HeuristicTextMagicMatcher
@@ -190,7 +193,8 @@ public:
/*!
\class Core::Internal::HeuristicTextMagicMatcher
- \brief Heuristic text file matcher for mime types.
+ \brief The HeuristicTextMagicMatcher class implements a heuristic text file
+ matcher for MIME types.
If the data do not contain any character below tab (9), detect as text.
Additionally, check on UTF16 byte order markers.
@@ -235,7 +239,8 @@ bool HeuristicTextMagicMatcher::matches(const QByteArray &data) const
/*!
\class Core::MagicRule
- \brief Base class for standard Magic match rules based on contents
+ \brief The MagicRule class is a base class for standard Magic matching rules
+ based on contents
and offset specification.
Stores the offset and provides conversion helpers.
@@ -281,7 +286,7 @@ QPair MagicRule::fromOffset(const QString &offset)
/*!
\class Core::MagicStringRule
- \brief Match on a string.
+ \brief The MagicStringRule class provides rules for matching strings.
\sa Core::MimeType, Core::MimeDatabase, Core::IMagicMatcher, Core::MagicRuleMatcher, Core::MagicRule, Core::MagicByteRule, Core::GlobPattern
\sa Core::Internal::FileMatchContext, Core::Internal::BinaryMatcher, Core::Internal::HeuristicTextMagicMatcher
@@ -327,7 +332,8 @@ bool MagicStringRule::matches(const QByteArray &data) const
/*!
\class Core::MagicByteRule
- \brief Match on a sequence of binary data.
+ \brief The MagicByteRule class provides rules for matching a sequence of
+ binary data.
Format:
\code
@@ -410,7 +416,8 @@ bool MagicByteRule::matches(const QByteArray &data) const
/*!
\class Core::MagicRuleMatcher
- \brief A Magic matcher that checks a number of rules based on operator "or".
+ \brief The MagicRuleMatcher class implements a Magic matcher that checks the
+ number of rules based on the boolean operator OR.
It is used for rules parsed from XML files.
@@ -474,7 +481,8 @@ IMagicMatcher::IMagicMatcherList MagicRuleMatcher::createMatchers(
/*!
\class Core::GlobPattern
- \brief Glob pattern for file names for mime type matching.
+ \brief The GlobPattern class provides a glob pattern for file names for
+ MIME type matching.
\sa Core::MimeType, Core::MimeDatabase, Core::IMagicMatcher, Core::MagicRuleMatcher, Core::MagicRule, Core::MagicStringRule, Core::MagicByteRule
\sa Core::Internal::FileMatchContext, Core::Internal::BinaryMatcher, Core::Internal::HeuristicTextMagicMatcher
@@ -518,7 +526,7 @@ bool MimeGlobPattern::matches(const QString &fileName) const
/*!
\class Core::MimeType
- \brief Mime type data used in Qt Creator.
+ \brief The MimeType class contains MIME type data used in \QC.
Contains most information from standard mime type XML database files.
@@ -918,7 +926,8 @@ namespace Internal {
/*!
\class Core::Internal::BaseMimeTypeParser
- \brief Generic parser for a sequence of .
+ \brief The BaseMimeTypeParser class provides a generic parser for a
+ sequence of .
Calls abstract handler function process for MimeType it finds.
@@ -1183,7 +1192,8 @@ MimeMapEntry::MimeMapEntry(const MimeType &t, int aLevel) :
/*!
\class Core::MimeDatabase
- \brief Mime data base to which the plugins can add the mime types they handle.
+ \brief The MimeDatabase class is a MIME type database to which the plugins
+ can add the MIME types they handle.
The class is protected by a QMutex and can therefore be accessed by threads.
@@ -1302,7 +1312,7 @@ MimeDatabasePrivate::MimeDatabasePrivate() :
/*!
\class Core::Internal::MimeTypeParser
- \brief Mime type parser
+ \brief The MimeTypeParser class provides a MIME type parser.
Populates Core::MimeDataBase
diff --git a/src/plugins/coreplugin/settingsdatabase.cpp b/src/plugins/coreplugin/settingsdatabase.cpp
index ccfaae9b945..c2ca0767830 100644
--- a/src/plugins/coreplugin/settingsdatabase.cpp
+++ b/src/plugins/coreplugin/settingsdatabase.cpp
@@ -42,7 +42,8 @@
/*!
\class Core::SettingsDatabase
- \brief An alternative to the application-wide QSettings that is more
+ \brief The SettingsDatabase class offers an alternative to the
+ application-wide QSettings that is more
suitable for storing large amounts of data.
The settings database is SQLite based, and lazily retrieves data when it
diff --git a/src/plugins/coreplugin/textdocument.cpp b/src/plugins/coreplugin/textdocument.cpp
index f44a86f2b79..c083cf2eb2a 100644
--- a/src/plugins/coreplugin/textdocument.cpp
+++ b/src/plugins/coreplugin/textdocument.cpp
@@ -35,7 +35,8 @@
/*!
\class Core::TextFile
- \brief Base class for text files with encoding helpers.
+ \brief The TextFile class is a base class for text files with encoding
+ helpers.
Stores the format obtained from read operations and uses that when writing
out files, thus ensuring that CRLF/encodings are preserved.
diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp
index 89745f4d2af..31c3ae46f9d 100644
--- a/src/plugins/coreplugin/vcsmanager.cpp
+++ b/src/plugins/coreplugin/vcsmanager.cpp
@@ -274,23 +274,31 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
if (topLevelDirectory)
*topLevelDirectory = allThatCanManage.first().first;
IVersionControl *versionControl = allThatCanManage.first().second;
- if (!versionControl->isConfigured()) {
- if (IEditor *curEditor = EditorManager::currentEditor()) {
- if (IDocument *curDocument = curEditor->document()) {
- Id vcsWarning("VcsNotConfiguredWarning");
- InfoBar *infoBar = curDocument->infoBar();
- if (infoBar->canInfoBeAdded(vcsWarning)) {
- InfoBarEntry info(vcsWarning,
- tr("%1 repository was detected but %1 is not configured.")
- .arg(versionControl->displayName()),
- InfoBarEntry::GlobalSuppressionEnabled);
- d->m_unconfiguredVcs = versionControl;
- info.setCustomButtonInfo(tr("Configure"), this, SLOT(configureVcs()));
- infoBar->addInfo(info);
- }
+ const bool isVcsConfigured = versionControl->isConfigured();
+ if (!isVcsConfigured || d->m_unconfiguredVcs) {
+ Id vcsWarning("VcsNotConfiguredWarning");
+ IDocument *curDocument = 0;
+ if (IEditor *curEditor = EditorManager::currentEditor())
+ curDocument = curEditor->document();
+ if (isVcsConfigured) {
+ if (curDocument && d->m_unconfiguredVcs == versionControl) {
+ curDocument->infoBar()->removeInfo(vcsWarning);
+ d->m_unconfiguredVcs = 0;
}
+ return versionControl;
+ } else {
+ InfoBar *infoBar = curDocument->infoBar();
+ if (infoBar->canInfoBeAdded(vcsWarning)) {
+ InfoBarEntry info(vcsWarning,
+ tr("%1 repository was detected but %1 is not configured.")
+ .arg(versionControl->displayName()),
+ InfoBarEntry::GlobalSuppressionEnabled);
+ d->m_unconfiguredVcs = versionControl;
+ info.setCustomButtonInfo(tr("Configure"), this, SLOT(configureVcs()));
+ infoBar->addInfo(info);
+ }
+ return 0;
}
- versionControl = 0;
}
return versionControl;
}
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp
index 12102111d1b..5c390070144 100644
--- a/src/plugins/cpaster/cpasterplugin.cpp
+++ b/src/plugins/cpaster/cpasterplugin.cpp
@@ -69,8 +69,8 @@ namespace CodePaster {
/*!
\class CodePaster::CodePasterService
- \brief Service registered with PluginManager providing CodePaster
- post() functionality.
+ \brief The CodePasterService class is a service registered with PluginManager
+ that provides CodePaster \c post() functionality.
\sa ExtensionSystem::PluginManager::getObjectByClassName, ExtensionSystem::invoke
\sa VcsBase::VcsBaseEditorWidget
diff --git a/src/plugins/cpaster/kdepasteprotocol.cpp b/src/plugins/cpaster/kdepasteprotocol.cpp
index 0a717847e93..2f62b80ca9f 100644
--- a/src/plugins/cpaster/kdepasteprotocol.cpp
+++ b/src/plugins/cpaster/kdepasteprotocol.cpp
@@ -195,7 +195,8 @@ void KdePasteProtocol::list()
{
QTC_ASSERT(!m_listReply, return);
- QString url = QLatin1String(hostUrlC) + QLatin1String("api/xml/all");
+ // Trailing slash is important to prevent redirection.
+ QString url = QLatin1String(hostUrlC) + QLatin1String("api/xml/all/");
m_listReply = httpGet(url);
connect(m_listReply, SIGNAL(finished()), this, SLOT(listFinished()));
if (debug)
diff --git a/src/plugins/cpaster/pastebindotcomprotocol.cpp b/src/plugins/cpaster/pastebindotcomprotocol.cpp
index 619c2238cad..a7de02335a4 100644
--- a/src/plugins/cpaster/pastebindotcomprotocol.cpp
+++ b/src/plugins/cpaster/pastebindotcomprotocol.cpp
@@ -317,12 +317,21 @@ static inline ParseState nextClosingState(ParseState current, const QStringRef &
return ParseError;
}
-static inline QStringList parseLists(QIODevice *io)
+static inline QStringList parseLists(QIODevice *io, QString *errorMessage)
{
enum { maxEntries = 200 }; // Limit the archive, which can grow quite large.
QStringList rc;
- QXmlStreamReader reader(io);
+ // Read answer and delete part up to the main table since the input form has
+ // parts that can no longer be parsed using XML parsers ()
+ QByteArray data = io->readAll();
+ const int tablePos = data.indexOf("
");
+ if (tablePos < 0) {
+ *errorMessage = QLatin1String("Could not locate beginning of table.");
+ return rc;
+ }
+ data.remove(0, tablePos);
+ QXmlStreamReader reader(data);
ParseState state = OutSideTable;
int tableRow = 0;
int tableColumn = 0;
@@ -410,6 +419,8 @@ static inline QStringList parseLists(QIODevice *io)
break;
} // switch reader state
}
+ if (reader.hasError())
+ *errorMessage = QString::fromLatin1("Error at line %1:%2").arg(reader.lineNumber()).arg(reader.errorString());
return rc;
}
@@ -420,7 +431,10 @@ void PasteBinDotComProtocol::listFinished()
if (debug)
qDebug() << "listFinished: error" << m_listReply->errorString();
} else {
- QStringList list = parseLists(m_listReply);
+ QString errorMessage;
+ const QStringList list = parseLists(m_listReply, &errorMessage);
+ if (list.isEmpty())
+ qWarning().nospace() << "Failed to read list from " << PASTEBIN_BASE << ':' << errorMessage;
emit listDone(name(), list);
if (debug)
qDebug() << list;
diff --git a/src/plugins/cppeditor/cppeditorplugin.h b/src/plugins/cppeditor/cppeditorplugin.h
index 50b5bc141be..f86ff598084 100644
--- a/src/plugins/cppeditor/cppeditorplugin.h
+++ b/src/plugins/cppeditor/cppeditorplugin.h
@@ -136,6 +136,8 @@ private slots:
void test_doxygen_comments_cpp_styleA_corner_case();
void test_quickfix_GenerateGetterSetter_basicGetterWithPrefix();
+ void test_quickfix_GenerateGetterSetter_basicGetterWithPrefixAndNamespace();
+ void test_quickfix_GenerateGetterSetter_basicGetterWithPrefixAndNamespaceToCpp();
void test_quickfix_GenerateGetterSetter_basicGetterWithoutPrefix();
void test_quickfix_GenerateGetterSetter_customType();
void test_quickfix_GenerateGetterSetter_constMember();
@@ -151,6 +153,7 @@ private slots:
void test_quickfix_ReformatPointerDeclaration();
void test_quickfix_InsertDefFromDecl_basic();
+ void test_quickfix_InsertDefFromDecl_afterClass();
void test_quickfix_InsertDefFromDecl_headerSource_basic1();
void test_quickfix_InsertDefFromDecl_headerSource_basic2();
void test_quickfix_InsertDefFromDecl_headerSource_namespace1();
@@ -159,6 +162,7 @@ private slots:
void test_quickfix_InsertDefFromDecl_insideClass();
void test_quickfix_InsertDefFromDecl_notTriggeringWhenDefinitionExists();
void test_quickfix_InsertDefFromDecl_notTriggeringStatement();
+ void test_quickfix_InsertDefFromDecl_findRightImplementationFile();
void test_quickfix_InsertDeclFromDef();
@@ -184,8 +188,10 @@ private slots:
void test_quickfix_AddIncludeForUndefinedIdentifier_noinclude();
void test_quickfix_AddIncludeForUndefinedIdentifier_veryFirstIncludeCppStyleCommentOnTop();
void test_quickfix_AddIncludeForUndefinedIdentifier_veryFirstIncludeCStyleCommentOnTop();
+ void test_quickfix_AddIncludeForUndefinedIdentifier_checkQSomethingInQtIncludePaths();
void test_quickfix_MoveFuncDefOutside_MemberFuncToCpp();
+ void test_quickfix_MoveFuncDefOutside_MemberFuncToCppInsideNS();
void test_quickfix_MoveFuncDefOutside_MemberFuncOutside1();
void test_quickfix_MoveFuncDefOutside_MemberFuncOutside2();
void test_quickfix_MoveFuncDefOutside_MemberFuncToCppNS();
@@ -195,6 +201,7 @@ private slots:
void test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS();
void test_quickfix_MoveFuncDefOutside_CtorWithInitialization1();
void test_quickfix_MoveFuncDefOutside_CtorWithInitialization2();
+ void test_quickfix_MoveFuncDefOutside_afterClass();
void test_quickfix_MoveFuncDefToDecl_MemberFunc();
void test_quickfix_MoveFuncDefToDecl_MemberFuncOutside();
@@ -216,8 +223,10 @@ private slots:
void test_quickfix_AssignToLocalVariable_noVoidStaticMemberFunction();
void test_quickfix_AssignToLocalVariable_noFunctionInExpression();
void test_quickfix_AssignToLocalVariable_noFunctionInFunction();
- void test_quickfix_AssignToLocalVariable_noReturnClass();
- void test_quickfix_AssignToLocalVariable_noReturnFunc();
+ void test_quickfix_AssignToLocalVariable_noReturnClass1();
+ void test_quickfix_AssignToLocalVariable_noReturnClass2();
+ void test_quickfix_AssignToLocalVariable_noReturnFunc1();
+ void test_quickfix_AssignToLocalVariable_noReturnFunc2();
void test_quickfix_AssignToLocalVariable_noSignatureMatch();
void test_quickfix_InsertVirtualMethods_onlyDecl();
diff --git a/src/plugins/cppeditor/cppquickfix_test.cpp b/src/plugins/cppeditor/cppquickfix_test.cpp
index dd22a5d0892..5969e36d9bb 100644
--- a/src/plugins/cppeditor/cppquickfix_test.cpp
+++ b/src/plugins/cppeditor/cppquickfix_test.cpp
@@ -344,18 +344,25 @@ private:
const QString m_include;
};
+QString includeBaseDirectory()
+{
+ return QLatin1String(SRCDIR)
+ + QLatin1String("/../../../tests/auto/cplusplus/preprocessor/data/include-data");
+}
+
+QString globalQtCoreIncludePath()
+{
+ return QDir::cleanPath(includeBaseDirectory() + QLatin1String("/QtCore"));
+}
+
QString globalIncludePath()
{
- const QString path = QLatin1String(SRCDIR)
- + QLatin1String("/../../../tests/auto/cplusplus/preprocessor/data/include-data/global");
- return QDir::cleanPath(path);
+ return QDir::cleanPath(includeBaseDirectory() + QLatin1String("/global"));
}
QString directoryOfTestFile()
{
- const QString path = QLatin1String(SRCDIR)
- + QLatin1String("/../../../tests/auto/cplusplus/preprocessor/data/include-data/local");
- return QDir::cleanPath(path);
+ return QDir::cleanPath(includeBaseDirectory() + QLatin1String("/local"));
}
} // anonymous namespace
@@ -401,6 +408,99 @@ void CppEditorPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithPrefix()
data.run(&factory);
}
+/// Checks: In addition to test_quickfix_GenerateGetterSetter_basicGetterWithPrefix
+/// generated definitions should fit in the namespace.
+void CppEditorPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithPrefixAndNamespace()
+{
+ const QByteArray original =
+ "namespace SomeNamespace {\n"
+ "class Something\n"
+ "{\n"
+ " int @it;\n"
+ "};\n"
+ "}\n";
+
+ const QByteArray expected =
+ "namespace SomeNamespace {\n"
+ "class Something\n"
+ "{\n"
+ " int it;\n"
+ "\n"
+ "public:\n"
+ " int getIt() const;\n"
+ " void setIt(int value);\n"
+ "};\n"
+ "int Something::getIt() const\n"
+ "{\n"
+ " return it;\n"
+ "}\n"
+ "\n"
+ "void Something::setIt(int value)\n"
+ "{\n"
+ " it = value;\n"
+ "}\n"
+ "\n"
+ "}\n\n";
+
+ GenerateGetterSetter factory;
+ TestCase data(original, expected);
+ data.run(&factory);
+}
+
+/// Checks: In addition to test_quickfix_GenerateGetterSetter_basicGetterWithPrefix
+/// generated definitions should fit in the namespace.
+void CppEditorPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithPrefixAndNamespaceToCpp()
+{
+ QList testFiles;
+ QByteArray original;
+ QByteArray expected;
+
+ // Header File
+ original =
+ "namespace SomeNamespace {\n"
+ "class Something\n"
+ "{\n"
+ " int @it;\n"
+ "};\n"
+ "}\n";
+ expected =
+ "namespace SomeNamespace {\n"
+ "class Something\n"
+ "{\n"
+ " int it;\n"
+ "\n"
+ "public:\n"
+ " int getIt() const;\n"
+ " void setIt(int value);\n"
+ "};\n"
+ "}\n\n";
+ testFiles << TestDocument::create(original, expected, QLatin1String("file.h"));
+
+ // Source File
+ original =
+ "#include \"file.h\"\n"
+ "namespace SomeNamespace {\n"
+ "}\n";
+ expected =
+ "#include \"file.h\"\n"
+ "namespace SomeNamespace {\n"
+ "int Something::getIt() const\n"
+ "{\n"
+ " return it;\n"
+ "}\n"
+ "\n"
+ "void Something::setIt(int value)\n"
+ "{\n"
+ " it = value;\n"
+ "}\n\n"
+ "}\n\n";
+ testFiles << TestDocument::create(original, expected, QLatin1String("file.cpp"));
+
+ GenerateGetterSetter factory;
+ TestCase data(testFiles);
+ data.run(&factory);
+}
+
/// Checks:
/// 1. Getter: "get" prefix is not necessary.
/// 2. Setter: Parameter name is base name.
@@ -774,6 +874,50 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_basic()
data.run(&factory);
}
+/// Check if definition is inserted right after class for insert definition outside
+void CppEditorPlugin::test_quickfix_InsertDefFromDecl_afterClass()
+{
+ QList testFiles;
+ QByteArray original;
+ QByteArray expected;
+
+ // Header File
+ original =
+ "class Foo\n"
+ "{\n"
+ " Foo();\n"
+ " void a@();\n"
+ "};\n"
+ "\n"
+ "class Bar {};\n";
+ expected =
+ "class Foo\n"
+ "{\n"
+ " Foo();\n"
+ " void a();\n"
+ "};\n"
+ "\n"
+ "void Foo::a()\n"
+ "{\n\n}\n"
+ "\n"
+ "class Bar {};\n\n";
+ testFiles << TestDocument::create(original, expected, QLatin1String("file.h"));
+
+ // Source File
+ original =
+ "#include \"file.h\"\n"
+ "\n"
+ "Foo::Foo()\n"
+ "{\n\n"
+ "}\n";
+ expected = original + "\n";
+ testFiles << TestDocument::create(original, expected, QLatin1String("file.cpp"));
+
+ InsertDefFromDecl factory;
+ TestCase data(testFiles);
+ data.run(&factory, 1);
+}
+
/// Check from header file: If there is a source file, insert the definition in the source file.
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic1()
{
@@ -982,6 +1126,58 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_notTriggeringStatement()
data.run(&factory);
}
+/// Find right implementation file.
+void CppEditorPlugin::test_quickfix_InsertDefFromDecl_findRightImplementationFile()
+{
+ QList testFiles;
+
+ QByteArray original;
+ QByteArray expected;
+
+ // Header File
+ original =
+ "struct Foo\n"
+ "{\n"
+ " Foo();\n"
+ " void a();\n"
+ " void b@();\n"
+ "};\n"
+ "}\n";
+ expected = original + "\n";
+ testFiles << TestDocument::create(original, expected, QLatin1String("file.h"));
+
+ // Source File #1
+ original =
+ "#include \"file.h\"\n"
+ "\n"
+ "Foo::Foo()\n"
+ "{\n\n"
+ "}\n"
+ "\n";
+ expected = original + "\n";
+ testFiles << TestDocument::create(original, expected, QLatin1String("file.cpp"));
+
+
+ // Source File #2
+ original =
+ "#include \"file.h\"\n"
+ "\n"
+ "void Foo::a()\n"
+ "{\n\n"
+ "}\n";
+ expected = original +
+ "\n"
+ "void Foo::b()\n"
+ "{\n\n"
+ "}\n"
+ "\n";
+ testFiles << TestDocument::create(original, expected, QLatin1String("file2.cpp"));
+
+ InsertDefFromDecl factory;
+ TestCase data(testFiles);
+ data.run(&factory);
+}
+
// Function for one of InsertDeclDef section cases
void insertToSectionDeclFromDef(const QByteArray §ion, int sectionIndex)
{
@@ -1741,6 +1937,32 @@ void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_veryFirstIn
data.run(&factory);
}
+/// Check: If a "Qt Class" was not found by the locator, check the header files in the Qt
+/// include paths
+void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_checkQSomethingInQtIncludePaths()
+{
+ QList testFiles;
+
+ QByteArray original;
+ QByteArray expected;
+
+ original =
+ "@QDir dir;\n"
+ ;
+ expected =
+ "#include \n"
+ "\n"
+ "QDir dir;\n"
+ "\n"
+ ;
+ testFiles << TestDocument::create(original, expected, directoryOfTestFile() + QLatin1Char('/')
+ + QLatin1String("file.cpp"));
+
+ AddIncludeForUndefinedIdentifier factory;
+ TestCase data(testFiles, QStringList(globalQtCoreIncludePath()));
+ data.run(&factory);
+}
+
/// Check: Move definition from header to cpp.
void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCpp()
{
@@ -1785,6 +2007,53 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCpp()
data.run(&factory);
}
+void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCppInsideNS()
+{
+ QList testFiles;
+ QByteArray original;
+ QByteArray expected;
+
+ // Header File
+ original =
+ "namespace SomeNamespace {\n"
+ "class Foo {\n"
+ " int ba@r()\n"
+ " {\n"
+ " return 5;\n"
+ " }\n"
+ "};\n"
+ "}\n";
+ expected =
+ "namespace SomeNamespace {\n"
+ "class Foo {\n"
+ " int ba@r();\n"
+ "};\n"
+ "}\n\n";
+ testFiles << TestDocument::create(original, expected, QLatin1String("file.h"));
+
+ // Source File
+ original =
+ "#include \"file.h\"\n"
+ "namespace SomeNamespace {\n"
+ "\n"
+ "}\n";
+ expected =
+ "#include \"file.h\"\n"
+ "namespace SomeNamespace {\n"
+ "\n"
+ "int Foo::bar()\n"
+ "{\n"
+ " return 5;\n"
+ "}\n"
+ "\n"
+ "}\n\n";
+ testFiles << TestDocument::create(original, expected, QLatin1String("file.cpp"));
+
+ MoveFuncDefOutside factory;
+ TestCase data(testFiles);
+ data.run(&factory);
+}
+
/// Check: Move definition outside class
void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutside1()
{
@@ -1844,7 +2113,6 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutside2()
" void f3();\n"
"};\n"
"\n"
- "\n"
"int Foo::f2()\n"
"{\n"
" return 1;\n"
@@ -2147,6 +2415,49 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_CtorWithInitialization2()
data.run(&factory);
}
+/// Check if definition is inserted right after class for move definition outside
+void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_afterClass()
+{
+ QList testFiles;
+ QByteArray original;
+ QByteArray expected;
+
+ // Header File
+ original =
+ "class Foo\n"
+ "{\n"
+ " Foo();\n"
+ " void a@() {}\n"
+ "};\n"
+ "\n"
+ "class Bar {};\n";
+ expected =
+ "class Foo\n"
+ "{\n"
+ " Foo();\n"
+ " void a();\n"
+ "};\n"
+ "\n"
+ "void Foo::a() {}\n"
+ "\n"
+ "class Bar {};\n\n";
+ testFiles << TestDocument::create(original, expected, QLatin1String("file.h"));
+
+ // Source File
+ original =
+ "#include \"file.h\"\n"
+ "\n"
+ "Foo::Foo()\n"
+ "{\n\n"
+ "}\n";
+ expected = original + "\n";
+ testFiles << TestDocument::create(original, expected, QLatin1String("file.cpp"));
+
+ MoveFuncDefOutside factory;
+ TestCase data(testFiles);
+ data.run(&factory, 1);
+}
+
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncToCpp()
void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFunc()
{
@@ -2637,7 +2948,7 @@ void CppEditorPlugin::test_quickfix_AssignToLocalVariable_noFunctionInFunction()
}
/// Check: No trigger for functions in return statements (classes).
-void CppEditorPlugin::test_quickfix_AssignToLocalVariable_noReturnClass()
+void CppEditorPlugin::test_quickfix_AssignToLocalVariable_noReturnClass1()
{
const QByteArray original =
"class Foo {public: static void fooFunc();}\n"
@@ -2651,8 +2962,23 @@ void CppEditorPlugin::test_quickfix_AssignToLocalVariable_noReturnClass()
data.run(&factory);
}
+/// Check: No trigger for functions in return statements (classes). (QTCREATORBUG-9525)
+void CppEditorPlugin::test_quickfix_AssignToLocalVariable_noReturnClass2()
+{
+ const QByteArray original =
+ "class Foo {public: int fooFunc();}\n"
+ "int bar() {\n"
+ " return (new Fo@o)->fooFunc();\n"
+ "}";
+ const QByteArray expected = original + "\n";
+
+ AssignToLocalVariable factory;
+ TestCase data(original, expected);
+ data.run(&factory);
+}
+
/// Check: No trigger for functions in return statements (functions).
-void CppEditorPlugin::test_quickfix_AssignToLocalVariable_noReturnFunc()
+void CppEditorPlugin::test_quickfix_AssignToLocalVariable_noReturnFunc1()
{
const QByteArray original =
"class Foo {public: int fooFunc();}\n"
@@ -2666,6 +2992,20 @@ void CppEditorPlugin::test_quickfix_AssignToLocalVariable_noReturnFunc()
data.run(&factory);
}
+/// Check: No trigger for functions in return statements (functions). (QTCREATORBUG-9525)
+void CppEditorPlugin::test_quickfix_AssignToLocalVariable_noReturnFunc2()
+{
+ const QByteArray original =
+ "int bar() {\n"
+ " return list.firs@t().foo;\n"
+ "}\n";
+ const QByteArray expected = original + "\n";
+
+ AssignToLocalVariable factory;
+ TestCase data(original, expected);
+ data.run(&factory);
+}
+
/// Check: No trigger for functions which does not match in signature.
void CppEditorPlugin::test_quickfix_AssignToLocalVariable_noSignatureMatch()
{
diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp
index 14456b0eb24..19e4665d80c 100644
--- a/src/plugins/cppeditor/cppquickfixes.cpp
+++ b/src/plugins/cppeditor/cppquickfixes.cpp
@@ -143,7 +143,7 @@ enum DefPos {
DefPosImplementationFile
};
-InsertionLocation insertLocationForMethodDefinition(Symbol *symbol,
+InsertionLocation insertLocationForMethodDefinition(Symbol *symbol, const bool useSymbolFinder,
CppRefactoringChanges& refactoring,
const QString& fileName)
{
@@ -151,8 +151,8 @@ InsertionLocation insertLocationForMethodDefinition(Symbol *symbol,
// Try to find optimal location
const InsertionPointLocator locator(refactoring);
- const QList list = locator.methodDefinition(symbol, symbol->asDeclaration(),
- fileName);
+ const QList list
+ = locator.methodDefinition(symbol, useSymbolFinder, fileName);
for (int i = 0; i < list.count(); ++i) {
InsertionLocation location = list.at(i);
if (location.isValid() && location.fileName() == fileName) {
@@ -161,15 +161,28 @@ InsertionLocation insertLocationForMethodDefinition(Symbol *symbol,
}
}
- // ...failed, so return location at end of file
+ // ...failed,
+ // if class member try to get position right after class
CppRefactoringFilePtr file = refactoring.file(fileName);
+ unsigned line = 0, column = 0;
+ if (Class *clazz = symbol->enclosingClass()) {
+ if (symbol->fileName() == fileName.toUtf8()) {
+ file->cppDocument()->translationUnit()->getPosition(clazz->endOffset(), &line, &column);
+ if (line != 0) {
+ ++column; // Skipping the ";"
+ return InsertionLocation(fileName, QLatin1String("\n\n"), QLatin1String(""),
+ line, column);
+ }
+ }
+ }
+
+ // fall through: position at end of file
const QTextDocument *doc = file->document();
int pos = qMax(0, doc->characterCount() - 1);
//TODO watch for matching namespace
//TODO watch for moc-includes
- unsigned line, column;
file->lineAndColumn(pos, &line, &column);
return InsertionLocation(fileName, QLatin1String("\n\n"), QLatin1String("\n"), line, column);
}
@@ -1856,10 +1869,7 @@ void AddIncludeForUndefinedIdentifier::match(const CppQuickFixInterface &interfa
}
if (!inProject) {
// better use all include paths than none
- foreach (const CppModelManagerInterface::ProjectInfo &info, projectInfos) {
- foreach (ProjectPart::Ptr part, info.projectParts())
- includePaths += part->includePaths;
- }
+ includePaths = modelManager->includePaths();
}
// find a include file through the locator
@@ -1897,14 +1907,34 @@ void AddIncludeForUndefinedIdentifier::match(const CppQuickFixInterface &interfa
}
}
- // for QSomething, propose a include -- if such a class was in the locator
- if (classExists
- && className.size() > 2
+ const bool isProbablyAQtClass = className.size() > 2
&& className.at(0) == QLatin1Char('Q')
- && className.at(1).isUpper()) {
+ && className.at(1).isUpper();
+
+ if (!isProbablyAQtClass)
+ return;
+
+ // for QSomething, propose a include -- if such a class was in the locator
+ if (classExists) {
const QString include = QLatin1Char('<') + className + QLatin1Char('>');
result += CppQuickFixOperation::Ptr(
- new AddIncludeForUndefinedIdentifierOp(interface, 1, include));
+ new AddIncludeForUndefinedIdentifierOp(interface, 1, include));
+
+ // otherwise, check for a header file with the same name in the Qt include paths
+ } else {
+ foreach (const QString &includePath, includePaths) {
+ if (!includePath.contains(QLatin1String("/Qt"))) // "QtCore", "QtGui" etc...
+ continue;
+
+ const QString headerPathCandidate = includePath + QLatin1Char('/') + className;
+ const QFileInfo fileInfo(headerPathCandidate);
+ if (fileInfo.exists() && fileInfo.isFile()) {
+ const QString include = QLatin1Char('<') + className + QLatin1Char('>');
+ result += CppQuickFixOperation::Ptr(
+ new AddIncludeForUndefinedIdentifierOp(interface, 1, include));
+ break;
+ }
+ }
}
}
@@ -2450,20 +2480,23 @@ namespace {
class InsertDefOperation: public CppQuickFixOperation
{
public:
+ // Make sure that either loc is valid or targetFileName is not empty.
InsertDefOperation(const QSharedPointer &interface,
Declaration *decl, const InsertionLocation &loc, const DefPos defpos,
- bool freeFunction = false)
+ const QString &targetFileName = QString(), bool freeFunction = false)
: CppQuickFixOperation(interface, 0)
, m_decl(decl)
, m_loc(loc)
, m_defpos(defpos)
+ , m_targetFileName(targetFileName)
{
if (m_defpos == DefPosImplementationFile) {
const QString declFile = QString::fromUtf8(decl->fileName(), decl->fileNameLength());
const QDir dir = QFileInfo(declFile).dir();
setDescription(QCoreApplication::translate("CppEditor::InsertDefOperation",
"Add Definition in %1")
- .arg(dir.relativeFilePath(m_loc.fileName())));
+ .arg(dir.relativeFilePath(m_loc.isValid() ? m_loc.fileName()
+ : m_targetFileName)));
} else if (freeFunction) {
setDescription(QCoreApplication::translate("CppEditor::InsertDefOperation",
"Add Definition Here"));
@@ -2478,10 +2511,12 @@ public:
void perform()
{
- QTC_ASSERT(m_loc.isValid(), return);
CppRefactoringChanges refactoring(snapshot());
- CppRefactoringFilePtr targetFile = refactoring.file(m_loc.fileName());
+ if (!m_loc.isValid())
+ m_loc = insertLocationForMethodDefinition(m_decl, true, refactoring, m_targetFileName);
+ QTC_ASSERT(m_loc.isValid(), return);
+ CppRefactoringFilePtr targetFile = refactoring.file(m_loc.fileName());
Overview oo = CppCodeStyleSettings::currentProjectCodeStyleOverview();
oo.showFunctionSignatures = true;
oo.showReturnTypes = true;
@@ -2555,8 +2590,9 @@ public:
private:
Declaration *m_decl;
- const InsertionLocation m_loc;
+ InsertionLocation m_loc;
const DefPos m_defpos;
+ const QString m_targetFileName;
};
} // anonymous namespace
@@ -2585,53 +2621,52 @@ void InsertDefFromDecl::match(const CppQuickFixInterface &interface, QuickFixOpe
return;
}
- InsertDefOperation *op = 0;
- bool isHeaderFile = false;
- const QString cppFileName = correspondingHeaderOrSource(
- interface->fileName(), &isHeaderFile);
- InsertionLocation loc;
-
// Insert Position: Implementation File
- if (isHeaderFile && !cppFileName.isEmpty()) {
+ InsertDefOperation *op = 0;
+ ProjectFile::Kind kind = ProjectFile::classify(interface->fileName());
+ const bool isHeaderFile = ProjectFile::isHeader(kind);
+ if (isHeaderFile) {
CppRefactoringChanges refactoring(interface->snapshot());
- loc = insertLocationForMethodDefinition(decl, refactoring,
- cppFileName);
- if (loc.isValid()) {
- op = new InsertDefOperation(interface, decl, loc,
- DefPosImplementationFile);
- result.append(CppQuickFixOperation::Ptr(op));
+ InsertionPointLocator locator(refactoring);
+ // find appropriate implementation file, but do not use this
+ // location, because insertLocationForMethodDefinition() should
+ // be used in perform() to get consistent insert positions.
+ foreach (const InsertionLocation &location,
+ locator.methodDefinition(decl, false, QString())) {
+ if (location.isValid()) {
+ op = new InsertDefOperation(interface, decl,
+ InsertionLocation(),
+ DefPosImplementationFile,
+ location.fileName());
+ result.append(CppQuickFixOperation::Ptr(op));
+ break;
+ }
}
}
- // Dealing with a free function
- const CppRefactoringFilePtr file = interface->currentFile();
- unsigned line, column;
- if (func->enclosingClass() == 0) {
- file->lineAndColumn(file->endOf(simpleDecl), &line, &column);
- loc = InsertionLocation(interface->fileName(), QLatin1String(""),
- QLatin1String(""), line, column);
- op = new InsertDefOperation(interface, decl, loc,
- DefPosInsideClass, true);
- result.append(CppQuickFixOperation::Ptr(op));
- return;
- }
+ // Determine if we are dealing with a free function
+ const bool isFreeFunction = func->enclosingClass() == 0;
// Insert Position: Outside Class
- CppRefactoringChanges refactoring(interface->snapshot());
- loc = insertLocationForMethodDefinition(decl, refactoring,
- interface->fileName());
- if (loc.isValid()) {
- op = new InsertDefOperation(interface, decl, loc,
- DefPosOutsideClass);
+ if (!isFreeFunction) {
+ op = new InsertDefOperation(interface, decl, InsertionLocation(),
+ DefPosOutsideClass,
+ interface->fileName());
result.append(CppQuickFixOperation::Ptr(op));
}
// Insert Position: Inside Class
+ // Determine insert location direct after the declaration.
+ unsigned line, column;
+ const CppRefactoringFilePtr file = interface->currentFile();
file->lineAndColumn(file->endOf(simpleDecl), &line, &column);
- loc = InsertionLocation(interface->fileName(), QLatin1String(""),
- QLatin1String(""), line, column);
- op = new InsertDefOperation(interface, decl, loc, DefPosInsideClass);
+ const InsertionLocation loc
+ = InsertionLocation(interface->fileName(), QString(), QString(),
+ line, column);
+ op = new InsertDefOperation(interface, decl, loc, DefPosInsideClass,
+ QString() , isFreeFunction);
result.append(CppQuickFixOperation::Ptr(op));
+
return;
}
}
@@ -2657,7 +2692,7 @@ public:
, m_classDecl(0)
, m_offerQuickFix(true)
{
- setDescription(QuickFixFactory::tr("Create Getter and Setter Member Functions"));
+ setDescription(TextEditor::QuickFixFactory::tr("Create Getter and Setter Member Functions"));
const QList &path = interface->path();
// We expect something like
@@ -2884,17 +2919,17 @@ public:
currChanges.insert(declInsertPos, declaration);
if (sameFile) {
- const int pos = currentFile->endOf(m_classDecl) + 1;
- unsigned line, column;
- currentFile->lineAndColumn(pos, &line, &column);
- const int insertPos = currentFile->position(line + 1, 1) - 1;
- currChanges.insert(insertPos < 0 ? pos : insertPos, implementation);
+ InsertionLocation loc = insertLocationForMethodDefinition(symbol, false, refactoring,
+ currentFile->fileName());
+ currChanges.insert(currentFile->position(loc.line(), loc.column()), implementation);
} else {
- CppRefactoringChanges implRefactoring(snapshot());
- CppRefactoringFilePtr implFile = implRefactoring.file(implFileName);
+ CppRefactoringChanges implRef(snapshot());
+ CppRefactoringFilePtr implFile = implRef.file(implFileName);
ChangeSet implChanges;
- const int implInsertPos = implFile->document()->characterCount() - 1;
- implChanges.insert(implInsertPos, implementation);
+ InsertionLocation loc = insertLocationForMethodDefinition(symbol, false,
+ implRef, implFileName);
+ const int implInsertPos = implFile->position(loc.line(), loc.column());
+ implChanges.insert(implFile->position(loc.line(), loc.column()), implementation);
implFile->setChangeSet(implChanges);
implFile->appendIndentRange(
ChangeSet::Range(implInsertPos, implInsertPos + implementation.size()));
@@ -3485,7 +3520,7 @@ public:
, m_signalName(signalName)
, m_storageName(storageName)
{
- setDescription(QuickFixFactory::tr("Generate Missing Q_PROPERTY Members..."));
+ setDescription(TextEditor::QuickFixFactory::tr("Generate Missing Q_PROPERTY Members..."));
}
void perform()
@@ -3748,8 +3783,8 @@ public:
: refactoring.file(m_cppFileName);
// Determine file, insert position and scope
- InsertionLocation l = insertLocationForMethodDefinition(m_func, refactoring,
- toFile->fileName());
+ InsertionLocation l
+ = insertLocationForMethodDefinition(m_func, false, refactoring, toFile->fileName());
const QString prefix = l.prefix();
const QString suffix = l.suffix();
const int insertPos = toFile->position(l.line(), l.column());
@@ -4163,11 +4198,13 @@ void AssignToLocalVariable::match(const CppQuickFixInterface &interface, QuickFi
return;
if (path.at(idx)->asMemInitializer())
return;
- if (path.at(i - 1)->asBinaryExpression())
+ }
+ for (int a = i - 1; a > 0; --a) {
+ if (path.at(a)->asBinaryExpression())
return;
- if (path.at(i - 1)->asReturnStatement())
+ if (path.at(a)->asReturnStatement())
return;
- if (path.at(i - 1)->asCall())
+ if (path.at(a)->asCall())
return;
}
@@ -4201,11 +4238,14 @@ void AssignToLocalVariable::match(const CppQuickFixInterface &interface, QuickFi
return;
if (path.at(idx)->asMemInitializer())
return;
- if (path.at(i - 1)->asReturnStatement())
+ }
+ for (int a = i - 1; a > 0; --a) {
+ if (path.at(a)->asReturnStatement())
return;
- if (path.at(i - 1)->asCall())
+ if (path.at(a)->asCall())
return;
}
+
if (NamedTypeSpecifierAST *ts = path.at(i + 2)->asNamedTypeSpecifier()) {
nameAST = ts->name->asSimpleName();
visibleNameAST = nameAST;
diff --git a/src/plugins/cppeditor/cppquickfixes.h b/src/plugins/cppeditor/cppquickfixes.h
index fa9c7cc97dc..9cc84c6b5da 100644
--- a/src/plugins/cppeditor/cppquickfixes.h
+++ b/src/plugins/cppeditor/cppquickfixes.h
@@ -55,6 +55,14 @@ using namespace CppTools;
using namespace CPlusPlus;
using namespace TextEditor;
+///
+/// Adding New Quick Fixes
+///
+/// When adding new Quick Fixes, make sure that the match() function is "cheap".
+/// Otherwise, since the match() functions are also called to generate context menu
+/// entries, the user might experience a delay opening the context menu.
+///
+
namespace CppEditor {
namespace Internal {
diff --git a/src/plugins/cpptools/builtinindexingsupport.cpp b/src/plugins/cpptools/builtinindexingsupport.cpp
index e2b4ffb8ee8..cefa6894f81 100644
--- a/src/plugins/cpptools/builtinindexingsupport.cpp
+++ b/src/plugins/cpptools/builtinindexingsupport.cpp
@@ -163,7 +163,8 @@ BuiltinIndexingSupport::BuiltinIndexingSupport()
BuiltinIndexingSupport::~BuiltinIndexingSupport()
{}
-QFuture BuiltinIndexingSupport::refreshSourceFiles(const QStringList &sourceFiles)
+QFuture BuiltinIndexingSupport::refreshSourceFiles(const QStringList &sourceFiles,
+ CppModelManagerInterface::ProgressNotificationMode mode)
{
CppModelManager *mgr = CppModelManager::instance();
const WorkingCopy workingCopy = mgr->workingCopy();
@@ -189,7 +190,7 @@ QFuture BuiltinIndexingSupport::refreshSourceFiles(const QStringList &sour
m_synchronizer.addFuture(result);
- if (sourceFiles.count() > 1) {
+ if (mode == CppModelManagerInterface::ForcedProgressNotification || sourceFiles.count() > 1) {
Core::ICore::progressManager()->addTask(result,
QCoreApplication::translate("CppTools::Internal::BuiltinIndexingSupport", "Parsing"),
QLatin1String(CppTools::Constants::TASK_INDEX));
diff --git a/src/plugins/cpptools/builtinindexingsupport.h b/src/plugins/cpptools/builtinindexingsupport.h
index 53b70c40dbc..df4a9c91084 100644
--- a/src/plugins/cpptools/builtinindexingsupport.h
+++ b/src/plugins/cpptools/builtinindexingsupport.h
@@ -46,8 +46,10 @@ public:
BuiltinIndexingSupport();
~BuiltinIndexingSupport();
- virtual QFuture refreshSourceFiles(const QStringList &sourceFiles);
- virtual SymbolSearcher *createSymbolSearcher(SymbolSearcher::Parameters parameters, QSet fileNames);
+ virtual QFuture refreshSourceFiles(const QStringList &sourceFiles,
+ CppModelManagerInterface::ProgressNotificationMode mode);
+ virtual SymbolSearcher *createSymbolSearcher(SymbolSearcher::Parameters parameters,
+ QSet fileNames);
private:
QFutureSynchronizer m_synchronizer;
diff --git a/src/plugins/cpptools/cppindexingsupport.h b/src/plugins/cpptools/cppindexingsupport.h
index d6cf2121fca..c2b91817a39 100644
--- a/src/plugins/cpptools/cppindexingsupport.h
+++ b/src/plugins/cpptools/cppindexingsupport.h
@@ -32,6 +32,8 @@
#include "cpptools_global.h"
+#include "cppmodelmanagerinterface.h"
+
#include
#include
@@ -80,8 +82,10 @@ class CPPTOOLS_EXPORT CppIndexingSupport
public:
virtual ~CppIndexingSupport() = 0;
- virtual QFuture refreshSourceFiles(const QStringList &sourceFiles) = 0;
- virtual SymbolSearcher *createSymbolSearcher(SymbolSearcher::Parameters parameters, QSet fileNames) = 0;
+ virtual QFuture refreshSourceFiles(const QStringList &sourceFiles,
+ CppModelManagerInterface::ProgressNotificationMode mode) = 0;
+ virtual SymbolSearcher *createSymbolSearcher(SymbolSearcher::Parameters parameters,
+ QSet fileNames) = 0;
};
} // namespace CppTools
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index 7fa7fc3a38c..b26bb706e63 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -194,8 +194,8 @@ void CppModelManager::updateModifiedSourceFiles()
/*!
\class CppTools::CppModelManager
- \brief The CppModelManager keeps track of one CppCodeModel instance
- for each project and all related CppCodeModelPart instances.
+ \brief The CppModelManager class keeps track of one CppCodeModel instance
+ for each project and all the related CppCodeModelPart instances.
It also takes care of updating the code models when C++ files are
modified within Qt Creator.
@@ -512,7 +512,7 @@ CppModelManager::WorkingCopy CppModelManager::buildWorkingCopyList()
// add the project configuration file
QByteArray conf(pp_configuration);
conf += definedMacros();
- workingCopy.insert(configurationFileName(), QString::fromUtf8(conf));
+ workingCopy.insert(configurationFileName(), QString::fromLocal8Bit(conf));
return workingCopy;
}
@@ -522,14 +522,15 @@ CppModelManager::WorkingCopy CppModelManager::workingCopy() const
return const_cast(this)->buildWorkingCopyList();
}
-QFuture CppModelManager::updateSourceFiles(const QStringList &sourceFiles)
+QFuture CppModelManager::updateSourceFiles(const QStringList &sourceFiles,
+ ProgressNotificationMode mode)
{
if (sourceFiles.isEmpty() || !m_indexerEnabled)
return QFuture();
if (m_indexingSupporter)
- m_indexingSupporter->refreshSourceFiles(sourceFiles);
- return m_internalIndexingSupport->refreshSourceFiles(sourceFiles);
+ m_indexingSupporter->refreshSourceFiles(sourceFiles, mode);
+ return m_internalIndexingSupport->refreshSourceFiles(sourceFiles, mode);
}
QList CppModelManager::projectInfos() const
diff --git a/src/plugins/cpptools/cppmodelmanager.h b/src/plugins/cpptools/cppmodelmanager.h
index 7691daeab32..8e51b5e373d 100644
--- a/src/plugins/cpptools/cppmodelmanager.h
+++ b/src/plugins/cpptools/cppmodelmanager.h
@@ -67,7 +67,8 @@ public:
static CppModelManager *instance();
- virtual QFuture updateSourceFiles(const QStringList &sourceFiles);
+ virtual QFuture updateSourceFiles(const QStringList &sourceFiles,
+ ProgressNotificationMode mode = ReservedProgressNotification);
virtual WorkingCopy workingCopy() const;
virtual QList projectInfos() const;
diff --git a/src/plugins/cpptools/cppmodelmanagerinterface.cpp b/src/plugins/cpptools/cppmodelmanagerinterface.cpp
index c6b535d98d9..d3e34ca3202 100644
--- a/src/plugins/cpptools/cppmodelmanagerinterface.cpp
+++ b/src/plugins/cpptools/cppmodelmanagerinterface.cpp
@@ -35,6 +35,20 @@
#include
+/*!
+ \enum CppTools::CppModelManagerInterface::ProgressNotificationMode
+
+ This enum type specifies whether a progress bar notification should be
+ shown if more than one file is requested to update via
+ CppModelManagerInterface::updateSourceFiles().
+
+ \value ForcedProgressNotification
+ Notify regardless of the number of files requested for update.
+
+ \value ReservedProgressNotification
+ Notify only if more than one file is requested for update.
+*/
+
/*!
\enum CppTools::CppModelManagerInterface::QtVersion
Allows C++ parser engine to inject headers or change inner settings as
diff --git a/src/plugins/cpptools/cppmodelmanagerinterface.h b/src/plugins/cpptools/cppmodelmanagerinterface.h
index 7f16d8151ea..f9d299b9377 100644
--- a/src/plugins/cpptools/cppmodelmanagerinterface.h
+++ b/src/plugins/cpptools/cppmodelmanagerinterface.h
@@ -117,6 +117,12 @@ class CPPTOOLS_EXPORT CppModelManagerInterface : public QObject
public:
+ // Documented in source file.
+ enum ProgressNotificationMode {
+ ForcedProgressNotification,
+ ReservedProgressNotification
+ };
+
class CPPTOOLS_EXPORT ProjectInfo
{
public:
@@ -212,6 +218,8 @@ public:
virtual void updateProjectInfo(const ProjectInfo &pinfo) = 0;
virtual QList projectPart(const QString &fileName) const = 0;
+ virtual QStringList includePaths() = 0;
+
virtual void addEditorSupport(CppTools::AbstractEditorSupport *editorSupport) = 0;
virtual void removeEditorSupport(CppTools::AbstractEditorSupport *editorSupport) = 0;
virtual CppEditorSupport *cppEditorSupport(TextEditor::BaseTextEditor *editor) = 0;
@@ -249,8 +257,10 @@ Q_SIGNALS:
void projectPartsUpdated(ProjectExplorer::Project *project);
public Q_SLOTS:
+
virtual void updateModifiedSourceFiles() = 0;
- virtual QFuture updateSourceFiles(const QStringList &sourceFiles) = 0;
+ virtual QFuture updateSourceFiles(const QStringList &sourceFiles,
+ ProgressNotificationMode mode = ReservedProgressNotification) = 0;
virtual void GC() = 0;
};
diff --git a/src/plugins/cpptools/cpppointerdeclarationformatter.h b/src/plugins/cpptools/cpppointerdeclarationformatter.h
index e8af400435c..0419f8257ef 100644
--- a/src/plugins/cpptools/cpppointerdeclarationformatter.h
+++ b/src/plugins/cpptools/cpppointerdeclarationformatter.h
@@ -46,7 +46,8 @@ typedef Utils::ChangeSet::Range Range;
/*!
\class CppTools::PointerDeclarationFormatter
- \brief Rewrite pointer or reference declarations accordingly to an Overview.
+ \brief The PointerDeclarationFormatter class rewrites pointer or reference
+ declarations to an Overview.
The following constructs are supported:
\list
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp
index 45d970d4755..86efe3bd26c 100644
--- a/src/plugins/cpptools/cpptoolseditorsupport.cpp
+++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp
@@ -33,6 +33,7 @@
#include
+#include
#include
#include
@@ -113,12 +114,19 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor
, m_updateDocumentInterval(UpdateDocumentDefaultInterval)
, m_revision(0)
, m_cachedContentsEditorRevision(-1)
+ , m_fileIsBeingReloaded(false)
, m_initialized(false)
, m_lastHighlightRevision(0)
+ , m_highlightingSupport(modelManager->highlightingSupport(textEditor))
{
connect(m_modelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
this, SLOT(onDocumentUpdated(CPlusPlus::Document::Ptr)));
+ if (m_highlightingSupport && m_highlightingSupport->requiresSemanticInfo()) {
+ connect(this, SIGNAL(semanticInfoUpdated(CppTools::SemanticInfo)),
+ this, SLOT(startHighlighting()));
+ }
+
m_updateDocumentTimer = new QTimer(this);
m_updateDocumentTimer->setSingleShot(true);
m_updateDocumentTimer->setInterval(m_updateDocumentInterval);
@@ -135,6 +143,13 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor
connect(m_textEditor->document(), SIGNAL(mimeTypeChanged()),
this, SLOT(onMimeTypeChanged()));
+
+ connect(m_textEditor->document(), SIGNAL(aboutToReload()),
+ this, SLOT(onAboutToReload()));
+ connect(m_textEditor->document(), SIGNAL(reloadFinished(bool)),
+ this, SLOT(onReloadFinished()));
+
+ updateDocument();
}
CppEditorSupport::~CppEditorSupport()
@@ -154,7 +169,7 @@ QString CppEditorSupport::fileName() const
QString CppEditorSupport::contents() const
{
const int editorRev = editorRevision();
- if (m_cachedContentsEditorRevision != editorRev) {
+ if (m_cachedContentsEditorRevision != editorRev && !m_fileIsBeingReloaded) {
m_cachedContentsEditorRevision = editorRev;
m_cachedContents = m_textEditor->textDocument()->contents();
}
@@ -225,9 +240,11 @@ void CppEditorSupport::updateDocumentNow()
} else {
m_updateDocumentTimer->stop();
- if (m_highlightingSupport && !m_highlightingSupport->requiresSemanticInfo()) {
+ if (m_fileIsBeingReloaded)
+ return;
+
+ if (m_highlightingSupport && !m_highlightingSupport->requiresSemanticInfo())
startHighlighting();
- }
const QStringList sourceFiles(m_textEditor->document()->fileName());
m_documentParser = m_modelManager->updateSourceFiles(sourceFiles);
@@ -497,3 +514,16 @@ void CppEditorSupport::onMimeTypeChanged()
updateDocumentNow();
}
+
+void CppEditorSupport::onAboutToReload()
+{
+ QTC_CHECK(!m_fileIsBeingReloaded);
+ m_fileIsBeingReloaded = true;
+}
+
+void CppEditorSupport::onReloadFinished()
+{
+ QTC_CHECK(m_fileIsBeingReloaded);
+ m_fileIsBeingReloaded = false;
+ updateDocument();
+}
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.h b/src/plugins/cpptools/cpptoolseditorsupport.h
index a63ee7e6e5a..f3bce1b5464 100644
--- a/src/plugins/cpptools/cpptoolseditorsupport.h
+++ b/src/plugins/cpptools/cpptoolseditorsupport.h
@@ -121,6 +121,9 @@ signals:
private slots:
void onMimeTypeChanged();
+ void onAboutToReload();
+ void onReloadFinished();
+
void updateDocument();
void updateDocumentNow();
@@ -166,6 +169,7 @@ private:
// content caching
mutable QString m_cachedContents;
mutable int m_cachedContentsEditorRevision;
+ bool m_fileIsBeingReloaded;
QTimer *m_updateEditorTimer;
EditorUpdates m_editorUpdates;
diff --git a/src/plugins/cpptools/searchsymbols.cpp b/src/plugins/cpptools/searchsymbols.cpp
index 9fe3a6104e5..1350888e0ec 100644
--- a/src/plugins/cpptools/searchsymbols.cpp
+++ b/src/plugins/cpptools/searchsymbols.cpp
@@ -139,9 +139,12 @@ bool SearchSymbols::visit(Namespace *symbol)
bool SearchSymbols::visit(Declaration *symbol)
{
if (!(symbolsToSearchFor & SymbolSearcher::Declarations)) {
- // if we're searching for functions, still allow function declarations to show up.
+ // if we're searching for functions, still allow signal declarations to show up.
if (symbolsToSearchFor & SymbolSearcher::Functions) {
- if (!symbol->type()->asFunctionType())
+ Function *funTy = symbol->type()->asFunctionType();
+ if (!funTy)
+ return false;
+ if (!funTy->isSignal())
return false;
} else {
return false;
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index efeac79cc5f..d66f6085e92 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -2243,7 +2243,7 @@ void CdbEngine::processStop(const GdbMi &stopReason, bool conditionalBreakPointT
executeStepOut();
return;
case ParseStackWow64:
- postBuiltinCommand("!wow64exts.info", 0, &CdbEngine::handleCheckWow64,
+ postBuiltinCommand("lm m wow64", 0, &CdbEngine::handleCheckWow64,
0, qVariantFromValue(stack));
break;
}
@@ -2275,15 +2275,17 @@ void CdbEngine::processStop(const GdbMi &stopReason, bool conditionalBreakPointT
void CdbEngine::handleCheckWow64(const CdbBuiltinCommandPtr &cmd)
{
- // Using the stack command from the wow64exts cdb extension to
- // check if there is a 32bit subsystem in this debuggee.
- if (cmd->reply.first().startsWith("Could not get the address of the 32bit PEB")) {
- m_wow64State = noWow64Stack;
- if (cmd->cookie.canConvert())
- parseStackTrace(qvariant_cast(cmd->cookie), false);
+ // Using the lm (list modules) command to check if there is a 32 bit subsystem in this debuggee.
+ // expected reply if there is a 32 bit stack:
+ // start end module name
+ // 00000000`77490000 00000000`774d5000 wow64 (deferred)
+ if (cmd->reply.value(1).contains("wow64")) {
+ postBuiltinCommand("k", 0, &CdbEngine::ensureUsing32BitStackInWow64, 0, cmd->cookie);
return;
}
- postBuiltinCommand("k", 0, &CdbEngine::ensureUsing32BitStackInWow64, 0, cmd->cookie);
+ m_wow64State = noWow64Stack;
+ if (cmd->cookie.canConvert())
+ parseStackTrace(qvariant_cast(cmd->cookie), false);
}
void CdbEngine::ensureUsing32BitStackInWow64(const CdbEngine::CdbBuiltinCommandPtr &cmd)
@@ -2990,7 +2992,7 @@ void CdbEngine::handleStackTrace(const CdbExtensionCommandPtr &command)
GdbMi data;
data.fromString(command->reply);
if (parseStackTrace(data, false) == ParseStackWow64) {
- postBuiltinCommand("!wow64exts.info", 0, &CdbEngine::handleCheckWow64,
+ postBuiltinCommand("lm m wow64", 0, &CdbEngine::handleCheckWow64,
0, qVariantFromValue(data));
}
postCommandSequence(command->commandSequence);
diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs
index 081fe8b4600..bafa5e08280 100644
--- a/src/plugins/debugger/debugger.qbs
+++ b/src/plugins/debugger/debugger.qbs
@@ -268,7 +268,7 @@ QtcPlugin {
Group {
name: "RegistryAccess"
- condition: qbs.targetOS == "windows"
+ condition: qbs.targetOS.contains("windows")
prefix: "../../shared/registryaccess/"
files: [
"registryaccess.cpp",
@@ -278,7 +278,7 @@ QtcPlugin {
Group {
name: "RegisterPostMortem"
- condition: qbs.targetOS == "windows"
+ condition: qbs.targetOS.contains("windows")
files: [
"registerpostmortemaction.cpp",
"registerpostmortemaction.h",
@@ -287,7 +287,7 @@ QtcPlugin {
Group {
name: "LLDBOptions"
- condition: qbs.targetOS == "mac"
+ condition: qbs.targetOS.contains("mac")
files: [
"lldblib/lldboptionspage.cpp",
"lldblib/lldboptionspage.h",
@@ -296,7 +296,7 @@ QtcPlugin {
}
Properties {
- condition: qbs.targetOS == "windows"
+ condition: qbs.targetOS.contains("windows")
cpp.dynamicLibraries: [
"advapi32",
"ole32",
diff --git a/src/plugins/debugger/debuggerkitconfigwidget.cpp b/src/plugins/debugger/debuggerkitconfigwidget.cpp
index 4ec485a8386..4992bdc789e 100644
--- a/src/plugins/debugger/debuggerkitconfigwidget.cpp
+++ b/src/plugins/debugger/debuggerkitconfigwidget.cpp
@@ -95,6 +95,7 @@ QString DebuggerKitConfigWidget::displayName() const
void DebuggerKitConfigWidget::makeReadOnly()
{
m_editButton->setEnabled(false);
+ m_autoDetectButton->setEnabled(false);
}
void DebuggerKitConfigWidget::refresh()
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 68a42784fff..982079ac115 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -154,7 +154,7 @@
/*!
\class Debugger::DebuggerEngine
- \brief Base class of a debugger engine.
+ \brief The DebuggerEngine class is the base class of a debugger engine.
Note: the Debugger process itself and any helper processes like
gdbserver are referred to as 'Engine', whereas the debugged process
@@ -322,7 +322,8 @@ sg1: }
/*!
\class Debugger::Internal::GdbEngine
- \brief Implementation of Debugger::Engine driving a gdb executable.
+ \brief The GdbEngine class implements Debugger::Engine driving a GDB
+ executable.
GdbEngine specific startup. All happens in EngineSetupRequested state:
@@ -3459,11 +3460,6 @@ void DebuggerPlugin::extensionsInitialized()
theDebuggerCore->extensionsInitialized();
}
-bool DebuggerPlugin::isActiveDebugLanguage(int language)
-{
- return theDebuggerCore->isActiveDebugLanguage(language);
-}
-
DebuggerMainWindow *DebuggerPlugin::mainWindow()
{
return theDebuggerCore->m_mainWindow;
diff --git a/src/plugins/debugger/debuggerplugin.h b/src/plugins/debugger/debuggerplugin.h
index e00a40304a9..1c461c8b764 100644
--- a/src/plugins/debugger/debuggerplugin.h
+++ b/src/plugins/debugger/debuggerplugin.h
@@ -60,7 +60,6 @@ public:
//static void startDebugger(ProjectExplorer::RunControl *runControl);
// Used by QmlJSInspector.
- static bool isActiveDebugLanguage(int language);
static DebuggerMainWindow *mainWindow();
static QAction *visibleDebugAction();
diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp
index c5c418a22e2..b837ef80ce4 100644
--- a/src/plugins/debugger/debuggerprotocol.cpp
+++ b/src/plugins/debugger/debuggerprotocol.cpp
@@ -38,6 +38,17 @@
namespace Debugger {
namespace Internal {
+uchar fromhex(uchar c)
+{
+ if (c >= '0' && c <= '9')
+ return c - '0';
+ if (c >= 'a' && c <= 'z')
+ return 10 + c - 'a';
+ if (c >= 'A' && c <= 'Z')
+ return 10 + c - 'A';
+ return -1;
+}
+
void skipCommas(const char *&from, const char *to)
{
while (*from == ',' && from != to)
@@ -120,6 +131,26 @@ QByteArray GdbMi::parseCString(const char *&from, const char *to)
case 'v': *dst++ = '\v'; break;
case '"': *dst++ = '"'; break;
case '\\': *dst++ = '\\'; break;
+ case 'x': {
+ c = *src++;
+ int chars = 0;
+ uchar prod = 0;
+ while (true) {
+ uchar val = fromhex(c);
+ if (val == uchar(-1))
+ break;
+ prod = prod * 16 + val;
+ if (++chars == 3 || src == end)
+ break;
+ c = *src++;
+ }
+ if (!chars) {
+ qDebug() << "MI Parse Error, unrecognized hex escape";
+ return QByteArray();
+ }
+ *dst++ = prod;
+ break;
+ }
default:
{
int chars = 0;
diff --git a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
index 93cbed5375e..5896140b369 100644
--- a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
+++ b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
@@ -68,7 +68,8 @@ typedef DebuggerSourcePathMappingWidget::SourcePathMap SourcePathMap;
/*!
\class Debugger::Internal::SourcePathMappingModel
- \brief Model for DebuggerSourcePathMappingWidget.
+ \brief The SourcePathMappingModel class is a model for the
+ DebuggerSourcePathMappingWidget class.
Maintains mappings and a dummy placeholder row for adding new mappings.
*/
@@ -189,7 +190,8 @@ void SourcePathMappingModel::setTarget(int row, const QString &t)
/*!
\class Debugger::Internal::DebuggerSourcePathMappingWidget
- \brief Widget for maintaining a set of source path mappings for the debugger.
+ \brief The DebuggerSourcePathMappingWidget class is a widget for maintaining
+ a set of source path mappings for the debugger.
Path mappings to be applied using source path substitution in gdb.
*/
diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp
index 5237962ef43..75e0a2b7cae 100644
--- a/src/plugins/debugger/debuggertooltipmanager.cpp
+++ b/src/plugins/debugger/debuggertooltipmanager.cpp
@@ -518,8 +518,11 @@ void DebuggerToolTipWidget::toolButtonClicked()
/*!
\class Debugger::Internal::DebuggerToolTipContext
- File name and position where the tooltip is anchored. Redundant position/line column
- information is used to detect if the underlying file has been changed
+ \brief The DebuggerToolTipContext class specifies the file name and
+ position where the tooltip is anchored.
+
+ Uses redundant position or line column information to detect whether
+ the underlying file has been changed
on restoring.
*/
@@ -552,7 +555,10 @@ QDebug operator<<(QDebug d, const DebuggerToolTipContext &c)
/*!
\class Debugger::Internal::DebuggerToolTipWidget
- A debugger tooltip is pinnable. It goes from the unpinned state (button
+ \brief The DebuggerToolTipWidget class is a pinnable debugger tool tip
+ widget.
+
+ The debugger tooltip goes from the unpinned state (button
showing 'Pin') to the pinned state (button showing 'Close').
It consists of a title toolbar and a vertical main layout.
The widget has the ability to save/restore tree model contents to XML.
@@ -814,7 +820,8 @@ void DebuggerToolTipWidget::saveSessionData(QXmlStreamWriter &w) const
/*!
\class Debugger::Internal::TooltipFilterModel
- \brief Model for tooltips filtering an item on the watchhandler matching its tree on the iname.
+ \brief The TooltipFilterModel class is a model for tooltips filtering an
+ item on the watchhandler matching its tree on the iname.
In addition, suppress the model's tooltip data to avoid a tooltip on a tooltip.
*/
@@ -857,7 +864,8 @@ bool TooltipFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sour
/*!
\class Debugger::Internal::DebuggerToolTipTreeView
- A treeview that adapts its size to the model contents (also while expanding)
+ \brief The DebuggerToolTipTreeView class is a treeview that adapts its size
+ to the model contents (also while expanding)
to be used within DebuggerTreeViewToolTipWidget.
*/
@@ -1074,7 +1082,8 @@ QString DebuggerToolTipWidget::clipboardContents() const
/*!
\class Debugger::Internal::DebuggerToolTipManager
- Manages the pinned tooltip widgets, listens on editor scroll and main window move
+ \brief The DebuggerToolTipManager class manages the pinned tooltip widgets,
+ listens on editor scroll and main window move
events and takes care of repositioning the tooltips.
Listens to editor change and mode change. In debug mode, if there tooltips
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index e65dde09cb8..b3b6e91e05a 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -4774,6 +4774,13 @@ void GdbEngine::startGdb(const QStringList &args)
gdbArgs << _("mi");
if (!debuggerCore()->boolSetting(LoadGdbInit))
gdbArgs << _("-n");
+ if (HostOsInfo::isWindowsHost()) {
+ const QFileInfo gdbBinaryFile(m_gdb);
+ const QString gdbDirectory(gdbBinaryFile.absolutePath());
+ const QString gdbDataDir = gdbDirectory + _("/data-directory");
+ if (QFile::exists(gdbDataDir))
+ gdbArgs << _("--data-directory") << gdbDataDir;
+ }
gdbArgs += args;
connect(gdbProc(), SIGNAL(error(QProcess::ProcessError)),
diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp
index 88f71363c4d..020dfc669f7 100644
--- a/src/plugins/debugger/lldb/lldbengine.cpp
+++ b/src/plugins/debugger/lldb/lldbengine.cpp
@@ -342,7 +342,8 @@ bool LldbEngine::attemptBreakpointSynchronizationHelper(Command *cmd)
cmd->beginList("bkpts");
foreach (BreakpointModelId id, handler->engineBreakpointIds(this)) {
const BreakpointResponse &response = handler->response(id);
- switch (handler->state(id)) {
+ const BreakpointState bpState = handler->state(id);
+ switch (bpState) {
case BreakpointNew:
// Should not happen once claimed.
QTC_CHECK(false);
@@ -354,12 +355,14 @@ bool LldbEngine::attemptBreakpointSynchronizationHelper(Command *cmd)
.arg("modelid", id.toByteArray())
.arg("type", handler->type(id))
.arg("ignorecount", handler->ignoreCount(id))
- .arg("condition", handler->condition(id))
+ .arg("condition", handler->condition(id).toHex())
.arg("function", handler->functionName(id).toUtf8())
.arg("oneshot", handler->isOneShot(id))
.arg("enabled", handler->isEnabled(id))
.arg("file", handler->fileName(id).toUtf8())
.arg("line", handler->lineNumber(id))
+ .arg("address", handler->address(id))
+ .arg("expression", handler->expression(id))
.endGroup();
handler->notifyBreakpointInsertProceeding(id);
break;
@@ -371,12 +374,14 @@ bool LldbEngine::attemptBreakpointSynchronizationHelper(Command *cmd)
.arg("lldbid", response.id.toByteArray())
.arg("type", handler->type(id))
.arg("ignorecount", handler->ignoreCount(id))
- .arg("condition", handler->condition(id))
+ .arg("condition", handler->condition(id).toHex())
.arg("function", handler->functionName(id).toUtf8())
.arg("oneshot", handler->isOneShot(id))
.arg("enabled", handler->isEnabled(id))
.arg("file", handler->fileName(id).toUtf8())
.arg("line", handler->lineNumber(id))
+ .arg("address", handler->address(id))
+ .arg("expression", handler->expression(id))
.endGroup();
handler->notifyBreakpointChangeProceeding(id);
break;
@@ -394,10 +399,10 @@ bool LldbEngine::attemptBreakpointSynchronizationHelper(Command *cmd)
case BreakpointRemoveProceeding:
case BreakpointInserted:
case BreakpointDead:
- QTC_CHECK(false);
+ QTC_ASSERT(false, qDebug() << "UNEXPECTED STATE" << bpState << "FOR BP " << id);
break;
default:
- QTC_ASSERT(false, qDebug() << "UNKNOWN STATE" << id << state());
+ QTC_ASSERT(false, qDebug() << "UNKNOWN STATE" << bpState << "FOR BP" << id);
}
}
cmd->endList();
@@ -433,7 +438,7 @@ void LldbEngine::updateBreakpointData(const GdbMi &bkpt, bool added)
response.address = 0;
response.enabled = bkpt["enabled"].toInt();
response.ignoreCount = bkpt["ignorecount"].toInt();
- response.condition = bkpt["condition"].data();
+ response.condition = QByteArray::fromHex(bkpt["condition"].data());
response.hitCount = bkpt["hitcount"].toInt();
if (added) {
@@ -814,14 +819,16 @@ void LldbEngine::readLldbStandardError()
QByteArray err = m_lldbProc.readAllStandardError();
qDebug() << "\nLLDB STDERR" << err;
//qWarning() << "Unexpected lldb stderr:" << err;
- showMessage(_("Lldb stderr: " + err));
- m_lldbProc.kill();
+ showMessage(_(err), LogError);
+ if (!err.startsWith("warning:"))
+ m_lldbProc.kill();
}
void LldbEngine::readLldbStandardOutput()
{
QByteArray out = m_lldbProc.readAllStandardOutput();
- showMessage(_("Lldb stdout: " + out));
+ //showMessage(_("Lldb stdout: " + out));
+ showMessage(_(out), LogDebug);
m_inbuffer.append(out);
while (true) {
int pos = m_inbuffer.indexOf("@\n");
diff --git a/src/plugins/debugger/logwindow.cpp b/src/plugins/debugger/logwindow.cpp
index 5177150b4da..f54f1c5611d 100644
--- a/src/plugins/debugger/logwindow.cpp
+++ b/src/plugins/debugger/logwindow.cpp
@@ -306,13 +306,18 @@ public slots:
{
QString needle = QString::number(i) + QLatin1Char('^');
QString needle2 = QLatin1Char('>') + needle;
+ QString needle3 = QString::fromLatin1("dtoken(\"%1\")@").arg(i);
QTextCursor cursor(document());
do {
- cursor = document()->find(needle, cursor);
- if (cursor.isNull())
- break; // Not found.
+ QTextCursor newCursor = document()->find(needle, cursor);
+ if (newCursor.isNull()) {
+ newCursor = document()->find(needle3, cursor);
+ if (newCursor.isNull())
+ break; // Not found.
+ }
+ cursor = newCursor;
const QString line = cursor.block().text();
- if (line.startsWith(needle) || line.startsWith(needle2)) {
+ if (line.startsWith(needle) || line.startsWith(needle2) || line.startsWith(needle3)) {
setFocus();
setTextCursor(cursor);
ensureCursorVisible();
diff --git a/src/plugins/debugger/memoryview.cpp b/src/plugins/debugger/memoryview.cpp
index a03b3a8976e..38d10d44d42 100644
--- a/src/plugins/debugger/memoryview.cpp
+++ b/src/plugins/debugger/memoryview.cpp
@@ -41,7 +41,7 @@ namespace Internal {
/*!
\class Debugger::Internal::MemoryView
- \brief Base class for memory view tool windows
+ \brief The MemoryView class is a base class for memory view tool windows.
Small tool-window that stays on top and displays a chunk of memory
based on the widget provided by the Bin editor plugin.
@@ -121,7 +121,8 @@ void MemoryView::setMarkup(const QList &m)
/*!
\class Debugger::Internal::RegisterMemoryView
- \brief Memory view that shows the memory around the contents of a register
+ \brief The RegisterMemoryView class provides a memory view that shows the
+ memory around the contents of a register
(such as stack pointer, program counter),
tracking changes of the register value.
diff --git a/src/plugins/debugger/ptracepreload.qbs b/src/plugins/debugger/ptracepreload.qbs
index ee9835f19db..d92fd2a8bb8 100644
--- a/src/plugins/debugger/ptracepreload.qbs
+++ b/src/plugins/debugger/ptracepreload.qbs
@@ -3,7 +3,7 @@ import "../../libs/QtcLibrary.qbs" as QtcLibrary
QtcLibrary {
name: "ptracepreload"
- condition: qbs.targetOS == "linux"
+ condition: qbs.targetOS.contains("linux")
cpp.dynamicLibraries: [
"dl",
diff --git a/src/plugins/debugger/snapshothandler.cpp b/src/plugins/debugger/snapshothandler.cpp
index ea088f7eaa8..4817de345e9 100644
--- a/src/plugins/debugger/snapshothandler.cpp
+++ b/src/plugins/debugger/snapshothandler.cpp
@@ -113,7 +113,8 @@ QDebug operator<<(QDebug d, const SnapshotData &f)
/*!
\class Debugger::Internal::SnapshotHandler
- \brief A model to represent the snapshots in a QTreeView.
+ \brief The SnapshotHandler class provides a model to represent the
+ snapshots in a QTreeView.
A snapshot represents a debugging session.
*/
diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp
index 18a61f63952..138a6663c9e 100644
--- a/src/plugins/debugger/stackhandler.cpp
+++ b/src/plugins/debugger/stackhandler.cpp
@@ -49,7 +49,8 @@ namespace Internal {
/*!
\class Debugger::Internal::StackHandler
- \brief A model to represent the stack in a QTreeView.
+ \brief The StackHandler class provides a model to represent the stack in a
+ QTreeView.
*/
StackHandler::StackHandler()
diff --git a/src/plugins/debugger/threadshandler.cpp b/src/plugins/debugger/threadshandler.cpp
index 19f093f95e1..4f7522e71f8 100644
--- a/src/plugins/debugger/threadshandler.cpp
+++ b/src/plugins/debugger/threadshandler.cpp
@@ -116,13 +116,17 @@ static QString threadToolTip(const ThreadData &thread)
///////////////////////////////////////////////////////////////////////
/*!
- \struct Debugger::Internal::ThreadData
- \brief A structure containing information about a single thread
+ \class Debugger::Internal::ThreadData
+ \internal
+ \brief The ThreadData class contains information
+ about a single thread.
*/
/*!
\class Debugger::Internal::ThreadsHandler
- \brief A model to represent the running threads in a QTreeView or ComboBox
+ \internal
+ \brief The ThreadsHandler class provides a model to
+ represent the running threads in a QTreeView or ComboBox.
*/
ThreadsHandler::ThreadsHandler()
diff --git a/src/plugins/designer/formwindowfile.cpp b/src/plugins/designer/formwindowfile.cpp
index fcb394ebf4e..1aa35fc4721 100644
--- a/src/plugins/designer/formwindowfile.cpp
+++ b/src/plugins/designer/formwindowfile.cpp
@@ -145,9 +145,9 @@ bool FormWindowFile::reload(QString *errorString, ReloadFlag flag, ChangeType ty
} else {
emit aboutToReload();
emit reload(errorString, m_fileName);
- if (!errorString->isEmpty())
- return false;
- emit reloaded();
+ const bool success = errorString->isEmpty();
+ emit reloadFinished(success);
+ return success;
}
return true;
}
diff --git a/src/plugins/diffeditor/diffeditor.cpp b/src/plugins/diffeditor/diffeditor.cpp
index 381339e2f30..2c1245e4390 100644
--- a/src/plugins/diffeditor/diffeditor.cpp
+++ b/src/plugins/diffeditor/diffeditor.cpp
@@ -51,9 +51,9 @@ namespace DiffEditor {
DiffEditor::DiffEditor(DiffEditorWidget *editorWidget)
: IEditor(0),
+ m_toolWidget(0),
m_file(new Internal::DiffEditorFile(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE), this)),
m_editorWidget(editorWidget),
- m_toolWidget(0),
m_entriesComboBox(0)
{
setWidget(editorWidget);
diff --git a/src/plugins/diffeditor/diffeditor.h b/src/plugins/diffeditor/diffeditor.h
index 498a909065c..735b9a988df 100644
--- a/src/plugins/diffeditor/diffeditor.h
+++ b/src/plugins/diffeditor/diffeditor.h
@@ -27,8 +27,8 @@
**
****************************************************************************/
-#ifndef DIFFEDITOREDITABLE_H
-#define DIFFEDITOREDITABLE_H
+#ifndef DIFFEDITOR_H
+#define DIFFEDITOR_H
#include "diffeditor_global.h"
#include "diffeditorwidget.h"
@@ -77,16 +77,18 @@ public slots:
private slots:
void entryActivated(int index);
+protected:
+ QToolBar *m_toolWidget;
+
private:
void updateEntryToolTip();
Internal::DiffEditorFile *m_file;
DiffEditorWidget *m_editorWidget;
- QToolBar *m_toolWidget;
QComboBox *m_entriesComboBox;
mutable QString m_displayName;
};
} // namespace DiffEditor
-#endif // DIFFEDITOREDITABLE_H
+#endif // DIFFEDITOR_H
diff --git a/src/plugins/diffeditor/diffeditor.pro b/src/plugins/diffeditor/diffeditor.pro
index 0976171af77..2fd47ec9394 100644
--- a/src/plugins/diffeditor/diffeditor.pro
+++ b/src/plugins/diffeditor/diffeditor.pro
@@ -4,15 +4,21 @@ include(../../qtcreatorplugin.pri)
HEADERS += diffeditor_global.h \
diffeditorconstants.h \
diffeditor.h \
+ diffeditorfactory.h \
diffeditorfile.h \
diffeditorplugin.h \
diffeditorwidget.h \
- differ.h
+ differ.h \
+ diffshoweditor.h \
+ diffshoweditorfactory.h
SOURCES += diffeditor.cpp \
+ diffeditorfactory.cpp \
diffeditorfile.cpp \
diffeditorplugin.cpp \
diffeditorwidget.cpp \
- differ.cpp
+ differ.cpp \
+ diffshoweditor.cpp \
+ diffshoweditorfactory.cpp
RESOURCES +=
diff --git a/src/plugins/diffeditor/diffeditor.qbs b/src/plugins/diffeditor/diffeditor.qbs
index deb8585b6ff..f9e47339630 100644
--- a/src/plugins/diffeditor/diffeditor.qbs
+++ b/src/plugins/diffeditor/diffeditor.qbs
@@ -16,6 +16,8 @@ QtcPlugin {
"diffeditor.h",
"diffeditor_global.h",
"diffeditorconstants.h",
+ "diffeditorfactory.cpp",
+ "diffeditorfactory.h",
"diffeditorfile.cpp",
"diffeditorfile.h",
"diffeditorplugin.cpp",
@@ -24,6 +26,10 @@ QtcPlugin {
"diffeditorwidget.h",
"differ.cpp",
"differ.h",
+ "diffshoweditor.cpp",
+ "diffshoweditor.h",
+ "diffshoweditorfactory.cpp",
+ "diffshoweditorfactory.h",
]
}
diff --git a/src/plugins/diffeditor/diffeditorconstants.h b/src/plugins/diffeditor/diffeditorconstants.h
index 7e602b8bc72..37e7157527f 100644
--- a/src/plugins/diffeditor/diffeditorconstants.h
+++ b/src/plugins/diffeditor/diffeditorconstants.h
@@ -36,6 +36,8 @@ namespace Constants {
const char DIFF_EDITOR_ID[] = "Diff Editor";
const char DIFF_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("DiffEditor", "Diff Editor");
const char DIFF_EDITOR_MIMETYPE[] = "text/x-patch";
+const char DIFF_SHOW_EDITOR_ID[] = "Show Editor";
+const char DIFF_SHOW_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("ShowEditor", "Show Editor");
const char G_TOOLS_DIFF[] = "QtCreator.Group.Tools.Options";
} // namespace Constants
diff --git a/src/plugins/diffeditor/diffeditorfactory.cpp b/src/plugins/diffeditor/diffeditorfactory.cpp
new file mode 100644
index 00000000000..44363d69a7a
--- /dev/null
+++ b/src/plugins/diffeditor/diffeditorfactory.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#include "diffeditorfactory.h"
+#include "diffeditor.h"
+#include "diffeditorwidget.h"
+#include "diffeditorconstants.h"
+
+#include
+
+namespace DiffEditor {
+
+namespace Internal {
+
+DiffEditorFactory::DiffEditorFactory(QObject *parent)
+ : IEditorFactory(parent),
+ m_mimeTypes(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE))
+{
+}
+
+Core::Id DiffEditorFactory::id() const
+{
+ return Constants::DIFF_EDITOR_ID;
+}
+
+QString DiffEditorFactory::displayName() const
+{
+ return qApp->translate("DiffEditorFactory", Constants::DIFF_EDITOR_DISPLAY_NAME);
+}
+
+Core::IEditor *DiffEditorFactory::createEditor(QWidget *parent)
+{
+ DiffEditorWidget *editorWidget = new DiffEditorWidget(parent);
+ DiffEditor *editor = new DiffEditor(editorWidget);
+ return editor;
+}
+
+QStringList DiffEditorFactory::mimeTypes() const
+{
+ return m_mimeTypes;
+}
+
+} // namespace Internal
+} // namespace DiffEditor
diff --git a/src/plugins/diffeditor/diffeditorfactory.h b/src/plugins/diffeditor/diffeditorfactory.h
new file mode 100644
index 00000000000..28d702771f9
--- /dev/null
+++ b/src/plugins/diffeditor/diffeditorfactory.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef DIFFEDITORFACTORY_H
+#define DIFFEDITORFACTORY_H
+
+#include "diffeditor_global.h"
+
+#include
+
+#include
+
+namespace DiffEditor {
+
+namespace Internal {
+
+class DiffEditorFactory : public Core::IEditorFactory
+{
+ Q_OBJECT
+
+public:
+ explicit DiffEditorFactory(QObject *parent);
+
+ QStringList mimeTypes() const;
+ Core::IEditor *createEditor(QWidget *parent);
+ Core::Id id() const;
+ QString displayName() const;
+
+private:
+ const QStringList m_mimeTypes;
+};
+
+} // namespace Internal
+} // namespace DiffEditor
+
+#endif // DIFFEDITORFACTORY_H
diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp
index a3a86b6d8f9..784e0810e69 100644
--- a/src/plugins/diffeditor/diffeditorplugin.cpp
+++ b/src/plugins/diffeditor/diffeditorplugin.cpp
@@ -29,10 +29,12 @@
#include "diffeditorplugin.h"
#include "diffeditor.h"
-#include "diffeditorwidget.h"
#include "diffeditorconstants.h"
+#include "diffeditorfactory.h"
+#include "diffeditorwidget.h"
+#include "diffshoweditor.h"
+#include "diffshoweditorfactory.h"
-#include
#include
#include
#include
@@ -44,40 +46,8 @@
namespace DiffEditor {
-///////////////////////////////// DiffEditorFactory //////////////////////////////////
-
namespace Internal {
-DiffEditorFactory::DiffEditorFactory(DiffEditorPlugin *owner)
- : m_mimeTypes(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE)),
- m_owner(owner)
-{
-}
-
-Core::Id DiffEditorFactory::id() const
-{
- return Constants::DIFF_EDITOR_ID;
-}
-
-QString DiffEditorFactory::displayName() const
-{
- return qApp->translate("DiffEditorFactory", Constants::DIFF_EDITOR_DISPLAY_NAME);
-}
-
-Core::IEditor *DiffEditorFactory::createEditor(QWidget *parent)
-{
- DiffEditorWidget *editorWidget = new DiffEditorWidget(parent);
- DiffEditor *editor = new DiffEditor(editorWidget);
- return editor;
-}
-
-QStringList DiffEditorFactory::mimeTypes() const
-{
- return m_mimeTypes;
-}
-
-///////////////////////////////// DiffEditorPlugin //////////////////////////////////
-
DiffEditorPlugin::DiffEditorPlugin()
{
}
@@ -86,11 +56,6 @@ DiffEditorPlugin::~DiffEditorPlugin()
{
}
-void DiffEditorPlugin::initializeEditor(DiffEditorWidget *editor)
-{
- Q_UNUSED(editor)
-}
-
bool DiffEditorPlugin::initialize(const QStringList &arguments, QString *errorMessage)
{
Q_UNUSED(arguments)
@@ -110,6 +75,7 @@ bool DiffEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
toolsContainer->addAction(diffCommand, Constants::G_TOOLS_DIFF);
addAutoReleasedObject(new DiffEditorFactory(this));
+ addAutoReleasedObject(new DiffShowEditorFactory(this));
return true;
}
diff --git a/src/plugins/diffeditor/diffeditorplugin.h b/src/plugins/diffeditor/diffeditorplugin.h
index 12b4b5bd1c4..226204e3381 100644
--- a/src/plugins/diffeditor/diffeditorplugin.h
+++ b/src/plugins/diffeditor/diffeditorplugin.h
@@ -33,18 +33,9 @@
#include "diffeditor_global.h"
#include
-#include
-#include
-#include
-
-#include
-
-namespace Core { class IEditor; }
namespace DiffEditor {
-class DiffEditorWidget;
-
namespace Internal {
class DiffEditorPlugin : public ExtensionSystem::IPlugin
@@ -59,9 +50,6 @@ public:
bool initialize(const QStringList &arguments, QString *errorMessage = 0);
void extensionsInitialized();
- // Connect editor to settings changed signals.
- void initializeEditor(DiffEditorWidget *editor);
-
private slots:
void diff();
@@ -74,23 +62,6 @@ private:
};
-class DiffEditorFactory : public Core::IEditorFactory
-{
- Q_OBJECT
-
-public:
- explicit DiffEditorFactory(DiffEditorPlugin *owner);
-
- QStringList mimeTypes() const;
- Core::IEditor *createEditor(QWidget *parent);
- Core::Id id() const;
- QString displayName() const;
-
-private:
- const QStringList m_mimeTypes;
- DiffEditorPlugin *m_owner;
-};
-
} // namespace Internal
} // namespace DiffEditor
diff --git a/src/plugins/diffeditor/diffeditorwidget.cpp b/src/plugins/diffeditor/diffeditorwidget.cpp
index 059d5c88841..98b003a5be7 100644
--- a/src/plugins/diffeditor/diffeditorwidget.cpp
+++ b/src/plugins/diffeditor/diffeditorwidget.cpp
@@ -48,6 +48,9 @@
#include
+#include
+#include
+
static const int BASE_LEVEL = 0;
static const int FILE_LEVEL = 1;
static const int CHUNK_LEVEL = 2;
@@ -102,10 +105,19 @@ class DiffViewEditorEditable : public BaseTextEditor
{
Q_OBJECT
public:
- DiffViewEditorEditable(BaseTextEditorWidget *editorWidget) : BaseTextEditor(editorWidget) {}
+ DiffViewEditorEditable(BaseTextEditorWidget *editorWidget)
+ : BaseTextEditor(editorWidget)
+ {
+ connect(this, SIGNAL(tooltipRequested(TextEditor::ITextEditor*,QPoint,int)),
+ this, SLOT(slotTooltipRequested(TextEditor::ITextEditor*,QPoint, int)));
+ }
Core::Id id() const { return "DiffViewEditor"; }
bool isTemporary() const { return false; }
+
+private slots:
+ void slotTooltipRequested(TextEditor::ITextEditor *editor, const QPoint &globalPoint, int position);
+
};
@@ -125,6 +137,7 @@ public:
}
QMap skippedLines() const { return m_skippedLines; }
+ QMap fileInfo() const { return m_fileInfo; }
void setWorkingDirectory(const QString &workingDirectory) { m_workingDirectory = workingDirectory; }
void setLineNumber(int blockNumber, int lineNumber);
@@ -182,6 +195,24 @@ private:
QColor m_textForeground;
};
+void DiffViewEditorEditable::slotTooltipRequested(TextEditor::ITextEditor *editor, const QPoint &globalPoint, int position)
+{
+ DiffViewEditorWidget *ew = qobject_cast(editorWidget());
+ if (!ew)
+ return;
+
+ QMap fi = ew->fileInfo();
+ QMap::const_iterator it
+ = fi.constFind(ew->document()->findBlock(position).blockNumber());
+ if (it != fi.constEnd()) {
+ Utils::ToolTip::instance()->show(globalPoint,
+ Utils::TextContent(it.value().fileName),
+ editor->widget());
+ } else {
+ Utils::ToolTip::instance()->hide();
+ }
+}
+
DiffViewEditorWidget::DiffViewEditorWidget(QWidget *parent)
: SnippetEditorWidget(parent), m_lineNumberDigits(1), m_inPaintEvent(false)
{
diff --git a/src/plugins/diffeditor/diffshoweditor.cpp b/src/plugins/diffeditor/diffshoweditor.cpp
new file mode 100644
index 00000000000..9e586eebbb2
--- /dev/null
+++ b/src/plugins/diffeditor/diffshoweditor.cpp
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#include "diffshoweditor.h"
+#include "diffeditorconstants.h"
+
+#include
+#include
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+
+using namespace TextEditor;
+
+namespace DiffEditor {
+
+namespace Internal {
+
+class DiffShowEditorWidgetEditable : public BaseTextEditor
+{
+ Q_OBJECT
+public:
+ DiffShowEditorWidgetEditable(BaseTextEditorWidget *editorWidget) : BaseTextEditor(editorWidget) {}
+
+ Core::Id id() const { return "DiffShowViewEditor"; }
+ bool isTemporary() const { return false; }
+};
+
+class DiffShowEditorWidget : public BaseTextEditorWidget
+{
+ Q_OBJECT
+public:
+ DiffShowEditorWidget(QWidget *parent = 0);
+ virtual QSize sizeHint() const;
+
+public slots:
+ void setDisplaySettings(const DisplaySettings &ds);
+
+protected:
+ BaseTextEditor *createEditor() { return new DiffShowEditorWidgetEditable(this); }
+
+private:
+};
+
+DiffShowEditorWidget::DiffShowEditorWidget(QWidget *parent)
+ : BaseTextEditorWidget(parent)
+{
+ DisplaySettings settings = displaySettings();
+ settings.m_textWrapping = false;
+ settings.m_displayLineNumbers = false;
+ settings.m_highlightCurrentLine = false;
+ settings.m_displayFoldingMarkers = false;
+ settings.m_markTextChanges = false;
+ settings.m_highlightBlocks = false;
+ BaseTextEditorWidget::setDisplaySettings(settings);
+
+ setCodeFoldingSupported(true);
+ setFrameStyle(QFrame::NoFrame);
+
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+}
+
+QSize DiffShowEditorWidget::sizeHint() const
+{
+ QSize size = BaseTextEditorWidget::sizeHint();
+ size.setHeight(size.height() / 5);
+ return size;
+}
+
+void DiffShowEditorWidget::setDisplaySettings(const DisplaySettings &ds)
+{
+ DisplaySettings settings = displaySettings();
+ settings.m_visualizeWhitespace = ds.m_visualizeWhitespace;
+ BaseTextEditorWidget::setDisplaySettings(settings);
+}
+
+} // namespace Internal
+
+DiffShowEditor::DiffShowEditor(DiffEditorWidget *editorWidget)
+ : DiffEditor(editorWidget)
+{
+ QSplitter *splitter = new Core::MiniSplitter(Qt::Vertical);
+ m_diffShowWidget = new Internal::DiffShowEditorWidget(splitter);
+ m_diffShowWidget->setReadOnly(true);
+ splitter->addWidget(m_diffShowWidget);
+ splitter->addWidget(editorWidget);
+ setWidget(splitter);
+
+ TextEditorSettings *settings = TextEditorSettings::instance();
+ connect(settings, SIGNAL(displaySettingsChanged(TextEditor::DisplaySettings)),
+ m_diffShowWidget, SLOT(setDisplaySettings(TextEditor::DisplaySettings)));
+ connect(settings, SIGNAL(fontSettingsChanged(TextEditor::FontSettings)),
+ m_diffShowWidget, SLOT(setFontSettings(TextEditor::FontSettings)));
+ m_diffShowWidget->setDisplaySettings(settings->displaySettings());
+ m_diffShowWidget->setCodeStyle(settings->codeStyle());
+ m_diffShowWidget->setFontSettings(settings->fontSettings());
+}
+
+DiffShowEditor::~DiffShowEditor()
+{
+}
+
+void DiffShowEditor::setDescription(const QString &description)
+{
+ m_diffShowWidget->setPlainText(description);
+}
+
+QString DiffShowEditor::displayName() const
+{
+ if (m_displayName.isEmpty())
+ m_displayName = QCoreApplication::translate("DiffShowEditor", Constants::DIFF_SHOW_EDITOR_DISPLAY_NAME);
+ return m_displayName;
+}
+
+void DiffShowEditor::setDisplayName(const QString &title)
+{
+ m_displayName = title;
+ emit changed();
+}
+
+Core::Id DiffShowEditor::id() const
+{
+ return Constants::DIFF_SHOW_EDITOR_ID;
+}
+
+QWidget *DiffShowEditor::toolBar()
+{
+ if (m_toolWidget)
+ return m_toolWidget;
+
+ // Create
+ DiffEditor::toolBar();
+
+ m_toggleDescriptionButton = new QToolButton(m_toolWidget);
+ m_toggleDescriptionButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_TOGGLE_TOPBAR)));
+ m_toggleDescriptionButton->setCheckable(true);
+ m_toggleDescriptionButton->setChecked(true);
+ connect(m_toggleDescriptionButton, SIGNAL(clicked(bool)),
+ this, SLOT(setDescriptionVisible(bool)));
+ m_toolWidget->addWidget(m_toggleDescriptionButton);
+ setDescriptionVisible(true);
+
+ return m_toolWidget;
+}
+
+void DiffShowEditor::setDescriptionVisible(bool visible)
+{
+ if (visible) {
+ m_toggleDescriptionButton->setToolTip(tr("Hide Change Description"));
+ } else {
+ m_toggleDescriptionButton->setToolTip(tr("Show Change Description"));
+ }
+ m_diffShowWidget->setVisible(visible);
+}
+
+} // namespace DiffEditor
+
+#include "diffshoweditor.moc"
diff --git a/src/plugins/diffeditor/diffshoweditor.h b/src/plugins/diffeditor/diffshoweditor.h
new file mode 100644
index 00000000000..c53a4c820a4
--- /dev/null
+++ b/src/plugins/diffeditor/diffshoweditor.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef DIFFSHOWEDITOR_H
+#define DIFFSHOWEDITOR_H
+
+#include "diffeditor_global.h"
+#include "diffeditor.h"
+
+#include
+#include
+
+QT_BEGIN_NAMESPACE
+class QToolButton;
+QT_END_NAMESPACE
+
+namespace DiffEditor {
+
+namespace Internal {
+class DiffEditorFile;
+}
+
+class DIFFEDITOR_EXPORT DiffShowEditor : public DiffEditor
+{
+ Q_OBJECT
+public:
+ explicit DiffShowEditor(DiffEditorWidget *editorWidget);
+ virtual ~DiffShowEditor();
+
+public:
+ void setDescription(const QString &description);
+ // Core::IEditor
+ QString displayName() const;
+ void setDisplayName(const QString &title);
+ Core::Id id() const;
+
+ QWidget *toolBar();
+
+private slots:
+ void setDescriptionVisible(bool visible);
+
+private:
+ void updateEntryToolTip();
+
+ TextEditor::BaseTextEditorWidget *m_diffShowWidget;
+ mutable QString m_displayName;
+ QToolButton *m_toggleDescriptionButton;
+};
+
+} // namespace DiffEditor
+
+#endif // DIFFEDITOR_H
diff --git a/src/plugins/diffeditor/diffshoweditorfactory.cpp b/src/plugins/diffeditor/diffshoweditorfactory.cpp
new file mode 100644
index 00000000000..eaabf322685
--- /dev/null
+++ b/src/plugins/diffeditor/diffshoweditorfactory.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#include "diffshoweditorfactory.h"
+#include "diffshoweditor.h"
+#include "diffeditorwidget.h"
+#include "diffeditorconstants.h"
+
+#include
+
+namespace DiffEditor {
+
+namespace Internal {
+
+DiffShowEditorFactory::DiffShowEditorFactory(QObject *parent)
+ : IEditorFactory(parent),
+ m_mimeTypes(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE))
+{
+}
+
+Core::Id DiffShowEditorFactory::id() const
+{
+ return Constants::DIFF_SHOW_EDITOR_ID;
+}
+
+QString DiffShowEditorFactory::displayName() const
+{
+ return qApp->translate("DiffEditorFactory", Constants::DIFF_SHOW_EDITOR_DISPLAY_NAME);
+}
+
+Core::IEditor *DiffShowEditorFactory::createEditor(QWidget *parent)
+{
+ DiffEditorWidget *editorWidget = new DiffEditorWidget(parent);
+ DiffShowEditor *editor = new DiffShowEditor(editorWidget);
+ return editor;
+}
+
+QStringList DiffShowEditorFactory::mimeTypes() const
+{
+ return m_mimeTypes;
+}
+
+} // namespace Internal
+} // namespace DiffEditor
diff --git a/src/plugins/diffeditor/diffshoweditorfactory.h b/src/plugins/diffeditor/diffshoweditorfactory.h
new file mode 100644
index 00000000000..520b42ff3ea
--- /dev/null
+++ b/src/plugins/diffeditor/diffshoweditorfactory.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef DIFFSHOWEDITORFACTORY_H
+#define DIFFSHOWEDITORFACTORY_H
+
+#include "diffeditor_global.h"
+
+#include
+
+#include
+
+namespace DiffEditor {
+
+namespace Internal {
+
+class DiffShowEditorFactory : public Core::IEditorFactory
+{
+ Q_OBJECT
+
+public:
+ explicit DiffShowEditorFactory(QObject *parent);
+
+ QStringList mimeTypes() const;
+ Core::IEditor *createEditor(QWidget *parent);
+ Core::Id id() const;
+ QString displayName() const;
+
+private:
+ const QStringList m_mimeTypes;
+};
+
+} // namespace Internal
+} // namespace DiffEditor
+
+#endif // DIFFSHOWEDITORFACTORY_H
diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp
index b2d4c0b73a1..3dc666f939b 100644
--- a/src/plugins/fakevim/fakevimhandler.cpp
+++ b/src/plugins/fakevim/fakevimhandler.cpp
@@ -2250,18 +2250,17 @@ void FakeVimHandler::Private::exportSelection()
m_oldInternalAnchor = anc;
if (isVisualMode()) {
- bool visualBlockInverted;
if (g.visualMode == VisualBlockMode) {
const int col1 = anc - document()->findBlock(anc).position();
const int col2 = pos - document()->findBlock(pos).position();
- visualBlockInverted = col1 > col2;
- } else {
- visualBlockInverted = anc > pos;
+ if (col1 > col2)
+ ++anc;
+ else
+ ++pos;
+ } else if (anc > pos) {
+ ++anc;
}
- if (visualBlockInverted)
- setAnchorAndPosition(anc + 1, pos);
- else
- setAnchorAndPosition(anc, pos);
+ setAnchorAndPosition(anc, pos);
if (g.visualMode == VisualBlockMode) {
commitCursor();
diff --git a/src/plugins/find/searchresultwindow.cpp b/src/plugins/find/searchresultwindow.cpp
index cda06a6464e..12b1181e6ac 100644
--- a/src/plugins/find/searchresultwindow.cpp
+++ b/src/plugins/find/searchresultwindow.cpp
@@ -201,7 +201,8 @@ using namespace Find::Internal;
/*!
\class Find::SearchResult
- \brief Reports user interaction like activation of a search result item.
+ \brief The SearchResult class reports user interaction, such as the
+ activation of a search result item.
Whenever a new search is initiated via startNewSearch, an instance of this
class is returned to provide the initiator with the hooks for handling user
diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp
index 326e25c3786..afa10b6b59c 100644
--- a/src/plugins/genericprojectmanager/genericproject.cpp
+++ b/src/plugins/genericprojectmanager/genericproject.cpp
@@ -286,7 +286,8 @@ void GenericProject::refresh(RefreshOptions options)
setProjectLanguage(ProjectExplorer::Constants::LANG_CXX, !part->files.isEmpty());
modelManager->updateProjectInfo(pinfo);
- m_codeModelFuture = modelManager->updateSourceFiles(filesToUpdate);
+ m_codeModelFuture = modelManager->updateSourceFiles(filesToUpdate,
+ CppTools::CppModelManagerInterface::ForcedProgressNotification);
}
}
diff --git a/src/plugins/git/branchadddialog.cpp b/src/plugins/git/branchadddialog.cpp
index 96679be6759..979b0cdb545 100644
--- a/src/plugins/git/branchadddialog.cpp
+++ b/src/plugins/git/branchadddialog.cpp
@@ -37,7 +37,8 @@ namespace Git {
namespace Internal {
/*!
- * \brief Validates the corresponding string as a valid git branch name
+ * \brief The BranchNameValidator class validates the corresponding string as
+ * a valid Git branch name.
*
* The class does this by a couple of rules that are applied on the string.
*
@@ -124,12 +125,14 @@ QString BranchAddDialog::branchName() const
void BranchAddDialog::setTrackedBranchName(const QString &name, bool remote)
{
m_ui->trackingCheckBox->setVisible(true);
- if (!name.isEmpty())
+ if (!name.isEmpty()) {
m_ui->trackingCheckBox->setText(remote ? tr("Track remote branch \'%1\'").arg(name) :
tr("Track local branch \'%1\'").arg(name));
- else
+ m_ui->trackingCheckBox->setChecked(remote);
+ } else {
m_ui->trackingCheckBox->setVisible(false);
- m_ui->trackingCheckBox->setChecked(remote);
+ m_ui->trackingCheckBox->setChecked(false);
+ }
}
bool BranchAddDialog::track()
diff --git a/src/plugins/git/branchdialog.cpp b/src/plugins/git/branchdialog.cpp
index 001664f2f20..0e9c8c33f16 100644
--- a/src/plugins/git/branchdialog.cpp
+++ b/src/plugins/git/branchdialog.cpp
@@ -121,12 +121,14 @@ void BranchDialog::refresh()
void BranchDialog::add()
{
- QString trackedBranch = m_model->branchName(selectedIndex());
- bool isLocal = m_model->isLocal(selectedIndex());
+ QModelIndex trackedIndex = selectedIndex();
+ QString trackedBranch = m_model->branchName(trackedIndex);
if (trackedBranch.isEmpty()) {
- trackedBranch = m_model->branchName(m_model->currentBranch());
- isLocal = true;
+ trackedIndex = m_model->currentBranch();
+ trackedBranch = m_model->branchName(trackedIndex);
}
+ const bool isLocal = m_model->isLocal(trackedIndex);
+ const bool isTag = m_model->isTag(trackedIndex);
QStringList localNames = m_model->localBranchNames();
@@ -140,10 +142,10 @@ void BranchDialog::add()
BranchAddDialog branchAddDialog(true, this);
branchAddDialog.setBranchName(suggestedName);
- branchAddDialog.setTrackedBranchName(trackedBranch, !isLocal);
+ branchAddDialog.setTrackedBranchName(isTag ? QString() : trackedBranch, !isLocal);
if (branchAddDialog.exec() == QDialog::Accepted && m_model) {
- QModelIndex idx = m_model->addBranch(branchAddDialog.branchName(), branchAddDialog.track(), trackedBranch);
+ QModelIndex idx = m_model->addBranch(branchAddDialog.branchName(), branchAddDialog.track(), trackedIndex);
m_ui->branchView->selectionModel()->select(idx, QItemSelectionModel::Clear
| QItemSelectionModel::Select
| QItemSelectionModel::Current);
@@ -303,7 +305,7 @@ void BranchDialog::rebase()
const QString baseBranch = m_model->branchName(idx);
GitClient *client = GitPlugin::instance()->gitClient();
if (client->beginStashScope(m_repository, QLatin1String("rebase")))
- client->synchronousRebase(m_repository, baseBranch);
+ client->rebase(m_repository, baseBranch);
}
QModelIndex BranchDialog::selectedIndex()
diff --git a/src/plugins/git/branchmodel.cpp b/src/plugins/git/branchmodel.cpp
index 324ba174344..69e4ee54664 100644
--- a/src/plugins/git/branchmodel.cpp
+++ b/src/plugins/git/branchmodel.cpp
@@ -77,6 +77,18 @@ public:
return children.isEmpty();
}
+ bool isTag() const
+ {
+ if (!parent)
+ return false;
+ for (const BranchNode *p = this; p->parent; p = p->parent) {
+ // find root child with name "tags"
+ if (!p->parent->parent && p->name == QLatin1String("tags"))
+ return true;
+ }
+ return false;
+ }
+
bool childOf(BranchNode *node) const
{
if (this == node)
@@ -435,6 +447,13 @@ bool BranchModel::isLeaf(const QModelIndex &idx) const
return node->isLeaf();
}
+bool BranchModel::isTag(const QModelIndex &idx) const
+{
+ if (!idx.isValid())
+ return false;
+ return indexToNode(idx)->isTag();
+}
+
void BranchModel::removeBranch(const QModelIndex &idx)
{
QString branch = branchName(idx);
@@ -513,19 +532,30 @@ bool BranchModel::branchIsMerged(const QModelIndex &idx)
return false;
}
-QModelIndex BranchModel::addBranch(const QString &branchName, bool track, const QString &startPoint)
+static int positionForName(BranchNode *node, const QString &name)
+{
+ int pos = 0;
+ for (pos = 0; pos < node->count(); ++pos) {
+ if (node->children.at(pos)->name >= name)
+ break;
+ }
+ return pos;
+}
+
+QModelIndex BranchModel::addBranch(const QString &name, bool track, const QModelIndex &startPoint)
{
if (!m_rootNode || !m_rootNode->count())
return QModelIndex();
+ const QString trackedBranch = branchName(startPoint);
QString output;
QString errorMessage;
QStringList args;
args << (track ? QLatin1String("--track") : QLatin1String("--no-track"));
- args << branchName;
- if (!startPoint.isEmpty())
- args << startPoint;
+ args << name;
+ if (!trackedBranch.isEmpty())
+ args << trackedBranch;
if (!m_client->synchronousBranchCmd(m_workingDirectory, args, &output, &errorMessage)) {
VcsBase::VcsBaseOutputWindow::instance()->appendError(errorMessage);
@@ -533,29 +563,30 @@ QModelIndex BranchModel::addBranch(const QString &branchName, bool track, const
}
BranchNode *local = m_rootNode->children.at(0);
- int pos = 0;
- for (pos = 0; pos < local->count(); ++pos) {
- if (local->children.at(pos)->name > branchName)
- break;
- }
- BranchNode *newNode = new BranchNode(branchName);
-
- // find the sha of the new branch:
- output = toolTip(branchName); // abuse toolTip to get the data;-)
- QStringList lines = output.split(QLatin1Char('\n'));
- foreach (const QString &l, lines) {
- if (l.startsWith(QLatin1String("commit "))) {
- newNode->sha = l.mid(7, 8);
- break;
+ const int slash = name.indexOf(QLatin1Char('/'));
+ const QString leafName = slash == -1 ? name : name.mid(slash + 1);
+ bool added = false;
+ if (slash != -1) {
+ const QString nodeName = name.left(slash);
+ int pos = positionForName(local, nodeName);
+ BranchNode *child = (pos == local->count()) ? 0 : local->children.at(pos);
+ if (!child || child->name != nodeName) {
+ child = new BranchNode(nodeName);
+ beginInsertRows(nodeToIndex(local), pos, pos);
+ added = true;
+ child->parent = local;
+ local->children.insert(pos, child);
}
+ local = child;
}
-
- beginInsertRows(index(0, 0), pos, pos);
+ int pos = positionForName(local, leafName);
+ BranchNode *newNode = new BranchNode(leafName, sha(startPoint), track ? trackedBranch : QString());
+ if (!added)
+ beginInsertRows(nodeToIndex(local), pos, pos);
newNode->parent = local;
local->children.insert(pos, newNode);
endInsertRows();
-
- return index(pos, 0, index(0, 0));
+ return nodeToIndex(newNode);
}
void BranchModel::parseOutputLine(const QString &line)
@@ -621,12 +652,10 @@ QString BranchModel::toolTip(const QString &sha) const
// Show the sha description excluding diff as toolTip
QString output;
QString errorMessage;
- if (!m_client->synchronousShow(m_workingDirectory, sha, &output, &errorMessage))
+ QStringList arguments(QLatin1String("-n1"));
+ arguments << sha;
+ if (!m_client->synchronousLog(m_workingDirectory, arguments, &output, &errorMessage))
return errorMessage;
- // Remove 'diff' output
- const int diffPos = output.indexOf(QLatin1String("\ndiff --"));
- if (diffPos != -1)
- output.remove(diffPos, output.size() - diffPos);
return output;
}
diff --git a/src/plugins/git/branchmodel.h b/src/plugins/git/branchmodel.h
index c386e258f36..1be003dab2f 100644
--- a/src/plugins/git/branchmodel.h
+++ b/src/plugins/git/branchmodel.h
@@ -74,11 +74,12 @@ public:
QString sha(const QModelIndex &idx) const;
bool isLocal(const QModelIndex &idx) const;
bool isLeaf(const QModelIndex &idx) const;
+ bool isTag(const QModelIndex &idx) const;
void removeBranch(const QModelIndex &idx);
void checkoutBranch(const QModelIndex &idx);
bool branchIsMerged(const QModelIndex &idx);
- QModelIndex addBranch(const QString &branchName, bool track, const QString &trackedBranch);
+ QModelIndex addBranch(const QString &name, bool track, const QModelIndex &trackedBranch);
private:
void parseOutputLine(const QString &line);
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index af34f190fd3..83b1e87907d 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -57,6 +57,7 @@
#include
#include
+#include
#include
#include
@@ -130,10 +131,12 @@ public:
void show(const QString &id);
private slots:
+ void slotShowDescriptionReceived(const QByteArray &data);
void slotFileListReceived(const QByteArray &data);
void slotFileContentsReceived(const QByteArray &data);
private:
+ void collectShowDescription(const QString &id);
void collectFilesList(const QStringList &additionalArguments);
void prepareForCollection();
void collectFilesContents();
@@ -246,7 +249,32 @@ void GitDiffHandler::show(const QString &id)
Revision end(Other, id);
m_requestedRevisionRange = RevisionRange(begin, end);
- collectFilesList(QStringList() << begin.id << end.id);
+ collectShowDescription(id);
+}
+
+void GitDiffHandler::collectShowDescription(const QString &id)
+{
+ m_editor->clear(m_waitMessage);
+ VcsBase::Command *command = new VcsBase::Command(m_gitPath, m_workingDirectory, m_processEnvironment);
+ connect(command, SIGNAL(outputData(QByteArray)), this, SLOT(slotShowDescriptionReceived(QByteArray)));
+ QStringList arguments;
+ arguments << QLatin1String("show") << QLatin1String("-s") << QLatin1String("--format=fuller") << id;
+ command->addJob(arguments, m_timeout);
+ command->execute();
+}
+
+void GitDiffHandler::slotShowDescriptionReceived(const QByteArray &data)
+{
+ const QString description = m_editor->editorWidget()->codec()->toUnicode(data).remove(QLatin1Char('\r'));
+
+ DiffEditor::DiffShowEditor *editor = qobject_cast(m_editor);
+ if (editor) {
+ editor->setDescription(description);
+ }
+
+ collectFilesList(QStringList()
+ << m_requestedRevisionRange.begin.id
+ << m_requestedRevisionRange.end.id);
}
void GitDiffHandler::collectFilesList(const QStringList &additionalArguments)
@@ -637,7 +665,7 @@ class ConflictHandler : public QObject
public:
ConflictHandler(VcsBase::Command *parentCommand,
const QString &workingDirectory,
- const QString &command)
+ const QString &command = QString())
: QObject(parentCommand),
m_workingDirectory(workingDirectory),
m_command(command)
@@ -652,19 +680,24 @@ public:
~ConflictHandler()
{
GitClient *client = GitPlugin::instance()->gitClient();
- if (m_commit.isEmpty()) {
+ if (m_commit.isEmpty() && m_files.isEmpty()) {
if (client->checkCommandInProgress(m_workingDirectory) == GitClient::NoCommand)
client->endStashScope(m_workingDirectory);
} else {
- client->handleMergeConflicts(m_workingDirectory, m_commit, m_command);
+ client->handleMergeConflicts(m_workingDirectory, m_commit, m_files, m_command);
}
}
void readStdOutString(const QString &data)
{
static QRegExp patchFailedRE(QLatin1String("Patch failed at ([^\\n]*)"));
+ static QRegExp conflictedFilesRE(QLatin1String("Merge conflict in ([^\\n]*)"));
if (patchFailedRE.indexIn(data) != -1)
m_commit = patchFailedRE.cap(1);
+ int fileIndex = -1;
+ while ((fileIndex = conflictedFilesRE.indexIn(data, fileIndex + 1)) != -1) {
+ m_files.append(conflictedFilesRE.cap(1));
+ }
}
public slots:
void readStdOut(const QByteArray &data)
@@ -682,6 +715,7 @@ private:
QString m_workingDirectory;
QString m_command;
QString m_commit;
+ QStringList m_files;
};
@@ -814,7 +848,7 @@ VcsBase::VcsBaseEditorWidget *GitClient::findExistingVCSEditor(const char *regis
}
DiffEditor::DiffEditor *GitClient::findExistingOrOpenNewDiffEditor(const char *registerDynamicProperty,
- const QString &dynamicPropertyValue, const QString &titlePattern) const
+ const QString &dynamicPropertyValue, const QString &titlePattern, const Core::Id editorId) const
{
Core::IEditor *outputEditor = locateEditor(registerDynamicProperty, dynamicPropertyValue);
if (outputEditor) {
@@ -825,12 +859,11 @@ DiffEditor::DiffEditor *GitClient::findExistingOrOpenNewDiffEditor(const char *r
DiffEditor::DiffEditor *editor = qobject_cast(outputEditor);
if (!editor) {
- const Core::Id editorId = DiffEditor::Constants::DIFF_EDITOR_ID;
QString title = titlePattern;
editor = qobject_cast(
Core::EditorManager::openEditorWithContents(editorId, &title, m_msgWait));
editor->document()->setProperty(registerDynamicProperty, dynamicPropertyValue);
- Core::EditorManager::activateEditor(editor); // should probably go outside this block
+ Core::EditorManager::activateEditor(editor);
}
return editor;
}
@@ -888,7 +921,11 @@ void GitClient::diff(const QString &workingDirectory,
const int timeout = settings()->intValue(GitSettings::timeoutKey);
if (settings()->boolValue(GitSettings::useDiffEditorKey)) {
- DiffEditor::DiffEditor *editor = findExistingOrOpenNewDiffEditor("originalFileName", workingDirectory, title);
+ DiffEditor::DiffEditor *editor = findExistingOrOpenNewDiffEditor(
+ "originalFileName",
+ workingDirectory,
+ title,
+ DiffEditor::Constants::DIFF_EDITOR_ID);
GitDiffHandler *handler = new GitDiffHandler(editor, gitBinaryPath(), workingDirectory, processEnvironment(), timeout);
@@ -963,7 +1000,11 @@ void GitClient::diff(const QString &workingDirectory,
const QString title = tr("Git Diff \"%1\"").arg(fileName);
if (settings()->boolValue(GitSettings::useDiffEditorKey)) {
const QString sourceFile = VcsBase::VcsBaseEditorWidget::getSource(workingDirectory, fileName);
- DiffEditor::DiffEditor *editor = findExistingOrOpenNewDiffEditor("originalFileName", sourceFile, title);
+ DiffEditor::DiffEditor *editor = findExistingOrOpenNewDiffEditor(
+ "originalFileName",
+ sourceFile,
+ title,
+ DiffEditor::Constants::DIFF_EDITOR_ID);
if (!fileName.isEmpty()) {
int timeout = settings()->intValue(GitSettings::timeoutKey);
@@ -1003,8 +1044,11 @@ void GitClient::diffBranch(const QString &workingDirectory,
{
const QString title = tr("Git Diff Branch \"%1\"").arg(branchName);
if (settings()->boolValue(GitSettings::useDiffEditorKey)) {
- DiffEditor::DiffEditor *editor =
- findExistingOrOpenNewDiffEditor("BranchName", branchName, title);
+ DiffEditor::DiffEditor *editor = findExistingOrOpenNewDiffEditor(
+ "BranchName",
+ branchName,
+ title,
+ DiffEditor::Constants::DIFF_EDITOR_ID);
int timeout = settings()->intValue(GitSettings::timeoutKey);
GitDiffHandler *handler = new GitDiffHandler(editor, gitBinaryPath(), workingDirectory, processEnvironment(), timeout);
@@ -1112,7 +1156,11 @@ void GitClient::show(const QString &source, const QString &id,
const QFileInfo sourceFi(source);
const QString workDir = sourceFi.isDir() ? sourceFi.absoluteFilePath() : sourceFi.absolutePath();
if (settings()->boolValue(GitSettings::useDiffEditorKey)) {
- DiffEditor::DiffEditor *editor = findExistingOrOpenNewDiffEditor("show", id, title);
+ DiffEditor::DiffEditor *editor = findExistingOrOpenNewDiffEditor(
+ "show",
+ id,
+ title,
+ DiffEditor::Constants::DIFF_SHOW_EDITOR_ID);
int timeout = settings()->intValue(GitSettings::timeoutKey);
GitDiffHandler *handler = new GitDiffHandler(editor, gitBinaryPath(),
@@ -1231,7 +1279,7 @@ bool GitClient::synchronousCheckout(const QString &workingDirectory,
outputWindow()->appendError(msg);
return false;
}
- promptSubmoduleUpdate(workingDirectory);
+ updateSubmodulesIfNeeded(workingDirectory, true);
return true;
}
@@ -1945,6 +1993,30 @@ QMap GitClient::synchronousRemotesList(const QString &workingDi
return result;
}
+QStringList GitClient::synchronousSubmoduleStatus(const QString &workingDirectory,
+ QString *errorMessage)
+{
+ QByteArray outputTextData;
+ QByteArray errorText;
+ QStringList arguments;
+
+ // get submodule status
+ arguments << QLatin1String("submodule") << QLatin1String("status");
+ if (!fullySynchronousGit(workingDirectory, arguments, &outputTextData, &errorText)) {
+ QString error = tr("Cannot retrieve submodule status of \"%1\": %2")
+ .arg(QDir::toNativeSeparators(workingDirectory),
+ commandOutputFromLocal8Bit(errorText));
+
+ if (errorMessage)
+ *errorMessage = error;
+ else
+ outputWindow()->append(error);
+
+ return QStringList();
+ }
+ return commandOutputLinesFromLocal8Bit(outputTextData);
+}
+
SubmoduleDataMap GitClient::submoduleList(const QString &workingDirectory)
{
SubmoduleDataMap result;
@@ -2195,23 +2267,63 @@ bool GitClient::fullySynchronousGit(const QString &workingDirectory,
flags);
}
-void GitClient::submoduleUpdate(const QString &workingDirectory)
+void GitClient::updateSubmodulesIfNeeded(const QString &workingDirectory, bool prompt)
{
- QStringList arguments;
- arguments << QLatin1String("submodule") << QLatin1String("update");
- executeGit(workingDirectory, arguments, 0, true, true);
-}
-
-void GitClient::promptSubmoduleUpdate(const QString &workingDirectory)
-{
- if (submoduleList(workingDirectory).isEmpty())
+ if (!m_updatedSubmodules.isEmpty() || submoduleList(workingDirectory).isEmpty())
return;
- if (QMessageBox::question(Core::ICore::mainWindow(), tr("Submodules Found"),
- tr("Would you like to update submodules?"),
- QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
- submoduleUpdate(workingDirectory);
+ QStringList submoduleStatus = synchronousSubmoduleStatus(workingDirectory);
+ if (submoduleStatus.isEmpty())
+ return;
+
+ bool updateNeeded = false;
+ foreach (const QString &status, submoduleStatus) {
+ if (status.startsWith(QLatin1Char('+'))) {
+ updateNeeded = true;
+ break;
+ }
}
+ if (!updateNeeded)
+ return;
+
+ if (prompt && QMessageBox::question(Core::ICore::mainWindow(), tr("Submodules Found"),
+ tr("Would you like to update submodules?"),
+ QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) {
+ return;
+ }
+
+ foreach (const QString &statusLine, submoduleStatus) {
+ // stash only for lines starting with +
+ // because only they would be updated
+ if (!statusLine.startsWith(QLatin1Char('+')))
+ continue;
+
+ // get submodule name
+ const int nameStart = statusLine.indexOf(QLatin1Char(' '), 2) + 1;
+ const int nameLength = statusLine.indexOf(QLatin1Char(' '), nameStart) - nameStart;
+ const QString submoduleDir = workingDirectory + QLatin1Char('/')
+ + statusLine.mid(nameStart, nameLength);
+
+ if (beginStashScope(submoduleDir, QLatin1String("SubmoduleUpdate"))) {
+ m_updatedSubmodules.append(submoduleDir);
+ } else {
+ finishSubmoduleUpdate();
+ return;
+ }
+ }
+
+ QStringList arguments;
+ arguments << QLatin1String("submodule") << QLatin1String("update");
+
+ VcsBase::Command *cmd = executeGit(workingDirectory, arguments, 0, true, true);
+ connect(cmd, SIGNAL(finished(bool,int,QVariant)), this, SLOT(finishSubmoduleUpdate()));
+}
+
+void GitClient::finishSubmoduleUpdate()
+{
+ foreach (const QString &submoduleDir, m_updatedSubmodules)
+ endStashScope(submoduleDir);
+ m_updatedSubmodules.clear();
}
// Trim a git status file spec: "modified: foo .cpp" -> "modified: foo .cpp"
@@ -2344,21 +2456,10 @@ void GitClient::continuePreviousGitCommand(const QString &workingDirectory,
synchronousAbortCommand(workingDirectory, gitCommand);
break;
default: // Continue/Skip
- if (isRebase) {
- // Git might request an editor, so this must be done asynchronously
- // and without timeout
- QStringList arguments;
- arguments << gitCommand << QLatin1String(hasChanges ? "--continue" : "--skip");
- outputWindow()->appendCommand(workingDirectory,
- settings()->stringValue(GitSettings::binaryPathKey),
- arguments);
- VcsBase::Command *command = createCommand(workingDirectory, 0, true);
- new ConflictHandler(command, workingDirectory, gitCommand);
- command->addJob(arguments, -1);
- command->execute();
- } else {
+ if (isRebase)
+ rebase(workingDirectory, QLatin1String(hasChanges ? "--continue" : "--skip"));
+ else
GitPlugin::instance()->startCommit();
- }
}
}
@@ -2857,7 +2958,7 @@ bool GitClient::synchronousPull(const QString &workingDirectory, bool rebase)
bool ok = executeAndHandleConflicts(workingDirectory, arguments, abortCommand);
if (ok)
- promptSubmoduleUpdate(workingDirectory);
+ updateSubmodulesIfNeeded(workingDirectory, true);
return ok;
}
@@ -2900,8 +3001,10 @@ QString GitClient::synchronousTrackingBranch(const QString &workingDirectory, co
}
void GitClient::handleMergeConflicts(const QString &workingDir, const QString &commit,
- const QString &abortCommand)
+ const QStringList &files, const QString &abortCommand)
{
+ Q_UNUSED(files);
+
QString message = commit.isEmpty() ? tr("Conflicts detected")
: tr("Conflicts detected with commit %1").arg(commit);
QMessageBox mergeOrAbort(QMessageBox::Question, tr("Conflicts Detected"), message,
@@ -2911,7 +3014,8 @@ void GitClient::handleMergeConflicts(const QString &workingDir, const QString &c
mergeOrAbort.addButton(QMessageBox::Ignore);
if (abortCommand == QLatin1String("rebase"))
mergeOrAbort.addButton(tr("&Skip"), QMessageBox::RejectRole);
- mergeOrAbort.addButton(QMessageBox::Abort);
+ if (!abortCommand.isEmpty())
+ mergeOrAbort.addButton(QMessageBox::Abort);
switch (mergeOrAbort.exec()) {
case QMessageBox::Abort:
synchronousAbortCommand(workingDir, abortCommand);
@@ -2921,7 +3025,7 @@ void GitClient::handleMergeConflicts(const QString &workingDir, const QString &c
default: // Merge or Skip
if (mergeOrAbort.clickedButton() == mergeToolButton) {
merge(workingDir);
- } else {
+ } else if (!abortCommand.isEmpty()) {
QStringList arguments = QStringList() << abortCommand << QLatin1String("--skip");
executeAndHandleConflicts(workingDir, arguments, abortCommand);
}
@@ -2988,17 +3092,20 @@ bool GitClient::canRebase(const QString &workingDirectory) const
return true;
}
-bool GitClient::synchronousRebase(const QString &workingDirectory, const QString &baseBranch,
- const QString &topicBranch)
+void GitClient::rebase(const QString &workingDirectory, const QString &baseBranch)
{
- QString command = QLatin1String("rebase");
+ // Git might request an editor, so this must be done asynchronously
+ // and without timeout
+ QString gitCommand = QLatin1String("rebase");
QStringList arguments;
-
- arguments << command << baseBranch;
- if (!topicBranch.isEmpty())
- arguments << topicBranch;
-
- return executeAndHandleConflicts(workingDirectory, arguments, command);
+ arguments << gitCommand << baseBranch;
+ outputWindow()->appendCommand(workingDirectory,
+ settings()->stringValue(GitSettings::binaryPathKey),
+ arguments);
+ VcsBase::Command *command = createCommand(workingDirectory, 0, true);
+ new ConflictHandler(command, workingDirectory, gitCommand);
+ command->addJob(arguments, -1);
+ command->execute();
}
bool GitClient::synchronousRevert(const QString &workingDirectory, const QString &commit)
@@ -3054,7 +3161,8 @@ void GitClient::stashPop(const QString &workingDirectory, const QString &stash)
arguments << QLatin1String("pop");
if (!stash.isEmpty())
arguments << stash;
- executeGit(workingDirectory, arguments, 0, true, true);
+ VcsBase::Command *cmd = executeGit(workingDirectory, arguments, 0, true, true);
+ new ConflictHandler(cmd, workingDirectory);
}
void GitClient::stashPop(const QString &workingDirectory)
diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h
index 7eb42ebb179..6a9d0f6516c 100644
--- a/src/plugins/git/gitclient.h
+++ b/src/plugins/git/gitclient.h
@@ -179,8 +179,7 @@ public:
bool synchronousCheckout(const QString &workingDirectory, const QString &ref, QString *errorMessage);
bool synchronousCheckout(const QString &workingDirectory, const QString &ref)
{ return synchronousCheckout(workingDirectory, ref, 0); }
- void submoduleUpdate(const QString &workingDirectory);
- void promptSubmoduleUpdate(const QString &workingDirectory);
+ void updateSubmodulesIfNeeded(const QString &workingDirectory, bool prompt);
// Do a stash and return identier.
enum { StashPromptDescription = 0x1, StashImmediateRestore = 0x2, StashIgnoreUnchanged = 0x4 };
@@ -208,6 +207,8 @@ public:
QMap synchronousRemotesList(const QString &workingDirectory,
QString *errorMessage = 0);
+ QStringList synchronousSubmoduleStatus(const QString &workingDirectory,
+ QString *errorMessage = 0);
SubmoduleDataMap submoduleList(const QString &workingDirectory);
bool synchronousShow(const QString &workingDirectory, const QString &id,
QString *output, QString *errorMessage);
@@ -240,9 +241,7 @@ public:
void push(const QString &workingDirectory, const QStringList &pushArgs = QStringList());
bool synchronousMerge(const QString &workingDirectory, const QString &branch);
bool canRebase(const QString &workingDirectory) const;
- bool synchronousRebase(const QString &workingDirectory,
- const QString &baseBranch,
- const QString &topicBranch = QString());
+ void rebase(const QString &workingDirectory, const QString &baseBranch);
bool synchronousRevert(const QString &workingDirectory, const QString &commit);
bool synchronousCherryPick(const QString &workingDirectory, const QString &commit);
void interactiveRebase(const QString &workingDirectory, const QString &commit, bool fixup);
@@ -309,7 +308,7 @@ public:
StashInfo &stashInfo(const QString &workingDirectory);
void endStashScope(const QString &workingDirectory);
bool isValidRevision(const QString &revision) const;
- void handleMergeConflicts(const QString &workingDir, const QString &commit, const QString &abortCommand);
+ void handleMergeConflicts(const QString &workingDir, const QString &commit, const QStringList &files, const QString &abortCommand);
static QString msgNoChangedFiles();
static QString msgNoCommits(bool includeRemote);
@@ -326,6 +325,7 @@ private slots:
void slotBlameRevisionRequested(const QString &source, QString change, int lineNumber);
void appendOutputData(const QByteArray &data) const;
void appendOutputDataSilently(const QByteArray &data) const;
+ void finishSubmoduleUpdate();
private:
QTextCodec *getSourceCodec(const QString &file) const;
@@ -333,7 +333,8 @@ private:
const QString &dynamicPropertyValue) const;
DiffEditor::DiffEditor *findExistingOrOpenNewDiffEditor(const char *registerDynamicProperty,
const QString &dynamicPropertyValue,
- const QString &titlePattern) const;
+ const QString &titlePattern,
+ const Core::Id editorId) const;
enum CodecType { CodecSource, CodecLogOutput, CodecNone };
VcsBase::VcsBaseEditorWidget *createVcsEditor(const Core::Id &kind,
@@ -394,6 +395,7 @@ private:
GitSettings *m_settings;
QString m_gitQtcEditor;
QMap m_stashInfo;
+ QStringList m_updatedSubmodules;
bool m_disableEditor;
};
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index 6f051f9af3a..b7d4976978c 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -59,6 +59,7 @@
#include
#include
#include
+#include
#include
#include
@@ -427,9 +428,10 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
tr("Amend Last Commit..."), Core::Id("Git.AmendCommit"),
globalcontext, true, SLOT(startAmendCommit()));
- createRepositoryAction(localRepositoryMenu,
- tr("Fixup Previous Commit..."), Core::Id("Git.FixupCommit"),
- globalcontext, true, SLOT(startFixupCommit()));
+ m_fixupCommitAction =
+ createRepositoryAction(localRepositoryMenu,
+ tr("Fixup Previous Commit..."), Core::Id("Git.FixupCommit"),
+ globalcontext, true, SLOT(startFixupCommit())).first;
// --------------
localRepositoryMenu->addSeparator(globalcontext);
@@ -437,9 +439,10 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
tr("Reset..."), Core::Id("Git.Reset"),
globalcontext, true, SLOT(resetRepository()));
- createRepositoryAction(localRepositoryMenu,
- tr("Interactive Rebase..."), Core::Id("Git.InteractiveRebase"),
- globalcontext, true, SLOT(startRebase()));
+ m_interactiveRebaseAction =
+ createRepositoryAction(localRepositoryMenu,
+ tr("Interactive Rebase..."), Core::Id("Git.InteractiveRebase"),
+ globalcontext, true, SLOT(startRebase())).first;
m_submoduleUpdateAction =
createRepositoryAction(localRepositoryMenu,
@@ -684,6 +687,8 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
m_redoAction = new QAction(tr("&Redo"), this);
command = Core::ActionManager::registerAction(m_redoAction, Core::Constants::REDO, submitContext);
+ connect(Core::ICore::vcsManager(), SIGNAL(repositoryChanged(QString)),
+ this, SLOT(updateContinueAndAbortCommands()));
if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(RC_GIT_MIME_XML), errorMessage))
return false;
@@ -1149,13 +1154,13 @@ void GitPlugin::continueOrAbortCommand()
if (action == m_abortMergeAction)
m_gitClient->synchronousMerge(state.topLevel(), QLatin1String("--abort"));
else if (action == m_abortRebaseAction)
- m_gitClient->synchronousRebase(state.topLevel(), QLatin1String("--abort"));
+ m_gitClient->rebase(state.topLevel(), QLatin1String("--abort"));
else if (action == m_abortCherryPickAction)
m_gitClient->synchronousCherryPick(state.topLevel(), QLatin1String("--abort"));
else if (action == m_abortRevertAction)
m_gitClient->synchronousRevert(state.topLevel(), QLatin1String("--abort"));
else if (action == m_continueRebaseAction)
- m_gitClient->synchronousRebase(state.topLevel(), QLatin1String("--continue"));
+ m_gitClient->rebase(state.topLevel(), QLatin1String("--continue"));
else if (action == m_continueCherryPickAction)
m_gitClient->synchronousCherryPick(state.topLevel(), QLatin1String("--continue"));
else if (action == m_continueRevertAction)
@@ -1232,7 +1237,7 @@ void GitPlugin::updateSubmodules()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
- m_gitClient->submoduleUpdate(state.topLevel());
+ m_gitClient->updateSubmodulesIfNeeded(state.topLevel(), false);
}
// If the file is modified in an editor, make sure it is saved.
@@ -1408,6 +1413,8 @@ void GitPlugin::updateContinueAndAbortCommands()
m_continueRevertAction->setVisible(gitCommandInProgress == GitClient::Revert);
m_continueRebaseAction->setVisible(gitCommandInProgress == GitClient::Rebase
|| gitCommandInProgress == GitClient::RebaseMerge);
+ m_fixupCommitAction->setEnabled(gitCommandInProgress == GitClient::NoCommand);
+ m_interactiveRebaseAction->setEnabled(gitCommandInProgress == GitClient::NoCommand);
} else {
m_mergeToolAction->setVisible(false);
m_abortMergeAction->setVisible(false);
diff --git a/src/plugins/git/gitplugin.h b/src/plugins/git/gitplugin.h
index c7ff4a9e4a6..4a70caedeeb 100644
--- a/src/plugins/git/gitplugin.h
+++ b/src/plugins/git/gitplugin.h
@@ -142,6 +142,7 @@ private slots:
void push();
void startMergeTool();
void continueOrAbortCommand();
+ void updateContinueAndAbortCommands();
#ifdef WITH_TESTS
void testStatusParsing_data();
@@ -190,7 +191,6 @@ private:
const Core::Context &context,
bool addToLocator, GitClientMemberFunc);
- void updateContinueAndAbortCommands();
void updateRepositoryBrowserAction();
bool isCommitEditorOpen() const;
Core::IEditor *openSubmitEditor(const QString &fileName, const CommitData &cd);
@@ -218,6 +218,8 @@ private:
QAction *m_continueRebaseAction;
QAction *m_continueCherryPickAction;
QAction *m_continueRevertAction;
+ QAction *m_fixupCommitAction;
+ QAction *m_interactiveRebaseAction;
QVector m_fileActions;
QVector m_projectActions;
diff --git a/src/plugins/git/gitsubmiteditor.cpp b/src/plugins/git/gitsubmiteditor.cpp
index c22de6c11da..d318580b515 100644
--- a/src/plugins/git/gitsubmiteditor.cpp
+++ b/src/plugins/git/gitsubmiteditor.cpp
@@ -61,7 +61,8 @@ public:
for (; j < source->rowCount(); ++j) {
CommitData::StateFilePair sourceStateFile = gitSource->stateFilePair(j);
if (stateFile == sourceStateFile) {
- setChecked(i, source->checked(j));
+ if (isCheckable(i) && source->isCheckable(j))
+ setChecked(i, source->checked(j));
break;
} else if (stateFile < sourceStateFile) {
break;
@@ -176,6 +177,7 @@ void GitSubmitEditor::updateFileModel()
CommitData data(m_commitType);
if (client->getCommitData(m_workingDirectory, &commitTemplate, data, &errorMessage)) {
setCommitData(data);
+ submitEditorWidget()->refreshLog(m_workingDirectory);
} else {
VcsBase::VcsBaseOutputWindow::instance()->append(errorMessage);
m_forceClose = true;
diff --git a/src/plugins/git/gitsubmiteditorwidget.cpp b/src/plugins/git/gitsubmiteditorwidget.cpp
index 8d057d4a6d0..9e94200674b 100644
--- a/src/plugins/git/gitsubmiteditorwidget.cpp
+++ b/src/plugins/git/gitsubmiteditorwidget.cpp
@@ -102,6 +102,12 @@ void GitSubmitEditorWidget::initialize(CommitType commitType, const QString &rep
insertTopWidget(m_gitSubmitPanel);
}
+void GitSubmitEditorWidget::refreshLog(const QString &repository)
+{
+ if (m_logChangeWidget)
+ m_logChangeWidget->init(repository, QString(), false);
+}
+
GitSubmitEditorPanelData GitSubmitEditorWidget::panelData() const
{
GitSubmitEditorPanelData rc;
diff --git a/src/plugins/git/gitsubmiteditorwidget.h b/src/plugins/git/gitsubmiteditorwidget.h
index 7eff3d4c03f..36f80b52302 100644
--- a/src/plugins/git/gitsubmiteditorwidget.h
+++ b/src/plugins/git/gitsubmiteditorwidget.h
@@ -71,6 +71,7 @@ public:
QString amendSHA1() const;
void setHasUnmerged(bool e);
void initialize(CommitType commitType, const QString &repository);
+ void refreshLog(const QString &repository);
protected:
bool canSubmit() const;
diff --git a/src/plugins/git/mergetool.cpp b/src/plugins/git/mergetool.cpp
index 5f1432d856f..1bf3a439fd3 100644
--- a/src/plugins/git/mergetool.cpp
+++ b/src/plugins/git/mergetool.cpp
@@ -102,7 +102,6 @@ bool MergeTool::start(const QString &workingDirectory, const QStringList &files)
if (m_process->waitForStarted()) {
connect(m_process, SIGNAL(finished(int)), this, SLOT(done()));
connect(m_process, SIGNAL(readyRead()), this, SLOT(readData()));
- Core::DocumentManager::expectDirectoryChange(workingDirectory);
}
else {
delete m_process;
@@ -269,7 +268,6 @@ void MergeTool::done()
} else {
outputWindow->append(tr("Merge tool process terminated with exit code %1").arg(exitCode));
}
- Core::DocumentManager::unexpectDirectoryChange(workingDirectory);
GitPlugin::instance()->gitVersionControl()->emitRepositoryChanged(workingDirectory);
deleteLater();
}
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp
index 65c1c210474..e77911d42d6 100644
--- a/src/plugins/help/helpplugin.cpp
+++ b/src/plugins/help/helpplugin.cpp
@@ -384,8 +384,7 @@ void HelpPlugin::extensionsInitialized()
{
QStringList filesToRegister;
// we might need to register creators inbuild help
- filesToRegister.append(QDir::cleanPath(QCoreApplication::applicationDirPath()
- + ICore::documentationPath() + QLatin1String("/qtcreator.qch")));
+ filesToRegister.append(ICore::documentationPath() + QLatin1String("/qtcreator.qch"));
Core::HelpManager::instance()->registerDocumentation(filesToRegister);
}
diff --git a/src/plugins/macros/imacrohandler.cpp b/src/plugins/macros/imacrohandler.cpp
index 51b7c026423..e0d1a4cfe33 100644
--- a/src/plugins/macros/imacrohandler.cpp
+++ b/src/plugins/macros/imacrohandler.cpp
@@ -35,7 +35,7 @@ using namespace Macros;
/*!
\class Macro::IEventHandler
- \brief Base class for all macro event handlers.
+ \brief The IEventHandler class is a base class for all macro event handlers.
An event handler is used to handle a specific type of macro events.
They are used to create and replay macro events, use MacroManager::registerEventHandler
diff --git a/src/plugins/macros/macro.cpp b/src/plugins/macros/macro.cpp
index 91a8008afcd..a345f06e208 100644
--- a/src/plugins/macros/macro.cpp
+++ b/src/plugins/macros/macro.cpp
@@ -41,7 +41,8 @@ using namespace Macros;
/*!
\class Macros::Macro
- \brief Represents a macro, which is more or less a list of Macros::MacroEvent
+ \brief The Macro class represents a macro, which is more or less a list of
+ Macros::MacroEvent.
A macro is a list of events that can be replayed in Qt Creator. A macro has
an header consisting of the Qt Creator version where the macro was created
diff --git a/src/plugins/macros/macroevent.cpp b/src/plugins/macros/macroevent.cpp
index 1accf695312..9c7aae96da2 100644
--- a/src/plugins/macros/macroevent.cpp
+++ b/src/plugins/macros/macroevent.cpp
@@ -37,14 +37,13 @@ using namespace Macros;
/*!
\class Macros::MacroEvent
- \brief Represents an event in a macro
+ \brief The MacroEvent class represents an event in a macro.
An event stores information so it can be replayed. An event can be:
\list
\li menu action
\li key event on an editor
\li find/replace usage
- \li ...
\endlist
The information are stored in a map of QVariants (using quint8 for keys).
diff --git a/src/plugins/macros/macromanager.cpp b/src/plugins/macros/macromanager.cpp
index 99ff767af04..002a12427d8 100644
--- a/src/plugins/macros/macromanager.cpp
+++ b/src/plugins/macros/macromanager.cpp
@@ -67,13 +67,13 @@ using namespace Macros::Internal;
/*!
\namespace Macros
- \brief The Macros namespace contains support for macros in Qt Creator.
+ \brief The Macros namespace contains support for macros in \QC.
*/
/*!
\class Macro::MacroManager
- \brief Manager for macros.
+ \brief The MacroManager class implements a manager for macros.
The MacroManager manage all macros, it loads them on startup, keep track of the
current macro and create new macros.
diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp
index c9551fbd2fd..fe5b0558f21 100644
--- a/src/plugins/projectexplorer/abi.cpp
+++ b/src/plugins/projectexplorer/abi.cpp
@@ -41,7 +41,8 @@
/*!
\class ProjectExplorer::Abi
- \brief Represents the Application Binary Interface (ABI) of a target platform.
+ \brief The Abi class represents the Application Binary Interface (ABI) of
+ a target platform.
\sa ProjectExplorer::ToolChain
*/
@@ -738,6 +739,14 @@ QList Abi::abisOfBinary(const Utils::FileName &path)
return result;
}
+ProjectExplorer::Abi::Endianness Abi::endianness() const
+{
+ if (m_architecture == X86Architecture)
+ return LittleEndian;
+ // All other architectures are bi-endian:/
+ return UnknownEndian; // Todo: Add a field for endianness to the Abi struct!
+}
+
} // namespace ProjectExplorer
// Unit tests:
diff --git a/src/plugins/projectexplorer/abi.h b/src/plugins/projectexplorer/abi.h
index 2182da89e13..6b7b56bab80 100644
--- a/src/plugins/projectexplorer/abi.h
+++ b/src/plugins/projectexplorer/abi.h
@@ -102,6 +102,12 @@ public:
UnknownFormat
};
+ enum Endianness {
+ LittleEndian,
+ BigEndian,
+ UnknownEndian
+ };
+
Abi() :
m_architecture(UnknownArchitecture), m_os(UnknownOS),
m_osFlavor(UnknownFlavor), m_binaryFormat(UnknownFormat), m_wordWidth(0)
@@ -119,6 +125,7 @@ public:
bool isNull() const;
Architecture architecture() const { return m_architecture; }
+ Endianness endianness() const;
OS os() const { return m_os; }
OSFlavor osFlavor() const { return m_osFlavor; }
BinaryFormat binaryFormat() const { return m_binaryFormat; }
diff --git a/src/plugins/projectexplorer/abiwidget.cpp b/src/plugins/projectexplorer/abiwidget.cpp
index 4d5c588bc9b..05d15a211b5 100644
--- a/src/plugins/projectexplorer/abiwidget.cpp
+++ b/src/plugins/projectexplorer/abiwidget.cpp
@@ -37,7 +37,7 @@
/*!
\class ProjectExplorer::AbiWidget
- \brief A widget to set an ABI.
+ \brief The AbiWidget class is a widget to set an ABI.
\sa ProjectExplorer::Abi
*/
diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp
index 2c31d5c61e5..5b0bc84c34b 100644
--- a/src/plugins/projectexplorer/abstractprocessstep.cpp
+++ b/src/plugins/projectexplorer/abstractprocessstep.cpp
@@ -45,7 +45,8 @@ using namespace ProjectExplorer;
/*!
\class ProjectExplorer::AbstractProcessStep
- \brief A convenience class, which can be used as a base class instead of BuildStep.
+ \brief The AbstractProcessStep class is a convenience class that can be
+ used as a base class instead of BuildStep.
It should be used as a base class if your buildstep just needs to run a process.
diff --git a/src/plugins/projectexplorer/applicationlauncher.cpp b/src/plugins/projectexplorer/applicationlauncher.cpp
index 51d87a5fceb..3404b6c2268 100644
--- a/src/plugins/projectexplorer/applicationlauncher.cpp
+++ b/src/plugins/projectexplorer/applicationlauncher.cpp
@@ -52,7 +52,8 @@
/*!
\class ProjectExplorer::ApplicationLauncher
- \brief Application launcher of the ProjectExplorer plugin.
+ \brief The ApplicationLauncher class is the application launcher of the
+ ProjectExplorer plugin.
Encapsulates processes running in a console or as GUI processes,
captures debug output of GUI processes on Windows (outputDebugString()).
diff --git a/src/plugins/projectexplorer/baseprojectwizarddialog.cpp b/src/plugins/projectexplorer/baseprojectwizarddialog.cpp
index cfaf30c94f8..bb4ba350c90 100644
--- a/src/plugins/projectexplorer/baseprojectwizarddialog.cpp
+++ b/src/plugins/projectexplorer/baseprojectwizarddialog.cpp
@@ -37,7 +37,8 @@
/*!
\class ProjectExplorer::BaseProjectWizardDialog
- \brief Base class for project wizards.
+ \brief The BaseProjectWizardDialog class is the base class for project
+ wizards.
Presents the introductory page and takes care of setting the folder chosen
as default projects' folder should the user wish to do that.
diff --git a/src/plugins/projectexplorer/buildconfigurationmodel.cpp b/src/plugins/projectexplorer/buildconfigurationmodel.cpp
index 4d44118d243..8c6a955d614 100644
--- a/src/plugins/projectexplorer/buildconfigurationmodel.cpp
+++ b/src/plugins/projectexplorer/buildconfigurationmodel.cpp
@@ -35,11 +35,13 @@ using namespace ProjectExplorer;
/*!
\class ProjectExplorer::BuildConfigurationModel
- \brief A model to represent the build configurations of a target.
+ \brief The BuildConfigurationModel class is a model to represent the build
+ configurations of a target.
To be used in for the drop down of comboboxes.
Does automatically adjust itself to added and removed BuildConfigurations
Very similar to the Run Configuration Model.
+
TODO might it possible to share code without making the code a complete mess.
*/
diff --git a/src/plugins/projectexplorer/buildstep.cpp b/src/plugins/projectexplorer/buildstep.cpp
index 5fe313f7680..dc23c2543bd 100644
--- a/src/plugins/projectexplorer/buildstep.cpp
+++ b/src/plugins/projectexplorer/buildstep.cpp
@@ -37,22 +37,24 @@
/*!
\class ProjectExplorer::BuildStep
- \brief BuildSteps are the primary way plugin developers can customize
- how their projects (or projects from other plugins) are build.
+ \brief The BuildStep class provides build steps for projects.
- Building a project, is done by taking the list of buildsteps
- from the project and calling first init() than run() on them.
+ Build steps are the primary way plugin developers can customize
+ how their projects (or projects from other plugins) are built.
- That means to change the way your project is build, reimplemnt
- this class and add your Step to the buildStep list of the project.
+ Projects are built by taking the list of build steps
+ from the project and calling first \c init() and then \c run() on them.
- Note: The projects own the buildstep, do not delete them yourself.
+ To change the way your project is built, reimplement
+ this class and add your build step to the build step list of the project.
- init() is called in the GUI thread and can be used to query the
+ \note The projects own the build step. Do not delete them yourself.
+
+ \c init() is called in the GUI thread and can be used to query the
project for any information you need.
- run() is run via QtConccurrent in a own thread, if you need an
- eventloop you need to create it yourself!
+ \c run() is run via QtConcurrent in a separate thread. If you need an
+ event loop, you need to create it yourself.
*/
/*!
diff --git a/src/plugins/projectexplorer/customwizard/customwizard.cpp b/src/plugins/projectexplorer/customwizard/customwizard.cpp
index 58d6cf6c2a7..cd3c717ffcb 100644
--- a/src/plugins/projectexplorer/customwizard/customwizard.cpp
+++ b/src/plugins/projectexplorer/customwizard/customwizard.cpp
@@ -54,8 +54,9 @@ namespace ProjectExplorer {
/*!
\class ProjectExplorer::ICustomWizardFactory
- \brief Factory for creating custom wizards extending the base class
- (CustomWizard or CustomProjectWizard)
+ \brief The ICustomWizardFactory class implements a factory for creating
+ custom wizards extending the base classes: CustomWizard and
+ CustomProjectWizard.
The factory can be registered under a name in CustomWizard. The name can
be specified in the \c attribute in the \c wizard.xml file
@@ -79,7 +80,8 @@ int CustomWizardPrivate::verbose = 0;
/*!
\class ProjectExplorer::CustomWizard
- \brief Base classes for custom wizards based on file templates and a XML
+ \brief The CustomWizard class is a base class for custom wizards based on
+ file templates and an XML
configuration file (\c share/qtcreator/templates/wizards).
Presents CustomWizardDialog (fields page containing path control) for wizards
diff --git a/src/plugins/projectexplorer/customwizard/customwizardpage.cpp b/src/plugins/projectexplorer/customwizard/customwizardpage.cpp
index 72ce236fba5..5e847e63b0b 100644
--- a/src/plugins/projectexplorer/customwizard/customwizardpage.cpp
+++ b/src/plugins/projectexplorer/customwizard/customwizardpage.cpp
@@ -58,8 +58,9 @@ namespace Internal {
/*!
\class ProjectExplorer::Internal::TextFieldComboBox
- \brief A non-editable combo for text editing purposes that plays
- with QWizard::registerField (providing a settable 'text' property).
+ \brief The TextFieldComboBox class is a non-editable combo box for text
+ editing purposes that plays with \c QWizard::registerField (providing a
+ settable 'text' property).
Allows for a separation of values to be used for wizard fields replacement
and display texts.
@@ -110,7 +111,8 @@ QString TextFieldComboBox::valueAt(int i) const
/*!
\class ProjectExplorer::Internal::TextFieldCheckBox
- \brief A Checkbox that plays with QWizard::registerField.
+ \brief The TextFieldCheckBox class is a aheckbox that plays with
+ \c QWizard::registerField.
Provides a settable 'text' property containing predefined strings for 'true'/'false').
@@ -141,7 +143,8 @@ void TextFieldCheckBox::slotStateChanged(int cs)
/*!
\class ProjectExplorer::Internal::CustomWizardFieldPage
- \brief A simple custom wizard page presenting the fields to be used
+ \brief The CustomWizardFieldPage class is a simple custom wizard page
+ presenting the fields to be used
as page 2 of a BaseProjectWizardDialog if there are any fields.
Uses the 'field' functionality of QWizard.
diff --git a/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp b/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
index 98badd342cf..c8b8de00644 100644
--- a/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
+++ b/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
@@ -156,7 +156,8 @@ CustomWizardFile::CustomWizardFile() :
/*!
\class ProjectExplorer::CustomWizardValidationRule
- \brief A custom wizard validation rule based on JavaScript-expressions over
+ \brief The CustomWizardValidationRule class provides a custom wizard
+ validation rule based on JavaScript-expressions over
the field placeholders.
Placeholder replacement is performed on the condition and it is evaluated
@@ -561,7 +562,8 @@ static inline QString languageSetting()
/*!
\class ProjectExplorer::Internal::GeneratorScriptArgument
- \brief Argument to a custom wizard generator script.
+ \brief The GeneratorScriptArgument class provides an argument to a custom
+ wizard generator script.
Contains placeholders to be replaced by field values or file names
as in \c '--class-name=%ClassName%' or \c '--description=%Description%'.
diff --git a/src/plugins/projectexplorer/deployconfigurationmodel.cpp b/src/plugins/projectexplorer/deployconfigurationmodel.cpp
index 3e948d3790d..c2c66d4436a 100644
--- a/src/plugins/projectexplorer/deployconfigurationmodel.cpp
+++ b/src/plugins/projectexplorer/deployconfigurationmodel.cpp
@@ -36,7 +36,8 @@ using namespace ProjectExplorer;
/*!
\class ProjectExplorer::DeployConfigurationModel
- \brief A model to represent the run configurations of a target.
+ \brief The DeployConfigurationModel class provides a model to represent
+ the run configurations of a target.
To be used in for the drop down of comboboxes. Does automatically adjust
itself to added and removed DeployConfigurations
diff --git a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp
index 75fc23a031a..47369df4c26 100644
--- a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp
+++ b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp
@@ -296,7 +296,7 @@ DeviceProcess DeviceProcessesDialogPrivate::selectedProcess() const
/*!
\class ProjectExplorer::DeviceProcessesDialog
- \brief Shows a list of processes.
+ \brief The DeviceProcessesDialog class shows a list of processes.
The dialog can be used as a
\list
diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp
index 517a9235447..1afe29f6846 100644
--- a/src/plugins/projectexplorer/devicesupport/idevice.cpp
+++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp
@@ -43,7 +43,7 @@
/*!
* \class ProjectExplorer::IDevice
- * \brief This is the base class for all devices.
+ * \brief The IDevice class is the base class for all devices.
*
* The term "device" refers
* here to some host to which e.g. files can be deployed or on which an application can run.
diff --git a/src/plugins/projectexplorer/ioutputparser.cpp b/src/plugins/projectexplorer/ioutputparser.cpp
index fc5882e5f28..a102b6f60c2 100644
--- a/src/plugins/projectexplorer/ioutputparser.cpp
+++ b/src/plugins/projectexplorer/ioutputparser.cpp
@@ -33,7 +33,8 @@
/*!
\class ProjectExplorer::IOutputParser
- \brief Interface for an output parser that emit issues (tasks).
+ \brief The IOutputParser class provides an interface for an output parser
+ that emits issues (tasks).
\sa ProjectExplorer::Task
*/
diff --git a/src/plugins/projectexplorer/msvcparser.cpp b/src/plugins/projectexplorer/msvcparser.cpp
index 9596e5ce0a5..b3fa47cfd3c 100644
--- a/src/plugins/projectexplorer/msvcparser.cpp
+++ b/src/plugins/projectexplorer/msvcparser.cpp
@@ -30,6 +30,10 @@
#include "msvcparser.h"
#include "projectexplorerconstants.h"
+#ifdef Q_OS_WIN
+#include
+#endif
+
static const char FILE_POS_PATTERN[] = "(cl|LINK|.+) : ";
static const char ERROR_PATTERN[] = "[A-Z]+\\d\\d\\d\\d ?:";
@@ -53,7 +57,12 @@ static QPair parseFileName(const QString &input)
}
}
}
- return qMakePair(Utils::FileName::fromUserInput(fileName), linenumber);
+#ifdef Q_OS_WIN
+ const QString normalized = Utils::normalizePathName(fileName);
+#else
+ const QString normalized = fileName;
+#endif
+ return qMakePair(Utils::FileName::fromUserInput(normalized), linenumber);
}
using namespace ProjectExplorer;
diff --git a/src/plugins/projectexplorer/pluginfilefactory.cpp b/src/plugins/projectexplorer/pluginfilefactory.cpp
index 86e24a46b2a..64353d644c4 100644
--- a/src/plugins/projectexplorer/pluginfilefactory.cpp
+++ b/src/plugins/projectexplorer/pluginfilefactory.cpp
@@ -45,7 +45,7 @@ using namespace ProjectExplorer::Internal;
/*!
\class ProjectExplorer::Internal::ProjectFileFactory
- \brief Factory for project files.
+ \brief The ProjectFileFactory class provides a factory for project files.
*/
ProjectFileFactory::ProjectFileFactory(IProjectManager *manager)
diff --git a/src/plugins/projectexplorer/processparameters.cpp b/src/plugins/projectexplorer/processparameters.cpp
index da86fff931e..649225361d7 100644
--- a/src/plugins/projectexplorer/processparameters.cpp
+++ b/src/plugins/projectexplorer/processparameters.cpp
@@ -38,7 +38,8 @@
/*!
\class ProjectExplorer::ProcessParameters
- \brief ProcessParameters aggregates all parameters needed to start a process.
+ \brief The ProcessParameters class aggregates all parameters needed to start
+ a process.
It offers a set of functions which expand macros and environment variables
inside the raw parameters to obtain final values for starting a process
diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp
index 9f634eec07c..a66fdc32c12 100644
--- a/src/plugins/projectexplorer/project.cpp
+++ b/src/plugins/projectexplorer/project.cpp
@@ -45,7 +45,7 @@
/*!
\class ProjectExplorer::Project
- \brief A project.
+ \brief The Project class implements a project node in the project explorer.
*/
/*!
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index e83723b7daa..d9ce0097843 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -139,8 +139,8 @@
/*!
\class ProjectExplorer::ProjectExplorerPlugin
- \brief ProjectExplorerPlugin with static accessor and utility functions to obtain
- current project, open projects, etc.
+ \brief The ProjectExplorerPlugin class contains static accessor and utility
+ functions to obtain the current project, open projects, and so on.
*/
namespace {
@@ -1929,7 +1929,18 @@ void ProjectExplorerPlugin::updateActions()
d->m_cancelBuildAction->setEnabled(d->m_buildManager->isBuilding());
- d->m_publishAction->setEnabled(!d->m_session->projects().isEmpty());
+ bool canPublish = false;
+ if (project) {
+ const QList &factories
+ = ExtensionSystem::PluginManager::getObjects();
+ foreach (const IPublishingWizardFactory *const factory, factories) {
+ if (factory->canCreateWizard(project)) {
+ canPublish = true;
+ break;
+ }
+ }
+ }
+ d->m_publishAction->setEnabled(canPublish);
d->m_projectSelectorAction->setEnabled(!session()->projects().isEmpty());
d->m_projectSelectorActionMenu->setEnabled(!session()->projects().isEmpty());
diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs
index 9026717cde7..55dd5a3432c 100644
--- a/src/plugins/projectexplorer/projectexplorer.qbs
+++ b/src/plugins/projectexplorer/projectexplorer.qbs
@@ -334,7 +334,7 @@ QtcPlugin {
Group {
name: "WindowsToolChains"
- condition: qbs.targetOS == "windows" || Defaults.testsEnabled(qbs)
+ condition: qbs.targetOS.contains("windows") || Defaults.testsEnabled(qbs)
files: [
"abstractmsvctoolchain.cpp",
"abstractmsvctoolchain.h",
diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp
index b1ffbec7ac2..dca5a2c688b 100644
--- a/src/plugins/projectexplorer/projectfilewizardextension.cpp
+++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp
@@ -64,7 +64,8 @@
/*!
\class ProjectExplorer::Internal::ProjectFileWizardExtension
- \brief Post-file generating steps of a project wizard.
+ \brief The ProjectFileWizardExtension class implements the post-file
+ generating steps of a project wizard.
Offers:
\list
diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp
index 021bbbd211b..3b81a0b498f 100644
--- a/src/plugins/projectexplorer/projectnodes.cpp
+++ b/src/plugins/projectexplorer/projectnodes.cpp
@@ -49,7 +49,7 @@ using namespace ProjectExplorer;
/*!
\class ProjectExplorer::Node
- \brief Base class of all nodes in the node hierarchy.
+ \brief The Node class is the base class of all nodes in the node hierarchy.
The nodes are arranged in a tree where leaves are FileNodes and non-leaves are FolderNodes
A Project is a special Folder that manages the files and normal folders underneath it.
diff --git a/src/plugins/projectexplorer/projectwizardpage.cpp b/src/plugins/projectexplorer/projectwizardpage.cpp
index d6d4df06311..c8077db03ba 100644
--- a/src/plugins/projectexplorer/projectwizardpage.cpp
+++ b/src/plugins/projectexplorer/projectwizardpage.cpp
@@ -40,7 +40,8 @@
/*!
\class ProjectExplorer::Internal::ProjectWizardPage
- \brief Wizard page showing projects and version control to add new files to.
+ \brief The ProjectWizardPage class provides a wizard page showing projects
+ and version control to add new files to.
\sa ProjectExplorer::Internal::ProjectFileWizardExtension
*/
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index 4561b1343d7..5cb66206431 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -64,7 +64,7 @@ const char USE_MULTIPROCESS_KEY[] = "RunConfiguration.UseMultiProcess";
/*!
\class ProjectExplorer::ProcessHandle
- \brief Helper class to describe a process.
+ \brief The ProcessHandle class is a helper class to describe a process.
Encapsulates parameters of a running process, local (PID) or remote (to be done,
address, port, etc).
@@ -115,15 +115,19 @@ RunConfigWidget *IRunConfigurationAspect::createConfigurationWidget()
/*!
\class ProjectExplorer::RunConfiguration
- \brief Base class for a run configuration. A run configuration specifies how a
- target should be run, while the runner (see below) does the actual running.
+ \brief The RunConfiguration class is the base class for a run configuration.
- Note that all RunControls and the target hold a shared pointer to the RunConfiguration.
- That is the lifetime of the RunConfiguration might exceed the life of the target.
+ A run configuration specifies how a target should be run, while a runner
+ does the actual running.
+
+ All RunControls and the target hold a shared pointer to the run
+ configuration. That is, the lifetime of the run configuration might exceed
+ the life of the target.
The user might still have a RunControl running (or output tab of that RunControl open)
and yet unloaded the target.
- Also, a RunConfiguration might be already removed from the list of RunConfigurations
+ Also, a run configuration might be already removed from the list of run
+ configurations
for a target, but still be runnable via the output tab.
*/
@@ -249,7 +253,8 @@ bool RunConfiguration::fromMap(const QVariantMap &map)
/*!
\class ProjectExplorer::IRunConfigurationAspect
- \brief Extra configuration aspect.
+ \brief The IRunConfigurationAspect class provides an additional
+ configuration aspect.
Aspects are a mechanism to add RunControl-specific options to a RunConfiguration without
subclassing the RunConfiguration for every addition, preventing a combinatorical explosion
@@ -277,7 +282,8 @@ Utils::OutputFormatter *RunConfiguration::createOutputFormatter() const
/*!
\class ProjectExplorer::IRunConfigurationFactory
- \brief Restores RunConfigurations from settings.
+ \brief The IRunConfigurationFactory class restores run configurations from
+ settings.
The run configuration factory is used for restoring run configurations from
settings. And used to create new runconfigurations in the "Run Settings" Dialog.
@@ -368,7 +374,8 @@ QList IRunConfigurationFactory::find(Target *parent)
/*!
\class ProjectExplorer::IRunControlFactory
- \brief Creates RunControl objects matching a RunConfiguration
+ \brief The IRunControlFactory class creates RunControl objects matching a
+ run configuration.
*/
/*!
@@ -406,7 +413,7 @@ IRunConfigurationAspect *IRunControlFactory::createRunConfigurationAspect(RunCon
/*!
\class ProjectExplorer::RunControl
- \brief Each instance of this class represents one item that is run.
+ \brief The RunControl class instances represent one item that is run.
*/
/*!
diff --git a/src/plugins/projectexplorer/runconfigurationmodel.cpp b/src/plugins/projectexplorer/runconfigurationmodel.cpp
index 5183206f08f..e9d19e7f363 100644
--- a/src/plugins/projectexplorer/runconfigurationmodel.cpp
+++ b/src/plugins/projectexplorer/runconfigurationmodel.cpp
@@ -36,7 +36,8 @@ using namespace ProjectExplorer;
/*!
\class ProjectExplorer::RunConfigurationModel
- \brief A model to represent the run configurations of a target.
+ \brief The RunConfigurationModel class provides a model to represent the
+ run configurations of a target.
To be used in for the drop down of comboboxes.
Does automatically adjust itself to added and removed RunConfigurations
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp
index cb493df4665..8e0dcdea17a 100644
--- a/src/plugins/projectexplorer/session.cpp
+++ b/src/plugins/projectexplorer/session.cpp
@@ -67,7 +67,7 @@ using namespace ProjectExplorer::Internal;
/*!
\class ProjectExplorer::SessionManager
- \brief Session management.
+ \brief The SessionManager class manages sessions.
TODO the interface of this class is not really great.
The implementation suffers that all the functions from the
diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp
index a8f42ea2bd6..a4b774aaa7f 100644
--- a/src/plugins/projectexplorer/settingsaccessor.cpp
+++ b/src/plugins/projectexplorer/settingsaccessor.cpp
@@ -404,6 +404,24 @@ public:
QVariantMap update(Project *project, const QVariantMap &map);
};
+// Version 13 reflects the move of environment settings from LocalApplicationRunConfiguration
+// into the EnvironmentAspect
+class Version13Handler : public UserFileVersionHandler
+{
+public:
+ int userFileVersion() const
+ {
+ return 13;
+ }
+
+ QString displayUserFileVersion() const
+ {
+ return QLatin1String("2.8");
+ }
+
+ QVariantMap update(Project *project, const QVariantMap &map);
+};
+
} // namespace
//
@@ -494,6 +512,8 @@ SettingsAccessor::SettingsAccessor(Project *project) :
addVersionHandler(new Version9Handler);
addVersionHandler(new Version10Handler);
addVersionHandler(new Version11Handler);
+ addVersionHandler(new Version12Handler);
+ addVersionHandler(new Version13Handler);
}
SettingsAccessor::~SettingsAccessor()
@@ -2727,3 +2747,21 @@ QVariantMap Version12Handler::update(Project *project, const QVariantMap &map)
}
return result;
}
+
+QVariantMap Version13Handler::update(Project *project, const QVariantMap &map)
+{
+ QVariantMap result;
+ QMapIterator it(map);
+ while (it.hasNext()) {
+ it.next();
+ if (it.value().type() == QVariant::Map)
+ result.insert(it.key(), update(project, it.value().toMap()));
+ else if (it.key() == QLatin1String("PE.UserEnvironmentChanges"))
+ result.insert(QLatin1String("PE.EnvironmentAspect.Changes"), it.value());
+ else if (it.key() == QLatin1String("PE.BaseEnvironmentBase"))
+ result.insert(QLatin1String("PE.EnvironmentAspect.Base"), it.value());
+ else
+ result.insert(it.key(), it.value());
+ }
+ return result;
+}
diff --git a/src/plugins/projectexplorer/task.cpp b/src/plugins/projectexplorer/task.cpp
index 42db4a143e2..8fb79e097ab 100644
--- a/src/plugins/projectexplorer/task.cpp
+++ b/src/plugins/projectexplorer/task.cpp
@@ -36,7 +36,7 @@ unsigned int Task::s_nextId = 1;
/*!
\class ProjectExplorer::Task
- \brief Build issue (warning or error).
+ \brief The Task class represents a build issue (warning or error).
\sa ProjectExplorer::TaskHub
*/
diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp
index 300812b2ee4..ec532b9df6b 100644
--- a/src/plugins/projectexplorer/toolchain.cpp
+++ b/src/plugins/projectexplorer/toolchain.cpp
@@ -75,7 +75,7 @@ public:
/*!
\class ProjectExplorer::ToolChain
- \brief Representation of a ToolChain.
+ \brief The ToolChain class represents a tool chain.
\sa ProjectExplorer::ToolChainManager
*/
diff --git a/src/plugins/projectexplorer/windebuginterface.cpp b/src/plugins/projectexplorer/windebuginterface.cpp
index 94f6593c86b..c8b206b6439 100644
--- a/src/plugins/projectexplorer/windebuginterface.cpp
+++ b/src/plugins/projectexplorer/windebuginterface.cpp
@@ -36,7 +36,8 @@
/*!
\class ProjectExplorer::Internal::WinDebugInterface
- \brief Windows: Captures output of the Windows API OutputDebugString() function.
+ \brief The WinDebugInterface class is used on Windows to capture output of
+ the Windows API \c OutputDebugString() function.
Emits output by process id.
diff --git a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
index e9705a85b24..9c6a4ceb0ea 100644
--- a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
+++ b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
@@ -224,9 +224,9 @@ QVariantMap QbsBuildStep::toMap() const
void QbsBuildStep::buildingDone(bool success)
{
// Report errors:
- foreach (const qbs::ErrorData &data, m_job->error().entries())
- createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
- data.codeLocation().fileName(), data.codeLocation().line());
+ foreach (const qbs::ErrorItem &item, m_job->error().items())
+ createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
+ item.codeLocation().fileName(), item.codeLocation().line());
QTC_ASSERT(m_fi, return);
m_fi->reportResult(success);
@@ -403,7 +403,7 @@ void QbsBuildStepConfigWidget::updateState()
if (m_step->keepGoing())
command += QLatin1String("--keep-going ");
command += QString::fromLatin1("--jobs %1 ").arg(m_step->maxJobs());
- command += QString::fromLatin1("profile:%1 %2").arg(m_step->profile(), buildVariant);
+ command += QString::fromLatin1("%1 profile:%2").arg(buildVariant, m_step->profile());
QList > propertyList = m_ui->propertyEdit->properties();
for (int i = 0; i < propertyList.count(); ++i) {
diff --git a/src/plugins/qbsprojectmanager/qbscleanstep.cpp b/src/plugins/qbsprojectmanager/qbscleanstep.cpp
index 6911144cb17..c18e5ab7b0b 100644
--- a/src/plugins/qbsprojectmanager/qbscleanstep.cpp
+++ b/src/plugins/qbsprojectmanager/qbscleanstep.cpp
@@ -179,9 +179,9 @@ QVariantMap QbsCleanStep::toMap() const
void QbsCleanStep::cleaningDone(bool success)
{
// Report errors:
- foreach (const qbs::ErrorData &data, m_job->error().entries()) {
- createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
- data.codeLocation().fileName(), data.codeLocation().line());
+ foreach (const qbs::ErrorItem &item, m_job->error().items()) {
+ createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
+ item.codeLocation().fileName(), item.codeLocation().line());
}
QTC_ASSERT(m_fi, return);
diff --git a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp
index b08b11ad5b2..ec716a5beb0 100644
--- a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp
+++ b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp
@@ -134,10 +134,10 @@ QString QbsInstallStep::installRoot() const
QString QbsInstallStep::absoluteInstallRoot() const
{
- const qbs::ProjectData *data = static_cast(project())->qbsProjectData();
+ const qbs::ProjectData data = static_cast(project())->qbsProjectData();
QString path = installRoot();
- if (data && !data->buildDirectory().isEmpty() && !path.isEmpty())
- path = QDir(data->buildDirectory()).absoluteFilePath(path);
+ if (data.isValid() && !data.buildDirectory().isEmpty() && !path.isEmpty())
+ path = QDir(data.buildDirectory()).absoluteFilePath(path);
return path;
}
@@ -188,9 +188,9 @@ qbs::InstallOptions QbsInstallStep::installOptions() const
void QbsInstallStep::installDone(bool success)
{
// Report errors:
- foreach (const qbs::ErrorData &data, m_job->error().entries()) {
- createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
- data.codeLocation().fileName(), data.codeLocation().line());
+ foreach (const qbs::ErrorItem &item, m_job->error().items()) {
+ createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
+ item.codeLocation().fileName(), item.codeLocation().line());
}
QTC_ASSERT(m_fi, return);
@@ -306,9 +306,9 @@ void QbsInstallStepConfigWidget::updateState()
m_ui->keepGoingCheckBox->setChecked(m_step->keepGoing());
}
- const qbs::ProjectData *data = static_cast(m_step->project())->qbsProjectData();
- if (data)
- m_ui->installRootChooser->setBaseDirectory(data->buildDirectory());
+ const qbs::ProjectData data = static_cast(m_step->project())->qbsProjectData();
+ if (data.isValid())
+ m_ui->installRootChooser->setBaseDirectory(data.buildDirectory());
QString command = QLatin1String("qbs install ");
if (m_step->dryRun())
diff --git a/src/plugins/qbsprojectmanager/qbslogsink.cpp b/src/plugins/qbsprojectmanager/qbslogsink.cpp
index 3d7ac94eae4..e22cd6391cd 100644
--- a/src/plugins/qbsprojectmanager/qbslogsink.cpp
+++ b/src/plugins/qbsprojectmanager/qbslogsink.cpp
@@ -68,13 +68,13 @@ void QbsLogSink::sendMessages()
mm->printToOutputPane(msg, Core::MessageManager::NoModeSwitch);
}
-void QbsLogSink::doPrintWarning(const qbs::Error &warning)
+void QbsLogSink::doPrintWarning(const qbs::ErrorInfo &warning)
{
- foreach (const qbs::ErrorData &data, warning.entries())
+ foreach (const qbs::ErrorItem &item, warning.items())
emit newTask(ProjectExplorer::Task(ProjectExplorer::Task::Warning,
- data.description(),
- Utils::FileName::fromString(data.codeLocation().fileName()),
- data.codeLocation().line(),
+ item.description(),
+ Utils::FileName::fromString(item.codeLocation().fileName()),
+ item.codeLocation().line(),
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
}
diff --git a/src/plugins/qbsprojectmanager/qbslogsink.h b/src/plugins/qbsprojectmanager/qbslogsink.h
index fe40101e884..0da371119e7 100644
--- a/src/plugins/qbsprojectmanager/qbslogsink.h
+++ b/src/plugins/qbsprojectmanager/qbslogsink.h
@@ -54,7 +54,7 @@ private slots:
void sendMessages();
private:
- void doPrintWarning(const qbs::Error &warning);
+ void doPrintWarning(const qbs::ErrorInfo &warning);
void doPrintMessage(qbs::LoggerLevel level, const QString &message, const QString &tag);
QStringList m_messages;
diff --git a/src/plugins/qbsprojectmanager/qbsnodes.cpp b/src/plugins/qbsprojectmanager/qbsnodes.cpp
index caeb0ad2303..8606d73646b 100644
--- a/src/plugins/qbsprojectmanager/qbsnodes.cpp
+++ b/src/plugins/qbsprojectmanager/qbsnodes.cpp
@@ -34,6 +34,7 @@
#include
#include
+#include
#include
#include
#include
@@ -84,8 +85,8 @@ namespace QbsProjectManager {
namespace Internal {
QIcon QbsProjectNode::m_projectIcon = generateIcon();
-QIcon QbsProductNode::m_productIcon = generateIcon();
-QIcon QbsGroupNode::m_groupIcon = generateIcon();
+QIcon QbsProductNode::m_productIcon = QIcon(QString::fromLatin1(ProjectExplorer::Constants::ICON_REBUILD_SMALL));
+QIcon QbsGroupNode::m_groupIcon = QIcon(QString::fromLatin1(ProjectExplorer::Constants::ICON_BUILD_SMALL));
class FileTreeNode {
public:
@@ -465,15 +466,14 @@ void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root,
// QbsProductNode:
// --------------------------------------------------------------------
-QbsProductNode::QbsProductNode(const qbs::ProductData *prd) :
- QbsBaseProjectNode(prd->location().fileName()),
- m_qbsProductData(0)
+QbsProductNode::QbsProductNode(const qbs::ProductData &prd) :
+ QbsBaseProjectNode(prd.location().fileName())
{
setIcon(m_productIcon);
- ProjectExplorer::FileNode *idx = new QbsFileNode(prd->location().fileName(),
+ ProjectExplorer::FileNode *idx = new QbsFileNode(prd.location().fileName(),
ProjectExplorer::ProjectFileType, false,
- prd->location().line());
+ prd.location().line());
addFileNodes(QList() << idx, this);
setQbsProductData(prd);
@@ -481,22 +481,21 @@ QbsProductNode::QbsProductNode(const qbs::ProductData *prd) :
bool QbsProductNode::isEnabled() const
{
- return m_qbsProductData ? m_qbsProductData->isEnabled() : false;
+ return m_qbsProductData.isEnabled();
}
-void QbsProductNode::setQbsProductData(const qbs::ProductData *prd)
+void QbsProductNode::setQbsProductData(const qbs::ProductData prd)
{
- Q_ASSERT(prd);
if (m_qbsProductData == prd)
return;
- bool productWasEnabled = m_qbsProductData ? m_qbsProductData->isEnabled() : true;
- bool productIsEnabled = prd->isEnabled();
+ bool productWasEnabled = m_qbsProductData.isEnabled();
+ bool productIsEnabled = prd.isEnabled();
bool updateExisting = productWasEnabled != productIsEnabled;
- setDisplayName(prd->name());
- setPath(prd->location().fileName());
- const QString &productPath = QFileInfo(prd->location().fileName()).absolutePath();
+ setDisplayName(prd.name());
+ setPath(prd.location().fileName());
+ const QString &productPath = QFileInfo(prd.location().fileName()).absolutePath();
// Find the QbsFileNode we added earlier:
QbsFileNode *idx = 0;
@@ -505,14 +504,14 @@ void QbsProductNode::setQbsProductData(const qbs::ProductData *prd)
if (idx)
break;
}
- if (idx->update(prd->location()) || updateExisting)
+ if (idx->update(prd.location()) || updateExisting)
idx->emitNodeUpdated();
QList toAdd;
QList toRemove = subProjectNodes();
- foreach (const qbs::GroupData &grp, prd->groups()) {
- if (grp.name() == prd->name() && grp.location() == prd->location()) {
+ foreach (const qbs::GroupData &grp, prd.groups()) {
+ if (grp.name() == prd.name() && grp.location() == prd.location()) {
// Set implicit product group right onto this node:
QbsGroupNode::setupFiles(this, grp.allFilePaths(), productPath, updateExisting);
continue;
@@ -540,7 +539,7 @@ QList QbsProductNode::runConfigurationsFor(
Q_UNUSED(node);
QList result;
QbsProjectNode *pn = qobject_cast(projectNode());
- if (!isEnabled() || !pn || pn->qbsProject()->targetExecutable(*m_qbsProductData,
+ if (!isEnabled() || !pn || pn->qbsProject()->targetExecutable(m_qbsProductData,
qbs::InstallOptions()).isEmpty()) {
return result;
}
@@ -549,7 +548,7 @@ QList QbsProductNode::runConfigurationsFor(
QbsRunConfiguration *qbsRc = qobject_cast(rc);
if (!qbsRc)
continue;
- if (qbsRc->qbsProduct() == qbsProductData()->name())
+ if (qbsRc->qbsProduct() == qbsProductData().name())
result << qbsRc;
}
@@ -572,71 +571,109 @@ QbsGroupNode *QbsProductNode::findGroupNode(const QString &name)
QbsProjectNode::QbsProjectNode(QbsProject *project) :
QbsBaseProjectNode(project->document()->fileName()),
- m_project(project), m_qbsProject(0), m_qbsProjectData(0)
+ m_project(project), m_qbsProject(0)
{
- Q_ASSERT(project);
- setIcon(m_projectIcon);
- addFileNodes(QList()
- << new ProjectExplorer::FileNode(path(), ProjectExplorer::ProjectFileType, false), this);
+ ctor();
+}
+
+QbsProjectNode::QbsProjectNode(const QString &path) :
+ QbsBaseProjectNode(path),
+ m_project(0), m_qbsProject(0)
+{
+ ctor();
}
QbsProjectNode::~QbsProjectNode()
{
// do not delete m_project
- delete m_qbsProjectData;
delete m_qbsProject;
}
void QbsProjectNode::update(const qbs::Project *prj)
{
- QList toAdd;
- QList toRemove = subProjectNodes();
-
- qbs::ProjectData *newData = 0;
-
- if (prj) {
- newData = new qbs::ProjectData(prj->projectData());
- foreach (const qbs::ProductData &prd, newData->products()) {
- QbsProductNode *qn = findProductNode(prd.name());
- if (!qn) {
- toAdd << new QbsProductNode(&prd);
- } else {
- qn->setQbsProductData(&prd);
- toRemove.removeOne(qn);
- }
- }
- }
-
- delete m_qbsProjectData;
- m_qbsProjectData = newData;
+ update(prj ? prj->projectData() : qbs::ProjectData());
delete m_qbsProject;
m_qbsProject = prj;
+}
+
+void QbsProjectNode::update(const qbs::ProjectData &prjData)
+{
+ QList toAdd;
+ QList toRemove = subProjectNodes();
+
+ foreach (const qbs::ProjectData &subData, prjData.subProjects()) {
+ QbsProjectNode *qn = findProjectNode(subData.name());
+ if (!qn) {
+ QbsProjectNode *subProject = new QbsProjectNode(prjData.location().fileName());
+ subProject->update(subData);
+ toAdd << subProject;
+ } else {
+ qn->update(subData);
+ toRemove.removeOne(qn);
+ }
+ }
+
+ foreach (const qbs::ProductData &prd, prjData.products()) {
+ QbsProductNode *qn = findProductNode(prd.name());
+ if (!qn) {
+ toAdd << new QbsProductNode(prd);
+ } else {
+ qn->setQbsProductData(prd);
+ toRemove.removeOne(qn);
+ }
+ }
+
+ setDisplayName(prjData.name());
removeProjectNodes(toRemove);
addProjectNodes(toAdd);
+
+ m_qbsProjectData = prjData;
}
QbsProject *QbsProjectNode::project() const
{
+ if (!m_project && projectNode())
+ return static_cast(projectNode())->project();
return m_project;
}
const qbs::Project *QbsProjectNode::qbsProject() const
{
+ QbsProjectNode *parent = qobject_cast(projectNode());
+ if (!m_qbsProject && parent != this)
+ return parent->qbsProject();
return m_qbsProject;
}
-const qbs::ProjectData *QbsProjectNode::qbsProjectData() const
+const qbs::ProjectData QbsProjectNode::qbsProjectData() const
{
return m_qbsProjectData;
}
+void QbsProjectNode::ctor()
+{
+ setIcon(m_projectIcon);
+ addFileNodes(QList()
+ << new ProjectExplorer::FileNode(path(), ProjectExplorer::ProjectFileType, false), this);
+}
+
QbsProductNode *QbsProjectNode::findProductNode(const QString &name)
{
foreach (ProjectExplorer::ProjectNode *n, subProjectNodes()) {
- QbsProductNode *qn = static_cast(n);
- if (qn->qbsProductData()->name() == name)
+ QbsProductNode *qn = qobject_cast(n);
+ if (qn && qn->qbsProductData().name() == name)
+ return qn;
+ }
+ return 0;
+}
+
+QbsProjectNode *QbsProjectNode::findProjectNode(const QString &name)
+{
+ foreach (ProjectExplorer::ProjectNode *n, subProjectNodes()) {
+ QbsProjectNode *qn = qobject_cast(n);
+ if (qn && qn->qbsProjectData().name() == name)
return qn;
}
return 0;
diff --git a/src/plugins/qbsprojectmanager/qbsnodes.h b/src/plugins/qbsprojectmanager/qbsnodes.h
index 6890e305811..2070483493b 100644
--- a/src/plugins/qbsprojectmanager/qbsnodes.h
+++ b/src/plugins/qbsprojectmanager/qbsnodes.h
@@ -148,19 +148,19 @@ class QbsProductNode : public QbsBaseProjectNode
Q_OBJECT
public:
- explicit QbsProductNode(const qbs::ProductData *prd);
+ explicit QbsProductNode(const qbs::ProductData &prd);
bool isEnabled() const;
- void setQbsProductData(const qbs::ProductData *prd);
- const qbs::ProductData *qbsProductData() const { return m_qbsProductData; }
+ void setQbsProductData(const qbs::ProductData prd);
+ const qbs::ProductData qbsProductData() const { return m_qbsProductData; }
QList runConfigurationsFor(Node *node);
private:
QbsGroupNode *findGroupNode(const QString &name);
- const qbs::ProductData *m_qbsProductData;
+ qbs::ProductData m_qbsProductData;
static QIcon m_productIcon;
};
@@ -174,21 +174,26 @@ class QbsProjectNode : public QbsBaseProjectNode
public:
explicit QbsProjectNode(QbsProject *project);
+ explicit QbsProjectNode(const QString &path);
~QbsProjectNode();
void update(const qbs::Project *prj);
+ void update(const qbs::ProjectData &prjData);
QbsProject *project() const;
const qbs::Project *qbsProject() const;
- const qbs::ProjectData *qbsProjectData() const;
+ const qbs::ProjectData qbsProjectData() const;
private:
+ void ctor();
+
QbsProductNode *findProductNode(const QString &name);
+ QbsProjectNode *findProjectNode(const QString &name);
QbsProject *m_project;
const qbs::Project *m_qbsProject;
- const qbs::ProjectData *m_qbsProjectData;
+ qbs::ProjectData m_qbsProjectData;
static QIcon m_projectIcon;
};
} // namespace Internal
diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp
index 0e7e5969e44..766e0f8d190 100644
--- a/src/plugins/qbsprojectmanager/qbsproject.cpp
+++ b/src/plugins/qbsprojectmanager/qbsproject.cpp
@@ -103,9 +103,11 @@ QbsProject::QbsProject(QbsManager *manager, const QString &fileName) :
m_rootProjectNode(0),
m_qbsSetupProjectJob(0),
m_qbsUpdateFutureInterface(0),
+ m_currentProgressBase(0),
+ m_forceParsing(false),
m_currentBc(0)
{
- m_parsingDelay.setInterval(1000); // delay (some) parsing by 1s.
+ m_parsingDelay.setInterval(1000); // delay parsing by 1s.
setProjectContext(Core::Context(Constants::PROJECT_ID));
setProjectLanguages(Core::Context(ProjectExplorer::Constants::LANG_CXX));
@@ -118,7 +120,7 @@ QbsProject::QbsProject(QbsManager *manager, const QString &fileName) :
connect(&m_parsingDelay, SIGNAL(timeout()), this, SLOT(parseCurrentBuildConfiguration()));
- updateDocuments(0);
+ updateDocuments(QSet() << fileName);
m_rootProjectNode = new QbsProjectNode(this); // needs documents to be initialized!
}
@@ -160,8 +162,8 @@ QStringList QbsProject::files(ProjectExplorer::Project::FilesMode fileMode) cons
{
Q_UNUSED(fileMode);
QSet result;
- if (m_rootProjectNode && m_rootProjectNode->qbsProjectData()) {
- foreach (const qbs::ProductData &prd, m_rootProjectNode->qbsProjectData()->products()) {
+ if (m_rootProjectNode && m_rootProjectNode->qbsProjectData().isValid()) {
+ foreach (const qbs::ProductData &prd, m_rootProjectNode->qbsProjectData().allProducts()) {
foreach (const qbs::GroupData &grp, prd.groups()) {
foreach (const QString &file, grp.allFilePaths())
result.insert(file);
@@ -169,7 +171,7 @@ QStringList QbsProject::files(ProjectExplorer::Project::FilesMode fileMode) cons
}
result.insert(prd.location().fileName());
}
- result.insert(m_rootProjectNode->qbsProjectData()->location().fileName());
+ result.insert(m_rootProjectNode->qbsProjectData().location().fileName());
}
return result.toList();
}
@@ -189,7 +191,7 @@ qbs::BuildJob *QbsProject::build(const qbs::BuildOptions &opts, QStringList prod
QList products;
foreach (const QString &productName, productNames) {
bool found = false;
- foreach (const qbs::ProductData &data, qbsProjectData()->products()) {
+ foreach (const qbs::ProductData &data, qbsProjectData().allProducts()) {
if (data.name() == productName) {
found = true;
products.append(data);
@@ -247,10 +249,10 @@ const qbs::Project *QbsProject::qbsProject() const
return m_rootProjectNode->qbsProject();
}
-const qbs::ProjectData *QbsProject::qbsProjectData() const
+const qbs::ProjectData QbsProject::qbsProjectData() const
{
if (!m_rootProjectNode)
- return 0;
+ return qbs::ProjectData();
return m_rootProjectNode->qbsProjectData();
}
@@ -280,7 +282,7 @@ void QbsProject::handleQbsParsingDone(bool success)
m_rootProjectNode->update(project);
- updateDocuments(m_rootProjectNode->qbsProjectData());
+ updateDocuments(project ? project->buildSystemFiles() : QSet() << m_fileName);
updateCppCodeModel(m_rootProjectNode->qbsProjectData());
updateQmlJsCodeModel(m_rootProjectNode->qbsProjectData());
@@ -310,8 +312,8 @@ void QbsProject::handleQbsParsingTaskSetup(const QString &description, int maxim
void QbsProject::targetWasAdded(ProjectExplorer::Target *t)
{
connect(t, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
- this, SLOT(delayParsing()));
- connect(t, SIGNAL(buildDirectoryChanged()), this, SLOT(delayParsing()));
+ this, SLOT(delayForcedParsing()));
+ connect(t, SIGNAL(buildDirectoryChanged()), this, SLOT(delayForcedParsing()));
}
void QbsProject::changeActiveTarget(ProjectExplorer::Target *t)
@@ -341,6 +343,12 @@ void QbsProject::delayParsing()
m_parsingDelay.start();
}
+void QbsProject::delayForcedParsing()
+{
+ m_forceParsing = true;
+ delayParsing();
+}
+
void QbsProject::parseCurrentBuildConfiguration()
{
m_parsingDelay.stop();
@@ -370,25 +378,46 @@ bool QbsProject::fromMap(const QVariantMap &map)
return true;
}
-void QbsProject::generateErrors(const qbs::Error &e)
+void QbsProject::generateErrors(const qbs::ErrorInfo &e)
{
- foreach (const qbs::ErrorData &data, e.entries())
+ foreach (const qbs::ErrorItem &item, e.items())
taskHub()->addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error,
- data.description(),
- Utils::FileName::fromString(data.codeLocation().fileName()),
- data.codeLocation().line(),
+ item.description(),
+ Utils::FileName::fromString(item.codeLocation().fileName()),
+ item.codeLocation().line(),
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
}
void QbsProject::parse(const QVariantMap &config, const Utils::Environment &env, const QString &dir)
{
QTC_ASSERT(!dir.isNull(), return);
- prepareForParsing();
-
- QTC_ASSERT(!m_qbsSetupProjectJob, return);
qbs::SetupProjectParameters params;
params.setBuildConfiguration(config);
+ qbs::ErrorInfo err = params.expandBuildConfiguration(m_manager->settings());
+ if (err.hasError()) {
+ generateErrors(err);
+ return;
+ }
+
+ // Avoid useless reparsing:
+ const qbs::Project *currentProject = qbsProject();
+ if (!m_forceParsing
+ && currentProject
+ && currentProject->projectConfiguration() == params.buildConfiguration()) {
+ QHash usedEnv = currentProject->usedEnvironment();
+ bool canSkip = true;
+ for (QHash::const_iterator i = usedEnv.constBegin();
+ i != usedEnv.constEnd(); ++i) {
+ if (env.value(i.key()) != i.value()) {
+ canSkip = false;
+ break;
+ }
+ }
+ if (canSkip)
+ return;
+ }
+
params.setBuildRoot(dir);
params.setProjectFilePath(m_fileName);
params.setIgnoreDifferentProjectFilePath(false);
@@ -398,8 +427,12 @@ void QbsProject::parse(const QVariantMap &config, const Utils::Environment &env,
params.setSearchPaths(prefs->searchPaths(buildDir));
params.setPluginPaths(prefs->pluginPaths(buildDir));
+ // Do the parsing:
+ prepareForParsing();
+ QTC_ASSERT(!m_qbsSetupProjectJob, return);
+
m_qbsSetupProjectJob
- = qbs::Project::setupProject(params, m_manager->settings(), m_manager->logSink(), 0);
+ = qbs::Project::setupProject(params, m_manager->logSink(), 0);
connect(m_qbsSetupProjectJob, SIGNAL(finished(bool,qbs::AbstractJob*)),
this, SLOT(handleQbsParsingDone(bool)));
@@ -413,6 +446,8 @@ void QbsProject::parse(const QVariantMap &config, const Utils::Environment &env,
void QbsProject::prepareForParsing()
{
+ m_forceParsing = false;
+
taskHub()->clearTasks(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE);
if (m_qbsUpdateFutureInterface)
m_qbsUpdateFutureInterface->reportCanceled();
@@ -430,17 +465,11 @@ void QbsProject::prepareForParsing()
m_qbsUpdateFutureInterface->reportStarted();
}
-void QbsProject::updateDocuments(const qbs::ProjectData *prj)
+void QbsProject::updateDocuments(const QSet &files)
{
// Update documents:
- QSet newFiles;
- newFiles.insert(m_fileName); // make sure we always have the project file...
-
- if (prj) {
- newFiles.insert(prj->location().fileName());
- foreach (const qbs::ProductData &prd, prj->products())
- newFiles.insert(prd.location().fileName());
- }
+ QSet newFiles = files;
+ QTC_ASSERT(!newFiles.isEmpty(), newFiles << m_fileName);
QSet oldFiles;
foreach (Core::IDocument *doc, m_qbsDocuments)
oldFiles.insert(doc->fileName());
@@ -465,9 +494,9 @@ void QbsProject::updateDocuments(const qbs::ProjectData *prj)
m_qbsDocuments.unite(toAdd);
}
-void QbsProject::updateCppCodeModel(const qbs::ProjectData *prj)
+void QbsProject::updateCppCodeModel(const qbs::ProjectData &prj)
{
- if (!prj)
+ if (!prj.isValid())
return;
ProjectExplorer::Kit *k = 0;
@@ -496,7 +525,7 @@ void QbsProject::updateCppCodeModel(const qbs::ProjectData *prj)
}
QStringList allFiles;
- foreach (const qbs::ProductData &prd, prj->products()) {
+ foreach (const qbs::ProductData &prd, prj.allProducts()) {
foreach (const qbs::GroupData &grp, prd.groups()) {
const qbs::PropertyMap &props = grp.properties();
@@ -568,10 +597,11 @@ void QbsProject::updateCppCodeModel(const qbs::ProjectData *prj)
// Register update the code model:
modelmanager->updateProjectInfo(pinfo);
- m_codeModelFuture = modelmanager->updateSourceFiles(allFiles);
+ m_codeModelFuture = modelmanager->updateSourceFiles(allFiles,
+ CppTools::CppModelManagerInterface::ForcedProgressNotification);
}
-void QbsProject::updateQmlJsCodeModel(const qbs::ProjectData *prj)
+void QbsProject::updateQmlJsCodeModel(const qbs::ProjectData &prj)
{
Q_UNUSED(prj);
QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance();
diff --git a/src/plugins/qbsprojectmanager/qbsproject.h b/src/plugins/qbsprojectmanager/qbsproject.h
index 49419e004c5..b8f44c2f1c2 100644
--- a/src/plugins/qbsprojectmanager/qbsproject.h
+++ b/src/plugins/qbsprojectmanager/qbsproject.h
@@ -92,7 +92,7 @@ public:
Utils::FileName defaultBuildDirectory() const;
const qbs::Project *qbsProject() const;
- const qbs::ProjectData *qbsProjectData() const;
+ const qbs::ProjectData qbsProjectData() const;
bool needsSpecialDeployment() const;
@@ -100,6 +100,7 @@ public slots:
void invalidate();
void parseCurrentBuildConfiguration();
void delayParsing();
+ void delayForcedParsing();
signals:
void projectParsingStarted();
@@ -119,11 +120,11 @@ private:
void parse(const QVariantMap &config, const Utils::Environment &env, const QString &dir);
- void generateErrors(const qbs::Error &e);
+ void generateErrors(const qbs::ErrorInfo &e);
void prepareForParsing();
- void updateDocuments(const qbs::ProjectData *prj);
- void updateCppCodeModel(const qbs::ProjectData *prj);
- void updateQmlJsCodeModel(const qbs::ProjectData *prj);
+ void updateDocuments(const QSet &files);
+ void updateCppCodeModel(const qbs::ProjectData &prj);
+ void updateQmlJsCodeModel(const qbs::ProjectData &prj);
QString qbsBuildDir() const;
QbsManager *const m_manager;
@@ -136,6 +137,7 @@ private:
QFutureInterface *m_qbsUpdateFutureInterface;
int m_currentProgressBase;
+ bool m_forceParsing;
QFuture m_codeModelFuture;
diff --git a/src/plugins/qbsprojectmanager/qbsprojectfile.cpp b/src/plugins/qbsprojectmanager/qbsprojectfile.cpp
index f6c3ddef99c..14ea3b3e961 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectfile.cpp
+++ b/src/plugins/qbsprojectmanager/qbsprojectfile.cpp
@@ -96,7 +96,7 @@ bool QbsProjectFile::reload(QString *errorString, ReloadFlag flag, ChangeType ty
Q_UNUSED(flag)
if (type == TypePermissions)
return true;
- m_project->delayParsing();
+ m_project->delayForcedParsing();
return true;
}
diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
index 38e8ea749eb..ae607ac5e0f 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
+++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
@@ -54,6 +54,8 @@ const char PROFILES_PREFIX[] = "profiles.";
// Qt related settings:
const char QTCORE_BINPATH[] = ".Qt.core.binPath";
+const char QTCORE_BUILDVARIANT[] = ".Qt.core.buildVariant";
+const char QTCORE_DOCPATH[] = ".Qt.core.docPath";
const char QTCORE_INCPATH[] = ".Qt.core.incPath";
const char QTCORE_LIBPATH[] = ".Qt.core.libPath";
const char QTCORE_VERSION[] = ".Qt.core.version";
@@ -67,6 +69,7 @@ const char QTCORE_FRAMEWORKBUILD[] = ".Qt.core.frameworkBuild";
const char QBS_TARGETOS[] = ".qbs.targetOS";
const char QBS_SYSROOT[] = ".qbs.sysroot";
const char QBS_ARCHITECTURE[] = ".qbs.architecture";
+const char QBS_ENDIANNESS[] = ".qbs.endianness";
const char QBS_TOOLCHAIN[] = ".qbs.toolchain";
const char CPP_TOOLCHAINPATH[] = ".cpp.toolchainInstallPath";
const char CPP_COMPILERNAME[] = ".cpp.compilerName";
@@ -210,6 +213,13 @@ void QbsManager::addProfileFromKit(const ProjectExplorer::Kit *k)
QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(k);
if (qt) {
data.insert(QLatin1String(QTCORE_BINPATH), qt->binPath().toUserOutput());
+ QStringList builds;
+ if (qt->hasDebugBuild())
+ builds << QLatin1String("debug");
+ if (qt->hasReleaseBuild())
+ builds << QLatin1String("release");
+ data.insert(QLatin1String(QTCORE_BUILDVARIANT), builds);
+ data.insert(QLatin1String(QTCORE_DOCPATH), qt->docsPath().toUserOutput());
data.insert(QLatin1String(QTCORE_INCPATH), qt->headerPath().toUserOutput());
data.insert(QLatin1String(QTCORE_LIBPATH), qt->libraryPath().toUserOutput());
Utils::FileName mkspecPath = qt->mkspecsPath();
@@ -234,6 +244,11 @@ void QbsManager::addProfileFromKit(const ProjectExplorer::Kit *k)
architecture.append(QLatin1String("_64"));
data.insert(QLatin1String(QBS_ARCHITECTURE), architecture);
+ if (targetAbi.endianness() == ProjectExplorer::Abi::BigEndian)
+ data.insert(QLatin1String(QBS_ENDIANNESS), QLatin1String("big"));
+ else
+ data.insert(QLatin1String(QBS_ENDIANNESS), QLatin1String("little"));
+
if (targetAbi.os() == ProjectExplorer::Abi::WindowsOS) {
data.insert(QLatin1String(QBS_TARGETOS), QLatin1String("windows"));
data.insert(QLatin1String(QBS_TOOLCHAIN),
@@ -244,7 +259,14 @@ void QbsManager::addProfileFromKit(const ProjectExplorer::Kit *k)
data.insert(QLatin1String(QBS_TOOLCHAIN), QLatin1String("gcc"));
} else if (targetAbi.os() == ProjectExplorer::Abi::LinuxOS) {
data.insert(QLatin1String(QBS_TARGETOS), QLatin1String("linux"));
- data.insert(QLatin1String(QBS_TOOLCHAIN), QLatin1String("gcc"));
+ if (tc->type() != QLatin1String("clang")) {
+ data.insert(QLatin1String(QBS_TOOLCHAIN), QLatin1String("gcc"));
+ } else {
+ data.insert(QLatin1String(QBS_TOOLCHAIN),
+ QStringList() << QLatin1String("clang")
+ << QLatin1String("llvm")
+ << QLatin1String("gcc"));
+ }
}
Utils::FileName cxx = tc->compilerCommand();
data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxx.toFileInfo().absolutePath());
diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs b/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs
index 0053d714627..df6f116c3ec 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs
+++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs
@@ -35,7 +35,7 @@ QtcPlugin {
cpp.rpaths: base.concat([qbs_build_dir + "/lib"])
cpp.dynamicLibraries: {
var libs = []
- if (qbs.targetOS === "windows") {
+ if (qbs.targetOS.contains("windows")) {
libs.push("shell32")
if (qbs.enableDebugCode)
libs.push("qbscored")
diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
index 461b013ffa6..12bb1f60245 100644
--- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
+++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
@@ -71,16 +71,13 @@ QString productFromId(Core::Id id)
return id.suffixAfter(QBS_RC_PREFIX);
}
-const qbs::ProductData *findProduct(const qbs::ProjectData *pro, const QString &name)
+const qbs::ProductData findProduct(const qbs::ProjectData &pro, const QString &name)
{
- if (!pro)
- return 0;
-
- foreach (const qbs::ProductData &product, pro->products()) {
+ foreach (const qbs::ProductData &product, pro.allProducts()) {
if (product.name() == name)
- return &product;
+ return product;
}
- return 0;
+ return qbs::ProductData();
}
} // namespace
@@ -197,12 +194,12 @@ void QbsRunConfiguration::installStepChanged()
QString QbsRunConfiguration::executable() const
{
QbsProject *pro = static_cast(target()->project());
- const qbs::ProductData *product = findProduct(pro->qbsProjectData(), m_qbsProduct);
+ const qbs::ProductData product = findProduct(pro->qbsProjectData(), m_qbsProduct);
- if (!product)
+ if (product.isValid() || !pro->qbsProject())
return QString();
- return pro->qbsProject()->targetExecutable(*product, installOptions());
+ return pro->qbsProject()->targetExecutable(product, installOptions());
}
ProjectExplorer::LocalApplicationRunConfiguration::RunMode QbsRunConfiguration::runMode() const
@@ -402,7 +399,7 @@ QbsRunConfigurationWidget::QbsRunConfigurationWidget(QbsRunConfiguration *rc, QW
this, SLOT(workDirectoryEdited()));
connect(resetButton, SIGNAL(clicked()),
- this, SLOT(workingDirectoryReseted()));
+ this, SLOT(workingDirectoryWasReset()));
connect(m_argumentsLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(argumentsEdited(QString)));
@@ -449,7 +446,7 @@ void QbsRunConfigurationWidget::workDirectoryEdited()
m_ignoreChange = false;
}
-void QbsRunConfigurationWidget::workingDirectoryReseted()
+void QbsRunConfigurationWidget::workingDirectoryWasReset()
{
// This emits a signal connected to workingDirectoryChanged()
// that sets the m_workingDirectoryEdit
@@ -521,7 +518,7 @@ bool QbsRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, cons
return false;
QbsProject *project = static_cast(parent->project());
- return findProduct(project->qbsProjectData(), productFromId(id));
+ return !findProduct(project->qbsProjectData(), productFromId(id)).isValid();
}
ProjectExplorer::RunConfiguration *QbsRunConfigurationFactory::doCreate(ProjectExplorer::Target *parent, const Core::Id id)
@@ -562,10 +559,10 @@ QList QbsRunConfigurationFactory::availableCreationIds(ProjectExplorer
return result;
QbsProject *project = static_cast(parent->project());
- if (!project || !project->qbsProjectData())
+ if (!project || !project->qbsProject())
return result;
- foreach (const qbs::ProductData &product, project->qbsProjectData()->products()) {
+ foreach (const qbs::ProductData &product, project->qbsProjectData().allProducts()) {
if (!project->qbsProject()->targetExecutable(product, qbs::InstallOptions()).isEmpty())
result << Core::Id::fromString(QString::fromLatin1(QBS_RC_PREFIX) + product.name());
}
diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.h b/src/plugins/qbsprojectmanager/qbsrunconfiguration.h
index cb697bef967..5f7afeec43a 100644
--- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.h
+++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.h
@@ -146,7 +146,7 @@ public:
private slots:
void runConfigurationEnabledChange();
void workDirectoryEdited();
- void workingDirectoryReseted();
+ void workingDirectoryWasReset();
void argumentsEdited(const QString &arguments);
void environmentWasChanged();
diff --git a/src/plugins/qbsprojectmanager/qbsstep.cpp b/src/plugins/qbsprojectmanager/qbsstep.cpp
index fb6e4b7b5d4..b4aee3534e9 100644
--- a/src/plugins/qbsprojectmanager/qbsstep.cpp
+++ b/src/plugins/qbsprojectmanager/qbsstep.cpp
@@ -176,9 +176,9 @@ void QbsStep::jobDone(bool success)
{
// Report errors:
if (m_job) {
- foreach (const qbs::ErrorData &data, m_job->error().entries())
- createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
- data.codeLocation().fileName(), data.codeLocation().line());
+ foreach (const qbs::ErrorItem &item, m_job->error().items())
+ createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
+ item.codeLocation().fileName(), item.codeLocation().line());
m_job->deleteLater();
m_job = 0;
}
diff --git a/src/plugins/qmldesigner/components/formeditor/movemanipulator.cpp b/src/plugins/qmldesigner/components/formeditor/movemanipulator.cpp
index b1e1800ddf9..1888d5ee1b9 100644
--- a/src/plugins/qmldesigner/components/formeditor/movemanipulator.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/movemanipulator.cpp
@@ -94,7 +94,6 @@ void MoveManipulator::synchronizeParent(const QList &itemList,
m_snapper.setContainerFormEditorItem(m_view->scene()->itemForQmlItemNode(parentItemNode));
m_snapper.setTransformtionSpaceFormEditorItem(m_snapper.containerFormEditorItem());
m_snapper.updateSnappingLines(m_itemList);
- updateHashes();
snapperUpdated = true;
}
}
@@ -111,19 +110,6 @@ void MoveManipulator::synchronizeInstanceParent(const QList &it
synchronizeParent(itemList, m_itemList.first()->qmlItemNode().instanceParent());
}
-void MoveManipulator::updateHashes()
-{
-// foreach (FormEditorItem* item, m_itemList)
-// m_beginItemRectHash[item] = item->mapRectToParent(item->qmlItemNode().instanceBoundingRect());
-
- QTransform fromSceneToContentItemTransform = m_snapper.containerFormEditorItem()->qmlItemNode().instanceSceneContentItemTransform().inverted();
- foreach (FormEditorItem* item, m_itemList) {
- QPointF positionInParentSpace = fromSceneToContentItemTransform.map(m_beginPositionInSceneSpaceHash.value(item));
- m_beginItemRectHash[item].translate(positionInParentSpace - m_beginPositionHash.value(item));
- m_beginPositionHash.insert(item, positionInParentSpace);
- }
-}
-
bool MoveManipulator::itemsCanReparented() const
{
foreach (FormEditorItem* item, m_itemList) {
@@ -142,27 +128,23 @@ void MoveManipulator::begin(const QPointF &beginPoint)
m_snapper.updateSnappingLines(m_itemList);
-
foreach (FormEditorItem* item, m_itemList) {
- if (item && item->qmlItemNode().isValid())
- m_beginItemRectHash.insert(item, m_snapper.containerFormEditorItem()->mapRectFromItem(item, item->qmlItemNode().instanceBoundingRect()));
+ if (item && item->qmlItemNode().isValid()) {
+ QTransform fromItemToSceneTransform = item->qmlItemNode().instanceSceneTransform();
+ m_beginItemRectInSceneSpaceHash.insert(item, fromItemToSceneTransform.mapRect(item->qmlItemNode().instanceBoundingRect()));
+ }
}
QTransform fromContentItemToSceneTransform = m_snapper.containerFormEditorItem()->qmlItemNode().instanceSceneContentItemTransform();
foreach (FormEditorItem* item, m_itemList) {
if (item && item->qmlItemNode().isValid()) {
- QPointF positionInParentSpace(item->qmlItemNode().instancePosition());
- QPointF positionInScenesSpace = fromContentItemToSceneTransform.map(positionInParentSpace);
+ QPointF positionInScenesSpace = fromContentItemToSceneTransform.map(item->qmlItemNode().instancePosition());
m_beginPositionInSceneSpaceHash.insert(item, positionInScenesSpace);
}
}
- QTransform fromSceneToContentItemTransform = m_snapper.containerFormEditorItem()->qmlItemNode().instanceSceneContentItemTransform().inverted();
foreach (FormEditorItem* item, m_itemList) {
if (item && item->qmlItemNode().isValid()) {
- QPointF positionInParentSpace = fromSceneToContentItemTransform.map(m_beginPositionInSceneSpaceHash.value(item));
- m_beginPositionHash.insert(item, positionInParentSpace);
-
QmlAnchors anchors(item->qmlItemNode().anchors());
m_beginTopMarginHash.insert(item, anchors.instanceMargin(AnchorLine::Top));
m_beginLeftMarginHash.insert(item, anchors.instanceMargin(AnchorLine::Left));
@@ -234,7 +216,9 @@ void MoveManipulator::generateSnappingLines(const QHash
-QHash MoveManipulator::tanslatedBoundingRects(const QHash &boundingRectHash, const QPointF& offsetVector)
+QHash MoveManipulator::tanslatedBoundingRects(const QHash &boundingRectHash,
+ const QPointF& offsetVector,
+ const QTransform &transform)
{
QHash translatedBoundingRectHash;
@@ -243,7 +227,7 @@ QHash MoveManipulator::tanslatedBoundingRects(const QHa
QPointF alignedOffset(offsetVector);
hashIterator.next();
FormEditorItem *formEditorItem = hashIterator.key();
- QRectF boundingRect = hashIterator.value();
+ QRectF boundingRect = transform.mapRect(hashIterator.value());
if (!formEditorItem || !formEditorItem->qmlItemNode().isValid())
continue;
@@ -274,18 +258,20 @@ void MoveManipulator::update(const QPointF& updatePoint, Snapper::Snapping useSn
return;
} else {
QTransform fromSceneToContentItemTransform = m_snapper.containerFormEditorItem()->qmlItemNode().instanceSceneContentItemTransform().inverted();
- QPointF updatePointInContainerSpace(fromSceneToContentItemTransform.map(updatePoint));
- QPointF beginPointInContainerSpace(fromSceneToContentItemTransform.map(m_beginPoint));
+ QTransform fromSceneToItemTransform = m_snapper.containerFormEditorItem()->qmlItemNode().instanceSceneTransform().inverted();
- QPointF offsetVector(updatePointInContainerSpace - beginPointInContainerSpace);
+ QPointF updatePointInContainerSpace = fromSceneToItemTransform.map(updatePoint);
+ QPointF beginPointInContainerSpace = fromSceneToItemTransform.map(m_beginPoint);
+
+ QPointF offsetVector = updatePointInContainerSpace - beginPointInContainerSpace;
if (useSnapping == Snapper::UseSnapping || useSnapping == Snapper::UseSnappingAndAnchoring) {
- offsetVector -= findSnappingOffset(tanslatedBoundingRects(m_beginItemRectHash, offsetVector));
- generateSnappingLines(tanslatedBoundingRects(m_beginItemRectHash, offsetVector));
+ offsetVector -= findSnappingOffset(tanslatedBoundingRects(m_beginItemRectInSceneSpaceHash, offsetVector, fromSceneToItemTransform));
+ generateSnappingLines(tanslatedBoundingRects(m_beginItemRectInSceneSpaceHash, offsetVector, fromSceneToItemTransform));
}
foreach (FormEditorItem* item, m_itemList) {
- QPointF positionInContainerSpace(m_beginPositionHash.value(item) + offsetVector);
+ QPointF positionInContainerSpace(fromSceneToContentItemTransform.map(m_beginPositionInSceneSpaceHash.value(item)) + offsetVector);
if (!item || !item->qmlItemNode().isValid())
continue;
@@ -324,8 +310,7 @@ void MoveManipulator::update(const QPointF& updatePoint, Snapper::Snapping useSn
void MoveManipulator::clear()
{
deleteSnapLines();
- m_beginItemRectHash.clear();
- m_beginPositionHash.clear();
+ m_beginItemRectInSceneSpaceHash.clear();
m_beginPositionInSceneSpaceHash.clear();
m_itemList.clear();
m_lastPosition = QPointF();
diff --git a/src/plugins/qmldesigner/components/formeditor/movemanipulator.h b/src/plugins/qmldesigner/components/formeditor/movemanipulator.h
index d7ead11c16a..380f1207f35 100644
--- a/src/plugins/qmldesigner/components/formeditor/movemanipulator.h
+++ b/src/plugins/qmldesigner/components/formeditor/movemanipulator.h
@@ -85,12 +85,13 @@ protected:
void deleteSnapLines();
- QHash tanslatedBoundingRects(const QHash &boundingRectHash, const QPointF& offset);
+ QHash tanslatedBoundingRects(const QHash &boundingRectHash,
+ const QPointF& offset,
+ const QTransform &transform);
QPointF calculateBoundingRectMovementOffset(const QPointF& updatePoint);
QRectF boundingRect(FormEditorItem* item, const QPointF& updatePoint);
void generateSnappingLines(const QHash &boundingRectHash);
- void updateHashes();
bool itemsCanReparented() const;
@@ -103,8 +104,7 @@ private:
QWeakPointer m_layerItem;
QWeakPointer m_view;
QList m_itemList;
- QHash m_beginItemRectHash;
- QHash m_beginPositionHash;
+ QHash m_beginItemRectInSceneSpaceHash;
QHash m_beginPositionInSceneSpaceHash;
QPointF m_beginPoint;
QHash m_beginTopMarginHash;
diff --git a/src/plugins/qmldesigner/components/integration/designdocument.cpp b/src/plugins/qmldesigner/components/integration/designdocument.cpp
index 9a93b93a01c..8b480d57475 100644
--- a/src/plugins/qmldesigner/components/integration/designdocument.cpp
+++ b/src/plugins/qmldesigner/components/integration/designdocument.cpp
@@ -153,8 +153,6 @@ bool DesignDocument::loadInFileComponent(const ModelNode &componentNode)
if (!componentNode.isRootNode()) {
//change to subcomponent model
- if (m_inFileComponentTextModifier)
- delete m_inFileComponentTextModifier.data();
m_inFileComponentTextModifier.reset(createComponentTextModifier(m_documentTextModifier.data(), rewriterView(), componentText, componentNode));
diff --git a/src/plugins/qmldesigner/componentsplugin/components.metainfo b/src/plugins/qmldesigner/componentsplugin/components.metainfo
index 2e775a4acb1..b73172380ab 100644
--- a/src/plugins/qmldesigner/componentsplugin/components.metainfo
+++ b/src/plugins/qmldesigner/componentsplugin/components.metainfo
@@ -155,12 +155,12 @@ MetaInfo {
Type {
name: "QtQuick.Controls.Slider"
- icon: ":/componentsplugin/images/sliderh16.png"
+ icon: ":/componentsplugin/images/slider16.png"
ItemLibraryEntry {
name: "Slider (Horizontal)"
category: "Qt Quick - Controls"
- libraryIcon: ":/componentsplugin/images/sliderh.png"
+ libraryIcon: ":/componentsplugin/images/slider.png"
version: "1.0"
requiredImport: "QtQuick.Controls"
}
diff --git a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
index 9951ecd91e7..867f4b25751 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
@@ -41,8 +41,10 @@
/*!
\class QmlDesigner::Exception
\ingroup CoreExceptions
-\brief This is the abstract base class for all excetions.
- Exceptions should be used in cases there is no other way to say something goes wrong. For example
+\brief The Exception class is the abstract base class for all exceptions.
+
+ Exceptions should be used if there is no other way to indicate that
+ something is going wrong. For example,
the result would be a inconsistent model or a crash.
*/
diff --git a/src/plugins/qmldesigner/designercore/exceptions/invalidargumentexception.cpp b/src/plugins/qmldesigner/designercore/exceptions/invalidargumentexception.cpp
index 742f4859506..b8c79262ca3 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/invalidargumentexception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/invalidargumentexception.cpp
@@ -33,7 +33,8 @@
/*!
\class QmlDesigner::InvalidArgumentException
\ingroup CoreExceptions
-\brief Exception for a invalid argument
+\brief The InvalidArgumentException class provides an exception for an invalid
+argument.
*/
namespace QmlDesigner {
diff --git a/src/plugins/qmldesigner/designercore/exceptions/invalidmetainfoexception.cpp b/src/plugins/qmldesigner/designercore/exceptions/invalidmetainfoexception.cpp
index f8e83fae821..c5a9f1d517c 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/invalidmetainfoexception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/invalidmetainfoexception.cpp
@@ -32,7 +32,8 @@
/*!
\class QmlDesigner::InvalidMetaInfoException
\ingroup CoreExceptions
-\brief Exception for a invalid meta info
+\brief The InvalidMetaInfoException class provides an exception for invalid meta
+info.
\see NodeMetaInfo PropertyMetaInfo MetaInfo
*/
diff --git a/src/plugins/qmldesigner/designercore/exceptions/invalidmodelnodeexception.cpp b/src/plugins/qmldesigner/designercore/exceptions/invalidmodelnodeexception.cpp
index 5ab1ca09a93..10d1d2426b9 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/invalidmodelnodeexception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/invalidmodelnodeexception.cpp
@@ -32,7 +32,8 @@
/*!
\class QmlDesigner::InvalidModelNodeException
\ingroup CoreExceptions
-\brief Exception for a invalid model node
+\brief The InvalidModelNodeException class provides an exception for an invalid
+model node.
\see ModelNode
*/
diff --git a/src/plugins/qmldesigner/designercore/exceptions/invalidmodelstateexception.cpp b/src/plugins/qmldesigner/designercore/exceptions/invalidmodelstateexception.cpp
index 4c5956017f8..7c02df82d35 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/invalidmodelstateexception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/invalidmodelstateexception.cpp
@@ -32,7 +32,8 @@
/*!
\class QmlDesigner::InvalidModelStateException
\ingroup CoreExceptions
-\brief Exception for a invalid model state
+\brief The InvalidModelStateException class provides an exception for an
+invalid model state.
\see ModelState
diff --git a/src/plugins/qmldesigner/designercore/exceptions/invalidpropertyexception.cpp b/src/plugins/qmldesigner/designercore/exceptions/invalidpropertyexception.cpp
index db7bf6f8480..0f6a850dac8 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/invalidpropertyexception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/invalidpropertyexception.cpp
@@ -31,7 +31,8 @@
/*!
\class QmlDesigner::InvalidPropertyException
\ingroup CoreExceptions
-\brief Exception for a invalid property
+\brief The InvalidPropertyException class provides an exception for an invalid
+property.
\see AbstractProperty
*/
diff --git a/src/plugins/qmldesigner/designercore/exceptions/invalidqmlsourceexception.cpp b/src/plugins/qmldesigner/designercore/exceptions/invalidqmlsourceexception.cpp
index 6fddef98d8d..f309573cc80 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/invalidqmlsourceexception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/invalidqmlsourceexception.cpp
@@ -32,7 +32,8 @@
/*!
\class QmlDesigner::InvalidQmlSourceException
\ingroup CoreExceptions
-\brief Exception for invalid qml source code
+\brief The InvalidQmlSourceException class provides an exception for invalid QML
+source code.
*/
namespace QmlDesigner {
diff --git a/src/plugins/qmldesigner/designercore/exceptions/invalidreparentingexception.cpp b/src/plugins/qmldesigner/designercore/exceptions/invalidreparentingexception.cpp
index 2dc3613779f..8184ff308ff 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/invalidreparentingexception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/invalidreparentingexception.cpp
@@ -31,7 +31,8 @@
/*!
\class QmlDesigner::InvalidReparentingException
\ingroup CoreExceptions
-\brief Exception for a invalid reparinting
+ \brief The InvalidReparentingException class provides an exception for
+ invalid reparenting.
\see ModelNode
*/
diff --git a/src/plugins/qmldesigner/designercore/exceptions/invalidslideindexexception.cpp b/src/plugins/qmldesigner/designercore/exceptions/invalidslideindexexception.cpp
index 2de13bd1d99..5989866acac 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/invalidslideindexexception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/invalidslideindexexception.cpp
@@ -32,7 +32,8 @@
/*!
\class QmlDesigner::InvalidSlideIndexException
\ingroup CoreExceptions
-\brief Exception for a invalid index for s slide
+\brief The InvalidSlideIndexException class provides an exception for an invalid
+index for a slide.
\see ModelNode
*/
diff --git a/src/plugins/qmldesigner/designercore/exceptions/modificationgroupexception.cpp b/src/plugins/qmldesigner/designercore/exceptions/modificationgroupexception.cpp
index 2a3972f8675..baa75e07dd6 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/modificationgroupexception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/modificationgroupexception.cpp
@@ -32,7 +32,8 @@
/*!
\class QmlDesigner::ModificationGroupException
\ingroup CoreExceptions
-\brief Exception for a modification group
+\brief The ModificationGroupException class provides an exception for a
+modification group.
*/
namespace QmlDesigner {
diff --git a/src/plugins/qmldesigner/designercore/exceptions/removebasestateexception.cpp b/src/plugins/qmldesigner/designercore/exceptions/removebasestateexception.cpp
index d637fdc8903..d761903aaae 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/removebasestateexception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/removebasestateexception.cpp
@@ -32,7 +32,8 @@
/*!
\class QmlDesigner::RemoveBaseStateException
\ingroup CoreExceptions
-\brief Exception if you try to remove a BaseState
+ \brief The RemoveBaseStateException class provides an exception if you try
+ to remove a BaseState.
/see NodeState ModelState
*/
diff --git a/src/plugins/qmldesigner/designercore/include/nodeproperty.h b/src/plugins/qmldesigner/designercore/include/nodeproperty.h
index 191594b5af1..7b12b8abc7d 100644
--- a/src/plugins/qmldesigner/designercore/include/nodeproperty.h
+++ b/src/plugins/qmldesigner/designercore/include/nodeproperty.h
@@ -48,7 +48,6 @@ class QMLDESIGNERCORE_EXPORT NodeProperty : public NodeAbstractProperty
public:
void setModelNode(const ModelNode &modelNode);
ModelNode modelNode() const;
- QmlObjectNode fxObjectNode() const;
void reparentHere(const ModelNode &modelNode);
diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
index 6a920ffffe5..cfed9dd14ca 100644
--- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
+++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
@@ -79,7 +79,8 @@ enum {
/*!
\class QmlDesigner::NodeInstanceView
\ingroup CoreInstance
-\brief Central class to create and manage instances of a ModelNode.
+ \brief The NodeInstanceView class is the central class to create and manage
+ instances of the ModelNode class.
This view is used to instance the ModelNodes. Many AbstractViews hold a
NodeInstanceView to get values from tghe NodeInstances back.
diff --git a/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp
index aeb51fc4deb..e6d24377585 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp
@@ -136,7 +136,8 @@ QStringList MetaInfo::s_pluginDirs;
/*!
\class QmlDesigner::MetaInfo
\ingroup CoreModel
-\brief The MetaInfo class provides meta information about qml types and properties.
+\brief The MetaInfo class provides meta information about QML types and
+properties.
*/
/*!
diff --git a/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp b/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp
index 9e264747fb2..67cc807d8dc 100644
--- a/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp
+++ b/src/plugins/qmldesigner/designercore/model/abstractproperty.cpp
@@ -47,7 +47,7 @@ namespace QmlDesigner {
/*!
\class QmlDesigner::AbstractProperty
\ingroup CoreModel
-\brief AbstractProperty is a value holder for a property
+\brief The AbstractProperty class is a value holder for a property.
*/
AbstractProperty::AbstractProperty():
diff --git a/src/plugins/qmldesigner/designercore/model/abstractview.cpp b/src/plugins/qmldesigner/designercore/model/abstractview.cpp
index b06c07dfca9..68bf75f7f07 100644
--- a/src/plugins/qmldesigner/designercore/model/abstractview.cpp
+++ b/src/plugins/qmldesigner/designercore/model/abstractview.cpp
@@ -40,7 +40,8 @@ namespace QmlDesigner {
/*!
\class QmlDesigner::AbstractView
\ingroup CoreModel
-\brief An abstract interface views and editors can implement to be notified about model changes.
+\brief The AbstractView class provides an abstract interface that views and
+editors can implement to be notified about model changes.
\see QmlDesigner::WidgetQueryView, QmlDesigner::NodeInstanceView
*/
diff --git a/src/plugins/qmldesigner/designercore/model/modelnode.cpp b/src/plugins/qmldesigner/designercore/model/modelnode.cpp
index 33345279032..54191a62a1b 100644
--- a/src/plugins/qmldesigner/designercore/model/modelnode.cpp
+++ b/src/plugins/qmldesigner/designercore/model/modelnode.cpp
@@ -232,6 +232,36 @@ int ModelNode::majorVersion() const
return m_internalNode->majorVersion();
}
+int getMajorVersionFromImport(Model *model)
+{
+ foreach (const Import &import, model->imports()) {
+ if (import.isLibraryImport() && import.url() == QLatin1String("QtQuick")) {
+ const QString versionString = import.version();
+ if (versionString.contains(QLatin1String("."))) {
+ const QString majorVersionString = versionString.split(QLatin1String(".")).first();
+ return majorVersionString.toInt();
+ }
+ }
+ }
+
+ return -1;
+}
+
+int getMajorVersionFromNode(const ModelNode &modelNode)
+{
+ if (modelNode.metaInfo().isValid()) {
+ if (modelNode.type() == "QtQuick.QtObject" || modelNode.type() == "QtQuick.Item")
+ return modelNode.majorVersion();
+
+ foreach (const NodeMetaInfo &superClass, modelNode.metaInfo().superClasses()) {
+ if (modelNode.type() == "QtQuick.QtObject" || modelNode.type() == "QtQuick.Item")
+ return superClass.majorVersion();
+ }
+ }
+
+ return 1; //default
+}
+
/*! \brief major number of the QtQuick version used
\return major number of QtQuickVersion
*/
@@ -242,19 +272,11 @@ int ModelNode::majorQtQuickVersion() const
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
}
- if (metaInfo().isValid()) {
- if (type() == "QtQuick.QtObject")
- return majorVersion();
- NodeMetaInfo superClass = metaInfo().directSuperClass();
+ int majorVersionFromImport = getMajorVersionFromImport(model());
+ if (majorVersionFromImport >= 0)
+ return majorVersionFromImport;
- while (superClass.isValid()) {
- if (superClass.typeName() == "QtQuick.QtObject")
- return superClass.majorVersion();
- superClass = superClass.directSuperClass();
- }
- return 1; //default
- }
- return 1; //default
+ return getMajorVersionFromNode(*this);
}
diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
index 9956ecab1a8..01947ccc720 100644
--- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
+++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
@@ -785,7 +785,7 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
check.enableMessage(StaticAnalysis::WarnImperativeCodeNotEditableInVisualDesigner);
check.enableMessage(StaticAnalysis::WarnUnsupportedTypeInVisualDesigner);
check.enableMessage(StaticAnalysis::WarnReferenceToParentItemNotSupportedByVisualDesigner);
- check.enableMessage(StaticAnalysis::WarnUndefinedValueForVisualDesigner);
+ //## triggers too often ## check.enableMessage(StaticAnalysis::WarnUndefinedValueForVisualDesigner);
check.enableMessage(StaticAnalysis::WarnStatesOnlyInRootItemForVisualDesigner);
foreach (const StaticAnalysis::Message &message, check()) {
diff --git a/src/plugins/qmljstools/qmljsbundleprovider.cpp b/src/plugins/qmljstools/qmljsbundleprovider.cpp
index 77c0ee03b4b..390618c2bbb 100644
--- a/src/plugins/qmljstools/qmljsbundleprovider.cpp
+++ b/src/plugins/qmljstools/qmljsbundleprovider.cpp
@@ -47,7 +47,8 @@ typedef QmlJS::QmlLanguageBundles QmlLanguageBundles;
/*!
\class QmlJSEditor::BasicBundleProvider
- \brief a class that sets up the default bundles for qt and various qml states.
+ \brief The BasicBundleProvider class sets up the default bundles for Qt and
+ various QML states.
*/
BasicBundleProvider::BasicBundleProvider(QObject *parent) :
IBundleProvider(parent)
diff --git a/src/plugins/qmlprojectmanager/qmlapp.cpp b/src/plugins/qmlprojectmanager/qmlapp.cpp
index 143aaa12cd8..edffa2c3ed7 100644
--- a/src/plugins/qmlprojectmanager/qmlapp.cpp
+++ b/src/plugins/qmlprojectmanager/qmlapp.cpp
@@ -146,7 +146,7 @@ static inline bool assignLanguageElementText(QXmlStreamReader &reader,
const QStringRef elementLanguage = reader.attributes().value(QLatin1String("xml:lang"));
if (elementLanguage.isEmpty()) {
// Try to find a translation for our Wizards
- *target = QCoreApplication::translate("QmlProjectManager::Internal::QmlApplicationWizard",
+ *target = QCoreApplication::translate("QmlProjectManager::QmlApplicationWizard",
reader.readElementText().toLatin1().constData());
return true;
}
diff --git a/src/plugins/qmlprojectmanager/qmlapplicationwizard.cpp b/src/plugins/qmlprojectmanager/qmlapplicationwizard.cpp
index be9ad6bb6fe..ae4dbcf4c64 100644
--- a/src/plugins/qmlprojectmanager/qmlapplicationwizard.cpp
+++ b/src/plugins/qmlprojectmanager/qmlapplicationwizard.cpp
@@ -79,7 +79,9 @@ void QmlApplicationWizard::createInstances(ExtensionSystem::IPlugin *plugin)
BaseFileWizardParameters parameters;
parameters.setDisplayName(templateInfo.displayName);
parameters.setDescription(templateInfo.description);
- parameters.setDescriptionImage(templateInfo.templatePath + QLatin1String("/template.png"));
+ const QString imagePath = templateInfo.templatePath + QLatin1String("/template.png");
+ if (QFileInfo(imagePath).exists())
+ parameters.setDescriptionImage(imagePath);
parameters.setCategory(
QLatin1String(ProjectExplorer::Constants::QT_APPLICATION_WIZARD_CATEGORY));
parameters.setDisplayCategory(
diff --git a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
index f54e185c629..a6e555d882d 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
@@ -153,9 +153,6 @@ bool QmlProjectRunControlFactory::canRun(RunConfiguration *runConfiguration,
if (mode != DebugRunMode)
return false;
- if (!Debugger::DebuggerPlugin::isActiveDebugLanguage(Debugger::QmlLanguage))
- return false;
-
if (!config->observerPath().isEmpty())
return true;
if (!config->qtVersion())
diff --git a/src/plugins/qnx/blackberryconfiguration.cpp b/src/plugins/qnx/blackberryconfiguration.cpp
index eceaee1916d..ad30e0f88da 100644
--- a/src/plugins/qnx/blackberryconfiguration.cpp
+++ b/src/plugins/qnx/blackberryconfiguration.cpp
@@ -56,7 +56,6 @@
#include
#include
#include
-#include
namespace Qnx {
namespace Internal {
@@ -449,46 +448,24 @@ Utils::FileName BlackBerryConfiguration::sysRoot() const
return m_config.sysRoot;
}
-QString BlackBerryConfiguration::dataDirPath() const
-{
- const QString homeDir = QDir::homePath();
-
- if (Utils::HostOsInfo::isMacHost())
- return homeDir + QLatin1String("/Library/Research in Motion");
-
- if (Utils::HostOsInfo::isAnyUnixHost())
- return homeDir + QLatin1String("/.rim");
-
- if (Utils::HostOsInfo::isWindowsHost()) {
- // Get the proper storage location on Windows using QDesktopServices,
- // to not hardcode "AppData/Local", as it might refer to "AppData/Roaming".
- QString dataDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
- dataDir = dataDir.left(dataDir.indexOf(QCoreApplication::organizationName()));
- dataDir.append(QLatin1String("Research in Motion"));
- return dataDir;
- }
-
- return QString();
-}
-
QString BlackBerryConfiguration::barsignerCskPath() const
{
- return dataDirPath() + QLatin1String("/barsigner.csk");
+ return QnxUtils::dataDirPath() + QLatin1String("/barsigner.csk");
}
QString BlackBerryConfiguration::barsignerDbPath() const
{
- return dataDirPath() + QLatin1String("/barsigner.db");
+ return QnxUtils::dataDirPath() + QLatin1String("/barsigner.db");
}
QString BlackBerryConfiguration::defaultKeystorePath() const
{
- return dataDirPath() + QLatin1String("/author.p12");
+ return QnxUtils::dataDirPath() + QLatin1String("/author.p12");
}
QString BlackBerryConfiguration::defaultDebugTokenPath() const
{
- return dataDirPath() + QLatin1String("/debugtoken.bar");
+ return QnxUtils::dataDirPath() + QLatin1String("/debugtoken.bar");
}
// TODO: QnxUtils::parseEnvFile() and qnxEnv() to return Util::Enviroment instead(?)
diff --git a/src/plugins/qnx/blackberryconfiguration.h b/src/plugins/qnx/blackberryconfiguration.h
index aac961150a3..d538f610ef6 100644
--- a/src/plugins/qnx/blackberryconfiguration.h
+++ b/src/plugins/qnx/blackberryconfiguration.h
@@ -83,7 +83,6 @@ public:
QString targetName() const;
QString barsignerCskPath() const;
QString barsignerDbPath() const;
- QString dataDirPath() const;
QString defaultKeystorePath() const;
QString defaultDebugTokenPath() const;
void loadSettings();
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp b/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp
index 9ef090bd723..252cbb320ca 100644
--- a/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp
+++ b/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp
@@ -36,6 +36,7 @@
#include "blackberryconfiguration.h"
#include "blackberrydeviceconnectionmanager.h"
#include "qnxconstants.h"
+#include "qnxutils.h"
#include
#include
@@ -81,7 +82,7 @@ BlackBerryDeviceConfigurationWidget::BlackBerryDeviceConfigurationWidget(const I
ui->debugToken->addButton(tr("Upload"), this, SLOT(uploadDebugToken()));
uploadButton = ui->debugToken->buttonAtIndex(2);
- QString debugTokenBrowsePath = BlackBerryConfiguration::instance().dataDirPath();
+ QString debugTokenBrowsePath = QnxUtils::dataDirPath();
if (!QFileInfo(debugTokenBrowsePath).exists())
debugTokenBrowsePath = QDir::homePath();
ui->debugToken->setInitialBrowsePathBackup(debugTokenBrowsePath);
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp b/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp
index f923cc5cd07..aad9c0f6e82 100644
--- a/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp
+++ b/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp
@@ -36,6 +36,7 @@
#include "ui_blackberrydeviceconfigurationwizardsetuppage.h"
#include "ui_blackberrydeviceconfigurationwizardsshkeypage.h"
#include "blackberryconfiguration.h"
+#include "qnxutils.h"
#include
#include
@@ -70,7 +71,7 @@ BlackBerryDeviceConfigurationWizardSetupPage::BlackBerryDeviceConfigurationWizar
m_ui->debugToken->setExpectedKind(Utils::PathChooser::File);
m_ui->debugToken->setPromptDialogFilter(QLatin1String("*.bar"));
- QString debugTokenBrowsePath = BlackBerryConfiguration::instance().dataDirPath();
+ QString debugTokenBrowsePath = QnxUtils::dataDirPath();
if (!QFileInfo(debugTokenBrowsePath).exists())
debugTokenBrowsePath = QDir::homePath();
m_ui->debugToken->setInitialBrowsePathBackup(debugTokenBrowsePath);
@@ -168,7 +169,7 @@ BlackBerryDeviceConfigurationWizardSshKeyPage::BlackBerryDeviceConfigurationWiza
m_ui->privateKey->setExpectedKind(Utils::PathChooser::File);
m_ui->progressBar->hide();
- QString initialBrowsePath = BlackBerryConfiguration::instance().dataDirPath();
+ QString initialBrowsePath = QnxUtils::dataDirPath();
if (!QFileInfo(initialBrowsePath).exists())
initialBrowsePath = QDir::homePath();
m_ui->privateKey->setInitialBrowsePathBackup(initialBrowsePath);
@@ -267,7 +268,7 @@ bool BlackBerryDeviceConfigurationWizardSshKeyPage::saveKeys(const QString &priv
void BlackBerryDeviceConfigurationWizardSshKeyPage::generateSshKeys()
{
- QString lookInDir = BlackBerryConfiguration::instance().dataDirPath();
+ QString lookInDir = QnxUtils::dataDirPath();
if (!QFileInfo(lookInDir).exists())
lookInDir = QDir::homePath();
diff --git a/src/plugins/qnx/blackberryrunconfiguration.cpp b/src/plugins/qnx/blackberryrunconfiguration.cpp
index 8c27a939b16..f8b5e7fb68c 100644
--- a/src/plugins/qnx/blackberryrunconfiguration.cpp
+++ b/src/plugins/qnx/blackberryrunconfiguration.cpp
@@ -70,7 +70,7 @@ void BlackBerryRunConfiguration::init()
void BlackBerryRunConfiguration::updateDisplayName()
{
if (!m_proFilePath.isEmpty())
- setDefaultDisplayName(tr("%1 on BlackBerry device").arg(QFileInfo(m_proFilePath).completeBaseName()));
+ setDefaultDisplayName(QFileInfo(m_proFilePath).completeBaseName());
else
setDefaultDisplayName(tr("Run on BlackBerry device"));
}
diff --git a/src/plugins/qnx/blackberryrunconfigurationfactory.cpp b/src/plugins/qnx/blackberryrunconfigurationfactory.cpp
index dd1602a1fbd..8ac206597d7 100644
--- a/src/plugins/qnx/blackberryrunconfigurationfactory.cpp
+++ b/src/plugins/qnx/blackberryrunconfigurationfactory.cpp
@@ -75,7 +75,7 @@ QString BlackBerryRunConfigurationFactory::displayNameForId(const Core::Id id) c
return QString();
if (id.name().startsWith(Constants::QNX_BB_RUNCONFIGURATION_PREFIX))
- return tr("%1 on BlackBerry Device").arg(QFileInfo(path).completeBaseName());
+ return QFileInfo(path).completeBaseName();
return QString();
}
diff --git a/src/plugins/qnx/qnxutils.cpp b/src/plugins/qnx/qnxutils.cpp
index 791a558444f..64eff9cea15 100644
--- a/src/plugins/qnx/qnxutils.cpp
+++ b/src/plugins/qnx/qnxutils.cpp
@@ -35,6 +35,8 @@
#include
#include
+#include
+#include
using namespace Qnx;
using namespace Qnx::Internal;
@@ -98,6 +100,12 @@ QMultiMap QnxUtils::parseEnvironmentFile(const QString &fileNa
QString value = line.mid(equalIndex + 1);
+ // BASE_DIR variable is evaluated when souring the bbnk-env script
+ // BASE_DIR="$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
+ // We already know the NDK path so we can set the variable value
+ if (var == QLatin1String("BASE_DIR"))
+ value = QFileInfo(fileName).dir().absolutePath();
+
if (Utils::HostOsInfo::isWindowsHost()) {
QRegExp systemVarRegExp(QLatin1String("IF NOT DEFINED ([\\w\\d]+)\\s+set ([\\w\\d]+)=([\\w\\d]+)"));
if (line.contains(systemVarRegExp)) {
@@ -186,6 +194,14 @@ QString QnxUtils::envFilePath(const QString &ndkPath)
else if (Utils::HostOsInfo::isAnyUnixHost())
envFile = ndkPath + QLatin1String("/bbndk-env.sh");
+ if (!QFileInfo(envFile).exists()) {
+ QString version = ndkVersion(ndkPath);
+ version = version.replace(QLatin1Char('.'), QLatin1Char('_'));
+ if (Utils::HostOsInfo::isWindowsHost())
+ envFile = ndkPath + QLatin1String("/bbndk-env_") + version + QLatin1String(".bat");
+ else if (Utils::HostOsInfo::isAnyUnixHost())
+ envFile = ndkPath + QLatin1String("/bbndk-env_") + version + QLatin1String(".sh");
+ }
return envFile;
}
@@ -213,3 +229,68 @@ Utils::FileName QnxUtils::executableWithExtension(const Utils::FileName &fileNam
result.append(QLatin1String(".exe"));
return result;
}
+
+QString QnxUtils::dataDirPath()
+{
+ const QString homeDir = QDir::homePath();
+
+ if (Utils::HostOsInfo::isMacHost())
+ return homeDir + QLatin1String("/Library/Research in Motion");
+
+ if (Utils::HostOsInfo::isAnyUnixHost())
+ return homeDir + QLatin1String("/.rim");
+
+ if (Utils::HostOsInfo::isWindowsHost()) {
+ // Get the proper storage location on Windows using QDesktopServices,
+ // to not hardcode "AppData/Local", as it might refer to "AppData/Roaming".
+ QString dataDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
+ dataDir = dataDir.left(dataDir.indexOf(QCoreApplication::organizationName()));
+ dataDir.append(QLatin1String("Research in Motion"));
+ return dataDir;
+ }
+
+ return QString();
+}
+
+QString QnxUtils::qConfigPath()
+{
+ if (Utils::HostOsInfo::isMacHost() || Utils::HostOsInfo::isWindowsHost()) {
+ return dataDirPath() + QLatin1String("/BlackBerry Native SDK/qconfig");
+ } else {
+ return dataDirPath() + QLatin1String("/bbndk/qconfig");
+ }
+}
+
+QString QnxUtils::ndkVersion(const QString &ndkPath)
+{
+ QString ndkConfigPath = qConfigPath();
+ if (!QDir(ndkConfigPath).exists())
+ return QString();
+
+ QFileInfoList ndkfileList = QDir(ndkConfigPath).entryInfoList(QStringList() << QLatin1String("*.xml"),
+ QDir::Files, QDir::Time);
+ foreach (const QFileInfo &ndkFile, ndkfileList) {
+ QFile xmlFile(ndkFile.absoluteFilePath());
+ if (!xmlFile.open(QIODevice::ReadOnly))
+ continue;
+
+ QDomDocument doc;
+ if (!doc.setContent(&xmlFile)) // Skip error message
+ continue;
+
+ QDomElement docElt = doc.documentElement();
+ if (docElt.tagName() != QLatin1String("qnxSystemDefinition"))
+ continue;
+
+ QDomElement childElt = docElt.firstChildElement(QLatin1String("installation"));
+ // The file contains only one installation node
+ if (!childElt.isNull()) {
+ // The file contains only one base node
+ QDomElement elt = childElt.firstChildElement(QLatin1String("base"));
+ if (!elt.text().compare(ndkPath, Utils::HostOsInfo::fileNameCaseSensitivity()))
+ return childElt.firstChildElement(QLatin1String("version")).text();
+ }
+ }
+
+ return QString();
+}
diff --git a/src/plugins/qnx/qnxutils.h b/src/plugins/qnx/qnxutils.h
index 5b8b179b6aa..f12518fd312 100644
--- a/src/plugins/qnx/qnxutils.h
+++ b/src/plugins/qnx/qnxutils.h
@@ -57,6 +57,9 @@ public:
static QString envFilePath(const QString & ndkPath);
static void prependQnxMapToEnvironment(const QMultiMap &qnxMap, Utils::Environment &env);
static Utils::FileName executableWithExtension(const Utils::FileName &fileName);
+ static QString dataDirPath();
+ static QString qConfigPath();
+ static QString ndkVersion(const QString& ndkPath);
};
} // namespace Internal
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
index 9d329ebbf04..1db0e0d0298 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
@@ -649,16 +649,12 @@ bool Qt4RunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, cons
ProjectExplorer::RunConfiguration *Qt4RunConfigurationFactory::doCreate(ProjectExplorer::Target *parent, const Core::Id id)
{
Qt4RunConfiguration *rc = new Qt4RunConfiguration(parent, id);
- QList profiles = static_cast(parent->project())->applicationProFiles();
- foreach (Qt4ProFileNode *node, profiles) {
- if (node->path() != rc->proFilePath())
- continue;
+ const Qt4ProFileNode *node = static_cast(parent->project())->rootQt4ProjectNode()->findProFileFor(rc->proFilePath());
+ if (node) // should always be found
rc->setRunMode(node->variableValue(ConfigVar).contains(QLatin1String("console"))
&& !node->variableValue(QtVar).contains(QLatin1String("testlib"))
? ProjectExplorer::LocalApplicationRunConfiguration::Console
: ProjectExplorer::LocalApplicationRunConfiguration::Gui);
- break;
- }
return rc;
}
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp
index 26568c4dd61..437319ef3d1 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.cpp
+++ b/src/plugins/qt4projectmanager/qt4nodes.cpp
@@ -720,69 +720,8 @@ void Qt4PriFileNode::watchFolders(const QSet &folders)
void Qt4PriFileNode::folderChanged(const QString &changedFolder)
{
- //qDebug()<<"########## Qt4PriFileNode::folderChanged";
- // So, we need to figure out which files changed.
-
- // Collect all the files
- QSet newFiles;
- newFiles += recursiveEnumerate(changedFolder);
-
- foreach (const Utils::FileName &file, m_recursiveEnumerateFiles) {
- if (!file.isChildOf(Utils::FileName::fromString(changedFolder)))
- newFiles.insert(file);
- }
-
- QSet addedFiles = newFiles;
- addedFiles.subtract(m_recursiveEnumerateFiles);
-
- QSet removedFiles = m_recursiveEnumerateFiles;
- removedFiles.subtract(newFiles);
-
- if (addedFiles.isEmpty() && removedFiles.isEmpty())
- return;
-
- m_recursiveEnumerateFiles = newFiles;
-
- // Apply the differences
- // per file type
- const QVector &fileTypes = qt4NodeStaticData()->fileTypeData;
- for (int i = 0; i < fileTypes.size(); ++i) {
- FileType type = fileTypes.at(i).type;
- QSet add = filterFilesRecursiveEnumerata(type, addedFiles);
- QSet remove = filterFilesRecursiveEnumerata(type, removedFiles);
-
- if (!add.isEmpty() || !remove.isEmpty()) {
- // Scream :)
-// qDebug()<<"For type"<type = type;
- subfolder->icon = fileTypes.at(i).icon;
- subfolder->fullPath = m_projectDir;
- subfolder->typeName = fileTypes.at(i).typeName;
- subfolder->priority = -i;
- subfolder->displayName = fileTypes.at(i).typeName;
- contents.virtualfolders.append(subfolder);
- // create the hierarchy with subdirectories
- subfolder->create(m_projectDir, m_files[type], type);
- }
- }
-
- contents.updateSubFolders(this, this);
- m_project->updateFileList();
- m_project->updateCodeModels();
+ Q_UNUSED(changedFolder);
+ scheduleUpdate();
}
bool Qt4PriFileNode::deploysFolder(const QString &folder) const
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp
index aa811840313..4ba2a96919a 100644
--- a/src/plugins/qt4projectmanager/qt4project.cpp
+++ b/src/plugins/qt4projectmanager/qt4project.cpp
@@ -615,7 +615,8 @@ void Qt4Project::updateCppCodeModel()
setProjectLanguage(ProjectExplorer::Constants::LANG_CXX, !allFiles.isEmpty());
modelmanager->updateProjectInfo(pinfo);
- m_codeModelFuture = modelmanager->updateSourceFiles(allFiles);
+ m_codeModelFuture = modelmanager->updateSourceFiles(allFiles,
+ CppTools::CppModelManagerInterface::ForcedProgressNotification);
}
void Qt4Project::updateQmlJSCodeModel()
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index 9bd48690616..e2062e21458 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -321,6 +321,11 @@ FileName BaseQtVersion::headerPath() const
return Utils::FileName::fromUserInput(qmakeProperty("QT_INSTALL_HEADERS"));
}
+FileName BaseQtVersion::docsPath() const
+{
+ return Utils::FileName::fromUserInput(qmakeProperty("QT_INSTALL_DOCS"));
+}
+
FileName BaseQtVersion::libraryPath() const
{
return Utils::FileName::fromUserInput(qmakeProperty("QT_INSTALL_LIBS"));
@@ -358,6 +363,16 @@ bool BaseQtVersion::isFrameworkBuild() const
return m_frameworkBuild;
}
+bool BaseQtVersion::hasDebugBuild() const
+{
+ return m_defaultConfigIsDebug || m_defaultConfigIsDebugAndRelease;
+}
+
+bool BaseQtVersion::hasReleaseBuild() const
+{
+ return !m_defaultConfigIsDebug || m_defaultConfigIsDebugAndRelease;
+}
+
void BaseQtVersion::setId(int id)
{
m_id = id;
@@ -977,9 +992,11 @@ QHash BaseQtVersion::versionInfo() const
return m_versionInfo;
}
-QString BaseQtVersion::qmakeProperty(const QHash &versionInfo, const QByteArray &name)
+QString BaseQtVersion::qmakeProperty(const QHash &versionInfo, const QByteArray &name,
+ PropertyVariant variant)
{
- QString val = versionInfo.value(QString::fromLatin1(name + "/get"));
+ QString val = versionInfo.value(QString::fromLatin1(
+ name + (variant == PropertyVariantGet ? "/get" : "/src")));
if (!val.isNull())
return val;
return versionInfo.value(QString::fromLatin1(name));
@@ -1339,7 +1356,7 @@ bool BaseQtVersion::queryQMakeVariables(const FileName &binary, const Environmen
FileName BaseQtVersion::mkspecDirectoryFromVersionInfo(const QHash &versionInfo)
{
- QString dataDir = qmakeProperty(versionInfo, "QT_HOST_DATA");
+ QString dataDir = qmakeProperty(versionInfo, "QT_HOST_DATA", PropertyVariantSrc);
if (dataDir.isEmpty())
return FileName();
return FileName::fromUserInput(dataDir + QLatin1String("/mkspecs"));
diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h
index 001784abbeb..c0d14e419a9 100644
--- a/src/plugins/qtsupport/baseqtversion.h
+++ b/src/plugins/qtsupport/baseqtversion.h
@@ -121,7 +121,9 @@ public:
// Returns the PREFIX, BINPREFIX, DOCPREFIX and similar information
QHash versionInfo() const;
- static QString qmakeProperty(const QHash &versionInfo, const QByteArray &name);
+ enum PropertyVariant { PropertyVariantGet, PropertyVariantSrc };
+ static QString qmakeProperty(const QHash &versionInfo, const QByteArray &name,
+ PropertyVariant variant = PropertyVariantGet);
QString qmakeProperty(const QByteArray &name) const;
virtual void addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const;
virtual Utils::Environment qmakeRunEnvironment() const;
@@ -219,6 +221,7 @@ public:
virtual QList validateKit(const ProjectExplorer::Kit *k);
Utils::FileName headerPath() const;
+ Utils::FileName docsPath() const;
Utils::FileName libraryPath() const;
Utils::FileName binPath() const;
Utils::FileName mkspecsPath() const;
@@ -226,6 +229,9 @@ public:
QString qtNamespace() const;
QString qtLibInfix() const;
bool isFrameworkBuild() const;
+ // Note: A Qt version can have both a debug and a release built at the same time!
+ bool hasDebugBuild() const;
+ bool hasReleaseBuild() const;
protected:
BaseQtVersion();
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp
index baad1896c43..cdd79af3b85 100644
--- a/src/plugins/qtsupport/exampleslistmodel.cpp
+++ b/src/plugins/qtsupport/exampleslistmodel.cpp
@@ -48,13 +48,13 @@
namespace QtSupport {
namespace Internal {
-const int allQtVersionsId = -0xff;
+const int noQtVersionsId = -0xff;
static const char currentQtVersionFilterSettingsKeyC[] = "WelcomePageQtVersionFilter";
int uniqueQtVersionIdSetting()
{
QSettings *settings = Core::ICore::settings();
- int id = settings->value(QLatin1String(currentQtVersionFilterSettingsKeyC), allQtVersionsId).toInt();
+ int id = settings->value(QLatin1String(currentQtVersionFilterSettingsKeyC), noQtVersionsId).toInt();
return id;
}
@@ -77,6 +77,38 @@ public:
setRoleNames(roleNames);
}
+ int findHighestQtVersion()
+ {
+ QtVersionManager *versionManager = QtVersionManager::instance();
+ QList qtVersions = versionManager->validVersions();
+
+ BaseQtVersion *newVersion = 0;
+
+ foreach (BaseQtVersion *version, qtVersions) {
+
+ if (version->isValid() && version->hasDemos() && version->hasExamples()) {
+ if (!newVersion) {
+ newVersion = version;
+ } else {
+ if (version->qtVersion() > newVersion->qtVersion()) {
+ newVersion = version;
+ } else if (version->qtVersion() == newVersion->qtVersion()
+ && version->uniqueId() < newVersion->uniqueId()) {
+ newVersion = version;
+ }
+ }
+ }
+ }
+
+ if (!newVersion && !qtVersions.isEmpty())
+ newVersion = qtVersions.first();
+
+ if (!newVersion)
+ return noQtVersionsId;
+
+ return newVersion->uniqueId();
+ }
+
void setupQtVersions()
{
beginResetModel();
@@ -90,30 +122,33 @@ public:
if (defaultVersion && qtVersions.contains(defaultVersion))
qtVersions.move(qtVersions.indexOf(defaultVersion), 0);
- QStandardItem *newItem = new QStandardItem();
- newItem->setData(tr("All Versions"), Qt::UserRole + 1);
- newItem->setData(allQtVersionsId, Qt::UserRole + 2);
- appendRow(newItem);
-
int qtVersionSetting = uniqueQtVersionIdSetting();
- if (qtVersionSetting != allQtVersionsId) {
+ int newQtVersionSetting = noQtVersionsId;
+ if (qtVersionSetting != noQtVersionsId) {
//ensure that the unique Qt id is valid
- int newQtVersionSetting = allQtVersionsId;
foreach (BaseQtVersion *version, qtVersions) {
- if (version->uniqueId() == qtVersionSetting)
+ if (version->uniqueId() == qtVersionSetting) {
newQtVersionSetting = qtVersionSetting;
- }
-
- if (newQtVersionSetting != qtVersionSetting) {
- setUniqueQtVersionIdSetting(newQtVersionSetting);
+ }
}
}
+ if (newQtVersionSetting == noQtVersionsId) {
+ newQtVersionSetting = findHighestQtVersion();
+ }
+
+ if (newQtVersionSetting != qtVersionSetting) {
+ setUniqueQtVersionIdSetting(newQtVersionSetting);
+ }
+
+
foreach (BaseQtVersion *version, qtVersions) {
- QStandardItem *newItem = new QStandardItem();
- newItem->setData(version->displayName(), Qt::UserRole + 1);
- newItem->setData(version->uniqueId(), Qt::UserRole + 2);
- appendRow(newItem);
+ if (version->hasDemos() || version->hasExamples()) {
+ QStandardItem *newItem = new QStandardItem();
+ newItem->setData(version->displayName(), Qt::UserRole + 1);
+ newItem->setData(version->uniqueId(), Qt::UserRole + 2);
+ appendRow(newItem);
+ }
}
endResetModel();
}
@@ -147,7 +182,7 @@ ExamplesListModel::ExamplesListModel(QObject *parent) :
m_updateOnQtVersionsChanged(false),
m_initialized(false),
m_helpInitialized(false),
- m_uniqueQtId(allQtVersionsId)
+ m_uniqueQtId(noQtVersionsId)
{
QHash roleNames;
roleNames[Name] = "name";
@@ -517,7 +552,7 @@ QStringList ExamplesListModel::exampleSources(QString *examplesInstallPath, QStr
foreach (BaseQtVersion *version, qtVersions) {
//filter for qt versions
- if (version->uniqueId() != m_uniqueQtId && m_uniqueQtId != allQtVersionsId)
+ if (version->uniqueId() != m_uniqueQtId && m_uniqueQtId != noQtVersionsId)
continue;
// qt5 with examples OR demos manifest
diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp
index bbbf669923a..1b49ad1e3ca 100644
--- a/src/plugins/resourceeditor/resourceeditorw.cpp
+++ b/src/plugins/resourceeditor/resourceeditorw.cpp
@@ -259,9 +259,9 @@ bool ResourceEditorDocument::reload(QString *errorString, ReloadFlag flag, Chang
} else {
emit aboutToReload();
QString fn = m_parent->m_resourceEditor->fileName();
- if (!m_parent->open(errorString, fn, fn))
- return false;
- emit reloaded();
+ const bool success = m_parent->open(errorString, fn, fn);
+ emit reloadFinished(success);
+ return success;
}
return true;
}
diff --git a/src/plugins/texteditor/basetextdocument.cpp b/src/plugins/texteditor/basetextdocument.cpp
index f21f0185a1b..64fb4359302 100644
--- a/src/plugins/texteditor/basetextdocument.cpp
+++ b/src/plugins/texteditor/basetextdocument.cpp
@@ -415,8 +415,7 @@ bool BaseTextDocument::reload(QString *errorString)
if (documentLayout)
documentLayout->documentReloaded(marks); // readds text marks
- if (success)
- emit reloaded();
+ emit reloadFinished(success);
return success;
}
diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index a9b9df101f0..7fdb2c9534e 100644
--- a/src/plugins/texteditor/basetexteditor.cpp
+++ b/src/plugins/texteditor/basetexteditor.cpp
@@ -2204,8 +2204,11 @@ void BaseTextEditorWidget::documentAboutToBeReloaded()
d->m_refactorOverlay->clear();
}
-void BaseTextEditorWidget::documentReloaded()
+void BaseTextEditorWidget::documentReloadFinished(bool success)
{
+ if (!success)
+ return;
+
// restore cursor position
restoreState(d->m_tempState);
updateCannotDecodeInfo();
@@ -2584,7 +2587,7 @@ void BaseTextEditorWidgetPrivate::setupDocumentSignals(const QSharedPointerslotUpdateExtraAreaWidth();
}
diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h
index 850eb64eee9..ce99441e207 100644
--- a/src/plugins/texteditor/basetexteditor.h
+++ b/src/plugins/texteditor/basetexteditor.h
@@ -375,7 +375,7 @@ protected:
private slots:
void editorContentsChange(int position, int charsRemoved, int charsAdded);
void documentAboutToBeReloaded();
- void documentReloaded();
+ void documentReloadFinished(bool success);
void highlightSearchResults(const QString &txt, Find::FindFlags findFlags);
void setFindScope(const QTextCursor &start, const QTextCursor &end, int, int);
bool inFindScope(const QTextCursor &cursor);
diff --git a/src/plugins/texteditor/codeassist/iassistinterface.cpp b/src/plugins/texteditor/codeassist/iassistinterface.cpp
index 02f86386cea..51fe2a615a8 100644
--- a/src/plugins/texteditor/codeassist/iassistinterface.cpp
+++ b/src/plugins/texteditor/codeassist/iassistinterface.cpp
@@ -33,8 +33,8 @@ using namespace TextEditor;
/*!
\class TextEditor::IAssistInterface
- \brief The IAssistInterface class acts as an interface for providing access to the document
- from which a proposal is computed.
+ \brief The IAssistInterface class acts as an interface for providing access
+ to the document from which a proposal is computed.
\ingroup CodeAssist
This interface existis in order to avoid a direct dependency on the text editor. This is
diff --git a/src/plugins/valgrind/callgrindcostview.cpp b/src/plugins/valgrind/callgrindcostview.cpp
index 33ace83d6b1..5bd1a10743b 100644
--- a/src/plugins/valgrind/callgrindcostview.cpp
+++ b/src/plugins/valgrind/callgrindcostview.cpp
@@ -37,7 +37,8 @@
#include
#include
-#include
+#include
+#include
#include