forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.13' into master
Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/cmakeprojectmanager/cmakebuildstep.cpp src/plugins/cmakeprojectmanager/cmakebuildstep.h tests/auto/debugger/tst_namedemangler.cpp tests/auto/qml/codemodel/check/tst_check.cpp Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "androidavdmanager.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/runextensions.h>
|
||||
@@ -424,8 +425,8 @@ AndroidDeviceInfoList AvdManagerOutputParser::parseAvdList(const QString &output
|
||||
}
|
||||
} else if (parseAvd(avdInfo, &avd)) {
|
||||
// armeabi-v7a devices can also run armeabi code
|
||||
if (avd.cpuAbi.contains("armeabi-v7a"))
|
||||
avd.cpuAbi << "armeabi";
|
||||
if (avd.cpuAbi.contains(ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A))
|
||||
avd.cpuAbi << ProjectExplorer::Constants::ANDROID_ABI_ARMEABI;
|
||||
avd.state = AndroidDeviceInfo::OkState;
|
||||
avd.type = AndroidDeviceInfo::Emulator;
|
||||
avdList << avd;
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include <QComboBox>
|
||||
#include <QGroupBox>
|
||||
#include <QFileDialog>
|
||||
#include <QFormLayout>
|
||||
#include <QLabel>
|
||||
#include <QListView>
|
||||
#include <QPushButton>
|
||||
@@ -74,7 +75,6 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
|
||||
vbox->addWidget(createSignPackageGroup());
|
||||
vbox->addWidget(createApplicationGroup());
|
||||
vbox->addWidget(createAdvancedGroup());
|
||||
vbox->addWidget(createCreateTemplatesGroup());
|
||||
vbox->addWidget(createAdditionalLibrariesGroup());
|
||||
|
||||
connect(m_step->buildConfiguration(), &BuildConfiguration::buildTypeChanged,
|
||||
@@ -96,7 +96,7 @@ QWidget *AndroidBuildApkWidget::createApplicationGroup()
|
||||
|
||||
auto group = new QGroupBox(tr("Application"), this);
|
||||
|
||||
auto targetSDKComboBox = new QComboBox(group);
|
||||
auto targetSDKComboBox = new QComboBox();
|
||||
targetSDKComboBox->addItems(targets);
|
||||
targetSDKComboBox->setCurrentIndex(targets.indexOf(m_step->buildTargetSdk()));
|
||||
|
||||
@@ -107,9 +107,18 @@ QWidget *AndroidBuildApkWidget::createApplicationGroup()
|
||||
AndroidManager::updateGradleProperties(step()->target(), QString()); // FIXME: Use real key.
|
||||
});
|
||||
|
||||
auto hbox = new QHBoxLayout(group);
|
||||
hbox->addWidget(new QLabel(tr("Android build SDK:"), group));
|
||||
hbox->addWidget(targetSDKComboBox);
|
||||
auto formLayout = new QFormLayout(group);
|
||||
formLayout->addRow(tr("Android build SDK:"), targetSDKComboBox);
|
||||
|
||||
auto createAndroidTemplatesButton = new QPushButton(tr("Create Templates"));
|
||||
createAndroidTemplatesButton->setToolTip(
|
||||
tr("Create an Android package for Custom Java code, assets, and Gradle configurations."));
|
||||
connect(createAndroidTemplatesButton, &QAbstractButton::clicked, this, [this] {
|
||||
CreateAndroidManifestWizard wizard(m_step->buildSystem());
|
||||
wizard.exec();
|
||||
});
|
||||
|
||||
formLayout->addRow(tr("Android customization:"), createAndroidTemplatesButton);
|
||||
|
||||
return group;
|
||||
}
|
||||
@@ -120,7 +129,7 @@ QWidget *AndroidBuildApkWidget::createSignPackageGroup()
|
||||
sizePolicy.setHorizontalStretch(0);
|
||||
sizePolicy.setVerticalStretch(0);
|
||||
|
||||
auto group = new QGroupBox(tr("Sign package"), this);
|
||||
auto group = new QGroupBox(tr("Application Signature"), this);
|
||||
|
||||
auto keystoreLocationLabel = new QLabel(tr("Keystore:"), group);
|
||||
keystoreLocationLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
|
||||
@@ -242,24 +251,6 @@ QWidget *AndroidBuildApkWidget::createAdvancedGroup()
|
||||
return group;
|
||||
}
|
||||
|
||||
QWidget *AndroidBuildApkWidget::createCreateTemplatesGroup()
|
||||
{
|
||||
auto createTemplatesGroupBox = new QGroupBox(tr("Android"));
|
||||
createTemplatesGroupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
|
||||
auto createAndroidTemplatesButton = new QPushButton(tr("Create Templates"));
|
||||
connect(createAndroidTemplatesButton, &QAbstractButton::clicked, this, [this] {
|
||||
CreateAndroidManifestWizard wizard(m_step->buildSystem());
|
||||
wizard.exec();
|
||||
});
|
||||
|
||||
auto horizontalLayout = new QHBoxLayout(createTemplatesGroupBox);
|
||||
horizontalLayout->addWidget(createAndroidTemplatesButton);
|
||||
horizontalLayout->addStretch(1);
|
||||
|
||||
return createTemplatesGroupBox;
|
||||
}
|
||||
|
||||
QWidget *AndroidBuildApkWidget::createAdditionalLibrariesGroup()
|
||||
{
|
||||
auto group = new QGroupBox(tr("Additional Libraries"));
|
||||
|
||||
@@ -63,7 +63,6 @@ private:
|
||||
QWidget *createApplicationGroup();
|
||||
QWidget *createSignPackageGroup();
|
||||
QWidget *createAdvancedGroup();
|
||||
QWidget *createCreateTemplatesGroup();
|
||||
QWidget *createAdditionalLibrariesGroup();
|
||||
|
||||
private:
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
|
||||
@@ -1284,7 +1285,12 @@ void AndroidConfigurations::removeUnusedDebuggers()
|
||||
|
||||
static bool containsAllAbis(const QStringList &abis)
|
||||
{
|
||||
QStringList supportedAbis{"armeabi-v7a", "arm64-v8a", "x86", "x86_64"};
|
||||
QStringList supportedAbis{
|
||||
ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A,
|
||||
ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A,
|
||||
ProjectExplorer::Constants::ANDROID_ABI_X86,
|
||||
ProjectExplorer::Constants::ANDROID_ABI_X86_64,
|
||||
};
|
||||
for (const QString &abi : abis)
|
||||
if (supportedAbis.contains(abi))
|
||||
supportedAbis.removeOne(abi);
|
||||
@@ -1524,6 +1530,21 @@ AndroidConfigurations::AndroidConfigurations()
|
||||
|
||||
AndroidConfigurations::~AndroidConfigurations() = default;
|
||||
|
||||
static Utils::FilePath androidStudioPath()
|
||||
{
|
||||
if (Utils::HostOsInfo::isWindowsHost()) {
|
||||
const QLatin1String registryKey("HKEY_LOCAL_MACHINE\\SOFTWARE\\Android Studio");
|
||||
const QLatin1String valueName("Path");
|
||||
#if defined(Q_OS_WIN)
|
||||
const QSettings settings64(registryKey, QSettings::Registry64Format);
|
||||
const QSettings settings32(registryKey, QSettings::Registry32Format);
|
||||
return Utils::FilePath::fromUserInput(
|
||||
settings64.value(valueName, settings32.value(valueName).toString()).toString());
|
||||
#endif
|
||||
}
|
||||
return {}; // TODO non-Windows
|
||||
}
|
||||
|
||||
FilePath AndroidConfig::getJdkPath()
|
||||
{
|
||||
FilePath jdkHome;
|
||||
@@ -1563,6 +1584,16 @@ FilePath AndroidConfig::getJdkPath()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Nothing found yet? Let's try finding Android Studio's jdk
|
||||
if (jdkHome.isEmpty()) {
|
||||
const Utils::FilePath androidStudioSdkPath = androidStudioPath();
|
||||
if (!androidStudioSdkPath.isEmpty()) {
|
||||
const Utils::FilePath androidStudioSdkJrePath = androidStudioSdkPath / "jre";
|
||||
if (androidStudioSdkJrePath.exists())
|
||||
jdkHome = androidStudioSdkJrePath;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
QStringList args;
|
||||
if (HostOsInfo::isMacHost())
|
||||
@@ -1581,7 +1612,8 @@ FilePath AndroidConfig::getJdkPath()
|
||||
jdkHome = FilePath::fromUtf8(jdkPath);
|
||||
} else {
|
||||
jdkPath.replace("bin/java", ""); // For OpenJDK 11
|
||||
jdkPath.replace("jre/bin/java", "");
|
||||
jdkPath.replace("jre", "");
|
||||
jdkPath.replace("//", "/");
|
||||
jdkHome = FilePath::fromUtf8(jdkPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ const char JAVA_MIMETYPE[] = "text/x-java";
|
||||
const char ANDROID_ARCHITECTURE[] = "Android.Architecture";
|
||||
const char ANDROID_PACKAGE_SOURCE_DIR[] = "AndroidPackageSourceDir";
|
||||
const char ANDROID_EXTRA_LIBS[] = "AndroidExtraLibs";
|
||||
const char ANDROID_ABIS[] = "ANDROID_ABIS";
|
||||
|
||||
const char ANDROID_PACKAGENAME[] = "Android.PackageName";
|
||||
const char ANDROID_PACKAGE_INSTALLATION_STEP_ID[]
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <coreplugin/messagemanager.h>
|
||||
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
#include <projectexplorer/buildsystem.h>
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/project.h>
|
||||
@@ -145,7 +146,7 @@ AndroidDeployQtStep::AndroidDeployQtStep(BuildStepList *parent, Utils::Id id)
|
||||
m_uninstallPreviousPackage = qt && qt->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0);
|
||||
|
||||
//: AndroidDeployQtStep default display name
|
||||
setDefaultDisplayName(tr("Deploy to Android device"));
|
||||
setDefaultDisplayName(tr("Deploy to Android Device"));
|
||||
|
||||
connect(this, &AndroidDeployQtStep::askForUninstall,
|
||||
this, &AndroidDeployQtStep::slotAskForUninstall,
|
||||
@@ -207,6 +208,18 @@ bool AndroidDeployQtStep::init()
|
||||
if (!info.isValid()) // aborted
|
||||
return false;
|
||||
|
||||
const QString buildKey = target()->activeBuildKey();
|
||||
auto selectedAbis = buildSystem()->extraData(buildKey, Constants::ANDROID_ABIS).toStringList();
|
||||
|
||||
if (!selectedAbis.contains(info.cpuAbi.first())) {
|
||||
Core::MessageManager::write(
|
||||
tr("Android: The main ABI of the deployment device (%1) is not selected! The app "
|
||||
"execution or debugging might not work properly. Add it from Projects > Build > "
|
||||
"Build Steps > qmake > ABIs.")
|
||||
.arg(info.cpuAbi.first()),
|
||||
Core::MessageManager::WithFocus);
|
||||
}
|
||||
|
||||
m_avdName = info.avdname;
|
||||
m_serialNumber = info.serialNumber;
|
||||
qCDebug(deployStepLog) << "Selected device info:" << info;
|
||||
@@ -484,7 +497,8 @@ void AndroidDeployQtStep::gatherFilesToPull()
|
||||
QString linkerName("linker");
|
||||
QString libDirName("lib");
|
||||
auto preferreABI = AndroidManager::apkDevicePreferredAbi(target());
|
||||
if (preferreABI == "arm64-v8a" || preferreABI == "x86_64") {
|
||||
if (preferreABI == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A
|
||||
|| preferreABI == ProjectExplorer::Constants::ANDROID_ABI_X86_64) {
|
||||
m_filesToPull["/system/bin/app_process64"] = buildDir + "app_process";
|
||||
libDirName = "lib64";
|
||||
linkerName = "linker64";
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectnodes.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
@@ -262,11 +263,11 @@ QStringList AndroidManager::applicationAbis(const Target *target)
|
||||
|
||||
QString AndroidManager::archTriplet(const QString &abi)
|
||||
{
|
||||
if (abi == "x86") {
|
||||
if (abi == ProjectExplorer::Constants::ANDROID_ABI_X86) {
|
||||
return {"i686-linux-android"};
|
||||
} else if (abi == "x86_64") {
|
||||
} else if (abi == ProjectExplorer::Constants::ANDROID_ABI_X86_64) {
|
||||
return {"x86_64-linux-android"};
|
||||
} else if (abi == "arm64-v8a") {
|
||||
} else if (abi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A) {
|
||||
return {"aarch64-linux-android"};
|
||||
}
|
||||
return {"arm-linux-androideabi"};
|
||||
@@ -361,25 +362,25 @@ QString AndroidManager::devicePreferredAbi(const QStringList &deviceAbis, const
|
||||
|
||||
Abi AndroidManager::androidAbi2Abi(const QString &androidAbi)
|
||||
{
|
||||
if (androidAbi == "arm64-v8a") {
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A) {
|
||||
return Abi{Abi::Architecture::ArmArchitecture,
|
||||
Abi::OS::LinuxOS,
|
||||
Abi::OSFlavor::AndroidLinuxFlavor,
|
||||
Abi::BinaryFormat::ElfFormat,
|
||||
64, androidAbi};
|
||||
} else if (androidAbi == "armeabi-v7a") {
|
||||
} else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A) {
|
||||
return Abi{Abi::Architecture::ArmArchitecture,
|
||||
Abi::OS::LinuxOS,
|
||||
Abi::OSFlavor::AndroidLinuxFlavor,
|
||||
Abi::BinaryFormat::ElfFormat,
|
||||
32, androidAbi};
|
||||
} else if (androidAbi == "x86_64") {
|
||||
} else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_X86_64) {
|
||||
return Abi{Abi::Architecture::X86Architecture,
|
||||
Abi::OS::LinuxOS,
|
||||
Abi::OSFlavor::AndroidLinuxFlavor,
|
||||
Abi::BinaryFormat::ElfFormat,
|
||||
64, androidAbi};
|
||||
} else if (androidAbi == "x86") {
|
||||
} else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_X86) {
|
||||
return Abi{Abi::Architecture::X86Architecture,
|
||||
Abi::OS::LinuxOS,
|
||||
Abi::OSFlavor::AndroidLinuxFlavor,
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include <QVector>
|
||||
#include <QWidget>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
namespace TextEditor {
|
||||
class TextEditorWidget;
|
||||
}
|
||||
@@ -40,6 +42,8 @@ class AndroidManifestEditorIconWidget;
|
||||
|
||||
class AndroidManifestEditorIconContainerWidget : public QWidget
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Android::Internal::AndroidManifestEditorIconContainerWidget)
|
||||
|
||||
public:
|
||||
explicit AndroidManifestEditorIconContainerWidget(QWidget *parent,
|
||||
TextEditor::TextEditorWidget *textEditorWidget);
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
#include <QFormLayout>
|
||||
#include <QGroupBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QImage>
|
||||
#include <QLabel>
|
||||
@@ -134,338 +133,351 @@ AndroidManifestEditorWidget::AndroidManifestEditorWidget()
|
||||
this, &AndroidManifestEditorWidget::updateAfterFileLoad);
|
||||
}
|
||||
|
||||
QGroupBox *AndroidManifestEditorWidget::createPermissionsGroupBox(QWidget *parent)
|
||||
{
|
||||
auto permissionsGroupBox = new QGroupBox(parent);
|
||||
permissionsGroupBox->setTitle(tr("Permissions"));
|
||||
auto layout = new QGridLayout(permissionsGroupBox);
|
||||
|
||||
m_defaultPermissonsCheckBox = new QCheckBox(this);
|
||||
m_defaultPermissonsCheckBox->setText(tr("Include default permissions for Qt modules."));
|
||||
layout->addWidget(m_defaultPermissonsCheckBox, 0, 0);
|
||||
|
||||
m_defaultFeaturesCheckBox = new QCheckBox(this);
|
||||
m_defaultFeaturesCheckBox->setText(tr("Include default features for Qt modules."));
|
||||
layout->addWidget(m_defaultFeaturesCheckBox, 1, 0);
|
||||
|
||||
m_permissionsComboBox = new QComboBox(permissionsGroupBox);
|
||||
m_permissionsComboBox->insertItems(0, QStringList()
|
||||
<< QLatin1String("android.permission.ACCESS_CHECKIN_PROPERTIES")
|
||||
<< QLatin1String("android.permission.ACCESS_COARSE_LOCATION")
|
||||
<< QLatin1String("android.permission.ACCESS_FINE_LOCATION")
|
||||
<< QLatin1String("android.permission.ACCESS_LOCATION_EXTRA_COMMANDS")
|
||||
<< QLatin1String("android.permission.ACCESS_MOCK_LOCATION")
|
||||
<< QLatin1String("android.permission.ACCESS_NETWORK_STATE")
|
||||
<< QLatin1String("android.permission.ACCESS_SURFACE_FLINGER")
|
||||
<< QLatin1String("android.permission.ACCESS_WIFI_STATE")
|
||||
<< QLatin1String("android.permission.ACCOUNT_MANAGER")
|
||||
<< QLatin1String("com.android.voicemail.permission.ADD_VOICEMAIL")
|
||||
<< QLatin1String("android.permission.AUTHENTICATE_ACCOUNTS")
|
||||
<< QLatin1String("android.permission.BATTERY_STATS")
|
||||
<< QLatin1String("android.permission.BIND_ACCESSIBILITY_SERVICE")
|
||||
<< QLatin1String("android.permission.BIND_APPWIDGET")
|
||||
<< QLatin1String("android.permission.BIND_DEVICE_ADMIN")
|
||||
<< QLatin1String("android.permission.BIND_INPUT_METHOD")
|
||||
<< QLatin1String("android.permission.BIND_REMOTEVIEWS")
|
||||
<< QLatin1String("android.permission.BIND_TEXT_SERVICE")
|
||||
<< QLatin1String("android.permission.BIND_VPN_SERVICE")
|
||||
<< QLatin1String("android.permission.BIND_WALLPAPER")
|
||||
<< QLatin1String("android.permission.BLUETOOTH")
|
||||
<< QLatin1String("android.permission.BLUETOOTH_ADMIN")
|
||||
<< QLatin1String("android.permission.BRICK")
|
||||
<< QLatin1String("android.permission.BROADCAST_PACKAGE_REMOVED")
|
||||
<< QLatin1String("android.permission.BROADCAST_SMS")
|
||||
<< QLatin1String("android.permission.BROADCAST_STICKY")
|
||||
<< QLatin1String("android.permission.BROADCAST_WAP_PUSH")
|
||||
<< QLatin1String("android.permission.CALL_PHONE")
|
||||
<< QLatin1String("android.permission.CALL_PRIVILEGED")
|
||||
<< QLatin1String("android.permission.CAMERA")
|
||||
<< QLatin1String("android.permission.CHANGE_COMPONENT_ENABLED_STATE")
|
||||
<< QLatin1String("android.permission.CHANGE_CONFIGURATION")
|
||||
<< QLatin1String("android.permission.CHANGE_NETWORK_STATE")
|
||||
<< QLatin1String("android.permission.CHANGE_WIFI_MULTICAST_STATE")
|
||||
<< QLatin1String("android.permission.CHANGE_WIFI_STATE")
|
||||
<< QLatin1String("android.permission.CLEAR_APP_CACHE")
|
||||
<< QLatin1String("android.permission.CLEAR_APP_USER_DATA")
|
||||
<< QLatin1String("android.permission.CONTROL_LOCATION_UPDATES")
|
||||
<< QLatin1String("android.permission.DELETE_CACHE_FILES")
|
||||
<< QLatin1String("android.permission.DELETE_PACKAGES")
|
||||
<< QLatin1String("android.permission.DEVICE_POWER")
|
||||
<< QLatin1String("android.permission.DIAGNOSTIC")
|
||||
<< QLatin1String("android.permission.DISABLE_KEYGUARD")
|
||||
<< QLatin1String("android.permission.DUMP")
|
||||
<< QLatin1String("android.permission.EXPAND_STATUS_BAR")
|
||||
<< QLatin1String("android.permission.FACTORY_TEST")
|
||||
<< QLatin1String("android.permission.FLASHLIGHT")
|
||||
<< QLatin1String("android.permission.FORCE_BACK")
|
||||
<< QLatin1String("android.permission.GET_ACCOUNTS")
|
||||
<< QLatin1String("android.permission.GET_PACKAGE_SIZE")
|
||||
<< QLatin1String("android.permission.GET_TASKS")
|
||||
<< QLatin1String("android.permission.GLOBAL_SEARCH")
|
||||
<< QLatin1String("android.permission.HARDWARE_TEST")
|
||||
<< QLatin1String("android.permission.INJECT_EVENTS")
|
||||
<< QLatin1String("android.permission.INSTALL_LOCATION_PROVIDER")
|
||||
<< QLatin1String("android.permission.INSTALL_PACKAGES")
|
||||
<< QLatin1String("android.permission.INTERNAL_SYSTEM_WINDOW")
|
||||
<< QLatin1String("android.permission.INTERNET")
|
||||
<< QLatin1String("android.permission.KILL_BACKGROUND_PROCESSES")
|
||||
<< QLatin1String("android.permission.MANAGE_ACCOUNTS")
|
||||
<< QLatin1String("android.permission.MANAGE_APP_TOKENS")
|
||||
<< QLatin1String("android.permission.MASTER_CLEAR")
|
||||
<< QLatin1String("android.permission.MODIFY_AUDIO_SETTINGS")
|
||||
<< QLatin1String("android.permission.MODIFY_PHONE_STATE")
|
||||
<< QLatin1String("android.permission.MOUNT_FORMAT_FILESYSTEMS")
|
||||
<< QLatin1String("android.permission.MOUNT_UNMOUNT_FILESYSTEMS")
|
||||
<< QLatin1String("android.permission.NFC")
|
||||
<< QLatin1String("android.permission.PERSISTENT_ACTIVITY")
|
||||
<< QLatin1String("android.permission.PROCESS_OUTGOING_CALLS")
|
||||
<< QLatin1String("android.permission.READ_CALENDAR")
|
||||
<< QLatin1String("android.permission.READ_CALL_LOG")
|
||||
<< QLatin1String("android.permission.READ_CONTACTS")
|
||||
<< QLatin1String("android.permission.READ_EXTERNAL_STORAGE")
|
||||
<< QLatin1String("android.permission.READ_FRAME_BUFFER")
|
||||
<< QLatin1String("com.android.browser.permission.READ_HISTORY_BOOKMARKS")
|
||||
<< QLatin1String("android.permission.READ_INPUT_STATE")
|
||||
<< QLatin1String("android.permission.READ_LOGS")
|
||||
<< QLatin1String("android.permission.READ_PHONE_STATE")
|
||||
<< QLatin1String("android.permission.READ_PROFILE")
|
||||
<< QLatin1String("android.permission.READ_SMS")
|
||||
<< QLatin1String("android.permission.READ_SOCIAL_STREAM")
|
||||
<< QLatin1String("android.permission.READ_SYNC_SETTINGS")
|
||||
<< QLatin1String("android.permission.READ_SYNC_STATS")
|
||||
<< QLatin1String("android.permission.READ_USER_DICTIONARY")
|
||||
<< QLatin1String("android.permission.REBOOT")
|
||||
<< QLatin1String("android.permission.RECEIVE_BOOT_COMPLETED")
|
||||
<< QLatin1String("android.permission.RECEIVE_MMS")
|
||||
<< QLatin1String("android.permission.RECEIVE_SMS")
|
||||
<< QLatin1String("android.permission.RECEIVE_WAP_PUSH")
|
||||
<< QLatin1String("android.permission.RECORD_AUDIO")
|
||||
<< QLatin1String("android.permission.REORDER_TASKS")
|
||||
<< QLatin1String("android.permission.RESTART_PACKAGES")
|
||||
<< QLatin1String("android.permission.SEND_SMS")
|
||||
<< QLatin1String("android.permission.SET_ACTIVITY_WATCHER")
|
||||
<< QLatin1String("com.android.alarm.permission.SET_ALARM")
|
||||
<< QLatin1String("android.permission.SET_ALWAYS_FINISH")
|
||||
<< QLatin1String("android.permission.SET_ANIMATION_SCALE")
|
||||
<< QLatin1String("android.permission.SET_DEBUG_APP")
|
||||
<< QLatin1String("android.permission.SET_ORIENTATION")
|
||||
<< QLatin1String("android.permission.SET_POINTER_SPEED")
|
||||
<< QLatin1String("android.permission.SET_PREFERRED_APPLICATIONS")
|
||||
<< QLatin1String("android.permission.SET_PROCESS_LIMIT")
|
||||
<< QLatin1String("android.permission.SET_TIME")
|
||||
<< QLatin1String("android.permission.SET_TIME_ZONE")
|
||||
<< QLatin1String("android.permission.SET_WALLPAPER")
|
||||
<< QLatin1String("android.permission.SET_WALLPAPER_HINTS")
|
||||
<< QLatin1String("android.permission.SIGNAL_PERSISTENT_PROCESSES")
|
||||
<< QLatin1String("android.permission.STATUS_BAR")
|
||||
<< QLatin1String("android.permission.SUBSCRIBED_FEEDS_READ")
|
||||
<< QLatin1String("android.permission.SUBSCRIBED_FEEDS_WRITE")
|
||||
<< QLatin1String("android.permission.SYSTEM_ALERT_WINDOW")
|
||||
<< QLatin1String("android.permission.UPDATE_DEVICE_STATS")
|
||||
<< QLatin1String("android.permission.USE_CREDENTIALS")
|
||||
<< QLatin1String("android.permission.USE_SIP")
|
||||
<< QLatin1String("android.permission.VIBRATE")
|
||||
<< QLatin1String("android.permission.WAKE_LOCK")
|
||||
<< QLatin1String("android.permission.WRITE_APN_SETTINGS")
|
||||
<< QLatin1String("android.permission.WRITE_CALENDAR")
|
||||
<< QLatin1String("android.permission.WRITE_CALL_LOG")
|
||||
<< QLatin1String("android.permission.WRITE_CONTACTS")
|
||||
<< QLatin1String("android.permission.WRITE_EXTERNAL_STORAGE")
|
||||
<< QLatin1String("android.permission.WRITE_GSERVICES")
|
||||
<< QLatin1String("com.android.browser.permission.WRITE_HISTORY_BOOKMARKS")
|
||||
<< QLatin1String("android.permission.WRITE_PROFILE")
|
||||
<< QLatin1String("android.permission.WRITE_SECURE_SETTINGS")
|
||||
<< QLatin1String("android.permission.WRITE_SETTINGS")
|
||||
<< QLatin1String("android.permission.WRITE_SMS")
|
||||
<< QLatin1String("android.permission.WRITE_SOCIAL_STREAM")
|
||||
<< QLatin1String("android.permission.WRITE_SYNC_SETTINGS")
|
||||
<< QLatin1String("android.permission.WRITE_USER_DICTIONARY")
|
||||
);
|
||||
m_permissionsComboBox->setEditable(true);
|
||||
layout->addWidget(m_permissionsComboBox, 2, 0);
|
||||
|
||||
m_addPermissionButton = new QPushButton(permissionsGroupBox);
|
||||
m_addPermissionButton->setText(tr("Add"));
|
||||
layout->addWidget(m_addPermissionButton, 2, 1);
|
||||
|
||||
m_permissionsModel = new PermissionsModel(this);
|
||||
|
||||
m_permissionsListView = new QListView(permissionsGroupBox);
|
||||
m_permissionsListView->setModel(m_permissionsModel);
|
||||
layout->addWidget(m_permissionsListView, 3, 0, 3, 1);
|
||||
|
||||
m_removePermissionButton = new QPushButton(permissionsGroupBox);
|
||||
m_removePermissionButton->setText(tr("Remove"));
|
||||
layout->addWidget(m_removePermissionButton, 3, 1);
|
||||
|
||||
permissionsGroupBox->setLayout(layout);
|
||||
|
||||
connect(m_defaultPermissonsCheckBox, &QCheckBox::stateChanged,
|
||||
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
|
||||
connect(m_defaultFeaturesCheckBox, &QCheckBox::stateChanged,
|
||||
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
|
||||
|
||||
connect(m_addPermissionButton, &QAbstractButton::clicked,
|
||||
this, &AndroidManifestEditorWidget::addPermission);
|
||||
connect(m_removePermissionButton, &QAbstractButton::clicked,
|
||||
this, &AndroidManifestEditorWidget::removePermission);
|
||||
connect(m_permissionsComboBox, &QComboBox::currentTextChanged,
|
||||
this, &AndroidManifestEditorWidget::updateAddRemovePermissionButtons);
|
||||
|
||||
return permissionsGroupBox;
|
||||
}
|
||||
|
||||
QGroupBox *AndroidManifestEditorWidget::createPackageFormLayout(QWidget *parent)
|
||||
{
|
||||
auto packageGroupBox = new QGroupBox(parent);
|
||||
packageGroupBox->setTitle(tr("Package"));
|
||||
auto formLayout = new QFormLayout();
|
||||
|
||||
m_packageNameLineEdit = new QLineEdit(packageGroupBox);
|
||||
m_packageNameLineEdit->setToolTip(tr(
|
||||
"<p align=\"justify\">Please choose a valid package name for your application (for "
|
||||
"example, \"org.example.myapplication\").</p><p align=\"justify\">Packages are usually "
|
||||
"defined using a hierarchical naming pattern, with levels in the hierarchy separated "
|
||||
"by periods (.) (pronounced \"dot\").</p><p align=\"justify\">In general, a package "
|
||||
"name begins with the top level domain name of the organization and then the "
|
||||
"organization's domain and then any subdomains listed in reverse order. The "
|
||||
"organization can then choose a specific name for their package. Package names should "
|
||||
"be all lowercase characters whenever possible.</p><p align=\"justify\">Complete "
|
||||
"conventions for disambiguating package names and rules for naming packages when the "
|
||||
"Internet domain name cannot be directly used as a package name are described in "
|
||||
"section 7.7 of the Java Language Specification.</p>"));
|
||||
formLayout->addRow(tr("Package name:"), m_packageNameLineEdit);
|
||||
|
||||
m_packageNameWarning = new QLabel;
|
||||
m_packageNameWarning->setText(tr("The package name is not valid."));
|
||||
m_packageNameWarning->setVisible(false);
|
||||
|
||||
m_packageNameWarningIcon = new QLabel;
|
||||
m_packageNameWarningIcon->setPixmap(Utils::Icons::WARNING.pixmap());
|
||||
m_packageNameWarningIcon->setVisible(false);
|
||||
m_packageNameWarningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
|
||||
auto warningRow = new QHBoxLayout;
|
||||
warningRow->setContentsMargins(0, 0, 0, 0);
|
||||
warningRow->addWidget(m_packageNameWarningIcon);
|
||||
warningRow->addWidget(m_packageNameWarning);
|
||||
|
||||
formLayout->addRow(QString(), warningRow);
|
||||
|
||||
m_versionCodeLineEdit = new QLineEdit(packageGroupBox);
|
||||
formLayout->addRow(tr("Version code:"), m_versionCodeLineEdit);
|
||||
|
||||
m_versionNameLinedit = new QLineEdit(packageGroupBox);
|
||||
formLayout->addRow(tr("Version name:"), m_versionNameLinedit);
|
||||
|
||||
m_androidMinSdkVersion = new QComboBox(packageGroupBox);
|
||||
m_androidMinSdkVersion->setToolTip(
|
||||
tr("Sets the minimum required version on which this application can be run."));
|
||||
m_androidMinSdkVersion->addItem(tr("Not set"), 0);
|
||||
|
||||
formLayout->addRow(tr("Minimum required SDK:"), m_androidMinSdkVersion);
|
||||
|
||||
m_androidTargetSdkVersion = new QComboBox(packageGroupBox);
|
||||
m_androidTargetSdkVersion->setToolTip(
|
||||
tr("Sets the target SDK. Set this to the highest tested version. "
|
||||
"This disables compatibility behavior of the system for your application."));
|
||||
m_androidTargetSdkVersion->addItem(tr("Not set"), 0);
|
||||
|
||||
formLayout->addRow(tr("Target SDK:"), m_androidTargetSdkVersion);
|
||||
|
||||
packageGroupBox->setLayout(formLayout);
|
||||
|
||||
updateSdkVersions();
|
||||
|
||||
connect(m_packageNameLineEdit, &QLineEdit::textEdited,
|
||||
this, &AndroidManifestEditorWidget::setPackageName);
|
||||
connect(m_versionCodeLineEdit, &QLineEdit::textEdited,
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_versionNameLinedit, &QLineEdit::textEdited,
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_androidMinSdkVersion,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_androidTargetSdkVersion,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this]() { setDirty(); });
|
||||
|
||||
return packageGroupBox;
|
||||
}
|
||||
|
||||
QGroupBox *Android::Internal::AndroidManifestEditorWidget::createApplicationGroupBox(QWidget *parent)
|
||||
{
|
||||
auto applicationGroupBox = new QGroupBox(parent);
|
||||
applicationGroupBox->setTitle(tr("Application"));
|
||||
auto formLayout = new QFormLayout();
|
||||
|
||||
m_appNameLineEdit = new QLineEdit(applicationGroupBox);
|
||||
formLayout->addRow(tr("Application name:"), m_appNameLineEdit);
|
||||
|
||||
m_activityNameLineEdit = new QLineEdit(applicationGroupBox);
|
||||
formLayout->addRow(tr("Activity name:"), m_activityNameLineEdit);
|
||||
|
||||
m_targetLineEdit = new QComboBox(applicationGroupBox);
|
||||
m_targetLineEdit->setEditable(true);
|
||||
m_targetLineEdit->setDuplicatesEnabled(true);
|
||||
m_targetLineEdit->installEventFilter(this);
|
||||
formLayout->addRow(tr("Run:"), m_targetLineEdit);
|
||||
|
||||
m_styleExtractMethod = new QComboBox(applicationGroupBox);
|
||||
formLayout->addRow(tr("Style extraction:"), m_styleExtractMethod);
|
||||
const QList<QStringList> styleMethodsMap = {
|
||||
{"default",
|
||||
"In most cases this will be the same as \"full\", but it can also be something else "
|
||||
"if needed, e.g. for compatibility reasons."},
|
||||
{"full", "Useful for Qt Widgets & Qt Quick Controls 1 apps."},
|
||||
{"minimal", "Useful for Qt Quick Controls 2 apps, it is much faster than \"full\"."},
|
||||
{"none", "Useful for apps that don't use Qt Widgets, Qt Quick Controls 1 or Qt Quick Controls 2."}};
|
||||
for (int i = 0; i <styleMethodsMap.size(); ++i) {
|
||||
m_styleExtractMethod->addItem(styleMethodsMap.at(i).first());
|
||||
m_styleExtractMethod->setItemData(i, styleMethodsMap.at(i).at(1), Qt::ToolTipRole);
|
||||
}
|
||||
applicationGroupBox->setLayout(formLayout);
|
||||
|
||||
connect(m_appNameLineEdit, &QLineEdit::textEdited,
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_activityNameLineEdit, &QLineEdit::textEdited,
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_targetLineEdit, &QComboBox::currentTextChanged,
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_styleExtractMethod,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this]() { setDirty(); });
|
||||
|
||||
return applicationGroupBox;
|
||||
}
|
||||
|
||||
QGroupBox *AndroidManifestEditorWidget::createAdvancedGroupBox(QWidget *parent)
|
||||
{
|
||||
auto otherGroupBox = new QGroupBox(parent);
|
||||
otherGroupBox->setTitle(tr("Advanced"));
|
||||
m_advanvedTabWidget = new QTabWidget(otherGroupBox);
|
||||
auto formLayout = new QFormLayout();
|
||||
|
||||
m_iconButtons = new AndroidManifestEditorIconContainerWidget(otherGroupBox, m_textEditorWidget);
|
||||
m_advanvedTabWidget->addTab(m_iconButtons, tr("Application icon"));
|
||||
|
||||
m_services = new AndroidServiceWidget(otherGroupBox);
|
||||
m_advanvedTabWidget->addTab(m_services, tr("Android services"));
|
||||
|
||||
m_splashButtons = new SplashIconContainerWidget(otherGroupBox, m_textEditorWidget);
|
||||
m_advanvedTabWidget->addTab(m_splashButtons, tr("Splash screen"));
|
||||
|
||||
connect(m_services, &AndroidServiceWidget::servicesModified, this, [this]() { setDirty(); });
|
||||
connect(m_services, &AndroidServiceWidget::servicesModified,
|
||||
this, &AndroidManifestEditorWidget::clearInvalidServiceInfo);
|
||||
connect(m_services, &AndroidServiceWidget::servicesInvalid,
|
||||
this, &AndroidManifestEditorWidget::setInvalidServiceInfo);
|
||||
connect(m_splashButtons, &SplashIconContainerWidget::splashScreensModified,
|
||||
this, [this]() { setDirty(); });
|
||||
|
||||
formLayout->addRow(m_advanvedTabWidget);
|
||||
otherGroupBox->setLayout(formLayout);
|
||||
|
||||
return otherGroupBox;
|
||||
}
|
||||
|
||||
void AndroidManifestEditorWidget::initializePage()
|
||||
{
|
||||
QWidget *mainWidget = new QWidget; // different name
|
||||
QWidget *mainWidget = new QWidget(); // different name
|
||||
auto topLayout = new QGridLayout(mainWidget);
|
||||
|
||||
auto topLayout = new QVBoxLayout(mainWidget);
|
||||
|
||||
auto packageGroupBox = new QGroupBox(mainWidget);
|
||||
topLayout->addWidget(packageGroupBox);
|
||||
|
||||
auto setDirtyFunc = [this] { setDirty(); };
|
||||
packageGroupBox->setTitle(tr("Package"));
|
||||
{
|
||||
auto formLayout = new QFormLayout();
|
||||
|
||||
m_packageNameLineEdit = new QLineEdit(packageGroupBox);
|
||||
m_packageNameLineEdit->setToolTip(tr(
|
||||
"<p align=\"justify\">Please choose a valid package name "
|
||||
"for your application (for example, \"org.example.myapplication\").</p>"
|
||||
"<p align=\"justify\">Packages are usually defined using a hierarchical naming pattern, "
|
||||
"with levels in the hierarchy separated by periods (.) (pronounced \"dot\").</p>"
|
||||
"<p align=\"justify\">In general, a package name begins with the top level domain name"
|
||||
" of the organization and then the organization's domain and then any subdomains listed"
|
||||
" in reverse order. The organization can then choose a specific name for their package."
|
||||
" Package names should be all lowercase characters whenever possible.</p>"
|
||||
"<p align=\"justify\">Complete conventions for disambiguating package names and rules for"
|
||||
" naming packages when the Internet domain name cannot be directly used as a package name"
|
||||
" are described in section 7.7 of the Java Language Specification.</p>"));
|
||||
formLayout->addRow(tr("Package name:"), m_packageNameLineEdit);
|
||||
|
||||
m_packageNameWarning = new QLabel;
|
||||
m_packageNameWarning->setText(tr("The package name is not valid."));
|
||||
m_packageNameWarning->setVisible(false);
|
||||
|
||||
m_packageNameWarningIcon = new QLabel;
|
||||
m_packageNameWarningIcon->setPixmap(Utils::Icons::WARNING.pixmap());
|
||||
m_packageNameWarningIcon->setVisible(false);
|
||||
m_packageNameWarningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
|
||||
auto warningRow = new QHBoxLayout;
|
||||
warningRow->setContentsMargins(0, 0, 0, 0);
|
||||
warningRow->addWidget(m_packageNameWarningIcon);
|
||||
warningRow->addWidget(m_packageNameWarning);
|
||||
|
||||
formLayout->addRow(QString(), warningRow);
|
||||
|
||||
m_versionCodeLineEdit = new QLineEdit(packageGroupBox);
|
||||
formLayout->addRow(tr("Version code:"), m_versionCodeLineEdit);
|
||||
|
||||
m_versionNameLinedit = new QLineEdit(packageGroupBox);
|
||||
formLayout->addRow(tr("Version name:"), m_versionNameLinedit);
|
||||
|
||||
m_androidMinSdkVersion = new QComboBox(packageGroupBox);
|
||||
m_androidMinSdkVersion->setToolTip(
|
||||
tr("Sets the minimum required version on which this application can be run."));
|
||||
m_androidMinSdkVersion->addItem(tr("Not set"), 0);
|
||||
|
||||
formLayout->addRow(tr("Minimum required SDK:"), m_androidMinSdkVersion);
|
||||
|
||||
m_androidTargetSdkVersion = new QComboBox(packageGroupBox);
|
||||
m_androidTargetSdkVersion->setToolTip(
|
||||
tr("Sets the target SDK. Set this to the highest tested version. "
|
||||
"This disables compatibility behavior of the system for your application."));
|
||||
m_androidTargetSdkVersion->addItem(tr("Not set"), 0);
|
||||
|
||||
formLayout->addRow(tr("Target SDK:"), m_androidTargetSdkVersion);
|
||||
|
||||
packageGroupBox->setLayout(formLayout);
|
||||
|
||||
updateSdkVersions();
|
||||
|
||||
connect(m_packageNameLineEdit, &QLineEdit::textEdited,
|
||||
this, &AndroidManifestEditorWidget::setPackageName);
|
||||
connect(m_versionCodeLineEdit, &QLineEdit::textEdited,
|
||||
this, setDirtyFunc);
|
||||
connect(m_versionNameLinedit, &QLineEdit::textEdited,
|
||||
this, setDirtyFunc);
|
||||
connect(m_androidMinSdkVersion,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, setDirtyFunc);
|
||||
connect(m_androidTargetSdkVersion,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, setDirtyFunc);
|
||||
|
||||
}
|
||||
|
||||
// Application
|
||||
auto applicationGroupBox = new QGroupBox(mainWidget);
|
||||
topLayout->addWidget(applicationGroupBox);
|
||||
|
||||
applicationGroupBox->setTitle(tr("Application"));
|
||||
{
|
||||
auto formLayout = new QFormLayout();
|
||||
|
||||
m_appNameLineEdit = new QLineEdit(applicationGroupBox);
|
||||
formLayout->addRow(tr("Application name:"), m_appNameLineEdit);
|
||||
|
||||
m_activityNameLineEdit = new QLineEdit(applicationGroupBox);
|
||||
formLayout->addRow(tr("Activity name:"), m_activityNameLineEdit);
|
||||
|
||||
m_targetLineEdit = new QComboBox(applicationGroupBox);
|
||||
m_targetLineEdit->setEditable(true);
|
||||
m_targetLineEdit->setDuplicatesEnabled(true);
|
||||
m_targetLineEdit->installEventFilter(this);
|
||||
formLayout->addRow(tr("Run:"), m_targetLineEdit);
|
||||
|
||||
m_styleExtractMethod = new QComboBox(applicationGroupBox);
|
||||
formLayout->addRow(tr("Style extraction:"), m_styleExtractMethod);
|
||||
const QList<QStringList> styleMethodsMap = {
|
||||
{"default", "In most cases this will be the same as \"full\", but it can also be something else if needed, e.g. for compatibility reasons."},
|
||||
{"full", "Useful for Qt Widgets & Qt Quick Controls 1 apps."},
|
||||
{"minimal", "Useful for Qt Quick Controls 2 apps, it is much faster than \"full\"."},
|
||||
{"none", "Useful for apps that don't use Qt Widgets, Qt Quick Controls 1 or Qt Quick Controls 2."}};
|
||||
for (int i = 0; i <styleMethodsMap.size(); ++i) {
|
||||
m_styleExtractMethod->addItem(styleMethodsMap.at(i).first());
|
||||
m_styleExtractMethod->setItemData(i, styleMethodsMap.at(i).at(1), Qt::ToolTipRole);
|
||||
}
|
||||
|
||||
m_iconButtons = new AndroidManifestEditorIconContainerWidget(applicationGroupBox, m_textEditorWidget);
|
||||
formLayout->addRow(tr("Application icon:"), new QLabel());
|
||||
formLayout->addRow(QString(), m_iconButtons);
|
||||
|
||||
m_splashButtons = new SplashIconContainerWidget(applicationGroupBox, m_textEditorWidget);
|
||||
formLayout->addRow(tr("Splash screen:"), new QLabel());
|
||||
formLayout->addRow(QString(), m_splashButtons);
|
||||
|
||||
m_services = new AndroidServiceWidget(this);
|
||||
formLayout->addRow(tr("Android services:"), m_services);
|
||||
|
||||
applicationGroupBox->setLayout(formLayout);
|
||||
|
||||
connect(m_appNameLineEdit, &QLineEdit::textEdited,
|
||||
this, setDirtyFunc);
|
||||
connect(m_activityNameLineEdit, &QLineEdit::textEdited,
|
||||
this, setDirtyFunc);
|
||||
connect(m_targetLineEdit, &QComboBox::currentTextChanged,
|
||||
this, setDirtyFunc);
|
||||
connect(m_styleExtractMethod,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, setDirtyFunc);
|
||||
connect(m_services, &AndroidServiceWidget::servicesModified,
|
||||
this, setDirtyFunc);
|
||||
connect(m_splashButtons, &SplashIconContainerWidget::splashScreensModified,
|
||||
this, setDirtyFunc);
|
||||
connect(m_services, &AndroidServiceWidget::servicesModified,
|
||||
this, &AndroidManifestEditorWidget::clearInvalidServiceInfo);
|
||||
connect(m_services, &AndroidServiceWidget::servicesInvalid,
|
||||
this, &AndroidManifestEditorWidget::setInvalidServiceInfo);
|
||||
}
|
||||
|
||||
|
||||
// Permissions
|
||||
auto permissionsGroupBox = new QGroupBox(mainWidget);
|
||||
topLayout->addWidget(permissionsGroupBox);
|
||||
|
||||
permissionsGroupBox->setTitle(tr("Permissions"));
|
||||
{
|
||||
auto layout = new QGridLayout(permissionsGroupBox);
|
||||
|
||||
m_defaultPermissonsCheckBox = new QCheckBox(this);
|
||||
m_defaultPermissonsCheckBox->setText(tr("Include default permissions for Qt modules."));
|
||||
layout->addWidget(m_defaultPermissonsCheckBox, 0, 0);
|
||||
|
||||
m_defaultFeaturesCheckBox = new QCheckBox(this);
|
||||
m_defaultFeaturesCheckBox->setText(tr("Include default features for Qt modules."));
|
||||
layout->addWidget(m_defaultFeaturesCheckBox, 1, 0);
|
||||
|
||||
m_permissionsComboBox = new QComboBox(permissionsGroupBox);
|
||||
m_permissionsComboBox->insertItems(0, QStringList()
|
||||
<< QLatin1String("android.permission.ACCESS_CHECKIN_PROPERTIES")
|
||||
<< QLatin1String("android.permission.ACCESS_COARSE_LOCATION")
|
||||
<< QLatin1String("android.permission.ACCESS_FINE_LOCATION")
|
||||
<< QLatin1String("android.permission.ACCESS_LOCATION_EXTRA_COMMANDS")
|
||||
<< QLatin1String("android.permission.ACCESS_MOCK_LOCATION")
|
||||
<< QLatin1String("android.permission.ACCESS_NETWORK_STATE")
|
||||
<< QLatin1String("android.permission.ACCESS_SURFACE_FLINGER")
|
||||
<< QLatin1String("android.permission.ACCESS_WIFI_STATE")
|
||||
<< QLatin1String("android.permission.ACCOUNT_MANAGER")
|
||||
<< QLatin1String("com.android.voicemail.permission.ADD_VOICEMAIL")
|
||||
<< QLatin1String("android.permission.AUTHENTICATE_ACCOUNTS")
|
||||
<< QLatin1String("android.permission.BATTERY_STATS")
|
||||
<< QLatin1String("android.permission.BIND_ACCESSIBILITY_SERVICE")
|
||||
<< QLatin1String("android.permission.BIND_APPWIDGET")
|
||||
<< QLatin1String("android.permission.BIND_DEVICE_ADMIN")
|
||||
<< QLatin1String("android.permission.BIND_INPUT_METHOD")
|
||||
<< QLatin1String("android.permission.BIND_REMOTEVIEWS")
|
||||
<< QLatin1String("android.permission.BIND_TEXT_SERVICE")
|
||||
<< QLatin1String("android.permission.BIND_VPN_SERVICE")
|
||||
<< QLatin1String("android.permission.BIND_WALLPAPER")
|
||||
<< QLatin1String("android.permission.BLUETOOTH")
|
||||
<< QLatin1String("android.permission.BLUETOOTH_ADMIN")
|
||||
<< QLatin1String("android.permission.BRICK")
|
||||
<< QLatin1String("android.permission.BROADCAST_PACKAGE_REMOVED")
|
||||
<< QLatin1String("android.permission.BROADCAST_SMS")
|
||||
<< QLatin1String("android.permission.BROADCAST_STICKY")
|
||||
<< QLatin1String("android.permission.BROADCAST_WAP_PUSH")
|
||||
<< QLatin1String("android.permission.CALL_PHONE")
|
||||
<< QLatin1String("android.permission.CALL_PRIVILEGED")
|
||||
<< QLatin1String("android.permission.CAMERA")
|
||||
<< QLatin1String("android.permission.CHANGE_COMPONENT_ENABLED_STATE")
|
||||
<< QLatin1String("android.permission.CHANGE_CONFIGURATION")
|
||||
<< QLatin1String("android.permission.CHANGE_NETWORK_STATE")
|
||||
<< QLatin1String("android.permission.CHANGE_WIFI_MULTICAST_STATE")
|
||||
<< QLatin1String("android.permission.CHANGE_WIFI_STATE")
|
||||
<< QLatin1String("android.permission.CLEAR_APP_CACHE")
|
||||
<< QLatin1String("android.permission.CLEAR_APP_USER_DATA")
|
||||
<< QLatin1String("android.permission.CONTROL_LOCATION_UPDATES")
|
||||
<< QLatin1String("android.permission.DELETE_CACHE_FILES")
|
||||
<< QLatin1String("android.permission.DELETE_PACKAGES")
|
||||
<< QLatin1String("android.permission.DEVICE_POWER")
|
||||
<< QLatin1String("android.permission.DIAGNOSTIC")
|
||||
<< QLatin1String("android.permission.DISABLE_KEYGUARD")
|
||||
<< QLatin1String("android.permission.DUMP")
|
||||
<< QLatin1String("android.permission.EXPAND_STATUS_BAR")
|
||||
<< QLatin1String("android.permission.FACTORY_TEST")
|
||||
<< QLatin1String("android.permission.FLASHLIGHT")
|
||||
<< QLatin1String("android.permission.FORCE_BACK")
|
||||
<< QLatin1String("android.permission.GET_ACCOUNTS")
|
||||
<< QLatin1String("android.permission.GET_PACKAGE_SIZE")
|
||||
<< QLatin1String("android.permission.GET_TASKS")
|
||||
<< QLatin1String("android.permission.GLOBAL_SEARCH")
|
||||
<< QLatin1String("android.permission.HARDWARE_TEST")
|
||||
<< QLatin1String("android.permission.INJECT_EVENTS")
|
||||
<< QLatin1String("android.permission.INSTALL_LOCATION_PROVIDER")
|
||||
<< QLatin1String("android.permission.INSTALL_PACKAGES")
|
||||
<< QLatin1String("android.permission.INTERNAL_SYSTEM_WINDOW")
|
||||
<< QLatin1String("android.permission.INTERNET")
|
||||
<< QLatin1String("android.permission.KILL_BACKGROUND_PROCESSES")
|
||||
<< QLatin1String("android.permission.MANAGE_ACCOUNTS")
|
||||
<< QLatin1String("android.permission.MANAGE_APP_TOKENS")
|
||||
<< QLatin1String("android.permission.MASTER_CLEAR")
|
||||
<< QLatin1String("android.permission.MODIFY_AUDIO_SETTINGS")
|
||||
<< QLatin1String("android.permission.MODIFY_PHONE_STATE")
|
||||
<< QLatin1String("android.permission.MOUNT_FORMAT_FILESYSTEMS")
|
||||
<< QLatin1String("android.permission.MOUNT_UNMOUNT_FILESYSTEMS")
|
||||
<< QLatin1String("android.permission.NFC")
|
||||
<< QLatin1String("android.permission.PERSISTENT_ACTIVITY")
|
||||
<< QLatin1String("android.permission.PROCESS_OUTGOING_CALLS")
|
||||
<< QLatin1String("android.permission.READ_CALENDAR")
|
||||
<< QLatin1String("android.permission.READ_CALL_LOG")
|
||||
<< QLatin1String("android.permission.READ_CONTACTS")
|
||||
<< QLatin1String("android.permission.READ_EXTERNAL_STORAGE")
|
||||
<< QLatin1String("android.permission.READ_FRAME_BUFFER")
|
||||
<< QLatin1String("com.android.browser.permission.READ_HISTORY_BOOKMARKS")
|
||||
<< QLatin1String("android.permission.READ_INPUT_STATE")
|
||||
<< QLatin1String("android.permission.READ_LOGS")
|
||||
<< QLatin1String("android.permission.READ_PHONE_STATE")
|
||||
<< QLatin1String("android.permission.READ_PROFILE")
|
||||
<< QLatin1String("android.permission.READ_SMS")
|
||||
<< QLatin1String("android.permission.READ_SOCIAL_STREAM")
|
||||
<< QLatin1String("android.permission.READ_SYNC_SETTINGS")
|
||||
<< QLatin1String("android.permission.READ_SYNC_STATS")
|
||||
<< QLatin1String("android.permission.READ_USER_DICTIONARY")
|
||||
<< QLatin1String("android.permission.REBOOT")
|
||||
<< QLatin1String("android.permission.RECEIVE_BOOT_COMPLETED")
|
||||
<< QLatin1String("android.permission.RECEIVE_MMS")
|
||||
<< QLatin1String("android.permission.RECEIVE_SMS")
|
||||
<< QLatin1String("android.permission.RECEIVE_WAP_PUSH")
|
||||
<< QLatin1String("android.permission.RECORD_AUDIO")
|
||||
<< QLatin1String("android.permission.REORDER_TASKS")
|
||||
<< QLatin1String("android.permission.RESTART_PACKAGES")
|
||||
<< QLatin1String("android.permission.SEND_SMS")
|
||||
<< QLatin1String("android.permission.SET_ACTIVITY_WATCHER")
|
||||
<< QLatin1String("com.android.alarm.permission.SET_ALARM")
|
||||
<< QLatin1String("android.permission.SET_ALWAYS_FINISH")
|
||||
<< QLatin1String("android.permission.SET_ANIMATION_SCALE")
|
||||
<< QLatin1String("android.permission.SET_DEBUG_APP")
|
||||
<< QLatin1String("android.permission.SET_ORIENTATION")
|
||||
<< QLatin1String("android.permission.SET_POINTER_SPEED")
|
||||
<< QLatin1String("android.permission.SET_PREFERRED_APPLICATIONS")
|
||||
<< QLatin1String("android.permission.SET_PROCESS_LIMIT")
|
||||
<< QLatin1String("android.permission.SET_TIME")
|
||||
<< QLatin1String("android.permission.SET_TIME_ZONE")
|
||||
<< QLatin1String("android.permission.SET_WALLPAPER")
|
||||
<< QLatin1String("android.permission.SET_WALLPAPER_HINTS")
|
||||
<< QLatin1String("android.permission.SIGNAL_PERSISTENT_PROCESSES")
|
||||
<< QLatin1String("android.permission.STATUS_BAR")
|
||||
<< QLatin1String("android.permission.SUBSCRIBED_FEEDS_READ")
|
||||
<< QLatin1String("android.permission.SUBSCRIBED_FEEDS_WRITE")
|
||||
<< QLatin1String("android.permission.SYSTEM_ALERT_WINDOW")
|
||||
<< QLatin1String("android.permission.UPDATE_DEVICE_STATS")
|
||||
<< QLatin1String("android.permission.USE_CREDENTIALS")
|
||||
<< QLatin1String("android.permission.USE_SIP")
|
||||
<< QLatin1String("android.permission.VIBRATE")
|
||||
<< QLatin1String("android.permission.WAKE_LOCK")
|
||||
<< QLatin1String("android.permission.WRITE_APN_SETTINGS")
|
||||
<< QLatin1String("android.permission.WRITE_CALENDAR")
|
||||
<< QLatin1String("android.permission.WRITE_CALL_LOG")
|
||||
<< QLatin1String("android.permission.WRITE_CONTACTS")
|
||||
<< QLatin1String("android.permission.WRITE_EXTERNAL_STORAGE")
|
||||
<< QLatin1String("android.permission.WRITE_GSERVICES")
|
||||
<< QLatin1String("com.android.browser.permission.WRITE_HISTORY_BOOKMARKS")
|
||||
<< QLatin1String("android.permission.WRITE_PROFILE")
|
||||
<< QLatin1String("android.permission.WRITE_SECURE_SETTINGS")
|
||||
<< QLatin1String("android.permission.WRITE_SETTINGS")
|
||||
<< QLatin1String("android.permission.WRITE_SMS")
|
||||
<< QLatin1String("android.permission.WRITE_SOCIAL_STREAM")
|
||||
<< QLatin1String("android.permission.WRITE_SYNC_SETTINGS")
|
||||
<< QLatin1String("android.permission.WRITE_USER_DICTIONARY")
|
||||
);
|
||||
m_permissionsComboBox->setEditable(true);
|
||||
layout->addWidget(m_permissionsComboBox, 2, 0);
|
||||
|
||||
m_addPermissionButton = new QPushButton(permissionsGroupBox);
|
||||
m_addPermissionButton->setText(tr("Add"));
|
||||
layout->addWidget(m_addPermissionButton, 2, 1);
|
||||
|
||||
m_permissionsModel = new PermissionsModel(this);
|
||||
|
||||
m_permissionsListView = new QListView(permissionsGroupBox);
|
||||
m_permissionsListView->setModel(m_permissionsModel);
|
||||
layout->addWidget(m_permissionsListView, 3, 0, 3, 1);
|
||||
|
||||
m_removePermissionButton = new QPushButton(permissionsGroupBox);
|
||||
m_removePermissionButton->setText(tr("Remove"));
|
||||
layout->addWidget(m_removePermissionButton, 3, 1);
|
||||
|
||||
permissionsGroupBox->setLayout(layout);
|
||||
|
||||
connect(m_defaultPermissonsCheckBox, &QCheckBox::stateChanged,
|
||||
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
|
||||
connect(m_defaultFeaturesCheckBox, &QCheckBox::stateChanged,
|
||||
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
|
||||
|
||||
connect(m_addPermissionButton, &QAbstractButton::clicked,
|
||||
this, &AndroidManifestEditorWidget::addPermission);
|
||||
connect(m_removePermissionButton, &QAbstractButton::clicked,
|
||||
this, &AndroidManifestEditorWidget::removePermission);
|
||||
connect(m_permissionsComboBox, &QComboBox::currentTextChanged,
|
||||
this, &AndroidManifestEditorWidget::updateAddRemovePermissionButtons);
|
||||
}
|
||||
|
||||
topLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::MinimumExpanding));
|
||||
topLayout->addWidget(createPackageFormLayout(mainWidget), 0, 0);
|
||||
topLayout->addWidget(createApplicationGroupBox(mainWidget), 0, 1);
|
||||
topLayout->addWidget(createPermissionsGroupBox(mainWidget), 1, 0, 1, 2);
|
||||
topLayout->addWidget(createAdvancedGroupBox(mainWidget), 2, 0, 1, 2);
|
||||
topLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::MinimumExpanding), 3, 0);
|
||||
|
||||
auto mainWidgetScrollArea = new QScrollArea;
|
||||
mainWidgetScrollArea->setWidgetResizable(true);
|
||||
@@ -575,6 +587,7 @@ bool AndroidManifestEditorWidget::setActivePage(EditorPage page)
|
||||
if (!servicesValid(m_services->services())) {
|
||||
QMessageBox::critical(nullptr, tr("Service Definition Invalid"),
|
||||
tr("Cannot switch to source when there are invalid services."));
|
||||
m_advanvedTabWidget->setCurrentIndex(1);
|
||||
return false;
|
||||
}
|
||||
syncToEditor();
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QGroupBox>
|
||||
#include <QGridLayout>
|
||||
#include <QTabWidget>
|
||||
#include <QStackedWidget>
|
||||
#include <QTimer>
|
||||
|
||||
@@ -156,6 +159,11 @@ private:
|
||||
QString parseComment(QXmlStreamReader &reader, QXmlStreamWriter &writer);
|
||||
void parseUnknownElement(QXmlStreamReader &reader, QXmlStreamWriter &writer, bool ignore=false);
|
||||
|
||||
QGroupBox *createPermissionsGroupBox(QWidget *parent);
|
||||
QGroupBox *createPackageFormLayout(QWidget *parent);
|
||||
QGroupBox *createApplicationGroupBox(QWidget *parent);
|
||||
QGroupBox *createAdvancedGroupBox(QWidget *parent);
|
||||
|
||||
bool m_dirty; // indicates that we need to call syncToEditor()
|
||||
bool m_stayClean;
|
||||
int m_errorLine;
|
||||
@@ -192,6 +200,7 @@ private:
|
||||
TextEditor::TextEditorWidget *m_textEditorWidget;
|
||||
AndroidManifestEditor *m_editor;
|
||||
QString m_androidNdkPlatform;
|
||||
QTabWidget *m_advanvedTabWidget = nullptr;
|
||||
};
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
setConfigBaseId("Qt4ProjectManager.AndroidDeployConfiguration2");
|
||||
addSupportedTargetDeviceType(Constants::ANDROID_DEVICE_TYPE);
|
||||
setDefaultDisplayName(QCoreApplication::translate("Android::Internal",
|
||||
"Deploy to Android device"));
|
||||
"Deploy to Android Device"));
|
||||
addInitialStep(AndroidDeployQtStep::stepId());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
#include <qtsupport/qtversionmanager.h>
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/kit.h>
|
||||
#include <projectexplorer/project.h>
|
||||
@@ -86,25 +87,25 @@ QString AndroidQtVersion::invalidReason() const
|
||||
Abis AndroidQtVersion::detectQtAbis() const
|
||||
{
|
||||
auto androidAbi2Abi = [](const QString &androidAbi) {
|
||||
if (androidAbi == "arm64-v8a") {
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A) {
|
||||
return Abi{Abi::Architecture::ArmArchitecture,
|
||||
Abi::OS::LinuxOS,
|
||||
Abi::OSFlavor::AndroidLinuxFlavor,
|
||||
Abi::BinaryFormat::ElfFormat,
|
||||
64, androidAbi};
|
||||
} else if (androidAbi == "armeabi-v7a") {
|
||||
} else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A) {
|
||||
return Abi{Abi::Architecture::ArmArchitecture,
|
||||
Abi::OS::LinuxOS,
|
||||
Abi::OSFlavor::AndroidLinuxFlavor,
|
||||
Abi::BinaryFormat::ElfFormat,
|
||||
32, androidAbi};
|
||||
} else if (androidAbi == "x86_64") {
|
||||
} else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_X86_64) {
|
||||
return Abi{Abi::Architecture::X86Architecture,
|
||||
Abi::OS::LinuxOS,
|
||||
Abi::OSFlavor::AndroidLinuxFlavor,
|
||||
Abi::BinaryFormat::ElfFormat,
|
||||
64, androidAbi};
|
||||
} else if (androidAbi == "x86") {
|
||||
} else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_X86) {
|
||||
return Abi{Abi::Architecture::X86Architecture,
|
||||
Abi::OS::LinuxOS,
|
||||
Abi::OSFlavor::AndroidLinuxFlavor,
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <debugger/debuggerkitinformation.h>
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/environmentaspect.h>
|
||||
#include <projectexplorer/runconfigurationaspects.h>
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
@@ -127,21 +128,23 @@ static void findProcessPID(QFutureInterface<qint64> &fi, QStringList selector,
|
||||
if (packageName.isEmpty())
|
||||
return;
|
||||
|
||||
QStringList args = {selector};
|
||||
FilePath adbPath = AndroidConfigurations::currentConfig().adbToolPath();
|
||||
args.append("shell");
|
||||
args.append(preNougat ? pidScriptPreNougat : pidScript.arg(packageName));
|
||||
|
||||
qint64 processPID = -1;
|
||||
chrono::high_resolution_clock::time_point start = chrono::high_resolution_clock::now();
|
||||
do {
|
||||
QThread::msleep(200);
|
||||
FilePath adbPath = AndroidConfigurations::currentConfig().adbToolPath();
|
||||
selector.append("shell");
|
||||
selector.append(preNougat ? pidScriptPreNougat : pidScript.arg(packageName));
|
||||
const auto out = SynchronousProcess().runBlocking({adbPath, selector}).allRawOutput();
|
||||
const auto out = SynchronousProcess().runBlocking({adbPath, args}).allRawOutput();
|
||||
if (preNougat) {
|
||||
processPID = extractPID(out, packageName);
|
||||
} else {
|
||||
if (!out.isEmpty())
|
||||
processPID = out.trimmed().toLongLong();
|
||||
}
|
||||
} while (processPID == -1 && !isTimedOut(start) && !fi.isCanceled());
|
||||
} while ((processPID == -1 || processPID == 0) && !isTimedOut(start) && !fi.isCanceled());
|
||||
|
||||
qCDebug(androidRunWorkerLog) << "PID found:" << processPID << ", PreNougat:" << preNougat;
|
||||
if (!fi.isCanceled())
|
||||
@@ -162,32 +165,32 @@ static void deleter(QProcess *p)
|
||||
|
||||
static QString gdbServerArch(const QString &androidAbi)
|
||||
{
|
||||
if (androidAbi == "arm64-v8a")
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A)
|
||||
return QString("arm64");
|
||||
if (androidAbi == "armeabi-v7a")
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A)
|
||||
return QString("arm");
|
||||
// That's correct for "x86_64" and "x86", and best guess at anything that will evolve:
|
||||
// That's correct for x86_64 and x86, and best guess at anything that will evolve:
|
||||
return androidAbi;
|
||||
}
|
||||
|
||||
static QString lldbServerArch(const QString &androidAbi)
|
||||
{
|
||||
if (androidAbi == "armeabi-v7a")
|
||||
return QString("armeabi");
|
||||
// Correct for arm64-v8a "x86_64" and "x86", and best guess at anything that will evolve:
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A)
|
||||
return {ProjectExplorer::Constants::ANDROID_ABI_ARMEABI};
|
||||
// Correct for arm64-v8a, x86 and x86_64, and best guess at anything that will evolve:
|
||||
return androidAbi; // arm64-v8a, x86, x86_64
|
||||
}
|
||||
|
||||
static QString lldbServerArch2(const QString &androidAbi)
|
||||
{
|
||||
if (androidAbi == "armeabi-v7a")
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A)
|
||||
return {"arm"};
|
||||
if (androidAbi == "x86")
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_X86)
|
||||
return {"i386"};
|
||||
if (androidAbi == "arm64-v8a")
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A)
|
||||
return {"aarch64"};
|
||||
// Correct for "x86_64" a and best guess at anything that will evolve:
|
||||
return androidAbi; // arm64-v8a
|
||||
// Correct for x86_64 and best guess at anything that will evolve:
|
||||
return androidAbi; // x86_64
|
||||
}
|
||||
|
||||
static FilePath debugServer(bool useLldb, const Target *target)
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#include <QLoggingCategory>
|
||||
#include <QMessageBox>
|
||||
#include <QModelIndex>
|
||||
#include <QScrollArea>
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
#include <QString>
|
||||
@@ -368,7 +369,14 @@ AndroidSettingsWidget::AndroidSettingsWidget()
|
||||
m_ui.managerTabWidget->tabBar()->setEnabled(true);
|
||||
});
|
||||
connect(m_sdkManagerWidget, &AndroidSdkManagerWidget::licenseWorkflowStarted, [this] {
|
||||
m_ui.scrollArea->ensureWidgetVisible(m_ui.managerTabWidget);
|
||||
QObject *parentWidget = parent();
|
||||
while (parentWidget) {
|
||||
if (auto scrollArea = qobject_cast<QScrollArea *>(parentWidget)) {
|
||||
scrollArea->ensureWidgetVisible(m_ui.managerTabWidget);
|
||||
break;
|
||||
}
|
||||
parentWidget = parentWidget->parent();
|
||||
};
|
||||
});
|
||||
|
||||
QMap<int, QString> javaValidationPoints;
|
||||
@@ -405,42 +413,49 @@ AndroidSettingsWidget::AndroidSettingsWidget()
|
||||
|
||||
connect(m_ui.OpenJDKLocationPathChooser, &PathChooser::rawPathChanged,
|
||||
this, &AndroidSettingsWidget::validateJdk);
|
||||
FilePath currentJdkPath = m_androidConfig.openJDKLocation();
|
||||
if (currentJdkPath.isEmpty())
|
||||
currentJdkPath = AndroidConfig::getJdkPath();
|
||||
m_ui.OpenJDKLocationPathChooser->setFilePath(currentJdkPath);
|
||||
if (m_androidConfig.openJDKLocation().isEmpty())
|
||||
m_androidConfig.setOpenJDKLocation(AndroidConfig::getJdkPath());
|
||||
m_ui.OpenJDKLocationPathChooser->setFilePath(m_androidConfig.openJDKLocation());
|
||||
m_ui.OpenJDKLocationPathChooser->setPromptDialogTitle(tr("Select JDK Path"));
|
||||
|
||||
FilePath currentSDKPath = m_androidConfig.sdkLocation();
|
||||
if (currentSDKPath.isEmpty())
|
||||
currentSDKPath = AndroidConfig::defaultSdkPath();
|
||||
|
||||
m_ui.SDKLocationPathChooser->setFilePath(currentSDKPath);
|
||||
if (m_androidConfig.sdkLocation().isEmpty())
|
||||
m_androidConfig.setSdkLocation(AndroidConfig::defaultSdkPath());
|
||||
m_ui.SDKLocationPathChooser->setFilePath(m_androidConfig.sdkLocation());
|
||||
m_ui.SDKLocationPathChooser->setPromptDialogTitle(tr("Select Android SDK Folder"));
|
||||
|
||||
m_ui.openSslPathChooser->setPromptDialogTitle(tr("Select OpenSSL Include Project File"));
|
||||
FilePath currentOpenSslPath = m_androidConfig.openSslLocation();
|
||||
if (currentOpenSslPath.isEmpty())
|
||||
currentOpenSslPath = currentSDKPath.pathAppended("android_openssl");
|
||||
m_ui.openSslPathChooser->setFilePath(currentOpenSslPath);
|
||||
if (m_androidConfig.openSslLocation().isEmpty())
|
||||
m_androidConfig.setOpenSslLocation(m_androidConfig.sdkLocation() / ("android_openssl"));
|
||||
m_ui.openSslPathChooser->setFilePath(m_androidConfig.openSslLocation());
|
||||
|
||||
m_ui.DataPartitionSizeSpinBox->setValue(m_androidConfig.partitionSize());
|
||||
m_ui.CreateKitCheckBox->setChecked(m_androidConfig.automaticKitCreation());
|
||||
m_ui.AVDTableView->setModel(&m_AVDModel);
|
||||
m_ui.AVDTableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
m_ui.AVDTableView->horizontalHeader()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
|
||||
for (int column : {1, 2, 5})
|
||||
m_ui.AVDTableView->horizontalHeader()->setSectionResizeMode(
|
||||
column, QHeaderView::ResizeToContents);
|
||||
|
||||
const QIcon downloadIcon = Icons::ONLINE.icon();
|
||||
m_ui.downloadSDKToolButton->setIcon(downloadIcon);
|
||||
m_ui.downloadNDKToolButton->setIcon(downloadIcon);
|
||||
m_ui.downloadOpenJDKToolButton->setIcon(downloadIcon);
|
||||
m_ui.sdkToolsAutoDownloadButton->setToolTip(tr(
|
||||
"Automatically download Android SDK Tools to selected location.\n\n"
|
||||
"If the selected path contains no valid SDK Tools, the SDK Tools package "
|
||||
"is downloaded from %1, and extracted to the selected path.\n"
|
||||
"After the SDK Tools are properly set up, you are prompted to install "
|
||||
"any essential packages required for Qt to build for Android.")
|
||||
.arg(m_androidConfig.sdkToolsUrl().toString()));
|
||||
m_ui.sdkToolsAutoDownloadButton->setToolTip(
|
||||
tr("Automatically download Android SDK Tools to selected location.\n\n"
|
||||
"If the selected path contains no valid SDK Tools, the SDK Tools package is downloaded\n"
|
||||
"from %1,\n"
|
||||
"and extracted to the selected path.\n"
|
||||
"After the SDK Tools are properly set up, you are prompted to install any essential\n"
|
||||
"packages required for Qt to build for Android.")
|
||||
.arg(m_androidConfig.sdkToolsUrl().toString()));
|
||||
|
||||
m_ui.downloadOpenSSLPrebuiltLibs->setToolTip(
|
||||
tr("Automatically download OpenSSL prebuilt libraries.\n\n"
|
||||
"These libraries can be shipped with your application if any SSL operations\n"
|
||||
"are performed. Find the checkbox under \"Projects > Build > Build Steps >\n"
|
||||
"Build Android APK > Additional Libraries\".\n"
|
||||
"If the automatic download fails, Qt Creator proposes to open the download URL\n"
|
||||
"in the system's browser for manual download."));
|
||||
|
||||
connect(m_ui.SDKLocationPathChooser, &PathChooser::rawPathChanged,
|
||||
this, &AndroidSettingsWidget::onSdkPathChanged);
|
||||
@@ -700,7 +715,7 @@ void AndroidSettingsWidget::downloadOpenSslRepo(const bool silent)
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(tr("OpenSSL prebuilt libraries cloning failed. ") + msgSuffix
|
||||
+ tr("Opening OpenSSL URL for manual download."));
|
||||
msgBox.addButton(tr("OK"), QMessageBox::YesRole);
|
||||
msgBox.addButton(tr("Cancel"), QMessageBox::RejectRole);
|
||||
QAbstractButton *openButton = msgBox.addButton(tr("Open Download URL"), QMessageBox::ActionRole);
|
||||
msgBox.exec();
|
||||
|
||||
@@ -849,13 +864,7 @@ AndroidSettingsPage::AndroidSettingsPage()
|
||||
setId(Constants::ANDROID_SETTINGS_ID);
|
||||
setDisplayName(AndroidSettingsWidget::tr("Android"));
|
||||
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
||||
setWidgetCreator([] {
|
||||
auto widget = new AndroidSettingsWidget;
|
||||
QPalette pal = widget->palette();
|
||||
pal.setColor(QPalette::Window, Utils::creatorTheme()->color(Theme::BackgroundColorNormal));
|
||||
widget->setPalette(pal);
|
||||
return widget;
|
||||
});
|
||||
setWidgetCreator([] { return new AndroidSettingsWidget; });
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -2,57 +2,278 @@
|
||||
<ui version="4.0">
|
||||
<class>AndroidSettingsWidget</class>
|
||||
<widget class="QWidget" name="AndroidSettingsWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1131</width>
|
||||
<height>826</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Android Configuration</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
<widget class="QGroupBox" name="javaSettingsGroupBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
<property name="title">
|
||||
<string>Java Settings</string>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="Utils::PathChooser" name="OpenJDKLocationPathChooser" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QToolButton" name="downloadOpenJDKToolButton">
|
||||
<property name="toolTip">
|
||||
<string>Open JDK download URL in the system's browser.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="OpenJDKLocationLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>JDK location:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3">
|
||||
<widget class="Utils::DetailsWidget" name="javaDetailsWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="androidSettingsGroupBox">
|
||||
<property name="title">
|
||||
<string>Android Settings</string>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="2" column="1" rowspan="3">
|
||||
<widget class="QListWidget" name="ndkListWidget">
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="resizeMode">
|
||||
<enum>QListView::Adjust</enum>
|
||||
</property>
|
||||
<property name="modelColumn">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" rowspan="3" colspan="4">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addCustomNdkButton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add the selected custom NDK. The toolchains and debuggers will be created automatically.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="removeCustomNdkButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Remove the selected NDK if it has been added manually.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="7">
|
||||
<widget class="Utils::DetailsWidget" name="androidDetailsWidget" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="ndkComboBoxLabel">
|
||||
<property name="text">
|
||||
<string>Android NDK list:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QToolButton" name="downloadSDKToolButton">
|
||||
<property name="toolTip">
|
||||
<string>Open Android SDK download URL in the system's browser.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="SDKLocationLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Android SDK location:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<widget class="QToolButton" name="downloadNDKToolButton">
|
||||
<property name="toolTip">
|
||||
<string>Open Android NDK download URL in the system's browser.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Utils::PathChooser" name="SDKLocationPathChooser" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="4">
|
||||
<widget class="QPushButton" name="sdkToolsAutoDownloadButton">
|
||||
<property name="text">
|
||||
<string>Set Up SDK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="androidOpenSSLSettingsGroupBox">
|
||||
<property name="title">
|
||||
<string>Android OpenSSL settings (Optional)</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OpenSSL binaries location:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="4">
|
||||
<widget class="Utils::DetailsWidget" name="openSslDetailsWidget" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="downloadOpenSSLPrebuiltLibs">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Download OpenSSL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="Utils::PathChooser" name="openSslPathChooser" native="true">
|
||||
<property name="toolTip">
|
||||
<string>Select the path of the prebuilt OpenSSL binaries.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="CreateKitCheckBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Automatically create kits for Android tool chains</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1123</width>
|
||||
<height>818</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="managerTabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="avdManagerTab">
|
||||
<attribute name="title">
|
||||
<string>AVD Manager</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@@ -66,435 +287,148 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="javaSettingsGroupBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Java Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="Utils::PathChooser" name="OpenJDKLocationPathChooser" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QToolButton" name="downloadOpenJDKToolButton">
|
||||
<property name="toolTip">
|
||||
<string>Open JDK download URL in the system's browser.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="OpenJDKLocationLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>JDK location:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3">
|
||||
<widget class="Utils::DetailsWidget" name="javaDetailsWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="androidSettingsGroupBox">
|
||||
<property name="title">
|
||||
<string>Android Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="2" column="1" rowspan="3">
|
||||
<widget class="QListWidget" name="ndkListWidget">
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="resizeMode">
|
||||
<enum>QListView::Adjust</enum>
|
||||
</property>
|
||||
<property name="modelColumn">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" rowspan="3" colspan="4">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addCustomNdkButton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add the selected custom NDK. The toolchains and debuggers will be created automatically.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="removeCustomNdkButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Remove the selected NDK if it has been added manually.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="7">
|
||||
<widget class="Utils::DetailsWidget" name="androidDetailsWidget" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="ndkComboBoxLabel">
|
||||
<property name="text">
|
||||
<string>Android NDK list:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QToolButton" name="downloadSDKToolButton">
|
||||
<property name="toolTip">
|
||||
<string>Open Android SDK download URL in the system's browser.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="SDKLocationLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Android SDK location:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<widget class="QToolButton" name="downloadNDKToolButton">
|
||||
<property name="toolTip">
|
||||
<string>Open Android NDK download URL in the system's browser.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Utils::PathChooser" name="SDKLocationPathChooser" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="4">
|
||||
<widget class="QPushButton" name="sdkToolsAutoDownloadButton">
|
||||
<property name="text">
|
||||
<string>Set Up SDK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="androidOpenSSLSettingsGroupBox">
|
||||
<property name="title">
|
||||
<string>Android OpenSSL settings (Optional)</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OpenSSL binaries location:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="4">
|
||||
<widget class="Utils::DetailsWidget" name="openSslDetailsWidget" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="downloadOpenSSLPrebuiltLibs">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Automatically download OpenSSL prebuilt libraries. If the automatic download fails, Qt Creator proposes to open the download URL in the system's browser for manual download.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Download OpenSSL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="Utils::PathChooser" name="openSslPathChooser" native="true">
|
||||
<property name="toolTip">
|
||||
<string>Select the path of the prebuilt OpenSSL binaries.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="CreateKitCheckBox">
|
||||
<widget class="QTableView" name="AVDTableView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Automatically create kits for Android tool chains</string>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="textElideMode">
|
||||
<enum>Qt::ElideMiddle</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderHighlightSections">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="managerTabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="avdManagerTab">
|
||||
<attribute name="title">
|
||||
<string>AVD Manager</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="DataPartitionSizeLable">
|
||||
<property name="text">
|
||||
<string>System/data partition size:</string>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="DataPartitionSizeSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
<property name="suffix">
|
||||
<string> Mb</string>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
<property name="maximum">
|
||||
<number>99999</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTableView" name="AVDTableView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="textElideMode">
|
||||
<enum>Qt::ElideMiddle</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderHighlightSections">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="DataPartitionSizeLable">
|
||||
<property name="text">
|
||||
<string>System/data partition size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="DataPartitionSizeSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> Mb</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1024</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="AVDStartPushButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="AVDRefreshPushButton">
|
||||
<property name="text">
|
||||
<string>Refresh List</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>8</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="AVDAddPushButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="AVDRemovePushButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="sdkManagerTab">
|
||||
<attribute name="title">
|
||||
<string>SDK Manager</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
<property name="value">
|
||||
<number>1024</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="AVDStartPushButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="AVDRefreshPushButton">
|
||||
<property name="text">
|
||||
<string>Refresh List</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>8</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="AVDAddPushButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="AVDRemovePushButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="sdkManagerTab">
|
||||
<attribute name="title">
|
||||
<string>SDK Manager</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "androidsdkmanager.h"
|
||||
#include "androidavdmanager.h"
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/tooltip/tooltip.h>
|
||||
#include <utils/utilsicons.h>
|
||||
@@ -58,8 +59,12 @@ AvdDialog::AvdDialog(int minApiLevel, AndroidSdkManager *sdkManager, const QStri
|
||||
m_hideTipTimer.setSingleShot(true);
|
||||
|
||||
if (abis.isEmpty()) {
|
||||
m_avdDialog.abiComboBox->addItems(QStringList({"x86", "x86_64", "armeabi-v7a",
|
||||
"armeabi", "arm64-v8a"}));
|
||||
m_avdDialog.abiComboBox->addItems(QStringList({
|
||||
ProjectExplorer::Constants::ANDROID_ABI_X86,
|
||||
ProjectExplorer::Constants::ANDROID_ABI_X86_64,
|
||||
ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A,
|
||||
ProjectExplorer::Constants::ANDROID_ABI_ARMEABI,
|
||||
ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A}));
|
||||
} else {
|
||||
m_avdDialog.abiComboBox->addItems(abis);
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard)
|
||||
|
||||
if (wizard->copyGradle()) {
|
||||
auto checkBox = new QCheckBox(this);
|
||||
checkBox->setChecked(true);
|
||||
checkBox->setChecked(false);
|
||||
connect(checkBox, &QCheckBox::toggled, wizard, &CreateAndroidManifestWizard::setCopyGradle);
|
||||
checkBox->setText(tr("Copy the Gradle files to Android directory"));
|
||||
checkBox->setToolTip(tr("It is highly recommended if you are planning to extend the Java part of your Qt application."));
|
||||
@@ -245,7 +245,7 @@ void ChooseDirectoryPage::initializePage()
|
||||
// CreateAndroidManifestWizard
|
||||
//
|
||||
CreateAndroidManifestWizard::CreateAndroidManifestWizard(BuildSystem *buildSystem)
|
||||
: m_buildSystem(buildSystem), m_copyState(Ask)
|
||||
: m_buildSystem(buildSystem)
|
||||
{
|
||||
setWindowTitle(tr("Create Android Template Files Wizard"));
|
||||
|
||||
@@ -290,70 +290,12 @@ void CreateAndroidManifestWizard::setCopyGradle(bool copy)
|
||||
m_copyGradle = copy;
|
||||
}
|
||||
|
||||
bool CreateAndroidManifestWizard::copy(const QFileInfo &src, const QFileInfo &dst, QStringList * addedFiles)
|
||||
{
|
||||
bool copyFile = true;
|
||||
if (dst.exists()) {
|
||||
switch (m_copyState) {
|
||||
case Ask:
|
||||
{
|
||||
int res = QMessageBox::question(this,
|
||||
tr("Overwrite %1 file").arg(dst.fileName()),
|
||||
tr("Overwrite existing \"%1\"?")
|
||||
.arg(QDir(m_directory).relativeFilePath(dst.absoluteFilePath())),
|
||||
QMessageBox::Yes | QMessageBox::YesToAll |
|
||||
QMessageBox::No | QMessageBox::NoToAll |
|
||||
QMessageBox::Cancel);
|
||||
switch (res) {
|
||||
case QMessageBox::YesToAll:
|
||||
m_copyState = OverwriteAll;
|
||||
break;
|
||||
|
||||
case QMessageBox::Yes:
|
||||
break;
|
||||
|
||||
case QMessageBox::NoToAll:
|
||||
m_copyState = SkipAll;
|
||||
copyFile = false;
|
||||
break;
|
||||
|
||||
case QMessageBox::No:
|
||||
copyFile = false;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SkipAll:
|
||||
copyFile = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (copyFile)
|
||||
QFile::remove(dst.filePath());
|
||||
}
|
||||
|
||||
if (!dst.absoluteDir().exists())
|
||||
dst.absoluteDir().mkpath(dst.absolutePath());
|
||||
|
||||
if (copyFile && !QFile::copy(src.filePath(), dst.filePath())) {
|
||||
QMessageBox::warning(this, tr("File Creation Error"),
|
||||
tr("Could not copy file \"%1\" to \"%2\".")
|
||||
.arg(src.filePath()).arg(dst.filePath()));
|
||||
return false;
|
||||
}
|
||||
addedFiles->append(dst.absoluteFilePath());
|
||||
return true;
|
||||
}
|
||||
|
||||
void CreateAndroidManifestWizard::createAndroidTemplateFiles()
|
||||
{
|
||||
if (m_directory.isEmpty())
|
||||
return;
|
||||
|
||||
QStringList addedFiles;
|
||||
FileUtils::CopyAskingForOverwrite copy(this);
|
||||
Target *target = m_buildSystem->target();
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||
if (!version)
|
||||
@@ -361,21 +303,23 @@ void CreateAndroidManifestWizard::createAndroidTemplateFiles()
|
||||
if (version->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0)) {
|
||||
const QString src = version->prefix().toString() + "/src/android/java/AndroidManifest.xml";
|
||||
FileUtils::copyRecursively(FilePath::fromString(src),
|
||||
FilePath::fromString(m_directory + QLatin1String("/AndroidManifest.xml")),
|
||||
nullptr, [this, &addedFiles](QFileInfo src, QFileInfo dst, QString *){return copy(src, dst, &addedFiles);});
|
||||
FilePath::fromString(m_directory
|
||||
+ QLatin1String("/AndroidManifest.xml")),
|
||||
nullptr,
|
||||
copy);
|
||||
} else {
|
||||
const QString src = version->prefix().toString() + "/src/android/templates";
|
||||
|
||||
FileUtils::copyRecursively(FilePath::fromString(src),
|
||||
FilePath::fromString(m_directory),
|
||||
nullptr, [this, &addedFiles](QFileInfo src, QFileInfo dst, QString *){return copy(src, dst, &addedFiles);});
|
||||
nullptr,
|
||||
copy);
|
||||
|
||||
if (m_copyGradle) {
|
||||
FilePath gradlePath = version->prefix().pathAppended("src/3rdparty/gradle");
|
||||
if (!gradlePath.exists())
|
||||
gradlePath = AndroidConfigurations::currentConfig().sdkLocation().pathAppended("/tools/templates/gradle/wrapper");
|
||||
FileUtils::copyRecursively(gradlePath, FilePath::fromString(m_directory),
|
||||
nullptr, [this, &addedFiles](QFileInfo src, QFileInfo dst, QString *){return copy(src, dst, &addedFiles);});
|
||||
FileUtils::copyRecursively(gradlePath, FilePath::fromString(m_directory), nullptr, copy);
|
||||
}
|
||||
|
||||
AndroidManager::updateGradleProperties(target, m_buildKey);
|
||||
@@ -385,7 +329,7 @@ void CreateAndroidManifestWizard::createAndroidTemplateFiles()
|
||||
QString androidPackageDir;
|
||||
ProjectNode *node = target->project()->findNodeForBuildKey(m_buildKey);
|
||||
if (node) {
|
||||
node->addFiles(addedFiles);
|
||||
node->addFiles(copy.files());
|
||||
androidPackageDir = node->data(Android::Constants::AndroidPackageSourceDir).toString();
|
||||
|
||||
if (androidPackageDir.isEmpty()) {
|
||||
|
||||
@@ -54,19 +54,11 @@ public:
|
||||
ProjectExplorer::BuildSystem *buildSystem() const;
|
||||
|
||||
private:
|
||||
enum CopyState {
|
||||
Ask,
|
||||
OverwriteAll,
|
||||
SkipAll
|
||||
};
|
||||
bool copy(const QFileInfo &src, const QFileInfo &dst, QStringList *addedFiles);
|
||||
|
||||
void createAndroidManifestFile();
|
||||
void createAndroidTemplateFiles();
|
||||
ProjectExplorer::BuildSystem *m_buildSystem;
|
||||
QString m_buildKey;
|
||||
QString m_directory;
|
||||
CopyState m_copyState;
|
||||
bool m_copyGradle;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user