summaryrefslogtreecommitdiffstats
path: root/src/widgets/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Move QStateMachine from QtCore to QtScxmlKarsten Heimrich2020-08-241-13/+1
| | | | | | Task-number: QTBUG-80316 Change-Id: I2ee74110fd55e94d86321d3b3dc5bb8297424ed4 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Remove last remaining bits of QtPlatformHeadersTor Arne Vestbø2020-08-041-1/+0
| | | | | | Task-number: QTBUG-84220 Change-Id: I951e04bfe9358a99951d1d61ff47b675584b7f81 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Make QtPlatformHeaders a private moduleTor Arne Vestbø2020-07-061-0/+1
| | | | | | | | | | | The APIs will be reintroduced as part of the new platform interface API where appropriate. Clients that still depend on the platform headers can include it via QT += platformheaders-private. Change-Id: Ifbd836d833d19f3cf48cd4f933d7fe754c06d2d9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Phase 2 of removing QDesktopWidgetVolker Hilsheimer2020-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove QDestopWidget public header, simplify the implementation that maintains a Qt::Desktop type QWidget for each QScreen, and turn QWidget's initial target screen into a QScreen pointer. QApplication::desktop() now takes an optional QScreen pointer, and returns a QWidget pointer, so that applications and widgets can get access to the root widget for a specific screen without having to resort to private APIs. QDesktopWidgetPrivate implementations to look up a screen for an index, widget, or point are now all inline functions that thinly wrap QGuiApplication::screens/screenAt calls. We should consider adding those as convenience APIs to QScreen instead. Note that QWidget::screen is assumed to return a valid pointer; there is code that handles the case that it returns nullptr (but also code that trusts that it never is nullptr), so this needs to be defined, verified with tests, and asserted. We can then simplify the code further. Change-Id: Ifc89be65a0dce265b6729feaf54121c35137cb94 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove winrtOliver Wolff2020-06-061-1/+1
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove the deprecated QDirModelVolker Hilsheimer2020-06-041-5/+0
| | | | | | | | | QFileSystemModel is the documented replacement. It uses threads to populate the model, which QDirModel doesn't. Change-Id: I7818ecd8f849eb566ac176612f382e17a0471c47 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move undo framework out of Qt WidgetsMitch Curtis2020-03-301-10/+0
| | | | | | | | | | | | | | | - Moves QUndo* classes (except QUndoView) from src/widgets/utils to src/gui/utils - Moves related auto tests from widgets to gui - Replaces QUndoAction with lambdas that do text prefixing [ChangeLog][Undo Framework] QUndo* classes (except QUndoView) were moved from Qt Widgets to Qt GUI. Done-with: volker.hilsheimer@qt.io Fixes: QTBUG-40040 Change-Id: I3bd8d4d32c64f8dee548f62159a1df2126da89d8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge QGuiShortcut and QShortcut again in QtGuiVolker Hilsheimer2020-03-291-1/+1
| | | | | | | | | | | | | | | | QShortcut has only one widget specific feature, which is whatsThis; that is just a QString, so the setters and getters can just as well be in QtGui. The widgets specific implementation of shortcut matching and of showing the whatsThis balloon stays in QtWidgets, in the private implementation. Using virtual functions in the private we can override the empty default in QtGui, and by adding a virtual factory function in QGuiApplication, the correct private is instantiated depending on the kind of application running. Change-Id: I09ae4a5482f9fb70940c5e2bfe76d3d7fd710afc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QGuiAction again and split QAction implementation up insteadVolker Hilsheimer2020-03-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | Duplicating the number of classes is a high price to pay to be able to have some QAction functionality behave differently, or be only available in widgets applications. Instead, declare the entire API in QtGui in QAction* classes, and delegate the implementation of QtWidgets specific functionality to the private. The creation of the private is then delegated to the Q(Gui)ApplicationPrivate instance through a virtual factory function. Change some public APIs that are primarily useful for specialized tools such as Designer to operate on QObject* rather than QWidget*. APIs that depend on QtWidgets types have been turned into inline template functions, so that they are instantiated only at the caller side, where we can expect the respective types to be fully defined. This way, we only need to forward declare a few classes in the header, and don't need to generate any additional code for e.g. language bindings. Change-Id: Id0b27f9187652ec531a2e8b1b9837e82dc81625c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* cmake: Remove APPLE prefix from platform namesTor Arne Vestbø2020-03-161-2/+2
| | | | | | | None of the other platforms have it. Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Fix naming when referring to Apple macOSTor Arne Vestbø2020-03-161-2/+2
| | | | | Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Port the reduce-relocations featureJoerg Bornemann2020-02-251-1/+4
| | | | | | | | | | As reduce-relocations implies bsymbolic_functions, we also add the -Bsymbolic-functions linker flag. Also, handle the .dynlist files that are passed to the linker by bsymbolic_functions.prf in the qmake build. Change-Id: I535c33fba888596d2f8975b16864bbe9f0a7caa4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate projects to correctly handle private dependenciesAlexandru Croitor2020-02-051-0/+3
| | | | | | | Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Post Merge FixesLeander Beernaert2020-01-241-10/+0
| | | | | Change-Id: I1e06c01b76b119c3f23b6e6ecbaae8df719b70ce Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Collect Json Metatypes from CMake's AutomocLeander Beernaert2019-12-041-0/+1
| | | | | | | | | | | | | | | | | | | | This patch adds a new bootstrap tool which will read CMake's AutoGenInfo.json and ParseCache.txt to determine what the current list of json files is that needs to be passed to moc --collect-json option. Right now this is enabled for qt_add_module() with the option GENERATE_METATYPES. pro2cmake has also been updated to detect qmake's CONFIG += metatypes and to generate the above option for modules. The implementation lives in Qt6CoreMacros so it can eventually be used in the public facing apis. The generated meta types file is saved under the target property QT_MODULE_META_TYPES_FILE. Change-Id: I03709c662be81dd0912d0068c23ee2507bfe4383 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Post merge fixesLeander Beernaert2019-11-251-4/+12
| | | | | Change-Id: I78d3c9687f99c0a32da04257e297e88ef0b02581 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate src/*Alexandru Croitor2019-11-141-99/+97
| | | | | | Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate everything under ./srcAlexandru Croitor2019-11-121-4/+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
* Regenerate a bunch of projects after pro2cmake changesAlexandru Croitor2019-11-121-1/+1
| | | | | | Change-Id: I675a068411785364915a074ca0e631fec944d228 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Re-generate affected cmake files and configure.json after the mergeSimon Hausmann2019-10-171-14/+15
| | | | | | | | | This also removes the workarounds of commit b2662b05dd078c46b82f5f041f51b0b83554113d now that it's fixed "upstream" in the .pro files. Change-Id: Idd5e6273873a700fcda5a6cad2039c4e88b61f6f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate qtbase after wip/qt6 -> wip/cmake mergeAlexandru Croitor2019-10-141-7/+6
| | | | | | | | | | | | | | | Note that android builds will be broken after this merge and regeneration, because we don't currently handle the minimum required changes that were brought in with the Android multi ABI support that comes from 5.14. This will have to be addressed in a separate change. For now the build on Android will fail while compiling due to incorrect generation of LIB_SUFFIX with QT_ARCH. Change-Id: Ia4a871f4b7ddd0da11caf5f34e10a599a97bb55d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Regenerate qtbase/src projectsAlexandru Croitor2019-09-301-1/+0
| | | | | | | | To get less diffs for next merges and pro2cmake changes. Change-Id: I7fb5ff34bb884072a9964e8e3488c69f4290fca2 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix add_qt_docs callsSimon Hausmann2019-09-191-1/+1
| | | | | | | | Brown paper bag for me, don't use a comma to separate parameters when calling a function. Change-Id: I21e16142fab4fd1c2714df13cd6a892b036e899a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Re-generate main module CMake filesSimon Hausmann2019-09-181-1/+1
| | | | | | | This fixes the calls to add_qt_docs to include the target. Change-Id: I2c4c807bca8faa48bb49f4b8710035f21abfca0e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate src/widgetsAlexandru Croitor2019-09-111-182/+221
| | | | | | | Change-Id: Ia711ab1af48f489b3ec3e3690448d83ac4ea4902 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use pre-compiled headers when building Qt with cmakeMårten Nordheim2019-09-111-0/+2
| | | | | | | | | | | | | | | | | | Some modules define their own manually-maintained lists, and we can rely on the headers generated by each module to include in the pch as well e.g. QtCore/QtCore. There's also e.g. QtWidgetDepends for QtWidgets, but this only works for modules, not for tools, examples or other applications. For now we'll use the Qt<Module>/Qt<Module> headers for the modules we depend on. Building with PCH can be disabled with -DBUILD_WITH_PCH=NO, and it only works for versions of CMake newer than 3.15.20190829. Change-Id: Iae52bd69acfdfd58f4cd20d3cfa3c7f42775f732 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Rename alias property on source files to QT_RESOURCE_ALIASLeander Beernaert2019-08-151-6/+6
| | | | | | | | Rename the alias property used by add_qt_resource() to QT_RESOURCE_ALIAS to match property naming conventions. Change-Id: I97b12b0b794e158f03dabeed5ec23a3b7d56cfbb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate the main qtbase modulesAlexandru Croitor2019-06-051-0/+2
| | | | | | | | | | | | | | | There were some changes done in pro2cmake, so regenerate the main qtbase modules to keep everything up to date. Some new whitespace got added. Some special cases were removed (ZLIB). Some opengl code got moved around. Some plugin types were added. And some other minor things. Change-Id: Ie8cba4a9aa6b4b163c39d6cf546ea9e0bfc05c01 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-031-1/+5
| | | | Change-Id: Ide5b3408bfefca410323cf26b810b44c06d3a227
* Add basic support for compiling applications with qmakeSimon Hausmann2019-05-311-0/+1
| | | | | | | | | | | | | | | | | * Generate module .pri files * Generate qconfig.pri * Propagate MODULE_CONFIG from the .pro files This enables the basic use-case of simple application builds that for example use the moc. Omitted from the patch is support for private module configurations, prl files (should we do this?) and possibly more hidden gems that need to be implemented to for example support building Qt modules with qmake. Task-number: QTBUG-75666 Change-Id: Icbf0d9ccea4cd683e4c38340b9a2320bf7951d0d Reviewed-by: Qt CMake Build Bot Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Rerun pro2cmake on projects that use .ui filesAlexandru Croitor2019-05-221-0/+2
| | | | | | | Task-number: QTBUG-75875 Change-Id: I95109b07fc4a6e09fe7911a21fc5f27f2c895d77 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Regenerate widgetsAlexandru Croitor2019-05-201-19/+22
| | | | | | | And add the first version of the .prev file. Change-Id: I901c413997dcc497da5e45b1675726180c84e709 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Fix special cases in widgetsAlexandru Croitor2019-05-061-1/+1
| | | | | Change-Id: I026a321a916885ccd93361da91bc3ce6fb6f6ad1 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Export tool config and target files for each relevant moduleAlexandru Croitor2019-05-021-1/+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>
* Fix architecture conditionsAlexandru Croitor2019-04-031-1/+1
| | | | | | | | | | | The actual variable that contains the architecture is TEST_architecture_arch. TEST_architecture only contains the value if the test was performed or not. Fix the conversion script and all the generated files. Change-Id: Icb3480832cab894948f4fef03b8bc8187cab6152 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Re-generate widgetsTobias Hunger2019-03-271-46/+224
| | | | | Change-Id: I3722092aaf4ff5d131223057d73f9cbb82982a98 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Fix build widgets on macOSМихаил Светкин2019-02-111-5/+5
| | | | | Change-Id: I9c7b7e1677f665861f8a106244468bdc0e1386f2 Reviewed-by: Liang Qi <liang.qi@qt.io>
* cmake: Make sure moc/rcc/uic are built when neededAlbert Astals Cid2019-02-071-0/+2
| | | | | | | | | | | | | This way you can run cmake, go directly into src/widgets and it will build moc and rcc before QtCore (because they are needed there) and uic before QtWidgets but not before QtCore because it's not used there. Without this it would get stuck creating the mocs since cmake is not expecting the moc executable to just not be there Change-Id: Ibcb6057bfab7a4bf823544e8f7bd128ea93d1986 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+612
Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>