Commit 0a43f097 authored by Daniel Teske's avatar Daniel Teske

Android: Handle cases where the project is unparsed.

Change-Id: If1757fff8ff458610dae8cbfcf561154c7d56753
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent e0783214
......@@ -167,6 +167,10 @@ bool AndroidDeployQtStep::init()
emit addOutput(tr("Found old android folder in source directory. Qt 5.2 does not use that folder by default."), ErrorOutput);
m_targetArch = AndroidManager::targetArch(target());
if (m_targetArch.isEmpty()) {
emit addOutput(tr("No Android arch set by the .pro file."), ErrorOutput);
return false;
}
m_deviceAPILevel = AndroidManager::minimumSDK(target());
AndroidDeviceInfo info = AndroidConfigurations::instance().showDeviceDialog(project(), m_deviceAPILevel, m_targetArch);
if (info.serialNumber.isEmpty()) // aborted
......
......@@ -1195,6 +1195,8 @@ QString AndroidManager::libraryPrefix()
void AndroidManager::cleanLibsOnDevice(ProjectExplorer::Target *target)
{
const QString targetArch = AndroidManager::targetArch(target);
if (targetArch.isEmpty())
return;
int deviceAPILevel = AndroidManager::minimumSDK(target);
AndroidDeviceInfo info = AndroidConfigurations::instance().showDeviceDialog(target->project(), deviceAPILevel, targetArch);
if (info.serialNumber.isEmpty()) // aborted
......@@ -1223,6 +1225,8 @@ void AndroidManager::cleanLibsOnDevice(ProjectExplorer::Target *target)
void AndroidManager::installQASIPackage(ProjectExplorer::Target *target, const QString &packagePath)
{
const QString targetArch = AndroidManager::targetArch(target);
if (targetArch.isEmpty())
return;
int deviceAPILevel = AndroidManager::minimumSDK(target);
AndroidDeviceInfo info = AndroidConfigurations::instance().showDeviceDialog(target->project(), deviceAPILevel, targetArch);
if (info.serialNumber.isEmpty()) // aborted
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment