summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/cpp/cppwriteinitialization.h
Commit message (Collapse)AuthorAgeFilesLines
* uic: Write QIcon theme enumsFriedemann Kleint2024-04-101-0/+2
| | | | | | | | | | | Split out some helpers to write the theme code with path fallback checking for the enum case (identified by a fully qualified icon) or the old XDG/filename case. Task-number: QTBUG-121823 Pick-to: 6.7 Change-Id: If2755483ab899f04e372cf95443f7e03970f6e7f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Remove redundant QPair includesAhmad Samir2023-09-061-1/+0
| | | | | | | | Nothing in those files uses QPair; and a local build finished fine without them. Task-number: QTBUG-115841 Change-Id: I669cfecaa9129bce6b31e464826287f138b159db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* uic: change the first parameter of pixCall to Q1LSVMate Barany2022-09-141-1/+1
| | | | | | | | | | | | | | | 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>
* 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>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2020-11-301-1/+1
| | | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this patch should have no impact on users. Pick-to: 6.0 Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Use QList instead of QVector in uicJarek Kobus2020-06-221-5/+5
| | | | | | Task-number: QTBUG-84469 Change-Id: I2ce8ca51409c8e29a84d88bdda968e6dec419bea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* uic: Generate string-based connections for custom slotsFriedemann Kleint2020-05-051-3/+5
| | | | | | | | | | | 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-0/+6
| | | | | | | | | | | | | | | 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>
* uic: Migrate from QList to QVectorFriedemann Kleint2019-11-261-1/+1
| | | | | | | | Replace QList by QVector in the ui4.cpp/.h files and replace occurrences in remaining code. Change-Id: I15913710b339ef1ef5f7e3c72a7a1be69a87079b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Remove some usages of QListFriedemann Kleint2019-11-131-2/+3
| | | | | | Task-number: QTBUG-79896 Change-Id: I298a434040fa903509685b7cde82bbea722f3246 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Implement form window setting to disable QObject::connectSlotsByName()Friedemann Kleint2019-07-021-0/+1
| | | | | | Task-number: QTBUG-76375 Change-Id: I16ad147366aa7d52b7a0e17ae240127d8ac34b3c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Fix remaining clang warningsFriedemann Kleint2019-06-281-5/+5
| | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | - 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>
* uic: Replace 'typedef' by 'using'Friedemann Kleint2019-06-061-6/+6
| | | | | | | | | | | | | | | | | Apply Fixits by Qt Creator with some amendments. Change-Id: I152cb5935ff7d649de297b010b9253c625c7da84 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Introduce nullptrFriedemann Kleint2019-06-111-1/+1
| | | | | | | | | | | | | | | | | Apply Fixits by Qt Creator. Change-Id: Ic2d65b2604d1d71d910773e02bcdf2466f49e52c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic/Python: Fix tab stop/Z-Order and buddy handlingFriedemann Kleint2019-05-081-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | The code compared the attribute names of the properties against the m_registeredWidgets hash which contained the qualified names (self.widget) and thus reported errors without actually generating anything. Replace the m_registeredWidgets hash by a lookup of the attribute name in the m_widgets hash and add a function widgetVariableName() returning the qualified variable name for an attribute name and use that for the checks. Remove unused m_registeredActions hash and rename some variables to make it clearer. Task-number: PYSIDE-797 Change-Id: Id31d95c1141d21c51eb85bcd8f8fc63486eb36a5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* uic: Adapt connection syntax to PythonFriedemann Kleint2019-04-051-1/+7
| | | | | | | | | | Extend WriteInitialization::findDeclaration() to return the class name (on this occasion preparing for generating Qt 5 connection syntax) and add a helper function for formatting the connection. Task-number: PYSIDE-797 Change-Id: I7507f604c8275c93d347b7a6a5d5b5a2a5f3ffd5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* uic: Remove unused codeFriedemann Kleint2018-12-031-5/+0
| | | | | | Task-number: PYSIDE-797 Change-Id: I6958ad76c138dcb4126cda8b26f23311963d6d37 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Fix pixmap functions for QIconFriedemann Kleint2018-09-061-0/+2
| | | | | | Task-number: QTBUG-8563 Change-Id: I69b16ac2327fee6dd6f26845bdda60ad4dde56fa Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Fix clang-tidy warningsFriedemann Kleint2018-08-031-3/+4
| | | | | | | | | | - Simplify/streamline if statmenents - Change else if to if after return/break/continue - Use isEmpty() for containers instead of checking size() - Replace index-based loops by range-based for Change-Id: I008228a99082a4d0e27be9f6c6af392602140b2f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: Revert the microoptimization patch introducing QStringLiteralJarek Kobus2018-07-191-3/+0
| | | | | | | | | | | | | | | | | | | | This reverts the following commits: d12d2949d1e4ac08a47928ef27bc45459b3fb104 26c3bec09bccf9006f5ef4945a428d9ef56c1d12 49b08f96e824f49fab9aa5c9a1a0ed582d4558bb We can't easily predict all code paths for QDesigner with such a microoptimization. We also don't want to generate three different string constructions depending on some sophisticated heuristics. [ChangeLog][uic] The -no-stringliteral option is now deprecated and UIC will not generate QStringLiteral anymore. Task-number: QTBUG-65251 Task-number: QTBUG-51602 Change-Id: I34a5a1934a8df19c5c84ac2ba8e5168ce5665037 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* uic: Support id-based translationsFriedemann Kleint2018-01-181-1/+1
| | | | | | | | | Use Ids from newly introduced id attribute depending on the global form setting. Change-Id: I0a5094d5543c0714c88511fa159b60afc9be3c81 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-14/+14
| | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* uic: Add -no-stringliteral optionAlexander Volkov2017-08-031-0/+3
| | | | | | | | | | | | | ... and use it when building shared libraries and plugins. It prevents application crashes in cases when libraries and plugins are unloaded and their strings are still used by the main application. Task-number: QTBUG-51602 Change-Id: I4af79183f18c5ed6142d55af02a36fe4334f3fee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove ancient embedded pixmaps and scripts from uicJarek Kobus2017-06-121-10/+1
| | | | | Change-Id: Iec06e1af91a6d61226ae484325b1ec82810d634d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* uic: Port Ui classes to QVectorFriedemann Kleint2017-04-131-1/+1
| | | | | | | | | | Regenerate the ui4* files after a change in qttools replacing QList by QVector in the Dom* classes with the exception of QList<DomProperty *> since that affects the public interfaces of QAbstractFormBuilder. Change-Id: I0922127fb911a5abc125d93ef97a0b22ff94788a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* uic: replace an inefficient QList with QVectorMarc Mutz2016-02-111-3/+4
| | | | | | | | | | | | | | | | | Buddy is larger than a void*, so holding it in QLists is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Fix by marking it movable, and holding it in a QVector instead. Since QVector requires a default ctor, drop the pointless existing ctor and use aggregate initialization instead. Use QVector's rvalue append. Change-Id: I696ca4f03dbe362a5438be209debbcd966fe8130 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Remove support for some very old compilersAllan Sandfeld Jensen2015-02-151-18/+0
| | | | | | | Remove code supporting gcc 4.0 and earlier, and MSVC 2005 and earlier. Change-Id: I3304e11bb38c101f113c124e8e533c5578badf34 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-16/+16
| | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* make src/tools/ compile without CamelCase headersOswald Buddenhagen2012-09-191-6/+6
| | | | | | | | so the build works with syncqt -minimal Change-Id: Ief5e8eb9a504dd6c84cff76cc3e5257450386a0f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace `const QLatin1String &` with `QLatin1String` where appropriateKonstantin Ritt2012-05-251-1/+1
| | | | | | | Task-Id: QTBUG-24502 Change-Id: I360dee4dc68c165de0631ce4cf34e76fd873080e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* uic: Add translation-attributes to string list properties.Friedemann Kleint2012-01-201-1/+4
| | | | | | | | Task-number: QTBUG-8926 Task-number: QTBUG-20440 Change-Id: I57d92110bf532c717451336bd1943c9571020478 Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* uic: Remove Q3Support.Friedemann Kleint2011-05-061-17/+0
| | | | Remove code and tests.
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+373
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12