Android: check that app's lib_name value doesn't contain spaces
android.app.lib_name is used for the app's lib that contains the main() function, *.so lib files usually have non-spaced names, thus to avoid wrong changes done to the manifest file, it's better to throw an error in this case. Change-Id: I4d4f0235612b308c78fd06a77690604c5c69f8ff Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
parent
d85794c231
commit
531d12edaf
@ -1506,6 +1506,15 @@ bool updateAndroidManifest(Options &options)
|
||||
reader.attributes().hasAttribute(QLatin1String("android:label")) &&
|
||||
reader.attributes().value(QLatin1String("android:label")) == QLatin1String("@string/app_name")) {
|
||||
checkOldAndroidLabelString = true;
|
||||
} else if (reader.name() == QLatin1String("meta-data")) {
|
||||
const auto name = reader.attributes().value(QLatin1String("android:name"));
|
||||
const auto value = reader.attributes().value(QLatin1String("android:value"));
|
||||
if (name == QLatin1String("android.app.lib_name")
|
||||
&& value.contains(QLatin1Char(' '))) {
|
||||
fprintf(stderr, "The Activity's android.app.lib_name should not contain"
|
||||
" spaces.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user