From bcaff2b06fc46fce8a3ae6d613c025c8d097229c Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 18 Mar 2020 17:02:11 +0100 Subject: Remove QGuiAction again and split QAction implementation up instead 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 --- examples/widgets/mainwindows/mainwindow/colorswatch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/widgets/mainwindows/mainwindow/colorswatch.cpp') diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp index 5662518ddc..a7e73debb6 100644 --- a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp +++ b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp @@ -50,7 +50,7 @@ #include "colorswatch.h" -#include +#include #include #include #include -- cgit v1.2.3