diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-04-19 11:23:55 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-04 08:12:33 +0200 |
| commit | da3cb1deb6c752f8e4c05434e3451432e5d787ba (patch) | |
| tree | c2f7992eeee39617102cb864f798ebd7c06ec5f0 /src/tools/uic/cpp/cppwriteincludes.cpp | |
| parent | 8231614661e1eecaabcf33d1e332809556e86089 (diff) | |
uic: Generate Qt 5 connection syntax
Add a enum and formatting for member function pointer based
connections. Now preferably use member function pointer for Qt classes
or parameterless connections.
This should not require qOverload() within Qt classes after the
Signal/Slot disambiguation.
Add command line option to force either syntax for all connections.
Task-number: QTBUG-76375
Change-Id: Icdb4051e1173172a71cd536bdbc7d1ab1edf267d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/tools/uic/cpp/cppwriteincludes.cpp')
| -rw-r--r-- | src/tools/uic/cpp/cppwriteincludes.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/uic/cpp/cppwriteincludes.cpp b/src/tools/uic/cpp/cppwriteincludes.cpp index f2e69553c62..b9190b8295d 100644 --- a/src/tools/uic/cpp/cppwriteincludes.cpp +++ b/src/tools/uic/cpp/cppwriteincludes.cpp @@ -229,6 +229,9 @@ void WriteIncludes::add(const QString &className, bool determineHeader, const QS return; } + if (cwi->extends(className, QLatin1String("QDialogButtonBox"))) + add(QLatin1String("QAbstractButton")); // for signal "clicked(QAbstractButton*)" + if (determineHeader) insertIncludeForClass(className, header, global); } |
