forked from qt-creator/qt-creator
Merge "Merge remote-tracking branch 'origin/4.10' into 4.11" into 4.11
This commit is contained in:
@@ -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 -
|
||||
|
@@ -143,7 +143,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)
|
||||
|
||||
|
@@ -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.",
|
||||
|
@@ -181,7 +181,8 @@ QList<TestTreeItem *> 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;
|
||||
|
@@ -327,7 +327,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).isValid()) {
|
||||
&& result.deployableForLocalFile(ct.executable).localFilePath() != ct.executable) {
|
||||
result.addFile(ct.executable.toString(),
|
||||
deploymentPrefix + buildDir.relativeFilePath(ct.executable.toFileInfo().dir().path()),
|
||||
DeployableFile::TypeExecutable);
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
@@ -57,8 +57,15 @@ void DeploymentData::addFile(const QString &localFilePath, const QString &remote
|
||||
|
||||
DeployableFile DeploymentData::deployableForLocalFile(const Utils::FilePath &localFilePath) const
|
||||
{
|
||||
return Utils::findOrDefault(m_files,
|
||||
Utils::equal(&DeployableFile::localFilePath, localFilePath));
|
||||
const DeployableFile f = Utils::findOrDefault(m_files,
|
||||
Utils::equal(&DeployableFile::localFilePath,
|
||||
localFilePath));
|
||||
if (f.isValid())
|
||||
return f;
|
||||
const QString localFileName = localFilePath.fileName();
|
||||
return Utils::findOrDefault(m_files, [&localFileName](const DeployableFile &d) {
|
||||
return d.localFilePath().fileName() == localFileName;
|
||||
});
|
||||
}
|
||||
|
||||
bool DeploymentData::operator==(const DeploymentData &other) const
|
||||
|
@@ -776,6 +776,8 @@ void MsvcToolChain::updateEnvironmentModifications(Utils::EnvironmentItems modif
|
||||
|
||||
void MsvcToolChain::detectInstalledAbis()
|
||||
{
|
||||
if (!m_supportedAbis.isEmpty()) // Build Tools 2015
|
||||
return;
|
||||
static QMap<QString, Abis> abiCache;
|
||||
const QString vcVarsBase
|
||||
= QDir::fromNativeSeparators(m_vcvarsBat).left(m_vcvarsBat.lastIndexOf('/'));
|
||||
@@ -1251,6 +1253,13 @@ void MsvcToolChain::resetVarsBat()
|
||||
m_varsBatArg.clear();
|
||||
}
|
||||
|
||||
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
|
||||
@@ -1855,6 +1864,7 @@ static void detectCppBuildTools2015(QList<ToolChain *> *list)
|
||||
tc->setDisplayName(name + QLatin1String(e.postFix));
|
||||
tc->setDetection(ToolChain::AutoDetection);
|
||||
tc->setLanguage(language);
|
||||
tc->setSupportedAbi(abi);
|
||||
list->append(tc);
|
||||
}
|
||||
}
|
||||
|
@@ -95,6 +95,8 @@ public:
|
||||
void setupVarsBat(const Abi &abi, const QString &varsBat, const QString &varsBatArg);
|
||||
void resetVarsBat();
|
||||
|
||||
void setSupportedAbi(const Abi &abi);
|
||||
|
||||
bool operator==(const ToolChain &) const override;
|
||||
|
||||
bool isJobCountSupported() const override { return false; }
|
||||
|
@@ -359,6 +359,7 @@ void Target::setDeploymentData(const DeploymentData &deploymentData)
|
||||
if (d->m_deploymentData != deploymentData) {
|
||||
d->m_deploymentData = deploymentData;
|
||||
emit deploymentDataChanged();
|
||||
emit applicationTargetsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "qbsbuildconfiguration.h"
|
||||
#include "qbsbuildstep.h"
|
||||
#include "qbsinstallstep.h"
|
||||
#include "qbslogsink.h"
|
||||
#include "qbspmlogging.h"
|
||||
#include "qbsprojectimporter.h"
|
||||
@@ -52,6 +53,7 @@
|
||||
#include <projectexplorer/buildinfo.h>
|
||||
#include <projectexplorer/buildmanager.h>
|
||||
#include <projectexplorer/buildtargetinfo.h>
|
||||
#include <projectexplorer/deployconfiguration.h>
|
||||
#include <projectexplorer/deploymentdata.h>
|
||||
#include <projectexplorer/headerpath.h>
|
||||
#include <projectexplorer/kit.h>
|
||||
@@ -464,6 +466,14 @@ FilePath QbsProject::installRoot()
|
||||
{
|
||||
if (!activeTarget())
|
||||
return FilePath();
|
||||
const auto dc = activeTarget()->activeDeployConfiguration();
|
||||
if (dc) {
|
||||
const QList<QbsInstallStep *> qbsInstallSteps = dc->stepList()->allOfType<QbsInstallStep>();
|
||||
for (QbsInstallStep * const step : qbsInstallSteps) {
|
||||
if (step->enabled())
|
||||
return FilePath::fromString(step->installRoot());
|
||||
}
|
||||
}
|
||||
const auto * const bc
|
||||
= qobject_cast<QbsBuildConfiguration *>(activeTarget()->activeBuildConfiguration());
|
||||
if (!bc)
|
||||
|
@@ -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<AMDeviceMountImagePtr>(lib.resolve("AMDeviceMountImage"));
|
||||
if (m_AMDeviceMountImage == 0)
|
||||
addError("MobileDeviceLib does not define AMDeviceMountImage");
|
||||
m_AMDeviceStartService = reinterpret_cast<AMDeviceStartServicePtr>(lib.resolve("AMDeviceStartService"));
|
||||
if (m_AMDeviceStartService == 0)
|
||||
addError("MobileDeviceLib does not define AMDeviceStartService");
|
||||
m_AMDeviceSecureStartService = reinterpret_cast<AMDeviceSecureStartServicePtr>(lib.resolve("AMDeviceSecureStartService"));
|
||||
if (m_AMDeviceSecureStartService == 0)
|
||||
addError("MobileDeviceLib does not define AMDeviceSecureStartService");
|
||||
@@ -1783,6 +1758,9 @@ bool MobileDeviceLib::load()
|
||||
m_AMDeviceSecureInstallApplication = reinterpret_cast<AMDeviceSecureInstallApplicationPtr>(lib.resolve("AMDeviceSecureInstallApplication"));
|
||||
if (m_AMDeviceSecureInstallApplication == 0)
|
||||
addError("MobileDeviceLib does not define AMDeviceSecureInstallApplication");
|
||||
m_AMDServiceConnectionGetSocket = reinterpret_cast<AMDServiceConnectionGetSocketPtr>(lib.resolve("AMDServiceConnectionGetSocket"));
|
||||
if (m_AMDServiceConnectionGetSocket == nullptr)
|
||||
addError("MobileDeviceLib does not define AMDServiceConnectionGetSocket");
|
||||
m_AMDeviceUninstallApplication = reinterpret_cast<AMDeviceUninstallApplicationPtr>(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())
|
||||
|
Reference in New Issue
Block a user