diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-05-23 07:25:34 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-05-23 07:25:34 +0200 |
commit | ef5d3796d52b20aa2fa8e75263686bb1e29fc092 (patch) | |
tree | 5a291f7a5108a3531e28bb7c7baaab7362071ff9 /src | |
parent | 24ee641543b51d1497114070fd574b095ff68958 (diff) | |
parent | 35b96f2fc11bcc6d0b4bfb2b405c115fb0d6033e (diff) | |
download | qt-creator-ef5d3796d52b20aa2fa8e75263686bb1e29fc092.tar.gz |
Merge remote-tracking branch 'origin/2.7' into 2.8
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/android/androidconfigurations.cpp | 16 | ||||
-rw-r--r-- | src/plugins/android/androidconfigurations.h | 3 | ||||
-rw-r--r-- | src/plugins/android/androidmanager.cpp | 8 | ||||
-rw-r--r-- | src/plugins/android/androidpackagecreationstep.cpp | 41 | ||||
-rw-r--r-- | src/plugins/android/androidtoolchain.cpp | 14 | ||||
-rw-r--r-- | src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp | 3 | ||||
-rw-r--r-- | src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp | 3 | ||||
-rw-r--r-- | src/tools/sdktool/addkeysoperation.cpp | 2 | ||||
-rw-r--r-- | src/tools/sdktool/addkitoperation.cpp | 2 | ||||
-rw-r--r-- | src/tools/sdktool/addqtoperation.cpp | 2 | ||||
-rw-r--r-- | src/tools/sdktool/addtoolchainoperation.cpp | 2 | ||||
-rw-r--r-- | src/tools/sdktool/rmkitoperation.cpp | 2 |
12 files changed, 76 insertions, 22 deletions
diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index d8ef7ce318..ea41e543f6 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -81,6 +81,7 @@ namespace { const QLatin1String OpenJDKLocationKey("OpenJDKLocation"); const QLatin1String KeystoreLocationKey("KeystoreLocation"); const QLatin1String AutomaticKitCreationKey("AutomatiKitCreation"); + const QLatin1String MakeExtraSearchDirectory("MakeExtraSearchDirectory"); const QLatin1String PartitionSizeKey("PartitionSize"); const QLatin1String ToolchainHostKey("ToolchainHost"); const QLatin1String ArmToolchainPrefix("arm-linux-androideabi"); @@ -156,6 +157,11 @@ AndroidConfig::AndroidConfig(const QSettings &settings) keystoreLocation = FileName::fromString(settings.value(KeystoreLocationKey).toString()); toolchainHost = settings.value(ToolchainHostKey).toString(); automaticKitCreation = settings.value(AutomaticKitCreationKey, true).toBool(); + QString extraDirectory = settings.value(MakeExtraSearchDirectory).toString(); + if (extraDirectory.isEmpty()) + makeExtraSearchDirectories = QStringList(); + else + makeExtraSearchDirectories << extraDirectory; PersistentSettingsReader reader; if (reader.load(FileName::fromString(sdkSettingsFileName())) @@ -170,6 +176,11 @@ AndroidConfig::AndroidConfig(const QSettings &settings) QVariant v = reader.restoreValue(AutomaticKitCreationKey); if (v.isValid()) automaticKitCreation = v.toBool(); + QString extraDirectory = reader.restoreValue(MakeExtraSearchDirectory).toString(); + if (extraDirectory.isEmpty()) + makeExtraSearchDirectories = QStringList(); + else + makeExtraSearchDirectories << extraDirectory; // persistent settings } @@ -628,6 +639,11 @@ QString AndroidConfigurations::bestMatch(const QString &targetAPI) const return QLatin1String("android-8"); } +QStringList AndroidConfigurations::makeExtraSearchDirectories() const +{ + return m_config.makeExtraSearchDirectories; +} + bool equalKits(Kit *a, Kit *b) { return ToolChainKitInformation::toolChain(a) == ToolChainKitInformation::toolChain(b) diff --git a/src/plugins/android/androidconfigurations.h b/src/plugins/android/androidconfigurations.h index 21cf46db5b..17bf34bc6a 100644 --- a/src/plugins/android/androidconfigurations.h +++ b/src/plugins/android/androidconfigurations.h @@ -57,6 +57,7 @@ public: Utils::FileName openJDKLocation; Utils::FileName keystoreLocation; QString toolchainHost; + QStringList makeExtraSearchDirectories; unsigned partitionSize; bool automaticKitCreation; }; @@ -99,6 +100,8 @@ public: QString startAVD(int *apiLevel, const QString &name = QString()) const; QString bestMatch(const QString &targetAPI) const; + QStringList makeExtraSearchDirectories() const; + static ProjectExplorer::Abi::Architecture architectureForToolChainPrefix(const QString &toolchainprefix); static QLatin1String toolchainPrefix(ProjectExplorer::Abi::Architecture architecture); static QLatin1String toolsPrefix(ProjectExplorer::Abi::Architecture architecture); diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index b679502ba9..a1d0829064 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -838,8 +838,14 @@ QString AndroidManager::loadLocal(ProjectExplorer::Target *target, int apiLevel, if (libElement.attribute(QLatin1String("bundling")).toInt() == (item == BundledJar ? 1 : 0)) { if (libElement.hasAttribute(attribute)) { QString dependencyLib = libElement.attribute(attribute).arg(apiLevel); - if (!dependencyLibs.contains(dependencyLib)) + if (libElement.hasAttribute(QLatin1String("extends"))) { + const QString extends = libElement.attribute(QLatin1String("extends")); + if (libs.contains(extends)) { + dependencyLibs << dependencyLib; + } + } else if (!dependencyLibs.contains(dependencyLib)) { dependencyLibs << dependencyLib; + } } if (libElement.hasAttribute(QLatin1String("replaces"))) { diff --git a/src/plugins/android/androidpackagecreationstep.cpp b/src/plugins/android/androidpackagecreationstep.cpp index 50e0704c59..25234204be 100644 --- a/src/plugins/android/androidpackagecreationstep.cpp +++ b/src/plugins/android/androidpackagecreationstep.cpp @@ -520,12 +520,20 @@ void AndroidPackageCreationStep::collectFiles(QList<DeployItem> *deployList, QSet<QString> alreadyListed; foreach (QString bundledFile, m_otherBundledFiles) { - if (!bundledFile.endsWith(QLatin1Char('/'))) - bundledFile.append(QLatin1Char('/')); + QStringList allFiles; + if (QFileInfo(qtVersionSourcePath + QLatin1Char('/') + bundledFile).isDir()) { + if (!bundledFile.endsWith(QLatin1Char('/'))) + bundledFile.append(QLatin1Char('/')); + + allFiles = collectRelativeFilePaths(qtVersionSourcePath + QLatin1Char('/') + bundledFile); + } else { + // If we need to bundle a specific file, we just add an empty string and the file + // names and data will be prepared correctly in the loop below. + allFiles = QStringList(QString()); + } - QStringList allFiles = collectRelativeFilePaths(qtVersionSourcePath + QLatin1Char('/') + bundledFile); foreach (QString file, allFiles) { - QString fullPath = qtVersionSourcePath + QLatin1Char('/') + bundledFile + QLatin1Char('/') + file; + QString fullPath = qtVersionSourcePath + QLatin1Char('/') + bundledFile + file; if (alreadyListed.contains(fullPath)) continue; @@ -534,22 +542,31 @@ void AndroidPackageCreationStep::collectFiles(QList<DeployItem> *deployList, QString garbledFileName; QString destinationPath; bool shouldStrip = false; - if (file.endsWith(QLatin1String(".so"))) { - garbledFileName = QLatin1String("lib") - + AndroidManager::libraryPrefix() - + QString(bundledFile).replace(QLatin1Char('/'), QLatin1Char('_')) - + QString(file).replace(QLatin1Char('/'), QLatin1Char('_')); + + QString fullFileName = bundledFile + file; + if (fullFileName.endsWith(QLatin1String(".so"))) { + if (fullFileName.startsWith(QLatin1String("lib/"))) { + // Special case when the destination folder is lib/ + // Since this is also the source folder, there is no need to garble the file + // name and copy it. We also won't have write access to this folder, so we + // couldn't if we wanted to. + garbledFileName = fullFileName.mid(sizeof("lib/") - 1); + } else { + garbledFileName = QLatin1String("lib") + + AndroidManager::libraryPrefix() + + QString(fullFileName).replace(QLatin1Char('/'), QLatin1Char('_')); + } destinationPath = androidLibPath + QLatin1Char('/') + garbledFileName; shouldStrip = true; } else { - garbledFileName = AndroidManager::libraryPrefix() + bundledFile + file; + garbledFileName = AndroidManager::libraryPrefix() + QLatin1Char('/') + fullFileName; destinationPath = androidAssetsPath + garbledFileName; } deployList->append(DeployItem(fullPath, 0, destinationPath, shouldStrip)); pluginsAndImportsList->append(DeployItem(garbledFileName, 0, - bundledFile + file, + fullFileName, shouldStrip)); } } @@ -574,6 +591,8 @@ void AndroidPackageCreationStep::removeManagedFilesFromPackage() } } } + + removeDirectory(m_androidDir.toString() + QLatin1String("/assets/") + AndroidManager::libraryPrefix()); } void AndroidPackageCreationStep::copyFilesIntoPackage(const QList<DeployItem> &deployList) diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp index 6bce5fe6c1..359b2ea2ed 100644 --- a/src/plugins/android/androidtoolchain.cpp +++ b/src/plugins/android/androidtoolchain.cpp @@ -200,9 +200,17 @@ QList<FileName> AndroidToolChain::suggestedMkspecList() const QString AndroidToolChain::makeCommand(const Utils::Environment &env) const { - QString make = HostOsInfo::isWindowsHost() - ? QLatin1String("ma-make.exe") : QLatin1String("make"); - QString tmp = env.searchInPath(make); + QStringList extraDirectories = AndroidConfigurations::instance().makeExtraSearchDirectories(); + if (HostOsInfo::isWindowsHost()) { + QString tmp = env.searchInPath(QLatin1String("ma-make.exe"), extraDirectories); + if (!tmp.isEmpty()) + return tmp; + tmp = env.searchInPath(QLatin1String("mingw32-make"), extraDirectories); + return tmp.isEmpty() ? QLatin1String("mingw32-make") : tmp; + } + + QString make = QLatin1String("make"); + QString tmp = env.searchInPath(make, extraDirectories); return tmp.isEmpty() ? make : tmp; } diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp index d6b6d952ed..1d071692e2 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp @@ -922,7 +922,8 @@ void PropertyEditor::instanceInformationsChange(const QMultiHash<ModelNode, Info m_locked = true; QList<InformationName> informationNameList = informationChangeHash.values(m_selectedNode); - if (informationNameList.contains(Anchor)) + if (informationNameList.contains(Anchor) + || informationNameList.contains(HasAnchor)) m_currentType->m_backendAnchorBinding.setup(QmlItemNode(m_selectedNode)); m_locked = false; } diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp index e1a04c9ecf..664b212378 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp @@ -132,7 +132,8 @@ void StatesEditorView::addState() if ((rootStateGroup().allStates().count() < 1) && //QtQuick import might be missing (!model()->hasImport(Import::createLibraryImport("QtQuick", "1.0"), true) && !model()->hasImport(Import::createLibraryImport("QtQuick", "1.1"), true) - && !model()->hasImport(Import::createLibraryImport("QtQuick", "2.0"), true))) + && !model()->hasImport(Import::createLibraryImport("QtQuick", "2.0"), true) + && !model()->hasImport(Import::createLibraryImport("QtQuick", "2.1"), true))) model()->changeImports(QList<Import>() << Import::createLibraryImport("QtQuick", "1.0"), QList<Import>()); ModelNode newState = rootStateGroup().addState(newStateName); setCurrentState(newState); diff --git a/src/tools/sdktool/addkeysoperation.cpp b/src/tools/sdktool/addkeysoperation.cpp index eea188db9a..41fc91ba69 100644 --- a/src/tools/sdktool/addkeysoperation.cpp +++ b/src/tools/sdktool/addkeysoperation.cpp @@ -82,7 +82,7 @@ int AddKeysOperation::execute() const QVariantMap map = load(m_file); QVariantMap result = addKeys(map, m_data); - if (map.isEmpty() || map == result) + if (result.isEmpty() || map == result) return -4; // Write data again: diff --git a/src/tools/sdktool/addkitoperation.cpp b/src/tools/sdktool/addkitoperation.cpp index 58837a21a5..93ea8b6fcb 100644 --- a/src/tools/sdktool/addkitoperation.cpp +++ b/src/tools/sdktool/addkitoperation.cpp @@ -218,7 +218,7 @@ int AddKitOperation::execute() const QVariantMap result = addKit(map, m_id, m_displayName, m_icon, m_debuggerEngine, m_debugger, m_deviceType.toUtf8(), m_sysRoot, m_tc, m_qt, m_mkspec, m_extra); - if (map.isEmpty() || map == result) + if (result.isEmpty() || map == result) return -2; return save(result, QLatin1String("profiles")) ? 0 : -3; diff --git a/src/tools/sdktool/addqtoperation.cpp b/src/tools/sdktool/addqtoperation.cpp index d61b1d8501..dafb8ee68a 100644 --- a/src/tools/sdktool/addqtoperation.cpp +++ b/src/tools/sdktool/addqtoperation.cpp @@ -154,7 +154,7 @@ int AddQtOperation::execute() const QVariantMap result = addQt(map, m_id, m_displayName, m_type, m_qmake, m_extra); - if (map.isEmpty() || result == map) + if (result.isEmpty() || result == map) return -2; return save(result, QLatin1String("qtversions")) ? 0 : -3; diff --git a/src/tools/sdktool/addtoolchainoperation.cpp b/src/tools/sdktool/addtoolchainoperation.cpp index 0aeca51154..afde33bcca 100644 --- a/src/tools/sdktool/addtoolchainoperation.cpp +++ b/src/tools/sdktool/addtoolchainoperation.cpp @@ -150,7 +150,7 @@ int AddToolChainOperation::execute() const map = initializeToolChains(); QVariantMap result = addToolChain(map, m_id, m_displayName, m_path, m_targetAbi, m_supportedAbis, m_extra); - if (map.isEmpty() || map == result) + if (result.isEmpty() || map == result) return -2; return save(result, QLatin1String("toolchains")) ? 0 : -3; diff --git a/src/tools/sdktool/rmkitoperation.cpp b/src/tools/sdktool/rmkitoperation.cpp index 31d9537332..fe677ea433 100644 --- a/src/tools/sdktool/rmkitoperation.cpp +++ b/src/tools/sdktool/rmkitoperation.cpp @@ -89,7 +89,7 @@ int RmKitOperation::execute() const QVariantMap result = rmKit(map, m_id); - if (result.isEmpty() || result == map) + if (result == map) return -2; return save(result, QLatin1String("profiles")) ? 0 : -3; |