forked from qt-creator/qt-creator
Disable androidMinSdkVersion & androidTargetSdkVersion editing if needed
Starting with Qt 5.15 we moved sdk min & target versions from AndroidManifest.xml file to build.gradle (the change was needed by android gradle plugin). Fixes: QTBUG-70817 Change-Id: I3b493d88da1a4a98f1a6d8ebadc26aebfc601090 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
committed by
BogDan Vatra
parent
afffbe01aa
commit
8bb3b3c4f1
@@ -806,8 +806,12 @@ void AndroidManifestEditorWidget::syncToWidgets(const QDomDocument &doc)
|
||||
m_versionNameLinedit->setText(manifest.attribute(QLatin1String("android:versionName")));
|
||||
|
||||
QDomElement usesSdkElement = manifest.firstChildElement(QLatin1String("uses-sdk"));
|
||||
setApiLevel(m_androidMinSdkVersion, usesSdkElement, QLatin1String("android:minSdkVersion"));
|
||||
setApiLevel(m_androidTargetSdkVersion, usesSdkElement, QLatin1String("android:targetSdkVersion"));
|
||||
m_androidMinSdkVersion->setEnabled(!usesSdkElement.isNull());
|
||||
m_androidTargetSdkVersion->setEnabled(!usesSdkElement.isNull());
|
||||
if (!usesSdkElement.isNull()) {
|
||||
setApiLevel(m_androidMinSdkVersion, usesSdkElement, QLatin1String("android:minSdkVersion"));
|
||||
setApiLevel(m_androidTargetSdkVersion, usesSdkElement, QLatin1String("android:targetSdkVersion"));
|
||||
}
|
||||
|
||||
QString baseDir = m_textEditorWidget->textDocument()->filePath().toFileInfo().absolutePath();
|
||||
|
||||
|
Reference in New Issue
Block a user