diff --git a/dist/changes-3.1.0 b/dist/changes-3.1.0 index 0346ffb142b..70a8d824f0a 100644 --- a/dist/changes-3.1.0 +++ b/dist/changes-3.1.0 @@ -7,28 +7,35 @@ 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://gitorious.org/qt-creator/qt-creator.git -git log --cherry-pick --pretty=oneline origin/3.0..origin/master +git log --cherry-pick --pretty=oneline origin/3.0..origin/3.1 General + * Added support for "~" as an alias for the user's home directory in the directory in file + system search (QTCREATORBUG-7753) + * Added Beautifier plugin that allows to fix coding style of files with external coding + style tools (Artistic Style, Clang-format, Uncrustify) (QTCREATORBUG-7489) Editing - * Added File > Reload + * Added File > Reload for files that are open and unmodified in Qt Creator but might be + different on disk + * Added option to not hide the mouse cursor while typing (QTCREATORBUG-3584) * Made visible margin configurable per project + * Fixed reloading contents in binary editor (QTCREATORBUG-6275) + * Fixed names and saving of custom locator filters (QTCREATORBUG-11051) Managing and Building Projects - -Compilers - -Devices + * Re-added option to import existing builds even after project configuration (QTCREATORBUG-7836) + * Fixed that compiler output in issues list was not using monospace font (QTCREATORBUG-11345) QMake Projects * Added context menu item "Add Existing Directory" that adds all files from a directory (QTCREATORBUG-9081) - -CMake Projects + * Added support for QMAKE_EXTRA_COMPILERS (QTCREATORBUG-11212) + * Fixed issues with absolute paths in TARGET Qbs Projects * Added option for building with --check-timestamps + * Fixed that compiler flags were not set (QBS-481) Generic Projects * Added context menu item "Add Existing Directory" that adds all @@ -38,42 +45,51 @@ Generic Projects Debugging * Removed support for GDB without Python * Added context menu item for saving backtrace as tasks-file - * GDB + * GDB, LLDB + * Added pretty printer for std::unordered_set + * Fixed various pretty printers * CDB * Added pretty printer for std::complex and C++11 std::array * LLDB - * QML - -Analyzer + * Fixed that debugging was not possible with MallocScribble environment variable set + (QTCREATORBUG-11371) + * Fixed "Jump to Line", "Run to Line" and "Jump to Address" QML Profiler * Improved performance (QTCREATORBUG-10950) * Improved layout of details views + * Added JavaScript calls in Events view and Timeline view * Fixed opening files from JavaScript profiling output (QTCREATORBUG-11094) C++ Support * Added code model inspector * Added experimental support for Clang-based code model + * Added support for multiline strings and comments (QTCREATORBUG-662) * Fixed parsing of ??< ??> ??( ??) trigraphs (QTCREATORBUG-2474) * Fixed adding definition for function with rvalue-reference (QTCREATORBUG-10555) * Fixed semantic highlighting after "Save as" * Fixed syntax highlighting of multiline strings and comments (QTCREATORBUG-662) + * Fixed that symbol dropdown was jumping to the wrong editor (QTCREATORBUG-11157) + * Fixed highlighting when #undef is used (QTCREATORBUG-10454) * Improved the Insert Virtual Functions refactoring action: * Check only pure virtual functions by default * Display all overrides of a function * Do not include final functions -Python Support - -GLSL Support +QML Support + * Simplified Qt Quick Application templates (QTCREATORBUG-11264) + * Improved performance when using split views Qt Quick Designer * Fixed selecting overlapping items with same z-value (QTCREATORBUG-11066) * Fixed setting text alignment (QTCREATORBUG-11054) * Fixed crash with anchors (QTCREATORBUG-11138) + * Fixed issue with warning text not being readable (QTCREATORBUG-9603) Diff Viewer + * Fixed display of inserted lines at end of file (QTCREATORBUG-11281) + * Fixed handling of whitespace changes (QTCREATORBUG-11002) Version Control Systems * Git @@ -81,20 +97,25 @@ Version Control Systems * Enabled option to push commit directly after fixup * Enabled choosing non-fast-forward merge when fast-forward is applicable * Added completion in change selection dialog + * Fixed freeze after resolving conflict with cherry-pick or revert + * Added support for local branch selection in the Push to Gerrit dialog * ClearCase * Improved performance of indexing dynamic views * Added warning when editing Derived Objects * Bazaar * Added support for uncommit command + * Mercurial + * Added current branch to project and window title FakeVim * Added "gj", "gk", "g0", "g^" and "g$" commands + * Added toggle ("!") and print ("?") options to "set" command + * Added support for relative line numbering * Made dot command work for letter case commands in visual mode + * Fixed backward incremental search (QTCREATORBUG-7251) Platform Specific -Linux - Qt Support * Custom wizards now use class "qmakeproject" instead of "qt4project" @@ -104,16 +125,73 @@ QNX (QTCREATORBUG-9673, QTCREATORBUG-9001) * Added line and column information to text based BAR descriptor editor (QTCREATORBUG-10395) + * Added simple management of user debug tokens + * Added simple management of runtime configurations + * Added support for attaching debugger to running applications * Fixed several issues with certificate password dialog in BlackBerry options (QTCREATORBUG-10948) Android * Made it possible to cancel waiting for an AVD to boot up + * Added download buttons for Android toolkit parts to Options page + * Added warning for invalid JDK setting (QTCREATORBUG-11218) + * Added minimal support for editing Java, with indentation of blocks and keyword completion + (QTCREATORBUG-11220) + * Added Java file wizard (QTCREATORBUG-11220) * Fixed opening Java files from error messages (QTCREATORBUG-10904) + * Fixed colors in AndroidManifest editor (QTCREATORBUG-10597) + * Fixed modified state of AndroidManifest editor (QTCREATORBUG-11163) + * Fixed apply-behavior of Android Options page (QTCREATORBUG-7724) + * Fixed that Qt Creator restart was required after configuring Android SDK (QTCREATORBUG-10936) -Remote Linux - -Bare Metal +iOS + * Added check for already running application on device + * Added automatic detection that developer mode becomes activated on connected device Credits for these changes go to: +Alessandro Portale +Alexander Kondratskiy +Andre Hartmann +Andre Pönitz +Aurindam Jana +Christian Kandeler +Christian Stenger +Daniel Teske +David Kaspar +David Schulz +Eike Ziller +El Mehdi Fekari +Erik Verbruggen +Falko Arps +Fawzi Mohamed +Frantisek Vacek +Frederik Gladhorn +Friedemann Kleint +Hugues Delorme +Jarek Kobus +Jörg Bornemann +Kai Köhne +Knut Petter Svendsen +Leena Miettinen +Leo Lei +Lukas Holecek +Lorenz Haas +Marco Bubke +Martin Bohacek +Nikolai Kosjar +Orgad Shaneh +Oswald Buddenhagen +Pawel Faron +Petar Perisin +Povilas Kanapickas +Przemyslaw Gorszkowski +Rafael Roquetto +Robert Löhning +Sebastian Paluchiewicz +Takumi Asaki +Thiago Macieira +Thomas Hartmann +Tobias Hunger +Tobias Nätterlund +Ulf Hermann diff --git a/qtcreator.pro b/qtcreator.pro index 1e250446d5e..cc0c0db48bf 100644 --- a/qtcreator.pro +++ b/qtcreator.pro @@ -43,8 +43,9 @@ exists(src/shared/qbs/qbs.pro) { system("echo QBS_LIB_INSTALL_DIR = $${QTC_PREFIX}/$${IDE_LIBRARY_BASENAME}/qtcreator >> $$qmake_cache") system("echo QBS_RESOURCES_BUILD_DIR = $${maybe_backslash}\"$${IDE_DATA_PATH}/qbs$${maybe_backslash}\" >> $$qmake_cache") system("echo QBS_RESOURCES_INSTALL_DIR = $${QTC_PREFIX}/share/qtcreator/qbs >> $$qmake_cache") - system("echo QBS_PLUGINS_BUILD_DIR = $${maybe_backslash}\"$${IDE_BUILD_TREE}/lib/qtcreator/$${maybe_backslash}\" >> $$qmake_cache") - system("echo QBS_PLUGINS_INSTALL_DIR = $${QTC_PREFIX}/lib/qtcreator >> $$qmake_cache") + system("echo QBS_PLUGINS_BUILD_DIR = $${maybe_backslash}\"$${IDE_BUILD_TREE}/$${IDE_LIBRARY_BASENAME}/qtcreator/$${maybe_backslash}\" >> $$qmake_cache") + system("echo QBS_PLUGINS_INSTALL_DIR = $${QTC_PREFIX}/$${IDE_LIBRARY_BASENAME}/qtcreator >> $$qmake_cache") + system("echo QBS_LIBRARY_DIRNAME = $${IDE_LIBRARY_BASENAME} >> $$qmake_cache") system("echo CONFIG += qbs_no_dev_install >> $$qmake_cache") } diff --git a/qtcreator.qbs b/qtcreator.qbs index 5b575391eb3..490fafb2b55 100644 --- a/qtcreator.qbs +++ b/qtcreator.qbs @@ -16,19 +16,20 @@ Project { property pathList additionalPlugins: [] property pathList additionalLibs: [] property pathList additionalTools: [] + property string libDirName: "lib" property string ide_library_path: { if (qbs.targetOS.contains("osx")) return ide_app_target + ".app/Contents/PlugIns" else if (qbs.targetOS.contains("windows")) return ide_app_path else - return "lib/qtcreator" + return libDirName + "/qtcreator" } property string ide_plugin_path: { if (qbs.targetOS.contains("osx")) return ide_library_path else if (qbs.targetOS.contains("windows")) - return "lib/qtcreator/plugins" + return libDirName + "/qtcreator/plugins" else return ide_library_path + "/plugins" } @@ -47,7 +48,7 @@ Project { property bool testsEnabled: qbs.getenv("TEST") || qbs.buildVariant === "debug" property stringList generalDefines: [ "QT_CREATOR", - 'IDE_LIBRARY_BASENAME="lib"', + 'IDE_LIBRARY_BASENAME="' + libDirName + '"', "QT_DISABLE_DEPRECATED_BEFORE=0x040900", "QT_NO_CAST_TO_ASCII", "QT_NO_CAST_FROM_ASCII" diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index 8d01014f918..649fe41456a 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -990,10 +990,7 @@ class DumperBase: self.putCallItem(name, qobject, "property", '"' + name + '"') # Dynamic properties. - if extraData == 0: - self.putItemCount(0) - self.putNumChild(0) - else: + if extraData: propertyNames = extraData + ptrSize propertyValues = extraData + 2 * ptrSize diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py index 2e88280d9fc..bf78b8e0bfa 100644 --- a/share/qtcreator/debugger/gdbbridge.py +++ b/share/qtcreator/debugger/gdbbridge.py @@ -1742,7 +1742,7 @@ class Dumper(DumperBase): # See http://sourceware.org/bugzilla/show_bug.cgi?id=11912 exp = "(class '%s'*)0" % ts try: - type = parseAndEvaluate(exp).type.target() + type = self.parseAndEvaluate(exp).type.target() except: # Can throw "RuntimeError: No type named class Foo." pass diff --git a/share/qtcreator/templates/wizards/plaincapp/qbs/project.qbs b/share/qtcreator/templates/wizards/plaincapp/qbs/project.qbs index 2e3572f5091..2e30fb31c68 100644 --- a/share/qtcreator/templates/wizards/plaincapp/qbs/project.qbs +++ b/share/qtcreator/templates/wizards/plaincapp/qbs/project.qbs @@ -4,4 +4,9 @@ CppApplication { type: "application" // To suppress bundle generation on Mac consoleApplication: true files: "main.c" + + Group { // Properties for the produced executable + fileTagsFilter: product.type + qbs.install: true + } } diff --git a/share/qtcreator/templates/wizards/plaincppapp/qbs/project.qbs b/share/qtcreator/templates/wizards/plaincppapp/qbs/project.qbs index 0972c0066bd..54ac620fe95 100644 --- a/share/qtcreator/templates/wizards/plaincppapp/qbs/project.qbs +++ b/share/qtcreator/templates/wizards/plaincppapp/qbs/project.qbs @@ -4,4 +4,9 @@ CppApplication { type: "application" // To suppress bundle generation on Mac consoleApplication: true files: "main.cpp" + + Group { // Properties for the produced executable + fileTagsFilter: product.type + qbs.install: true + } } diff --git a/share/qtcreator/welcomescreen/qtcreator_tutorials.xml b/share/qtcreator/welcomescreen/qtcreator_tutorials.xml index df18028bd9a..f25167f4aec 100644 --- a/share/qtcreator/welcomescreen/qtcreator_tutorials.xml +++ b/share/qtcreator/welcomescreen/qtcreator_tutorials.xml @@ -2,52 +2,124 @@ - + qt creator,build,compile - - qt,c++,text,qt designer,qt creator + + qt creator,qt designer,widgets,c++,text + + + + qt,qt creator,qt designer,widgets,c++ - - qt quick,qml,states,transitions,visual designer,qt creator + + qt creator,qt quick designer,qt quick,qml,states,transitions - - - qt sdk,qt creator + + + qt creator,qt quick designer,qml,android - - - qt quick,qml,qt sdk,qt creator - - - - qt quick, qml - - - - qt quick, qml - - - - qt quick, qml - - - - qt, webkit + + + qt quick,qml,c++ - + qt creator - - - qt 5, qt + + + qt creator,configuration - - - qt quick, qml, qt creator + + + qt creator,plugins - + + + qt creator,qt quick,qml,c++,android,blackberry,sailfishos + + + + qt creator,qt quick,qml,android + + + + qt creator,qt quick,ios,sensors,camera + + + + qt creator,baremetal + + + + qt,winrt + + + + qt, embedded + + + + qt quick,controls + + + + qt quick,layouts,bindings + + + + qt quick,qml,input + + + + qt quick,qml,3d + + + + qt quick,qt,scenegraph,3d + + + + qt,qml,data types + + + + qt quick,qml,c++,build,compile,input,styling + + + + qt quick,qml,network + + + + qt,web engine + + + + qml,qt quick,web + + + + qt,signals,slots + + + + qt,add-ons,compression,plotting,configuration + + + + qt,data types + + + + qt quick,qml,qt creator,qml profiler,embedded + + + + qt quick,qml,automotive + + diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/androidapp.png b/share/qtcreator/welcomescreen/widgets/images/icons/androidapp.png new file mode 100644 index 00000000000..31b4e85059c Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/androidapp.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/buildrun.png b/share/qtcreator/welcomescreen/widgets/images/icons/buildrun.png index c1f620bf8b6..a72ee0f1810 100644 Binary files a/share/qtcreator/welcomescreen/widgets/images/icons/buildrun.png and b/share/qtcreator/welcomescreen/widgets/images/icons/buildrun.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/ddays13.png b/share/qtcreator/welcomescreen/widgets/images/icons/ddays13.png new file mode 100644 index 00000000000..9c02266bddc Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/ddays13.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/qtquick.png b/share/qtcreator/welcomescreen/widgets/images/icons/qtquick.png index eb122277259..0b01c25be6b 100644 Binary files a/share/qtcreator/welcomescreen/widgets/images/icons/qtquick.png and b/share/qtcreator/welcomescreen/widgets/images/icons/qtquick.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/qwidget.png b/share/qtcreator/welcomescreen/widgets/images/icons/qwidget.png index 8bdc0d43e5d..84a7a12c40e 100644 Binary files a/share/qtcreator/welcomescreen/widgets/images/icons/qwidget.png and b/share/qtcreator/welcomescreen/widgets/images/icons/qwidget.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/tutorialicon.png b/share/qtcreator/welcomescreen/widgets/images/icons/tutorialicon.png new file mode 100644 index 00000000000..c34f23164e4 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/tutorialicon.png differ diff --git a/src/app/app.qbs b/src/app/app.qbs index aebc44643ee..844536ab13b 100644 --- a/src/app/app.qbs +++ b/src/app/app.qbs @@ -5,7 +5,7 @@ Application { consoleApplication: qbs.debugInformation cpp.rpaths: qbs.targetOS.contains("osx") ? ["@executable_path/.."] - : ["$ORIGIN/../lib/qtcreator"] + : ["$ORIGIN/../" + project.libDirName + "/qtcreator"] cpp.defines: project.generalDefines cpp.linkerFlags: { if (qbs.buildVariant == "release" && (qbs.toolchain.contains("gcc") || qbs.toolchain.contains("mingw"))) diff --git a/src/libs/qmleditorwidgets/filewidget.cpp b/src/libs/qmleditorwidgets/filewidget.cpp index 5aa16390901..1ae583f5dc5 100644 --- a/src/libs/qmleditorwidgets/filewidget.cpp +++ b/src/libs/qmleditorwidgets/filewidget.cpp @@ -93,7 +93,8 @@ void FileWidget::comboBoxChanged() void FileWidget::onButtonReleased() { - QString newFile = QFileDialog::getOpenFileName(0, tr("Open File"), m_path.toLocalFile(), m_filter); + QString newFile = QFileDialog::getOpenFileName(this, tr("Open File"), + m_path.toLocalFile(), m_filter); if (!newFile.isEmpty()) setFileNameStr(newFile); } diff --git a/src/libs/utils/consoleprocess.h b/src/libs/utils/consoleprocess.h index a064542fe7c..4a8c18ef526 100644 --- a/src/libs/utils/consoleprocess.h +++ b/src/libs/utils/consoleprocess.h @@ -71,9 +71,8 @@ public: void killProcess(); void killStub(); -#ifdef Q_OS_WIN qint64 applicationMainThreadID() const; -#else +#ifndef Q_OS_WIN void detachStub(); #endif diff --git a/src/libs/utils/consoleprocess_unix.cpp b/src/libs/utils/consoleprocess_unix.cpp index cc9474dbb54..c125a35f3d2 100644 --- a/src/libs/utils/consoleprocess_unix.cpp +++ b/src/libs/utils/consoleprocess_unix.cpp @@ -32,6 +32,7 @@ #include "qtcprocess.h" #include +#include #include #include @@ -64,6 +65,12 @@ ConsoleProcess::ConsoleProcess(QObject *parent) : d->m_process.setProcessChannelMode(QProcess::ForwardedChannels); } +qint64 ConsoleProcess::applicationMainThreadID() const +{ + QTC_CHECK(false); + return -1; +} + void ConsoleProcess::setSettings(QSettings *settings) { d->m_settings = settings; diff --git a/src/libs/utils/filesearch.cpp b/src/libs/utils/filesearch.cpp index 7f637a88c73..12be69663f9 100644 --- a/src/libs/utils/filesearch.cpp +++ b/src/libs/utils/filesearch.cpp @@ -342,7 +342,7 @@ namespace Utils { namespace Internal { QString matchCaseReplacement(const QString &originalText, const QString &replaceText) { - if (originalText.isEmpty()) + if (originalText.isEmpty() || replaceText.isEmpty()) return replaceText; //Now proceed with actual case matching diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp index a2c642af230..ae2daf0e68c 100644 --- a/src/plugins/android/androidrunner.cpp +++ b/src/plugins/android/androidrunner.cpp @@ -160,10 +160,10 @@ void AndroidRunner::checkPID() if (m_wasStarted) { m_wasStarted = false; m_checkPIDTimer.stop(); - emit remoteProcessFinished(tr("\n\n'%1' died.").arg(m_packageName)); + emit remoteProcessFinished(QLatin1String("\n\n") + tr("\"%1\" died.").arg(m_packageName)); } else { if (++m_tries > 3) - emit remoteProcessFinished(tr("\n\nUnable to start '%1'").arg(m_packageName)); + emit remoteProcessFinished(QLatin1String("\n\n") + tr("Unable to start \"%1\"").arg(m_packageName)); } } else if (!m_wasStarted){ if (m_useCppDebugger) { @@ -343,7 +343,7 @@ void AndroidRunner::stop() m_tries = 0; if (m_processPID != -1) { forceStop(); - emit remoteProcessFinished(tr("\n\n'%1' terminated.").arg(m_packageName)); + emit remoteProcessFinished(QLatin1String("\n\n") + tr("\"%1\" terminated.").arg(m_packageName)); } //QObject::disconnect(&m_adbLogcatProcess, 0, this, 0); m_adbLogcatProcess.kill(); diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 457ed349a9d..8d1beec12e9 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -136,6 +137,11 @@ AndroidSettingsWidget::AndroidSettingsWidget(QWidget *parent) m_ui->downloadAntToolButton->setVisible(Utils::HostOsInfo::isWindowsHost()); m_ui->downloadOpenJDKToolButton->setVisible(Utils::HostOsInfo::isWindowsHost()); + m_ui->SDKLocationPushButton->setText(Utils::PathChooser::browseButtonLabel()); + m_ui->NDKLocationPushButton->setText(Utils::PathChooser::browseButtonLabel()); + m_ui->AntLocationPushButton->setText(Utils::PathChooser::browseButtonLabel()); + m_ui->OpenJDKLocationPushButton->setText(Utils::PathChooser::browseButtonLabel()); + check(All); applyToUi(All); } diff --git a/src/plugins/beautifier/beautifierplugin.cpp b/src/plugins/beautifier/beautifierplugin.cpp index dd9c1f185c6..023b950bd56 100644 --- a/src/plugins/beautifier/beautifierplugin.cpp +++ b/src/plugins/beautifier/beautifierplugin.cpp @@ -100,8 +100,8 @@ bool BeautifierPlugin::initialize(const QStringList &arguments, QString *errorSt void BeautifierPlugin::extensionsInitialized() { if (const Core::EditorManager *editorManager = Core::EditorManager::instance()) { - connect(editorManager, SIGNAL(currentEditorChanged(Core::IEditor *)), - this, SLOT(updateActions(Core::IEditor *))); + connect(editorManager, SIGNAL(currentEditorChanged(Core::IEditor*)), + this, SLOT(updateActions(Core::IEditor*))); } } diff --git a/src/plugins/clangcodemodel/clangcompletion.cpp b/src/plugins/clangcodemodel/clangcompletion.cpp index 179c5f03dd2..c5974aea708 100644 --- a/src/plugins/clangcodemodel/clangcompletion.cpp +++ b/src/plugins/clangcodemodel/clangcompletion.cpp @@ -1173,9 +1173,8 @@ void ClangCompletionAssistProcessor::completeIncludePath(const QString &realPath const QStringList &suffixes) { QDirIterator i(realPath, QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot); - const QString hint = - QObject::tr("Location: ", "Parent folder for proposed #include completion") - + QDir::cleanPath(realPath); + //: Parent folder for proposed #include completion + const QString hint = tr("Location: %1").arg(QDir::toNativeSeparators(QDir::cleanPath(realPath))); while (i.hasNext()) { const QString fileName = i.next(); const QFileInfo fileInfo = i.fileInfo(); diff --git a/src/plugins/clangcodemodel/clangcompletion.h b/src/plugins/clangcodemodel/clangcompletion.h index 2ef11fe9e9a..8bd77d9a6c7 100644 --- a/src/plugins/clangcodemodel/clangcompletion.h +++ b/src/plugins/clangcodemodel/clangcompletion.h @@ -43,6 +43,7 @@ #include #include +#include namespace ClangCodeModel { @@ -104,6 +105,8 @@ private: class CLANG_EXPORT ClangCompletionAssistProcessor : public TextEditor::IAssistProcessor { + Q_DECLARE_TR_FUNCTIONS(ClangCodeModel::Internal::ClangCompletionAssistProcessor) + public: ClangCompletionAssistProcessor(); virtual ~ClangCompletionAssistProcessor(); diff --git a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp index 1e53a0f2e5c..d565bfc0868 100644 --- a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp +++ b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp @@ -53,7 +53,8 @@ QString ModelManagerSupport::id() const QString ModelManagerSupport::displayName() const { - return QCoreApplication::translate("ModelManagerSupport::displayName", + //: Display name + return QCoreApplication::translate("ClangCodeModel::Internal::ModelManagerSupport", "Clang"); } diff --git a/src/plugins/clangcodemodel/clangprojectsettingspropertiespage.cpp b/src/plugins/clangcodemodel/clangprojectsettingspropertiespage.cpp index 612372f8115..40df18a8432 100644 --- a/src/plugins/clangcodemodel/clangprojectsettingspropertiespage.cpp +++ b/src/plugins/clangcodemodel/clangprojectsettingspropertiespage.cpp @@ -48,8 +48,7 @@ QString ClangProjectSettingsPanelFactory::id() const QString ClangProjectSettingsPanelFactory::displayName() const { - return QCoreApplication::translate("ClangProjectSettingsPropertiesPage", - "Clang Settings"); + return ClangProjectSettingsWidget::tr("Clang Settings"); } int ClangProjectSettingsPanelFactory::priority() const @@ -67,9 +66,7 @@ bool ClangProjectSettingsPanelFactory::supports(Project *project) PropertiesPanel *ClangProjectSettingsPanelFactory::createPanel(Project *project) { PropertiesPanel *panel = new PropertiesPanel; - panel->setDisplayName(QCoreApplication::translate( - "ClangProjectSettingsPropertiesPage", - "Clang Settings")); + panel->setDisplayName(ClangProjectSettingsWidget::tr("Clang Settings")); panel->setWidget(new ClangProjectSettingsWidget(project)); return panel; } diff --git a/src/plugins/clangcodemodel/completionproposalsbuilder.cpp b/src/plugins/clangcodemodel/completionproposalsbuilder.cpp index e2f8d3e0eaa..ac388f03272 100644 --- a/src/plugins/clangcodemodel/completionproposalsbuilder.cpp +++ b/src/plugins/clangcodemodel/completionproposalsbuilder.cpp @@ -96,7 +96,8 @@ void CompletionProposalsBuilder::operator ()(const CXCompletionResult &cxResult) if (m_resultAvailability == CodeCompletionResult::Deprecated) { m_comment += QLatin1String("@note "); - m_comment += QCoreApplication::translate("deprecated C++ symbol", "Is deprecated"); + //: deprecated C++ symbol + m_comment += tr("Is deprecated"); } m_hint = QLatin1String("

"); @@ -675,9 +676,9 @@ void CompletionProposalsBuilder::concatSlotSignalSignature(const CXCompletionStr const QString parent = Internal::getQString(clang_getCompletionParent(cxString, NULL)); if (m_resultKind == CodeCompletionResult::SlotCompletionKind) - m_hint += QObject::tr("Slot of %1, returns %2").arg(parent).arg(resultType); + m_hint += tr("Slot of %1, returns %2").arg(parent, resultType); else - m_hint += QObject::tr("Signal of %1, returns %2").arg(parent).arg(resultType); + m_hint += tr("Signal of %1, returns %2").arg(parent, resultType); } /** diff --git a/src/plugins/clangcodemodel/completionproposalsbuilder.h b/src/plugins/clangcodemodel/completionproposalsbuilder.h index 5526446e2cb..c55a8a5a3cc 100644 --- a/src/plugins/clangcodemodel/completionproposalsbuilder.h +++ b/src/plugins/clangcodemodel/completionproposalsbuilder.h @@ -34,10 +34,14 @@ #include "clang_global.h" #include +#include + namespace ClangCodeModel { class CLANG_EXPORT CompletionProposalsBuilder { + Q_DECLARE_TR_FUNCTIONS(ClangCodeModel::CompletionProposalsBuilder) + public: CompletionProposalsBuilder(QList &results, quint64 contexts, bool isSignalSlotCompletion); void operator ()(const CXCompletionResult &cxResult); diff --git a/src/plugins/clangcodemodel/diagnostic.cpp b/src/plugins/clangcodemodel/diagnostic.cpp index 07db56a8624..f876c6ae16b 100644 --- a/src/plugins/clangcodemodel/diagnostic.cpp +++ b/src/plugins/clangcodemodel/diagnostic.cpp @@ -52,11 +52,11 @@ const QString Diagnostic::severityAsString() const return QString(); static QStringList strs = QStringList() - << QCoreApplication::translate("Diagnostic", "ignored") - << QCoreApplication::translate("Diagnostic", "note") - << QCoreApplication::translate("Diagnostic", "warning") - << QCoreApplication::translate("Diagnostic", "error") - << QCoreApplication::translate("Diagnostic", "fatal") + << QCoreApplication::translate("ClangCodeModel::Diagnostic", "ignored") + << QCoreApplication::translate("ClangCodeModel::Diagnostic", "note") + << QCoreApplication::translate("ClangCodeModel::Diagnostic", "warning") + << QCoreApplication::translate("ClangCodeModel::Diagnostic", "error") + << QCoreApplication::translate("ClangCodeModel::Diagnostic", "fatal") ; return strs.at(m_severity); diff --git a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp index 78b50547f1f..b7c58544c96 100644 --- a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp +++ b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp @@ -232,7 +232,8 @@ void ReadOnlyFilesDialog::promptFailWarning(const QStringList &files, ReadOnlyRe } else { title = tr("Could Not Change Permissions on Some Files"); message = d->failWarning; - message += tr("\nSee details for a complete list of files."); + message += QLatin1Char('\n'); + message += tr("See details for a complete list of files."); details = files.join(QLatin1String("\n")); } QMessageBox msgBox(QMessageBox::Warning, title, message); diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 4c383e9bdf2..04e97171468 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -349,7 +349,6 @@ void MainWindow::extensionsInitialized() updateContext(); emit m_coreImpl->coreAboutToOpen(); - show(); // Delay restoreWindowState, since it is overridden by LayoutRequest event QTimer::singleShot(0, this, SLOT(restoreWindowState())); QTimer::singleShot(0, m_coreImpl, SIGNAL(coreOpened())); @@ -1270,4 +1269,5 @@ void MainWindow::restoreWindowState() resize(1008, 700); // size without window decoration restoreState(m_settings->value(QLatin1String(windowStateKey)).toByteArray()); m_settings->endGroup(); + show(); } diff --git a/src/plugins/cpaster/frontend/frontend.qbs b/src/plugins/cpaster/frontend/frontend.qbs index ba7d8a378be..e425a88560c 100644 --- a/src/plugins/cpaster/frontend/frontend.qbs +++ b/src/plugins/cpaster/frontend/frontend.qbs @@ -12,9 +12,9 @@ QtcTool { Depends { name: "CppTools" } cpp.rpaths: [ - "$ORIGIN/../lib/qtcreator", - "$ORIGIN/../lib/qtcreator/plugins", - "$ORIGIN/../lib/qtcreator/plugins/QtProject" + "$ORIGIN/../" + project.libDirName + "/qtcreator", + "$ORIGIN/../" + project.libDirName + "/qtcreator/plugins", + "$ORIGIN/../" + project.libDirName + "/qtcreator/plugins/QtProject" ] Group { diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp index 33dcc285324..fe1bfb89d55 100644 --- a/src/plugins/cppeditor/cpphighlighter.cpp +++ b/src/plugins/cppeditor/cpphighlighter.cpp @@ -224,10 +224,13 @@ void CppHighlighter::highlightBlock(const QString &text) if (text.length() > lastTokenEnd) highlightLine(text, lastTokenEnd, text.length() - lastTokenEnd, formatForCategory(CppVisualWhitespace)); - if (!initialLexerState && lexerState && !tokens.isEmpty() && tokens.last().isComment()) { - parentheses.append(Parenthesis(Parenthesis::Opened, QLatin1Char('+'), - tokens.last().begin())); - ++braceDepth; + if (!initialLexerState && lexerState && !tokens.isEmpty()) { + const Token &lastToken = tokens.last(); + if (lastToken.is(T_COMMENT) || lastToken.is(T_DOXY_COMMENT)) { + parentheses.append(Parenthesis(Parenthesis::Opened, QLatin1Char('+'), + lastToken.begin())); + ++braceDepth; + } } BaseTextDocumentLayout::setParentheses(currentBlock(), parentheses); diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 7c0283032ac..190610e0d5f 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -1804,7 +1804,7 @@ void DebuggerEngine::checkForReleaseBuild(const DebuggerStartParameters &sp) foreach (const QByteArray &name, interesting) { const QString found = seen.contains(name) ? tr("Found.") : tr("Not found."); - detailedWarning.append(tr("\nSection %1: %2").arg(_(name)).arg(found)); + detailedWarning.append(QLatin1Char('\n') + tr("Section %1: %2").arg(_(name)).arg(found)); } break; } diff --git a/src/plugins/debugger/gdb/termgdbadapter.cpp b/src/plugins/debugger/gdb/termgdbadapter.cpp index 9251be8f7c4..eed0681d570 100644 --- a/src/plugins/debugger/gdb/termgdbadapter.cpp +++ b/src/plugins/debugger/gdb/termgdbadapter.cpp @@ -41,6 +41,8 @@ #include +using namespace Utils; + namespace Debugger { namespace Internal { @@ -120,12 +122,11 @@ void GdbTermEngine::setupInferior() { QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); const qint64 attachedPID = m_stubProc.applicationPID(); -#ifdef Q_OS_WIN const qint64 attachedMainThreadID = m_stubProc.applicationMainThreadID(); - showMessage(QString::fromLatin1("Attaching to %1 (%2)").arg(attachedPID).arg(attachedMainThreadID), LogMisc); -#else - showMessage(QString::fromLatin1("Attaching to %1").arg(attachedPID), LogMisc); -#endif + const QString msg = (attachedMainThreadID != -1) + ? QString::fromLatin1("Attaching to %1 (%2)").arg(attachedPID).arg(attachedMainThreadID) + : QString::fromLatin1("Attaching to %1").arg(attachedPID); + showMessage(msg, LogMisc); notifyInferiorPid(attachedPID); postCommand("attach " + QByteArray::number(attachedPID), CB(handleStubAttached)); @@ -143,11 +144,7 @@ void GdbTermEngine::handleStubAttached(const GdbResponse &response) } else { QString errorMessage; // Resume thread that was suspended by console stub process (see stub code). -#ifdef Q_OS_WIN const qint64 mainThreadId = m_stubProc.applicationMainThreadID(); -#else - const qint64 mainThreadId = -1; -#endif if (winResumeThread(mainThreadId, &errorMessage)) { showMessage(QString::fromLatin1("Inferior attached, thread %1 resumed"). arg(mainThreadId), LogMisc); diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 70d707813d4..507a11dbb4f 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2876,8 +2876,8 @@ QString GitClient::extendedShowDescription(const QString &workingDirectory, cons // If there are more than 20 branches, list first 10 followed by a hint if (branchCount > 20) { const int leave = 10; - //: Displayed after the untranslated message "Branches: branch1, branch2 'and %1 more'" in git show. - moreBranches = QLatin1Char(' ') + tr("and %1 more", 0, branchCount - leave); + //: Displayed after the untranslated message "Branches: branch1, branch2 'and %n more'" in git show. + moreBranches = QLatin1Char(' ') + tr("and %n more", 0, branchCount - leave); branches.erase(branches.begin() + leave, branches.end()); } if (!branches.isEmpty()) { diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 724baef15ec..7001cfe1598 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -868,9 +868,12 @@ void HelpPlugin::activateContext() links = HelpManager::linksForIdentifier(m_idFromContext); if (links.isEmpty()) { // Maybe this is already an URL... - QUrl url(m_idFromContext); - if (url.isValid()) - links.insert(m_idFromContext, m_idFromContext); + // Require protocol specifier, otherwise most strings would be 'local file names' + if (m_idFromContext.contains(QLatin1Char(':'))) { + QUrl url(m_idFromContext); + if (url.isValid()) + links.insert(m_idFromContext, m_idFromContext); + } } } diff --git a/src/plugins/ios/Ios.pluginspec.in b/src/plugins/ios/Ios.pluginspec.in index 835bc1d08c0..80f1c6d798f 100644 --- a/src/plugins/ios/Ios.pluginspec.in +++ b/src/plugins/ios/Ios.pluginspec.in @@ -1,4 +1,4 @@ - + Digia Plc (C) 2014 Digia Plc Mac OS.* diff --git a/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp b/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp index 134c61b93bd..34c160c386b 100644 --- a/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp +++ b/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp @@ -170,7 +170,8 @@ void DeviceUsedPortsGatherer::handleProcessClosed(int exitStatus) if (!errMsg.isEmpty()) { if (!d->remoteStderr.isEmpty()) { - errMsg += tr("\nRemote error output was: %1") + errMsg += QLatin1Char('\n'); + errMsg += tr("Remote error output was: %1") .arg(QString::fromUtf8(d->remoteStderr)); } emit error(errMsg); diff --git a/src/plugins/projectexplorer/devicesupport/sshdeviceprocesslist.cpp b/src/plugins/projectexplorer/devicesupport/sshdeviceprocesslist.cpp index 6d878c15e2f..81ede1d17be 100644 --- a/src/plugins/projectexplorer/devicesupport/sshdeviceprocesslist.cpp +++ b/src/plugins/projectexplorer/devicesupport/sshdeviceprocesslist.cpp @@ -118,7 +118,7 @@ void SshDeviceProcessList::handleProcessError(const QString &errorMessage) QString fullMessage = errorMessage; const QByteArray remoteStderr = d->process.readAllStandardError(); if (!remoteStderr.isEmpty()) - fullMessage += tr("\nRemote stderr was: %1").arg(QString::fromUtf8(remoteStderr)); + fullMessage += QLatin1Char('\n') + tr("Remote stderr was: %1").arg(QString::fromUtf8(remoteStderr)); reportError(fullMessage); } diff --git a/src/plugins/projectexplorer/gnumakeparser.cpp b/src/plugins/projectexplorer/gnumakeparser.cpp index 9fc970ee35d..115a8e296da 100644 --- a/src/plugins/projectexplorer/gnumakeparser.cpp +++ b/src/plugins/projectexplorer/gnumakeparser.cpp @@ -41,7 +41,8 @@ using namespace ProjectExplorer; namespace { // optional full path, make executable name, optional exe extension, optional number in square brackets, colon space - const char * const MAKE_PATTERN("^(([A-Za-z]:)?[/\\\\][^:]*[/\\\\])?(mingw(32|64)-|g)?make(.exe)?(\\[\\d+\\])?:\\s"); + const char * const MAKEEXEC_PATTERN("^(.*[/\\\\])?(mingw(32|64)-|g)?make(.exe)?(\\[\\d+\\])?:\\s"); + const char * const MAKEFILE_PATTERN("^((.*[/\\\\])?[Mm]akefile(\\.[a-zA-Z]+)?):(\\d+):\\s"); } GnuMakeParser::GnuMakeParser() : @@ -49,16 +50,16 @@ GnuMakeParser::GnuMakeParser() : m_fatalErrorCount(0) { setObjectName(QLatin1String("GnuMakeParser")); - m_makeDir.setPattern(QLatin1String(MAKE_PATTERN) + + m_makeDir.setPattern(QLatin1String(MAKEEXEC_PATTERN) + QLatin1String("(\\w+) directory .(.+).$")); m_makeDir.setMinimal(true); QTC_CHECK(m_makeDir.isValid()); - m_makeLine.setPattern(QLatin1String(MAKE_PATTERN) + QLatin1String("(\\*\\*\\*\\s)?(.*)$")); + m_makeLine.setPattern(QLatin1String(MAKEEXEC_PATTERN) + QLatin1String("(.*)$")); m_makeLine.setMinimal(true); QTC_CHECK(m_makeLine.isValid()); - m_makefileError.setPattern(QLatin1String("^(.*):(\\d+):\\s\\*\\*\\*\\s(.*)$")); - m_makefileError.setMinimal(true); - QTC_CHECK(m_makefileError.isValid()); + m_errorInMakefile.setPattern(QLatin1String(MAKEFILE_PATTERN) + QLatin1String("(.*)$")); + m_errorInMakefile.setMinimal(true); + QTC_CHECK(m_errorInMakefile.isValid()); } void GnuMakeParser::setWorkingDirectory(const QString &workingDirectory) @@ -77,48 +78,68 @@ void GnuMakeParser::stdOutput(const QString &line) const QString lne = rightTrimmed(line); if (m_makeDir.indexIn(lne) > -1) { - if (m_makeDir.cap(7) == QLatin1String("Leaving")) - removeDirectory(m_makeDir.cap(8)); + if (m_makeDir.cap(6) == QLatin1String("Leaving")) + removeDirectory(m_makeDir.cap(7)); else - addDirectory(m_makeDir.cap(8)); + addDirectory(m_makeDir.cap(7)); return; } IOutputParser::stdOutput(line); } +class Result { +public: + Result() : isFatal(false), type(Task::Error) { } + + QString description; + bool isFatal; + Task::TaskType type; +}; + +static Result parseDescription(const QString &description) +{ + Result result; + if (description.startsWith(QLatin1String("warning: "), Qt::CaseInsensitive)) { + result.description = description.mid(9); + result.type = Task::Warning; + result.isFatal = false; + } else if (description.startsWith(QLatin1String("*** "))) { + result.description = description.mid(4); + result.type = Task::Error; + result.isFatal = true; + } else { + result.description = description; + result.type = Task::Error; + result.isFatal = false; + } + return result; +} + void GnuMakeParser::stdError(const QString &line) { const QString lne = rightTrimmed(line); - if (m_makefileError.indexIn(lne) > -1) { - ++m_fatalErrorCount; + if (m_errorInMakefile.indexIn(lne) > -1) { + Result res = parseDescription(m_errorInMakefile.cap(5)); + if (res.isFatal) + ++m_fatalErrorCount; if (!m_suppressIssues) { - m_suppressIssues = true; - emit addTask(Task(Task::Error, - m_makefileError.cap(3), - Utils::FileName::fromUserInput(m_makefileError.cap(1)), - m_makefileError.cap(2).toInt(), - Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))); + taskAdded(Task(res.type, res.description, + Utils::FileName::fromUserInput(m_errorInMakefile.cap(1)) /* filename */, + m_errorInMakefile.cap(4).toInt(), /* line */ + Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))); } return; } if (m_makeLine.indexIn(lne) > -1) { - if (!m_makeLine.cap(7).isEmpty()) + Result res = parseDescription(m_makeLine.cap(6)); + if (res.isFatal) ++m_fatalErrorCount; if (!m_suppressIssues) { - m_suppressIssues = true; - QString description = m_makeLine.cap(8); - Task::TaskType type = Task::Error; - if (description.startsWith(QLatin1String("warning: "), Qt::CaseInsensitive)) { - description = description.mid(9); - type = Task::Warning; - } - - emit addTask(Task(type, description, - Utils::FileName() /* filename */, - -1, /* line */ - Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))); + taskAdded(Task(res.type, res.description, + Utils::FileName() /* filename */, -1, /* line */ + Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))); } return; } @@ -368,6 +389,18 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))) << QString() << QStringList(); + QTest::newRow("warning in Makefile") + << QStringList() + << QString::fromLatin1("Makefile:794: warning: overriding commands for target `xxxx.app/Contents/Info.plist'") + << OutputParserTester::STDERR + << QString() << QString() + << (QList() + << Task(Task::Warning, + QString::fromLatin1("overriding commands for target `xxxx.app/Contents/Info.plist'"), + Utils::FileName::fromString(QLatin1String("Makefile")), 794, + Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))) + << QString() + << QStringList(); } void ProjectExplorerPlugin::testGnuMakeParserParsing() diff --git a/src/plugins/projectexplorer/gnumakeparser.h b/src/plugins/projectexplorer/gnumakeparser.h index 7719a8118c0..99ddc781522 100644 --- a/src/plugins/projectexplorer/gnumakeparser.h +++ b/src/plugins/projectexplorer/gnumakeparser.h @@ -62,7 +62,8 @@ private: QRegExp m_makeDir; QRegExp m_makeLine; - QRegExp m_makefileError; + QRegExp m_threeStarError; + QRegExp m_errorInMakefile; QStringList m_directories; diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 3aa1d4e5ceb..4f57ad3850a 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -230,7 +230,7 @@ struct ProjectExplorerPluginPrivate { Internal::AppOutputPane *m_outputPane; QList > m_recentProjects; // pair of filename, displayname - static const int m_maxRecentProjects = 7; + static const int m_maxRecentProjects = 25; QString m_lastOpenDirectory; RunConfiguration *m_delayedRunConfiguration; @@ -2938,7 +2938,9 @@ void ProjectExplorerPlugin::removeFile() return; } + DocumentManager::expectFileChange(filePath); Core::FileUtils::removeFile(filePath, deleteFile); + DocumentManager::unexpectFileChange(filePath); } } diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp index 1427d84ca85..6ab2786edba 100644 --- a/src/plugins/projectexplorer/projectmodels.cpp +++ b/src/plugins/projectexplorer/projectmodels.cpp @@ -136,13 +136,17 @@ bool sortNodes(Node *n1, Node *n2) // must be file nodes { + int result = caseFriendlyCompare(n1->displayName(), n2->displayName()); + if (result != 0) + return result < 0; + const QString filePath1 = n1->path(); const QString filePath2 = n2->path(); const QString fileName1 = QFileInfo(filePath1).fileName(); const QString fileName2 = QFileInfo(filePath2).fileName(); - int result = caseFriendlyCompare(fileName1, fileName2); + result = caseFriendlyCompare(fileName1, fileName2); if (result != 0) { return result < 0; // sort by filename } else { diff --git a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp index 678e4f15f04..9846a4e0563 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp @@ -36,6 +36,7 @@ #include "ui_qbsbuildstepconfigwidget.h" +#include #include #include #include @@ -234,16 +235,26 @@ QVariantMap QbsBuildStep::toMap() const void QbsBuildStep::buildingDone(bool success) { + m_lastWasSuccess = success; // Report errors: foreach (const qbs::ErrorItem &item, m_job->error().items()) createTaskAndOutput(ProjectExplorer::Task::Error, item.description(), item.codeLocation().fileName(), item.codeLocation().line()); - // Building can uncover additional target artifacts. - static_cast(project())->parseCurrentBuildConfiguration(true); + QbsProject *pro = static_cast(project()); + connect(pro, SIGNAL(projectParsingDone(bool)), this, SLOT(reparsingDone())); + // Building can uncover additional target artifacts. + // Wait for reparsing to finish, since before that our run configurations may not be valid. + pro->parseCurrentBuildConfiguration(true); +} + +void QbsBuildStep::reparsingDone() +{ + disconnect(static_cast(project()), SIGNAL(projectParsingDone(bool)), + this, SLOT(reparsingDone())); QTC_ASSERT(m_fi, return); - m_fi->reportResult(success); + m_fi->reportResult(m_lastWasSuccess); m_fi = 0; // do not delete, it is not ours m_job->deleteLater(); m_job = 0; @@ -421,6 +432,8 @@ void QbsBuildStepConfigWidget::updateState() m_ui->buildVariantComboBox->setCurrentIndex(idx); QString command = QLatin1String("qbs build "); + command += QString::fromLatin1("--settings-dir ") + + QDir::toNativeSeparators(Core::ICore::userResourcePath()) + QLatin1String(" "); if (m_step->dryRun()) command += QLatin1String("--dry-run "); if (m_step->keepGoing()) diff --git a/src/plugins/qbsprojectmanager/qbsbuildstep.h b/src/plugins/qbsprojectmanager/qbsbuildstep.h index 3b6ceb77c21..9c576b7a460 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildstep.h +++ b/src/plugins/qbsprojectmanager/qbsbuildstep.h @@ -80,6 +80,7 @@ signals: private slots: void buildingDone(bool success); + void reparsingDone(); void handleTaskStarted(const QString &desciption, int max); void handleProgress(int value); void handleCommandDescriptionReport(const QString &highlight, const QString &message); @@ -108,6 +109,7 @@ private: QFutureInterface *m_fi; qbs::BuildJob *m_job; int m_progressBase; + bool m_lastWasSuccess; ProjectExplorer::IOutputParser *m_parser; friend class QbsBuildStepConfigWidget; diff --git a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp index 738a2a6812c..6fa1ec0258c 100644 --- a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp +++ b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp @@ -35,6 +35,7 @@ #include "ui_qbsinstallstepconfigwidget.h" +#include #include #include #include @@ -312,6 +313,8 @@ void QbsInstallStepConfigWidget::updateState() m_ui->installRootChooser->setBaseDirectory(data.buildDirectory()); QString command = QLatin1String("qbs install "); + command += QString::fromLatin1("--settings-dir ") + + QDir::toNativeSeparators(Core::ICore::userResourcePath()) + QLatin1String(" "); if (m_step->dryRun()) command += QLatin1String("--dry-run "); if (m_step->keepGoing()) diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index f1b43da8ac7..b264cd2f6c2 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -362,6 +362,12 @@ void QbsProject::buildConfigurationChanged(BuildConfiguration *bc) void QbsProject::startParsing() { + // Qbs does update the build graph during the build. So we cannot + // start to parse while a build is running or we will lose information. + // Just return since the qbsbuildstep will trigger a reparse after the build. + if (ProjectExplorer::BuildManager::isBuilding(this)) + return; + parseCurrentBuildConfiguration(false); } @@ -383,12 +389,6 @@ void QbsProject::parseCurrentBuildConfiguration(bool force) if (!m_forceParsing) m_forceParsing = force; - // Qbs does update the build graph during the build. So we cannot - // start to parse while a build is running or we will lose information. - // Just return since the qbsbuildstep will trigger a reparse after the build. - if (ProjectExplorer::BuildManager::isBuilding(this)) - return; - if (!activeTarget()) return; QbsBuildConfiguration *bc = qobject_cast(activeTarget()->activeBuildConfiguration()); @@ -727,7 +727,7 @@ QString QbsProject::pluginsBaseDirectory() const if (!qbsInstallDir.isEmpty()) return qbsInstallDir + QLatin1String("/lib/"); return QDir::cleanPath(QCoreApplication::applicationDirPath() - + QLatin1String("/../lib/qtcreator")); + + QLatin1String("/../" IDE_LIBRARY_BASENAME "/qtcreator")); } } // namespace Internal diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp index b8b7aa2f622..f91fc35e808 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp @@ -476,8 +476,14 @@ void QbsProjectManagerPlugin::buildProducts(QbsProject *project, const QStringLi void QbsProjectManagerPlugin::reparseCurrentProject() { - if (m_currentProject) - m_currentProject->parseCurrentBuildConfiguration(true); + if (!m_currentProject || BuildManager::isBuilding(m_currentProject)) { + // Qbs does update the build graph during the build. So we cannot + // start to parse while a build is running or we will lose information. + // Just return since the qbsbuildstep will trigger a reparse after the build. + return; + } + + m_currentProject->parseCurrentBuildConfiguration(true); } } // namespace Internal diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp index 8d6a4f0fa5c..1f069995e31 100644 --- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp +++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp @@ -141,6 +141,9 @@ void QbsRunConfiguration::ctor() connect(target(), SIGNAL(activeDeployConfigurationChanged(ProjectExplorer::DeployConfiguration*)), this, SLOT(installStepChanged())); installStepChanged(); + + if (isConsoleApplication()) + m_runMode = Console; } QWidget *QbsRunConfiguration::createConfigurationWidget() @@ -206,13 +209,10 @@ QString QbsRunConfiguration::executable() const ProjectExplorer::LocalApplicationRunConfiguration::RunMode QbsRunConfiguration::runMode() const { - if (forcedGuiMode()) - return LocalApplicationRunConfiguration::Gui; - return m_runMode; } -bool QbsRunConfiguration::forcedGuiMode() const +bool QbsRunConfiguration::isConsoleApplication() const { QbsProject *pro = static_cast(target()->project()); const qbs::ProductData product = findProduct(pro->qbsProjectData(), m_qbsProduct); @@ -358,6 +358,7 @@ QbsRunConfigurationWidget::QbsRunConfigurationWidget(QbsRunConfiguration *rc, QW m_executableLineEdit = new QLineEdit(this); m_executableLineEdit->setEnabled(false); + m_executableLineEdit->setPlaceholderText(tr("")); toplayout->addRow(tr("Executable:"), m_executableLineEdit); QLabel *argumentsLabel = new QLabel(tr("Arguments:"), this); @@ -388,8 +389,6 @@ QbsRunConfigurationWidget::QbsRunConfigurationWidget(QbsRunConfiguration *rc, QW QHBoxLayout *innerBox = new QHBoxLayout(); m_useTerminalCheck = new QCheckBox(tr("Run in terminal"), this); - m_useTerminalCheck->setChecked(m_rc->runMode() == ProjectExplorer::LocalApplicationRunConfiguration::Console); - m_useTerminalCheck->setVisible(!m_rc->forcedGuiMode()); innerBox->addWidget(m_useTerminalCheck); innerBox->addStretch(); @@ -436,6 +435,8 @@ void QbsRunConfigurationWidget::runConfigurationEnabledChange() m_disabledIcon->setVisible(!enabled); m_disabledReason->setVisible(!enabled); m_disabledReason->setText(m_rc->disabledReason()); + + m_useTerminalCheck->setChecked(m_rc->runMode() == ProjectExplorer::LocalApplicationRunConfiguration::Console); targetInformationHasChanged(); } @@ -495,10 +496,8 @@ void QbsRunConfigurationWidget::commandLineArgumentsChanged(const QString &args) void QbsRunConfigurationWidget::runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode runMode) { - if (!m_ignoreChange) { - m_useTerminalCheck->setVisible(!m_rc->forcedGuiMode()); + if (!m_ignoreChange) m_useTerminalCheck->setChecked(runMode == ProjectExplorer::LocalApplicationRunConfiguration::Console); - } } // -------------------------------------------------------------------- @@ -564,10 +563,11 @@ QList QbsRunConfigurationFactory::availableCreationIds(ProjectExplorer if (!project || !project->qbsProject().isValid()) return result; - 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()); - } + // Create one RC per product. There is no information on what those products actually + // are or whether they are going to get installed before a project is built. + foreach (const qbs::ProductData &product, project->qbsProjectData().allProducts()) + result << Core::Id::fromString(QString::fromLatin1(QBS_RC_PREFIX) + product.name()); + return result; } diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.h b/src/plugins/qbsprojectmanager/qbsrunconfiguration.h index 44104a041ba..3e505d380e8 100644 --- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.h +++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.h @@ -78,7 +78,6 @@ public: QString executable() const; RunMode runMode() const; - bool forcedGuiMode() const; QString workingDirectory() const; QString commandLineArguments() const; @@ -91,6 +90,7 @@ public: void addToBaseEnvironment(Utils::Environment &env) const; QString qbsProduct() const; + bool isConsoleApplication() const; signals: void commandLineArgumentsChanged(const QString&); diff --git a/src/plugins/qmldesigner/qmldesigner_dependencies.pri b/src/plugins/qmldesigner/qmldesigner_dependencies.pri index 7dac1977a0d..f8357252343 100644 --- a/src/plugins/qmldesigner/qmldesigner_dependencies.pri +++ b/src/plugins/qmldesigner/qmldesigner_dependencies.pri @@ -12,6 +12,7 @@ QTC_PLUGIN_DEPENDS += \ INCLUDEPATH *= \ $$PWD \ $$PWD/../../../share/qtcreator/qml/qmlpuppet/interfaces \ + $$PWD/../../../share/qtcreator/qml/qmlpuppet/types \ $$PWD/designercore \ $$PWD/designercore/include \ $$PWD/components/componentcore \ diff --git a/src/plugins/qmljseditor/quicktoolbar.cpp b/src/plugins/qmljseditor/quicktoolbar.cpp index 115e091a643..412d133616a 100644 --- a/src/plugins/qmljseditor/quicktoolbar.cpp +++ b/src/plugins/qmljseditor/quicktoolbar.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -327,24 +327,7 @@ void QuickToolBar::setProperty(const QString &propertyName, const QVariant &valu m_editor->convertPosition(changeSetPos, &line, &column); //get line m_editor->convertPosition(changeSetPos + changeSetLength, &endLine, &column); //get line - if (line > 0) { - TextEditor::TabSettings ts = m_editor->baseTextDocument()->tabSettings(); - QmlJSIndenter indenter; - indenter.setTabSize(ts.m_tabSize); - indenter.setIndentSize(ts.m_indentSize); - - for (int i=line;i<=endLine;i++) { - QTextBlock start = m_editor->baseTextDocument()->document()->findBlockByNumber(i); - QTextBlock end = m_editor->baseTextDocument()->document()->findBlockByNumber(i); - - if (end.isValid()) { - const int indent = indenter.indentForBottomLine(m_editor->baseTextDocument() - ->document()->begin(), - end.next(), QChar::Null); - ts.indentLine(start, indent); - } - } - } + indentLines(line, endLine); tc.endEditBlock(); } } @@ -439,6 +422,21 @@ void QuickToolBar::onEnabledChanged(bool b) settings.set(); } +void QuickToolBar::indentLines(int startLine, int endLine) +{ + if (startLine > 0) { + TextEditor::TabSettings tabSettings = m_editor->baseTextDocument()->tabSettings(); + for (int i = startLine; i <= endLine; i++) { + QTextBlock start = m_editor->editorWidget()->document()->findBlockByNumber(i); + + if (start.isValid()) { + QmlJSEditor::Internal::Indenter indenterMy; + indenterMy.indentBlock(m_editor->editorWidget()->document(), start, QChar::Null, tabSettings); + } + } + } +} + ContextPaneWidget* QuickToolBar::contextWidget() { if (m_widget.isNull()) { //lazily recreate widget diff --git a/src/plugins/qmljseditor/quicktoolbar.h b/src/plugins/qmljseditor/quicktoolbar.h index 37a4f407ffe..46e10abb815 100644 --- a/src/plugins/qmljseditor/quicktoolbar.h +++ b/src/plugins/qmljseditor/quicktoolbar.h @@ -62,6 +62,8 @@ public slots: void onEnabledChanged(bool); private: + void indentLines(int startLine, int endLine); + QmlEditorWidgets::ContextPaneWidget* contextWidget(); QPointer m_widget; QmlJS::Document::Ptr m_doc; diff --git a/src/plugins/qnx/blackberrycheckdevicestatusstep.cpp b/src/plugins/qnx/blackberrycheckdevicestatusstep.cpp index 7aafad078ea..e9aaed4fd39 100644 --- a/src/plugins/qnx/blackberrycheckdevicestatusstep.cpp +++ b/src/plugins/qnx/blackberrycheckdevicestatusstep.cpp @@ -146,8 +146,8 @@ void BlackBerryCheckDeviceStatusStep::checkDeviceInfo(int status) } bool ok = true; - if (deviceRuntimeVersion.toString() != apiLevelVersion.toString()) { - raiseError(tr("The device runtime version (%1) does not match API level version (%2)") + if (apiLevelVersion > deviceRuntimeVersion) { + raiseError(tr("The device runtime version (%1) is inferior to the API level version (%2)") .arg(deviceRuntimeVersion.toString(), apiLevelVersion.toString())); QMetaObject::invokeMethod(this, "handleVersionMismatch", Qt::BlockingQueuedConnection, diff --git a/src/plugins/qnx/blackberryinstallwizardoptionpage.ui b/src/plugins/qnx/blackberryinstallwizardoptionpage.ui index 83e0aae8146..9d00d76c2b5 100644 --- a/src/plugins/qnx/blackberryinstallwizardoptionpage.ui +++ b/src/plugins/qnx/blackberryinstallwizardoptionpage.ui @@ -19,7 +19,7 @@ - Install Api Level + Install API Level diff --git a/src/plugins/qnx/blackberryinstallwizardpages.cpp b/src/plugins/qnx/blackberryinstallwizardpages.cpp index 80f01d009a6..f8c958a4f66 100644 --- a/src/plugins/qnx/blackberryinstallwizardpages.cpp +++ b/src/plugins/qnx/blackberryinstallwizardpages.cpp @@ -398,23 +398,23 @@ BlackBerryInstallWizardProcessPage::~BlackBerryInstallWizardProcessPage() delete m_ui; } -void BlackBerryInstallWizardProcessPage::initializePage() +static QString msgTarget(BlackBerryInstallerDataHandler::Target t) { - QString target; - switch (m_data.installTarget) { + switch (t) { case BlackBerryInstallerDataHandler::ApiLevel: - target = tr("API level version: "); - break; + return BlackBerryInstallWizardProcessPage::tr("API level"); case BlackBerryInstallerDataHandler::Simulator: - target = tr("simulator version: "); - break; + return BlackBerryInstallWizardProcessPage::tr("simulator"); case BlackBerryInstallerDataHandler::Runtime: - target = tr("runtime version: "); - break; + return BlackBerryInstallWizardProcessPage::tr("runtime"); default: break; } + return QString(); +} +void BlackBerryInstallWizardProcessPage::initializePage() +{ if (m_data.mode == BlackBerryInstallerDataHandler::UninstallMode) { if (m_data.version.isEmpty()) { wizard()->next(); @@ -429,9 +429,11 @@ void BlackBerryInstallWizardProcessPage::initializePage() } } - m_ui->label->setText(tr("Uninstalling ") + target + m_data.version); + m_ui->label->setText(tr("Uninstalling %1 version: %2") + .arg(msgTarget(m_data.installTarget), m_data.version)); } else { - m_ui->label->setText(tr("Installing ") + target + m_data.version); + m_ui->label->setText(tr("Installing %1 version: %2") + .arg(msgTarget(m_data.installTarget), m_data.version)); } // m_targetProcess could be running if (m_targetProcess->state() == QProcess::Running) { @@ -542,30 +544,17 @@ void BlackBerryInstallWizardFinalPage::initializePage() } QString message; - QString target; - switch (m_data.installTarget) { - case BlackBerryInstallerDataHandler::ApiLevel: - target = tr("API level version: "); - break; - case BlackBerryInstallerDataHandler::Simulator: - target = tr("simulator version: "); - break; - case BlackBerryInstallerDataHandler::Runtime: - target = tr("runtime version: "); - break; - default: - break; - } + const QString target = msgTarget(m_data.installTarget); if (m_data.exitCode == 0 && m_data.exitStatus == QProcess::NormalExit) { message = m_data.mode == BlackBerryInstallerDataHandler::UninstallMode ? - tr("Finished uninstalling %1:\n %2").arg(target, m_data.version) : - tr("Finished installing %1:\n %2").arg(target, m_data.version); + tr("Finished uninstalling %1 version:\n %2").arg(target, m_data.version) : + tr("Finished installing %1 version:\n %2").arg(target, m_data.version); emit done(); } else { message = m_data.mode == BlackBerryInstallerDataHandler::UninstallMode ? - tr("An error has occurred while uninstalling %1:\n %2").arg(target, m_data.version) : - tr("An error has occurred while installing %1:\n %2").arg(target, m_data.version); + tr("An error has occurred while uninstalling %1 version:\n %2").arg(target, m_data.version) : + tr("An error has occurred while installing %1 version:\n %2").arg(target, m_data.version); } label->setText(message); } diff --git a/src/plugins/qnx/blackberrykeyswidget.cpp b/src/plugins/qnx/blackberrykeyswidget.cpp index df5bb25cc34..b3d194bb1c6 100644 --- a/src/plugins/qnx/blackberrykeyswidget.cpp +++ b/src/plugins/qnx/blackberrykeyswidget.cpp @@ -338,7 +338,7 @@ void BlackBerryKeysWidget::requestFinished(int status) default: m_utils.clearCertificatePassword(); m_utils.clearCskPassword(); - errorString += tr("An unknwon error has occurred."); + errorString += tr("An unknown error has occurred."); break; } diff --git a/src/plugins/qnx/blackberryndksettingswidget.cpp b/src/plugins/qnx/blackberryndksettingswidget.cpp index dc0c9104b5b..b804a0ecb07 100644 --- a/src/plugins/qnx/blackberryndksettingswidget.cpp +++ b/src/plugins/qnx/blackberryndksettingswidget.cpp @@ -73,7 +73,7 @@ BlackBerryNDKSettingsWidget::BlackBerryNDKSettingsWidget(QWidget *parent) : m_ui->ndksTreeWidget->setColumnCount(1); m_apiLevels = new QTreeWidgetItem(m_ui->ndksTreeWidget); - m_apiLevels->setText(0, tr("Api Levels")); + m_apiLevels->setText(0, tr("API Levels")); m_runtimes = new QTreeWidgetItem(m_ui->ndksTreeWidget); m_runtimes->setText(0, tr("Runtimes")); @@ -181,7 +181,7 @@ void BlackBerryNDKSettingsWidget::updateConfigurationList() item->setIcon(0, config->isValid() ? QIcon() : invalidConfigIcon); // TODO: Do the same if qmake, qcc, debugger are no longer detected... if (!config->isValid()) { - QString toolTip = tr("Invalid target %1: ").arg(config->targetName()); + QString toolTip = tr("Invalid target %1:").arg(config->targetName()); if (config->isAutoDetected() && !config->autoDetectionSource().toFileInfo().exists()) toolTip += QLatin1Char('\n') + tr("- Target no longer installed."); @@ -322,7 +322,7 @@ void BlackBerryNDKSettingsWidget::updateUi(QTreeWidgetItem *item) item->setFont(0, font); m_ui->activateNdkTargetButton->setEnabled(!contains); - m_ui->deactivateNdkTargetButton->setEnabled(contains && m_activatedApiLevel.size() > 1); + m_ui->deactivateNdkTargetButton->setEnabled(contains); // Disable remove button for auto detected pre-10.2 NDKs (uninstall wizard doesn't handle them) m_ui->removeConfigButton->setEnabled(!(config->isAutoDetected() && QnxUtils::sdkInstallerPath(config->ndkPath()).isEmpty())); diff --git a/src/plugins/qnx/blackberryruntimeconfiguration.cpp b/src/plugins/qnx/blackberryruntimeconfiguration.cpp index 9ebce6edd48..00412a288af 100644 --- a/src/plugins/qnx/blackberryruntimeconfiguration.cpp +++ b/src/plugins/qnx/blackberryruntimeconfiguration.cpp @@ -35,6 +35,7 @@ #include #include +#include namespace Qnx { namespace Internal { @@ -54,7 +55,7 @@ BlackBerryRuntimeConfiguration::BlackBerryRuntimeConfiguration( m_version = BlackBerryVersionNumber::fromFileName(QFileInfo(path).baseName(), QRegExp(QLatin1String("^runtime_(.*)$"))); - m_displayName = QObject::tr("Runtime ") + m_version.toString(); + m_displayName = QCoreApplication::translate("Qnx::Internal::BlackBerryRuntimeConfiguration", "Runtime %1").arg(m_version.toString()); } BlackBerryRuntimeConfiguration::BlackBerryRuntimeConfiguration(const QVariantMap &data) diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp index 7c2d9064281..d5865a75c12 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp +++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp @@ -314,10 +314,11 @@ void AbstractRemoteLinuxDeployService::handleConnectionFailure() break; case Connecting: { QString errorMsg = tr("Could not connect to host: %1").arg(d->connection->errorString()); + errorMsg += QLatin1Char('\n'); if (deviceConfiguration()->machineType() == IDevice::Emulator) - errorMsg += tr("\nDid the emulator fail to start?"); + errorMsg += tr("Did the emulator fail to start?"); else - errorMsg += tr("\nIs the device connected and set up for network access?"); + errorMsg += tr("Is the device connected and set up for network access?"); emit errorMessage(errorMsg); setFinished(); break; diff --git a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp index 978a9cfddd8..088b50de34a 100644 --- a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp +++ b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp @@ -101,7 +101,7 @@ void RemoteLinuxEnvironmentReader::remoteProcessFinished() const QString remoteStderr = QString::fromUtf8(m_deviceProcess->readAllStandardError()).trimmed(); if (!remoteStderr.isEmpty()) - errorMessage += tr("\nRemote stderr was: '%1'").arg(remoteStderr); + errorMessage += QLatin1Char('\n') + tr("Remote stderr was: \"%1\"").arg(remoteStderr); emit error(errorMessage); } else { QString remoteOutput = QString::fromUtf8(m_deviceProcess->readAllStandardOutput()); diff --git a/src/plugins/texteditor/codecselector.cpp b/src/plugins/texteditor/codecselector.cpp index 4f195df1e40..577e935b8dd 100644 --- a/src/plugins/texteditor/codecselector.cpp +++ b/src/plugins/texteditor/codecselector.cpp @@ -73,7 +73,7 @@ CodecSelector::CodecSelector(QWidget *parent, BaseTextDocument *doc) m_label = new QLabel(this); QString decodingErrorHint; if (m_hasDecodingError) - decodingErrorHint = tr("\nThe following encodings are likely to fit:"); + decodingErrorHint = QLatin1Char('\n') + tr("The following encodings are likely to fit:"); m_label->setText(tr("Select encoding for \"%1\".%2").arg(QFileInfo(doc->filePath()).fileName()).arg(decodingErrorHint)); m_listWidget = new CodecListWidget(this); diff --git a/src/plugins/texteditor/generichighlighter/manager.cpp b/src/plugins/texteditor/generichighlighter/manager.cpp index 6914788cbeb..9a69ed5bdc0 100644 --- a/src/plugins/texteditor/generichighlighter/manager.cpp +++ b/src/plugins/texteditor/generichighlighter/manager.cpp @@ -467,7 +467,7 @@ void Manager::downloadDefinitionsFinished() else text = tr("Error downloading one or more definitions."); if (writeError) - text.append(tr("\nPlease check the directory's access rights.")); + text.append(QLatin1Char('\n') + tr("Please check the directory's access rights.")); QMessageBox::critical(0, tr("Download Error"), text); } diff --git a/src/plugins/vcsbase/submiteditorwidget.cpp b/src/plugins/vcsbase/submiteditorwidget.cpp index 23c05af0779..10d6a93ce99 100644 --- a/src/plugins/vcsbase/submiteditorwidget.cpp +++ b/src/plugins/vcsbase/submiteditorwidget.cpp @@ -303,6 +303,7 @@ static QString wrappedText(const QTextEdit *e) const QString block = cursor.block().text(); if (block.startsWith(QLatin1Char('\t'))) { // Don't wrap rc += block + newLine; + cursor.movePosition(QTextCursor::EndOfBlock); } else { forever { cursor.select(QTextCursor::LineUnderCursor); diff --git a/src/shared/qbs b/src/shared/qbs index 0816b8e476d..3e746e47415 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 0816b8e476d20e00cbcffd1e71162adf93e85658 +Subproject commit 3e746e4741513dabf60f43efab938d8fc94cd1be diff --git a/src/src.qbs b/src/src.qbs index d7ba55a39a5..bca1658abf6 100644 --- a/src/src.qbs +++ b/src/src.qbs @@ -27,7 +27,7 @@ Project { property path libRPaths: qbs.targetOS.contains("osx") ? ["@loader_path/.."] : ["$ORIGIN/.."] property path resourcesInstallDir: project.ide_data_path + "/qbs" - property string pluginsInstallDir: "lib/qtcreator" + property string pluginsInstallDir: project.libDirName + "/qtcreator" references: [ qbsBaseDir + "/src/lib/libs.qbs", diff --git a/tests/auto/autotest.qbs b/tests/auto/autotest.qbs index 9625b10b295..fb4985a765d 100644 --- a/tests/auto/autotest.qbs +++ b/tests/auto/autotest.qbs @@ -21,7 +21,8 @@ CppApplication { // absolute paths to resources in the build directory. // cpp.rpaths: qbs.targetOS.contains("osx") // ? ["@executable_path/.."] -// : ["$ORIGIN/../lib/qtcreator", "$ORIGIN/../lib/qtcreator/plugins/QtProject"] +// : ["$ORIGIN/../" + project.libDirName + "/qtcreator", +// "$ORIGIN/../" project.libDirName + "/qtcreator/plugins/QtProject"] // Group { // fileTagsFilter: product.type // qbs.install: true diff --git a/tests/auto/extensionsystem/plugin.qbs b/tests/auto/extensionsystem/plugin.qbs index 829ed3a6de9..c6ccbe75669 100644 --- a/tests/auto/extensionsystem/plugin.qbs +++ b/tests/auto/extensionsystem/plugin.qbs @@ -11,8 +11,8 @@ DynamicLibrary { targetName: QtcFunctions.qtLibraryName(qbs, name.split('_')[1]) destinationDirectory: FileInfo.relativePath(project.ide_source_tree, sourceDirectory) cpp.rpaths: [ - buildDirectory + "/lib/qtcreator", - buildDirectory + "/lib/qtcreator/plugins/QtProject" + buildDirectory + "/" + project.libDirName + "/qtcreator", + buildDirectory + "/" + project.libDirName + "/qtcreator/plugins/QtProject" ].concat(additionalRPaths) property pathList filesToCopy property pathList additionalRPaths: [] diff --git a/tests/system/shared/debugger.py b/tests/system/shared/debugger.py index 855fe041645..754ce55fc17 100644 --- a/tests/system/shared/debugger.py +++ b/tests/system/shared/debugger.py @@ -126,10 +126,16 @@ def removeOldBreakpoints(): # param expectedBPOrder holds a list of dicts where the dicts contain always # only 1 key:value pair - the key is the name of the file, the value is # line number where the debugger should stop -def doSimpleDebugging(kitCount, currentKit, currentConfigName, pressContinueCount=1, expectedBPOrder=[]): +def doSimpleDebugging(kitCount, currentKit, currentConfigName, pressContinueCount=1, + expectedBPOrder=[], enableQml=True): expectedLabelTexts = ['Stopped\.', 'Stopped at breakpoint \d+ \(\d+\) in thread \d+\.'] if len(expectedBPOrder) == 0: expectedLabelTexts.append("Running\.") + switchViewTo(ViewConstants.PROJECTS) + switchToBuildOrRunSettingsFor(kitCount, currentKit, ProjectSettings.RUN) + ensureChecked(waitForObject("{container=':Qt Creator.scrollArea_QScrollArea' text='Enable QML' " + "type='QCheckBox' unnamed='1' visible='1'}"), enableQml) + switchViewTo(ViewConstants.EDIT) if not __startDebugger__(kitCount, currentKit, currentConfigName): return False statusLabel = findObject(":Debugger Toolbar.StatusText_Utils::StatusLabel") diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py index 2cf068fed22..b3c21171a90 100644 --- a/tests/system/suite_debugger/tst_simple_debug/test.py +++ b/tests/system/suite_debugger/tst_simple_debug/test.py @@ -73,7 +73,7 @@ def main(): continue allowAppThroughWinFW(workingDir, projectName, False) if not doSimpleDebugging(len(checkedTargets), kit, config, - 2, expectedBreakpointsOrder): + len(expectedBreakpointsOrder), expectedBreakpointsOrder): try: stopB = findObject(':Qt Creator.Stop_QToolButton') if stopB.enabled: @@ -85,6 +85,12 @@ def main(): ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton") clickButton(waitForObject("{type='CloseButton' unnamed='1' visible='1' " "window=':Qt Creator_Core::Internal::MainWindow'}")) + if platform.system() == 'Darwin' and JIRA.isBugStillOpen(11595): + try: + expectedBreakpointsOrder.remove({os.path.join(workingDir, projectName, "main.cpp"):10}) + test.warning("Removed cpp file after first run. (QTCREATORBUG-11595)") + except: + pass else: test.fatal("Setting breakpoints failed - leaving without testing.") invokeMenuItem("File", "Exit") diff --git a/tests/system/suite_general/tst_default_settings/test.py b/tests/system/suite_general/tst_default_settings/test.py index 60267dc12d6..e70720bbc4a 100644 --- a/tests/system/suite_general/tst_default_settings/test.py +++ b/tests/system/suite_general/tst_default_settings/test.py @@ -227,6 +227,7 @@ def __getExpectedDebuggers__(): def __getCDB__(): result = [] possibleLocations = ["C:\\Program Files\\Debugging Tools for Windows (x64)", + "C:\\Program Files (x86)\\Debugging Tools for Windows (x86)", "C:\\Program Files (x86)\\Windows Kits\\8.0\\Debuggers\\x86", "C:\\Program Files\\Windows Kits\\8.0\\Debuggers\\x86", "C:\\Program Files (x86)\\Windows Kits\\8.1\\Debuggers\\x86",