forked from qt-creator/qt-creator
Android: don't add all the Service meta-data for Qt 6.2+
These values were removed in Qt 6.2, don't add them in that case. Fixes: QTCREATORBUG-27088 Change-Id: I5560b18c0a849f7382b498097923ba425e47c40a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -1229,8 +1229,15 @@ static void addServiceArgumentsAndLibName(const AndroidServiceData &service, QXm
|
|||||||
writeMetadataElement("android.app.lib_name", "android:value", "-- %%INSERT_APP_LIB_NAME%% --", writer);
|
writeMetadataElement("android.app.lib_name", "android:value", "-- %%INSERT_APP_LIB_NAME%% --", writer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addServiceMetadata(QXmlStreamWriter &writer)
|
void AndroidManifestEditorWidget::addServiceMetadata(QXmlStreamWriter &writer)
|
||||||
{
|
{
|
||||||
|
// The values below are no longer needed in Qt 6.2+, don't add them
|
||||||
|
const Target *target = androidTarget(m_textEditorWidget->textDocument()->filePath());
|
||||||
|
if (target) {
|
||||||
|
const QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||||
|
if (qt && qt->qtVersion() >= QtSupport::QtVersionNumber(6, 2))
|
||||||
|
return;
|
||||||
|
}
|
||||||
writeMetadataElement("android.app.qt_sources_resource_id", "android:resource", "@array/qt_sources", writer);
|
writeMetadataElement("android.app.qt_sources_resource_id", "android:resource", "@array/qt_sources", writer);
|
||||||
writeMetadataElement("android.app.repository", "android:value", "default", writer);
|
writeMetadataElement("android.app.repository", "android:value", "default", writer);
|
||||||
writeMetadataElement("android.app.qt_libs_resource_id", "android:resource", "@array/qt_libs", writer);
|
writeMetadataElement("android.app.qt_libs_resource_id", "android:resource", "@array/qt_libs", writer);
|
||||||
|
@@ -160,6 +160,8 @@ private:
|
|||||||
QGroupBox *createApplicationGroupBox(QWidget *parent);
|
QGroupBox *createApplicationGroupBox(QWidget *parent);
|
||||||
QGroupBox *createAdvancedGroupBox(QWidget *parent);
|
QGroupBox *createAdvancedGroupBox(QWidget *parent);
|
||||||
|
|
||||||
|
void addServiceMetadata(QXmlStreamWriter &writer);
|
||||||
|
|
||||||
bool m_dirty; // indicates that we need to call syncToEditor()
|
bool m_dirty; // indicates that we need to call syncToEditor()
|
||||||
bool m_stayClean;
|
bool m_stayClean;
|
||||||
int m_errorLine;
|
int m_errorLine;
|
||||||
|
Reference in New Issue
Block a user