diff --git a/dist/changes-4.1.1.md b/dist/changes-4.1.1.md
deleted file mode 100644
index 096afd22f29..00000000000
--- a/dist/changes-4.1.1.md
+++ /dev/null
@@ -1,82 +0,0 @@
-Qt Creator version 4.1.1 contains bug fixes.
-
-The most important changes are listed in this document. For a complete
-list of changes, see the Git log for the Qt Creator sources that
-you can check out from the public Git repository. For example:
-
- git clone git://code.qt.io/qt-creator/qt-creator.git
- git log --cherry-pick --pretty=oneline v4.1.0..v4.1.1
-
-General
-
-* Fixed issues with output pane height
- (QTCREATORBUG-15986, QTCREATORBUG-16829)
-
-Editing
-
-* Fixed performance of cleaning whitespace (QTCREATORBUG-16420)
-* Fixed selection color in help viewer for dark theme (QTCREATORBUG-16375)
-
-Help
-
-* Fixed that no results could be shown in Locator (QTCREATORBUG-16753)
-
-QMake Projects
-
-* Fixed issue with make steps in deploy configurations (QTCREATORBUG-16795)
-
-Qbs Projects
-
-* Fixed handling of generated files (QTCREATORBUG-16976)
-
-QML Support
-
-* Fixed handling of circular dependencies (QTCREATORBUG-16585)
-
-Debugging
-
-* Fixed scrolling in memory editor (QTCREATORBUG-16751)
-* Fixed expansion of items in tool tip (QTCREATORBUG-16947)
-* GDB
- * Fixed handling of built-in pretty printers from new versions of GDB
- (QTCREATORBUG-16758)
- * Fixed that remote working directory was used for local process
- (QTCREATORBUG-16211)
-* CDB
- * Fixed display order of vectors in vectors (QTCREATORBUG-16813)
- * Fixed display of QList contents (QTCREATORBUG-16750)
-* QML
- * Fixed that expansion state was reset when stepping
-
-QML Profiler
-
-* Separated compile events from other QML/JS events in statistics and
- flamegraph, since compilation can happen asynchronously
-
-Beautifier
-
-* Fixed that beautifier was not enabled for Objective-C/C++ files
- (QTCREATORBUG-16806)
-
-Platform Specific
-
-macOS
-
-* Fixed issue with detecting LLDB through `xcrun`
-
-Android
-
-* Added API level 24 for Android 7
-* Fixed debugging on Android 6+ with NDK r11+ (QTCREATORBUG-16721)
-
-iOS
-
-* Fixed simulator support with Xcode 8 (QTCREATORBUG-16942)
- Known issue: Qt Creator is blocked until simulator finishes starting
-* Fixed that standard paths reported by QStandardPaths were wrong when
- running on simulator (QTCREATORBUG-13655)
-* Fixed QML debugging on device (QTCREATORBUG-15812)
-
-QNX
-
-* Fixed QML debugging (QTCREATORBUG-17208)
diff --git a/dist/changes-4.2.0.md b/dist/changes-4.2.0.md
index 473023cc24b..7674bd19e1a 100644
--- a/dist/changes-4.2.0.md
+++ b/dist/changes-4.2.0.md
@@ -17,6 +17,8 @@ General
* Added Help > System Information for bug reporting purposes
(QTCREATORBUG-16135)
* Added option to hide the central widget in Debug mode
+* Fixed issues with output pane height
+ (QTCREATORBUG-15986, QTCREATORBUG-16829)
Welcome
@@ -30,10 +32,13 @@ Editing
* Added action for selecting word under cursor (QTCREATORBUG-641)
* Fixed highlighting of Markdown files
(QTCREATORBUG-16304)
+* Fixed performance of cleaning whitespace (QTCREATORBUG-16420)
+* Fixed selection color in help viewer for dark theme (QTCREATORBUG-16375)
Help
* Added option to open link and current page in window (QTCREATORBUG-16842)
+* Fixed that no results could be shown in Locator (QTCREATORBUG-16753)
All Projects
@@ -50,6 +55,7 @@ QMake Projects
(QTCREATORBUG-16558)
* Fixed Add Library wizard when selecting library from absolute path or
different drive (QTCREATORBUG-8413, QTCREATORBUG-15732, QTCREATORBUG-16688)
+* Fixed issue with make steps in deploy configurations (QTCREATORBUG-16795)
CMake Projects
@@ -64,6 +70,7 @@ CMake Projects
Qbs Projects
* Made generated files available in project tree (QTCREATORBUG-15978)
+* Fixed handling of generated files (QTCREATORBUG-16976)
C++ Support
@@ -78,16 +85,37 @@ C++ Support
* Added notification for parsing errors in headers
* Improved responsiveness of completion and highlighting
+QML Support
+
+* Fixed handling of circular dependencies (QTCREATORBUG-16585)
+
Debugging
* Added pretty printing of `QRegExp` captures, `QStaticStringData`,
- `QStandardItem`, and `std::pair`
+ `QStandardItem`, `std::weak_ptr`, `std::__1::multiset`,
+ and `std::pair`
+* Added display of QObject hierarchy and properties in release builds
+* Added support to pretty-print custom types without debug info
+* Enhanced display of function pointers
* Improved pretty printing of QV4 types
-* Made display of maps more compact
+* Made display of associative containers, pairs, and various smart
+ pointers more compact
+* Made creation of custom pretty printers easier
* Fixed pretty printing of `QFixed`
+* Fixed scrolling in memory editor (QTCREATORBUG-16751)
+* Fixed expansion of items in tool tip (QTCREATORBUG-16947)
+* GDB
+ * Fixed handling of built-in pretty printers from new versions of GDB
+ (QTCREATORBUG-16758)
+ * Fixed that remote working directory was used for local process
+ (QTCREATORBUG-16211)
* LLDB
* Added support for Qt Creator variables `%{...}` in startup commands
+* CDB
+ * Fixed display order of vectors in vectors (QTCREATORBUG-16813)
+ * Fixed display of QList contents (QTCREATORBUG-16750)
* QML
+ * Fixed that expansion state was reset when stepping
* Fixed `Load QML Stack` with Qt 5.7 and later (QTCREATORBUG-17097)
QML Profiler
@@ -95,6 +123,8 @@ QML Profiler
* Added option to show memory usage and allocations as flame graph
* Added option to show vertical orientation lines in timeline
(click the time ruler)
+* Separated compile events from other QML/JS events in statistics and
+ flamegraph, since compilation can happen asynchronously
Qt Quick Designer
@@ -142,6 +172,11 @@ Model Editor
* Added zooming
* Added synchronization of selected diagram in diagram browser
+Beautifier
+
+* Fixed that beautifier was not enabled for Objective-C/C++ files
+ (QTCREATORBUG-16806)
+
Platform Specific
Windows
@@ -150,9 +185,15 @@ Windows
* Fixed that environment variables containing special characters were not
passed correctly to user applications (QTCREATORBUG-17219)
+macOS
+
+* Fixed issue with detecting LLDB through `xcrun`
+
Android
+* Added API level 24 for Android 7
* Improved stability of determination if application is running
+* Fixed debugging on Android 6+ with NDK r11+ (QTCREATORBUG-16721)
* Fixed that running without deployment did not start emulator
(QTCREATORBUG-10237)
* Fixed that permission model downgrade was not detected as error
@@ -161,12 +202,19 @@ Android
iOS
-* Fixed that Qt Creator was blocked until simulator finished starting
+* Fixed simulator support with Xcode 8 (QTCREATORBUG-16942)
+* Fixed that standard paths reported by QStandardPaths were wrong when
+ running on simulator (QTCREATORBUG-13655)
+* Fixed QML debugging on device (QTCREATORBUG-15812)
Remote Linux
* Fixed crash when creating SSH key pair (QTCREATORBUG-17349)
+QNX
+
+* Fixed QML debugging (QTCREATORBUG-17208)
+
Credits for these changes go to:
Aaron Barany
Alessandro Portale
diff --git a/dist/appdata.xml b/dist/org.qt-project.qtcreator.appdata.xml
similarity index 71%
rename from dist/appdata.xml
rename to dist/org.qt-project.qtcreator.appdata.xml
index b96ba959bce..ef8663f6572 100644
--- a/dist/appdata.xml
+++ b/dist/org.qt-project.qtcreator.appdata.xml
@@ -1,8 +1,9 @@
-
- qtcreator.desktop
- CC-BY-SA
+
+ org.qt-project.qtcreator.desktop
+ CC0-1.0
+ GPL-3.0
Qt Creator provides a cross-platform, complete integrated development
@@ -20,9 +21,7 @@
newcomers to Qt.
-
- http://qt-project.org/uploads/image_upload/qtcreator-edit-mode.png
-
- https://wiki.qt.io/Category:Tools::QtCreator
+
+ https://qt.io/ide/Qt
-
+
diff --git a/dist/org.qt-project.qtcreator.desktop b/dist/org.qt-project.qtcreator.desktop
new file mode 100644
index 00000000000..26c0aa58bba
--- /dev/null
+++ b/dist/org.qt-project.qtcreator.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Exec=qtcreator %F
+Name=Qt Creator
+GenericName=C++ IDE for developing Qt applications
+X-KDE-StartupNotify=true
+Icon=QtProject-qtcreator
+Terminal=false
+Categories=Development;IDE;Qt;
+MimeType= text/x-c++src;text/x-c++hdr;text/x-xsrc;application/x-designer;application/vnd.qt.qmakeprofile;application/vnd.qt.xml.resource;
+
diff --git a/qtcreator.pro b/qtcreator.pro
index b71317061b3..ebcd9d7223a 100644
--- a/qtcreator.pro
+++ b/qtcreator.pro
@@ -93,6 +93,16 @@ isEmpty(BASENAME): BASENAME = qt-creator-$${PLATFORM}$(INSTALL_EDITION)-$${QTCRE
macx:INSTALLER_NAME = "qt-creator-$${QTCREATOR_VERSION}"
else:INSTALLER_NAME = "$${BASENAME}"
+linux {
+ appstream.files = dist/org.qt-project.qtcreator.appdata.xml
+ appstream.path = $$QTC_PREFIX/share/metainfo/
+
+ desktop.files = dist/org.qt-project.qtcreator.desktop
+ desktop.path = $$QTC_PREFIX/share/applications/
+
+ INSTALLS += appstream desktop
+}
+
macx {
APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app"
BINDIST_SOURCE = "$$OUT_PWD/bin/Qt Creator.app"
@@ -109,7 +119,10 @@ macx {
deployqt.depends = install
win32 {
deployartifacts.depends = install
- deployartifacts.commands = git clone "git://code.qt.io/qt-creator/binary-artifacts.git" -b $$BINARY_ARTIFACTS_BRANCH&& xcopy /s /q /y /i "binary-artifacts\\win32" \"$(INSTALL_ROOT)$$QTC_PREFIX\"&& rmdir /s /q binary-artifacts
+ deployartifacts.commands = git clone --depth 1 -b $$BINARY_ARTIFACTS_BRANCH \
+ "http://code.qt.io/qt-creator/binary-artifacts.git" \
+ && xcopy /s /q /y /i "binary-artifacts\\win32" \"$(INSTALL_ROOT)$$QTC_PREFIX\" \
+ && rmdir /s /q binary-artifacts
QMAKE_EXTRA_TARGETS += deployartifacts
}
}
diff --git a/scripts/common.py b/scripts/common.py
index 22fcca98720..388ce487fdb 100644
--- a/scripts/common.py
+++ b/scripts/common.py
@@ -24,10 +24,13 @@
############################################################################
import os
+import locale
import shutil
import subprocess
import sys
+encoding = locale.getdefaultlocale()[1]
+
def is_windows_platform():
return sys.platform.startswith('win')
@@ -88,7 +91,7 @@ def copytree(src, dst, symlinks=False, ignore=None):
def get_qt_install_info(qmake_bin):
output = subprocess.check_output([qmake_bin, '-query'])
- lines = output.strip().split('\n')
+ lines = output.decode(encoding).strip().split('\n')
info = {}
for line in lines:
(var, sep, value) = line.partition(':')
@@ -103,7 +106,7 @@ def get_rpath(libfilepath, chrpath=None):
except subprocess.CalledProcessError: # no RPATH or RUNPATH
return []
marker = 'RPATH='
- index = output.find(marker)
+ index = output.decode(encoding).find(marker)
if index < 0:
marker = 'RUNPATH='
index = output.find(marker)
@@ -127,7 +130,7 @@ def fix_rpaths(path, qt_deploy_path, qt_install_info, chrpath=None):
# check for Qt linking
lddOutput = subprocess.check_output(['ldd', filepath])
- if lddOutput.find('libQt5') >= 0 or lddOutput.find('libicu') >= 0:
+ if lddOutput.decode(encoding).find('libQt5') >= 0 or lddOutput.find('libicu') >= 0:
# add Qt RPATH if necessary
relative_path = os.path.relpath(qt_deploy_path, os.path.dirname(filepath))
if relative_path == '.':
diff --git a/scripts/createDevPackage.py b/scripts/createDevPackage.py
index 09f729a7122..b0b3837fb31 100755
--- a/scripts/createDevPackage.py
+++ b/scripts/createDevPackage.py
@@ -57,8 +57,9 @@ def parse_arguments():
source_include_patterns = [
# directories
- r"^scripts/.*$", # everything under scripts/
- r"^src/(.*/)?$", # all directories under src/
+ r"^scripts/.*$", # everything under scripts/
+ r"^src/(.*/)?$", # all directories under src/
+ r"^plugins/(.*/)?$", # all directories under plugins/ (if this is run on extra plugin repositories)
# files
r"^HACKING$",
r"^LICENSE.*$",
@@ -107,12 +108,6 @@ def copy_regexp(regexp, source_directory, target_directory, verbose):
common.copytree(source_directory, target_directory, symlinks=True, ignore=ignore)
def sanity_check_arguments(arguments):
- if not os.path.isfile(os.path.join(arguments.source, 'qtcreator.pri')):
- print('error: did not find qtcreator.pri at "{0}"'.format(arguments.source))
- return False
- if not os.path.isfile(os.path.join(arguments.build, 'src', 'app', 'app_version.h')):
- print('error: did not find src/app/app_version.h at "{0}"'.format(arguments.build))
- return False
if os.path.exists(arguments.target_directory) and (os.path.isfile(arguments.target_directory)
or len(os.listdir(arguments.target_directory)) > 0):
print('error: target directory "{0}" exists and is not empty'.format(arguments.target_directory))
diff --git a/scripts/deployqt.py b/scripts/deployqt.py
index d2c2e7abac3..8e7fa8ba47a 100755
--- a/scripts/deployqt.py
+++ b/scripts/deployqt.py
@@ -28,6 +28,7 @@
################################################################################
import os
+import locale
import sys
import getopt
import subprocess
@@ -39,9 +40,10 @@ import common
ignoreErrors = False
debug_build = False
+encoding = locale.getdefaultlocale()[1]
def usage():
- print "Usage: %s [qmake_path]" % os.path.basename(sys.argv[0])
+ print("Usage: %s [qmake_path]" % os.path.basename(sys.argv[0]))
def which(program):
def is_exe(fpath):
@@ -73,14 +75,14 @@ def is_debug(fpath):
if coredebug.search(fpath):
return True
output = subprocess.check_output(['dumpbin', '/imports', fpath])
- return coredebug.search(output) != None
+ return coredebug.search(output.decode(encoding)) != None
def is_debug_build(install_dir):
return is_debug(os.path.join(install_dir, 'bin', 'qtcreator.exe'))
def op_failed(details = None):
if details != None:
- print details
+ print(details)
if ignoreErrors == False:
print("Error: operation failed!")
sys.exit(2)
@@ -108,7 +110,7 @@ def ignored_qt_lib_files(path, filenames):
return [fn for fn in filenames if is_ignored_windows_file(debug_build, path, fn)]
def copy_qt_libs(target_qt_prefix_path, qt_bin_dir, qt_libs_dir, qt_plugin_dir, qt_import_dir, qt_qml_dir, plugins, imports):
- print "copying Qt libraries..."
+ print("copying Qt libraries...")
if common.is_windows_platform():
libraries = glob(os.path.join(qt_libs_dir, '*.dll'))
@@ -127,7 +129,7 @@ def copy_qt_libs(target_qt_prefix_path, qt_bin_dir, qt_libs_dir, qt_plugin_dir,
libraries = [lib for lib in libraries if not is_ignored_windows_file(debug_build, '', lib)]
for library in libraries:
- print library, '->', lib_dest
+ print(library, '->', lib_dest)
if os.path.islink(library):
linkto = os.readlink(library)
try:
@@ -137,7 +139,7 @@ def copy_qt_libs(target_qt_prefix_path, qt_bin_dir, qt_libs_dir, qt_plugin_dir,
else:
shutil.copy(library, lib_dest)
- print "Copying plugins:", plugins
+ print("Copying plugins:", plugins)
for plugin in plugins:
target = os.path.join(target_qt_prefix_path, 'plugins', plugin)
if (os.path.exists(target)):
@@ -147,7 +149,7 @@ def copy_qt_libs(target_qt_prefix_path, qt_bin_dir, qt_libs_dir, qt_plugin_dir,
print('{0} -> {1}'.format(pluginPath, target))
common.copytree(pluginPath, target, ignore=ignored_qt_lib_files, symlinks=True)
- print "Copying imports:", imports
+ print("Copying imports:", imports)
for qtimport in imports:
target = os.path.join(target_qt_prefix_path, 'imports', qtimport)
if (os.path.exists(target)):
@@ -158,14 +160,14 @@ def copy_qt_libs(target_qt_prefix_path, qt_bin_dir, qt_libs_dir, qt_plugin_dir,
common.copytree(import_path, target, ignore=ignored_qt_lib_files, symlinks=True)
if (os.path.exists(qt_qml_dir)):
- print "Copying qt quick 2 imports"
+ print("Copying qt quick 2 imports")
target = os.path.join(target_qt_prefix_path, 'qml')
if (os.path.exists(target)):
shutil.rmtree(target)
print('{0} -> {1}'.format(qt_qml_dir, target))
common.copytree(qt_qml_dir, target, ignore=ignored_qt_lib_files, symlinks=True)
- print "Copying qtdiag"
+ print("Copying qtdiag")
bin_dest = target_qt_prefix_path if common.is_windows_platform() else os.path.join(target_qt_prefix_path, 'bin')
qtdiag_src = os.path.join(qt_bin_dir, 'qtdiag.exe' if common.is_windows_platform() else 'qtdiag')
if not os.path.exists(bin_dest):
@@ -191,9 +193,9 @@ def copy_translations(install_dir, qt_tr_dir):
translations = glob(os.path.join(qt_tr_dir, '*.qm'))
tr_dir = os.path.join(install_dir, 'share', 'qtcreator', 'translations')
- print "copying translations..."
+ print("copying translations...")
for translation in translations:
- print translation, '->', tr_dir
+ print(translation, '->', tr_dir)
shutil.copy(translation, tr_dir)
def copyPreservingLinks(source, destination):
@@ -240,21 +242,21 @@ def deploy_libclang(install_dir, llvm_install_dir, chrpath_bin):
os.path.join(clangbinary_targetdir, linktarget)))
resourcetarget = os.path.join(install_dir, 'libexec', 'qtcreator', 'clang', 'lib', 'clang')
- print "copying libclang..."
+ print("copying libclang...")
for source, target in deployinfo:
- print source, '->', target
+ print(source, '->', target)
copyPreservingLinks(source, target)
if common.is_linux_platform():
# libclang was statically compiled, so there is no need for the RPATHs
# and they are confusing when fixing RPATHs later in the process
- print "removing libclang RPATHs..."
+ print("removing libclang RPATHs...")
for source, target in deployinfo:
if not os.path.islink(target):
targetfilepath = target if not os.path.isdir(target) else os.path.join(target, os.path.basename(source))
subprocess.check_call([chrpath_bin, '-d', targetfilepath])
- print resourcesource, '->', resourcetarget
+ print(resourcesource, '->', resourcetarget)
if (os.path.exists(resourcetarget)):
shutil.rmtree(resourcetarget)
common.copytree(resourcesource, resourcetarget, symlinks=True)
@@ -272,7 +274,7 @@ def main():
if o in ('-i', '--ignore-errors'):
global ignoreErrors
ignoreErrors = True
- print "Note: Ignoring all errors"
+ print("Note: Ignoring all errors")
if len(args) < 1:
usage()
@@ -289,14 +291,14 @@ def main():
qmake_bin = which(qmake_bin)
if qmake_bin == None:
- print "Cannot find required binary 'qmake'."
+ print("Cannot find required binary 'qmake'.")
sys.exit(2)
chrpath_bin = None
if common.is_linux_platform():
chrpath_bin = which('chrpath')
if chrpath_bin == None:
- print "Cannot find required binary 'chrpath'."
+ print("Cannot find required binary 'chrpath'.")
sys.exit(2)
qt_install_info = common.get_qt_install_info(qmake_bin)
@@ -323,7 +325,7 @@ def main():
deploy_libclang(install_dir, os.environ["LLVM_INSTALL_DIR"], chrpath_bin)
if not common.is_windows_platform():
- print "fixing rpaths..."
+ print("fixing rpaths...")
common.fix_rpaths(install_dir, os.path.join(qt_deploy_prefix, 'lib'), qt_install_info, chrpath_bin)
add_qt_conf(os.path.join(install_dir, 'libexec', 'qtcreator'), qt_deploy_prefix) # e.g. for qml2puppet
add_qt_conf(os.path.join(qt_deploy_prefix, 'bin'), qt_deploy_prefix) # e.g. qtdiag
@@ -331,7 +333,7 @@ def main():
if __name__ == "__main__":
if common.is_mac_platform():
- print "Mac OS is not supported by this script, please use macqtdeploy!"
+ print("macOS is not supported by this script, please use macqtdeploy!")
sys.exit(2)
else:
main()
diff --git a/scripts/msanalyzer2tasks.pl b/scripts/msanalyzer2tasks.pl
new file mode 100755
index 00000000000..f8080c34b37
--- /dev/null
+++ b/scripts/msanalyzer2tasks.pl
@@ -0,0 +1,122 @@
+#!/usr/bin/perl -w
+
+############################################################################
+#
+# Copyright (C) 2016 The Qt Company Ltd.
+# Contact: https://www.qt.io/licensing/
+#
+# 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 The Qt Company. For licensing terms
+# and conditions see https://www.qt.io/terms-conditions. For further
+# information use the contact form at https://www.qt.io/contact-us.
+#
+# GNU General Public License Usage
+# Alternatively, this file may be used under the terms of the GNU
+# General Public License version 3 as published by the Free Software
+# Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+# included in the packaging of this file. Please review the following
+# information to ensure the GNU General Public License requirements will
+# be met: https://www.gnu.org/licenses/gpl-3.0.html.
+#
+############################################################################
+
+=head1 NAME
+
+msanalyzer2tasks.pl - Convert MSVC/Static analyzer warnings and errors into Qt Creator task files.
+
+=head1 SYNOPSIS
+
+ msanalyzer2tasks.pl < logfile > taskfile
+
+=cut
+
+# Sample:
+#
+#
+#
+# c:\dev\qt5\qtbase\src\corelib\statemachine\
+# qstatemachine.cpp
+# 968
+# 21
+#
+# 6246
+# Local declaration of 'i' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '953' of 'c:\dev\qt5\qtbase\src\corelib\statemachine\qstatemachine.cpp'.
+# QStateMachinePrivate::enterStates
+# ?enterStates@QStateMachinePrivate@@UAEXPAVQEvent@@ABV?$QList@PAVQAbstractState@@@@1ABV?$QSet@PAVQAbstractState@@@@AAV?$QHash@PAVQAbstractState@@V?$QVector@UQPropertyAssignment@@@@@@ABV?$QList@PAVQAbstractAnimation@@@@@Z
+# 941
+#
+#
+# c:\dev\qt5\qtbase\src\corelib\statemachine\
+# qstatemachine.cpp
+# 953
+# 18
+#
+#
+#
+#
+
+use strict;
+
+my ($description, $defectCode);
+my (@filePaths, @fileNames, @lineNumbers);
+
+# Return element contents of a line "Contents"
+sub elementContents
+{
+ my ($line) = @_;
+ return $line =~ /^ *<([^>]*)>([^<]*)<\/.*$/
+ ? ($1, $2) : (undef, undef)
+}
+
+# Fix path 'c:\foo\' -> 'c:/foo'
+sub fixFilePath
+{
+ my ($p) = @_;
+ $p =~ s|\\|/|g;
+ my $lastSlash = rindex($p, '/');
+ chop($p) if $lastSlash == length($p) - 1;
+ return $p;
+}
+
+# Fix message (replace XML entities, backslash)
+sub fixMessage
+{
+ my ($m) = @_;
+ $m =~ s|\\|/|g;
+ $m =~ s/<//g;
+ $m =~ s/&/&/g;
+ return $m;
+}
+
+while (my $line = ) {
+ chomp($line);
+ my ($element, $content) = elementContents($line);
+ if (defined($element)) {
+ if ($element eq 'FILEPATH') {
+ push(@filePaths, fixFilePath($content));
+ } elsif ($element eq 'FILENAME') {
+ push(@fileNames, $content);
+ } elsif ($element eq 'LINE') {
+ push(@lineNumbers, $content);
+ } elsif ($element eq 'DESCRIPTION') {
+ $description = fixMessage($content);
+ } elsif ($element eq 'DEFECTCODE') {
+ $defectCode = $content;
+ }
+ } elsif (index($line, '') >= 0) {
+ my $count = scalar(@filePaths);
+ for (my $i = 0; $i < $count; $i++) {
+ my $text = $description;
+ $text .= ' (' . $defectCode . ')' if defined $defectCode;
+ print $filePaths[$i], '/', $fileNames[$i], "\t", $lineNumbers[$i], "\twarn\t", $text,"\n";
+ }
+ $description = $defectCode = undef;
+ @filePaths = @fileNames= @lineNumbers = ();
+ }
+}
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index 5c802eea335..9e2bcc4ce67 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -472,6 +472,9 @@ class DumperBase:
self.cachedFormats[typeName] = stripped
return stripped
+ def templateArgument(self, typeobj, position):
+ return typeobj.templateArgument(position)
+
def intType(self):
result = self.lookupType('int')
self.intType = lambda: result
@@ -1858,7 +1861,7 @@ class DumperBase:
for i in range(propertyCount):
t = self.split('III', dataPtr + properties * 4 + 12 * i)
name = self.metaString(metaObjectPtr, t[0], revision)
- if qobject:
+ if qobject and self.qtPropertyFunc:
# LLDB doesn't like calling it on a derived class, possibly
# due to type information living in a different shared object.
#base = self.createValue(qobjectPtr, '@QObject')
@@ -1875,6 +1878,10 @@ class DumperBase:
continue
#warn('COULD NOT EXECUTE: %s' % cmd)
#self.putCallItem(name, '@QVariant', base, 'property', '"' + name + '"')
+ if res is None:
+ self.bump('failedMetaObjectCall2')
+ putt(name, ' ')
+ continue
self.putSubItem(name, res)
else:
putt(name, ' ')
@@ -2876,9 +2883,12 @@ class DumperBase:
elif isinstance(index, self.dumper.Field):
field = index
elif self.dumper.isInt(index):
- if self.type.code in (TypeCodeArray, TypeCodePointer):
- itemAddress = self.laddress + int(index) * self.type.ltarget.size()
- return self.dumper.createValue(itemAddress, self.type.ltarget)
+ if self.type.code == TypeCodeArray:
+ addr = self.laddress + int(index) * self.type.ltarget.size()
+ return self.dumper.createValue(addr, self.type.ltarget)
+ if self.type.code == TypeCodePointer:
+ addr = self.pointer() + int(index) * self.type.ltarget.size()
+ return self.dumper.createValue(addr, self.type.ltarget)
return self.members(False)[index]
else:
error('BAD INDEX TYPE %s' % type(index))
diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py
index dcb48f7a496..ce828398cb0 100644
--- a/share/qtcreator/debugger/gdbbridge.py
+++ b/share/qtcreator/debugger/gdbbridge.py
@@ -1049,7 +1049,7 @@ class Dumper(DumperBase):
sym += '@plt'
self.qtCustomEventPltFunc = self.findSymbol(sym)
- sym = '_ZNK7%sQObject8propertyEPKc' % strns
+ sym = '_ZNK%s7QObject8propertyEPKc' % strns
self.qtPropertyFunc = self.findSymbol(sym)
# This might be wrong, but we can't do better: We found
diff --git a/share/qtcreator/debugger/misctypes.py b/share/qtcreator/debugger/misctypes.py
index 0abab3713a8..3550a3def58 100644
--- a/share/qtcreator/debugger/misctypes.py
+++ b/share/qtcreator/debugger/misctypes.py
@@ -341,3 +341,11 @@ def qdump__WTF__String(d, value):
def qdump__QtcDumperTest_FieldAccessByIndex(d, value):
d.putValue(value["d"][2].integer())
+def qdump__QtcDumperTest_PointerArray(d, value):
+ foos = value["foos"]
+ d.putItemCount(10)
+ if d.isExpanded():
+ with Children(d, 10):
+ for i in d.childRange():
+ d.putSubItem(i, foos[i])
+
diff --git a/src/libs/timeline/timelineitemsrenderpass.cpp b/src/libs/timeline/timelineitemsrenderpass.cpp
index fdcd9ecfc43..56e633dd139 100644
--- a/src/libs/timeline/timelineitemsrenderpass.cpp
+++ b/src/libs/timeline/timelineitemsrenderpass.cpp
@@ -296,6 +296,7 @@ void TimelineItemsGeometry::allocate(QSGMaterial *material)
{
QSGGeometry *geometry = new QSGGeometry(OpaqueColoredPoint2DWithSize::attributes(),
usedVertices);
+ Q_ASSERT(geometry->vertexData());
geometry->setIndexDataPattern(QSGGeometry::StaticPattern);
geometry->setVertexDataPattern(QSGGeometry::StaticPattern);
node = new QSGGeometryNode;
diff --git a/src/libs/timeline/timelinenotesrenderpass.cpp b/src/libs/timeline/timelinenotesrenderpass.cpp
index f630c144c24..d18c1e16fe6 100644
--- a/src/libs/timeline/timelinenotesrenderpass.cpp
+++ b/src/libs/timeline/timelinenotesrenderpass.cpp
@@ -196,6 +196,7 @@ QSGGeometry *NotesGeometry::createGeometry(QVector &ids, const TimelineMode
float rowHeight = TimelineModel::defaultRowHeight();
QSGGeometry *geometry = new QSGGeometry(point2DWithDistanceFromTop(),
ids.count() * 2);
+ Q_ASSERT(geometry->vertexData());
geometry->setDrawingMode(GL_LINES);
geometry->setLineWidth(3);
Point2DWithDistanceFromTop *v =
diff --git a/src/libs/timeline/timelineselectionrenderpass.cpp b/src/libs/timeline/timelineselectionrenderpass.cpp
index b4ef8d9292f..c9953be53ef 100644
--- a/src/libs/timeline/timelineselectionrenderpass.cpp
+++ b/src/libs/timeline/timelineselectionrenderpass.cpp
@@ -36,6 +36,7 @@ QSGGeometryNode *createSelectionNode(QSGMaterial *material)
selectionNode->setMaterial(material);
selectionNode->setFlag(QSGNode::OwnsMaterial, false);
QSGGeometry *geometry = new QSGGeometry(OpaqueColoredPoint2DWithSize::attributes(), 4);
+ Q_ASSERT(geometry->vertexData());
geometry->setDrawingMode(GL_TRIANGLE_STRIP);
OpaqueColoredPoint2DWithSize *v = OpaqueColoredPoint2DWithSize::fromVertexData(geometry);
for (int i = 0; i < 4; ++i)
diff --git a/src/plugins/autotest/testresultspane.cpp b/src/plugins/autotest/testresultspane.cpp
index ac17f9662ed..0f5173c8a9b 100644
--- a/src/plugins/autotest/testresultspane.cpp
+++ b/src/plugins/autotest/testresultspane.cpp
@@ -544,6 +544,8 @@ void TestResultsPane::onCustomContextMenuRequested(const QPoint &pos)
void TestResultsPane::onCopyItemTriggered(const QModelIndex &idx)
{
+ if (!idx.isValid())
+ return;
const TestResult *result = m_filterModel->testResult(idx);
QTC_ASSERT(result, return);
QApplication::clipboard()->setText(result->outputString(true));
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 732c7271e1c..d332a20cd8f 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -1488,6 +1488,9 @@ void EditorManagerPrivate::setCurrentEditor(IEditor *editor, bool ignoreNavigati
if (d->m_currentEditor == editor)
return;
+
+ emit m_instance->currentEditorAboutToChange(d->m_currentEditor);
+
if (d->m_currentEditor && !ignoreNavigationHistory)
EditorManager::addCurrentPositionToNavigationHistory();
diff --git a/src/plugins/coreplugin/editormanager/editormanager.h b/src/plugins/coreplugin/editormanager/editormanager.h
index cbefff451f8..308e7607913 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.h
+++ b/src/plugins/coreplugin/editormanager/editormanager.h
@@ -189,6 +189,7 @@ signals:
void findOnFileSystemRequest(const QString &path);
void aboutToSave(IDocument *document);
void autoSaved();
+ void currentEditorAboutToChange(Core::IEditor *editor);
public slots:
static void saveDocument();
diff --git a/src/plugins/coreplugin/messagebox.cpp b/src/plugins/coreplugin/messagebox.cpp
index 1dfebd10080..9eb636f16b7 100644
--- a/src/plugins/coreplugin/messagebox.cpp
+++ b/src/plugins/coreplugin/messagebox.cpp
@@ -34,7 +34,7 @@ namespace AsynchronousMessageBox {
namespace {
-void message(QMessageBox::Icon icon, const QString &title, const QString &desciption)
+QWidget *message(QMessageBox::Icon icon, const QString &title, const QString &desciption)
{
QMessageBox *messageBox = new QMessageBox(icon,
title,
@@ -45,23 +45,24 @@ void message(QMessageBox::Icon icon, const QString &title, const QString &descip
messageBox->setAttribute(Qt::WA_DeleteOnClose);
messageBox->setModal(true);
messageBox->show();
+ return messageBox;
}
}
-void warning(const QString &title, const QString &desciption)
+QWidget *warning(const QString &title, const QString &desciption)
{
- message(QMessageBox::Warning, title, desciption);
+ return message(QMessageBox::Warning, title, desciption);
}
-void information(const QString &title, const QString &desciption)
+QWidget *information(const QString &title, const QString &desciption)
{
- message(QMessageBox::Information, title, desciption);
+ return message(QMessageBox::Information, title, desciption);
}
-void critical(const QString &title, const QString &desciption)
+QWidget *critical(const QString &title, const QString &desciption)
{
- message(QMessageBox::Critical, title, desciption);
-}
+ return message(QMessageBox::Critical, title, desciption);
}
}
+}
diff --git a/src/plugins/coreplugin/messagebox.h b/src/plugins/coreplugin/messagebox.h
index b679636d1f8..32c60dd6831 100644
--- a/src/plugins/coreplugin/messagebox.h
+++ b/src/plugins/coreplugin/messagebox.h
@@ -29,13 +29,15 @@
QT_BEGIN_NAMESPACE
class QString;
+class QWidget;
QT_END_NAMESPACE
namespace Core {
namespace AsynchronousMessageBox {
- CORE_EXPORT void warning(const QString &title, const QString &desciption);
- CORE_EXPORT void information(const QString &title, const QString &desciption);
- CORE_EXPORT void critical(const QString &title, const QString &desciption);
+CORE_EXPORT QWidget *warning(const QString &title, const QString &desciption);
+CORE_EXPORT QWidget *information(const QString &title, const QString &desciption);
+CORE_EXPORT QWidget *critical(const QString &title, const QString &desciption);
+
}
}
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index 5193aae6214..ef82c06f296 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -383,6 +383,7 @@ public:
// Safety net to avoid infinite lookups.
QSet m_lookupRequests; // FIXME: Integrate properly.
+ QPointer m_alertBox;
};
@@ -1825,8 +1826,11 @@ QString DebuggerEngine::msgInterrupted()
return tr("Interrupted.");
}
-void DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name)
+bool DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name)
{
+ if (d->m_alertBox)
+ return false;
+
if (name.isEmpty())
name = ' ' + tr("", "name") + ' ';
if (meaning.isEmpty())
@@ -1836,7 +1840,9 @@ void DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name
"