summaryrefslogtreecommitdiffstats
path: root/src/tools/uic
Commit message (Collapse)AuthorAgeFilesLines
* Regenerate src/*Alexandru Croitor2019-11-142-2/+2
| | | | | | Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate everything under ./srcAlexandru Croitor2019-11-122-2/+0
| | | | | | | Change-Id: Ibdbdc17f8c2ee41356f490dd839a47e1bcf4c586 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-111-3/+0
|\ | | | | | | Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
| * Kill all QPictureIOAllan Sandfeld Jensen2019-08-121-3/+0
| | | | | | | | | | | | | | Has been deprecated for a long time. Change-Id: I4579e3c2997c649f0fa66b9cdbcf8e7fc6d661a5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Regenerate tools projectsAlexandru Croitor2019-10-082-8/+51
| | | | | | | | | | | | Change-Id: I69a56ca2bd1d5f983197c6cde400c191c5dc7bd9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Merge branch 'wip/qt6' into wip/cmakeAlexandru Croitor2019-08-151-2/+3
|\| | | | | | | Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
| * Merge remote-tracking branch 'origin/dev' into wip/qt6Lars Knoll2019-08-061-2/+3
| |\ | | | | | | | | | Change-Id: Ib719a6249069e6bd6c9311bbec7f364855ab82ff
| | * 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>
* | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-1113-52/+67
|\| | | | | | | | | | | Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
| * | Merge remote-tracking branch 'origin/dev' into wip/qt6Alexandru Croitor2019-07-088-19/+38
| |\| | | | | | | | | | Change-Id: I02cbc4f77a82100b96cdb90c160ce0207f180d7f
| | * uic: Implement form window setting to disable QObject::connectSlotsByName()Friedemann Kleint2019-07-024-1/+20
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-76375 Change-Id: I16ad147366aa7d52b7a0e17ae240127d8ac34b3c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| | * uic: Fix remaining clang warningsFriedemann Kleint2019-06-285-18/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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: Add option to disable the call to QObject::connectSlotsByName()Friedemann Kleint2019-06-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge remote-tracking branch 'origin/dev' into wip/qt6Simon Hausmann2019-06-269-33/+29
| |\| | | | | | | | | | Change-Id: I4ea2b77cc201daed94fbe321f146dfd20365a534
| | * uic: Fix some clang warningsFriedemann Kleint2019-06-064-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-064-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply Fixits by Qt Creator with some amendments. Change-Id: I152cb5935ff7d649de297b010b9253c625c7da84 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| | * uic: Introduce nullptrFriedemann Kleint2019-06-115-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply Fixits by Qt Creator. Change-Id: Ic2d65b2604d1d71d910773e02bcdf2466f49e52c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-06-142-8/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes many different CMake places to mention Qt6 instead of Qt5. Note that some old qt5 cmake config files in corelib are probably not needed anymore, but I still renamed and kept them for now. Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
| * | Merge remote-tracking branch 'origin/dev' into wip/qt6Alexandru Croitor2019-06-111-1/+1
| |\| | | | | | | | | | Change-Id: Ieb8efee9d74229b9f141ec715e3a9557586b51e8
| | * Remove QLatin1Literal usagesGiuseppe D'Angelo2019-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That's an undocumented Qt 4/3/2 remnant, start remove usages. Fix incorrect include header in qclass_lib_map.h as a drive-by. Change-Id: I939be2621bc03e5c75f7e3f152546d3af6d37b91 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Merge remote-tracking branch 'origin/dev' into wip/qt6Alexandru Croitor2019-06-064-42/+52
| |\| | | | | | | | | | Change-Id: Iac12a37fa6536ebe30e6548f7c54ec0c402c9f5d
| * | uic: Remove deprecated optionsKai Koehne2019-05-271-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --no-stringliteral option got introduced by commit d12d2949d1e4ac0 for 5.10.0, but already deprecated in commit ff18b02f21a04f7 for 5.12.0. [ChangeLog][uic] uic does not accept the --no-stringliteral/-s option anymore. Change-Id: I7a0f647ad91b3760bc826884702bf8581f5565f2 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-035-51/+65
|\ \ \ | | |/ | |/| | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * | uic/Python: Fix tab stop/Z-Order and buddy handlingFriedemann Kleint2019-05-084-42/+52
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/Python: Generate empty strings as "" instead of QString()Friedemann Kleint2019-05-081-2/+4
| | | | | | | | | | | | Task-number: PYSIDE-797 Change-Id: I4ce12ba01318e5ed7e88178dfd2450d9fe78c708 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * Deprecate conversion functions between QList and QSetLars Knoll2019-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | Users should use range constructors instead to do the conversion. Keep conversion methods between QList and QVector as these will turn into a no-op in Qt 6, whereas forcing people to use range constructors would lead to deep copies of the data. Change-Id: Id9fc9e4d007044e019826da523e8418857c91283 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Prefix textstream operators with Qt::Lars Knoll2019-05-021-5/+5
| | | | | | | | | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * uic: Fix missing Python import for QFontComboBoxFriedemann Kleint2019-04-241-1/+3
| | | | | | | | | | | | | | | | It requires QFontDatabase from QtGui. Add more classes from QtGui. Fixes: PYSIDE-994 Change-Id: Ib84c86e2305fad60560a3f12997eb1e46deb67cb Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Rerun pro2cmake on projects that use .ui filesAlexandru Croitor2019-05-221-2/+0
| | | | | | | | | | | | | | Task-number: QTBUG-75875 Change-Id: I95109b07fc4a6e09fe7911a21fc5f27f2c895d77 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Export tool config and target files for each relevant moduleAlexandru Croitor2019-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake will now generate config and target files for each module that provides tools. As a result, namespaced global targets such as Qt5::moc or Qt5::rcc can be made available. Third party projects that require just these tools, and not the Qt modules themselves, should specify CMAKE_PREFIX_PATH pointing to the installed Qt location, and call find_package(Qt5CoreTools), find_package(Qt5GuiTools), etc. It is also possible to call find_package(Qt5Tools REQUIRED Core Widgets) where the last option is a list of modules whose tools should be imported. Note that all the tools are in the Qt5:: namespace and not in the Qt5CoreTools:: or Qt5WidgetsTools:: namespace. This commit also changes the behavior regarding when to build tools while building Qt itself. When cross compiling Qt (checked via CMAKE_CROSSCOMPILING) or when -DQT_FORCE_FIND_TOOLS=TRUE is passed, tools added by add_qt_tool will always be searched for and not built. In this case the user has to specify the CMake variable QT_HOST_PATH pointing to an installed host Qt location. When not cross compiling, tools added by add_qt_tool are built from source. When building leaf modules (like qtsvg) that require some tool that was built in qtbase (like moc), the module project should contain a find_package(Qt5ToolsCore) call and specify an appropriate CMAKE_PREFIX_PATH so that the tool package is found. Note that because HOST_QT_TOOLS_DIRECTORY was replaced by QT_HOST_PATH, the ensure syncqt code was changed to make it work properly with both qtbase and qtsvg. Here's a list of tools and their module associations: qmake, moc, rcc, tracegen, qfloat16-tables, qlalr -> CoreTools qvkgen -> GuiTools uic -> WidgetTools dbus related tools -> DBusTools Task-number: QTBUG-74134 Change-Id: Ie67d1e2f8de46102b48eca008f0b50caf4fbe3ed Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Merge remote-tracking branch 'gerrit/dev' into wip/cmakeTobias Hunger2019-04-161-63/+92
|\| | | | | | | Change-Id: I2e1812e4f40131ff74919aa3b558db5c261fe412
| * uic: Do not generate Q_UNUSED for PythonFriedemann Kleint2019-04-161-1/+1
| | | | | | | | | | | | Task-number: PYSIDE-797 Change-Id: Id269af024c03c2c586d440659bb6c49c3d6eedc6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * uic: Port WriteInitialization::writeBrush() be able to generate PythonFriedemann Kleint2019-04-121-19/+27
| | | | | | | | | | | | Task-number: PYSIDE-797 Change-Id: I7c4e204a5ac9be2dee8f06c38323a15a0372fe5c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * uic: Refactor WriteInitialization::writeIconProperties() and add PythonFriedemann Kleint2019-04-121-43/+64
| | | | | | | | | | | | | | | | | | Unfold the function with returns to reduce nesting and add language handling. Task-number: PYSIDE-797 Change-Id: Ie6c47745b118d75c0bb2c9eea7d52c8f0377f1a6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-1627-883/+1794
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * uic: Fix enum values for PythonFriedemann Kleint2019-04-083-77/+109
| | | | | | | | | | | | | | | | Add a helper for replacing "::" by "." for Python. Task-number: PYSIDE-797 Change-Id: I017d430b0b8b2ffbbd3300d583603924fee4d479 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * uic: Port method calls to pythonFriedemann Kleint2019-04-083-128/+228
| | | | | | | | | | | | | | | | | | Use the language helper for dereferencing pointers and end of line. Task-number: PYSIDE-797 Change-Id: Icbca9015f2a3e8800ad4a56edf8fef9ee43f4528 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * uic: Adapt connection syntax to PythonFriedemann Kleint2019-04-054-18/+59
| | | | | | | | | | | | | | | | | | | | 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: Add qualification with "self." for PythonFriedemann Kleint2019-04-052-5/+12
| | | | | | | | | | | | | | | | | | Prepend "self." (this) to the name stored in the class Driver's hashes as specifying it is mandatory in Python. Task-number: PYSIDE-797 Change-Id: I1da110b84b2d1131ee6af915f9cc4ba21d7de710 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * uic: Add pythonFriedemann Kleint2019-04-0513-48/+630
| | | | | | | | | | | | | | | | | | | | | | | | - Add command line option - Add import (include) handling - Add language helpers like streamable classes for Function definition, object instantiation - Implement header comment formatting Task-number: PYSIDE-797 Change-Id: I15041ab16504ea159f6665781a829cd548585af1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * uic: Refactor string constant formattingFriedemann Kleint2019-04-054-117/+226
| | | | | | | | | | | | | | | | | | Refactor the fixString() helper, moving the code into a streamable class using a helper which can be used for different encodings. Task-number: PYSIDE-797 Change-Id: I0f82945b6b334da8524882dda2f104327eba79d4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-031-3/+3
| |\ | | | | | | | | | Change-Id: I99a27f9a0402e1ccad45a2d062d784f8d9a08dd3
| | * Fix remaining Q_DECL_OVERRIDE instancesAllan Sandfeld Jensen2019-04-021-3/+3
| | | | | | | | | | | | | | | Change-Id: I512ea5a6c8cf2928b276af7f83f00a1df5879595 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | uic: Refactor reverse name lookupFriedemann Kleint2019-04-023-27/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a helper routine to look up the dom classes by attribute name and change Driver::widgetByName() and Driver::actionByName() to use that as does Driver::actionGroupByName() (all these functions are called with names from the XML files). Remove the name normalization in WriteInitialization::findDeclaration() and refactor WriteInitialization::acceptActionRef() to call findOrInsert() to correctly use the unique name. Task-number: PYSIDE-797 Change-Id: I34058361964719c442182faf798f055f11b40412 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-161-1/+1
| |\| | | | | | | | | | Change-Id: Ief0a0b754c104d5348fee9ee15e967bd37c526f8
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-151-1/+1
| | |\ | | | | | | | | | | | | Change-Id: I2bf3b4ceb79364330eae4cbf3cdee9a82d1be46d
| | | * uic: write out min/maximumSectionSize property before current sizeChristian Ehrlicher2019-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since faff43348bfae5cfc709fabe9d2698fc3063c050 the min/maxSectionSize is respected when setting the current/default section size programatically. This is not honored when writing out the properties and therefore the default section size is not correctly set when it's smaller then the default minimum section size. Therefore make sure to set min/maxSectionSize property before all other properties. Fixes: QTBUG-74352 Change-Id: I8f9ede3e90b7c9c65f8440953b00e1d9d6006d38 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * | | More nullptr usage in headersKevin Funk2019-03-141-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | uic: Fix broken icon code generationFriedemann Kleint2019-01-231-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change b86d0b62156993936bf93169a895a92ad60adf7d rearranged the sequence of function calls when generating code adding QTabWidget and QToolBox pages, not taking into account that the iconCall() has a side effect (writing out icon definition) Revert that part and add a comment. Fixes: QTBUG-72980 Task-number: PYSIDE-797 Change-Id: Ie8fbaa36f21cd4408fb1f491195da5c260708e6c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * | uic: Refactor CustomWidgetsInfo::extends()Friedemann Kleint2019-01-105-42/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a extendsOneOf() helper that takes a QStringList to be searched and simplify the code accordingly. In WriteInitialization::acceptWidget(), move the variable CustomWidgetsInfo *cwi up and reuse everywhere to shorten code. Task-number: PYSIDE-797 Change-Id: I331e135b6aa58dbbd413ca151eb67b3eb92f09c6 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>