uic: Add option to disable the call to QObject::connectSlotsByName()

The code was actually there, but not connected to the command line
parser.

Task-number: QTBUG-76375
Change-Id: I801cf2bbd2f207a6ce1dabd1ee1dfbd892089bbc
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Friedemann Kleint 2019-06-27 14:58:41 +02:00
parent 5fb5ec93d6
commit 6301d5e51b

View File

@ -68,6 +68,10 @@ int runUic(int argc, char *argv[])
outputOption.setValueName(QStringLiteral("file"));
parser.addOption(outputOption);
QCommandLineOption noAutoConnectionOption(QStringList() << QStringLiteral("a") << QStringLiteral("no-autoconnection"));
noAutoConnectionOption.setDescription(QStringLiteral("Do not generate a call to QObject::connectSlotsByName()."));
parser.addOption(noAutoConnectionOption);
QCommandLineOption noProtOption(QStringList() << QStringLiteral("p") << QStringLiteral("no-protection"));
noProtOption.setDescription(QStringLiteral("Disable header protection."));
parser.addOption(noProtOption);
@ -110,6 +114,7 @@ int runUic(int argc, char *argv[])
driver.option().dependencies = parser.isSet(dependenciesOption);
driver.option().outputFile = parser.value(outputOption);
driver.option().autoConnection = !parser.isSet(noAutoConnectionOption);
driver.option().headerProtection = !parser.isSet(noProtOption);
driver.option().implicitIncludes = !parser.isSet(noImplicitIncludesOption);
driver.option().idBased = parser.isSet(idBasedOption);