5 Commits

Author SHA1 Message Date
Juha Vuolle
2dbc92e4ac Compile calendarbackendplugin only if widgets are enabled
The example links against widgets unconditionally => add
proper build-time guard

Task-number: QTBUG-136101
Change-Id: I62ea42a04f7ff421753a0fc7a30cd969cfaff6e2
Reviewed-by: Magdalena Stojek <magdalena.stojek@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 5776865f7c6b234f66512eab41c871662449d80d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-04-29 14:00:26 +00:00
Joerg Bornemann
e50ae83c8c CMake: Fix examples built as external projects
Usage of a private module needs a respective find_package call now.

Task-number: QTBUG-87776
Change-Id: I3a00a241c5e8637d28606c1f45a843b491c0a8bc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 483768fb8ed18fe5911d96f990ddbc69858146bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-01-27 22:38:51 +00:00
Ahmad Samir
11f94598da Replace qdebug.h includes in public headers with forward-declarations
qdebug.h includes many Qt and STL headers, so if you include a Qt header
you get all those transitive includes, which may affect build time.

- Where appropriate use the printf-like syntax of qDebug() and co.,
  these don't need the QDebug streaming operators
- qfloat16 is used in an inline member function, so include it
  explicitly

[ChangeLog][Potentially Source Incompatible Changes] Various Qt public
headers don't include QDebug any more; if you need QDebug's streaming
you'll have to include it in your code.

Task-number: QTBUG-132439
Change-Id: I750587e17a3b38fa226cd3af8eaccc8da580f436
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 185cba6e95a006d2548f20599f84390e5a3ad653)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-01-15 11:28:28 +00:00
Alexandru Croitor
98847d2153 CMake: Fix project structure of calendarbackendplugin project
Before this change, installing the example with a multi-config
generator failed with

  CMake Error at cmake_install.cmake:123 (include):
  include could not find requested file:
    <build_dir>/.qt/deploy_calendarPlugin_49e753a159-$<CONFIG>.cmake

When configuring the project, cmake mentions the following warning:

CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0087 is not set: Install CODE|SCRIPT allow the use of
  generator expressions.  Run "cmake --help-policy CMP0087" for policy
  details.

This happens because the specified minimum cmake version of the project
was 3.5, so the above policy was not enabled, and the generator
expressions we use for the deployment api failed to be evaluated.

Fix the minimum version to be 3.16.

Clean up the project a bit to be in line with our other examples.
Use qt_internal_add_example, remove redundant find_package(Qt) calls,
remove redundant project() and cmake_minimum_required() calls, use
target_include_directories.

Amends f071d4ee8abf6fd0f1b6e187b4e99fa6fad7b642

Fixes: QTBUG-127616
Task-number: QTBUG-115200
Change-Id: I06ca1d38a8e5e7cb18ade205616a603db98a17be
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-30 16:12:14 +02:00
Magdalena Stojek
f071d4ee8a QCalendar example illustrating the user-supplied plugin mechanism
This example demonstrates how to write a calendar backend plugin
using a low-level API for extending Qt applications.

Fixes: QTBUG-115200
Change-Id: If0b7f2552ba8c2203acdcbff238fb0ffa7cfca55
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-07-04 15:25:29 +02:00