Commit Graph

25 Commits

Author SHA1 Message Date
Yuhang Zhao 781714aefb Remove Qt keywords from all headers
It's good practice to do so.

Change-Id: I72435ff99aaee942c1d3b488ec5dedd7e82d1047
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-12-09 11:55:10 +08:00
Marc Mutz c2d490a238 Port from qAsConst() to std::as_const()
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.

Task-number: QTBUG-99313
Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-10-07 23:38:56 +02:00
Lucie Gérard 1b9808737a Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: Id89ed14990804a5024183e75382cc539d4293da1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-09-07 17:01:30 +02:00
Sona Kurazyan cd9939d50b Prepare for moving qVersion() from qglobal.h to qlibraryinfo.h
Include qlibraryinfo.h where it's used.

Change-Id: Ie2ea09458380e012f594e765b50a311a20b423d8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-30 18:53:01 +02:00
Alexandru Croitor eed7b3f4e7 CMake: Don't use PUBLIC_LIBRARIES for executables
Change-Id: I346ea4eac1dfbfb7fb81609307f5f7c4716bb8d1
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-07-21 13:19:04 +02:00
Lucie Gérard 5a7b716474 Add license headers to cmake files
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.

Existing copyright statements remain intact

Task-number: QTBUG-88621
Change-Id: I72c89a98c42bbc9234d8495e9e503bec81d11037
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-08 10:41:06 +02:00
Lucie Gérard 0dc4fd240a Use SPDX license identifiers
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.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-06-11 08:05:15 +02:00
Joerg Bornemann 0d6d3c7bc5 Skip unnecessary commands when cross-building tools
Call qt_internal_return_unless_building_tools() directly after
qt_internal_add_tool() to avoid having to special-case code for when
this function only creates imported targets in cross-builds.

Task-number: QTBUG-85084
Change-Id: I5c8f2ecdf4936cfd15cb530e896bc4e5b5531620
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-08 10:37:35 +02:00
Joerg Bornemann 3e2a85384b Turn qml, qmlscene and qmlpreview into apps
Before, they were tools, which means they are not built when
cross-compiling.  However, all these tools are likely to be desired on a
target to run QML-only projects.

The earlier way to build these apps for a cross target was to set
QT_BUILD_TOOLS_WHEN_CROSSCOMPILING to ON.  That seems like overkill.

Pick-to: 6.2
Task-number: QTBUG-96454
Change-Id: Ibbdc4e4599b0c798ddbd96804a0bbb821f546415
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-07 18:02:44 +02:00
Craig Scott 63a601dc29 CMake: Remove unneeded *.pro and .prev_CMakeLists.txt files
The .pro files corresponding to the .prev_CMakeLists.txt files
have already been removed.

Change-Id: I254eafe4c7de1a516e33bd9cb3d9879e73fa83b4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-05-19 10:46:06 +10:00
Fabian Kosmale 78ab4b8d8b Remove the qmake project files
Remove all qmake project files, except for examples which are used to
test that qmake continues to work.

Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-01-15 15:34:22 +01:00
Alexandru Croitor 08adbefa13 CMake: Regenerate projects to use new qt_internal_ API
Modify special case locations to use the new API as well.

Task-number: QTBUG-86815
Change-Id: I3b964e3baf0cc7040830156dac30358ea1152801
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-06 13:19:37 +02:00
Alexandru Croitor 0f19f571ee CMake: Regenerate projects
We need the qt_add_tool changes to successfully configure qemu builds.
The rest of the changes are just to be in sync with the .pro files.

Change-Id: I7bcc08ac58f57a5761aedef09761428c55235289
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-07-09 15:51:40 +02:00
Alexandru Croitor 476d1f5760 CMake: Regenerate qtdeclarative/tools
Includes
 - A bunch of TARGET_DESCRIPTION

Change-Id: I6acfe05187afbdd45cf7e1bf8634f1554a51c791
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 10:01:19 +02:00
Alexandru Croitor 14492ecee2 CMake: Regenerate and adapt to merge from dev
Change-Id: If8daa6152a563d4309d7342414780ef75b9f5589
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-03-12 14:05:23 +00:00
Alexandru Croitor ba494aaa24 Regenerate all projects with new CMake API version
Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-15 12:24:51 +00:00
Alexandru Croitor e9cac99f37 Regenerate projects
Change-Id: I38044c382e4d84b5865a19cdd04cc8922bd72a77
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-14 10:22:26 +00:00
Alexandru Croitor 13374ceb16 Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I2963c1209316fb6755f572969f368970450d7991
2019-07-11 17:24:39 +02:00
Alexandru Croitor 1c5c5f7aad Fix Qt6 build in preparation of qt5 submodule update
Fixes the QTextStream usages.

Change-Id: I0c009a82fb644a9f3c3d42ec410d18b680977f23
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-08 05:56:02 +02:00
Alexandru Croitor 5a3e668533 Port the declarative tools
Also fix up QmlDevTools module to not depend on QtQml,
but instead make it include the headers / cpp files as it is done
in the qmake project.

Change-Id: I240c52d5357db150a7c0c819892fb0a3708ceee4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-06-08 08:22:42 +00:00
Friedemann Kleint 56d627832d Tools: Fix deprecation warnings about QProcess::finished(int)
Use QProcess::finished(int, QProcess::ExitStatus) with QOverload,
fixing:
qmlpreviewapplication.cpp:151:86: warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations]
     connect(m_process.data(), static_cast<void(QProcess::*)(int)>(&QProcess::finished),
qmlprofilerapplication.cpp:475:83: warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations]
    connect(m_process, static_cast<void(QProcess::*)(int)>(&QProcess::finished),

Change-Id: I0eb09e398b2a3b307fdd67a3fe505b1bdd1078f8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-02-05 11:48:42 +00:00
Ulf Hermann 3a54b30784 Tools: Improve wording
We start an executable and that results in a process. "program" is not
very well defined here.

Change-Id: Iec00ec806843c93951f0dcfbfe46984bf599470f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-11-22 08:12:15 +00:00
Ulf Hermann 80d26c1508 qmlpreview: Use a better file system watcher
We need to keep watching files even if they are removed and re-added as
editors frequently do when manipulating text files. QFileSystemWatcher
cannot do this by itself, and our simplistic timeout-based attempt
didn't work work properly either.

Fixes: QTBUG-71768
Change-Id: I21e914138179ad8adf07f0196fec8ddcda2cbfca
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-11-14 10:50:55 +00:00
Ulf Hermann 1613e32042 qmlpreview: Fix typo
Change-Id: I5b8a674e77f770e4987e03ccf02b5a27c4987e24
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-11-14 10:50:51 +00:00
Ulf Hermann 4dbcd6d618 Tooling: Add a command line application for QML preview
The "qmlpreview" tool connects to the preview service, and watches any
file successfully served to the application. If any of those files
change on disk, the new file is sent and the root component is reloaded.

Task-number: QDS-181
Change-Id: I2266167ada6e463c11be0d7548c2b96e31e79839
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-13 11:52:57 +00:00