From 7031ffd32764039b9b6808c4951b9e7e67a23dae Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 8 Oct 2019 12:01:24 +0200 Subject: [PATCH 01/11] Doc: Fix link to free Qt apps Fixes: QTCREATORBUG-23059 Change-Id: Iaf0b181223f88aa6f9513a29825f8aa98f9baf62 Reviewed-by: Tino Pyssysalo Reviewed-by: Eike Ziller --- doc/src/overview/creator-only/creator-tech-support.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/overview/creator-only/creator-tech-support.qdoc b/doc/src/overview/creator-only/creator-tech-support.qdoc index ab8e45cf3b5..e7dedaa829a 100644 --- a/doc/src/overview/creator-only/creator-tech-support.qdoc +++ b/doc/src/overview/creator-only/creator-tech-support.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -64,7 +64,7 @@ \row \li Find free Qt-based applications - \li \l{http://qt-apps.org/}{Qt Apps} + \li \l{https://github.com/topics/qt}{Qt Apps on GitHub} \row \li Develop with a commercial Qt license and support - From 33bf017951009ee1dff86af3f30ac11f838ac3ba Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 8 Oct 2019 15:26:25 +0200 Subject: [PATCH 02/11] Version bump -> 4.10.2 Change-Id: I7ce0fbc735df662485f86dca8e148d1aee5b3657 Reviewed-by: Eike Ziller --- cmake/QtCreatorIDEBranding.cmake | 4 ++-- qbs/modules/qtc/qtc.qbs | 4 ++-- qtcreator_ide_branding.pri | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/QtCreatorIDEBranding.cmake b/cmake/QtCreatorIDEBranding.cmake index 5f8c164e7bd..91bcfd9e645 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -1,9 +1,9 @@ #BINARY_ARTIFACTS_BRANCH = master #PROJECT_USER_FILE_EXTENSION = .user -set(IDE_VERSION "4.10.1") # The IDE version. +set(IDE_VERSION "4.10.2") # The IDE version. set(IDE_VERSION_COMPAT "4.10.0") # The IDE Compatibility version. -set(IDE_VERSION_DISPLAY "4.10.1") # The IDE display version. +set(IDE_VERSION_DISPLAY "4.10.2") # The IDE display version. set(IDE_COPYRIGHT_YEAR "2019") # The IDE copyright year. set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation. diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 0a3d405edc3..3a4f23e5581 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -4,10 +4,10 @@ import qbs.FileInfo import "qtc.js" as HelperFunctions Module { - property string qtcreator_display_version: '4.10.1' + property string qtcreator_display_version: '4.10.2' property string ide_version_major: '4' property string ide_version_minor: '10' - property string ide_version_release: '1' + property string ide_version_release: '2' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release diff --git a/qtcreator_ide_branding.pri b/qtcreator_ide_branding.pri index c4000309e43..b58804ba22a 100644 --- a/qtcreator_ide_branding.pri +++ b/qtcreator_ide_branding.pri @@ -1,6 +1,6 @@ -QTCREATOR_VERSION = 4.10.1 +QTCREATOR_VERSION = 4.10.2 QTCREATOR_COMPAT_VERSION = 4.10.0 -QTCREATOR_DISPLAY_VERSION = 4.10.1 +QTCREATOR_DISPLAY_VERSION = 4.10.2 QTCREATOR_COPYRIGHT_YEAR = 2019 BINARY_ARTIFACTS_BRANCH = 4.10 From 2896e5f5e289a30928ab679c99d7de68d4a903ac Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 7 Oct 2019 15:51:11 +0200 Subject: [PATCH 03/11] MSVC support: Fix "detection" of supported ABIs for the 2015 build tools The VS 2015 Build Tools are unlike any other VS or Build Tools installation and thus need their own hack. Fixes: QTCREATORBUG-22960 Change-Id: Icdbc2ad641e544a9a9d58887fde30b6ad3c28d26 Reviewed-by: Oliver Wolff --- src/plugins/projectexplorer/msvctoolchain.cpp | 10 ++++++++++ src/plugins/projectexplorer/msvctoolchain.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp index 24b528154de..17bf393a4c1 100644 --- a/src/plugins/projectexplorer/msvctoolchain.cpp +++ b/src/plugins/projectexplorer/msvctoolchain.cpp @@ -776,6 +776,8 @@ void MsvcToolChain::updateEnvironmentModifications(QList void MsvcToolChain::detectInstalledAbis() { + if (!m_supportedAbis.isEmpty()) // Build Tools 2015 + return; static QMap abiCache; const QString vcVarsBase = QDir::fromNativeSeparators(m_vcvarsBat).left(m_vcvarsBat.lastIndexOf('/')); @@ -1282,6 +1284,13 @@ void MsvcToolChain::changeVcVarsCall(const QString &varsBat, const QString &vars } } +void MsvcToolChain::setSupportedAbi(const Abi &abi) +{ + // Hack for Build Tools 2015 only. + QTC_CHECK(m_supportedAbis.isEmpty()); + m_supportedAbis = { abi }; +} + // -------------------------------------------------------------------------- // MsvcBasedToolChainConfigWidget: Creates a simple GUI without error label // to display name and varsBat. Derived classes should add the error label and @@ -1900,6 +1909,7 @@ static void detectCppBuildTools2015(QList *list) QLatin1String(e.varsBatArg)); tc->setDetection(ToolChain::AutoDetection); tc->setLanguage(language); + tc->setSupportedAbi(abi); list->append(tc); } } diff --git a/src/plugins/projectexplorer/msvctoolchain.h b/src/plugins/projectexplorer/msvctoolchain.h index bc0adb00bae..63d3e865529 100644 --- a/src/plugins/projectexplorer/msvctoolchain.h +++ b/src/plugins/projectexplorer/msvctoolchain.h @@ -98,6 +98,8 @@ public: void setVarsBatArg(const QString &varsBA) { m_varsBatArg = varsBA; } void changeVcVarsCall(const QString &varsBat, const QString &varsBatArgs = QString()); + void setSupportedAbi(const Abi &abi); + bool operator==(const ToolChain &) const override; bool isJobCountSupported() const override { return false; } From d56e88d36a09989ed572781ecca224cd31635d5d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 8 Oct 2019 14:34:26 +0200 Subject: [PATCH 04/11] RemoteLinux: Fix look-up of remote file path in deployment data If the deployment configuration contains an "install into temp dir" step, then the local file paths of the binaries built by the build tool will not be in the list of deployable files, because all deployables come from the temporary install dir. Therefore, look for just a file name match as a fallback. Fixes: QTCREATORBUG-21235 Change-Id: Ie3fad515515b4f28cc6bdef1254f4c05a0557569 Reviewed-by: Christian Stenger --- .../cmakeprojectmanager/cmakebuildconfiguration.cpp | 2 +- src/plugins/projectexplorer/deploymentdata.cpp | 8 +++++++- src/plugins/projectexplorer/target.cpp | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index f7cfa7f33f5..d782c26d4ec 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -237,7 +237,7 @@ DeploymentData CMakeBuildConfiguration::deploymentData() const for (const CMakeBuildTarget &ct : m_buildTargets) { if (ct.targetType == ExecutableType || ct.targetType == DynamicLibraryType) { if (!ct.executable.isEmpty() - && !result.deployableForLocalFile(ct.executable.toString()).isValid()) { + && result.deployableForLocalFile(ct.executable.toString()).localFilePath() != ct.executable) { result.addFile(ct.executable.toString(), deploymentPrefix + buildDir.relativeFilePath(ct.executable.toFileInfo().dir().path()), DeployableFile::TypeExecutable); diff --git a/src/plugins/projectexplorer/deploymentdata.cpp b/src/plugins/projectexplorer/deploymentdata.cpp index acb8878de65..aa24a3ff3cb 100644 --- a/src/plugins/projectexplorer/deploymentdata.cpp +++ b/src/plugins/projectexplorer/deploymentdata.cpp @@ -57,9 +57,15 @@ void DeploymentData::addFile(const QString &localFilePath, const QString &remote DeployableFile DeploymentData::deployableForLocalFile(const QString &localFilePath) const { - return Utils::findOrDefault(m_files, [&localFilePath](const DeployableFile &d) { + const DeployableFile f = Utils::findOrDefault(m_files, [&localFilePath](const DeployableFile &d) { return d.localFilePath().toString() == localFilePath; }); + if (f.isValid()) + return f; + const QString localFileName = QFileInfo(localFilePath).fileName(); + return Utils::findOrDefault(m_files, [&localFileName](const DeployableFile &d) { + return d.localFilePath().toFileInfo().fileName() == localFileName; + }); } bool DeploymentData::operator==(const DeploymentData &other) const diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp index 44be6070659..8ff05c7141a 100644 --- a/src/plugins/projectexplorer/target.cpp +++ b/src/plugins/projectexplorer/target.cpp @@ -337,6 +337,7 @@ void Target::setDeploymentData(const DeploymentData &deploymentData) if (d->m_deploymentData != deploymentData) { d->m_deploymentData = deploymentData; emit deploymentDataChanged(); + emit applicationTargetsChanged(); } } From 26cb6994c46af7b9c386f52b2485684b4dea29b7 Mon Sep 17 00:00:00 2001 From: Mariana Meireles Date: Mon, 30 Sep 2019 12:28:14 +0200 Subject: [PATCH 05/11] Corrects the project type supported Change-Id: I9434ed86d4d20e44abbe2cd07f9a7d838a53761a Reviewed-by: hjk Reviewed-by: David Schulz --- .../projects/qtforpythonapplication/mainwindow/wizard.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/mainwindow/wizard.json b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/mainwindow/wizard.json index c8e397d0d82..c4efb3167c9 100644 --- a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/mainwindow/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/mainwindow/wizard.json @@ -1,6 +1,6 @@ { "version": 1, - "supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ], + "supportedProjectTypes": [ "PythonProject" ], "id": "U.QtForPythonApplicationWindow", "category": "F.Application", "trDescription": "Creates a Qt for Python application that contains an empty window.", From 4636bb69073714037a40a59a88c762677f6fe69d Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 10 Oct 2019 08:22:19 +0200 Subject: [PATCH 06/11] Debugger: Prevent crash on shutdown It may happen that the global log window gets destroyed before the log windows of a running engine when QC is closed after an unsuccessful attempt to debug. Avoid accessing it when trying to write output that has not been processed so far. Change-Id: I41296cc37bab1e4f1272b05dda1979d813981aa7 Reviewed-by: Christian Stenger Reviewed-by: David Schulz --- src/plugins/debugger/logwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/logwindow.cpp b/src/plugins/debugger/logwindow.cpp index 1c5d9fd487a..e6d48d3cd99 100644 --- a/src/plugins/debugger/logwindow.cpp +++ b/src/plugins/debugger/logwindow.cpp @@ -567,7 +567,8 @@ void LogWindow::doOutput() if (m_queuedOutput.isEmpty()) return; - theGlobalLog->doOutput(m_queuedOutput); + if (theGlobalLog) + theGlobalLog->doOutput(m_queuedOutput); QTextCursor cursor = m_combinedText->textCursor(); const bool atEnd = cursor.atEnd(); @@ -706,6 +707,7 @@ GlobalLogWindow::GlobalLogWindow() GlobalLogWindow::~GlobalLogWindow() { + theGlobalLog = nullptr; } void GlobalLogWindow::doOutput(const QString &output) From 4b76f6c65db79cdecaff1069bdc3826a59852299 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 10 Oct 2019 11:23:27 +0200 Subject: [PATCH 07/11] AutoTest: Fix Run Under Cursor for GTest Broke while introducing TestSuite and following the official terms. Amends 6189745a3b8d3a24627193f9ad8fb18fa84099ed. Fixes: QTCREATORBUG-23068 Change-Id: I02a8c72debface1e15b2e1901ec6115e210a0312 Reviewed-by: pawelrutka Reviewed-by: David Schulz --- src/plugins/autotest/testtreemodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/autotest/testtreemodel.cpp b/src/plugins/autotest/testtreemodel.cpp index 953e93dc9c7..f328cd892e0 100644 --- a/src/plugins/autotest/testtreemodel.cpp +++ b/src/plugins/autotest/testtreemodel.cpp @@ -178,7 +178,8 @@ QList TestTreeModel::testItemsByName(TestTreeItem *root, const Q } TestTreeItem *testCase = node->findFirstLevelChild([&testName](TestTreeItem *it) { QTC_ASSERT(it, return false); - return it->type() == TestTreeItem::TestFunction && it->name() == testName; + return (it->type() == TestTreeItem::TestCase + || it->type() == TestTreeItem::TestFunction) && it->name() == testName; }); // collect only actual tests, not special functions like init, cleanup etc. if (testCase) result << testCase; From e0ebda45db814ae52f1661e4a772e1dc1a5321fa Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 10 Oct 2019 17:19:09 +0200 Subject: [PATCH 08/11] QbsPM: Fix look-up of executable on Desktop ... if installation at build time is disabled and a dedicated install step exists. Fixes: QTCREATORBUG-23039 Change-Id: I7115368bb1993ebdb48200d2a9c55c34a7bdceec Reviewed-by: Joerg Bornemann --- src/plugins/qbsprojectmanager/qbsproject.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index 209e87b4bca..ca70e124446 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -27,6 +27,7 @@ #include "qbsbuildconfiguration.h" #include "qbsbuildstep.h" +#include "qbsinstallstep.h" #include "qbslogsink.h" #include "qbspmlogging.h" #include "qbsprojectimporter.h" @@ -50,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -488,6 +490,14 @@ FilePath QbsProject::installRoot() { if (!activeTarget()) return FilePath(); + const auto dc = activeTarget()->activeDeployConfiguration(); + if (dc) { + const QList qbsInstallSteps = dc->stepList()->allOfType(); + for (QbsInstallStep * const step : qbsInstallSteps) { + if (step->enabled()) + return FilePath::fromString(step->installRoot()); + } + } const auto * const bc = qobject_cast(activeTarget()->activeBuildConfiguration()); if (!bc) From 9dd96adb7c0f2e551fd0d804a44e49f577685f77 Mon Sep 17 00:00:00 2001 From: Vikas Pachdha Date: Tue, 8 Oct 2019 15:15:44 +0200 Subject: [PATCH 09/11] iOS: Fix failure to run an app on iOS version 13 onwards Use secure API to start the gdbserver service Task-number: QTCREATORBUG-22950 Change-Id: I685162b7ec90d738c5f42e094f5046367936530f Reviewed-by: Eike Ziller Reviewed-by: Andy Shaw Reviewed-by: Alexandru Croitor --- src/tools/iostool/iosdevicemanager.cpp | 77 +++++++++----------------- 1 file changed, 26 insertions(+), 51 deletions(-) diff --git a/src/tools/iostool/iosdevicemanager.cpp b/src/tools/iostool/iosdevicemanager.cpp index 53a9fd1625a..27c1a2bedbf 100644 --- a/src/tools/iostool/iosdevicemanager.cpp +++ b/src/tools/iostool/iosdevicemanager.cpp @@ -84,6 +84,7 @@ enum ADNCI_MSG { extern "C" { typedef unsigned int ServiceSocket; // match_port_t (i.e. natural_t) or socket (on windows, i.e sock_t) +typedef unsigned int *ServiceConnRef; typedef unsigned int am_res_t; // mach_error_t #ifndef MOBILE_DEV_DIRECT_LINK @@ -132,7 +133,6 @@ typedef am_res_t (MDEV_API *AMDeviceStopSessionPtr)(AMDeviceRef); typedef am_res_t (MDEV_API *AMDeviceDisconnectPtr)(AMDeviceRef); typedef am_res_t (MDEV_API *AMDeviceMountImagePtr)(AMDeviceRef, CFStringRef, CFDictionaryRef, AMDeviceMountImageCallback, void *); -typedef am_res_t (MDEV_API *AMDeviceStartServicePtr)(AMDeviceRef, CFStringRef, ServiceSocket *, void *); typedef am_res_t (MDEV_API *AMDeviceUninstallApplicationPtr)(ServiceSocket, CFStringRef, CFDictionaryRef, AMDeviceInstallApplicationCallback, void*); @@ -141,9 +141,10 @@ typedef char * (MDEV_API *AMDErrorStringPtr)(am_res_t); typedef CFStringRef (MDEV_API *MISCopyErrorStringForErrorCodePtr)(am_res_t); typedef am_res_t (MDEV_API *USBMuxConnectByPortPtr)(unsigned int, int, ServiceSocket*); // secure Api's -typedef am_res_t (MDEV_API *AMDeviceSecureStartServicePtr)(AMDeviceRef, CFStringRef, void *, ServiceSocket *); +typedef am_res_t (MDEV_API *AMDeviceSecureStartServicePtr)(AMDeviceRef, CFStringRef, unsigned int *, ServiceConnRef *); typedef int (MDEV_API *AMDeviceSecureTransferPathPtr)(int, AMDeviceRef, CFURLRef, CFDictionaryRef, AMDeviceSecureInstallApplicationCallback, int); typedef int (MDEV_API *AMDeviceSecureInstallApplicationPtr)(int, AMDeviceRef, CFURLRef, CFDictionaryRef, AMDeviceSecureInstallApplicationCallback, int); +typedef int (MDEV_API *AMDServiceConnectionGetSocketPtr)(ServiceConnRef); } // extern C @@ -182,7 +183,6 @@ public : am_res_t deviceDisconnect(AMDeviceRef); am_res_t deviceMountImage(AMDeviceRef, CFStringRef, CFDictionaryRef, AMDeviceMountImageCallback, void *); - am_res_t deviceStartService(AMDeviceRef, CFStringRef, ServiceSocket *, void *); am_res_t deviceUninstallApplication(int, CFStringRef, CFDictionaryRef, AMDeviceInstallApplicationCallback, void*); @@ -195,7 +195,8 @@ public : void addError(const char *msg); // Secure API's - am_res_t deviceSecureStartService(AMDeviceRef, CFStringRef, void *, ServiceSocket *); + am_res_t deviceSecureStartService(AMDeviceRef, CFStringRef, ServiceConnRef *); + int deviceConnectionGetSocket(ServiceConnRef); int deviceSecureTransferApplicationPath(int, AMDeviceRef, CFURLRef, CFDictionaryRef, AMDeviceSecureInstallApplicationCallback callback, int); int deviceSecureInstallApplication(int zero, AMDeviceRef device, CFURLRef url, @@ -220,10 +221,10 @@ private: AMDeviceStopSessionPtr m_AMDeviceStopSession; AMDeviceDisconnectPtr m_AMDeviceDisconnect; AMDeviceMountImagePtr m_AMDeviceMountImage; - AMDeviceStartServicePtr m_AMDeviceStartService; AMDeviceSecureStartServicePtr m_AMDeviceSecureStartService; AMDeviceSecureTransferPathPtr m_AMDeviceSecureTransferPath; AMDeviceSecureInstallApplicationPtr m_AMDeviceSecureInstallApplication; + AMDServiceConnectionGetSocketPtr m_AMDServiceConnectionGetSocket; AMDeviceUninstallApplicationPtr m_AMDeviceUninstallApplication; AMDeviceLookupApplicationsPtr m_AMDeviceLookupApplications; AMDErrorStringPtr m_AMDErrorString; @@ -382,7 +383,6 @@ public: bool connectDevice(); bool disconnectDevice(); - bool startService(const QString &service, ServiceSocket &fd); void stopService(ServiceSocket fd); void startDeviceLookup(int timeout); bool connectToPort(quint16 port, ServiceSocket *fd) override; @@ -978,43 +978,21 @@ bool CommandSession::disconnectDevice() return true; } -bool CommandSession::startService(const QString &serviceName, ServiceSocket &fd) -{ - bool success = true; - - // Connect device. AMDeviceConnect + AMDeviceIsPaired + AMDeviceValidatePairing + AMDeviceStartSession - if (connectDevice()) { - fd = 0; - CFStringRef cfsService = serviceName.toCFString(); - if (am_res_t error = lib()->deviceStartService(device, cfsService, &fd, 0)) { - addError(QString::fromLatin1("Starting service \"%1\" on device %2 failed, AMDeviceStartService returned %3 (0x%4)") - .arg(serviceName).arg(deviceId).arg(mobileDeviceErrorString(lib(), error)).arg(QString::number(error, 16))); - success = false; - fd = -1; - } - disconnectDevice(); - CFRelease(cfsService); - } else { - addError(QString::fromLatin1("Starting service \"%1\" on device %2 failed. Cannot connect to device.") - .arg(serviceName).arg(deviceId)); - success = false; - } - return success; -} - bool CommandSession::startServiceSecure(const QString &serviceName, ServiceSocket &fd) { bool success = true; // Connect device. AMDeviceConnect + AMDeviceIsPaired + AMDeviceValidatePairing + AMDeviceStartSession if (connectDevice()) { - fd = 0; CFStringRef cfsService = serviceName.toCFString(); - if (am_res_t error = lib()->deviceSecureStartService(device, cfsService, &fd, 0)) { + ServiceConnRef ref; + if (am_res_t error = lib()->deviceSecureStartService(device, cfsService, &ref)) { addError(QString::fromLatin1("Starting(Secure) service \"%1\" on device %2 failed, AMDeviceStartSecureService returned %3 (0x%4)") .arg(serviceName).arg(deviceId).arg(mobileDeviceErrorString(lib(), error)).arg(QString::number(error, 16))); success = false; - fd = -1; + fd = 0; + } else { + fd = lib()->deviceConnectionGetSocket(ref); } disconnectDevice(); CFRelease(cfsService); @@ -1481,8 +1459,8 @@ bool AppOpSession::runApp() addError(QString::fromLatin1("Running app \"%1\" failed. Mount developer disk failed.").arg(bundlePath)); failure = true; } - if (!failure && !startService(QLatin1String("com.apple.debugserver"), gdbFd)) - gdbFd = -1; + if (!failure && !startServiceSecure(QLatin1String("com.apple.debugserver"), gdbFd)) + gdbFd = 0; if (gdbFd > 0) { // gdbServer protocol, see http://sourceware.org/gdb/onlinedocs/gdb/Remote-Protocol.html#Remote-Protocol @@ -1771,9 +1749,6 @@ bool MobileDeviceLib::load() m_AMDeviceMountImage = reinterpret_cast(lib.resolve("AMDeviceMountImage")); if (m_AMDeviceMountImage == 0) addError("MobileDeviceLib does not define AMDeviceMountImage"); - m_AMDeviceStartService = reinterpret_cast(lib.resolve("AMDeviceStartService")); - if (m_AMDeviceStartService == 0) - addError("MobileDeviceLib does not define AMDeviceStartService"); m_AMDeviceSecureStartService = reinterpret_cast(lib.resolve("AMDeviceSecureStartService")); if (m_AMDeviceSecureStartService == 0) addError("MobileDeviceLib does not define AMDeviceSecureStartService"); @@ -1783,6 +1758,9 @@ bool MobileDeviceLib::load() m_AMDeviceSecureInstallApplication = reinterpret_cast(lib.resolve("AMDeviceSecureInstallApplication")); if (m_AMDeviceSecureInstallApplication == 0) addError("MobileDeviceLib does not define AMDeviceSecureInstallApplication"); + m_AMDServiceConnectionGetSocket = reinterpret_cast(lib.resolve("AMDServiceConnectionGetSocket")); + if (m_AMDServiceConnectionGetSocket == nullptr) + addError("MobileDeviceLib does not define AMDServiceConnectionGetSocket"); m_AMDeviceUninstallApplication = reinterpret_cast(lib.resolve("AMDeviceUninstallApplication")); if (m_AMDeviceUninstallApplication == 0) addError("MobileDeviceLib does not define AMDeviceUninstallApplication"); @@ -1921,15 +1899,6 @@ am_res_t MobileDeviceLib::deviceMountImage(AMDeviceRef device, CFStringRef image return -1; } -am_res_t MobileDeviceLib::deviceStartService(AMDeviceRef device, CFStringRef serviceName, - ServiceSocket *fdRef, void *extra) -{ - if (m_AMDeviceStartService) - return m_AMDeviceStartService(device, serviceName, fdRef, extra); - return -1; -} - - am_res_t MobileDeviceLib::deviceUninstallApplication(int serviceFd, CFStringRef bundleId, CFDictionaryRef options, AMDeviceInstallApplicationCallback callback, @@ -1980,12 +1949,11 @@ void MobileDeviceLib::addError(const char *msg) addError(QLatin1String(msg)); } -am_res_t MobileDeviceLib::deviceSecureStartService(AMDeviceRef device, CFStringRef serviceName, void *extra, ServiceSocket *fdRef) +am_res_t MobileDeviceLib::deviceSecureStartService(AMDeviceRef device, CFStringRef serviceName, ServiceConnRef *fdRef) { - int returnCode = -1; if (m_AMDeviceSecureStartService) - returnCode = m_AMDeviceSecureStartService(device, serviceName, extra, fdRef); - return returnCode; + return m_AMDeviceSecureStartService(device, serviceName, nullptr, fdRef); + return 0; } int MobileDeviceLib::deviceSecureTransferApplicationPath(int zero, AMDeviceRef device, CFURLRef url, CFDictionaryRef dict, AMDeviceSecureInstallApplicationCallback callback, int args) @@ -2005,6 +1973,13 @@ int MobileDeviceLib::deviceSecureInstallApplication(int zero, AMDeviceRef device return returnCode; } +int MobileDeviceLib::deviceConnectionGetSocket(ServiceConnRef ref) { + int fd = 0; + if (m_AMDServiceConnectionGetSocket) + fd = m_AMDServiceConnectionGetSocket(ref); + return fd; +} + void CommandSession::internalDeviceAvailableCallback(QString deviceId, AMDeviceRef device) { if (deviceId != this->deviceId && !this->deviceId.isEmpty()) From c7cb7672f0c0457477bbcd0fbd64af9874e42a98 Mon Sep 17 00:00:00 2001 From: Alexis Murzeau Date: Fri, 11 Oct 2019 23:46:08 +0200 Subject: [PATCH 10/11] AbiWidget: Fix custom abi comboboxes' enabled state when mainComboBox is changed When the mainComboBox is updated and its current selection changed via setAbis, the custom ABI comboboxes weren't updated accordingly. This is because in setAbis when doing d->m_abi->setCurrentIndex(), the m_ignoreChanges guard is held which inhibit mainComboBoxChanged function from doing anything for performance reasons. But the effect of this is that custom ABI comboboxes were left in their previous state (enabled or disabled). This commit ensures the custom ABI comboboxes are updated according to the new selected item in the mainComboBox at the end of setAbis function. Change-Id: Iedabde412a42985697d2cba33ddb6c154f10a68f Reviewed-by: Oliver Wolff Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/abiwidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/abiwidget.cpp b/src/plugins/projectexplorer/abiwidget.cpp index 5df9a3ee059..319926dd548 100644 --- a/src/plugins/projectexplorer/abiwidget.cpp +++ b/src/plugins/projectexplorer/abiwidget.cpp @@ -188,7 +188,10 @@ void AbiWidget::setAbis(const Abis &abiList, const Abi ¤tAbi) setCustomAbiComboBoxes(defaultAbi); } - emitAbiChanged(defaultAbi); + + // Update disabled state according to new automatically selected item in main ABI combobox. + // This will call emitAbiChanged with the actual selected ABI. + mainComboBoxChanged(); } Abis AbiWidget::supportedAbis() const From e2e96cab52948b4404cac343bb3ad7c36ca9fafd Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Sun, 13 Oct 2019 01:53:57 +0200 Subject: [PATCH 11/11] GDB: Handle 'pretty_printer.to_string()' returning None The documentation for the GDB pretty printer function 'pretty_printer.to_string' says [1]: > [...] > Finally, if this method returns None then no further > operations are peformed in this method and nothing is printed. > [...] Therefore, skip this part if the printer's 'to_string' method returns 'None' and only fall back to assuming LazyString otherwise. This e.g. fixes the std::pair pretty printer (for gcc-9 libstdc++6) for which "" was shown previously in the debugger's locals/expression view. Now it shows the object's address and allows expansion to see the values for the 'first' and 'second' members. [1] https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing-API.html Change-Id: I33b1af82f731c347314af76c533b096b8a5afe21 Reviewed-by: Christian Stenger Reviewed-by: hjk --- share/qtcreator/debugger/gdbbridge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py index 2f056c7a932..858b56c5c16 100644 --- a/share/qtcreator/debugger/gdbbridge.py +++ b/share/qtcreator/debugger/gdbbridge.py @@ -145,7 +145,7 @@ class PlainDumper: d.putValue(d.hexencode(val), 'utf8:1:0') elif sys.version_info[0] <= 2 and isinstance(val, unicode): d.putValue(val) - else: # Assuming LazyString + elif val is not None: # Assuming LazyString d.putCharArrayValue(val.address, val.length, val.type.target().sizeof)