forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.0'
Conflicts: share/qtcreator/debugger/gdbbridge.py Change-Id: I32d8158c475f927b50ef06fde9ab8189ebdbcbbc
This commit is contained in:
@@ -65,6 +65,8 @@ const char ANDROID_DEVICE_ID[] = "Android Device";
|
||||
const char ANDROID_MANIFEST_MIME_TYPE[] = "application/vnd.google.android.android_manifest";
|
||||
const char ANDROID_MANIFEST_EDITOR_ID[] = "Android.AndroidManifestEditor.Id";
|
||||
const char ANDROID_MANIFEST_EDITOR_CONTEXT[] = "Android.AndroidManifestEditor.Id";
|
||||
|
||||
const char ANDROID_BUILDDIRECTORY[] = "android-build";
|
||||
} // namespace Constants;
|
||||
} // namespace Android
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "javaparser.h"
|
||||
#include "androidmanager.h"
|
||||
#include "androidconstants.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
@@ -232,7 +233,7 @@ bool AndroidDeployQtStep::init()
|
||||
else if (m_deployAction == BundleLibrariesDeployment)
|
||||
deploymentMethod = QLatin1String("bundled");
|
||||
|
||||
QString outputDir = bc->buildDirectory().appendPath(QLatin1String("android")).toString();
|
||||
QString outputDir = bc->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)).toString();
|
||||
|
||||
QStringList arguments;
|
||||
arguments << QLatin1String("--input")
|
||||
@@ -298,6 +299,7 @@ void AndroidDeployQtStep::run(QFutureInterface<bool> &fi)
|
||||
QString serialNumber = AndroidConfigurations::instance().waitForAvd(m_deviceAPILevel, m_targetArch, fi);
|
||||
if (serialNumber.isEmpty()) {
|
||||
fi.reportResult(false);
|
||||
emit finished();
|
||||
return;
|
||||
}
|
||||
m_serialNumber = serialNumber;
|
||||
@@ -492,6 +494,11 @@ void AndroidDeployQtStep::setInputFile(const QString &file)
|
||||
m_inputFile = file;
|
||||
}
|
||||
|
||||
bool AndroidDeployQtStep::runInGuiThread() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AndroidDeployQtStep::verboseOutput() const
|
||||
{
|
||||
return m_verbose;
|
||||
|
||||
@@ -107,6 +107,8 @@ public:
|
||||
QString inputFile() const;
|
||||
void setInputFile(const QString &file);
|
||||
|
||||
bool runInGuiThread() const;
|
||||
|
||||
signals:
|
||||
// also on purpose emitted if the possible values of this changed
|
||||
void inputFileChanged();
|
||||
|
||||
@@ -117,9 +117,8 @@ void AndroidDeployStepWidget::setQASIPackagePath()
|
||||
QString packagePath =
|
||||
QFileDialog::getOpenFileName(this, tr("Qt Android Smart Installer"),
|
||||
QDir::homePath(), tr("Android package (*.apk)"));
|
||||
if (!packagePath.isEmpty()) {
|
||||
if (!packagePath.isEmpty())
|
||||
AndroidManager::installQASIPackage(m_step->target(), packagePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ Utils::FileName AndroidManager::dirPath(ProjectExplorer::Target *target)
|
||||
{
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(target->kit());
|
||||
if (qtVersion && qtVersion->qtVersion() >= QtSupport::QtVersionNumber(5, 2, 0))
|
||||
return target->activeBuildConfiguration()->buildDirectory().appendPath(AndroidDirName);
|
||||
return target->activeBuildConfiguration()->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY));
|
||||
return Utils::FileName::fromString(target->project()->projectDirectory()).appendPath(AndroidDirName);
|
||||
}
|
||||
|
||||
@@ -367,15 +367,13 @@ bool AndroidManager::bundleQt(ProjectExplorer::Target *target)
|
||||
{
|
||||
AndroidDeployStep *androidDeployStep
|
||||
= AndroidGlobal::buildStep<AndroidDeployStep>(target->activeDeployConfiguration());
|
||||
if (androidDeployStep) {
|
||||
if (androidDeployStep)
|
||||
return androidDeployStep->deployAction() == AndroidDeployStep::BundleLibraries;
|
||||
}
|
||||
|
||||
AndroidDeployQtStep *androidDeployQtStep
|
||||
= AndroidGlobal::buildStep<AndroidDeployQtStep>(target->activeDeployConfiguration());
|
||||
if (androidDeployQtStep) {
|
||||
if (androidDeployQtStep)
|
||||
return androidDeployQtStep->deployAction() == AndroidDeployQtStep::BundleLibrariesDeployment;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -789,6 +787,8 @@ QString AndroidManager::androidNameForApiLevel(int x)
|
||||
return QLatin1String("Android 4.2, 4.2.2");
|
||||
case 18:
|
||||
return QLatin1String("Android 4.3");
|
||||
case 19:
|
||||
return QLatin1String("Android 4.4");
|
||||
default:
|
||||
return QLatin1String("Unknown Android version.");
|
||||
}
|
||||
@@ -817,9 +817,8 @@ QVector<AndroidManager::Library> AndroidManager::availableQtLibsWithDependencies
|
||||
if (!qmakeProject || !version)
|
||||
return QVector<AndroidManager::Library>();
|
||||
QString qtLibsPath = version->qmakeProperty("QT_INSTALL_LIBS");
|
||||
if (!readelfPath.toFileInfo().exists()) {
|
||||
if (!readelfPath.toFileInfo().exists())
|
||||
return QVector<AndroidManager::Library>();
|
||||
}
|
||||
LibrariesMap mapLibs;
|
||||
QDir libPath;
|
||||
QDirIterator it(qtLibsPath, QStringList() << QLatin1String("*.so"), QDir::Files, QDirIterator::Subdirectories);
|
||||
@@ -995,9 +994,8 @@ QString AndroidManager::loadLocal(ProjectExplorer::Target *target, int apiLevel,
|
||||
dependencyLib = dependencyLib.arg(apiLevel);
|
||||
if (libElement.hasAttribute(QLatin1String("extends"))) {
|
||||
const QString extends = libElement.attribute(QLatin1String("extends"));
|
||||
if (libs.contains(extends)) {
|
||||
if (libs.contains(extends))
|
||||
dependencyLibs << dependencyLib;
|
||||
}
|
||||
} else if (!dependencyLibs.contains(dependencyLib)) {
|
||||
dependencyLibs << dependencyLib;
|
||||
}
|
||||
|
||||
@@ -455,9 +455,8 @@ void AndroidManifestEditorWidget::initializePage()
|
||||
bool AndroidManifestEditorWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
if (obj == m_targetLineEdit) {
|
||||
if (event->type() == QEvent::FocusIn) {
|
||||
if (event->type() == QEvent::FocusIn)
|
||||
QTimer::singleShot(0, this, SLOT(updateTargetComboBox()));
|
||||
}
|
||||
}
|
||||
|
||||
if (obj == m_overlayWidget)
|
||||
@@ -561,9 +560,8 @@ bool AndroidManifestEditorWidget::setActivePage(EditorPage page)
|
||||
syncToEditor();
|
||||
setFocus();
|
||||
} else {
|
||||
if (!syncToWidgets()) {
|
||||
if (!syncToWidgets())
|
||||
return false;
|
||||
}
|
||||
|
||||
QWidget *fw = m_overlayWidget->focusWidget();
|
||||
if (fw && fw != m_overlayWidget)
|
||||
@@ -874,7 +872,7 @@ int extractVersion(const QString &string)
|
||||
int index = string.indexOf(QLatin1Char(':'));
|
||||
if (index == -1)
|
||||
return 0;
|
||||
#if QT_VERSION < 0x050000
|
||||
#if QT_VERSION < 0x050100
|
||||
return string.mid(4, index - 4).toInt();
|
||||
#else
|
||||
return string.midRef(4, index - 4).toInt();
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "androidpackageinstallationstep.h"
|
||||
#include "androidmanager.h"
|
||||
#include "androidconstants.h"
|
||||
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/target.h>
|
||||
@@ -69,7 +70,7 @@ bool AndroidPackageInstallationStep::init()
|
||||
if (m_androidDirectory == ProjectDirectory)
|
||||
dirPath = AndroidManager::dirPath(target()).toString();
|
||||
else
|
||||
dirPath = bc->buildDirectory().appendPath((QLatin1String("android"))).toString();
|
||||
dirPath = bc->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)).toString();
|
||||
if (Utils::HostOsInfo::isWindowsHost())
|
||||
if (bc->environment().searchInPath(QLatin1String("sh.exe")).isEmpty())
|
||||
dirPath = QDir::toNativeSeparators(dirPath);
|
||||
|
||||
@@ -146,10 +146,12 @@ QString AndroidSettingsWidget::searchKeywords() const
|
||||
void AndroidSettingsWidget::initGui()
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
if (checkSDK(m_androidConfig.sdkLocation))
|
||||
if (checkSDK(m_androidConfig.sdkLocation)) {
|
||||
m_ui->SDKLocationLineEdit->setText(m_androidConfig.sdkLocation.toUserOutput());
|
||||
else
|
||||
} else {
|
||||
m_androidConfig.sdkLocation.clear();
|
||||
m_ui->AVDManagerFrame->setEnabled(false);
|
||||
}
|
||||
if (checkNDK(m_androidConfig.ndkLocation))
|
||||
m_ui->NDKLocationLineEdit->setText(m_androidConfig.ndkLocation.toUserOutput());
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user