Commit Graph

16 Commits

Author SHA1 Message Date
Lucie Gérard 09c1d21659 Correct doc snippet and example license
According to QUIP-18 [1]
all file under snippets or examples should be
LicenseRef-Qt-Commercial OR BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I58b6175b10be2463d4bc8034ad08432e0b3e77d7
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-15 14:43:57 +01:00
Rym Bouabid 62fea7396c Revamp Text Codecs Example: Revisit the documentation
Remove "Example" from the title.

Add \examplecategory Data Processing & I/O.

Task-number: QTBUG-118061
Pick-to: 6.6 6.5
Change-Id: I126dce2cfe4b9195e75ee7aa8bae1f3cdcb4c17f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-10-18 10:37:57 +02:00
Marc Mutz b518357730 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: Ie1515f334c831500607e24f9c7103f12e4ba98b8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-06 18:06:36 +02:00
Lucie Gérard 78cced518f Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: Iab6aaba3efbb0e887673eb9523354ba78aba6520
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 15:46:30 +02:00
Lucie Gérard 23d34d1b17 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: I6037589b6cb21970616972a95b656119fda64a7e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-07 17:41:38 +02:00
Lucie Gérard d8ae622baf Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I52b9410c22909f4253094d2458d309e7f6ad2620
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-23 08:06:40 +02:00
Alexandru Croitor 33a5290e5f Switch examples to build as isolated sub-builds part 2
qt_examples_build_begin needs the EXTERNAL_BUILD flag
to know that it's safe to build examples as ExternalProjects.

It still won't do it in CI until we enable building
examples as ExternalProjects for prefix builds.

This is preparation for that.

Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Change-Id: Iaa0489718998bba3f05d6c6ffc1e468e1e00c4a2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-02-05 01:35:30 +01:00
Kai Köhne 7a5e9b7753 Improve examples CMakeLists.txt
- Remove '# generated from ' comments
- Only opt into CMAKE_AUTOUIC if .ui files are involved
- Only opt into CMAKE_AUTORCC if .qrc files are involved
- Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR
- Combine multiple find_package(Qt6 ... calls)
 - use REQUIRED COMPONENTS
 - sort components alphabetically
- Fix wrong indentations
- Use (only) one empty line after multi-line commands

Pick-to: 6.3
Change-Id: I2e2a59159c15dd1412265f7dc90aed418a1d98d1
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-01-25 08:35:34 +01:00
Alexandru Croitor 9131ef2b6c Switch examples to build as isolated sub-builds
Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Change-Id: Ida641412b1ce497ebda29e1de2e3b9fe70daf18b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-12-15 11:08:52 +01:00
Joerg Bornemann 8a46773f06 Raise cmake_minimum_required to VERSION 3.16 in examples
Pick-to: 6.2
Task-number: QTBUG-95636
Change-Id: I6ccb58a8532ac417b952f4c68bf0e29391f0967a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-08-17 10:12:21 +02:00
Alexandru Croitor 0ad3ad4ec7 CMake: Regenerate examples to set the WIN32_EXECUTABLE property
As well as the MACOSX_BUNDLE properties as necessary.

Task-number: QTBUG-87664
Change-Id: I297f054622ec8f9bc5fbca6444ff33e18f1159db
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-26 21:19:46 +01:00
Alexandru Croitor 6bd2badc6d CMake: Regenerate examples to use qt_add_executable
Task-number: QTBUG-87661
Change-Id: I0dacfdc97a3fb7d88da85b67800f2c1b084d869b
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2020-10-20 09:13:55 +02:00
Topi Reinio 58c0892801 Doc: Fix documentation warnings
- Remove linking to non-existent functions and examples
- Add external linking to Qt 5 docs for codecs
- Add missing snippets and dependencies

Fixes: QTBUG-87656
Change-Id: Ic9ea72a36ffc4fcdea136d7daa549b524301697b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-10-19 08:21:35 +00:00
hjk 8d8e596719 Remove the additional Qt5 namespace
The additional Qt5 namespace in Qt5Compat requires projects using
classes from there not only to touch the buildsystem to link to the
module but also the code itself. This hampers migration from Qt5 to Qt6.

Note that adding a plain 'using namespace Qt5;' in some central header is
not sufficient as a work around when using QTextCodec.

Task-number: QTBUG-85504
Change-Id: Id179663b70dd2c5f45e2e09f3dfac53377faa380
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-07-12 09:45:23 +02:00
Jarek Kobus 689b3b9abe Use QList instead of QVector
Task-number: QTBUG-84469
Change-Id: Ibc8555ec1aa851b307c264a980edad9105c31432
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-07 11:34:25 +02:00
Karsten Heimrich cd70242b87 Move QTextCodec support into Qt5Compat
Fixes: QTBUG-75665
Change-Id: Ibe2c1ea7606e04996c5098977304bf1a633e25d9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-26 12:55:39 +02:00