Commit 24314562 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Profile introduction



Introduce Profiles to store sets of values that describe a system/device.

These profiles are held by a target, getting rid of much of the information
stored in the Build-/Run-/DeployConfigurations, greatly simplifying those.

This is a squash of the wip/profile branch which has been on gerrit for a
while, rebased to current master.

Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 8c77b8c9
......@@ -41,6 +41,39 @@
using namespace Utils;
FadingWidget::FadingWidget(QWidget *parent) :
FadingPanel(parent),
m_opacityEffect(new QGraphicsOpacityEffect)
{
m_opacityEffect->setOpacity(0);
setGraphicsEffect(m_opacityEffect);
// Workaround for issue with QGraphicsEffect. GraphicsEffect
// currently clears with Window color. Remove if flickering
// no longer occurs on fade-in
QPalette pal;
pal.setBrush(QPalette::All, QPalette::Window, Qt::transparent);
setPalette(pal);
}
void FadingWidget::setOpacity(qreal value)
{
m_opacityEffect->setOpacity(value);
}
void FadingWidget::fadeTo(qreal value)
{
QPropertyAnimation *animation = new QPropertyAnimation(m_opacityEffect, "opacity");
animation->setDuration(200);
animation->setEndValue(value);
animation->start(QAbstractAnimation::DeleteWhenStopped);
}
qreal FadingWidget::opacity()
{
return m_opacityEffect->opacity();
}
DetailsButton::DetailsButton(QWidget *parent) : QAbstractButton(parent), m_fader(0)
{
setCheckable(true);
......
......@@ -38,11 +38,15 @@
#include <QAbstractButton>
#include <QPixmap>
#include <QGraphicsOpacityEffect>
QT_FORWARD_DECLARE_CLASS(QGraphicsOpacityEffect)
namespace Utils {
class QTCREATOR_UTILS_EXPORT FadingPanel : public QWidget
{
Q_OBJECT
public:
FadingPanel(QWidget *parent = 0)
: QWidget(parent)
......@@ -51,6 +55,18 @@ public:
virtual void setOpacity(qreal value) = 0;
};
class QTCREATOR_UTILS_EXPORT FadingWidget : public FadingPanel
{
Q_OBJECT
public:
FadingWidget(QWidget *parent = 0);
void fadeTo(qreal value);
qreal opacity();
void setOpacity(qreal value);
protected:
QGraphicsOpacityEffect *m_opacityEffect;
};
class QTCREATOR_UTILS_EXPORT DetailsButton : public QAbstractButton
{
Q_OBJECT
......
......@@ -340,9 +340,9 @@ PersistentSettingsWriter::PersistentSettingsWriter()
static void writeVariantValue(QXmlStreamWriter &w, const Context &ctx,
const QVariant &variant, const QString &key = QString())
{
switch (variant.type()) {
case QVariant::StringList:
case QVariant::List:
switch (static_cast<int>(variant.type())) {
case static_cast<int>(QVariant::StringList):
case static_cast<int>(QVariant::List):
w.writeStartElement(ctx.valueListElement);
w.writeAttribute(ctx.typeAttribute, QLatin1String(QVariant::typeToName(QVariant::List)));
if (!key.isEmpty())
......@@ -351,7 +351,7 @@ static void writeVariantValue(QXmlStreamWriter &w, const Context &ctx,
writeVariantValue(w, ctx, var);
w.writeEndElement();
break;
case QVariant::Map: {
case static_cast<int>(QVariant::Map): {
w.writeStartElement(ctx.valueMapElement);
w.writeAttribute(ctx.typeAttribute, QLatin1String(QVariant::typeToName(QVariant::Map)));
if (!key.isEmpty())
......@@ -363,6 +363,9 @@ static void writeVariantValue(QXmlStreamWriter &w, const Context &ctx,
w.writeEndElement();
}
break;
case static_cast<int>(QMetaType::QObjectStar): // ignore QObjects!
case static_cast<int>(QMetaType::VoidStar): // ignore void pointers!
break;
default:
w.writeStartElement(ctx.valueElement);
w.writeAttribute(ctx.typeAttribute, QLatin1String(variant.typeName()));
......
......@@ -12,6 +12,7 @@ QT += xml network
HEADERS += \
androidconstants.h \
androidconfigurations.h \
androidmanager.h \
androidrunconfiguration.h \
androidruncontrol.h \
androidrunfactories.h \
......@@ -32,14 +33,13 @@ HEADERS += \
androidqtversionfactory.h \
androidqtversion.h \
androiddeployconfiguration.h \
androidtarget.h \
androidtargetfactory.h \
androidcreatekeystorecertificate.h \
javaparser.h \
androidplugin.h
SOURCES += \
androidconfigurations.cpp \
androidmanager.cpp \
androidrunconfiguration.cpp \
androidruncontrol.cpp \
androidrunfactories.cpp \
......@@ -59,8 +59,6 @@ SOURCES += \
androidqtversionfactory.cpp \
androidqtversion.cpp \
androiddeployconfiguration.cpp \
androidtarget.cpp \
androidtargetfactory.cpp \
androidcreatekeystorecertificate.cpp \
javaparser.cpp \
androidplugin.cpp
......
......@@ -42,6 +42,8 @@ QtcPlugin {
"androiddeploystepwidget.h",
"androiddeploystepwidget.ui",
"androidglobal.h",
"androidmanager.h",
"androidmanager.cpp",
"androidpackagecreationfactory.cpp",
"androidpackagecreationfactory.h",
"androidpackagecreationstep.cpp",
......@@ -73,10 +75,6 @@ QtcPlugin {
"androidsettingswidget.cpp",
"androidsettingswidget.h",
"androidsettingswidget.ui",
"androidtarget.cpp",
"androidtargetfactory.cpp",
"androidtargetfactory.h",
"androidtarget.h",
"androidtoolchain.cpp",
"androidtoolchain.h",
"javaparser.cpp",
......
......@@ -124,16 +124,16 @@ QLatin1String AndroidConfigurations::toolsPrefix(ProjectExplorer::Abi::Architect
AndroidConfig::AndroidConfig(const QSettings &settings)
{
// user settings
armGdbLocation = settings.value(ArmGdbLocationKey).toString();
armGdbserverLocation = settings.value(ArmGdbserverLocationKey).toString();
x86GdbLocation = settings.value(X86GdbLocationKey).toString();
x86GdbserverLocation = settings.value(X86GdbserverLocationKey).toString();
armGdbLocation = Utils::FileName::fromString(settings.value(ArmGdbLocationKey).toString());
armGdbserverLocation = Utils::FileName::fromString(settings.value(ArmGdbserverLocationKey).toString());
x86GdbLocation = Utils::FileName::fromString(settings.value(X86GdbLocationKey).toString());
x86GdbserverLocation = Utils::FileName::fromString(settings.value(X86GdbserverLocationKey).toString());
partitionSize = settings.value(PartitionSizeKey, 1024).toInt();
sdkLocation = settings.value(SDKLocationKey).toString();
ndkLocation = settings.value(NDKLocationKey).toString();
antLocation = settings.value(AntLocationKey).toString();
openJDKLocation = settings.value(OpenJDKLocationKey).toString();
keystoreLocation = settings.value(KeystoreLocationKey).toString();
sdkLocation = Utils::FileName::fromString(settings.value(SDKLocationKey).toString());
ndkLocation = Utils::FileName::fromString(settings.value(NDKLocationKey).toString());
antLocation = Utils::FileName::fromString(settings.value(AntLocationKey).toString());
openJDKLocation = Utils::FileName::fromString(settings.value(OpenJDKLocationKey).toString());
keystoreLocation = Utils::FileName::fromString(settings.value(KeystoreLocationKey).toString());
QRegExp versionRegExp(NDKGccVersionRegExp);
const QString &value = settings.value(NDKToolchainVersionKey).toString();
......@@ -147,11 +147,11 @@ AndroidConfig::AndroidConfig(const QSettings &settings)
if (reader.load(settingsFileName())
&& settings.value(changeTimeStamp).toInt() != QFileInfo(settingsFileName()).lastModified().toMSecsSinceEpoch() / 1000) {
// persisten settings
sdkLocation = reader.restoreValue(SDKLocationKey).toString();
ndkLocation = reader.restoreValue(NDKLocationKey).toString();
antLocation = reader.restoreValue(AntLocationKey).toString();
openJDKLocation = reader.restoreValue(OpenJDKLocationKey).toString();
keystoreLocation = reader.restoreValue(KeystoreLocationKey).toString();
sdkLocation = Utils::FileName::fromString(reader.restoreValue(SDKLocationKey).toString());
ndkLocation = Utils::FileName::fromString(reader.restoreValue(NDKLocationKey).toString());
antLocation = Utils::FileName::fromString(reader.restoreValue(AntLocationKey).toString());
openJDKLocation = Utils::FileName::fromString(reader.restoreValue(OpenJDKLocationKey).toString());
keystoreLocation = Utils::FileName::fromString(reader.restoreValue(KeystoreLocationKey).toString());
QRegExp versionRegExp(NDKGccVersionRegExp);
const QString &value = reader.restoreValue(NDKToolchainVersionKey).toString();
......@@ -160,17 +160,17 @@ AndroidConfig::AndroidConfig(const QSettings &settings)
else
ndkToolchainVersion = value.mid(versionRegExp.indexIn(value));
if (!armGdbLocation.length())
armGdbLocation = reader.restoreValue(ArmGdbLocationKey).toString();
if (armGdbLocation.isEmpty())
armGdbLocation = Utils::FileName::fromString(reader.restoreValue(ArmGdbLocationKey).toString());
if (!armGdbserverLocation.length())
armGdbserverLocation = reader.restoreValue(ArmGdbserverLocationKey).toString();
if (armGdbserverLocation.isEmpty())
armGdbserverLocation = Utils::FileName::fromString(reader.restoreValue(ArmGdbserverLocationKey).toString());
if (!x86GdbLocation.length())
x86GdbLocation = reader.restoreValue(X86GdbLocationKey).toString();
if (x86GdbLocation.isEmpty())
x86GdbLocation = Utils::FileName::fromString(reader.restoreValue(X86GdbLocationKey).toString());
if (!x86GdbserverLocation.length())
x86GdbserverLocation = reader.restoreValue(X86GdbserverLocationKey).toString();
if (x86GdbserverLocation.isEmpty())
x86GdbserverLocation = Utils::FileName::fromString(reader.restoreValue(X86GdbserverLocationKey).toString());
// persistent settings
}
......@@ -188,16 +188,16 @@ void AndroidConfig::save(QSettings &settings) const
settings.setValue(changeTimeStamp, fileInfo.lastModified().toMSecsSinceEpoch() / 1000);
// user settings
settings.setValue(SDKLocationKey, sdkLocation);
settings.setValue(NDKLocationKey, ndkLocation);
settings.setValue(SDKLocationKey, sdkLocation.toString());
settings.setValue(NDKLocationKey, ndkLocation.toString());
settings.setValue(NDKToolchainVersionKey, ndkToolchainVersion);
settings.setValue(AntLocationKey, antLocation);
settings.setValue(OpenJDKLocationKey, openJDKLocation);
settings.setValue(KeystoreLocationKey, keystoreLocation);
settings.setValue(ArmGdbLocationKey, armGdbLocation);
settings.setValue(ArmGdbserverLocationKey, armGdbserverLocation);
settings.setValue(X86GdbLocationKey, x86GdbLocation);
settings.setValue(X86GdbserverLocationKey, x86GdbserverLocation);
settings.setValue(AntLocationKey, antLocation.toString());
settings.setValue(OpenJDKLocationKey, openJDKLocation.toString());
settings.setValue(KeystoreLocationKey, keystoreLocation.toString());
settings.setValue(ArmGdbLocationKey, armGdbLocation.toString());
settings.setValue(ArmGdbserverLocationKey, armGdbserverLocation.toString());
settings.setValue(X86GdbLocationKey, x86GdbLocation.toString());
settings.setValue(X86GdbserverLocationKey, x86GdbserverLocation.toString());
settings.setValue(PartitionSizeKey, partitionSize);
// user settings
......@@ -214,7 +214,7 @@ void AndroidConfigurations::setConfig(const AndroidConfig &devConfigs)
void AndroidConfigurations::updateAvailablePlatforms()
{
m_availablePlatforms.clear();
QDirIterator it(m_config.ndkLocation + QLatin1String("/platforms"), QStringList() << QLatin1String("android-*"), QDir::Dirs);
QDirIterator it(m_config.ndkLocation.appendPath(QLatin1String("platforms")).toString(), QStringList() << QLatin1String("android-*"), QDir::Dirs);
while (it.hasNext()) {
const QString &fileName = it.next();
m_availablePlatforms.push_back(fileName.mid(fileName.lastIndexOf(QLatin1Char('-')) + 1).toInt());
......@@ -226,7 +226,7 @@ QStringList AndroidConfigurations::sdkTargets(int minApiLevel) const
{
QStringList targets;
QProcess proc;
proc.start(androidToolPath(), QStringList() << QLatin1String("list") << QLatin1String("target")); // list avaialbe AVDs
proc.start(androidToolPath().toString(), QStringList() << QLatin1String("list") << QLatin1String("target")); // list avaialbe AVDs
if (!proc.waitForFinished(-1)) {
proc.terminate();
return targets;
......@@ -248,7 +248,8 @@ QStringList AndroidConfigurations::ndkToolchainVersions() const
{
QRegExp versionRegExp(NDKGccVersionRegExp);
QStringList result;
QDirIterator it(m_config.ndkLocation + QLatin1String("/toolchains"),
Utils::FileName path = m_config.ndkLocation;
QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(),
QStringList() << QLatin1String("*"), QDir::Dirs);
while (it.hasNext()) {
const QString &fileName = it.next();
......@@ -262,66 +263,71 @@ QStringList AndroidConfigurations::ndkToolchainVersions() const
return result;
}
QString AndroidConfigurations::adbToolPath() const
Utils::FileName AndroidConfigurations::adbToolPath() const
{
return m_config.sdkLocation + QLatin1String("/platform-tools/adb" ANDROID_EXE_SUFFIX);
Utils::FileName path = m_config.sdkLocation;
return path.appendPath(QLatin1String("platform-tools/adb"ANDROID_EXE_SUFFIX));
}
QString AndroidConfigurations::androidToolPath() const
Utils::FileName AndroidConfigurations::androidToolPath() const
{
#ifdef Q_OS_WIN32
// I want to switch from using android.bat to using an executable. All it really does is call
// Java and I've made some progress on it. So if android.exe exists, return that instead.
QFileInfo fi(m_config.sdkLocation + QLatin1String("/tools/android" ANDROID_EXE_SUFFIX));
if (fi.exists())
return m_config.sdkLocation + QString("/tools/android" ANDROID_EXE_SUFFIX);
else
return m_config.sdkLocation + QLatin1String("/tools/android" ANDROID_BAT_SUFFIX);
Utils::FileName path = m_config.sdkLocation;
path.appendPath(QLatin1String("tools/android"ANDROID_EXE_SUFFIX));
if (path.toFileInfo().exists())
return path;
path = m_config.sdkLocation;
return path.appendPath(QLatin1String("tools/android"ANDROID_BAT_SUFFIX));
#else
return m_config.sdkLocation + QLatin1String("/tools/android" ANDROID_EXE_SUFFIX);
Utils::FileName path = m_config.sdkLocation;
return path.appendPath(QLatin1String("tools/android"ANDROID_EXE_SUFFIX));
#endif
}
QString AndroidConfigurations::antToolPath() const
Utils::FileName AndroidConfigurations::antToolPath() const
{
if (m_config.antLocation.length())
if (!m_config.antLocation.isEmpty())
return m_config.antLocation;
else
return QLatin1String("ant");
return Utils::FileName::fromString(QLatin1String("ant"));
}
QString AndroidConfigurations::emulatorToolPath() const
Utils::FileName AndroidConfigurations::emulatorToolPath() const
{
return m_config.sdkLocation + QLatin1String("/tools/emulator" ANDROID_EXE_SUFFIX);
Utils::FileName path = m_config.sdkLocation;
return path.appendPath(QLatin1String("tools/emulator"ANDROID_EXE_SUFFIX));
}
QString AndroidConfigurations::toolPath(ProjectExplorer::Abi::Architecture architecture) const
Utils::FileName AndroidConfigurations::toolPath(ProjectExplorer::Abi::Architecture architecture) const
{
return m_config.ndkLocation + QString::fromLatin1("/toolchains/%1-%2/prebuilt/%3/bin/%4")
Utils::FileName path = m_config.ndkLocation;
return path.appendPath(QString::fromLatin1("toolchains/%1-%2/prebuilt/%3/bin/%4")
.arg(toolchainPrefix(architecture))
.arg(m_config.ndkToolchainVersion)
.arg(ToolchainHost)
.arg(toolsPrefix(architecture));
.arg(toolsPrefix(architecture)));
}
QString AndroidConfigurations::stripPath(ProjectExplorer::Abi::Architecture architecture) const
Utils::FileName AndroidConfigurations::stripPath(ProjectExplorer::Abi::Architecture architecture) const
{
return toolPath(architecture) + QLatin1String("-strip" ANDROID_EXE_SUFFIX);
return toolPath(architecture).append(QLatin1String("-strip"ANDROID_EXE_SUFFIX));
}
QString AndroidConfigurations::readelfPath(ProjectExplorer::Abi::Architecture architecture) const
Utils::FileName AndroidConfigurations::readelfPath(ProjectExplorer::Abi::Architecture architecture) const
{
return toolPath(architecture) + QLatin1String("-readelf" ANDROID_EXE_SUFFIX);
return toolPath(architecture).append(QLatin1String("-readelf"ANDROID_EXE_SUFFIX));
}
QString AndroidConfigurations::gccPath(ProjectExplorer::Abi::Architecture architecture) const
Utils::FileName AndroidConfigurations::gccPath(ProjectExplorer::Abi::Architecture architecture) const
{
return toolPath(architecture) + QLatin1String("-gcc" ANDROID_EXE_SUFFIX);
return toolPath(architecture).append(QLatin1String("-gcc"ANDROID_EXE_SUFFIX));
}
QString AndroidConfigurations::gdbServerPath(ProjectExplorer::Abi::Architecture architecture) const
Utils::FileName AndroidConfigurations::gdbServerPath(ProjectExplorer::Abi::Architecture architecture) const
{
QString gdbServerPath;
Utils::FileName gdbServerPath;
switch (architecture) {
case ProjectExplorer::Abi::ArmArchitecture:
gdbServerPath = m_config.armGdbserverLocation;
......@@ -330,20 +336,21 @@ QString AndroidConfigurations::gdbServerPath(ProjectExplorer::Abi::Architecture
gdbServerPath = m_config.x86GdbserverLocation;
break;
default:
gdbServerPath = Unknown;
gdbServerPath = Utils::FileName::fromString(Unknown);
break;
}
if (gdbServerPath.length())
if (!gdbServerPath.isEmpty())
return gdbServerPath;
return m_config.ndkLocation + QString::fromLatin1("/toolchains/%1-%2/prebuilt/gdbserver")
.arg(toolchainPrefix(architecture))
.arg(m_config.ndkToolchainVersion);
Utils::FileName path = m_config.ndkLocation;
return path.appendPath(QString::fromLatin1("toolchains/%1-%2/prebuilt/gdbserver")
.arg(toolchainPrefix(architecture))
.arg(m_config.ndkToolchainVersion));
}
QString AndroidConfigurations::gdbPath(ProjectExplorer::Abi::Architecture architecture) const
Utils::FileName AndroidConfigurations::gdbPath(ProjectExplorer::Abi::Architecture architecture) const
{
QString gdbPath;
Utils::FileName gdbPath;
switch (architecture) {
case ProjectExplorer::Abi::ArmArchitecture:
gdbPath = m_config.armGdbLocation;
......@@ -352,45 +359,47 @@ QString AndroidConfigurations::gdbPath(ProjectExplorer::Abi::Architecture archit
gdbPath = m_config.x86GdbLocation;
break;
default:
gdbPath = Unknown;
gdbPath = Utils::FileName::fromString(Unknown);
break;
}
if (!gdbPath.isEmpty())
return gdbPath;
return toolPath(architecture) + QLatin1String("-gdb" ANDROID_EXE_SUFFIX);
return toolPath(architecture).append(QLatin1String("-gdb"ANDROID_EXE_SUFFIX));
}
QString AndroidConfigurations::openJDKPath() const
Utils::FileName AndroidConfigurations::openJDKPath() const
{
return m_config.openJDKLocation;
}
QString AndroidConfigurations::openJDKBinPath() const
Utils::FileName AndroidConfigurations::openJDKBinPath() const
{
if (m_config.openJDKLocation.length())
return m_config.openJDKLocation + QLatin1String("/bin/");
return QString();
Utils::FileName path = m_config.openJDKLocation;
if (!path.isEmpty())
return path.appendPath(QLatin1String("bin"));
return path;
}
QString AndroidConfigurations::keytoolPath() const
Utils::FileName AndroidConfigurations::keytoolPath() const
{
return openJDKBinPath() + keytoolName;
return openJDKBinPath().appendPath(keytoolName);
}
QString AndroidConfigurations::jarsignerPath() const
Utils::FileName AndroidConfigurations::jarsignerPath() const
{
return openJDKBinPath() + jarsignerName;
return openJDKBinPath().appendPath(jarsignerName);
}
QString AndroidConfigurations::getDeployDeviceSerialNumber(int *apiLevel) const
{
QVector<AndroidDevice> devices = connectedDevices();
foreach (AndroidDevice device, devices)
foreach (AndroidDevice device, devices) {
if (device.sdk >= *apiLevel) {
*apiLevel = device.sdk;
return device.serialNumber;
}
}
return startAVD(apiLevel);
}
......@@ -398,7 +407,7 @@ QVector<AndroidDevice> AndroidConfigurations::connectedDevices(int apiLevel) con
{
QVector<AndroidDevice> devices;
QProcess adbProc;
adbProc.start(adbToolPath(), QStringList() << QLatin1String("devices"));
adbProc.start(adbToolPath().toString(), QStringList() << QLatin1String("devices"));
if (!adbProc.waitForFinished(-1)) {
adbProc.terminate();
return devices;
......@@ -443,7 +452,7 @@ bool AndroidConfigurations::createAVD(int minApiLevel) const
bool AndroidConfigurations::createAVD(const QString &target, const QString &name, int sdcardSize ) const
{
QProcess proc;
proc.start(androidToolPath(),
proc.start(androidToolPath().toString(),
QStringList() << QLatin1String("create") << QLatin1String("avd")
<< QLatin1String("-a") << QLatin1String("-t") << target
<< QLatin1String("-n") << name
......@@ -461,7 +470,7 @@ bool AndroidConfigurations::createAVD(const QString &target, const QString &name
bool AndroidConfigurations::removeAVD(const QString &name) const
{
QProcess proc;
proc.start(androidToolPath(),
proc.start(androidToolPath().toString(),
QStringList() << QLatin1String("delete") << QLatin1String("avd")
<< QLatin1String("-n") << name);
if (!proc.waitForFinished(-1)) {
......@@ -475,7 +484,7 @@ QVector<AndroidDevice> AndroidConfigurations::androidVirtualDevices() const
{
QVector<AndroidDevice> devices;
QProcess proc;
proc.start(androidToolPath(),
proc.start(androidToolPath().toString(),
QStringList() << QLatin1String("list") << QLatin1String("avd")); // list available AVDs
if (!proc.waitForFinished(-1)) {
proc.terminate();
......@@ -540,7 +549,7 @@ QString AndroidConfigurations::startAVD(int *apiLevel, const QString &name) cons
return avdName;
// start the emulator
m_avdProcess->start(emulatorToolPath(),
m_avdProcess->start(emulatorToolPath().toString(),
QStringList() << QLatin1String("-partition-size") << QString::number(config().partitionSize)
<< QLatin1String("-avd") << avdName);
if (!m_avdProcess->waitForStarted(-1)) {
......@@ -550,7 +559,7 @@ QString AndroidConfigurations::startAVD(int *apiLevel, const QString &name) cons
// wait until the emulator is online
QProcess proc;
proc.start(adbToolPath(), QStringList() << QLatin1String("-e") << QLatin1String("wait-for-device"));
proc.start(adbToolPath().toString(), QStringList() << QLatin1String("-e") << QLatin1String("wait-for-device"));
if (!proc.waitForFinished(-1)) {
proc.terminate();
return QString();
......@@ -558,7 +567,7 @@ QString AndroidConfigurations::startAVD(int *apiLevel, const QString &name) cons
sleep(5);// wait for pm to start
// workaround for stupid adb bug
proc.start(adbToolPath(), QStringList() << QLatin1String("devices"));
proc.start(adbToolPath().toString(), QStringList() << QLatin1String("devices"));
if (!proc.waitForFinished(-1)) {
proc.terminate();
return QString();
......@@ -577,7 +586,7 @@ int AndroidConfigurations::getSDKVersion(const QString &device) const
{
QProcess adbProc;
adbProc.start(adbToolPath(),
adbProc.start(adbToolPath().toString(),
QStringList() << QLatin1String("-s") << device
<< QLatin1String("shell") << QLatin1String("getprop")
<< QLatin1String("ro.build.version.sdk"));
......
......@@ -67,16 +67,16 @@ public:
AndroidConfig(const QSettings &settings);
void save(QSettings &settings) const;
QString sdkLocation;
QString ndkLocation;
Utils::FileName sdkLocation;
Utils::FileName ndkLocation;
QString ndkToolchainVersion;
QString antLocation;
QString armGdbLocation;
QString armGdbserverLocation;
QString x86GdbLocation;
QString x86GdbserverLocation;
QString openJDKLocation;
QString keystoreLocation;
Utils::FileName antLocation;
Utils::FileName armGdbLocation;
Utils::FileName armGdbserverLocation;
Utils::FileName x86GdbLocation;
Utils::FileName x86GdbserverLocation;
Utils::FileName openJDKLocation;
Utils::FileName keystoreLocation;
unsigned partitionSize;
};
......@@ -97,18 +97,18 @@ public:
void setConfig(const AndroidConfig &config);
QStringList sdkTargets(int minApiLevel = 0) const;
QStringList ndkToolchainVersions() const;
QString adbToolPath() const;
QString androidToolPath() const;
QString antToolPath() const;
QString emulatorToolPath() const;
QString gccPath(ProjectExplorer::Abi::Architecture architecture) const;
QString gdbServerPath(ProjectExplorer::Abi::Architecture architecture) const;
QString gdbPath(ProjectExplorer::Abi::Architecture architecture) const;
QString openJDKPath() const;
QString keytoolPath() const;
QString jarsignerPath() const;
QString stripPath(ProjectExplorer::Abi::Architecture architecture) const;
QString readelfPath(ProjectExplorer::Abi::Architecture architecture) const;
Utils::FileName adbToolPath() const;
Utils::FileName androidToolPath() const;
Utils::FileName antToolPath() const;
Utils::FileName emulatorToolPath() const;