summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/cpp/cppwriteinitialization.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Update commercial SPDX-License-Identifier"v6.5.5-lts-lgplTarja Sundqvist2025-06-101-1/+1
| | | | | | | | | This reverts commit 4c16c8afb37f0b4cbcfb37d47baf6fc29e42c7b7. The revert is needed for the opensource releases which cannot contain commercial license headers. Change-Id: I0caa255093ecf406978de958cd3810bc9f80121e Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> (cherry picked from commit 5d8e9a8415562ba004b38508d91e1fa0254c17d3)
* Update commercial SPDX-License-IdentifierTarja Sundqvist2023-12-111-1/+1
| | | | | | | | | | | | Some files in tqtc-qtbase were missing the commercial SPDX-License-Identifier. Build files, examples, tests, or documentation are not updated. Task-number: QTQAINFRA-5900 Change-Id: I28b9c03a0e62f2b2ce1c9edbe13921f4146a0924 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit ffb7d2e3205cc75337ba9ed93d12222e27c3abc1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* uic: Prepare for encountering fully qualified enum values in new .ui filesFriedemann Kleint2023-11-171-24/+38
| | | | | | | | | | | | | | | | | | This means checks have to be rewritten using endsWith(). It mainly affects the QSizePolicy handling whose values originate from different sources, including numbers. To address this, refactor the code to deal with unqualified enum value names and introduce a helper function that fully qualifies the enumeration when writing out. Task-number: PYSIDE-2492 Task-number: PYSIDE-1735 Task-number: QTBUG-118473 Change-Id: Iccbb884777aa9c696fbf48f9d7329353ef945b0f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 2e82796022b9eaeeb3a231713603c39ae7b2099d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2ee11d3e019cb4deb3b2af0212f6edb9f6d77543)
* uic: Port enumeration lookups to QLatin1StringViewFriedemann Kleint2023-11-031-1/+1
| | | | | | | | | | | | | This makes string operations on them easier. Task-number: PYSIDE-2492 Task-number: PYSIDE-1735 Task-number: QTBUG-118473 Change-Id: I92922b701fd72f5521eee7f6d3ef63492e03be9b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit d7ebe91781b80c8f748ea56d7915f03e69916516) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 69487198ef2580d64238e7044f09ff262eb638e5)
* uic: Generate QFont::HintingPreferenceFriedemann Kleint2023-05-231-0/+12
| | | | | | | | Task-number: QTBUG-113670 Change-Id: I326d310b2a0df9a6f11e33588e553dff66e5a6f4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit bfa557da9149e35c6d8241205ebb5096e869977a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* uic: Generate string-based connections for QLCDNumber::display()Friedemann Kleint2023-02-071-0/+4
| | | | | | | | | | | There are still ambiguous overloads of display(), which cause PMF-syntax to fail. Task-number: QTBUG-110952 Change-Id: I0887a5a06b026e4d5a20ef732d5892c8ac7fb6db Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 94c16517b3f8f01309a89598e698931ef77d60db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that the on() matcher has been replaced by one that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache, to avoid porting calls that explicitly test count(). Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-111-2/+2
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* uic/Python: Do not generate QByteArray for dynamic C-String propertiesFriedemann Kleint2022-10-051-2/+3
| | | | | | | Fixes: PYSIDE-2069 Pick-to: 6.4 Change-Id: I8f37023a6d697ee257f283d08347349f89e7f0a9 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* uic: change the first parameter of pixCall to Q1LSVMate Barany2022-09-141-10/+10
| | | | | | | | | | | | | | | While working on QTBUG-98434 some improvements for the pre-existing code were found during the code review. The first parameter is the base of the QString created by the function but it is not needed as an actual QString, it is just appended to. Change the type from QString to QL1SV. Task-number: QTBUG-103100 Change-Id: I8042a921628e84d951dcfd2fd12154bf74dd5162 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* uic: Change some QLatin1String literals to QString literalsMate Barany2022-09-141-6/+6
| | | | | | | | | | | | | | | | | While working on QTBUG-98434 some potential improvements were found in the pre-existing code. Some of the QLatin1String literals are used to initialize QStrings or are converted to QStrings and so it makes sense to replace them with QString literals. As a related change, change the type of namespaceDelimitier from QString to QL1SV, since it is used only for a function call and that function has an overload to take QL1SV. Task-number: QTBUG-103100 Change-Id: I56db6ddd84ad2a7133a765bb49ecd8f962ac5c13 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* uic: Fix mismatches between QString/QLatin1StringViewMate Barany2022-09-121-4/+4
| | | | | | | | | | | While working on QTBUG-98434 some potential improvements were found for pre-existing issues, for example some variables were wrongly initialized. Fix the mismatches between QString/QLatin1StringView. Task-number: QTBUG-103100 Change-Id: Ib120452fe8012cda3f9becea8f9837efc38cf199 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* uic: Remove trailing blanks generated into Python icon codeFriedemann Kleint2022-09-071-2/+1
| | | | | | | | The indentation is only required for C++. Pick-to: 6.4 6.3 6.2 Change-Id: Ie861b12ba262fd56995c11d883129bafd11eface Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Fix string list properties for PythonFriedemann Kleint2022-05-261-10/+27
| | | | | | | | | | | | Use the opportunity to modernize the code to use an initializer list instead of stream operators. This then makes it easier to generate a comma-delimited list that works for Python as well. Fixes: PYSIDE-1942 Change-Id: I5291b55bd0685e06ad62e52c7ebccffce98e9c23 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* uic: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-04-261-3/+3
| | | | | | | | Task-number: QTBUG-98434 Change-Id: Ied042c0a61e48844694f6a94f0423735e92fb6d3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* uic: replace QLatin1String uses with _L1 or _sSona Kurazyan2022-04-261-187/+186
| | | | | | | Task-number: QTBUG-98434 Change-Id: I5a9b01d1dd2a2a727cfb71e829dbf631bf25e2db Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* uic: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-231-8/+8
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I0d3c232a9fa95aea854445922f100b89c6d6f5a1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* uic: use C string literals for setObjectName()Marc Mutz2022-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | Because setObjectName() now takes a QAnyStringView, passing C string literals is much more efficient than using QString::fromUtf8(). This patch only deals with setObjectName() as a known property, probably from a name attribute. If the objectName property is set by a <property> element (or so I assume), we still emit a QString::fromUtf8(). Detecting objectName there would be too much magic. Besides, I haven't been able to find why sometimes there's a second setObjectName call right after the first, when in the XML it seems all kosher (name attribute and objectName <property> agreeing on the content). Change-Id: Icf07bad841ac735a9c744bbd955428ba15758089 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* uic: Generate parameters for ambiguous signalsFriedemann Kleint2021-12-071-2/+7
| | | | | | | | Fixes: PYSIDE-1720 Pick-to: 6.2 Change-Id: I71b77db73471bdec7826bf69c7df521d7686537e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Refactor CustomWidgetsInfo::extends() to use QAnyStringViewFriedemann Kleint2021-11-261-23/+23
| | | | | | | Task-number: PYSIDE-1720 Pick-to: 6.2 Change-Id: I2db4ee9586a87c70db08298e311d692e20a93af0 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* uic: Fix font family code generation for pythonFriedemann Kleint2021-05-031-2/+4
| | | | | | | | | | | Amend the code introduced by d8602ce58b6ef268be84b9aa0166b0c3fa6a96e8 to generator correct code for Python. Change-Id: I71fc9a1830d6bd591d32ce08002572c29f02a27f Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit b2ebc64dd9914359fe8acf2bc9960e341e98cf80) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* uic: Do not generate QComboBox::AdjustToMinimumContentsLength into codeFriedemann Kleint2021-01-041-6/+23
| | | | | | | | | | | | | | | | The enumeration value was removed in Qt 6 by 1a342b2db14fa92bca717f5daff950b2eef869f7. Ignore it. Add a check to helper function checkProperty() and move the code from a5e2f2ddad0cc6b6a06f51e0dce6acf0fecf9de6 there as well. Pick-to: 6.0 Task-number: QTBUG-89093 Fixes: QTBUG-89700 Change-Id: I0890be8fff155d7342e2386b7f6b0783a5f3a192 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Do not generate QDockWidget::AllDockWidgetFeatures into codeFriedemann Kleint2020-12-031-1/+6
| | | | | | | | | | The enumeration value was deprecated by qtbase/f15aa1fd84e46dfc4d9a78b3a7ba482e42abd9c1 and removed in Qt 6. Pick-to: 6.0 Task-number: QTBUG-89093 Change-Id: Iaf46adc1e1bd79e4aaab066c9fa4bf84a8ee34d0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFont: Prefer setFamilies() over setFamily()Andy Shaw2020-11-201-2/+2
| | | | | | | | | | | | | | | | By depending on setFamilies() then we can be sure that font names with spaces, commas, quotes and so on are correctly handled without being misinterpreted. For now it will split on the comma when a string containing one is passed to setFamily. But from Qt 6.2 this will be removed to preserve the family string as a convenience function. [ChangeLog][QtGui][QFont] Indicated that setFamilies/families is preferred over setFamily/family to ensure that font family names are preserved when spaces, commas and so on are used in the name. Change-Id: Id3c1a4e827756a4c928fed461a4aafa5a0f06633 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Ignore weight in .ui files instead of converting itEskil Abrahamsen Blomfeldt2020-09-031-53/+0
| | | | | | | | | | | | | | | | | | | | | | | In 3558704ed5c3d2c6dc6d024dfa454997469ca75f, we added code to support old .ui files which used the old integer scale for font weights by checking for a special attribute which would help separate new and old files. Since then, it has become apparent that the weight element in .ui is not actually used for anything, since it is only emitted when the bold flag is set and always has to match QFont::Bold in these cases. So instead of converting, we simply ignore it now, and respect the bold flag instead. This also reverts the changes to ui4.* in uic, since the scale attribute is no longer needed. Task-number: QTBUG-42248 Change-Id: I1898868b58004099590f4eaf01f24c57bd34d779 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use OpenType font weightsJonas Karlsson2020-08-281-2/+51
| | | | | | | Task-number: QTBUG-42248 Change-Id: Icdb301b27d6699c2b842c4563fbef9df73c23cbc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-311-2/+2
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use QList instead of QVector in uicJarek Kobus2020-06-221-1/+1
| | | | | | Task-number: QTBUG-84469 Change-Id: I2ce8ca51409c8e29a84d88bdda968e6dec419bea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Port androiddeployqt and uic from QStringRef to QStringViewLars Knoll2020-06-151-2/+2
| | | | | | Task-number: QTBUG-84319 Change-Id: I7f30a4d73dd98ee1977645d7274816cd71307506 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* uic: Generate string-based connections for custom slotsFriedemann Kleint2020-05-051-9/+18
| | | | | | | | | | | Qt Designer let's you add custom slots and signals to the main form; they should use string-based connection syntax since the class is not known in setupUI(). Amends da3cb1deb6c752f8e4c05434e3451432e5d787ba. Task-number: QTBUG-76375 Change-Id: I5a3a5630f77c812d48db1cdb7a8658a4d2718228 Reviewed-by: Liang Qi <liang.qi@qt.io>
* uic: Generate Qt 5 connection syntaxFriedemann Kleint2020-05-041-3/+30
| | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-111-6/+13
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/plugin/qlibrary.cpp src/corelib/plugin/qlibrary_unix.cpp src/corelib/plugin/qpluginloader.cpp Change-Id: I866feaaa2a4936ee5389679724c8471a5b4b583d
| * uic: Add pass to empty functionsCristián Maureira-Fredes2020-03-031-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | When there are no translations on the UI file, the function was left empty but without a 'pass' statement, generating a SyntaxError, this change includes it to avoid problems while using the generated Python file. Fixes: PYSIDE-1234 Change-Id: I30482a95c95fb4b4f4456531946a79c960d76318 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-061-1/+1
|\| | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl_symbols.cpp Change-Id: I8c13b5c48a8ecce96540b39c6d5f8ca146eb2339
| * uic/Python: Set form object name correctlyFriedemann Kleint2020-02-051-1/+1
| | | | | | | | | | | | | | | | Add missing "not" for the isEmpty() check. Fixes: PYSIDE-1210 Change-Id: I3798d483df9d077300ff69dc5d3a8d08812f534e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-061-13/+16
|\| | | | | | | | | | | | | Conflicts: src/corelib/kernel/qvariant.h Change-Id: I8f3873e74b9795ac889e7c7ec5de2619bca92160
| * uic: setWeight replace semi-colon by language::eolCristián Maureira-Fredes2020-01-051-1/+1
| | | | | | | | | | Change-Id: I87f9c2896cfd6f83f683cf731e4a62aef627d69c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * uic: Add colon missing for "if()" constructs in PythonFriedemann Kleint2020-01-031-5/+10
| | | | | | | | | | | | Task-number: PYSIDE-1169 Change-Id: I63c5305b0ddad1c4fcd585b65c3c78c05b40bac1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * uic: Fix empty strings for PythonFriedemann Kleint2020-01-031-7/+5
| | | | | | | | | | | | | | | | Introduce a constant in the language namespace. Fixes: PYSIDE-1174 Change-Id: Ic3e58580b20c1d9a6ddf97f20709a3046d4b6f0c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-271-2/+2
|\| | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/platforms/xcb/qxcbscreen.cpp src/widgets/accessible/qaccessiblewidget.cpp Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
| * uic: Rename raise() to raise_() for PythonCristián Maureira-Fredes2019-12-191-2/+2
| | | | | | | | | | | | Fixes: QTBUG-80791 Change-Id: Ia6339b8c683147456cdffa7f2d45972e8eacd92c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | uic: Remove some usages of QListFriedemann Kleint2019-11-131-4/+4
|/ | | | | | Task-number: QTBUG-79896 Change-Id: I298a434040fa903509685b7cde82bbea722f3246 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Add language::eol in more cases for python codeCristián Maureira-Fredes2019-10-251-18/+18
| | | | | Change-Id: I0ab4b37399d3fba6d27cf90cab22676a3c599e5a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Uic: fix crash when trying to resource icon informationChristian Ehrlicher2019-10-211-1/+1
| | | | | | | | | | Fix a typo introduced in be56db2c49be02fd7083c5a02131462748e29bef to avoid a crash when a pixmap is given for selected on but not for selected off. Fixes: QTBUG-79125 Change-Id: I84072b6b4e8a4d21684be21f5bff1deeaddbba6d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* uic: Avoid use of Q_UNUSED in the generated codehjk2019-07-301-2/+3
| | | | | | | | | | | | | | | | | | | Instead, use (void)x; directly. The current use of Q_UNUSED(x); generates warnings for an empty statement the expansion of Q_UNUSED contains a semicolon already. Emitting Q_UNUSED(x) without the extra semicolon would be an option, too, but as the future of Q_UNUSED's embedded semicolon seems unclear right now, avoid its use altogether. The change affects only generated code that's barely ever read by a human, so the overall utility of "improved readability" of Q_UNUSED in that place is questionable anyway. Change-Id: I332527ed7c202f779bd82290517837e3ecf09a08 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Implement form window setting to disable QObject::connectSlotsByName()Friedemann Kleint2019-07-021-1/+4
| | | | | | Task-number: QTBUG-76375 Change-Id: I16ad147366aa7d52b7a0e17ae240127d8ac34b3c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Fix remaining clang warningsFriedemann Kleint2019-06-281-9/+4
| | | | | | | | Fix remaining nullptr and member initialization issues which Qt Creator did not catch. Change-Id: If5492259aea9849c790f00809a27f4c78b446b9b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Fix some clang warningsFriedemann Kleint2019-06-061-5/+2
| | | | | | | | | | | | | | | | | | | | - Use range-based for - Use isEmpty() instead .size(), streamline code - Fix warnings about class definitions, use Q_DISABLE_COPY_MOVE and '= default' for trivial constructors Change-Id: I76255fd9d80c3faffebda9a438e86e918c16d289 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>