summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/CMakeLists.txt25
-rw-r--r--src/plugins/bearer/.prev_CMakeLists.txt12
-rw-r--r--src/plugins/bearer/CMakeLists.txt14
-rw-r--r--src/plugins/bearer/android/CMakeLists.txt4
-rw-r--r--src/plugins/bearer/android/jar/.prev_CMakeLists.txt16
-rw-r--r--src/plugins/bearer/android/jar/CMakeLists.txt22
-rw-r--r--src/plugins/bearer/android/src/CMakeLists.txt19
-rw-r--r--src/plugins/bearer/android/src/qandroidbearerengine.cpp2
-rw-r--r--src/plugins/bearer/android/src/qandroidbearerengine.h2
-rw-r--r--src/plugins/bearer/android/src/src.pro7
-rw-r--r--src/plugins/bearer/connman/.prev_CMakeLists.txt26
-rw-r--r--src/plugins/bearer/connman/CMakeLists.txt22
-rw-r--r--src/plugins/bearer/connman/connman.pro11
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.cpp2
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.h4
-rw-r--r--src/plugins/bearer/corewlan/CMakeLists.txt30
-rw-r--r--src/plugins/bearer/corewlan/corewlan.pro7
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.h2
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm2
-rw-r--r--src/plugins/bearer/generic/CMakeLists.txt28
-rw-r--r--src/plugins/bearer/generic/generic.pro3
-rw-r--r--src/plugins/bearer/generic/qgenericengine.cpp2
-rw-r--r--src/plugins/bearer/generic/qgenericengine.h2
-rw-r--r--src/plugins/bearer/linux_common/qofonoservice_linux.cpp384
-rw-r--r--src/plugins/bearer/linux_common/qofonoservice_linux_p.h207
-rw-r--r--src/plugins/bearer/nativewifi/nativewifi.pro7
-rw-r--r--src/plugins/bearer/nativewifi/qnativewifiengine.cpp2
-rw-r--r--src/plugins/bearer/nativewifi/qnativewifiengine.h2
-rw-r--r--src/plugins/bearer/networkmanager/.prev_CMakeLists.txt26
-rw-r--r--src/plugins/bearer/networkmanager/CMakeLists.txt22
-rw-r--r--src/plugins/bearer/networkmanager/networkmanager.pro11
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp3
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.h4
-rw-r--r--src/plugins/bearer/nla/nla.pro7
-rw-r--r--src/plugins/bearer/nla/qnlaengine.cpp2
-rw-r--r--src/plugins/bearer/nla/qnlaengine.h2
-rw-r--r--src/plugins/bearer/qbearerengine_impl.h81
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp435
-rw-r--r--src/plugins/bearer/qnetworksession_impl.h130
-rw-r--r--src/plugins/generic/.prev_CMakeLists.txt23
-rw-r--r--src/plugins/generic/CMakeLists.txt23
-rw-r--r--src/plugins/generic/evdevkeyboard/CMakeLists.txt22
-rw-r--r--src/plugins/generic/evdevmouse/CMakeLists.txt22
-rw-r--r--src/plugins/generic/evdevtablet/CMakeLists.txt22
-rw-r--r--src/plugins/generic/evdevtouch/CMakeLists.txt22
-rw-r--r--src/plugins/generic/libinput/CMakeLists.txt22
-rw-r--r--src/plugins/generic/tslib/.prev_CMakeLists.txt23
-rw-r--r--src/plugins/generic/tslib/CMakeLists.txt25
-rw-r--r--src/plugins/generic/tuiotouch/CMakeLists.txt29
-rw-r--r--src/plugins/imageformats/CMakeLists.txt11
-rw-r--r--src/plugins/imageformats/gif/.prev_CMakeLists.txt19
-rw-r--r--src/plugins/imageformats/gif/CMakeLists.txt20
-rw-r--r--src/plugins/imageformats/gif/qgifhandler.cpp4
-rw-r--r--src/plugins/imageformats/ico/.prev_CMakeLists.txt21
-rw-r--r--src/plugins/imageformats/ico/CMakeLists.txt20
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp6
-rw-r--r--src/plugins/imageformats/jpeg/.prev_CMakeLists.txt94
-rw-r--r--src/plugins/imageformats/jpeg/CMakeLists.txt96
-rw-r--r--src/plugins/platforminputcontexts/CMakeLists.txt8
-rw-r--r--src/plugins/platforminputcontexts/compose/.prev_CMakeLists.txt24
-rw-r--r--src/plugins/platforminputcontexts/compose/CMakeLists.txt26
-rw-r--r--src/plugins/platforminputcontexts/ibus/CMakeLists.txt27
-rw-r--r--src/plugins/platforms/.prev_CMakeLists.txt57
-rw-r--r--src/plugins/platforms/CMakeLists.txt57
-rw-r--r--src/plugins/platforms/android/.prev_CMakeLists.txt85
-rw-r--r--src/plugins/platforms/android/CMakeLists.txt94
-rw-r--r--src/plugins/platforms/android/android.pro3
-rw-r--r--src/plugins/platforms/android/androidplatformplugin.cpp64
-rw-r--r--src/plugins/platforms/android/main.cpp1
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.cpp10
-rw-r--r--src/plugins/platforms/cocoa/.prev_CMakeLists.txt150
-rw-r--r--src/plugins/platforms/cocoa/CMakeLists.txt154
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm27
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm17
-rw-r--r--src/plugins/platforms/cocoa/qpaintengine_mac.mm2
-rw-r--r--src/plugins/platforms/directfb/.prev_CMakeLists.txt61
-rw-r--r--src/plugins/platforms/directfb/CMakeLists.txt65
-rw-r--r--src/plugins/platforms/eglfs/.prev_CMakeLists.txt115
-rw-r--r--src/plugins/platforms/eglfs/CMakeLists.txt114
-rw-r--r--src/plugins/platforms/eglfs/api/api.pri1
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfscursor.cpp2
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfscursor_p.h2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/.prev_CMakeLists.txt38
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt38
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/CMakeLists.txt28
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/CMakeLists.txt36
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/CMakeLists.txt33
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/CMakeLists.txt29
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt29
-rw-r--r--src/plugins/platforms/ios/.prev_CMakeLists.txt65
-rw-r--r--src/plugins/platforms/ios/CMakeLists.txt65
-rw-r--r--src/plugins/platforms/ios/kernel.pro2
-rw-r--r--src/plugins/platforms/ios/optional/CMakeLists.txt5
-rw-r--r--src/plugins/platforms/ios/optional/nsphotolibrarysupport/CMakeLists.txt29
-rw-r--r--src/plugins/platforms/ios/qiosintegration.mm10
-rw-r--r--src/plugins/platforms/linuxfb/.prev_CMakeLists.txt46
-rw-r--r--src/plugins/platforms/linuxfb/CMakeLists.txt47
-rw-r--r--src/plugins/platforms/minimal/.prev_CMakeLists.txt37
-rw-r--r--src/plugins/platforms/minimal/CMakeLists.txt40
-rw-r--r--src/plugins/platforms/minimalegl/.prev_CMakeLists.txt41
-rw-r--r--src/plugins/platforms/minimalegl/CMakeLists.txt42
-rw-r--r--src/plugins/platforms/minimalegl/minimalegl.pro1
-rw-r--r--src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp2
-rw-r--r--src/plugins/platforms/offscreen/.prev_CMakeLists.txt40
-rw-r--r--src/plugins/platforms/offscreen/CMakeLists.txt41
-rw-r--r--src/plugins/platforms/vnc/.prev_CMakeLists.txt43
-rw-r--r--src/plugins/platforms/vnc/CMakeLists.txt44
-rw-r--r--src/plugins/platforms/vnc/qvnc.cpp2
-rw-r--r--src/plugins/platforms/wasm/qwasmbackingstore.cpp2
-rw-r--r--src/plugins/platforms/wasm/qwasmcompositor.cpp3
-rw-r--r--src/plugins/platforms/wasm/qwasmcompositor.h5
-rw-r--r--src/plugins/platforms/wasm/qwasmintegration.cpp2
-rw-r--r--src/plugins/platforms/wasm/wasm.pro3
-rw-r--r--src/plugins/platforms/windows/.prev_CMakeLists.txt246
-rw-r--r--src/plugins/platforms/windows/CMakeLists.txt240
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsgdiintegration.cpp10
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp18
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.h3
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.cpp9
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp4
-rw-r--r--src/plugins/platforms/windows/windows.pro4
-rw-r--r--src/plugins/platforms/winrt/qwinrtintegration.cpp9
-rw-r--r--src/plugins/platforms/winrt/winrt.pro2
-rw-r--r--src/plugins/platforms/xcb/.prev_CMakeLists.txt167
-rw-r--r--src/plugins/platforms/xcb/CMakeLists.txt193
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/CMakeLists.txt8
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt28
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt41
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp2
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp8
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbeventqueue.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbeventqueue.h3
-rw-r--r--src/plugins/platforms/xcb/qxcbimage.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp24
-rw-r--r--src/plugins/platforms/xcb/xcb_qpa_lib.pro3
-rw-r--r--src/plugins/platformthemes/CMakeLists.txt8
-rw-r--r--src/plugins/platformthemes/gtk3/.prev_CMakeLists.txt27
-rw-r--r--src/plugins/platformthemes/gtk3/CMakeLists.txt32
-rw-r--r--src/plugins/platformthemes/xdgdesktopportal/CMakeLists.txt24
-rw-r--r--src/plugins/printsupport/.prev_CMakeLists.txt11
-rw-r--r--src/plugins/printsupport/CMakeLists.txt11
-rw-r--r--src/plugins/printsupport/cocoa/CMakeLists.txt22
-rw-r--r--src/plugins/printsupport/cups/.prev_CMakeLists.txt30
-rw-r--r--src/plugins/printsupport/cups/CMakeLists.txt32
-rw-r--r--src/plugins/sqldrivers/.prev_CMakeLists.txt15
-rw-r--r--src/plugins/sqldrivers/CMakeLists.txt55
-rw-r--r--src/plugins/sqldrivers/README2
-rw-r--r--src/plugins/sqldrivers/configure.cmake50
-rw-r--r--src/plugins/sqldrivers/configure.json43
-rw-r--r--src/plugins/sqldrivers/db2/CMakeLists.txt32
-rw-r--r--src/plugins/sqldrivers/ibase/qsql_ibase.cpp9
-rw-r--r--src/plugins/sqldrivers/mysql/CMakeLists.txt24
-rw-r--r--src/plugins/sqldrivers/mysql/main.cpp1
-rw-r--r--src/plugins/sqldrivers/mysql/mysql.json2
-rw-r--r--src/plugins/sqldrivers/mysql/qsql_mysql.cpp2
-rw-r--r--src/plugins/sqldrivers/oci/CMakeLists.txt32
-rw-r--r--src/plugins/sqldrivers/oci/main.cpp2
-rw-r--r--src/plugins/sqldrivers/oci/oci.json2
-rw-r--r--src/plugins/sqldrivers/odbc/.prev_CMakeLists.txt32
-rw-r--r--src/plugins/sqldrivers/odbc/CMakeLists.txt33
-rw-r--r--src/plugins/sqldrivers/odbc/main.cpp2
-rw-r--r--src/plugins/sqldrivers/odbc/odbc.json2
-rw-r--r--src/plugins/sqldrivers/odbc/qsql_odbc.cpp6
-rw-r--r--src/plugins/sqldrivers/psql/.prev_CMakeLists.txt24
-rw-r--r--src/plugins/sqldrivers/psql/CMakeLists.txt29
-rw-r--r--src/plugins/sqldrivers/psql/main.cpp2
-rw-r--r--src/plugins/sqldrivers/psql/psql.json2
-rw-r--r--src/plugins/sqldrivers/psql/qsql_psql.cpp6
-rw-r--r--src/plugins/sqldrivers/sqldrivers.pro2
-rw-r--r--src/plugins/sqldrivers/sqlite/.prev_CMakeLists.txt93
-rw-r--r--src/plugins/sqldrivers/sqlite/CMakeLists.txt34
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp9
-rw-r--r--src/plugins/sqldrivers/sqlite2/README6
-rw-r--r--src/plugins/sqldrivers/sqlite2/qsql_sqlite2.cpp615
-rw-r--r--src/plugins/sqldrivers/sqlite2/qsql_sqlite2_p.h109
-rw-r--r--src/plugins/sqldrivers/sqlite2/smain.cpp74
-rw-r--r--src/plugins/sqldrivers/sqlite2/sqlite2.json3
-rw-r--r--src/plugins/sqldrivers/sqlite2/sqlite2.pro11
-rw-r--r--src/plugins/sqldrivers/tds/README6
-rw-r--r--src/plugins/sqldrivers/tds/main.cpp81
-rw-r--r--src/plugins/sqldrivers/tds/qsql_tds.cpp881
-rw-r--r--src/plugins/sqldrivers/tds/qsql_tds_p.h120
-rw-r--r--src/plugins/sqldrivers/tds/tds.json3
-rw-r--r--src/plugins/sqldrivers/tds/tds.pro11
-rw-r--r--src/plugins/styles/.prev_CMakeLists.txt11
-rw-r--r--src/plugins/styles/CMakeLists.txt11
-rw-r--r--src/plugins/styles/android/qandroidstyle.cpp2
-rw-r--r--src/plugins/styles/mac/CMakeLists.txt23
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm81
-rw-r--r--src/plugins/styles/windowsvista/CMakeLists.txt27
196 files changed, 4523 insertions, 3464 deletions
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
new file mode 100644
index 0000000000..6718d64ca0
--- /dev/null
+++ b/src/plugins/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from plugins.pro.
+
+if(TARGET Qt::Sql)
+ add_subdirectory(sqldrivers)
+endif()
+if(QT_FEATURE_bearermanagement AND TARGET Qt::Network)
+ add_subdirectory(bearer)
+endif()
+if(TARGET Qt::Gui)
+ add_subdirectory(platforms)
+ add_subdirectory(platforminputcontexts)
+ add_subdirectory(platformthemes)
+endif()
+if(QT_FEATURE_imageformatplugin AND TARGET Qt::Gui)
+ add_subdirectory(imageformats)
+endif()
+if(QT_FEATURE_library AND TARGET Qt::Gui AND NOT ANDROID)
+ add_subdirectory(generic)
+endif()
+if(TARGET Qt::Widgets)
+ add_subdirectory(styles)
+endif()
+if(TARGET Qt::PrintSupport AND NOT WINRT)
+ add_subdirectory(printsupport)
+endif()
diff --git a/src/plugins/bearer/.prev_CMakeLists.txt b/src/plugins/bearer/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..a7a36f60c6
--- /dev/null
+++ b/src/plugins/bearer/.prev_CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from bearer.pro.
+
+if(SUBDIRS_ISEMPTY OR (TARGET Qt::DBus AND linux_x_ AND NOT ANDROID))
+ add_subdirectory(generic)
+endif()
+if(TARGET Qt::DBus AND linux_x_ AND NOT ANDROID)
+ add_subdirectory(connman)
+ add_subdirectory(networkmanager)
+endif()
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ add_subdirectory(android)
+endif()
diff --git a/src/plugins/bearer/CMakeLists.txt b/src/plugins/bearer/CMakeLists.txt
new file mode 100644
index 0000000000..528061d264
--- /dev/null
+++ b/src/plugins/bearer/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from bearer.pro.
+
+# special case begin
+# The whole block is manual.
+if(NOT ANDROID AND LINUX AND TARGET Qt::DBus)
+ add_subdirectory(generic)
+ add_subdirectory(connman)
+ add_subdirectory(networkmanager)
+elseif(ANDROID AND NOT ANDROID_EMBEDDED)
+ add_subdirectory(android)
+else()
+ add_subdirectory(generic)
+endif()
+# special case end
diff --git a/src/plugins/bearer/android/CMakeLists.txt b/src/plugins/bearer/android/CMakeLists.txt
new file mode 100644
index 0000000000..193cbf1fe3
--- /dev/null
+++ b/src/plugins/bearer/android/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from android.pro.
+
+add_subdirectory(src)
+add_subdirectory(jar)
diff --git a/src/plugins/bearer/android/jar/.prev_CMakeLists.txt b/src/plugins/bearer/android/jar/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..f5f25c4f8b
--- /dev/null
+++ b/src/plugins/bearer/android/jar/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from jar.pro.
+
+set(java_sources
+ src/org/qtproject/qt5/android/bearer/QtNetworkReceiver.java
+)
+
+add_jar(QtAndroidBearer
+ INCLUDE_JARS ${QT_ANDROID_JAR}
+ SOURCES ${java_sources}
+)
+
+install_jar(QtAndroidBearer
+ DESTINATION jar
+ COMPONENT Devel
+)
+
diff --git a/src/plugins/bearer/android/jar/CMakeLists.txt b/src/plugins/bearer/android/jar/CMakeLists.txt
new file mode 100644
index 0000000000..16641d42b7
--- /dev/null
+++ b/src/plugins/bearer/android/jar/CMakeLists.txt
@@ -0,0 +1,22 @@
+#####################################################################
+## QtAndroidBearer Binary:
+#####################################################################
+
+set(java_sources
+ src/org/qtproject/qt5/android/bearer/QtNetworkReceiver.java
+)
+
+add_jar(QtAndroidBearer
+ INCLUDE_JARS ${QT_ANDROID_JAR}
+ SOURCES ${java_sources}
+ )
+
+install_jar(QtAndroidBearer
+ DESTINATION jar
+ COMPONENT Devel)
+
+#### Keys ignored in scope 1:.:.:jar.pro:<TRUE>:
+# JAVACLASSPATH = "$$PWD/src"
+# JAVASOURCES = "$$PWD/src/org/qtproject/qt5/android/bearer/QtNetworkReceiver.java"
+# _LOADED = "qt_build_paths"
+
diff --git a/src/plugins/bearer/android/src/CMakeLists.txt b/src/plugins/bearer/android/src/CMakeLists.txt
new file mode 100644
index 0000000000..5be89e316b
--- /dev/null
+++ b/src/plugins/bearer/android/src/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from src.pro.
+
+#####################################################################
+## QAndroidBearerEnginePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QAndroidBearerEnginePlugin
+ OUTPUT_NAME qandroidbearer
+ TYPE bearer
+ SOURCES
+ main.cpp
+ qandroidbearerengine.cpp qandroidbearerengine.h
+ wrappers/androidconnectivitymanager.cpp wrappers/androidconnectivitymanager.h
+ INCLUDE_DIRECTORIES
+ wrappers
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
diff --git a/src/plugins/bearer/android/src/qandroidbearerengine.cpp b/src/plugins/bearer/android/src/qandroidbearerengine.cpp
index a43ed69570..ad9895e0cf 100644
--- a/src/plugins/bearer/android/src/qandroidbearerengine.cpp
+++ b/src/plugins/bearer/android/src/qandroidbearerengine.cpp
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qandroidbearerengine.h"
-#include "../../qnetworksession_impl.h"
+#include <private/qnetworksession_impl_p.h>
#include "wrappers/androidconnectivitymanager.h"
#ifndef QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/android/src/qandroidbearerengine.h b/src/plugins/bearer/android/src/qandroidbearerengine.h
index 837b02232d..867d04d886 100644
--- a/src/plugins/bearer/android/src/qandroidbearerengine.h
+++ b/src/plugins/bearer/android/src/qandroidbearerengine.h
@@ -40,7 +40,7 @@
#ifndef QANDROIDBEARERENGINE_H
#define QANDROIDBEARERENGINE_H
-#include "../../qbearerengine_impl.h"
+#include <private/qbearerengine_impl_p.h>
#include <QAbstractEventDispatcher>
#include <QAbstractNativeEventFilter>
diff --git a/src/plugins/bearer/android/src/src.pro b/src/plugins/bearer/android/src/src.pro
index eb0738386c..fcd599dffe 100644
--- a/src/plugins/bearer/android/src/src.pro
+++ b/src/plugins/bearer/android/src/src.pro
@@ -2,13 +2,10 @@ TARGET = qandroidbearer
QT = core-private network-private
-HEADERS += qandroidbearerengine.h \
- ../../qnetworksession_impl.h \
- ../../qbearerengine_impl.h
+HEADERS += qandroidbearerengine.h
SOURCES += main.cpp \
- qandroidbearerengine.cpp \
- ../../qnetworksession_impl.cpp
+ qandroidbearerengine.cpp
include(wrappers/wrappers.pri)
diff --git a/src/plugins/bearer/connman/.prev_CMakeLists.txt b/src/plugins/bearer/connman/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..55aaa41491
--- /dev/null
+++ b/src/plugins/bearer/connman/.prev_CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from connman.pro.
+
+#####################################################################
+## QConnmanEnginePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QConnmanEnginePlugin
+ OUTPUT_NAME qconnmanbearer
+ CLASS_NAME QConnmanEnginePlugin
+ TYPE bearer
+ SOURCES
+ main.cpp
+ qconnmanengine.cpp qconnmanengine.h
+ qconnmanservice_linux.cpp qconnmanservice_linux_p.h
+ LIBRARIES
+ Qt::LinuxOfonoSupportPrivate
+ Qt::NetworkPrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::DBus
+ Qt::LinuxOfonoSupport
+ Qt::Network
+)
+
+#### Keys ignored in scope 1:.:.:connman.pro:<TRUE>:
+# OTHER_FILES = "connman.json"
diff --git a/src/plugins/bearer/connman/CMakeLists.txt b/src/plugins/bearer/connman/CMakeLists.txt
new file mode 100644
index 0000000000..745f48b6e0
--- /dev/null
+++ b/src/plugins/bearer/connman/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from connman.pro.
+
+#####################################################################
+## QConnmanEnginePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QConnmanEnginePlugin
+ OUTPUT_NAME qconnmanbearer
+ TYPE bearer
+ SOURCES
+ main.cpp
+ qconnmanengine.cpp qconnmanengine.h
+ qconnmanservice_linux.cpp qconnmanservice_linux_p.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::DBus
+ Qt::LinuxOfonoSupportPrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:connman.pro:<TRUE>:
+# OTHER_FILES = "connman.json"
diff --git a/src/plugins/bearer/connman/connman.pro b/src/plugins/bearer/connman/connman.pro
index 065ed11dad..03e94cfe6a 100644
--- a/src/plugins/bearer/connman/connman.pro
+++ b/src/plugins/bearer/connman/connman.pro
@@ -1,18 +1,13 @@
TARGET = qconnmanbearer
-QT = core network-private dbus
+QT = core network-private dbus linuxofono_support_private
HEADERS += qconnmanservice_linux_p.h \
- ../linux_common/qofonoservice_linux_p.h \
- qconnmanengine.h \
- ../qnetworksession_impl.h \
- ../qbearerengine_impl.h
+ qconnmanengine.h
SOURCES += main.cpp \
qconnmanservice_linux.cpp \
- ../linux_common/qofonoservice_linux.cpp \
- qconnmanengine.cpp \
- ../qnetworksession_impl.cpp
+ qconnmanengine.cpp
OTHER_FILES += connman.json
diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp
index 8b2076bd18..a673834825 100644
--- a/src/plugins/bearer/connman/qconnmanengine.cpp
+++ b/src/plugins/bearer/connman/qconnmanengine.cpp
@@ -39,7 +39,7 @@
#include "qconnmanengine.h"
#include "qconnmanservice_linux_p.h"
-#include "../qnetworksession_impl.h"
+#include <private/qnetworksession_impl_p.h>
#include <QtNetwork/private/qnetworkconfiguration_p.h>
diff --git a/src/plugins/bearer/connman/qconnmanengine.h b/src/plugins/bearer/connman/qconnmanengine.h
index ef80d38fa2..969eed45b1 100644
--- a/src/plugins/bearer/connman/qconnmanengine.h
+++ b/src/plugins/bearer/connman/qconnmanengine.h
@@ -51,10 +51,10 @@
// We mean it.
//
-#include "../qbearerengine_impl.h"
+#include <private/qbearerengine_impl_p.h>
#include "qconnmanservice_linux_p.h"
-#include "../linux_common/qofonoservice_linux_p.h"
+#include <private/qofonoservice_linux_p.h>
#include <QMap>
#include <QVariant>
diff --git a/src/plugins/bearer/corewlan/CMakeLists.txt b/src/plugins/bearer/corewlan/CMakeLists.txt
new file mode 100644
index 0000000000..31e70cc938
--- /dev/null
+++ b/src/plugins/bearer/corewlan/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from corewlan.pro.
+
+#####################################################################
+## QCoreWlanEnginePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QCoreWlanEnginePlugin
+ OUTPUT_NAME qcorewlanbearer
+ TYPE bearer
+ SOURCES
+ main.cpp
+ qcorewlanengine.h qcorewlanengine.mm
+ PUBLIC_LIBRARIES
+ ${FWFoundation}
+ ${FWSystemConfiguration}
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:corewlan.pro:<TRUE>:
+# OTHER_FILES = "corewlan.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QCoreWlanEnginePlugin CONDITION QT_FEATURE_corewlan
+ PUBLIC_LIBRARIES
+ ${FWCoreWLAN}
+ ${FWSecurity}
+)
diff --git a/src/plugins/bearer/corewlan/corewlan.pro b/src/plugins/bearer/corewlan/corewlan.pro
index 1dc09ebdd6..4f08eaba71 100644
--- a/src/plugins/bearer/corewlan/corewlan.pro
+++ b/src/plugins/bearer/corewlan/corewlan.pro
@@ -7,12 +7,9 @@ qtConfig(corewlan) {
LIBS += -framework CoreWLAN -framework Security
}
-HEADERS += qcorewlanengine.h \
- ../qnetworksession_impl.h \
- ../qbearerengine_impl.h
+HEADERS += qcorewlanengine.h
-SOURCES += main.cpp \
- ../qnetworksession_impl.cpp
+SOURCES += main.cpp
OBJECTIVE_SOURCES += qcorewlanengine.mm
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.h b/src/plugins/bearer/corewlan/qcorewlanengine.h
index 6dddee66a4..8775474c09 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.h
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.h
@@ -40,7 +40,7 @@
#ifndef QCOREWLANENGINE_H
#define QCOREWLANENGINE_H
-#include "../qbearerengine_impl.h"
+#include <private/qbearerengine_impl_p.h>
#include <QMap>
#include <QTimer>
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index 66f2ed017b..01c6df74d5 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qcorewlanengine.h"
-#include "../qnetworksession_impl.h"
+#include <private/qnetworksession_impl_p.h>
#include <QtNetwork/private/qnetworkconfiguration_p.h>
diff --git a/src/plugins/bearer/generic/CMakeLists.txt b/src/plugins/bearer/generic/CMakeLists.txt
new file mode 100644
index 0000000000..6d65346b57
--- /dev/null
+++ b/src/plugins/bearer/generic/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from generic.pro.
+
+#####################################################################
+## QGenericEnginePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QGenericEnginePlugin
+ OUTPUT_NAME qgenericbearer
+ TYPE bearer
+ SOURCES
+ ../platformdefs_win.h
+ main.cpp
+ qgenericengine.cpp qgenericengine.h
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:generic.pro:<TRUE>:
+# OTHER_FILES = "generic.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QGenericEnginePlugin CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ iphlpapi
+)
diff --git a/src/plugins/bearer/generic/generic.pro b/src/plugins/bearer/generic/generic.pro
index f30bdc4951..14b858b301 100644
--- a/src/plugins/bearer/generic/generic.pro
+++ b/src/plugins/bearer/generic/generic.pro
@@ -3,11 +3,8 @@ TARGET = qgenericbearer
QT = core-private network-private
HEADERS += qgenericengine.h \
- ../qnetworksession_impl.h \
- ../qbearerengine_impl.h \
../platformdefs_win.h
SOURCES += qgenericengine.cpp \
- ../qnetworksession_impl.cpp \
main.cpp
OTHER_FILES += generic.json
diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp
index b1f28849a7..a5fba15789 100644
--- a/src/plugins/bearer/generic/qgenericengine.cpp
+++ b/src/plugins/bearer/generic/qgenericengine.cpp
@@ -41,7 +41,7 @@
#define WIN32_LEAN_AND_MEAN 1
#include "qgenericengine.h"
-#include "../qnetworksession_impl.h"
+#include <private/qnetworksession_impl_p.h>
#include <QtNetwork/private/qnetworkconfiguration_p.h>
diff --git a/src/plugins/bearer/generic/qgenericengine.h b/src/plugins/bearer/generic/qgenericengine.h
index 79c71ca7a3..6b8fb4cd0f 100644
--- a/src/plugins/bearer/generic/qgenericengine.h
+++ b/src/plugins/bearer/generic/qgenericengine.h
@@ -40,7 +40,7 @@
#ifndef QGENERICENGINE_H
#define QGENERICENGINE_H
-#include "../qbearerengine_impl.h"
+#include <private/qbearerengine_impl_p.h>
#include <QMap>
#include <QTimer>
diff --git a/src/plugins/bearer/linux_common/qofonoservice_linux.cpp b/src/plugins/bearer/linux_common/qofonoservice_linux.cpp
deleted file mode 100644
index 05f9b3ca17..0000000000
--- a/src/plugins/bearer/linux_common/qofonoservice_linux.cpp
+++ /dev/null
@@ -1,384 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QObject>
-#include <QList>
-#include <QtDBus/QtDBus>
-#include <QtDBus/QDBusConnection>
-#include <QtDBus/QDBusError>
-#include <QtDBus/QDBusInterface>
-#include <QtDBus/QDBusMessage>
-#include <QtDBus/QDBusReply>
-#include <QtDBus/QDBusPendingCallWatcher>
-#include <QtDBus/QDBusObjectPath>
-#include <QtDBus/QDBusPendingCall>
-
-#include "qofonoservice_linux_p.h"
-
-#ifndef QT_NO_DBUS
-
-QDBusArgument &operator<<(QDBusArgument &argument, const ObjectPathProperties &item)
-{
- argument.beginStructure();
- argument << item.path << item.properties;
- argument.endStructure();
- return argument;
-}
-
-const QDBusArgument &operator>>(const QDBusArgument &argument, ObjectPathProperties &item)
-{
- argument.beginStructure();
- argument >> item.path >> item.properties;
- argument.endStructure();
- return argument;
-}
-
-QT_BEGIN_NAMESPACE
-
-QOfonoManagerInterface::QOfonoManagerInterface( QObject *parent)
- : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE),
- QLatin1String(OFONO_MANAGER_PATH),
- OFONO_MANAGER_INTERFACE,
- QDBusConnection::systemBus(), parent)
-{
- qDBusRegisterMetaType<ObjectPathProperties>();
- qDBusRegisterMetaType<PathPropertiesList>();
-
- QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
- QLatin1String(OFONO_MANAGER_PATH),
- QLatin1String(OFONO_MANAGER_INTERFACE),
- QLatin1String("ModemAdded"),
- this,SLOT(modemAdded(QDBusObjectPath,QVariantMap)));
- QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
- QLatin1String(OFONO_MANAGER_PATH),
- QLatin1String(OFONO_MANAGER_INTERFACE),
- QLatin1String("ModemRemoved"),
- this,SLOT(modemRemoved(QDBusObjectPath)));
-}
-
-QOfonoManagerInterface::~QOfonoManagerInterface()
-{
-}
-
-QStringList QOfonoManagerInterface::getModems()
-{
- if (modemList.isEmpty()) {
- QDBusPendingReply<PathPropertiesList> reply = call(QDBus::Block, QLatin1String("GetModems"));
- reply.waitForFinished();
- if (!reply.isError()) {
- const auto modems = reply.value();
- for (const ObjectPathProperties &modem : modems)
- modemList << modem.path.path();
- }
- }
-
- return modemList;
-}
-
-QString QOfonoManagerInterface::currentModem()
-{
- const QStringList modems = getModems();
- for (const QString &modem : modems) {
- QOfonoModemInterface device(modem);
- if (device.isPowered() && device.isOnline()
- && device.interfaces().contains(QLatin1String("org.ofono.NetworkRegistration")))
- return modem;
- }
- return QString();
-}
-
-void QOfonoManagerInterface::modemAdded(const QDBusObjectPath &path, const QVariantMap &/*var*/)
-{
- if (!modemList.contains(path.path())) {
- modemList << path.path();
- Q_EMIT modemChanged();
- }
-}
-
-void QOfonoManagerInterface::modemRemoved(const QDBusObjectPath &path)
-{
- if (modemList.contains(path.path())) {
- modemList.removeOne(path.path());
- Q_EMIT modemChanged();
- }
-}
-
-
-QOfonoModemInterface::QOfonoModemInterface(const QString &dbusPathName, QObject *parent)
- : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE),
- dbusPathName,
- OFONO_MODEM_INTERFACE,
- QDBusConnection::systemBus(), parent)
-{
- QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
- path(),
- OFONO_MODEM_INTERFACE,
- QLatin1String("PropertyChanged"),
- this,SLOT(propertyChanged(QString,QDBusVariant)));
-}
-
-QOfonoModemInterface::~QOfonoModemInterface()
-{
-}
-
-void QOfonoModemInterface::propertyChanged(const QString &name,const QDBusVariant &value)
-{
- propertiesMap[name] = value.variant();
-}
-
-bool QOfonoModemInterface::isPowered()
-{
- QVariant var = getProperty(QStringLiteral("Powered"));
- return qdbus_cast<bool>(var);
-}
-
-bool QOfonoModemInterface::isOnline()
-{
- QVariant var = getProperty(QStringLiteral("Online"));
- return qdbus_cast<bool>(var);
-}
-
-QStringList QOfonoModemInterface::interfaces()
-{
- const QVariant var = getProperty(QStringLiteral("Interfaces"));
- return var.toStringList();
-}
-
-QVariantMap QOfonoModemInterface::getProperties()
-{
- if (propertiesMap.isEmpty()) {
- QDBusPendingReply<QVariantMap> reply = call(QDBus::Block, QLatin1String("GetProperties"));
- if (!reply.isError()) {
- propertiesMap = reply.value();
- }
- }
- return propertiesMap;
-}
-
-QVariant QOfonoModemInterface::getProperty(const QString &property)
-{
- QVariant var;
- QVariantMap map = getProperties();
- if (map.contains(property))
- var = map.value(property);
- return var;
-}
-
-
-QOfonoNetworkRegistrationInterface::QOfonoNetworkRegistrationInterface(const QString &dbusPathName, QObject *parent)
- : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE),
- dbusPathName,
- OFONO_NETWORK_REGISTRATION_INTERFACE,
- QDBusConnection::systemBus(), parent)
-{
-}
-
-QOfonoNetworkRegistrationInterface::~QOfonoNetworkRegistrationInterface()
-{
-}
-
-QString QOfonoNetworkRegistrationInterface::getTechnology()
-{
- QVariant var = getProperty(QStringLiteral("Technology"));
- return qdbus_cast<QString>(var);
-}
-
-QVariant QOfonoNetworkRegistrationInterface::getProperty(const QString &property)
-{
- QVariant var;
- QVariantMap map = getProperties();
- if (map.contains(property))
- var = map.value(property);
- return var;
-}
-
-QVariantMap QOfonoNetworkRegistrationInterface::getProperties()
-{
- if (propertiesMap.isEmpty()) {
- QDBusPendingReply<QVariantMap> reply = call(QDBus::Block, QLatin1String("GetProperties"));
- reply.waitForFinished();
- if (!reply.isError()) {
- propertiesMap = reply.value();
- }
- }
- return propertiesMap;
-}
-
-QOfonoDataConnectionManagerInterface::QOfonoDataConnectionManagerInterface(const QString &dbusPathName, QObject *parent)
- : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE),
- dbusPathName,
- OFONO_DATA_CONNECTION_MANAGER_INTERFACE,
- QDBusConnection::systemBus(), parent)
-{
- QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
- path(),
- QLatin1String(OFONO_MODEM_INTERFACE),
- QLatin1String("PropertyChanged"),
- this,SLOT(propertyChanged(QString,QDBusVariant)));
-}
-
-QOfonoDataConnectionManagerInterface::~QOfonoDataConnectionManagerInterface()
-{
-}
-
-QStringList QOfonoDataConnectionManagerInterface::contexts()
-{
- if (contextList.isEmpty()) {
- QDBusPendingReply<PathPropertiesList > reply = call(QLatin1String("GetContexts"));
- reply.waitForFinished();
- if (!reply.isError()) {
- const auto contexts = reply.value();
- for (const ObjectPathProperties &context : contexts)
- contextList << context.path.path();
- }
- }
- return contextList;
-}
-
-PathPropertiesList QOfonoDataConnectionManagerInterface::contextsWithProperties()
-{
- if (contextListProperties.isEmpty()) {
- QDBusPendingReply<PathPropertiesList > reply = call(QLatin1String("GetContexts"));
- reply.waitForFinished();
- if (!reply.isError()) {
- contextListProperties = reply.value();
- }
- }
- return contextListProperties;
-}
-
-bool QOfonoDataConnectionManagerInterface::roamingAllowed()
-{
- QVariant var = getProperty(QStringLiteral("RoamingAllowed"));
- return qdbus_cast<bool>(var);
-}
-
-QString QOfonoDataConnectionManagerInterface::bearer()
-{
- QVariant var = getProperty(QStringLiteral("Bearer"));
- return qdbus_cast<QString>(var);
-}
-
-QVariant QOfonoDataConnectionManagerInterface::getProperty(const QString &property)
-{
- return getProperties().value(property);
-}
-
-QVariantMap &QOfonoDataConnectionManagerInterface::getProperties()
-{
- if (propertiesMap.isEmpty()) {
- QDBusPendingReply<QVariantMap> reply = call(QDBus::Block, QLatin1String("GetProperties"));
- if (!reply.isError()) {
- propertiesMap = reply.value();
- }
- }
- return propertiesMap;
-}
-
-void QOfonoDataConnectionManagerInterface::propertyChanged(const QString &name, const QDBusVariant &value)
-{
- propertiesMap[name] = value.variant();
- if (name == QLatin1String("RoamingAllowed"))
- Q_EMIT roamingAllowedChanged(value.variant().toBool());
-}
-
-
-QOfonoConnectionContextInterface::QOfonoConnectionContextInterface(const QString &dbusPathName, QObject *parent)
- : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE),
- dbusPathName,
- OFONO_CONNECTION_CONTEXT_INTERFACE,
- QDBusConnection::systemBus(), parent)
-{
- QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE),
- path(),
- QLatin1String(OFONO_MODEM_INTERFACE),
- QLatin1String("PropertyChanged"),
- this,SLOT(propertyChanged(QString,QDBusVariant)));
-}
-
-QOfonoConnectionContextInterface::~QOfonoConnectionContextInterface()
-{
-}
-
-QVariantMap QOfonoConnectionContextInterface::getProperties()
-{
- if (propertiesMap.isEmpty()) {
- QDBusPendingReply<QVariantMap> reply = call(QDBus::Block, QLatin1String("GetProperties"));
- if (!reply.isError()) {
- propertiesMap = reply.value();
- }
- }
- return propertiesMap;
-}
-
-void QOfonoConnectionContextInterface::propertyChanged(const QString &name, const QDBusVariant &value)
-{
- propertiesMap[name] = value.variant();
-}
-
-QVariant QOfonoConnectionContextInterface::getProperty(const QString &property)
-{
- QVariant var;
- QVariantMap map = getProperties();
- if (map.contains(property))
- var = map.value(property);
- return var;
-}
-
-bool QOfonoConnectionContextInterface::active()
-{
- QVariant var = getProperty(QStringLiteral("Active"));
- return qdbus_cast<bool>(var);
-}
-
-QString QOfonoConnectionContextInterface::accessPointName()
-{
- QVariant var = getProperty(QStringLiteral("AccessPointName"));
- return qdbus_cast<QString>(var);
-}
-
-QString QOfonoConnectionContextInterface::name()
-{
- QVariant var = getProperty(QStringLiteral("Name"));
- return qdbus_cast<QString>(var);
-}
-
-QT_END_NAMESPACE
-
-#endif // QT_NO_DBUS
diff --git a/src/plugins/bearer/linux_common/qofonoservice_linux_p.h b/src/plugins/bearer/linux_common/qofonoservice_linux_p.h
deleted file mode 100644
index 62df5d4fa7..0000000000
--- a/src/plugins/bearer/linux_common/qofonoservice_linux_p.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QOFONOSERVICE_H
-#define QOFONOSERVICE_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtDBus/QtDBus>
-#include <QtDBus/QDBusConnection>
-#include <QtDBus/QDBusError>
-#include <QtDBus/QDBusInterface>
-#include <QtDBus/QDBusMessage>
-#include <QtDBus/QDBusReply>
-
-#include <QtDBus/QDBusPendingCallWatcher>
-#include <QtDBus/QDBusObjectPath>
-#include <QtDBus/QDBusContext>
-#include <QMap>
-
-#ifndef QT_NO_DBUS
-
-#define OFONO_SERVICE "org.ofono"
-#define OFONO_MANAGER_INTERFACE "org.ofono.Manager"
-#define OFONO_MANAGER_PATH "/"
-
-#define OFONO_MODEM_INTERFACE "org.ofono.Modem"
-#define OFONO_NETWORK_REGISTRATION_INTERFACE "org.ofono.NetworkRegistration"
-#define OFONO_DATA_CONNECTION_MANAGER_INTERFACE "org.ofono.ConnectionManager"
-#define OFONO_CONNECTION_CONTEXT_INTERFACE "org.ofono.ConnectionContext"
-
-QT_BEGIN_NAMESPACE
-
-QT_END_NAMESPACE
-
-struct ObjectPathProperties
-{
- QDBusObjectPath path;
- QVariantMap properties;
-};
-QT_BEGIN_NAMESPACE
-Q_DECLARE_TYPEINFO(ObjectPathProperties, Q_MOVABLE_TYPE); // QDBusObjectPath is movable, but cannot be
- // marked as such until Qt 6
-QT_END_NAMESPACE
-
-typedef QVector<ObjectPathProperties> PathPropertiesList;
-Q_DECLARE_METATYPE(ObjectPathProperties)
-Q_DECLARE_METATYPE (PathPropertiesList)
-
-QT_BEGIN_NAMESPACE
-
-class QOfonoManagerInterface : public QDBusAbstractInterface
-{
- Q_OBJECT
-
-public:
-
- QOfonoManagerInterface( QObject *parent = nullptr);
- ~QOfonoManagerInterface();
-
- QStringList getModems();
- QString currentModem();
-signals:
- void modemChanged();
-private:
- QStringList modemList;
-private slots:
- void modemAdded(const QDBusObjectPath &path, const QVariantMap &var);
- void modemRemoved(const QDBusObjectPath &path);
-};
-
-class QOfonoModemInterface : public QDBusAbstractInterface
-{
- Q_OBJECT
-
-public:
-
- explicit QOfonoModemInterface(const QString &dbusModemPathName, QObject *parent = nullptr);
- ~QOfonoModemInterface();
-
- bool isPowered();
- bool isOnline();
- QStringList interfaces();
-private:
- QVariantMap getProperties();
- QVariantMap propertiesMap;
- QVariant getProperty(const QString &);
- void propertyChanged(const QString &, const QDBusVariant &value);
-};
-
-
-class QOfonoNetworkRegistrationInterface : public QDBusAbstractInterface
-{
- Q_OBJECT
-
-public:
-
- explicit QOfonoNetworkRegistrationInterface(const QString &dbusModemPathName, QObject *parent = nullptr);
- ~QOfonoNetworkRegistrationInterface();
-
- QString getTechnology();
-
-private:
- QVariantMap getProperties();
- QVariant getProperty(const QString &);
- QVariantMap propertiesMap;
-Q_SIGNALS:
- void propertyChanged(const QString &, const QDBusVariant &value);
-};
-
-class QOfonoDataConnectionManagerInterface : public QDBusAbstractInterface
-{
- Q_OBJECT
-
-public:
-
- explicit QOfonoDataConnectionManagerInterface(const QString &dbusPathName, QObject *parent = nullptr);
- ~QOfonoDataConnectionManagerInterface();
-
- QStringList contexts();
- PathPropertiesList contextsWithProperties();
- bool roamingAllowed();
- QVariant getProperty(const QString &);
- QString bearer();
-Q_SIGNALS:
- void roamingAllowedChanged(bool);
-private:
- QVariantMap &getProperties();
- QVariantMap propertiesMap;
- QStringList contextList;
- PathPropertiesList contextListProperties;
-private Q_SLOTS:
- void propertyChanged(const QString &, const QDBusVariant &value);
-};
-
-class QOfonoConnectionContextInterface : public QDBusAbstractInterface
-{
- Q_OBJECT
-
-public:
-
- explicit QOfonoConnectionContextInterface(const QString &dbusPathName, QObject *parent = nullptr);
- ~QOfonoConnectionContextInterface();
-
- QVariant getProperty(const QString &);
- bool active();
- QString accessPointName();
- QString name();
-
-Q_SIGNALS:
-private:
- QVariantMap getProperties();
- QVariantMap propertiesMap;
-private slots:
- void propertyChanged(const QString &, const QDBusVariant &value);
-};
-
-QT_END_NAMESPACE
-
-#endif // QT_NO_DBUS
-
-#endif //QOFONOSERVICE_H
diff --git a/src/plugins/bearer/nativewifi/nativewifi.pro b/src/plugins/bearer/nativewifi/nativewifi.pro
index da7f2da353..41bde99341 100644
--- a/src/plugins/bearer/nativewifi/nativewifi.pro
+++ b/src/plugins/bearer/nativewifi/nativewifi.pro
@@ -3,13 +3,10 @@ TARGET = qnativewifibearer
QT = core-private network-private
HEADERS += qnativewifiengine.h \
- platformdefs.h \
- ../qnetworksession_impl.h \
- ../qbearerengine_impl.h
+ platformdefs.h
SOURCES += main.cpp \
- qnativewifiengine.cpp \
- ../qnetworksession_impl.cpp
+ qnativewifiengine.cpp
OTHER_FILES += nativewifi.json
diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
index 777b4eea59..ca8700e63b 100644
--- a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
+++ b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
@@ -39,7 +39,7 @@
#include "qnativewifiengine.h"
#include "platformdefs.h"
-#include "../qnetworksession_impl.h"
+#include <private/qnetworksession_impl_p.h>
#include <QtNetwork/private/qnetworkconfiguration_p.h>
diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.h b/src/plugins/bearer/nativewifi/qnativewifiengine.h
index ab8d949c9a..24e97bf6df 100644
--- a/src/plugins/bearer/nativewifi/qnativewifiengine.h
+++ b/src/plugins/bearer/nativewifi/qnativewifiengine.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include "../qbearerengine_impl.h"
+#include <private/qbearerengine_impl_p.h>
#include <QtCore/qtimer.h>
diff --git a/src/plugins/bearer/networkmanager/.prev_CMakeLists.txt b/src/plugins/bearer/networkmanager/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..df5927024d
--- /dev/null
+++ b/src/plugins/bearer/networkmanager/.prev_CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from networkmanager.pro.
+
+#####################################################################
+## QNetworkManagerEnginePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QNetworkManagerEnginePlugin
+ OUTPUT_NAME qnmbearer
+ CLASS_NAME QNetworkManagerEnginePlugin
+ TYPE bearer
+ SOURCES
+ main.cpp
+ qnetworkmanagerengine.cpp qnetworkmanagerengine.h
+ qnetworkmanagerservice.cpp qnetworkmanagerservice.h
+ LIBRARIES
+ Qt::LinuxOfonoSupportPrivate
+ Qt::NetworkPrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::DBus
+ Qt::LinuxOfonoSupport
+ Qt::Network
+)
+
+#### Keys ignored in scope 1:.:.:networkmanager.pro:<TRUE>:
+# OTHER_FILES = "networkmanager.json"
diff --git a/src/plugins/bearer/networkmanager/CMakeLists.txt b/src/plugins/bearer/networkmanager/CMakeLists.txt
new file mode 100644
index 0000000000..8f26a4c86d
--- /dev/null
+++ b/src/plugins/bearer/networkmanager/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from networkmanager.pro.
+
+#####################################################################
+## QNetworkManagerEnginePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QNetworkManagerEnginePlugin
+ OUTPUT_NAME qnmbearer
+ TYPE bearer
+ SOURCES
+ main.cpp
+ qnetworkmanagerengine.cpp qnetworkmanagerengine.h
+ qnetworkmanagerservice.cpp qnetworkmanagerservice.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::DBus
+ Qt::LinuxOfonoSupportPrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:networkmanager.pro:<TRUE>:
+# OTHER_FILES = "networkmanager.json"
diff --git a/src/plugins/bearer/networkmanager/networkmanager.pro b/src/plugins/bearer/networkmanager/networkmanager.pro
index e71c93f66f..3ca217f974 100644
--- a/src/plugins/bearer/networkmanager/networkmanager.pro
+++ b/src/plugins/bearer/networkmanager/networkmanager.pro
@@ -1,18 +1,13 @@
TARGET = qnmbearer
-QT = core network-private dbus
+QT = core network-private dbus linuxofono_support_private
HEADERS += qnetworkmanagerservice.h \
- qnetworkmanagerengine.h \
- ../linux_common/qofonoservice_linux_p.h \
- ../qnetworksession_impl.h \
- ../qbearerengine_impl.h
+ qnetworkmanagerengine.h
SOURCES += main.cpp \
qnetworkmanagerservice.cpp \
- qnetworkmanagerengine.cpp \
- ../linux_common/qofonoservice_linux.cpp \
- ../qnetworksession_impl.cpp
+ qnetworkmanagerengine.cpp
OTHER_FILES += networkmanager.json
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index 85a9f9b9e0..cba2221587 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -39,7 +39,7 @@
#include "qnetworkmanagerengine.h"
#include "qnetworkmanagerservice.h"
-#include "../qnetworksession_impl.h"
+#include <private/qnetworksession_impl_p.h>
#include <QtNetwork/private/qnetworkconfiguration_p.h>
@@ -53,7 +53,6 @@
#include <QDBusInterface>
#include <QDBusMessage>
#include <QDBusReply>
-#include "../linux_common/qofonoservice_linux_p.h"
#ifndef QT_NO_DBUS
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
index a95c68abdf..c624d6087d 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
@@ -51,11 +51,11 @@
// We mean it.
//
-#include "../qbearerengine_impl.h"
+#include <private/qbearerengine_impl_p.h>
#include "qnetworkmanagerservice.h"
-#include "../linux_common/qofonoservice_linux_p.h"
+#include <private/qofonoservice_linux_p.h>
#include <QMap>
#include <QVariant>
diff --git a/src/plugins/bearer/nla/nla.pro b/src/plugins/bearer/nla/nla.pro
index 76f3279d25..2582dc7cd4 100644
--- a/src/plugins/bearer/nla/nla.pro
+++ b/src/plugins/bearer/nla/nla.pro
@@ -5,13 +5,10 @@ QT = core core-private network network-private
QMAKE_USE_PRIVATE += ws2_32
HEADERS += qnlaengine.h \
- ../platformdefs_win.h \
- ../qnetworksession_impl.h \
- ../qbearerengine_impl.h
+ ../platformdefs_win.h
SOURCES += main.cpp \
- qnlaengine.cpp \
- ../qnetworksession_impl.cpp
+ qnlaengine.cpp
OTHER_FILES += nla.json
diff --git a/src/plugins/bearer/nla/qnlaengine.cpp b/src/plugins/bearer/nla/qnlaengine.cpp
index e1e60389f1..ab3c0d0e3a 100644
--- a/src/plugins/bearer/nla/qnlaengine.cpp
+++ b/src/plugins/bearer/nla/qnlaengine.cpp
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qnlaengine.h"
-#include "../qnetworksession_impl.h"
+#include <private/qnetworksession_impl_p.h>
#include <QtNetwork/private/qnetworkconfiguration_p.h>
diff --git a/src/plugins/bearer/nla/qnlaengine.h b/src/plugins/bearer/nla/qnlaengine.h
index ab014ff776..90efa50201 100644
--- a/src/plugins/bearer/nla/qnlaengine.h
+++ b/src/plugins/bearer/nla/qnlaengine.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include "../qbearerengine_impl.h"
+#include <private/qbearerengine_impl_p.h>
#include <QtNetwork/private/qnativesocketengine_p.h>
diff --git a/src/plugins/bearer/qbearerengine_impl.h b/src/plugins/bearer/qbearerengine_impl.h
deleted file mode 100644
index 5c003aaaf6..0000000000
--- a/src/plugins/bearer/qbearerengine_impl.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QBEARERENGINE_IMPL_H
-#define QBEARERENGINE_IMPL_H
-
-#include <QtNetwork/private/qbearerengine_p.h>
-
-QT_BEGIN_NAMESPACE
-
-class QBearerEngineImpl : public QBearerEngine
-{
- Q_OBJECT
-
-public:
- enum ConnectionError {
- InterfaceLookupError = 0,
- ConnectError,
- OperationNotSupported,
- DisconnectionError,
- };
-
- QBearerEngineImpl(QObject *parent = nullptr) : QBearerEngine(parent) {}
- ~QBearerEngineImpl() {}
-
- virtual void connectToId(const QString &id) = 0;
- virtual void disconnectFromId(const QString &id) = 0;
-
- virtual QString getInterfaceFromId(const QString &id) = 0;
-
- virtual QNetworkSession::State sessionStateForId(const QString &id) = 0;
-
- virtual quint64 bytesWritten(const QString &) { return Q_UINT64_C(0); }
- virtual quint64 bytesReceived(const QString &) { return Q_UINT64_C(0); }
- virtual quint64 startTime(const QString &) { return Q_UINT64_C(0); }
-
-Q_SIGNALS:
- void connectionError(const QString &id, QBearerEngineImpl::ConnectionError error);
-};
-
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(QBearerEngineImpl::ConnectionError)
-
-#endif // QBEARERENGINE_IMPL_H
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
deleted file mode 100644
index 8eba9ccc42..0000000000
--- a/src/plugins/bearer/qnetworksession_impl.cpp
+++ /dev/null
@@ -1,435 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-// see comment in ../platformdefs_win.h.
-#define WIN32_LEAN_AND_MEAN 1
-
-#include "qnetworksession_impl.h"
-#include "qbearerengine_impl.h"
-
-#include <QtNetwork/qnetworksession.h>
-#include <QtNetwork/private/qnetworkconfigmanager_p.h>
-
-#include <QtCore/qdatetime.h>
-#include <QtCore/qdebug.h>
-#include <QtCore/qmutex.h>
-#include <QtCore/qstringlist.h>
-
-QT_BEGIN_NAMESPACE
-
-static QBearerEngineImpl *getEngineFromId(const QString &id)
-{
- QNetworkConfigurationManagerPrivate *priv = qNetworkConfigurationManagerPrivate();
- if (priv) {
- const auto engines = priv->engines();
- for (QBearerEngine *engine : engines) {
- QBearerEngineImpl *engineImpl = qobject_cast<QBearerEngineImpl *>(engine);
- if (engineImpl && engineImpl->hasIdentifier(id))
- return engineImpl;
- }
- }
-
- return nullptr;
-}
-
-class QNetworkSessionManagerPrivate : public QObject
-{
- Q_OBJECT
-
-public:
- QNetworkSessionManagerPrivate(QObject *parent = nullptr) : QObject(parent) {}
- ~QNetworkSessionManagerPrivate() {}
-
- inline void forceSessionClose(const QNetworkConfiguration &config)
- { emit forcedSessionClose(config); }
-
-Q_SIGNALS:
- void forcedSessionClose(const QNetworkConfiguration &config);
-};
-
-Q_GLOBAL_STATIC(QNetworkSessionManagerPrivate, sessionManager);
-
-void QNetworkSessionPrivateImpl::syncStateWithInterface()
-{
- connect(sessionManager(), SIGNAL(forcedSessionClose(QNetworkConfiguration)),
- this, SLOT(forcedSessionClose(QNetworkConfiguration)));
-
- opened = false;
- isOpen = false;
- state = QNetworkSession::Invalid;
- lastError = QNetworkSession::UnknownSessionError;
-
- qRegisterMetaType<QBearerEngineImpl::ConnectionError>();
-
- switch (publicConfig.type()) {
- case QNetworkConfiguration::InternetAccessPoint:
- activeConfig = publicConfig;
- engine = getEngineFromId(activeConfig.identifier());
- if (engine) {
- qRegisterMetaType<QNetworkConfigurationPrivatePointer>();
- connect(engine, SIGNAL(configurationChanged(QNetworkConfigurationPrivatePointer)),
- this, SLOT(configurationChanged(QNetworkConfigurationPrivatePointer)),
- Qt::QueuedConnection);
- connect(engine, SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
- this, SLOT(connectionError(QString,QBearerEngineImpl::ConnectionError)),
- Qt::QueuedConnection);
- }
- break;
- case QNetworkConfiguration::ServiceNetwork:
- serviceConfig = publicConfig;
- // Defer setting engine and signals until open().
- Q_FALLTHROUGH();
- case QNetworkConfiguration::UserChoice:
- // Defer setting serviceConfig and activeConfig until open().
- Q_FALLTHROUGH();
- default:
- engine = nullptr;
- }
-
- networkConfigurationsChanged();
-}
-
-void QNetworkSessionPrivateImpl::open()
-{
- if (serviceConfig.isValid()) {
- lastError = QNetworkSession::OperationNotSupportedError;
- emit QNetworkSessionPrivate::error(lastError);
- } else if (!isOpen) {
- if ((activeConfig.state() & QNetworkConfiguration::Discovered) != QNetworkConfiguration::Discovered) {
- lastError = QNetworkSession::InvalidConfigurationError;
- state = QNetworkSession::Invalid;
- emit stateChanged(state);
- emit QNetworkSessionPrivate::error(lastError);
- return;
- }
- opened = true;
-
- if ((activeConfig.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active &&
- (activeConfig.state() & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
- state = QNetworkSession::Connecting;
- emit stateChanged(state);
-
- engine->connectToId(activeConfig.identifier());
- }
-
- isOpen = (activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active;
- if (isOpen)
- emit quitPendingWaitsForOpened();
- }
-}
-
-void QNetworkSessionPrivateImpl::close()
-{
- if (serviceConfig.isValid()) {
- lastError = QNetworkSession::OperationNotSupportedError;
- emit QNetworkSessionPrivate::error(lastError);
- } else if (isOpen) {
- opened = false;
- isOpen = false;
- emit closed();
- }
-}
-
-void QNetworkSessionPrivateImpl::stop()
-{
- if (serviceConfig.isValid()) {
- lastError = QNetworkSession::OperationNotSupportedError;
- emit QNetworkSessionPrivate::error(lastError);
- } else {
- if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
- state = QNetworkSession::Closing;
- emit stateChanged(state);
-
- engine->disconnectFromId(activeConfig.identifier());
-
- sessionManager()->forceSessionClose(activeConfig);
- }
-
- opened = false;
- isOpen = false;
- emit closed();
- }
-}
-
-void QNetworkSessionPrivateImpl::migrate()
-{
-}
-
-void QNetworkSessionPrivateImpl::accept()
-{
-}
-
-void QNetworkSessionPrivateImpl::ignore()
-{
-}
-
-void QNetworkSessionPrivateImpl::reject()
-{
-}
-
-#ifndef QT_NO_NETWORKINTERFACE
-QNetworkInterface QNetworkSessionPrivateImpl::currentInterface() const
-{
- if (!engine || state != QNetworkSession::Connected || !publicConfig.isValid())
- return QNetworkInterface();
-
- QString iface = engine->getInterfaceFromId(activeConfig.identifier());
- if (iface.isEmpty())
- return QNetworkInterface();
- return QNetworkInterface::interfaceFromName(iface);
-}
-#endif
-
-QVariant QNetworkSessionPrivateImpl::sessionProperty(const QString &key) const
-{
- if (key == QLatin1String("AutoCloseSessionTimeout")) {
- if (engine && engine->requiresPolling() &&
- !(engine->capabilities() & QNetworkConfigurationManager::CanStartAndStopInterfaces)) {
- return sessionTimeout >= 0 ? sessionTimeout * 10000 : -1;
- }
- }
-
- return QVariant();
-}
-
-void QNetworkSessionPrivateImpl::setSessionProperty(const QString &key, const QVariant &value)
-{
- if (key == QLatin1String("AutoCloseSessionTimeout")) {
- if (engine && engine->requiresPolling() &&
- !(engine->capabilities() & QNetworkConfigurationManager::CanStartAndStopInterfaces)) {
- int timeout = value.toInt();
- if (timeout >= 0) {
- connect(engine, SIGNAL(updateCompleted()),
- this, SLOT(decrementTimeout()), Qt::UniqueConnection);
- sessionTimeout = timeout / 10000; // convert to poll intervals
- } else {
- disconnect(engine, SIGNAL(updateCompleted()), this, SLOT(decrementTimeout()));
- sessionTimeout = -1;
- }
- }
- }
-}
-
-QString QNetworkSessionPrivateImpl::errorString() const
-{
- switch (lastError) {
- case QNetworkSession::UnknownSessionError:
- return tr("Unknown session error.");
- case QNetworkSession::SessionAbortedError:
- return tr("The session was aborted by the user or system.");
- case QNetworkSession::OperationNotSupportedError:
- return tr("The requested operation is not supported by the system.");
- case QNetworkSession::InvalidConfigurationError:
- return tr("The specified configuration cannot be used.");
- case QNetworkSession::RoamingError:
- return tr("Roaming was aborted or is not possible.");
- default:
- break;
- }
-
- return QString();
-}
-
-QNetworkSession::SessionError QNetworkSessionPrivateImpl::error() const
-{
- return lastError;
-}
-
-quint64 QNetworkSessionPrivateImpl::bytesWritten() const
-{
- if (engine && state == QNetworkSession::Connected)
- return engine->bytesWritten(activeConfig.identifier());
- return Q_UINT64_C(0);
-}
-
-quint64 QNetworkSessionPrivateImpl::bytesReceived() const
-{
- if (engine && state == QNetworkSession::Connected)
- return engine->bytesReceived(activeConfig.identifier());
- return Q_UINT64_C(0);
-}
-
-quint64 QNetworkSessionPrivateImpl::activeTime() const
-{
- if (state == QNetworkSession::Connected && startTime != Q_UINT64_C(0))
- return QDateTime::currentSecsSinceEpoch() - startTime;
- return Q_UINT64_C(0);
-}
-
-QNetworkSession::UsagePolicies QNetworkSessionPrivateImpl::usagePolicies() const
-{
- return currentPolicies;
-}
-
-void QNetworkSessionPrivateImpl::setUsagePolicies(QNetworkSession::UsagePolicies newPolicies)
-{
- if (newPolicies != currentPolicies) {
- currentPolicies = newPolicies;
- emit usagePoliciesChanged(currentPolicies);
- }
-}
-
-void QNetworkSessionPrivateImpl::updateStateFromServiceNetwork()
-{
- QNetworkSession::State oldState = state;
-
- const auto configs = serviceConfig.children();
- for (const QNetworkConfiguration &config : configs) {
- if ((config.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active)
- continue;
-
- if (activeConfig != config) {
- if (engine) {
- disconnect(engine, SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
- this, SLOT(connectionError(QString,QBearerEngineImpl::ConnectionError)));
- }
-
- activeConfig = config;
- engine = getEngineFromId(activeConfig.identifier());
-
- if (engine) {
- connect(engine, SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
- this, SLOT(connectionError(QString,QBearerEngineImpl::ConnectionError)),
- Qt::QueuedConnection);
- }
- emit newConfigurationActivated();
- }
-
- state = QNetworkSession::Connected;
- if (state != oldState)
- emit stateChanged(state);
-
- return;
- }
-
- if (serviceConfig.children().isEmpty())
- state = QNetworkSession::NotAvailable;
- else
- state = QNetworkSession::Disconnected;
-
- if (state != oldState)
- emit stateChanged(state);
-}
-
-void QNetworkSessionPrivateImpl::updateStateFromActiveConfig()
-{
- if (!engine)
- return;
-
- QNetworkSession::State oldState = state;
- state = engine->sessionStateForId(activeConfig.identifier());
-
- bool oldActive = isOpen;
- isOpen = (state == QNetworkSession::Connected) ? opened : false;
-
- if (!oldActive && isOpen)
- emit quitPendingWaitsForOpened();
- if (oldActive && !isOpen)
- emit closed();
-
- if (oldState != state)
- emit stateChanged(state);
-}
-
-void QNetworkSessionPrivateImpl::networkConfigurationsChanged()
-{
- if (serviceConfig.isValid())
- updateStateFromServiceNetwork();
- else
- updateStateFromActiveConfig();
-
- if (engine)
- startTime = engine->startTime(activeConfig.identifier());
-}
-
-void QNetworkSessionPrivateImpl::configurationChanged(QNetworkConfigurationPrivatePointer config)
-{
- if (serviceConfig.isValid() &&
- (config->id == serviceConfig.identifier() || config->id == activeConfig.identifier())) {
- updateStateFromServiceNetwork();
- } else if (config->id == activeConfig.identifier()) {
- updateStateFromActiveConfig();
- }
-}
-
-void QNetworkSessionPrivateImpl::forcedSessionClose(const QNetworkConfiguration &config)
-{
- if (activeConfig == config) {
- opened = false;
- isOpen = false;
-
- emit closed();
-
- lastError = QNetworkSession::SessionAbortedError;
- emit QNetworkSessionPrivate::error(lastError);
- }
-}
-
-void QNetworkSessionPrivateImpl::connectionError(const QString &id, QBearerEngineImpl::ConnectionError error)
-{
- if (activeConfig.identifier() == id) {
- networkConfigurationsChanged();
- switch (error) {
- case QBearerEngineImpl::OperationNotSupported:
- lastError = QNetworkSession::OperationNotSupportedError;
- opened = false;
- break;
- case QBearerEngineImpl::InterfaceLookupError:
- case QBearerEngineImpl::ConnectError:
- case QBearerEngineImpl::DisconnectionError:
- default:
- lastError = QNetworkSession::UnknownSessionError;
- }
-
- emit QNetworkSessionPrivate::error(lastError);
- }
-}
-
-void QNetworkSessionPrivateImpl::decrementTimeout()
-{
- if (--sessionTimeout <= 0) {
- disconnect(engine, SIGNAL(updateCompleted()), this, SLOT(decrementTimeout()));
- sessionTimeout = -1;
- close();
- }
-}
-
-QT_END_NAMESPACE
-
-#include "qnetworksession_impl.moc"
diff --git a/src/plugins/bearer/qnetworksession_impl.h b/src/plugins/bearer/qnetworksession_impl.h
deleted file mode 100644
index 0f8e014900..0000000000
--- a/src/plugins/bearer/qnetworksession_impl.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKSESSION_IMPL_H
-#define QNETWORKSESSION_IMPL_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qbearerengine_impl.h"
-
-#include <QtNetwork/private/qnetworkconfigmanager_p.h>
-#include <QtNetwork/private/qnetworksession_p.h>
-
-QT_BEGIN_NAMESPACE
-
-class QBearerEngineImpl;
-
-class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate
-{
- Q_OBJECT
-
-public:
- QNetworkSessionPrivateImpl()
- : engine(nullptr), startTime(0), lastError(QNetworkSession::UnknownSessionError), sessionTimeout(-1), currentPolicies(QNetworkSession::NoPolicy), opened(false)
- {}
- ~QNetworkSessionPrivateImpl()
- {}
-
- //called by QNetworkSession constructor and ensures
- //that the state is immediately updated (w/o actually opening
- //a session). Also this function should take care of
- //notification hooks to discover future state changes.
- void syncStateWithInterface() override;
-
-#ifndef QT_NO_NETWORKINTERFACE
- QNetworkInterface currentInterface() const override;
-#endif
- QVariant sessionProperty(const QString& key) const override;
- void setSessionProperty(const QString& key, const QVariant& value) override;
-
- void open() override;
- void close() override;
- void stop() override;
- void migrate() override;
- void accept() override;
- void ignore() override;
- void reject() override;
-
- QString errorString() const override; //must return translated string
- QNetworkSession::SessionError error() const override;
-
- quint64 bytesWritten() const override;
- quint64 bytesReceived() const override;
- quint64 activeTime() const override;
-
- QNetworkSession::UsagePolicies usagePolicies() const override;
- void setUsagePolicies(QNetworkSession::UsagePolicies) override;
-
-private Q_SLOTS:
- void networkConfigurationsChanged();
- void configurationChanged(QNetworkConfigurationPrivatePointer config);
- void forcedSessionClose(const QNetworkConfiguration &config);
- void connectionError(const QString &id, QBearerEngineImpl::ConnectionError error);
- void decrementTimeout();
-
-private:
- void updateStateFromServiceNetwork();
- void updateStateFromActiveConfig();
-
-private:
- QBearerEngineImpl *engine;
-
- quint64 startTime;
-
- QNetworkSession::SessionError lastError;
-
- int sessionTimeout;
- QNetworkSession::UsagePolicies currentPolicies;
-
- bool opened;
-};
-
-QT_END_NAMESPACE
-
-#endif // QNETWORKSESSION_IMPL_H
diff --git a/src/plugins/generic/.prev_CMakeLists.txt b/src/plugins/generic/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..b3851ffbd1
--- /dev/null
+++ b/src/plugins/generic/.prev_CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from generic.pro.
+
+if(QT_FEATURE_evdev)
+ add_subdirectory(evdevmouse)
+ add_subdirectory(evdevtouch)
+ add_subdirectory(evdevkeyboard)
+endif()
+if(QT_FEATURE_evdev AND QT_FEATURE_tabletevent)
+ add_subdirectory(evdevtablet)
+endif()
+if(QT_FEATURE_tslib)
+ add_subdirectory(tslib)
+endif()
+if(QT_FEATURE_tuiotouch)
+ add_subdirectory(tuiotouch)
+endif()
+if(QT_FEATURE_libinput)
+ add_subdirectory(libinput)
+endif()
+if(FREEBSD)
+ add_subdirectory(bsdkeyboard)
+ add_subdirectory(bsdmouse)
+endif()
diff --git a/src/plugins/generic/CMakeLists.txt b/src/plugins/generic/CMakeLists.txt
new file mode 100644
index 0000000000..f5890d0961
--- /dev/null
+++ b/src/plugins/generic/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from generic.pro.
+
+if(QT_FEATURE_evdev)
+ add_subdirectory(evdevmouse)
+ add_subdirectory(evdevtouch)
+ add_subdirectory(evdevkeyboard)
+endif()
+if(QT_FEATURE_evdev AND QT_FEATURE_tabletevent)
+ add_subdirectory(evdevtablet)
+endif()
+if(QT_FEATURE_tslib)
+ add_subdirectory(tslib)
+endif()
+if(QT_FEATURE_tuiotouch)
+ add_subdirectory(tuiotouch)
+endif()
+if(QT_FEATURE_libinput)
+ add_subdirectory(libinput)
+endif()
+if(FREEBSD)
+ # add_subdirectory(bsdkeyboard) # special case TODO
+ # add_subdirectory(bsdmouse) # special case TODO
+endif()
diff --git a/src/plugins/generic/evdevkeyboard/CMakeLists.txt b/src/plugins/generic/evdevkeyboard/CMakeLists.txt
new file mode 100644
index 0000000000..86f5c36124
--- /dev/null
+++ b/src/plugins/generic/evdevkeyboard/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from evdevkeyboard.pro.
+
+#####################################################################
+## QEvdevKeyboardPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QEvdevKeyboardPlugin
+ OUTPUT_NAME qevdevkeyboardplugin
+ TYPE generic
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:evdevkeyboard.pro:<TRUE>:
+# OTHER_FILES = "evdevkeyboard.json"
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/generic/evdevmouse/CMakeLists.txt b/src/plugins/generic/evdevmouse/CMakeLists.txt
new file mode 100644
index 0000000000..2ed6c1b6d4
--- /dev/null
+++ b/src/plugins/generic/evdevmouse/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from evdevmouse.pro.
+
+#####################################################################
+## QEvdevMousePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QEvdevMousePlugin
+ OUTPUT_NAME qevdevmouseplugin
+ TYPE generic
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:evdevmouse.pro:<TRUE>:
+# OTHER_FILES = "evdevmouse.json"
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/generic/evdevtablet/CMakeLists.txt b/src/plugins/generic/evdevtablet/CMakeLists.txt
new file mode 100644
index 0000000000..93dd10a0e1
--- /dev/null
+++ b/src/plugins/generic/evdevtablet/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from evdevtablet.pro.
+
+#####################################################################
+## QEvdevTabletPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QEvdevTabletPlugin
+ OUTPUT_NAME qevdevtabletplugin
+ TYPE generic
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:evdevtablet.pro:<TRUE>:
+# OTHER_FILES = "evdevtablet.json"
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/generic/evdevtouch/CMakeLists.txt b/src/plugins/generic/evdevtouch/CMakeLists.txt
new file mode 100644
index 0000000000..e4a4d40c2a
--- /dev/null
+++ b/src/plugins/generic/evdevtouch/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from evdevtouch.pro.
+
+#####################################################################
+## QEvdevTouchScreenPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QEvdevTouchScreenPlugin
+ OUTPUT_NAME qevdevtouchplugin
+ TYPE generic
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:evdevtouch.pro:<TRUE>:
+# OTHER_FILES = "evdevtouch.json"
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/generic/libinput/CMakeLists.txt b/src/plugins/generic/libinput/CMakeLists.txt
new file mode 100644
index 0000000000..b772623307
--- /dev/null
+++ b/src/plugins/generic/libinput/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from libinput.pro.
+
+#####################################################################
+## QLibInputPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QLibInputPlugin
+ OUTPUT_NAME qlibinputplugin
+ TYPE generic
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:libinput.pro:<TRUE>:
+# OTHER_FILES = "libinput.json"
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/generic/tslib/.prev_CMakeLists.txt b/src/plugins/generic/tslib/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..3e82a077c3
--- /dev/null
+++ b/src/plugins/generic/tslib/.prev_CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from tslib.pro.
+
+#####################################################################
+## QTsLibPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QTsLibPlugin
+ OUTPUT_NAME qtslibplugin
+ TYPE generic
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ PkgConfig::Tslib
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:tslib.pro:<TRUE>:
+# OTHER_FILES = "tslib.json"
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/generic/tslib/CMakeLists.txt b/src/plugins/generic/tslib/CMakeLists.txt
new file mode 100644
index 0000000000..964e322a55
--- /dev/null
+++ b/src/plugins/generic/tslib/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from tslib.pro.
+
+qt_find_package(Tslib) # special case
+
+#####################################################################
+## QTsLibPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QTsLibPlugin
+ OUTPUT_NAME qtslibplugin
+ TYPE generic
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ PkgConfig::Tslib
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:tslib.pro:<TRUE>:
+# OTHER_FILES = "tslib.json"
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/generic/tuiotouch/CMakeLists.txt b/src/plugins/generic/tuiotouch/CMakeLists.txt
new file mode 100644
index 0000000000..82db49d4c3
--- /dev/null
+++ b/src/plugins/generic/tuiotouch/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from tuiotouch.pro.
+
+#####################################################################
+## QTuioTouchPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QTuioTouchPlugin
+ OUTPUT_NAME qtuiotouchplugin
+ TYPE generic
+ SOURCES
+ main.cpp
+ qoscbundle.cpp qoscbundle_p.h
+ qoscmessage.cpp qoscmessage_p.h
+ qtuiocursor_p.h
+ qtuiohandler.cpp qtuiohandler_p.h
+ qtuiotoken_p.h
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Network
+)
+
+#### Keys ignored in scope 1:.:.:tuiotouch.pro:<TRUE>:
+# OTHER_FILES = "tuiotouch.json"
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/imageformats/CMakeLists.txt b/src/plugins/imageformats/CMakeLists.txt
new file mode 100644
index 0000000000..00fefbdc0d
--- /dev/null
+++ b/src/plugins/imageformats/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from imageformats.pro.
+
+if(QT_FEATURE_ico)
+ add_subdirectory(ico)
+endif()
+if(QT_FEATURE_jpeg)
+ add_subdirectory(jpeg)
+endif()
+if(QT_FEATURE_gif)
+ add_subdirectory(gif)
+endif()
diff --git a/src/plugins/imageformats/gif/.prev_CMakeLists.txt b/src/plugins/imageformats/gif/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..b4923b81b1
--- /dev/null
+++ b/src/plugins/imageformats/gif/.prev_CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from gif.pro.
+
+#####################################################################
+## QGifPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QGifPlugin
+ OUTPUT_NAME qgif
+ TYPE imageformats
+ SOURCES
+ main.cpp main.h
+ qgifhandler.cpp qgifhandler_p.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:gif.pro:<TRUE>:
+# OTHER_FILES = "gif.json"
diff --git a/src/plugins/imageformats/gif/CMakeLists.txt b/src/plugins/imageformats/gif/CMakeLists.txt
new file mode 100644
index 0000000000..c6780e32e9
--- /dev/null
+++ b/src/plugins/imageformats/gif/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from gif.pro.
+
+#####################################################################
+## QGifPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QGifPlugin
+ OUTPUT_NAME qgif
+ TYPE imageformats
+ SOURCES
+ main.cpp main.h
+ qgifhandler.cpp qgifhandler_p.h
+ LIBRARIES # special case
+ Qt::GuiPrivate # special case
+ PUBLIC_LIBRARIES # special case
+ Qt::Gui # special case
+)
+
+#### Keys ignored in scope 1:.:.:gif.pro:<TRUE>:
+# OTHER_FILES = "gif.json"
diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp
index c92cc3ea61..a672e92006 100644
--- a/src/plugins/imageformats/gif/qgifhandler.cpp
+++ b/src/plugins/imageformats/gif/qgifhandler.cpp
@@ -246,7 +246,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
}
image->detach();
- int bpl = image->bytesPerLine();
+ qsizetype bpl = image->bytesPerLine();
unsigned char *bits = image->bits();
#define LM(l, m) (((m)<<8)|l)
@@ -422,7 +422,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
}
memset(backingstore.bits(), 0, backingstore.sizeInBytes());
}
- const int dest_bpl = backingstore.bytesPerLine();
+ const qsizetype dest_bpl = backingstore.bytesPerLine();
unsigned char *dest_data = backingstore.bits();
for (int ln=0; ln<h; ln++) {
memcpy(FAST_SCAN_LINE(dest_data, dest_bpl, ln),
diff --git a/src/plugins/imageformats/ico/.prev_CMakeLists.txt b/src/plugins/imageformats/ico/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..6151d6fd07
--- /dev/null
+++ b/src/plugins/imageformats/ico/.prev_CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from ico.pro.
+
+#####################################################################
+## QICOPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QICOPlugin
+ OUTPUT_NAME qico
+ TYPE imageformats
+ SOURCES
+ main.cpp main.h
+ qicohandler.cpp qicohandler.h
+ LIBRARIES
+ Qt::CorePrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:ico.pro:<TRUE>:
+# OTHER_FILES = "ico.json"
diff --git a/src/plugins/imageformats/ico/CMakeLists.txt b/src/plugins/imageformats/ico/CMakeLists.txt
new file mode 100644
index 0000000000..1174848d5e
--- /dev/null
+++ b/src/plugins/imageformats/ico/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from ico.pro.
+
+#####################################################################
+## QICOPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QICOPlugin
+ OUTPUT_NAME qico
+ TYPE imageformats
+ SOURCES
+ main.cpp main.h
+ qicohandler.cpp qicohandler.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:ico.pro:<TRUE>:
+# OTHER_FILES = "ico.json"
diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp
index eb50f52bd6..1982e05344 100644
--- a/src/plugins/imageformats/ico/qicohandler.cpp
+++ b/src/plugins/imageformats/ico/qicohandler.cpp
@@ -356,7 +356,7 @@ void ICOReader::read1BitBMP(QImage & image)
if (iod) {
int h = image.height();
- int bpl = image.bytesPerLine();
+ qsizetype bpl = image.bytesPerLine();
while (--h >= 0) {
if (iod->read((char*)image.scanLine(h),bpl) != bpl) {
@@ -405,7 +405,7 @@ void ICOReader::read8BitBMP(QImage & image)
if (iod) {
int h = icoAttrib.h;
- int bpl = image.bytesPerLine();
+ qsizetype bpl = image.bytesPerLine();
while (--h >= 0) {
if (iod->read((char *)image.scanLine(h), bpl) != bpl) {
@@ -425,7 +425,7 @@ void ICOReader::read16_24_32BMP(QImage & image)
QRgb *p;
QRgb *end;
uchar *buf = new uchar[image.bytesPerLine()];
- int bpl = ((icoAttrib.w*icoAttrib.nbits+31)/32)*4;
+ qsizetype bpl = ((qsizetype(icoAttrib.w)*icoAttrib.nbits+31)/32)*4;
uchar *b;
while (--h >= 0) {
diff --git a/src/plugins/imageformats/jpeg/.prev_CMakeLists.txt b/src/plugins/imageformats/jpeg/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..a02c8f05ed
--- /dev/null
+++ b/src/plugins/imageformats/jpeg/.prev_CMakeLists.txt
@@ -0,0 +1,94 @@
+# Generated from jpeg.pro.
+
+#####################################################################
+## QJpegPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QJpegPlugin
+ OUTPUT_NAME qjpeg
+ TYPE imageformats
+ SOURCES
+ main.cpp main.h
+ qjpeghandler.cpp qjpeghandler_p.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:jpeg.pro:<TRUE>:
+# OTHER_FILES = "jpeg.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QJpegPlugin CONDITION QT_FEATURE_system_jpeg
+ PUBLIC_LIBRARIES
+ JPEG::JPEG
+)
+
+qt_extend_target(QJpegPlugin CONDITION NOT QT_FEATURE_system_jpeg
+ SOURCES
+ ../../../3rdparty/libjpeg/src/jaricom.c
+ ../../../3rdparty/libjpeg/src/jcapimin.c
+ ../../../3rdparty/libjpeg/src/jcapistd.c
+ ../../../3rdparty/libjpeg/src/jcarith.c
+ ../../../3rdparty/libjpeg/src/jccoefct.c
+ ../../../3rdparty/libjpeg/src/jccolor.c
+ ../../../3rdparty/libjpeg/src/jcdctmgr.c
+ ../../../3rdparty/libjpeg/src/jchuff.c
+ ../../../3rdparty/libjpeg/src/jcinit.c
+ ../../../3rdparty/libjpeg/src/jcmainct.c
+ ../../../3rdparty/libjpeg/src/jcmarker.c
+ ../../../3rdparty/libjpeg/src/jcmaster.c
+ ../../../3rdparty/libjpeg/src/jcomapi.c
+ ../../../3rdparty/libjpeg/src/jcparam.c
+ ../../../3rdparty/libjpeg/src/jcphuff.c
+ ../../../3rdparty/libjpeg/src/jcprepct.c
+ ../../../3rdparty/libjpeg/src/jcsample.c
+ ../../../3rdparty/libjpeg/src/jctrans.c
+ ../../../3rdparty/libjpeg/src/jdapimin.c
+ ../../../3rdparty/libjpeg/src/jdapistd.c
+ ../../../3rdparty/libjpeg/src/jdarith.c
+ ../../../3rdparty/libjpeg/src/jdatadst.c
+ ../../../3rdparty/libjpeg/src/jdatasrc.c
+ ../../../3rdparty/libjpeg/src/jdcoefct.c
+ ../../../3rdparty/libjpeg/src/jdcolor.c
+ ../../../3rdparty/libjpeg/src/jddctmgr.c
+ ../../../3rdparty/libjpeg/src/jdhuff.c
+ ../../../3rdparty/libjpeg/src/jdinput.c
+ ../../../3rdparty/libjpeg/src/jdmainct.c
+ ../../../3rdparty/libjpeg/src/jdmarker.c
+ ../../../3rdparty/libjpeg/src/jdmaster.c
+ ../../../3rdparty/libjpeg/src/jdmerge.c
+ ../../../3rdparty/libjpeg/src/jdphuff.c
+ ../../../3rdparty/libjpeg/src/jdpostct.c
+ ../../../3rdparty/libjpeg/src/jdsample.c
+ ../../../3rdparty/libjpeg/src/jdtrans.c
+ ../../../3rdparty/libjpeg/src/jerror.c
+ ../../../3rdparty/libjpeg/src/jfdctflt.c
+ ../../../3rdparty/libjpeg/src/jfdctfst.c
+ ../../../3rdparty/libjpeg/src/jfdctint.c
+ ../../../3rdparty/libjpeg/src/jidctflt.c
+ ../../../3rdparty/libjpeg/src/jidctfst.c
+ ../../../3rdparty/libjpeg/src/jidctint.c
+ ../../../3rdparty/libjpeg/src/jidctred.c
+ ../../../3rdparty/libjpeg/src/jmemmgr.c
+ ../../../3rdparty/libjpeg/src/jmemnobs.c
+ ../../../3rdparty/libjpeg/src/jquant1.c
+ ../../../3rdparty/libjpeg/src/jquant2.c
+ ../../../3rdparty/libjpeg/src/jsimd_none.c
+ ../../../3rdparty/libjpeg/src/jutils.c
+ INCLUDE_DIRECTORIES
+ ../../../3rdparty/libjpeg
+ ../../../3rdparty/libjpeg/src
+)
+
+qt_extend_target(QJpegPlugin CONDITION WINRT AND NOT QT_FEATURE_system_jpeg
+ DEFINES
+ NO_GETENV
+)
+
+#### Keys ignored in scope 6:.:../../../3rdparty:../../../3rdparty/libjpeg.pri:GCC:
+# QMAKE_CFLAGS_WARN_ON = "-Wno-unused-parameter" "-Wno-main"
diff --git a/src/plugins/imageformats/jpeg/CMakeLists.txt b/src/plugins/imageformats/jpeg/CMakeLists.txt
new file mode 100644
index 0000000000..13d28c7b8b
--- /dev/null
+++ b/src/plugins/imageformats/jpeg/CMakeLists.txt
@@ -0,0 +1,96 @@
+# Generated from jpeg.pro.
+
+qt_find_package(JPEG) # special case
+
+#####################################################################
+## QJpegPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QJpegPlugin
+ OUTPUT_NAME qjpeg
+ TYPE imageformats
+ SOURCES
+ main.cpp main.h
+ qjpeghandler.cpp qjpeghandler_p.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:jpeg.pro:<TRUE>:
+# OTHER_FILES = "jpeg.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QJpegPlugin CONDITION QT_FEATURE_system_jpeg
+ PUBLIC_LIBRARIES
+ JPEG::JPEG
+)
+
+qt_extend_target(QJpegPlugin CONDITION NOT QT_FEATURE_system_jpeg
+ SOURCES
+ ../../../3rdparty/libjpeg/src/jaricom.c
+ ../../../3rdparty/libjpeg/src/jcapimin.c
+ ../../../3rdparty/libjpeg/src/jcapistd.c
+ ../../../3rdparty/libjpeg/src/jcarith.c
+ ../../../3rdparty/libjpeg/src/jccoefct.c
+ ../../../3rdparty/libjpeg/src/jccolor.c
+ ../../../3rdparty/libjpeg/src/jcdctmgr.c
+ ../../../3rdparty/libjpeg/src/jchuff.c
+ ../../../3rdparty/libjpeg/src/jcinit.c
+ ../../../3rdparty/libjpeg/src/jcmainct.c
+ ../../../3rdparty/libjpeg/src/jcmarker.c
+ ../../../3rdparty/libjpeg/src/jcmaster.c
+ ../../../3rdparty/libjpeg/src/jcomapi.c
+ ../../../3rdparty/libjpeg/src/jcparam.c
+ ../../../3rdparty/libjpeg/src/jcphuff.c
+ ../../../3rdparty/libjpeg/src/jcprepct.c
+ ../../../3rdparty/libjpeg/src/jcsample.c
+ ../../../3rdparty/libjpeg/src/jctrans.c
+ ../../../3rdparty/libjpeg/src/jdapimin.c
+ ../../../3rdparty/libjpeg/src/jdapistd.c
+ ../../../3rdparty/libjpeg/src/jdarith.c
+ ../../../3rdparty/libjpeg/src/jdatadst.c
+ ../../../3rdparty/libjpeg/src/jdatasrc.c
+ ../../../3rdparty/libjpeg/src/jdcoefct.c
+ ../../../3rdparty/libjpeg/src/jdcolor.c
+ ../../../3rdparty/libjpeg/src/jddctmgr.c
+ ../../../3rdparty/libjpeg/src/jdhuff.c
+ ../../../3rdparty/libjpeg/src/jdinput.c
+ ../../../3rdparty/libjpeg/src/jdmainct.c
+ ../../../3rdparty/libjpeg/src/jdmarker.c
+ ../../../3rdparty/libjpeg/src/jdmaster.c
+ ../../../3rdparty/libjpeg/src/jdmerge.c
+ ../../../3rdparty/libjpeg/src/jdphuff.c
+ ../../../3rdparty/libjpeg/src/jdpostct.c
+ ../../../3rdparty/libjpeg/src/jdsample.c
+ ../../../3rdparty/libjpeg/src/jdtrans.c
+ ../../../3rdparty/libjpeg/src/jerror.c
+ ../../../3rdparty/libjpeg/src/jfdctflt.c
+ ../../../3rdparty/libjpeg/src/jfdctfst.c
+ ../../../3rdparty/libjpeg/src/jfdctint.c
+ ../../../3rdparty/libjpeg/src/jidctflt.c
+ ../../../3rdparty/libjpeg/src/jidctfst.c
+ ../../../3rdparty/libjpeg/src/jidctint.c
+ ../../../3rdparty/libjpeg/src/jidctred.c
+ ../../../3rdparty/libjpeg/src/jmemmgr.c
+ ../../../3rdparty/libjpeg/src/jmemnobs.c
+ ../../../3rdparty/libjpeg/src/jquant1.c
+ ../../../3rdparty/libjpeg/src/jquant2.c
+ ../../../3rdparty/libjpeg/src/jsimd_none.c
+ ../../../3rdparty/libjpeg/src/jutils.c
+ INCLUDE_DIRECTORIES
+ ../../../3rdparty/libjpeg
+ ../../../3rdparty/libjpeg/src
+)
+
+qt_extend_target(QJpegPlugin CONDITION WINRT AND NOT QT_FEATURE_system_jpeg
+ DEFINES
+ NO_GETENV
+)
+
+#### Keys ignored in scope 6:.:../../../3rdparty:../../../3rdparty/libjpeg.pri:GCC:
+# QMAKE_CFLAGS_WARN_ON = "-Wno-unused-parameter" "-Wno-main"
diff --git a/src/plugins/platforminputcontexts/CMakeLists.txt b/src/plugins/platforminputcontexts/CMakeLists.txt
new file mode 100644
index 0000000000..155f5161f2
--- /dev/null
+++ b/src/plugins/platforminputcontexts/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from platforminputcontexts.pro.
+
+if(QT_FEATURE_xkbcommon)
+ add_subdirectory(compose)
+endif()
+if(QT_FEATURE_xkbcommon AND TARGET Qt::DBus AND UNIX AND NOT APPLE_OSX)
+ add_subdirectory(ibus)
+endif()
diff --git a/src/plugins/platforminputcontexts/compose/.prev_CMakeLists.txt b/src/plugins/platforminputcontexts/compose/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ff09314303
--- /dev/null
+++ b/src/plugins/platforminputcontexts/compose/.prev_CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from compose.pro.
+
+#####################################################################
+## QComposePlatformInputContextPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QComposePlatformInputContextPlugin
+ OUTPUT_NAME composeplatforminputcontextplugin
+ TYPE platforminputcontexts
+ SOURCES
+ qcomposeplatforminputcontext.cpp qcomposeplatforminputcontext.h
+ qcomposeplatforminputcontextmain.cpp
+ LIBRARIES
+ XKB::XKB
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:compose.pro:<TRUE>:
+# OTHER_FILES = "$$PWD/compose.json"
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforminputcontexts/compose/CMakeLists.txt b/src/plugins/platforminputcontexts/compose/CMakeLists.txt
new file mode 100644
index 0000000000..fe4e3b8b80
--- /dev/null
+++ b/src/plugins/platforminputcontexts/compose/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from compose.pro.
+
+#####################################################################
+## QComposePlatformInputContextPlugin Plugin:
+#####################################################################
+
+qt_find_package(XKB) # special case
+pkg_get_variable(PKG_X11_PREFIX x11 prefix) # special case
+qt_add_plugin(QComposePlatformInputContextPlugin
+ OUTPUT_NAME composeplatforminputcontextplugin
+ TYPE platforminputcontexts
+ SOURCES
+ qcomposeplatforminputcontext.cpp qcomposeplatforminputcontext.h
+ qcomposeplatforminputcontextmain.cpp
+ LIBRARIES
+ XKB::XKB
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:compose.pro:<TRUE>:
+# OTHER_FILES = "$$PWD/compose.json"
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforminputcontexts/ibus/CMakeLists.txt b/src/plugins/platforminputcontexts/ibus/CMakeLists.txt
new file mode 100644
index 0000000000..1017407342
--- /dev/null
+++ b/src/plugins/platforminputcontexts/ibus/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from ibus.pro.
+
+#####################################################################
+## QIbusPlatformInputContextPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QIbusPlatformInputContextPlugin
+ OUTPUT_NAME ibusplatforminputcontextplugin
+ TYPE platforminputcontexts
+ SOURCES
+ main.cpp
+ qibusinputcontextproxy.cpp qibusinputcontextproxy.h
+ qibusplatforminputcontext.cpp qibusplatforminputcontext.h
+ qibusproxy.cpp qibusproxy.h
+ qibusproxyportal.cpp qibusproxyportal.h
+ qibustypes.cpp qibustypes.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::DBus
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::XkbCommonSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:ibus.pro:<TRUE>:
+# OTHER_FILES = "$$PWD/ibus.json"
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/.prev_CMakeLists.txt b/src/plugins/platforms/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..5797b07233
--- /dev/null
+++ b/src/plugins/platforms/.prev_CMakeLists.txt
@@ -0,0 +1,57 @@
+# Generated from platforms.pro.
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ add_subdirectory(android)
+endif()
+if(NOT ANDROID)
+ add_subdirectory(minimal)
+endif()
+if(QT_FEATURE_freetype AND NOT ANDROID)
+ add_subdirectory(offscreen)
+endif()
+if(QT_FEATURE_xcb)
+ add_subdirectory(xcb)
+endif()
+if(APPLE_UIKIT AND NOT APPLE_WATCHOS)
+ add_subdirectory(ios)
+endif()
+if(APPLE_OSX)
+ add_subdirectory(cocoa)
+endif()
+if(QT_FEATURE_direct3d9 AND WIN32 AND NOT WINRT)
+ add_subdirectory(windows)
+endif()
+if(QT_FEATURE_direct3d11 AND WINRT)
+ add_subdirectory(winrt)
+endif()
+if(QT_FEATURE_direct2d1_1 AND QT_FEATURE_direct3d11_1 AND QT_FEATURE_directwrite1)
+ add_subdirectory(direct2d)
+endif()
+if(QNX)
+ add_subdirectory(qnx)
+endif()
+if(QT_FEATURE_eglfs)
+ add_subdirectory(eglfs)
+ add_subdirectory(minimalegl)
+endif()
+if(QT_FEATURE_directfb)
+ add_subdirectory(directfb)
+endif()
+if(QT_FEATURE_linuxfb)
+ add_subdirectory(linuxfb)
+endif()
+if(QT_FEATURE_vnc AND TARGET Qt::Network)
+ add_subdirectory(vnc)
+endif()
+if(FREEBSD)
+ add_subdirectory(bsdfb)
+endif()
+if(HAIKU)
+ add_subdirectory(haiku)
+endif()
+if(WASM)
+ add_subdirectory(wasm)
+endif()
+if(QT_FEATURE_integrityfb)
+ add_subdirectory(integrity)
+endif()
diff --git a/src/plugins/platforms/CMakeLists.txt b/src/plugins/platforms/CMakeLists.txt
new file mode 100644
index 0000000000..57c3952e4c
--- /dev/null
+++ b/src/plugins/platforms/CMakeLists.txt
@@ -0,0 +1,57 @@
+# Generated from platforms.pro.
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ add_subdirectory(android)
+endif()
+if(NOT ANDROID)
+ add_subdirectory(minimal)
+endif()
+if(QT_FEATURE_freetype AND NOT ANDROID)
+ add_subdirectory(offscreen)
+endif()
+if(QT_FEATURE_xcb)
+ add_subdirectory(xcb)
+endif()
+if(APPLE_UIKIT AND NOT APPLE_WATCHOS)
+ add_subdirectory(ios)
+endif()
+if(APPLE_OSX)
+ add_subdirectory(cocoa)
+endif()
+if(WIN32 AND NOT WINRT) # special case TODO fix direct3d9 test
+ add_subdirectory(windows)
+endif()
+if(QT_FEATURE_direct3d11 AND WINRT)
+ # add_subdirectory(winrt) # special case TODO
+endif()
+if(QT_FEATURE_direct2d1_1 AND QT_FEATURE_direct3d11_1 AND QT_FEATURE_directwrite1)
+ # add_subdirectory(direct2d) # special case TODO
+endif()
+if(QNX)
+ # add_subdirectory(qnx) # special case TODO
+endif()
+if(QT_FEATURE_eglfs)
+ add_subdirectory(eglfs)
+ add_subdirectory(minimalegl)
+endif()
+if(QT_FEATURE_directfb)
+ add_subdirectory(directfb)
+endif()
+if(QT_FEATURE_linuxfb)
+ add_subdirectory(linuxfb)
+endif()
+if(QT_FEATURE_vnc AND TARGET Qt::Network)
+ add_subdirectory(vnc)
+endif()
+if(FREEBSD)
+ # add_subdirectory(bsdfb) # special case TODO
+endif()
+if(HAIKU)
+ # add_subdirectory(haiku) # special case TODO
+endif()
+if(WASM)
+ # add_subdirectory(wasm) # special case TODO
+endif()
+if(QT_FEATURE_integrityfb)
+ # add_subdirectory(integrity) # special case TODO
+endif()
diff --git a/src/plugins/platforms/android/.prev_CMakeLists.txt b/src/plugins/platforms/android/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..7b21613fb9
--- /dev/null
+++ b/src/plugins/platforms/android/.prev_CMakeLists.txt
@@ -0,0 +1,85 @@
+# Generated from android.pro.
+
+#####################################################################
+## QAndroidIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QAndroidIntegrationPlugin
+ OUTPUT_NAME qtforandroid
+ TYPE platforms
+ SOURCES
+ androidcontentfileengine.cpp androidcontentfileengine.h
+ androiddeadlockprotector.cpp androiddeadlockprotector.h
+ androidjniaccessibility.cpp androidjniaccessibility.h
+ androidjniclipboard.cpp androidjniclipboard.h
+ androidjniinput.cpp androidjniinput.h
+ androidjnimain.cpp androidjnimain.h
+ androidjnimenu.cpp androidjnimenu.h
+ androidsurfaceclient.h
+ main.cpp
+ qandroidassetsfileenginehandler.cpp qandroidassetsfileenginehandler.h
+ qandroideventdispatcher.cpp qandroideventdispatcher.h
+ qandroidinputcontext.cpp qandroidinputcontext.h
+ qandroidplatformaccessibility.cpp qandroidplatformaccessibility.h
+ qandroidplatformbackingstore.cpp qandroidplatformbackingstore.h
+ qandroidplatformclipboard.cpp qandroidplatformclipboard.h
+ qandroidplatformdialoghelpers.cpp qandroidplatformdialoghelpers.h
+ qandroidplatformfiledialoghelper.cpp qandroidplatformfiledialoghelper.h
+ qandroidplatformfontdatabase.cpp qandroidplatformfontdatabase.h
+ qandroidplatformforeignwindow.cpp qandroidplatformforeignwindow.h
+ qandroidplatformintegration.cpp qandroidplatformintegration.h
+ qandroidplatformmenu.cpp qandroidplatformmenu.h
+ qandroidplatformmenubar.cpp qandroidplatformmenubar.h
+ qandroidplatformmenuitem.cpp qandroidplatformmenuitem.h
+ qandroidplatformoffscreensurface.cpp qandroidplatformoffscreensurface.h
+ qandroidplatformopenglcontext.cpp qandroidplatformopenglcontext.h
+ qandroidplatformopenglwindow.cpp qandroidplatformopenglwindow.h
+ qandroidplatformscreen.cpp qandroidplatformscreen.h
+ qandroidplatformservices.cpp qandroidplatformservices.h
+ qandroidplatformtheme.cpp qandroidplatformtheme.h
+ qandroidplatformwindow.cpp qandroidplatformwindow.h
+ qandroidsystemlocale.cpp qandroidsystemlocale.h
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${QT_SOURCE_TREE}/src/3rdparty/android
+ PUBLIC_LIBRARIES
+ Qt::AccessibilitySupportPrivate
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EglSupportPrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ android
+ jnigraphics
+)
+
+#### Keys ignored in scope 1:.:.:android.pro:<TRUE>:
+# OTHER_FILES = "$$PWD/android.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_vulkan
+ SOURCES
+ qandroidplatformvulkaninstance.cpp qandroidplatformvulkaninstance.h
+ qandroidplatformvulkanwindow.cpp qandroidplatformvulkanwindow.h
+ PUBLIC_LIBRARIES
+ Qt::VulkanSupportPrivate
+)
+
+qt_extend_target(QAndroidIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_android_style_assets
+ SOURCES
+ extract.cpp
+)
+
+qt_extend_target(QAndroidIntegrationPlugin CONDITION NOT QT_FEATURE_android_style_assets
+ SOURCES
+ extract-dummy.cpp
+)
diff --git a/src/plugins/platforms/android/CMakeLists.txt b/src/plugins/platforms/android/CMakeLists.txt
new file mode 100644
index 0000000000..4d1f83053b
--- /dev/null
+++ b/src/plugins/platforms/android/CMakeLists.txt
@@ -0,0 +1,94 @@
+# Generated from android.pro.
+
+#####################################################################
+## QAndroidIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QAndroidIntegrationPlugin
+ OUTPUT_NAME qtforandroid
+ TYPE platforms
+ DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES android # special case
+ SOURCES
+ androidcontentfileengine.cpp androidcontentfileengine.h
+ androiddeadlockprotector.cpp androiddeadlockprotector.h
+ androidjniaccessibility.cpp androidjniaccessibility.h
+ androidjniclipboard.cpp androidjniclipboard.h
+ androidjniinput.cpp androidjniinput.h
+ androidjnimain.cpp androidjnimain.h
+ androidjnimenu.cpp androidjnimenu.h
+ androidsurfaceclient.h
+ main.cpp
+ qandroidassetsfileenginehandler.cpp qandroidassetsfileenginehandler.h
+ qandroideventdispatcher.cpp qandroideventdispatcher.h
+ qandroidinputcontext.cpp qandroidinputcontext.h
+ qandroidplatformaccessibility.cpp qandroidplatformaccessibility.h
+ qandroidplatformbackingstore.cpp qandroidplatformbackingstore.h
+ qandroidplatformclipboard.cpp qandroidplatformclipboard.h
+ qandroidplatformdialoghelpers.cpp qandroidplatformdialoghelpers.h
+ qandroidplatformfiledialoghelper.cpp qandroidplatformfiledialoghelper.h
+ qandroidplatformfontdatabase.cpp qandroidplatformfontdatabase.h
+ qandroidplatformforeignwindow.cpp qandroidplatformforeignwindow.h
+ qandroidplatformintegration.cpp qandroidplatformintegration.h
+ qandroidplatformmenu.cpp qandroidplatformmenu.h
+ qandroidplatformmenubar.cpp qandroidplatformmenubar.h
+ qandroidplatformmenuitem.cpp qandroidplatformmenuitem.h
+ qandroidplatformoffscreensurface.cpp qandroidplatformoffscreensurface.h
+ qandroidplatformopenglcontext.cpp qandroidplatformopenglcontext.h
+ qandroidplatformopenglwindow.cpp qandroidplatformopenglwindow.h
+ qandroidplatformscreen.cpp qandroidplatformscreen.h
+ qandroidplatformservices.cpp qandroidplatformservices.h
+ qandroidplatformtheme.cpp qandroidplatformtheme.h
+ qandroidplatformwindow.cpp qandroidplatformwindow.h
+ qandroidsystemlocale.cpp qandroidsystemlocale.h
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${QT_SOURCE_TREE}/src/3rdparty/android
+ PUBLIC_LIBRARIES
+ Qt::AccessibilitySupportPrivate
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EglSupportPrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ android
+ jnigraphics
+# special case begin
+ INSTALL_DIRECTORY
+ plugins/platforms
+ OUTPUT_DIRECTORY
+ plugins/platforms
+ ARCHIVE_INSTALL_DIRECTORY
+ plugins/platforms
+# special case end
+)
+
+#### Keys ignored in scope 1:.:.:android.pro:<TRUE>:
+# OTHER_FILES = "$$PWD/android.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_vulkan
+ SOURCES
+ qandroidplatformvulkaninstance.cpp qandroidplatformvulkaninstance.h
+ qandroidplatformvulkanwindow.cpp qandroidplatformvulkanwindow.h
+ PUBLIC_LIBRARIES
+ Qt::VulkanSupportPrivate
+)
+
+qt_extend_target(QAndroidIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_android_style_assets
+ SOURCES
+ extract.cpp
+)
+
+qt_extend_target(QAndroidIntegrationPlugin CONDITION NOT QT_FEATURE_android_style_assets
+ SOURCES
+ extract-dummy.cpp
+)
diff --git a/src/plugins/platforms/android/android.pro b/src/plugins/platforms/android/android.pro
index 730247cd7f..8ea78f7cba 100644
--- a/src/plugins/platforms/android/android.pro
+++ b/src/plugins/platforms/android/android.pro
@@ -9,6 +9,8 @@ QT += \
qtConfig(vulkan): QT += vulkan_support-private
+qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
+
OTHER_FILES += $$PWD/android.json
INCLUDEPATH += \
@@ -16,7 +18,6 @@ INCLUDEPATH += \
$$QT_SOURCE_TREE/src/3rdparty/android
SOURCES += $$PWD/main.cpp \
- $$PWD/androidplatformplugin.cpp \
$$PWD/androidcontentfileengine.cpp \
$$PWD/androiddeadlockprotector.cpp \
$$PWD/androidjnimain.cpp \
diff --git a/src/plugins/platforms/android/androidplatformplugin.cpp b/src/plugins/platforms/android/androidplatformplugin.cpp
deleted file mode 100644
index 297e167f47..0000000000
--- a/src/plugins/platforms/android/androidplatformplugin.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 BogDan Vatra <bogdan@kde.org>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qpa/qplatformintegrationplugin.h>
-#include "qandroidplatformintegration.h"
-
-QT_BEGIN_NAMESPACE
-
-class QAndroidPlatformIntegrationPlugin: public QPlatformIntegrationPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "android.json")
-public:
- QPlatformIntegration *create(const QString &key, const QStringList &paramList) override;
-};
-
-
-QPlatformIntegration *QAndroidPlatformIntegrationPlugin::create(const QString &key, const QStringList &paramList)
-{
- Q_UNUSED(paramList);
- if (!key.compare(QLatin1String("android"), Qt::CaseInsensitive))
- return new QAndroidPlatformIntegration(paramList);
- return 0;
-}
-
-QT_END_NAMESPACE
-#include "androidplatformplugin.moc"
-
diff --git a/src/plugins/platforms/android/main.cpp b/src/plugins/platforms/android/main.cpp
index c304fc8d69..4841d0425c 100644
--- a/src/plugins/platforms/android/main.cpp
+++ b/src/plugins/platforms/android/main.cpp
@@ -61,3 +61,4 @@ QPlatformIntegration *QAndroidIntegrationPlugin::create(const QString& system, c
}
QT_END_NAMESPACE
+#include "main.moc"
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp
index c81cc66166..592b78d936 100644
--- a/src/plugins/platforms/android/qandroidplatformintegration.cpp
+++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp
@@ -43,6 +43,9 @@
#include <QtGui/private/qguiapplication_p.h>
#include <QGuiApplication>
#include <QOpenGLContext>
+#if QT_CONFIG(opengl)
+#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
+#endif
#include <QThread>
#include <QOffscreenSurface>
@@ -286,7 +289,12 @@ QPlatformBackingStore *QAndroidPlatformIntegration::createPlatformBackingStore(Q
{
if (!QtAndroid::activity())
return nullptr;
- return new QAndroidPlatformBackingStore(window);
+
+ auto *backingStore = new QAndroidPlatformBackingStore(window);
+#if QT_CONFIG(opengl)
+ backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore));
+#endif // QT_CONFIG(opengl)
+ return backingStore;
}
QPlatformOpenGLContext *QAndroidPlatformIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
diff --git a/src/plugins/platforms/cocoa/.prev_CMakeLists.txt b/src/plugins/platforms/cocoa/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..1491340b65
--- /dev/null
+++ b/src/plugins/platforms/cocoa/.prev_CMakeLists.txt
@@ -0,0 +1,150 @@
+# Generated from cocoa.pro.
+
+#####################################################################
+## QCocoaIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QCocoaIntegrationPlugin
+ OUTPUT_NAME qcocoa
+ TYPE platforms
+ SOURCES
+ main.mm
+ messages.cpp messages.h
+ qcocoaapplication.h qcocoaapplication.mm
+ qcocoaapplicationdelegate.h qcocoaapplicationdelegate.mm
+ qcocoabackingstore.h qcocoabackingstore.mm
+ qcocoaclipboard.h qcocoaclipboard.mm
+ qcocoacursor.h qcocoacursor.mm
+ qcocoadrag.h qcocoadrag.mm
+ qcocoaeventdispatcher.h qcocoaeventdispatcher.mm
+ qcocoahelpers.h qcocoahelpers.mm
+ qcocoainputcontext.h qcocoainputcontext.mm
+ qcocoaintegration.h qcocoaintegration.mm
+ qcocoaintrospection.h qcocoaintrospection.mm
+ qcocoakeymapper.h qcocoakeymapper.mm
+ qcocoamenu.h qcocoamenu.mm
+ qcocoamenubar.h qcocoamenubar.mm
+ qcocoamenuitem.h qcocoamenuitem.mm
+ qcocoamenuloader.h qcocoamenuloader.mm
+ qcocoamimetypes.h qcocoamimetypes.mm
+ qcocoanativeinterface.h qcocoanativeinterface.mm
+ qcocoansmenu.h qcocoansmenu.mm
+ qcocoascreen.h qcocoascreen.mm
+ qcocoaservices.h qcocoaservices.mm
+ qcocoasystemtrayicon.h qcocoasystemtrayicon.mm
+ qcocoatheme.h qcocoatheme.mm
+ qcocoawindow.h qcocoawindow.mm
+ qcocoawindowmanager.h qcocoawindowmanager.mm
+ qiosurfacegraphicsbuffer.h qiosurfacegraphicsbuffer.mm
+ qmacclipboard.h qmacclipboard.mm
+ qmultitouch_mac.mm qmultitouch_mac_p.h
+ qnsview.h qnsview.mm
+ qnswindow.h qnswindow.mm
+ qnswindowdelegate.h qnswindowdelegate.mm
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+ ${FWCarbon}
+ ${FWCoreServices}
+ ${FWCoreVideo}
+ ${FWIOKit}
+ ${FWIOSurface}
+ ${FWMetal}
+ ${FWQuartzCore}
+ Cups::Cups
+ Qt::ClipboardSupportPrivate
+ Qt::Core
+ Qt::CorePrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GraphicsSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
+)
+
+# Resources:
+set(qcocoaresources_resource_files
+ "images/sizeallcursor.png"
+ "images/spincursor.png"
+ "images/waitcursor.png"
+)
+
+qt_add_resource(QCocoaIntegrationPlugin "qcocoaresources"
+ PREFIX
+ "/qt-project.org/mac/cursors"
+ FILES
+ ${qcocoaresources_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:cocoa.pro:<TRUE>:
+# OTHER_FILES = "cocoa.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_opengl
+ SOURCES
+ qcocoaglcontext.h qcocoaglcontext.mm
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_vulkan
+ SOURCES
+ qcocoavulkaninstance.h qcocoavulkaninstance.mm
+ PUBLIC_LIBRARIES
+ Qt::VulkanSupportPrivate
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_accessibility
+ SOURCES
+ qcocoaaccessibility.h qcocoaaccessibility.mm
+ qcocoaaccessibilityelement.h qcocoaaccessibilityelement.mm
+ PUBLIC_LIBRARIES
+ Qt::AccessibilitySupportPrivate
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionmanager
+ SOURCES
+ qcocoasessionmanager.cpp qcocoasessionmanager.h
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::Widgets
+ SOURCES
+ qpaintengine_mac.mm qpaintengine_mac_p.h
+ PUBLIC_LIBRARIES
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 8:.:.:cocoa.pro:TARGET Qt::Widgets:
+# QT_FOR_CONFIG = "widgets"
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::PrintSupport AND TARGET Qt::Widgets
+ SOURCES
+ qcocoaprintdevice.h qcocoaprintdevice.mm
+ qcocoaprintersupport.h qcocoaprintersupport.mm
+ qprintengine_mac.mm qprintengine_mac_p.h
+ PUBLIC_LIBRARIES
+ Qt::PrintSupportPrivate
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_colordialog AND TARGET Qt::Widgets
+ SOURCES
+ qcocoacolordialoghelper.h qcocoacolordialoghelper.mm
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_filedialog AND TARGET Qt::Widgets
+ SOURCES
+ qcocoafiledialoghelper.h qcocoafiledialoghelper.mm
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_fontdialog AND TARGET Qt::Widgets
+ SOURCES
+ qcocoafontdialoghelper.h qcocoafontdialoghelper.mm
+)
+
+#### Keys ignored in scope 13:.:.:cocoa.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/cocoa/CMakeLists.txt b/src/plugins/platforms/cocoa/CMakeLists.txt
new file mode 100644
index 0000000000..9e8b162aec
--- /dev/null
+++ b/src/plugins/platforms/cocoa/CMakeLists.txt
@@ -0,0 +1,154 @@
+# Generated from cocoa.pro.
+
+# special case:
+qt_find_package(Cups PROVIDED_TARGETS Cups::Cups)
+
+#####################################################################
+## QCocoaIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QCocoaIntegrationPlugin
+ OUTPUT_NAME qcocoa
+ DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES cocoa # special case
+ TYPE platforms
+ SOURCES
+ main.mm
+ messages.cpp messages.h
+ qcocoaapplication.h qcocoaapplication.mm
+ qcocoaapplicationdelegate.h qcocoaapplicationdelegate.mm
+ qcocoabackingstore.h qcocoabackingstore.mm
+ qcocoaclipboard.h qcocoaclipboard.mm
+ qcocoacursor.h qcocoacursor.mm
+ qcocoadrag.h qcocoadrag.mm
+ qcocoaeventdispatcher.h qcocoaeventdispatcher.mm
+ qcocoahelpers.h qcocoahelpers.mm
+ qcocoainputcontext.h qcocoainputcontext.mm
+ qcocoaintegration.h qcocoaintegration.mm
+ qcocoaintrospection.h qcocoaintrospection.mm
+ qcocoakeymapper.h qcocoakeymapper.mm
+ qcocoamenu.h qcocoamenu.mm
+ qcocoamenubar.h qcocoamenubar.mm
+ qcocoamenuitem.h qcocoamenuitem.mm
+ qcocoamenuloader.h qcocoamenuloader.mm
+ qcocoamimetypes.h qcocoamimetypes.mm
+ qcocoanativeinterface.h qcocoanativeinterface.mm
+ qcocoansmenu.h qcocoansmenu.mm
+ qcocoascreen.h qcocoascreen.mm
+ qcocoaservices.h qcocoaservices.mm
+ qcocoasystemtrayicon.h qcocoasystemtrayicon.mm
+ qcocoatheme.h qcocoatheme.mm
+ qcocoawindow.h qcocoawindow.mm
+ qcocoawindowmanager.h qcocoawindowmanager.mm
+ qiosurfacegraphicsbuffer.h qiosurfacegraphicsbuffer.mm
+ qmacclipboard.h qmacclipboard.mm
+ qmultitouch_mac.mm qmultitouch_mac_p.h
+ qnsview.h qnsview.mm
+ qnswindow.h qnswindow.mm
+ qnswindowdelegate.h qnswindowdelegate.mm
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+ ${FWCarbon}
+ ${FWCoreServices}
+ ${FWCoreVideo}
+ ${FWIOKit}
+ ${FWIOSurface}
+ ${FWMetal}
+ ${FWQuartzCore}
+ Cups::Cups
+ Qt::ClipboardSupportPrivate
+ Qt::Core
+ Qt::CorePrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GraphicsSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
+)
+
+# Resources:
+set(qcocoaresources_resource_files
+ "images/sizeallcursor.png"
+ "images/spincursor.png"
+ "images/waitcursor.png"
+)
+
+qt_add_resource(QCocoaIntegrationPlugin "qcocoaresources"
+ PREFIX
+ "/qt-project.org/mac/cursors"
+ FILES
+ ${qcocoaresources_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:cocoa.pro:<TRUE>:
+# OTHER_FILES = "cocoa.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_opengl
+ SOURCES
+ qcocoaglcontext.h qcocoaglcontext.mm
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_vulkan
+ SOURCES
+ qcocoavulkaninstance.h qcocoavulkaninstance.mm
+ PUBLIC_LIBRARIES
+ Qt::VulkanSupportPrivate
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_accessibility
+ SOURCES
+ qcocoaaccessibility.h qcocoaaccessibility.mm
+ qcocoaaccessibilityelement.h qcocoaaccessibilityelement.mm
+ PUBLIC_LIBRARIES
+ Qt::AccessibilitySupportPrivate
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionmanager
+ SOURCES
+ qcocoasessionmanager.cpp qcocoasessionmanager.h
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::Widgets
+ SOURCES
+ qpaintengine_mac.mm qpaintengine_mac_p.h
+ PUBLIC_LIBRARIES
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 8:.:.:cocoa.pro:TARGET Qt::Widgets:
+# QT_FOR_CONFIG = "widgets"
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::PrintSupport AND TARGET Qt::Widgets
+ SOURCES
+ qcocoaprintdevice.h qcocoaprintdevice.mm
+ qcocoaprintersupport.h qcocoaprintersupport.mm
+ qprintengine_mac.mm qprintengine_mac_p.h
+ PUBLIC_LIBRARIES
+ Qt::PrintSupportPrivate
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_colordialog AND TARGET Qt::Widgets
+ SOURCES
+ qcocoacolordialoghelper.h qcocoacolordialoghelper.mm
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_filedialog AND TARGET Qt::Widgets
+ SOURCES
+ qcocoafiledialoghelper.h qcocoafiledialoghelper.mm
+)
+
+qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_fontdialog AND TARGET Qt::Widgets
+ SOURCES
+ qcocoafontdialoghelper.h qcocoafontdialoghelper.mm
+)
+
+#### Keys ignored in scope 13:.:.:cocoa.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro
index a919963cf4..953346c56e 100644
--- a/src/plugins/platforms/cocoa/cocoa.pro
+++ b/src/plugins/platforms/cocoa/cocoa.pro
@@ -101,6 +101,8 @@ QT += \
qtConfig(vulkan): QT += vulkan_support-private
+qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
+
CONFIG += no_app_extension_api_only
qtHaveModule(widgets) {
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h
index 0c14e07551..30838ba254 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.h
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.h
@@ -128,6 +128,8 @@ public:
void beep() const override;
+ void closePopups(QWindow *forWindow = nullptr);
+
private Q_SLOTS:
void focusWindowChanged(QWindow *);
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 61308d6bf9..b2698b05fe 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -68,6 +68,10 @@
#include <QtFontDatabaseSupport/private/qfontengine_coretext_p.h>
+#if QT_CONFIG(opengl)
+#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
+#endif
+
#ifdef QT_WIDGETS_LIB
#include <QtWidgets/qtwidgetsglobal.h>
#if QT_CONFIG(filedialog)
@@ -324,10 +328,16 @@ QPlatformBackingStore *QCocoaIntegration::createPlatformBackingStore(QWindow *wi
return nullptr;
}
+ QPlatformBackingStore *backingStore = nullptr;
if (platformWindow->view().layer)
- return new QCALayerBackingStore(window);
+ backingStore = new QCALayerBackingStore(window);
else
- return new QNSWindowBackingStore(window);
+ backingStore = new QNSWindowBackingStore(window);
+
+#if QT_CONFIG(opengl)
+ backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore));
+#endif
+ return backingStore;
}
QAbstractEventDispatcher *QCocoaIntegration::createEventDispatcher() const
@@ -487,6 +497,19 @@ void QCocoaIntegration::beep() const
NSBeep();
}
+void QCocoaIntegration::closePopups(QWindow *forWindow)
+{
+ for (auto it = m_popupWindowStack.begin(); it != m_popupWindowStack.end();) {
+ auto *popup = *it;
+ if (!forWindow || popup->window()->transientParent() == forWindow) {
+ it = m_popupWindowStack.erase(it);
+ QWindowSystemInterface::handleCloseEvent<QWindowSystemInterface::SynchronousDelivery>(popup->window());
+ } else {
+ ++it;
+ }
+ }
+}
+
void QCocoaIntegration::focusWindowChanged(QWindow *focusWindow)
{
// Don't revert icon just because we lost focus
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h
index b15c0ac31c..4bff1de515 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.h
+++ b/src/plugins/platforms/cocoa/qcocoawindow.h
@@ -151,6 +151,7 @@ public:
Q_NOTIFICATION_HANDLER(NSWindowDidEndLiveResizeNotification) void windowDidEndLiveResize();
Q_NOTIFICATION_HANDLER(NSWindowDidBecomeKeyNotification) void windowDidBecomeKey();
Q_NOTIFICATION_HANDLER(NSWindowDidResignKeyNotification) void windowDidResignKey();
+ Q_NOTIFICATION_HANDLER(NSWindowWillMiniaturizeNotification) void windowWillMiniaturize();
Q_NOTIFICATION_HANDLER(NSWindowDidMiniaturizeNotification) void windowDidMiniaturize();
Q_NOTIFICATION_HANDLER(NSWindowDidDeminiaturizeNotification) void windowDidDeminiaturize();
Q_NOTIFICATION_HANDLER(NSWindowWillEnterFullScreenNotification) void windowWillEnterFullScreen();
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 9cb4470e02..28da4fcf5d 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -71,14 +71,6 @@ enum {
defaultWindowHeight = 160
};
-static void qt_closePopups()
-{
- while (QCocoaWindow *popup = QCocoaIntegration::instance()->popPopupWindow()) {
- QWindowSystemInterface::handleCloseEvent(popup->window());
- QWindowSystemInterface::flushWindowSystemEvents();
- }
-}
-
Q_LOGGING_CATEGORY(lcCocoaNotifications, "qt.qpa.cocoa.notifications");
static void qRegisterNotificationCallbacks()
@@ -819,6 +811,11 @@ void QCocoaWindow::windowDidExitFullScreen()
}
}
+void QCocoaWindow::windowWillMiniaturize()
+{
+ QCocoaIntegration::instance()->closePopups(window());
+}
+
void QCocoaWindow::windowDidMiniaturize()
{
if (!isContentView())
@@ -1157,7 +1154,7 @@ void QCocoaWindow::viewDidChangeGlobalFrame()
void QCocoaWindow::windowWillMove()
{
// Close any open popups on window move
- qt_closePopups();
+ QCocoaIntegration::instance()->closePopups();
}
void QCocoaWindow::windowDidMove()
@@ -1286,7 +1283,7 @@ void QCocoaWindow::windowWillClose()
{
// Close any open popups on window closing.
if (window() && !windowIsPopupType(window()->type()))
- qt_closePopups();
+ QCocoaIntegration::instance()->closePopups();
}
// ----------------------- NSWindowDelegate callbacks -----------------------
diff --git a/src/plugins/platforms/cocoa/qpaintengine_mac.mm b/src/plugins/platforms/cocoa/qpaintengine_mac.mm
index 00b2267f0d..cadb76d2e4 100644
--- a/src/plugins/platforms/cocoa/qpaintengine_mac.mm
+++ b/src/plugins/platforms/cocoa/qpaintengine_mac.mm
@@ -90,7 +90,7 @@ CGImageRef qt_mac_create_imagemask(const QPixmap &pixmap, const QRectF &sr)
image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
const int sx = qRound(sr.x()), sy = qRound(sr.y()), sw = qRound(sr.width()), sh = qRound(sr.height());
- const int sbpr = image.bytesPerLine();
+ const qsizetype sbpr = image.bytesPerLine();
const uint nbytes = sw * sh;
// alpha is always 255 for bitmaps, ignore it in this case.
const quint32 mask = pixmap.depth() == 1 ? 0x00ffffff : 0xffffffff;
diff --git a/src/plugins/platforms/directfb/.prev_CMakeLists.txt b/src/plugins/platforms/directfb/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..33beaa3da4
--- /dev/null
+++ b/src/plugins/platforms/directfb/.prev_CMakeLists.txt
@@ -0,0 +1,61 @@
+# Generated from directfb.pro.
+
+#####################################################################
+## QDirectFbIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QDirectFbIntegrationPlugin
+ OUTPUT_NAME qdirectfb
+ TYPE platforms
+ SOURCES
+ main.cpp
+ qdirectfbbackingstore.cpp qdirectfbbackingstore.h
+ qdirectfbblitter.cpp qdirectfbblitter.h
+ qdirectfbconvenience.cpp qdirectfbconvenience.h
+ qdirectfbcursor.cpp qdirectfbcursor.h
+ qdirectfbeglhooks.h
+ qdirectfbinput.cpp qdirectfbinput.h
+ qdirectfbintegration.cpp qdirectfbintegration.h
+ qdirectfbscreen.cpp qdirectfbscreen.h
+ qdirectfbwindow.cpp qdirectfbwindow.h
+ PUBLIC_LIBRARIES
+ PkgConfig::DirectFB
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::ServiceSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:directfb.pro:<TRUE>:
+# OTHER_FILES = "directfb.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QDirectFbIntegrationPlugin CONDITION QT_CONFIG___contains___directfb_egl
+ SOURCES
+ qdirectfb_egl.cpp qdirectfb_egl.h
+ DEFINES
+ DIRECTFB_GL_EGL
+ PUBLIC_LIBRARIES
+ Qt::EglSupportPrivate
+)
+
+qt_extend_target(QDirectFbIntegrationPlugin CONDITION NOT DIRECTFB_PLATFORM_HOOKS_SOURCES_ISEMPTY
+ DEFINES
+ DIRECTFB_PLATFORM_HOOKS
+)
+
+#### Keys ignored in scope 3:.:.:directfb.pro:NOT DIRECTFB_PLATFORM_HOOKS_SOURCES_ISEMPTY:
+# QMAKE_LIBDIR = "$$DIRECTFB_PLATFORM_HOOKS_LIBDIR"
+
+qt_extend_target(QDirectFbIntegrationPlugin CONDITION DIRECTFB_PLATFORM_HOOKS_SOURCES_ISEMPTY
+ SOURCES
+ qdirectfbeglhooks_stub.cpp
+)
+
+#### Keys ignored in scope 5:.:.:directfb.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/directfb/CMakeLists.txt b/src/plugins/platforms/directfb/CMakeLists.txt
new file mode 100644
index 0000000000..c723ca75f4
--- /dev/null
+++ b/src/plugins/platforms/directfb/CMakeLists.txt
@@ -0,0 +1,65 @@
+# Generated from directfb.pro.
+
+# begin special case:
+qt_find_package(DirectFB)
+# end special case:
+
+#####################################################################
+## QDirectFbIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QDirectFbIntegrationPlugin
+ OUTPUT_NAME qdirectfb
+ TYPE platforms
+ SOURCES
+ main.cpp
+ qdirectfbbackingstore.cpp qdirectfbbackingstore.h
+ qdirectfbblitter.cpp qdirectfbblitter.h
+ qdirectfbconvenience.cpp qdirectfbconvenience.h
+ qdirectfbcursor.cpp qdirectfbcursor.h
+ qdirectfbeglhooks.h
+ qdirectfbinput.cpp qdirectfbinput.h
+ qdirectfbintegration.cpp qdirectfbintegration.h
+ qdirectfbscreen.cpp qdirectfbscreen.h
+ qdirectfbwindow.cpp qdirectfbwindow.h
+ PUBLIC_LIBRARIES
+ PkgConfig::DirectFB
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::ServiceSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:directfb.pro:<TRUE>:
+# OTHER_FILES = "directfb.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QDirectFbIntegrationPlugin CONDITION QT_CONFIG___contains___directfb_egl
+ SOURCES
+ qdirectfb_egl.cpp qdirectfb_egl.h
+ DEFINES
+ DIRECTFB_GL_EGL
+ PUBLIC_LIBRARIES
+ Qt::EglSupportPrivate
+)
+
+qt_extend_target(QDirectFbIntegrationPlugin CONDITION NOT DIRECTFB_PLATFORM_HOOKS_SOURCES_ISEMPTY
+ DEFINES
+ DIRECTFB_PLATFORM_HOOKS
+)
+
+#### Keys ignored in scope 3:.:.:directfb.pro:NOT DIRECTFB_PLATFORM_HOOKS_SOURCES_ISEMPTY:
+# QMAKE_LIBDIR = "$$DIRECTFB_PLATFORM_HOOKS_LIBDIR"
+
+qt_extend_target(QDirectFbIntegrationPlugin CONDITION DIRECTFB_PLATFORM_HOOKS_SOURCES_ISEMPTY
+ SOURCES
+ qdirectfbeglhooks_stub.cpp
+)
+
+#### Keys ignored in scope 5:.:.:directfb.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/eglfs/.prev_CMakeLists.txt b/src/plugins/platforms/eglfs/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..896b8cd3e8
--- /dev/null
+++ b/src/plugins/platforms/eglfs/.prev_CMakeLists.txt
@@ -0,0 +1,115 @@
+# Generated from eglfs.pro.
+
+#####################################################################
+## EglFSDeviceIntegration Module:
+#####################################################################
+
+qt_add_module(EglFSDeviceIntegration
+ INTERNAL_MODULE
+ SOURCES
+ api/qeglfsdeviceintegration.cpp api/qeglfsdeviceintegration_p.h
+ api/qeglfsglobal_p.h
+ api/qeglfshooks.cpp api/qeglfshooks_p.h
+ api/qeglfsintegration.cpp api/qeglfsintegration_p.h
+ api/qeglfsoffscreenwindow.cpp api/qeglfsoffscreenwindow_p.h
+ api/qeglfsscreen.cpp api/qeglfsscreen_p.h
+ api/qeglfswindow.cpp api/qeglfswindow_p.h
+ DEFINES
+ QT_BUILD_EGL_DEVICE_LIB
+ QT_EGL_NO_X11
+ INCLUDE_DIRECTORIES
+ api
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::DeviceDiscoverySupportPrivate
+ Qt::EglSupportPrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FbSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GuiPrivate
+ Qt::ServiceSupportPrivate
+ Qt::ThemeSupportPrivate
+)
+
+#### Keys ignored in scope 2:.:.:eglfsdeviceintegration.pro:<TRUE>:
+# MODULE = "eglfsdeviceintegration"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::InputSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::InputSupportPrivate
+)
+
+qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_vulkan
+ SOURCES
+ api/vulkan/qeglfsvulkaninstance.cpp api/vulkan/qeglfsvulkaninstance_p.h
+ api/vulkan/qeglfsvulkanwindow.cpp api/vulkan/qeglfsvulkanwindow_p.h
+ PUBLIC_LIBRARIES
+ Qt::VulkanSupportPrivate
+)
+
+qt_extend_target(EglFSDeviceIntegration CONDITION NOT EGLFS_PLATFORM_HOOKS_SOURCES_ISEMPTY
+ DEFINES
+ EGLFS_PLATFORM_HOOKS
+)
+
+qt_extend_target(EglFSDeviceIntegration CONDITION NOT EGLFS_DEVICE_INTEGRATION_ISEMPTY
+ DEFINES
+ EGLFS_PREFERRED_PLUGIN=
+)
+
+if(QT_FEATURE_cursor)
+ # Resources:
+ set(cursor_resource_files
+ "cursor-atlas.png"
+ "cursor.json"
+ )
+
+ qt_add_resource(EglFSDeviceIntegration "cursor"
+ PREFIX
+ "/"
+ FILES
+ ${cursor_resource_files}
+ )
+endif()
+
+qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_opengl
+ SOURCES
+ api/qeglfscontext.cpp api/qeglfscontext_p.h
+ api/qeglfscursor.cpp api/qeglfscursor_p.h
+ PUBLIC_LIBRARIES
+ Qt::OpenGLPrivate
+)
+#####################################################################
+## QEglFSIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QEglFSIntegrationPlugin
+ OUTPUT_NAME qeglfs
+ TYPE platforms
+ SOURCES
+ qeglfsmain.cpp
+ DEFINES
+ QT_EGL_NO_X11
+ INCLUDE_DIRECTORIES
+ api
+ PUBLIC_LIBRARIES
+ Qt::EglFSDeviceIntegrationPrivate
+)
+
+#### Keys ignored in scope 13:.:.:eglfs-plugin.pro:<TRUE>:
+# OTHER_FILES = "$$PWD/eglfs.json"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 14:.:.:eglfs-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
+add_subdirectory(deviceintegration)
diff --git a/src/plugins/platforms/eglfs/CMakeLists.txt b/src/plugins/platforms/eglfs/CMakeLists.txt
new file mode 100644
index 0000000000..0078c1f0d7
--- /dev/null
+++ b/src/plugins/platforms/eglfs/CMakeLists.txt
@@ -0,0 +1,114 @@
+# Generated from eglfs.pro.
+qt_find_package(EGL) # special case
+
+#####################################################################
+## EglFSDeviceIntegration Module:
+#####################################################################
+
+qt_add_module(EglFSDeviceIntegration
+ INTERNAL_MODULE
+ SOURCES
+ api/qeglfsdeviceintegration.cpp api/qeglfsdeviceintegration_p.h
+ api/qeglfsglobal_p.h
+ api/qeglfshooks.cpp api/qeglfshooks_p.h
+ api/qeglfsintegration.cpp api/qeglfsintegration_p.h
+ api/qeglfsoffscreenwindow.cpp api/qeglfsoffscreenwindow_p.h
+ api/qeglfsscreen.cpp api/qeglfsscreen_p.h
+ api/qeglfswindow.cpp api/qeglfswindow_p.h
+ DEFINES
+ QT_BUILD_EGL_DEVICE_LIB
+ QT_EGL_NO_X11
+ INCLUDE_DIRECTORIES
+ api
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::DeviceDiscoverySupportPrivate
+ Qt::EglSupportPrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FbSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GuiPrivate
+ Qt::ServiceSupportPrivate
+ Qt::ThemeSupportPrivate
+ EGL::EGL # special case
+)
+
+#### Keys ignored in scope 2:.:.:eglfsdeviceintegration.pro:<TRUE>:
+# MODULE = "eglfsdeviceintegration"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::InputSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::InputSupportPrivate
+)
+
+qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_vulkan
+ SOURCES
+ api/vulkan/qeglfsvulkaninstance.cpp api/vulkan/qeglfsvulkaninstance_p.h
+ api/vulkan/qeglfsvulkanwindow.cpp api/vulkan/qeglfsvulkanwindow_p.h
+ PUBLIC_LIBRARIES
+ Qt::VulkanSupportPrivate
+)
+
+# special case:
+# extend_target(EglFSDeviceIntegration CONDITION NOT EGLFS_PLATFORM_HOOKS_SOURCES_ISEMPTY ...
+# extend_target(EglFSDeviceIntegration CONDITION NOT EGLFS_DEVICE_INTEGRATION_ISEMPTY ...
+
+if(QT_FEATURE_cursor) # special case
+ # Resources:
+ set(cursor_resource_files
+ "cursor-atlas.png"
+ "cursor.json"
+ )
+
+ qt_add_resource(EglFSDeviceIntegration "cursor"
+ PREFIX
+ "/"
+ FILES
+ ${cursor_resource_files}
+ )
+endif()
+
+qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_opengl
+ SOURCES
+ api/qeglfscontext.cpp api/qeglfscontext_p.h
+ api/qeglfscursor.cpp api/qeglfscursor_p.h
+ PUBLIC_LIBRARIES
+ Qt::OpenGLPrivate
+)
+#####################################################################
+## QEglFSIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QEglFSIntegrationPlugin
+ OUTPUT_NAME qeglfs
+ TYPE platforms
+ DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES eglfs # special case
+ SOURCES
+ qeglfsmain.cpp
+ DEFINES
+ QT_EGL_NO_X11
+ INCLUDE_DIRECTORIES
+ api
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate # special case
+ Qt::EglFSDeviceIntegrationPrivate
+ EGL::EGL # special case
+)
+
+#### Keys ignored in scope 13:.:.:eglfs-plugin.pro:<TRUE>:
+# OTHER_FILES = "$$PWD/eglfs.json"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 14:.:.:eglfs-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
+add_subdirectory(deviceintegration)
diff --git a/src/plugins/platforms/eglfs/api/api.pri b/src/plugins/platforms/eglfs/api/api.pri
index 68965b58d8..bcb72c9ea7 100644
--- a/src/plugins/platforms/eglfs/api/api.pri
+++ b/src/plugins/platforms/eglfs/api/api.pri
@@ -15,6 +15,7 @@ HEADERS += $$PWD/qeglfswindow_p.h \
$$PWD/qeglfsglobal_p.h
qtConfig(opengl) {
+ QT += opengl-private
SOURCES += \
$$PWD/qeglfscursor.cpp \
$$PWD/qeglfscontext.cpp
diff --git a/src/plugins/platforms/eglfs/api/qeglfscursor.cpp b/src/plugins/platforms/eglfs/api/qeglfscursor.cpp
index 98e05195ee..b8bd7e038b 100644
--- a/src/plugins/platforms/eglfs/api/qeglfscursor.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfscursor.cpp
@@ -50,7 +50,7 @@
#include <QtCore/QJsonObject>
#include <QtGui/private/qguiapplication_p.h>
-#include <QtGui/private/qopenglvertexarrayobject_p.h>
+#include <QtOpenGL/private/qopenglvertexarrayobject_p.h>
#ifndef GL_VERTEX_ARRAY_BINDING
#define GL_VERTEX_ARRAY_BINDING 0x85B5
diff --git a/src/plugins/platforms/eglfs/api/qeglfscursor_p.h b/src/plugins/platforms/eglfs/api/qeglfscursor_p.h
index 8768f9dd8c..7a6044aca0 100644
--- a/src/plugins/platforms/eglfs/api/qeglfscursor_p.h
+++ b/src/plugins/platforms/eglfs/api/qeglfscursor_p.h
@@ -54,9 +54,9 @@
#include "qeglfsglobal_p.h"
#include <qpa/qplatformcursor.h>
#include <qpa/qplatformscreen.h>
+#include <QtOpenGL/QOpenGLShaderProgram>
#include <QtGui/QMatrix4x4>
#include <QtGui/QOpenGLFunctions>
-#include <QtGui/QOpenGLShaderProgram>
#include <QtGui/private/qinputdevicemanager_p.h>
#include <QtCore/qvector.h>
diff --git a/src/plugins/platforms/eglfs/deviceintegration/.prev_CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..d08bf6bc20
--- /dev/null
+++ b/src/plugins/platforms/eglfs/deviceintegration/.prev_CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from deviceintegration.pro.
+
+if(QT_FEATURE_eglfs_x11)
+ add_subdirectory(eglfs_x11)
+endif()
+if(QT_FEATURE_eglfs_egldevice OR QT_FEATURE_eglfs_gbm)
+ add_subdirectory(eglfs_kms_support)
+endif()
+if(QT_FEATURE_eglfs_gbm)
+ add_subdirectory(eglfs_kms)
+endif()
+if(QT_FEATURE_eglfs_egldevice)
+ add_subdirectory(eglfs_kms_egldevice)
+endif()
+if(QT_FEATURE_eglfs_vsp2)
+ add_subdirectory(eglfs_kms_vsp2)
+endif()
+if(QT_FEATURE_eglfs_brcm)
+ add_subdirectory(eglfs_brcm)
+endif()
+if(QT_FEATURE_eglfs_mali)
+ add_subdirectory(eglfs_mali)
+endif()
+if(QT_FEATURE_eglfs_viv)
+ add_subdirectory(eglfs_viv)
+endif()
+if(QT_FEATURE_eglfs_rcar)
+ add_subdirectory(eglfs_rcar)
+endif()
+if(QT_FEATURE_eglfs_viv_wl)
+ add_subdirectory(eglfs_viv_wl)
+endif()
+if(QT_FEATURE_eglfs_openwfd)
+ add_subdirectory(eglfs_openwfd)
+endif()
+if(QT_FEATURE_opengl)
+ add_subdirectory(eglfs_emu)
+endif()
diff --git a/src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt
new file mode 100644
index 0000000000..7ddcb8993f
--- /dev/null
+++ b/src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from deviceintegration.pro.
+
+if(QT_FEATURE_eglfs_x11)
+ add_subdirectory(eglfs_x11)
+endif()
+if(QT_FEATURE_eglfs_egldevice OR QT_FEATURE_eglfs_gbm)
+ add_subdirectory(eglfs_kms_support)
+endif()
+if(QT_FEATURE_eglfs_gbm)
+ add_subdirectory(eglfs_kms)
+endif()
+if(QT_FEATURE_eglfs_egldevice)
+ add_subdirectory(eglfs_kms_egldevice)
+endif()
+if(QT_FEATURE_eglfs_vsp2)
+ # add_subdirectory(eglfs_kms_vsp2) # special case TODO
+endif()
+if(QT_FEATURE_eglfs_brcm)
+ # add_subdirectory(eglfs_brcm) # special case TODO
+endif()
+if(QT_FEATURE_eglfs_mali)
+ # add_subdirectory(eglfs_mali) # special case TODO
+endif()
+if(QT_FEATURE_eglfs_viv)
+ # add_subdirectory(eglfs_viv) # special case TODO
+endif()
+if(QT_FEATURE_eglfs_rcar)
+ # add_subdirectory(eglfs_rcar) # special case TODO
+endif()
+if(QT_FEATURE_eglfs_viv_wl)
+ # add_subdirectory(eglfs_viv_wl) # special case TODO
+endif()
+if(QT_FEATURE_eglfs_openwfd)
+ # add_subdirectory(eglfs_openwfd) # special case TODO
+endif()
+if(QT_FEATURE_opengl)
+ add_subdirectory(eglfs_emu)
+endif()
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/CMakeLists.txt
new file mode 100644
index 0000000000..a62b8bbb2b
--- /dev/null
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from eglfs_emu.pro.
+
+#####################################################################
+## QEglFSEmulatorIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QEglFSEmulatorIntegrationPlugin
+ OUTPUT_NAME qeglfs-emu-integration
+ TYPE egldeviceintegrations
+ SOURCES
+ qeglfsemulatorintegration.cpp qeglfsemulatorintegration.h
+ qeglfsemulatorscreen.cpp qeglfsemulatorscreen.h
+ qeglfsemumain.cpp
+ DEFINES
+ QT_EGL_NO_X11
+ INCLUDE_DIRECTORIES
+ ../../api
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EglFSDeviceIntegrationPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:eglfs_emu.pro:<TRUE>:
+# DISTFILES = "eglfs_emu.json"
+# OTHER_FILES = "$$PWD/eglfs_emu.json"
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/CMakeLists.txt
new file mode 100644
index 0000000000..55a1d71c07
--- /dev/null
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from eglfs_kms.pro.
+
+#####################################################################
+## QEglFSKmsGbmIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QEglFSKmsGbmIntegrationPlugin
+ OUTPUT_NAME qeglfs-kms-integration
+ TYPE egldeviceintegrations
+ SOURCES
+ qeglfskmsgbmcursor.cpp qeglfskmsgbmcursor.h
+ qeglfskmsgbmdevice.cpp qeglfskmsgbmdevice.h
+ qeglfskmsgbmintegration.cpp qeglfskmsgbmintegration.h
+ qeglfskmsgbmmain.cpp
+ qeglfskmsgbmscreen.cpp qeglfskmsgbmscreen.h
+ qeglfskmsgbmwindow.cpp qeglfskmsgbmwindow.h
+ DEFINES
+ QT_EGL_NO_X11
+ INCLUDE_DIRECTORIES
+ ../../api
+ ../eglfs_kms_support
+ PUBLIC_LIBRARIES
+ Libdrm::Libdrm
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EdidSupportPrivate
+ Qt::EglFSDeviceIntegrationPrivate
+ Qt::EglFsKmsSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::KmsSupportPrivate
+ gbm::gbm
+)
+
+#### Keys ignored in scope 1:.:.:eglfs_kms.pro:<TRUE>:
+# OTHER_FILES = "$$PWD/eglfs_kms.json"
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/CMakeLists.txt
new file mode 100644
index 0000000000..a0b405c90c
--- /dev/null
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from eglfs_kms_egldevice.pro.
+
+#####################################################################
+## QEglFSKmsEglDeviceIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QEglFSKmsEglDeviceIntegrationPlugin
+ OUTPUT_NAME qeglfs-kms-egldevice-integration
+ TYPE egldeviceintegrations
+ SOURCES
+ qeglfskmsegldevice.cpp qeglfskmsegldevice.h
+ qeglfskmsegldeviceintegration.cpp qeglfskmsegldeviceintegration.h
+ qeglfskmsegldevicemain.cpp
+ qeglfskmsegldevicescreen.cpp qeglfskmsegldevicescreen.h
+ DEFINES
+ QT_EGL_NO_X11
+ INCLUDE_DIRECTORIES
+ ../../api
+ ../eglfs_kms_support
+ PUBLIC_LIBRARIES
+ Libdrm::Libdrm
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EdidSupportPrivate
+ Qt::EglFSDeviceIntegrationPrivate
+ Qt::EglFsKmsSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::KmsSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:eglfs_kms_egldevice.pro:<TRUE>:
+# OTHER_FILES = "$$PWD/eglfs_kms_egldevice.json"
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/CMakeLists.txt
new file mode 100644
index 0000000000..abaad3930d
--- /dev/null
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from eglfs_kms_support.pro.
+
+#####################################################################
+## EglFsKmsSupport Module:
+#####################################################################
+
+qt_add_module(EglFsKmsSupport
+ INTERNAL_MODULE
+ NO_MODULE_HEADERS
+ SOURCES
+ qeglfskmsdevice.cpp qeglfskmsdevice.h
+ qeglfskmseventreader.cpp qeglfskmseventreader.h
+ qeglfskmshelpers.h
+ qeglfskmsintegration.cpp qeglfskmsintegration.h
+ qeglfskmsscreen.cpp qeglfskmsscreen.h
+ DEFINES
+ QT_EGL_NO_X11
+ INCLUDE_DIRECTORIES
+ ../../api
+ PUBLIC_LIBRARIES
+ Libdrm::Libdrm
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EdidSupportPrivate
+ Qt::EglFSDeviceIntegrationPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::KmsSupportPrivate
+)
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt
new file mode 100644
index 0000000000..fee448db8a
--- /dev/null
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from eglfs_x11.pro.
+
+#####################################################################
+## QEglFSX11IntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QEglFSX11IntegrationPlugin
+ OUTPUT_NAME qeglfs-x11-integration
+ TYPE egldeviceintegrations
+ SOURCES
+ qeglfsx11integration.cpp qeglfsx11integration.h
+ qeglfsx11main.cpp
+ DEFINES
+ QT_EGL_NO_X11
+ INCLUDE_DIRECTORIES
+ ../../api
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EglFSDeviceIntegrationPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ X11::X11
+ X11::XCB
+ XCB::XCB
+)
+
+#### Keys ignored in scope 1:.:.:eglfs_x11.pro:<TRUE>:
+# OTHER_FILES = "$$PWD/eglfs_x11.json"
diff --git a/src/plugins/platforms/ios/.prev_CMakeLists.txt b/src/plugins/platforms/ios/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..d7ff160ee0
--- /dev/null
+++ b/src/plugins/platforms/ios/.prev_CMakeLists.txt
@@ -0,0 +1,65 @@
+# Generated from ios.pro.
+
+#####################################################################
+## QIOSIntegrationPlugin Plugin:
+#####################################################################
+
+add_qt_plugin(QIOSIntegrationPlugin
+ OUTPUT_NAME qios
+ TYPE platforms
+ SOURCES
+ plugin.mm
+ qiosapplicationdelegate.h qiosapplicationdelegate.mm
+ qiosapplicationstate.h qiosapplicationstate.mm
+ qiosbackingstore.h qiosbackingstore.mm
+ qioscontext.h qioscontext.mm
+ qioseventdispatcher.h qioseventdispatcher.mm
+ qiosglobal.h qiosglobal.mm
+ qiosinputcontext.h qiosinputcontext.mm
+ qiosintegration.h qiosintegration.mm
+ qiosplatformaccessibility.h qiosplatformaccessibility.mm
+ qiosscreen.h qiosscreen.mm
+ qiosservices.h qiosservices.mm
+ qiostextresponder.h qiostextresponder.mm
+ qiostheme.h qiostheme.mm
+ qiosviewcontroller.h qiosviewcontroller.mm
+ qioswindow.h qioswindow.mm
+ quiaccessibilityelement.h quiaccessibilityelement.mm
+ quiview.h quiview.mm
+ PUBLIC_LIBRARIES
+ ${FWAudioToolbox}
+ ${FWFoundation}
+ ${FWQuartzCore}
+ ${FWUIKit}
+ Qt::ClipboardSupportPrivate
+ Qt::CorePrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GraphicsSupportPrivate
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 2:.:.:kernel.pro:<TRUE>:
+# OTHER_FILES = "quiview_textinput.mm" "quiview_accessibility.mm"
+
+## Scopes:
+#####################################################################
+
+extend_target(QIOSIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+extend_target(QIOSIntegrationPlugin CONDITION NOT APPLE_TVOS
+ SOURCES
+ qiosclipboard.h qiosclipboard.mm
+ qiosfiledialog.h qiosfiledialog.mm
+ qiosmenu.h qiosmenu.mm
+ qiosmessagedialog.h qiosmessagedialog.mm
+ qiostextinputoverlay.h qiostextinputoverlay.mm
+ PUBLIC_LIBRARIES
+ ${FWAssetsLibrary}
+)
+
+#### Keys ignored in scope 6:.:.:kernel.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
+add_subdirectory(optional)
diff --git a/src/plugins/platforms/ios/CMakeLists.txt b/src/plugins/platforms/ios/CMakeLists.txt
new file mode 100644
index 0000000000..d7ff160ee0
--- /dev/null
+++ b/src/plugins/platforms/ios/CMakeLists.txt
@@ -0,0 +1,65 @@
+# Generated from ios.pro.
+
+#####################################################################
+## QIOSIntegrationPlugin Plugin:
+#####################################################################
+
+add_qt_plugin(QIOSIntegrationPlugin
+ OUTPUT_NAME qios
+ TYPE platforms
+ SOURCES
+ plugin.mm
+ qiosapplicationdelegate.h qiosapplicationdelegate.mm
+ qiosapplicationstate.h qiosapplicationstate.mm
+ qiosbackingstore.h qiosbackingstore.mm
+ qioscontext.h qioscontext.mm
+ qioseventdispatcher.h qioseventdispatcher.mm
+ qiosglobal.h qiosglobal.mm
+ qiosinputcontext.h qiosinputcontext.mm
+ qiosintegration.h qiosintegration.mm
+ qiosplatformaccessibility.h qiosplatformaccessibility.mm
+ qiosscreen.h qiosscreen.mm
+ qiosservices.h qiosservices.mm
+ qiostextresponder.h qiostextresponder.mm
+ qiostheme.h qiostheme.mm
+ qiosviewcontroller.h qiosviewcontroller.mm
+ qioswindow.h qioswindow.mm
+ quiaccessibilityelement.h quiaccessibilityelement.mm
+ quiview.h quiview.mm
+ PUBLIC_LIBRARIES
+ ${FWAudioToolbox}
+ ${FWFoundation}
+ ${FWQuartzCore}
+ ${FWUIKit}
+ Qt::ClipboardSupportPrivate
+ Qt::CorePrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GraphicsSupportPrivate
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 2:.:.:kernel.pro:<TRUE>:
+# OTHER_FILES = "quiview_textinput.mm" "quiview_accessibility.mm"
+
+## Scopes:
+#####################################################################
+
+extend_target(QIOSIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+extend_target(QIOSIntegrationPlugin CONDITION NOT APPLE_TVOS
+ SOURCES
+ qiosclipboard.h qiosclipboard.mm
+ qiosfiledialog.h qiosfiledialog.mm
+ qiosmenu.h qiosmenu.mm
+ qiosmessagedialog.h qiosmessagedialog.mm
+ qiostextinputoverlay.h qiostextinputoverlay.mm
+ PUBLIC_LIBRARIES
+ ${FWAssetsLibrary}
+)
+
+#### Keys ignored in scope 6:.:.:kernel.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
+add_subdirectory(optional)
diff --git a/src/plugins/platforms/ios/kernel.pro b/src/plugins/platforms/ios/kernel.pro
index 71257d09f7..01e0105223 100644
--- a/src/plugins/platforms/ios/kernel.pro
+++ b/src/plugins/platforms/ios/kernel.pro
@@ -9,6 +9,8 @@ QT += \
core-private gui-private \
clipboard_support-private fontdatabase_support-private graphics_support-private
+qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
+
LIBS += -framework Foundation -framework UIKit -framework QuartzCore -framework AudioToolbox
OBJECTIVE_SOURCES = \
diff --git a/src/plugins/platforms/ios/optional/CMakeLists.txt b/src/plugins/platforms/ios/optional/CMakeLists.txt
new file mode 100644
index 0000000000..3c84e61f26
--- /dev/null
+++ b/src/plugins/platforms/ios/optional/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from optional.pro.
+
+if(APPLE_IOS)
+ add_subdirectory(nsphotolibrarysupport)
+endif()
diff --git a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/CMakeLists.txt b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/CMakeLists.txt
new file mode 100644
index 0000000000..0fbb0fdbd8
--- /dev/null
+++ b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from nsphotolibrarysupport.pro.
+
+#####################################################################
+## QIosOptionalPlugin_NSPhotoLibrary Plugin:
+#####################################################################
+
+add_qt_plugin(QIosOptionalPlugin_NSPhotoLibrary
+ OUTPUT_NAME qiosnsphotolibrarysupport
+ TYPE platforms/darwin
+ SOURCES
+ plugin.mm
+ qiosfileengineassetslibrary.h qiosfileengineassetslibrary.mm
+ qiosfileenginefactory.h
+ qiosimagepickercontroller.h qiosimagepickercontroller.mm
+ PUBLIC_LIBRARIES
+ ${FWAssetsLibrary}
+ ${FWFoundation}
+ ${FWUIKit}
+ Qt::Core
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:nsphotolibrarysupport.pro:<TRUE>:
+# OTHER_FILES = "plugin.json"
+# PLUGIN_EXTENDS = "-"
+
+## Scopes:
+#####################################################################
diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm
index 9eca0eaad3..d724e65717 100644
--- a/src/plugins/platforms/ios/qiosintegration.mm
+++ b/src/plugins/platforms/ios/qiosintegration.mm
@@ -65,6 +65,10 @@
#import <AudioToolbox/AudioServices.h>
+#if QT_CONFIG(opengl)
+#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
+#endif
+
#include <QtDebug>
QT_BEGIN_NAMESPACE
@@ -186,7 +190,11 @@ QPlatformWindow *QIOSIntegration::createPlatformWindow(QWindow *window) const
// Used when the QWindow's surface type is set by the client to QSurface::RasterSurface
QPlatformBackingStore *QIOSIntegration::createPlatformBackingStore(QWindow *window) const
{
- return new QIOSBackingStore(window);
+ auto *backingStore = new QIOSBackingStore(window);
+#if QT_CONFIG(opengl)
+ backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore));
+#endif
+ return backingStore;
}
// Used when the QWindow's surface type is set by the client to QSurface::OpenGLSurface
diff --git a/src/plugins/platforms/linuxfb/.prev_CMakeLists.txt b/src/plugins/platforms/linuxfb/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..bcec98e1de
--- /dev/null
+++ b/src/plugins/platforms/linuxfb/.prev_CMakeLists.txt
@@ -0,0 +1,46 @@
+# Generated from linuxfb.pro.
+
+#####################################################################
+## QLinuxFbIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QLinuxFbIntegrationPlugin
+ OUTPUT_NAME qlinuxfb
+ TYPE platforms
+ SOURCES
+ main.cpp
+ qlinuxfbintegration.cpp qlinuxfbintegration.h
+ qlinuxfbscreen.cpp qlinuxfbscreen.h
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FbSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::ServiceSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:linuxfb.pro:<TRUE>:
+# OTHER_FILES = "linuxfb.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QLinuxFbIntegrationPlugin CONDITION TARGET Qt::InputSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::InputSupportPrivate
+)
+
+qt_extend_target(QLinuxFbIntegrationPlugin CONDITION TARGET Qt::KmsSupportPrivate
+ SOURCES
+ qlinuxfbdrmscreen.cpp qlinuxfbdrmscreen.h
+ PUBLIC_LIBRARIES
+ Qt::KmsSupportPrivate
+)
+
+#### Keys ignored in scope 4:.:.:linuxfb.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/linuxfb/CMakeLists.txt b/src/plugins/platforms/linuxfb/CMakeLists.txt
new file mode 100644
index 0000000000..8747894100
--- /dev/null
+++ b/src/plugins/platforms/linuxfb/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from linuxfb.pro.
+
+#####################################################################
+## QLinuxFbIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QLinuxFbIntegrationPlugin
+ OUTPUT_NAME qlinuxfb
+ TYPE platforms
+ DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES linuxfb # special case
+ SOURCES
+ main.cpp
+ qlinuxfbintegration.cpp qlinuxfbintegration.h
+ qlinuxfbscreen.cpp qlinuxfbscreen.h
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FbSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::ServiceSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:linuxfb.pro:<TRUE>:
+# OTHER_FILES = "linuxfb.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QLinuxFbIntegrationPlugin CONDITION TARGET Qt::InputSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::InputSupportPrivate
+)
+
+qt_extend_target(QLinuxFbIntegrationPlugin CONDITION TARGET Qt::KmsSupportPrivate
+ SOURCES
+ qlinuxfbdrmscreen.cpp qlinuxfbdrmscreen.h
+ PUBLIC_LIBRARIES
+ Qt::KmsSupportPrivate
+)
+
+#### Keys ignored in scope 4:.:.:linuxfb.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/minimal/.prev_CMakeLists.txt b/src/plugins/platforms/minimal/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..764c684932
--- /dev/null
+++ b/src/plugins/platforms/minimal/.prev_CMakeLists.txt
@@ -0,0 +1,37 @@
+# Generated from minimal.pro.
+
+#####################################################################
+## QMinimalIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QMinimalIntegrationPlugin
+ OUTPUT_NAME qminimal
+ TYPE platforms
+ SOURCES
+ main.cpp
+ qminimalbackingstore.cpp qminimalbackingstore.h
+ qminimalintegration.cpp qminimalintegration.h
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:minimal.pro:<TRUE>:
+# OTHER_FILES = "minimal.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QMinimalIntegrationPlugin CONDITION QT_FEATURE_freetype
+ LIBRARIES
+ WrapFreetype::WrapFreetype
+)
+
+#### Keys ignored in scope 3:.:.:minimal.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/minimal/CMakeLists.txt b/src/plugins/platforms/minimal/CMakeLists.txt
new file mode 100644
index 0000000000..623cf5f83a
--- /dev/null
+++ b/src/plugins/platforms/minimal/CMakeLists.txt
@@ -0,0 +1,40 @@
+# Generated from minimal.pro.
+
+#####################################################################
+## QMinimalIntegrationPlugin Plugin:
+#####################################################################
+
+qt_find_package(WrapFreetype PROVIDED_TARGETS WrapFreetype::WrapFreetype) # special case
+
+qt_add_plugin(QMinimalIntegrationPlugin
+ OUTPUT_NAME qminimal
+ TYPE platforms
+ DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES minimal # special case
+ SOURCES
+ main.cpp
+ qminimalbackingstore.cpp qminimalbackingstore.h
+ qminimalintegration.cpp qminimalintegration.h
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:minimal.pro:<TRUE>:
+# OTHER_FILES = "minimal.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QMinimalIntegrationPlugin CONDITION QT_FEATURE_freetype
+ LIBRARIES
+ WrapFreetype::WrapFreetype
+)
+
+#### Keys ignored in scope 3:.:.:minimal.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/minimalegl/.prev_CMakeLists.txt b/src/plugins/platforms/minimalegl/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..7a08af79a9
--- /dev/null
+++ b/src/plugins/platforms/minimalegl/.prev_CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from minimalegl.pro.
+
+#####################################################################
+## QMinimalEglIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QMinimalEglIntegrationPlugin
+ OUTPUT_NAME qminimalegl
+ TYPE platforms
+ SOURCES
+ main.cpp
+ qminimaleglintegration.cpp qminimaleglintegration.h
+ qminimaleglscreen.cpp qminimaleglscreen.h
+ qminimaleglwindow.cpp qminimaleglwindow.h
+ DEFINES
+ QT_EGL_NO_X11
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EglSupportPrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:minimalegl.pro:<TRUE>:
+# OTHER_FILES = "minimalegl.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QMinimalEglIntegrationPlugin CONDITION QT_FEATURE_opengl
+ SOURCES
+ qminimaleglbackingstore.cpp qminimaleglbackingstore.h
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
+
+#### Keys ignored in scope 3:.:.:minimalegl.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/minimalegl/CMakeLists.txt b/src/plugins/platforms/minimalegl/CMakeLists.txt
new file mode 100644
index 0000000000..4c8856e35d
--- /dev/null
+++ b/src/plugins/platforms/minimalegl/CMakeLists.txt
@@ -0,0 +1,42 @@
+# Generated from minimalegl.pro.
+
+#####################################################################
+## QMinimalEglIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QMinimalEglIntegrationPlugin
+ OUTPUT_NAME qminimalegl
+ TYPE platforms
+ DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES minimalegl # special case
+ SOURCES
+ main.cpp
+ qminimaleglintegration.cpp qminimaleglintegration.h
+ qminimaleglscreen.cpp qminimaleglscreen.h
+ qminimaleglwindow.cpp qminimaleglwindow.h
+ DEFINES
+ QT_EGL_NO_X11
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EglSupportPrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:minimalegl.pro:<TRUE>:
+# OTHER_FILES = "minimalegl.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QMinimalEglIntegrationPlugin CONDITION QT_FEATURE_opengl
+ SOURCES
+ qminimaleglbackingstore.cpp qminimaleglbackingstore.h
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
+
+#### Keys ignored in scope 3:.:.:minimalegl.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/minimalegl/minimalegl.pro b/src/plugins/platforms/minimalegl/minimalegl.pro
index b7dde9069f..3f6ae4e248 100644
--- a/src/plugins/platforms/minimalegl/minimalegl.pro
+++ b/src/plugins/platforms/minimalegl/minimalegl.pro
@@ -21,6 +21,7 @@ HEADERS = qminimaleglintegration.h \
qminimaleglscreen.h
qtConfig(opengl) {
+ QT += opengl
SOURCES += qminimaleglbackingstore.cpp
HEADERS += qminimaleglbackingstore.h
}
diff --git a/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp b/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp
index dc8dd74312..2319762f31 100644
--- a/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp
+++ b/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp
@@ -40,7 +40,7 @@
#include "qminimaleglbackingstore.h"
#include <QtGui/QOpenGLContext>
-#include <QtGui/QOpenGLPaintDevice>
+#include <QtOpenGL/QOpenGLPaintDevice>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/offscreen/.prev_CMakeLists.txt b/src/plugins/platforms/offscreen/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..62d36ec449
--- /dev/null
+++ b/src/plugins/platforms/offscreen/.prev_CMakeLists.txt
@@ -0,0 +1,40 @@
+# Generated from offscreen.pro.
+
+#####################################################################
+## QOffscreenIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QOffscreenIntegrationPlugin
+ OUTPUT_NAME qoffscreen
+ TYPE platforms
+ SOURCES
+ main.cpp
+ qoffscreencommon.cpp qoffscreencommon.h
+ qoffscreenintegration.cpp qoffscreenintegration.h
+ qoffscreenwindow.cpp qoffscreenwindow.h
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:offscreen.pro:<TRUE>:
+# OTHER_FILES = "offscreen.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
+ SOURCES
+ qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h
+ PUBLIC_LIBRARIES
+ Qt::GlxSupportPrivate
+)
+
+#### Keys ignored in scope 3:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/offscreen/CMakeLists.txt b/src/plugins/platforms/offscreen/CMakeLists.txt
new file mode 100644
index 0000000000..63474c3760
--- /dev/null
+++ b/src/plugins/platforms/offscreen/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from offscreen.pro.
+
+#####################################################################
+## QOffscreenIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QOffscreenIntegrationPlugin
+ OUTPUT_NAME qoffscreen
+ TYPE platforms
+ DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES offscreen # special case
+ SOURCES
+ main.cpp
+ qoffscreencommon.cpp qoffscreencommon.h
+ qoffscreenintegration.cpp qoffscreenintegration.h
+ qoffscreenwindow.cpp qoffscreenwindow.h
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:offscreen.pro:<TRUE>:
+# OTHER_FILES = "offscreen.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
+ SOURCES
+ qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h
+ PUBLIC_LIBRARIES
+ Qt::GlxSupportPrivate
+)
+
+#### Keys ignored in scope 3:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/vnc/.prev_CMakeLists.txt b/src/plugins/platforms/vnc/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..a26cc0be2b
--- /dev/null
+++ b/src/plugins/platforms/vnc/.prev_CMakeLists.txt
@@ -0,0 +1,43 @@
+# Generated from vnc.pro.
+
+#####################################################################
+## QVncIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QVncIntegrationPlugin
+ OUTPUT_NAME qvnc
+ TYPE platforms
+ SOURCES
+ main.cpp
+ qvnc.cpp qvnc_p.h
+ qvncclient.cpp qvncclient.h
+ qvncintegration.cpp qvncintegration.h
+ qvncscreen.cpp qvncscreen.h
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FbSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Network
+ Qt::ServiceSupportPrivate
+ Qt::ThemeSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:vnc.pro:<TRUE>:
+# OTHER_FILES = "vnc.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QVncIntegrationPlugin CONDITION TARGET Qt::InputSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::InputSupportPrivate
+)
+
+#### Keys ignored in scope 3:.:.:vnc.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/vnc/CMakeLists.txt b/src/plugins/platforms/vnc/CMakeLists.txt
new file mode 100644
index 0000000000..cb84355d81
--- /dev/null
+++ b/src/plugins/platforms/vnc/CMakeLists.txt
@@ -0,0 +1,44 @@
+# Generated from vnc.pro.
+
+#####################################################################
+## QVncIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QVncIntegrationPlugin
+ OUTPUT_NAME qvnc
+ TYPE platforms
+ DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES vnc # special case
+ SOURCES
+ main.cpp
+ qvnc.cpp qvnc_p.h
+ qvncclient.cpp qvncclient.h
+ qvncintegration.cpp qvncintegration.h
+ qvncscreen.cpp qvncscreen.h
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FbSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Network
+ Qt::ServiceSupportPrivate
+ Qt::ThemeSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:vnc.pro:<TRUE>:
+# OTHER_FILES = "vnc.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QVncIntegrationPlugin CONDITION TARGET Qt::InputSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::InputSupportPrivate
+)
+
+#### Keys ignored in scope 3:.:.:vnc.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/vnc/qvnc.cpp b/src/plugins/platforms/vnc/qvnc.cpp
index 8390fa19cd..aea8d26983 100644
--- a/src/plugins/platforms/vnc/qvnc.cpp
+++ b/src/plugins/platforms/vnc/qvnc.cpp
@@ -502,7 +502,7 @@ void QRfbRawEncoder::write()
const quint32 encoding = htonl(0); // raw encoding
socket->write((char *)&encoding, sizeof(encoding));
- int linestep = screenImage.bytesPerLine();
+ qsizetype linestep = screenImage.bytesPerLine();
const uchar *screendata = screenImage.scanLine(rect.y)
+ rect.x * screenImage.depth() / 8;
diff --git a/src/plugins/platforms/wasm/qwasmbackingstore.cpp b/src/plugins/platforms/wasm/qwasmbackingstore.cpp
index 7e8a382512..a7423e9c47 100644
--- a/src/plugins/platforms/wasm/qwasmbackingstore.cpp
+++ b/src/plugins/platforms/wasm/qwasmbackingstore.cpp
@@ -31,7 +31,7 @@
#include "qwasmwindow.h"
#include "qwasmcompositor.h"
-#include <QtGui/qopengltexture.h>
+#include <QtOpenGL/qopengltexture.h>
#include <QtGui/qmatrix4x4.h>
#include <QtGui/qpainter.h>
#include <private/qguiapplication_p.h>
diff --git a/src/plugins/platforms/wasm/qwasmcompositor.cpp b/src/plugins/platforms/wasm/qwasmcompositor.cpp
index e9c4559971..74890ead82 100644
--- a/src/plugins/platforms/wasm/qwasmcompositor.cpp
+++ b/src/plugins/platforms/wasm/qwasmcompositor.cpp
@@ -31,12 +31,11 @@
#include "qwasmwindow.h"
#include "qwasmstylepixmaps_p.h"
-#include <QtGui/qopengltexture.h>
+#include <QtOpenGL/qopengltexture.h>
#include <QtGui/private/qwindow_p.h>
#include <QtGui/qopenglcontext.h>
#include <QtGui/qopenglfunctions.h>
-#include <QtGui/qopengltextureblitter.h>
#include <QtGui/qoffscreensurface.h>
#include <QtGui/qpainter.h>
#include <private/qpixmapcache_p.h>
diff --git a/src/plugins/platforms/wasm/qwasmcompositor.h b/src/plugins/platforms/wasm/qwasmcompositor.h
index 98f4a79b27..250d244c9f 100644
--- a/src/plugins/platforms/wasm/qwasmcompositor.h
+++ b/src/plugins/platforms/wasm/qwasmcompositor.h
@@ -33,8 +33,7 @@
#include <QtGui/qregion.h>
#include <qpa/qplatformwindow.h>
-#include <QtGui/qopengltextureblitter.h>
-#include <QtGui/qopengltexture.h>
+#include <QtOpenGL/qopengltextureblitter.h>
#include <QtGui/qpalette.h>
#include <QtGui/qpainter.h>
@@ -43,7 +42,7 @@ QT_BEGIN_NAMESPACE
class QWasmWindow;
class QWasmScreen;
class QOpenGLContext;
-class QOpenGLTextureBlitter;
+class QOpenGLTexture;
class QWasmCompositedWindow
{
diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp
index 45bc49e382..d1901d840e 100644
--- a/src/plugins/platforms/wasm/qwasmintegration.cpp
+++ b/src/plugins/platforms/wasm/qwasmintegration.cpp
@@ -41,6 +41,7 @@
#include "qwasmwindow.h"
#ifndef QT_NO_OPENGL
# include "qwasmbackingstore.h"
+# include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
#endif
#include "qwasmfontdatabase.h"
#if defined(Q_OS_UNIX)
@@ -180,6 +181,7 @@ QPlatformBackingStore *QWasmIntegration::createPlatformBackingStore(QWindow *win
#ifndef QT_NO_OPENGL
QWasmCompositor *compositor = QWasmScreen::get(window->screen())->compositor();
QWasmBackingStore *backingStore = new QWasmBackingStore(compositor, window);
+ backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore));
m_backingStores.insert(window, backingStore);
return backingStore;
#else
diff --git a/src/plugins/platforms/wasm/wasm.pro b/src/plugins/platforms/wasm/wasm.pro
index a12ae06833..1aee4a3e58 100644
--- a/src/plugins/platforms/wasm/wasm.pro
+++ b/src/plugins/platforms/wasm/wasm.pro
@@ -4,6 +4,8 @@ QT += \
core-private gui-private \
eventdispatcher_support-private fontdatabase_support-private egl_support-private
+qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
+
# Avoid X11 header collision, use generic EGL native types
DEFINES += QT_EGL_NO_X11
@@ -52,6 +54,7 @@ wasmfonts.base = ../../../3rdparty/wasm
RESOURCES += wasmfonts
qtConfig(opengl) {
+ QT += opengl
SOURCES += qwasmbackingstore.cpp
HEADERS += qwasmbackingstore.h
}
diff --git a/src/plugins/platforms/windows/.prev_CMakeLists.txt b/src/plugins/platforms/windows/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..92b2ccb217
--- /dev/null
+++ b/src/plugins/platforms/windows/.prev_CMakeLists.txt
@@ -0,0 +1,246 @@
+# Generated from windows.pro.
+
+#####################################################################
+## QWindowsIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QWindowsIntegrationPlugin
+ OUTPUT_NAME qwindows
+ TYPE platforms
+ SOURCES
+ main.cpp
+ qtwindowsglobal.h
+ qwin10helpers.cpp qwin10helpers.h
+ qwindowsbackingstore.cpp qwindowsbackingstore.h
+ qwindowscombase.h
+ qwindowscontext.cpp qwindowscontext.h
+ qwindowscursor.cpp qwindowscursor.h
+ qwindowsdialoghelpers.cpp qwindowsdialoghelpers.h
+ qwindowsdropdataobject.cpp qwindowsdropdataobject.h
+ qwindowsgdiintegration.cpp qwindowsgdiintegration.h
+ qwindowsgdinativeinterface.cpp qwindowsgdinativeinterface.h
+ qwindowsinputcontext.cpp qwindowsinputcontext.h
+ qwindowsintegration.cpp qwindowsintegration.h
+ qwindowsinternalmimedata.cpp qwindowsinternalmimedata.h
+ qwindowskeymapper.cpp qwindowskeymapper.h
+ qwindowsmenu.cpp qwindowsmenu.h
+ qwindowsmime.cpp qwindowsmime.h
+ qwindowsmousehandler.cpp qwindowsmousehandler.h
+ qwindowsnativeinterface.cpp qwindowsnativeinterface.h
+ qwindowsole.cpp qwindowsole.h
+ qwindowsopengltester.cpp qwindowsopengltester.h
+ qwindowspointerhandler.cpp qwindowspointerhandler.h
+ qwindowsscreen.cpp qwindowsscreen.h
+ qwindowsservices.cpp qwindowsservices.h
+ qwindowstheme.cpp qwindowstheme.h
+ qwindowsthreadpoolrunner.h
+ qwindowswindow.cpp qwindowswindow.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ LIBRARIES
+ advapi32
+ d3d9
+ gdi32
+ ole32
+ shell32
+ user32
+ winmm
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
+ dwmapi
+ imm32
+ oleaut32
+ shlwapi
+ winspool
+ wtsapi32
+)
+
+# Resources:
+set_source_files_properties("openglblacklists/default.json"
+ PROPERTIES QT_RESOURCE_ALIAS "default.json"
+)
+set(openglblacklists_resource_files
+ "openglblacklists/default.json"
+)
+
+qt_add_resource(QWindowsIntegrationPlugin "openglblacklists"
+ PREFIX
+ "/qt-project.org/windows/openglblacklists"
+ FILES
+ ${openglblacklists_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:windows.pro:<TRUE>:
+# OTHER_FILES = "windows.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility
+ SOURCES
+ uiautomation/qwindowsuiaaccessibility.cpp uiautomation/qwindowsuiaaccessibility.h
+ uiautomation/qwindowsuiabaseprovider.cpp uiautomation/qwindowsuiabaseprovider.h
+ uiautomation/qwindowsuiaexpandcollapseprovider.cpp uiautomation/qwindowsuiaexpandcollapseprovider.h
+ uiautomation/qwindowsuiagriditemprovider.cpp uiautomation/qwindowsuiagriditemprovider.h
+ uiautomation/qwindowsuiagridprovider.cpp uiautomation/qwindowsuiagridprovider.h
+ uiautomation/qwindowsuiainvokeprovider.cpp uiautomation/qwindowsuiainvokeprovider.h
+ uiautomation/qwindowsuiamainprovider.cpp uiautomation/qwindowsuiamainprovider.h
+ uiautomation/qwindowsuiaprovidercache.cpp uiautomation/qwindowsuiaprovidercache.h
+ uiautomation/qwindowsuiarangevalueprovider.cpp uiautomation/qwindowsuiarangevalueprovider.h
+ uiautomation/qwindowsuiaselectionitemprovider.cpp uiautomation/qwindowsuiaselectionitemprovider.h
+ uiautomation/qwindowsuiaselectionprovider.cpp uiautomation/qwindowsuiaselectionprovider.h
+ uiautomation/qwindowsuiatableitemprovider.cpp uiautomation/qwindowsuiatableitemprovider.h
+ uiautomation/qwindowsuiatableprovider.cpp uiautomation/qwindowsuiatableprovider.h
+ uiautomation/qwindowsuiatextprovider.cpp uiautomation/qwindowsuiatextprovider.h
+ uiautomation/qwindowsuiatextrangeprovider.cpp uiautomation/qwindowsuiatextrangeprovider.h
+ uiautomation/qwindowsuiatoggleprovider.cpp uiautomation/qwindowsuiatoggleprovider.h
+ uiautomation/qwindowsuiautils.cpp uiautomation/qwindowsuiautils.h
+ uiautomation/qwindowsuiavalueprovider.cpp uiautomation/qwindowsuiavalueprovider.h
+ uiautomation/qwindowsuiawindowprovider.cpp uiautomation/qwindowsuiawindowprovider.h
+ PUBLIC_LIBRARIES
+ Qt::AccessibilitySupportPrivate
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_vulkan
+ SOURCES
+ qwindowsvulkaninstance.cpp qwindowsvulkaninstance.h
+ PUBLIC_LIBRARIES
+ Qt::VulkanSupportPrivate
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_directwrite3
+ DEFINES
+ QT_USE_DIRECTWRITE2
+ QT_USE_DIRECTWRITE3
+)
+
+#### Keys ignored in scope 6:.:.:windows.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengl AND NOT QT_FEATURE_dynamicgl AND NOT QT_FEATURE_opengles2
+ PUBLIC_LIBRARIES
+ opengl32
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION mingw
+ PUBLIC_LIBRARIES
+ uuid
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengl
+ SOURCES
+ qwindowsopenglcontext.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengles2
+ SOURCES
+ qwindowseglcontext.cpp qwindowseglcontext.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2
+ SOURCES
+ qwindowsglcontext.cpp qwindowsglcontext.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_dynamicgl
+ SOURCES
+ qwindowseglcontext.cpp qwindowseglcontext.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_systemtrayicon
+ SOURCES
+ qwindowssystemtrayicon.cpp qwindowssystemtrayicon.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_clipboard
+ SOURCES
+ qwindowsclipboard.cpp qwindowsclipboard.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_clipboard AND QT_FEATURE_draganddrop
+ SOURCES
+ qwindowsdrag.cpp qwindowsdrag.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_tabletevent
+ SOURCES
+ qwindowstabletsupport.cpp qwindowstabletsupport.h
+ INCLUDE_DIRECTORIES
+ ${QT_SOURCE_TREE}/src/3rdparty/wintab
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_sessionmanager
+ SOURCES
+ qwindowssessionmanager.cpp qwindowssessionmanager.h
+)
+
+if(QT_FEATURE_imageformat_png)
+ # Resources:
+ set(cursors_resource_files
+ "images/closedhandcursor_32.png"
+ "images/closedhandcursor_48.png"
+ "images/closedhandcursor_64.png"
+ "images/dragcopycursor_32.png"
+ "images/dragcopycursor_48.png"
+ "images/dragcopycursor_64.png"
+ "images/draglinkcursor_32.png"
+ "images/draglinkcursor_48.png"
+ "images/draglinkcursor_64.png"
+ "images/dragmovecursor_32.png"
+ "images/dragmovecursor_48.png"
+ "images/dragmovecursor_64.png"
+ "images/openhandcursor_32.png"
+ "images/openhandcursor_48.png"
+ "images/openhandcursor_64.png"
+ "images/splithcursor_32.png"
+ "images/splithcursor_48.png"
+ "images/splithcursor_64.png"
+ "images/splitvcursor_32.png"
+ "images/splitvcursor_48.png"
+ "images/splitvcursor_64.png"
+ )
+
+ qt_add_resource(QWindowsIntegrationPlugin "cursors"
+ PREFIX
+ "/qt-project.org/windows/cursors"
+ FILES
+ ${cursors_resource_files}
+ )
+endif()
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility AND TARGET Qt::WindowsUIAutomationSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::WindowsUIAutomationSupportPrivate
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility AND mingw
+ PUBLIC_LIBRARIES
+ uuid
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_combined_angle_lib
+ DEFINES
+ LIBEGL_NAME=
+ LIBGLESV2_NAME=
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION NOT QT_FEATURE_combined_angle_lib
+ DEFINES
+ LIBEGL_NAME=
+ LIBGLESV2_NAME=
+)
diff --git a/src/plugins/platforms/windows/CMakeLists.txt b/src/plugins/platforms/windows/CMakeLists.txt
new file mode 100644
index 0000000000..4cb9608378
--- /dev/null
+++ b/src/plugins/platforms/windows/CMakeLists.txt
@@ -0,0 +1,240 @@
+# Generated from windows.pro.
+
+#####################################################################
+## QWindowsIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QWindowsIntegrationPlugin
+ OUTPUT_NAME qwindows
+ TYPE platforms
+ DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES windows # special case
+ SOURCES
+ main.cpp
+ qtwindowsglobal.h
+ qwin10helpers.cpp qwin10helpers.h
+ qwindowsbackingstore.cpp qwindowsbackingstore.h
+ qwindowscombase.h
+ qwindowscontext.cpp qwindowscontext.h
+ qwindowscursor.cpp qwindowscursor.h
+ qwindowsdialoghelpers.cpp qwindowsdialoghelpers.h
+ qwindowsdropdataobject.cpp qwindowsdropdataobject.h
+ qwindowsgdiintegration.cpp qwindowsgdiintegration.h
+ qwindowsgdinativeinterface.cpp qwindowsgdinativeinterface.h
+ qwindowsinputcontext.cpp qwindowsinputcontext.h
+ qwindowsintegration.cpp qwindowsintegration.h
+ qwindowsinternalmimedata.cpp qwindowsinternalmimedata.h
+ qwindowskeymapper.cpp qwindowskeymapper.h
+ qwindowsmenu.cpp qwindowsmenu.h
+ qwindowsmime.cpp qwindowsmime.h
+ qwindowsmousehandler.cpp qwindowsmousehandler.h
+ qwindowsnativeinterface.cpp qwindowsnativeinterface.h
+ qwindowsole.cpp qwindowsole.h
+ qwindowsopengltester.cpp qwindowsopengltester.h
+ qwindowspointerhandler.cpp qwindowspointerhandler.h
+ qwindowsscreen.cpp qwindowsscreen.h
+ qwindowsservices.cpp qwindowsservices.h
+ qwindowstheme.cpp qwindowstheme.h
+ qwindowsthreadpoolrunner.h
+ qwindowswindow.cpp qwindowswindow.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ LIBRARIES
+ advapi32
+ d3d9
+ gdi32
+ ole32
+ shell32
+ user32
+ winmm
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
+ dwmapi
+ imm32
+ oleaut32
+ shlwapi
+ winspool
+ wtsapi32
+)
+
+# Resources:
+set_source_files_properties("openglblacklists/default.json"
+ PROPERTIES QT_RESOURCE_ALIAS "default.json"
+)
+set(openglblacklists_resource_files
+ "openglblacklists/default.json"
+)
+
+qt_add_resource(QWindowsIntegrationPlugin "openglblacklists"
+ PREFIX
+ "/qt-project.org/windows/openglblacklists"
+ FILES
+ ${openglblacklists_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:windows.pro:<TRUE>:
+# OTHER_FILES = "windows.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility
+ SOURCES
+ uiautomation/qwindowsuiaaccessibility.cpp uiautomation/qwindowsuiaaccessibility.h
+ uiautomation/qwindowsuiabaseprovider.cpp uiautomation/qwindowsuiabaseprovider.h
+ uiautomation/qwindowsuiaexpandcollapseprovider.cpp uiautomation/qwindowsuiaexpandcollapseprovider.h
+ uiautomation/qwindowsuiagriditemprovider.cpp uiautomation/qwindowsuiagriditemprovider.h
+ uiautomation/qwindowsuiagridprovider.cpp uiautomation/qwindowsuiagridprovider.h
+ uiautomation/qwindowsuiainvokeprovider.cpp uiautomation/qwindowsuiainvokeprovider.h
+ uiautomation/qwindowsuiamainprovider.cpp uiautomation/qwindowsuiamainprovider.h
+ uiautomation/qwindowsuiaprovidercache.cpp uiautomation/qwindowsuiaprovidercache.h
+ uiautomation/qwindowsuiarangevalueprovider.cpp uiautomation/qwindowsuiarangevalueprovider.h
+ uiautomation/qwindowsuiaselectionitemprovider.cpp uiautomation/qwindowsuiaselectionitemprovider.h
+ uiautomation/qwindowsuiaselectionprovider.cpp uiautomation/qwindowsuiaselectionprovider.h
+ uiautomation/qwindowsuiatableitemprovider.cpp uiautomation/qwindowsuiatableitemprovider.h
+ uiautomation/qwindowsuiatableprovider.cpp uiautomation/qwindowsuiatableprovider.h
+ uiautomation/qwindowsuiatextprovider.cpp uiautomation/qwindowsuiatextprovider.h
+ uiautomation/qwindowsuiatextrangeprovider.cpp uiautomation/qwindowsuiatextrangeprovider.h
+ uiautomation/qwindowsuiatoggleprovider.cpp uiautomation/qwindowsuiatoggleprovider.h
+ uiautomation/qwindowsuiautils.cpp uiautomation/qwindowsuiautils.h
+ uiautomation/qwindowsuiavalueprovider.cpp uiautomation/qwindowsuiavalueprovider.h
+ uiautomation/qwindowsuiawindowprovider.cpp uiautomation/qwindowsuiawindowprovider.h
+ PUBLIC_LIBRARIES
+ Qt::AccessibilitySupportPrivate
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_vulkan
+ SOURCES
+ qwindowsvulkaninstance.cpp qwindowsvulkaninstance.h
+ PUBLIC_LIBRARIES
+ Qt::VulkanSupportPrivate
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_directwrite3
+ DEFINES
+ QT_USE_DIRECTWRITE2
+ QT_USE_DIRECTWRITE3
+)
+
+#### Keys ignored in scope 6:.:.:windows.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengl AND NOT QT_FEATURE_dynamicgl AND NOT QT_FEATURE_opengles2
+ PUBLIC_LIBRARIES
+ opengl32
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION mingw
+ PUBLIC_LIBRARIES
+ uuid
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengl
+ SOURCES
+ qwindowsopenglcontext.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengles2
+ SOURCES
+ qwindowseglcontext.cpp qwindowseglcontext.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2
+ SOURCES
+ qwindowsglcontext.cpp qwindowsglcontext.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_dynamicgl
+ SOURCES
+ qwindowseglcontext.cpp qwindowseglcontext.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_systemtrayicon
+ SOURCES
+ qwindowssystemtrayicon.cpp qwindowssystemtrayicon.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_clipboard
+ SOURCES
+ qwindowsclipboard.cpp qwindowsclipboard.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_clipboard AND QT_FEATURE_draganddrop
+ SOURCES
+ qwindowsdrag.cpp qwindowsdrag.h
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_tabletevent
+ SOURCES
+ qwindowstabletsupport.cpp qwindowstabletsupport.h
+ INCLUDE_DIRECTORIES
+ ${QT_SOURCE_TREE}/src/3rdparty/wintab
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_sessionmanager
+ SOURCES
+ qwindowssessionmanager.cpp qwindowssessionmanager.h
+)
+
+if(QT_FEATURE_imageformat_png)
+ # Resources:
+ set(cursors_resource_files
+ "images/closedhandcursor_32.png"
+ "images/closedhandcursor_48.png"
+ "images/closedhandcursor_64.png"
+ "images/dragcopycursor_32.png"
+ "images/dragcopycursor_48.png"
+ "images/dragcopycursor_64.png"
+ "images/draglinkcursor_32.png"
+ "images/draglinkcursor_48.png"
+ "images/draglinkcursor_64.png"
+ "images/dragmovecursor_32.png"
+ "images/dragmovecursor_48.png"
+ "images/dragmovecursor_64.png"
+ "images/openhandcursor_32.png"
+ "images/openhandcursor_48.png"
+ "images/openhandcursor_64.png"
+ "images/splithcursor_32.png"
+ "images/splithcursor_48.png"
+ "images/splithcursor_64.png"
+ "images/splitvcursor_32.png"
+ "images/splitvcursor_48.png"
+ "images/splitvcursor_64.png"
+ )
+
+ qt_add_resource(QWindowsIntegrationPlugin "cursors"
+ PREFIX
+ "/qt-project.org/windows/cursors"
+ FILES
+ ${cursors_resource_files}
+ )
+endif()
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility AND TARGET Qt::WindowsUIAutomationSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::WindowsUIAutomationSupportPrivate
+)
+
+qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility AND mingw
+ PUBLIC_LIBRARIES
+ uuid
+)
+
+# special case:
+# qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_combined_angle_lib ...
+# qt_extend_target(QWindowsIntegrationPlugin CONDITION NOT QT_FEATURE_combined_angle_lib ...
+
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index 2591966d54..438a0fbaa4 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -1001,7 +1001,7 @@ QByteArray QWindowsContext::comErrorString(HRESULT hr)
}
_com_error error(hr);
result += QByteArrayLiteral(" (");
- result += errorMessageFromComError(error);
+ result += errorMessageFromComError(error).toUtf8();
result += ')';
return result;
}
diff --git a/src/plugins/platforms/windows/qwindowsgdiintegration.cpp b/src/plugins/platforms/windows/qwindowsgdiintegration.cpp
index c88f669eb5..7e9595321a 100644
--- a/src/plugins/platforms/windows/qwindowsgdiintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsgdiintegration.cpp
@@ -45,6 +45,10 @@
#include <QtCore/qdebug.h>
#include <QtGui/private/qpixmap_raster_p.h>
+#if QT_CONFIG(opengl)
+#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
+#endif
+
QT_BEGIN_NAMESPACE
class QWindowsGdiIntegrationPrivate
@@ -73,7 +77,11 @@ QPlatformPixmap *QWindowsGdiIntegration::createPlatformPixmap(QPlatformPixmap::P
QPlatformBackingStore *QWindowsGdiIntegration::createPlatformBackingStore(QWindow *window) const
{
- return new QWindowsBackingStore(window);
+ auto *backingStore = new QWindowsBackingStore(window);
+#ifndef QT_NO_OPENGL
+ backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore));
+#endif
+ return backingStore;
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index f5d0a8780a..7431f52e8a 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -329,7 +329,7 @@ static inline bool
static void describeFormats(HDC hdc)
{
const int pfiMax = QOpenGLStaticContext::opengl32.describePixelFormat(hdc, 0, 0, nullptr);
- for (int i = 0; i < pfiMax; i++) {
+ for (int i = 1; i <= pfiMax; i++) {
PIXELFORMATDESCRIPTOR pfd;
initPixelFormatDescriptor(&pfd);
QOpenGLStaticContext::opengl32.describePixelFormat(hdc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 4b4047ac0c..77340387d8 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -48,6 +48,9 @@
#include "qwindowsscreen.h"
#include "qwindowstheme.h"
#include "qwindowsservices.h"
+#ifdef QT_USE_DIRECTWRITE3
+#include <QtFontDatabaseSupport/private/qwindowsdirectwritefontdatabase_p.h>
+#endif
#ifndef QT_NO_FREETYPE
# include <QtFontDatabaseSupport/private/qwindowsfontdatabase_ft_p.h>
#endif
@@ -187,7 +190,9 @@ static inline unsigned parseOptions(const QStringList &paramList,
unsigned options = 0;
for (const QString &param : paramList) {
if (param.startsWith(u"fontengine=")) {
- if (param.endsWith(u"freetype")) {
+ if (param.endsWith(u"directwrite")) {
+ options |= QWindowsIntegration::FontDatabaseDirectWrite;
+ } else if (param.endsWith(u"freetype")) {
options |= QWindowsIntegration::FontDatabaseFreeType;
} else if (param.endsWith(u"native")) {
options |= QWindowsIntegration::FontDatabaseNative;
@@ -504,14 +509,17 @@ QWindowsStaticOpenGLContext *QWindowsIntegration::staticOpenGLContext()
QPlatformFontDatabase *QWindowsIntegration::fontDatabase() const
{
if (!d->m_fontDatabase) {
-#ifdef QT_NO_FREETYPE
- d->m_fontDatabase = new QWindowsFontDatabase();
-#else // QT_NO_FREETYPE
+#ifdef QT_USE_DIRECTWRITE3
+ if (d->m_options & QWindowsIntegration::FontDatabaseDirectWrite)
+ d->m_fontDatabase = new QWindowsDirectWriteFontDatabase;
+ else
+#endif
+#ifndef QT_NO_FREETYPE
if (d->m_options & QWindowsIntegration::FontDatabaseFreeType)
d->m_fontDatabase = new QWindowsFontDatabaseFT;
else
- d->m_fontDatabase = new QWindowsFontDatabase;
#endif // QT_NO_FREETYPE
+ d->m_fontDatabase = new QWindowsFontDatabase();
}
return d->m_fontDatabase;
}
diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h
index 1f16d13769..165472ad40 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.h
+++ b/src/plugins/platforms/windows/qwindowsintegration.h
@@ -72,7 +72,8 @@ public:
DetectAltGrModifier = 0x800,
RtlEnabled = 0x1000,
DarkModeWindowFrames = 0x2000,
- DarkModeStyle = 0x4000
+ DarkModeStyle = 0x4000,
+ FontDatabaseDirectWrite = 0x8000
};
explicit QWindowsIntegration(const QStringList &paramList);
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index fe9e1fe31f..9bc79a10f9 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -149,7 +149,10 @@ static bool qt_write_dibv5(QDataStream &s, QImage image)
return false;
//depth will be always 32
- int bpl_bmp = image.width()*4;
+ qsizetype bpl_bmp = qsizetype(image.width()) * 4;
+ qsizetype size = bpl_bmp * image.height();
+ if (qsizetype(DWORD(size)) != size)
+ return false;
BMP_BITMAPV5HEADER bi;
ZeroMemory(&bi, sizeof(bi));
@@ -261,11 +264,11 @@ static bool qt_read_dibv5(QDataStream &s, QImage &image)
const int blue_shift = calc_shift(blue_mask);
const int alpha_shift = alpha_mask ? calc_shift(alpha_mask) : 0u;
- const int bpl = image.bytesPerLine();
+ const qsizetype bpl = image.bytesPerLine();
uchar *data = image.bits();
auto *buf24 = new uchar[bpl];
- const int bpl24 = ((w * nbits + 31) / 32) * 4;
+ const qsizetype bpl24 = ((qsizetype(w) * nbits + 31) / 32) * 4;
while (--h >= 0) {
QRgb *p = reinterpret_cast<QRgb *>(data + h * bpl);
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 21b736f62e..e635463951 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -269,7 +269,7 @@ QDebug operator<<(QDebug d, const GUID &guid)
static void formatBriefRectangle(QDebug &d, const QRect &r)
{
- d << r.width() << 'x' << r.height() << forcesign << r.x() << r.y() << noforcesign;
+ d << r.width() << 'x' << r.height() << Qt::forcesign << r.x() << r.y() << Qt::noforcesign;
}
static void formatBriefMargins(QDebug &d, const QMargins &m)
@@ -929,7 +929,7 @@ QMargins QWindowsGeometryHint::frameOnPrimaryScreen(DWORD style, DWORD exStyle)
const QMargins result(qAbs(rect.left), qAbs(rect.top),
qAbs(rect.right), qAbs(rect.bottom));
qCDebug(lcQpaWindows).nospace() << __FUNCTION__ << " style="
- << showbase << hex << style << " exStyle=" << exStyle << dec << noshowbase
+ << Qt::showbase << Qt::hex << style << " exStyle=" << exStyle << Qt::dec << Qt::noshowbase
<< ' ' << rect << ' ' << result;
return result;
}
diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro
index 50a3bb41a9..b14969cc3a 100644
--- a/src/plugins/platforms/windows/windows.pro
+++ b/src/plugins/platforms/windows/windows.pro
@@ -5,9 +5,13 @@ QT += \
eventdispatcher_support-private \
fontdatabase_support-private theme_support-private
+qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
+
qtConfig(accessibility): QT += accessibility_support-private
qtConfig(vulkan): QT += vulkan_support-private
+qtConfig(directwrite3): DEFINES *= QT_USE_DIRECTWRITE2 QT_USE_DIRECTWRITE3
+
LIBS += -ldwmapi
QMAKE_USE_PRIVATE += gdi32
diff --git a/src/plugins/platforms/winrt/qwinrtintegration.cpp b/src/plugins/platforms/winrt/qwinrtintegration.cpp
index 27d3746933..dd8cd80fd9 100644
--- a/src/plugins/platforms/winrt/qwinrtintegration.cpp
+++ b/src/plugins/platforms/winrt/qwinrtintegration.cpp
@@ -53,6 +53,9 @@
#if QT_CONFIG(accessibility)
# include "uiautomation/qwinrtuiaaccessibility.h"
#endif
+#if QT_CONFIG(opengl)
+#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
+#endif
#include <QtGui/QOffscreenSurface>
#include <QtGui/QOpenGLContext>
@@ -205,7 +208,11 @@ QPlatformWindow *QWinRTIntegration::createPlatformWindow(QWindow *window) const
QPlatformBackingStore *QWinRTIntegration::createPlatformBackingStore(QWindow *window) const
{
- return new QWinRTBackingStore(window);
+ auto *backingStore = new QWinRTBackingStore(window);
+#if QT_CONFIG(opengl)
+ backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore));
+#endif
+ return backingStore;
}
QPlatformOpenGLContext *QWinRTIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
diff --git a/src/plugins/platforms/winrt/winrt.pro b/src/plugins/platforms/winrt/winrt.pro
index 43dc8f074c..7ac49f73c4 100644
--- a/src/plugins/platforms/winrt/winrt.pro
+++ b/src/plugins/platforms/winrt/winrt.pro
@@ -6,6 +6,8 @@ QT += \
core-private gui-private \
fontdatabase_support-private egl_support-private
+qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
+
DEFINES *= QT_NO_CAST_FROM_ASCII __WRL_NO_DEFAULT_LIB__
QMAKE_USE_PRIVATE += d3d11 ws2_32
diff --git a/src/plugins/platforms/xcb/.prev_CMakeLists.txt b/src/plugins/platforms/xcb/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..85290fae84
--- /dev/null
+++ b/src/plugins/platforms/xcb/.prev_CMakeLists.txt
@@ -0,0 +1,167 @@
+# Generated from xcb.pro.
+
+#####################################################################
+## XcbQpa Module:
+#####################################################################
+
+qt_add_module(XcbQpa
+ INTERNAL_MODULE
+ NO_MODULE_HEADERS
+ SOURCES
+ gl_integrations/qxcbglintegration.cpp gl_integrations/qxcbglintegration.h
+ gl_integrations/qxcbglintegrationfactory.cpp gl_integrations/qxcbglintegrationfactory.h
+ gl_integrations/qxcbglintegrationplugin.h
+ gl_integrations/qxcbnativeinterfacehandler.cpp gl_integrations/qxcbnativeinterfacehandler.h
+ qxcbatom.cpp qxcbatom.h
+ qxcbbackingstore.cpp qxcbbackingstore.h
+ qxcbclipboard.cpp qxcbclipboard.h
+ qxcbconnection.cpp qxcbconnection.h
+ qxcbconnection_basic.cpp qxcbconnection_basic.h
+ qxcbconnection_screens.cpp
+ qxcbconnection_xi2.cpp
+ qxcbcursor.cpp qxcbcursor.h
+ qxcbeventdispatcher.cpp qxcbeventdispatcher.h
+ qxcbeventqueue.cpp qxcbeventqueue.h
+ qxcbimage.cpp qxcbimage.h
+ qxcbintegration.cpp qxcbintegration.h
+ qxcbkeyboard.cpp qxcbkeyboard.h
+ qxcbmime.cpp qxcbmime.h
+ qxcbnativeinterface.cpp qxcbnativeinterface.h
+ qxcbobject.h
+ qxcbscreen.cpp qxcbscreen.h
+ qxcbsystemtraytracker.cpp qxcbsystemtraytracker.h
+ qxcbwindow.cpp qxcbwindow.h
+ qxcbwmsupport.cpp qxcbwmsupport.h
+ qxcbxsettings.cpp qxcbxsettings.h
+ DEFINES
+ QT_BUILD_XCB_PLUGIN
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ gl_integrations
+ PUBLIC_LIBRARIES
+ PkgConfig::XKB_COMMON_X11
+ Qt::CorePrivate
+ Qt::EdidSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GuiPrivate
+ Qt::ServiceSupportPrivate
+ Qt::ThemeSupportPrivate
+ Qt::XkbCommonSupportPrivate
+ XCB::ICCCM
+ XCB::IMAGE
+ XCB::KEYSYMS
+ XCB::RANDR
+ XCB::RENDER
+ XCB::RENDERUTIL
+ XCB::SHAPE
+ XCB::SHM
+ XCB::SYNC
+ XCB::XCB
+ XCB::XFIXES
+ XCB::XINERAMA
+ XCB::XINPUT
+ XCB::XKB
+ XKB::XKB
+)
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(XcbQpa CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(XcbQpa CONDITION TARGET Qt::LinuxAccessibilitySupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::LinuxAccessibilitySupportPrivate
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_vulkan
+ SOURCES
+ qxcbvulkaninstance.cpp qxcbvulkaninstance.h
+ qxcbvulkanwindow.cpp qxcbvulkanwindow.h
+ PUBLIC_LIBRARIES
+ Qt::VulkanSupportPrivate
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_glib
+ LIBRARIES
+ GLIB2::GLIB2
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_draganddrop
+ SOURCES
+ qxcbdrag.cpp qxcbdrag.h
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_xcb_xlib
+ PUBLIC_LIBRARIES
+ X11::XCB
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_xcb_sm
+ SOURCES
+ qxcbsessionmanager.cpp qxcbsessionmanager.h
+ PUBLIC_LIBRARIES
+ ${X11_SM_LIB} ${X11_ICE_LIB}
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_dlopen
+ PUBLIC_LIBRARIES
+ ${CMAKE_DL_LIBS}
+)
+
+qt_extend_target(XcbQpa CONDITION CLANG AND NOT ICC
+ COMPILE_OPTIONS
+ -ftemplate-depth=1024
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_xcb_native_painting
+ SOURCES
+ nativepainting/qbackingstore_x11.cpp nativepainting/qbackingstore_x11_p.h
+ nativepainting/qcolormap_x11.cpp nativepainting/qcolormap_x11_p.h
+ nativepainting/qpaintengine_x11.cpp nativepainting/qpaintengine_x11_p.h
+ nativepainting/qpixmap_x11.cpp nativepainting/qpixmap_x11_p.h
+ nativepainting/qt_x11_p.h
+ nativepainting/qtessellator.cpp nativepainting/qtessellator_p.h
+ nativepainting/qxcbnativepainting.cpp nativepainting/qxcbnativepainting.h
+ INCLUDE_DIRECTORIES
+ nativepainting
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_xcb_native_painting AND QT_FEATURE_xrender
+ PUBLIC_LIBRARIES
+ PkgConfig::XRender
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_xcb_native_painting
+ LIBRARIES
+ WrapFreetype::WrapFreetype
+)
+#####################################################################
+## QXcbIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QXcbIntegrationPlugin
+ OUTPUT_NAME qxcb
+ TYPE platforms
+ SOURCES
+ qxcbmain.cpp
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::XcbQpaPrivate
+)
+
+#### Keys ignored in scope 20:.:.:xcb-plugin.pro:<TRUE>:
+# OTHER_FILES = "xcb.json" "README"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 22:.:.:xcb-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
+add_subdirectory(gl_integrations)
diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt
new file mode 100644
index 0000000000..a7cb58ba29
--- /dev/null
+++ b/src/plugins/platforms/xcb/CMakeLists.txt
@@ -0,0 +1,193 @@
+# Generated from xcb.pro.
+
+#####################################################################
+## XcbQpa Module:
+#####################################################################
+
+qt_add_module(XcbQpa
+ INTERNAL_MODULE
+ NO_MODULE_HEADERS
+ SOURCES
+ gl_integrations/qxcbglintegration.cpp gl_integrations/qxcbglintegration.h
+ gl_integrations/qxcbglintegrationfactory.cpp gl_integrations/qxcbglintegrationfactory.h
+ gl_integrations/qxcbglintegrationplugin.h
+ gl_integrations/qxcbnativeinterfacehandler.cpp gl_integrations/qxcbnativeinterfacehandler.h
+ qxcbatom.cpp qxcbatom.h
+ qxcbbackingstore.cpp qxcbbackingstore.h
+ qxcbclipboard.cpp qxcbclipboard.h
+ qxcbconnection.cpp qxcbconnection.h
+ qxcbconnection_basic.cpp qxcbconnection_basic.h
+ qxcbconnection_screens.cpp
+ qxcbconnection_xi2.cpp
+ qxcbcursor.cpp qxcbcursor.h
+ qxcbeventdispatcher.cpp qxcbeventdispatcher.h
+ qxcbeventqueue.cpp qxcbeventqueue.h
+ qxcbimage.cpp qxcbimage.h
+ qxcbintegration.cpp qxcbintegration.h
+ qxcbkeyboard.cpp qxcbkeyboard.h
+ qxcbmime.cpp qxcbmime.h
+ qxcbnativeinterface.cpp qxcbnativeinterface.h
+ qxcbobject.h
+ qxcbscreen.cpp qxcbscreen.h
+ qxcbsystemtraytracker.cpp qxcbsystemtraytracker.h
+ qxcbwindow.cpp qxcbwindow.h
+ qxcbwmsupport.cpp qxcbwmsupport.h
+ qxcbxsettings.cpp qxcbxsettings.h
+ DEFINES
+ QT_BUILD_XCB_PLUGIN
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ gl_integrations
+ PUBLIC_LIBRARIES
+ PkgConfig::XKB_COMMON_X11
+ Qt::CorePrivate
+ Qt::EdidSupportPrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GuiPrivate
+ Qt::ServiceSupportPrivate
+ Qt::ThemeSupportPrivate
+ Qt::XkbCommonSupportPrivate
+ XCB::ICCCM
+ XCB::IMAGE
+ XCB::KEYSYMS
+ XCB::RANDR
+ XCB::RENDER
+ XCB::RENDERUTIL
+ XCB::SHAPE
+ XCB::SHM
+ XCB::SYNC
+ XCB::XCB
+ XCB::XFIXES
+ XCB::XINERAMA
+ $<$<TARGET_EXISTS:XCB::XINPUT>:XCB::XINPUT> # special case
+ XCB::XKB
+ XKB::XKB
+)
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(XcbQpa CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(XcbQpa CONDITION TARGET Qt::LinuxAccessibilitySupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::LinuxAccessibilitySupportPrivate
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_vulkan
+ SOURCES
+ qxcbvulkaninstance.cpp qxcbvulkaninstance.h
+ qxcbvulkanwindow.cpp qxcbvulkanwindow.h
+ PUBLIC_LIBRARIES
+ Qt::VulkanSupportPrivate
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_glib
+ LIBRARIES
+ GLIB2::GLIB2
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_draganddrop
+ SOURCES
+ qxcbdrag.cpp qxcbdrag.h
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_xcb_xlib
+ PUBLIC_LIBRARIES
+ X11::XCB
+ # special case begin
+ # 'QMAKE_USE += xcb_xlib' in qmake implies also += xlib (aka X11)
+ # due to "use": "xcb xlib" in src/gui/configure.json.
+ # That's not yet handled by the conversion scripts unfortunately.
+ X11::X11
+ # special case end
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_xcb_sm
+ SOURCES
+ qxcbsessionmanager.cpp qxcbsessionmanager.h
+ PUBLIC_LIBRARIES
+ ${X11_SM_LIB} ${X11_ICE_LIB}
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_dlopen
+ PUBLIC_LIBRARIES
+ ${CMAKE_DL_LIBS}
+)
+
+qt_extend_target(XcbQpa CONDITION CLANG AND NOT ICC
+ COMPILE_OPTIONS
+ -ftemplate-depth=1024
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_xcb_native_painting
+ SOURCES
+ nativepainting/qbackingstore_x11.cpp nativepainting/qbackingstore_x11_p.h
+ nativepainting/qcolormap_x11.cpp nativepainting/qcolormap_x11_p.h
+ nativepainting/qpaintengine_x11.cpp nativepainting/qpaintengine_x11_p.h
+ nativepainting/qpixmap_x11.cpp nativepainting/qpixmap_x11_p.h
+ nativepainting/qt_x11_p.h
+ nativepainting/qtessellator.cpp nativepainting/qtessellator_p.h
+ nativepainting/qxcbnativepainting.cpp nativepainting/qxcbnativepainting.h
+ INCLUDE_DIRECTORIES
+ nativepainting
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_xcb_native_painting AND QT_FEATURE_xrender
+ PUBLIC_LIBRARIES
+ PkgConfig::XRender
+)
+
+qt_extend_target(XcbQpa CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_xcb_native_painting
+ LIBRARIES
+ WrapFreetype::WrapFreetype
+)
+
+# special case begin
+if (NOT QT_FEATURE_system_xcb_input)
+ set(xinput_source "${PROJECT_SOURCE_DIR}/src/3rdparty/xcb/libxcb/xinput.c")
+ set_source_files_properties(
+ "${xinput_source}"
+ PROPERTIES COMPILE_OPTIONS "-w"
+ )
+ target_sources(XcbQpa PRIVATE "${xinput_source}")
+ target_include_directories(XcbQpa PRIVATE
+ "${PROJECT_SOURCE_DIR}/src/3rdparty/xcb/include"
+ )
+endif()
+# special case end
+
+#####################################################################
+## QXcbIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QXcbIntegrationPlugin
+ OUTPUT_NAME qxcb
+ TYPE platforms
+ DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES xcb # special case
+ SOURCES
+ qxcbmain.cpp
+ DEFINES
+ QT_NO_FOREACH
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::XcbQpaPrivate
+)
+
+#### Keys ignored in scope 20:.:.:xcb-plugin.pro:<TRUE>:
+# OTHER_FILES = "xcb.json" "README"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 22:.:.:xcb-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+# PLUGIN_EXTENDS = "-"
+add_subdirectory(gl_integrations)
+if(OFF)
+ add_subdirectory(xcb-static) # special case TODO: xcb-static sub folder
+endif()
+
diff --git a/src/plugins/platforms/xcb/gl_integrations/CMakeLists.txt b/src/plugins/platforms/xcb/gl_integrations/CMakeLists.txt
new file mode 100644
index 0000000000..210a924550
--- /dev/null
+++ b/src/plugins/platforms/xcb/gl_integrations/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from gl_integrations.pro.
+
+if(QT_FEATURE_xcb_egl_plugin)
+ add_subdirectory(xcb_egl)
+endif()
+if(QT_FEATURE_xcb_glx_plugin)
+ add_subdirectory(xcb_glx)
+endif()
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt
new file mode 100644
index 0000000000..a78d01ec87
--- /dev/null
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from xcb_egl.pro.
+
+#####################################################################
+## QXcbEglIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QXcbEglIntegrationPlugin
+ OUTPUT_NAME qxcb-egl-integration
+ TYPE xcbglintegrations
+ SOURCES
+ qxcbeglcontext.h
+ qxcbeglintegration.cpp qxcbeglintegration.h
+ qxcbeglmain.cpp
+ qxcbeglnativeinterfacehandler.cpp qxcbeglnativeinterfacehandler.h
+ qxcbeglwindow.cpp qxcbeglwindow.h
+ DEFINES
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ ..
+ ../..
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::EglSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::XcbQpaPrivate
+)
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
new file mode 100644
index 0000000000..b3361dbd99
--- /dev/null
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from xcb_glx.pro.
+
+#####################################################################
+## QXcbGlxIntegrationPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QXcbGlxIntegrationPlugin
+ OUTPUT_NAME qxcb-glx-integration
+ TYPE xcbglintegrations
+ SOURCES
+ qglxintegration.cpp qglxintegration.h
+ qxcbglxintegration.cpp qxcbglxintegration.h
+ qxcbglxmain.cpp
+ qxcbglxnativeinterfacehandler.cpp qxcbglxnativeinterfacehandler.h
+ qxcbglxwindow.cpp qxcbglxwindow.h
+ DEFINES
+ QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ ..
+ ../..
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::GlxSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::XcbQpaPrivate
+)
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QXcbGlxIntegrationPlugin CONDITION QT_FEATURE_xcb_glx
+ PUBLIC_LIBRARIES
+ XCB::GLX
+)
+
+qt_extend_target(QXcbGlxIntegrationPlugin CONDITION QT_FEATURE_dlopen AND NOT static
+ PUBLIC_LIBRARIES
+ ${CMAKE_DL_LIBS}
+)
diff --git a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
index 82b6d60bcd..7bf2b38d7d 100644
--- a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
@@ -2016,7 +2016,7 @@ Q_GUI_EXPORT void qt_x11_drawImage(const QRect &rect, const QPoint &pos, const Q
|| (image_byte_order == LSBFirst && bgr_layout))
{
im = image.copy(rect);
- const int iw = im.bytesPerLine() / 4;
+ const qsizetype iw = im.bytesPerLine() / 4;
uint *data = (uint *)im.bits();
for (int i=0; i < h; i++) {
uint *p = data;
diff --git a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp
index f86bedbdcd..467e93e64f 100644
--- a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp
@@ -1747,7 +1747,7 @@ XID QX11PlatformPixmap::createBitmapFromImage(const QImage &image)
int w = img.width();
int h = img.height();
int bpl = (w + 7) / 8;
- int ibpl = img.bytesPerLine();
+ qsizetype ibpl = img.bytesPerLine();
if (bpl != ibpl) {
tmp_bits = new uchar[bpl*h];
bits = (char *)tmp_bits;
@@ -2017,7 +2017,7 @@ QImage QX11PlatformPixmap::toImage(const QXImageWrapper &xiWrapper, const QRect
}
} else if (xi->bits_per_pixel == d) { // compatible depth
char *xidata = xi->data; // copy each scanline
- int bpl = qMin(int(image.bytesPerLine()),xi->bytes_per_line);
+ qsizetype bpl = qMin(image.bytesPerLine(),xi->bytes_per_line);
for (int y=0; y<xi->height; y++) {
memcpy(image.scanLine(y), xidata, bpl);
xidata += xi->bytes_per_line;
@@ -2038,10 +2038,10 @@ QImage QX11PlatformPixmap::toImage(const QXImageWrapper &xiWrapper, const QRect
uchar *end;
uchar use[256]; // pixel-in-use table
uchar pix[256]; // pixel translation table
- int ncols, bpl;
+ int ncols;
memset(use, 0, 256);
memset(pix, 0, 256);
- bpl = image.bytesPerLine();
+ qsizetype bpl = image.bytesPerLine();
if (x11_mask) { // which pixels are used?
for (int i = 0; i < xi->height; i++) {
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index 8f55bc2e96..7330c3c9a3 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -537,7 +537,7 @@ void QXcbBackingStoreImage::ensureGC(xcb_drawable_t dst)
static inline void copy_unswapped(char *dst, int dstBytesPerLine, const QImage &img, const QRect &rect)
{
const uchar *srcData = img.constBits();
- const int srcBytesPerLine = img.bytesPerLine();
+ const qsizetype srcBytesPerLine = img.bytesPerLine();
const int leftOffset = rect.left() * img.depth() >> 3;
const int bottom = rect.bottom() + 1;
@@ -553,7 +553,7 @@ template <class Pixel>
static inline void copy_swapped(char *dst, const int dstStride, const QImage &img, const QRect &rect)
{
const uchar *srcData = img.constBits();
- const int srcBytesPerLine = img.bytesPerLine();
+ const qsizetype srcBytesPerLine = img.bytesPerLine();
const int left = rect.left();
const int width = rect.width();
diff --git a/src/plugins/platforms/xcb/qxcbeventqueue.cpp b/src/plugins/platforms/xcb/qxcbeventqueue.cpp
index 759ee3cc95..f0cb5edd2a 100644
--- a/src/plugins/platforms/xcb/qxcbeventqueue.cpp
+++ b/src/plugins/platforms/xcb/qxcbeventqueue.cpp
@@ -62,8 +62,8 @@ static bool dispatcherOwnerDestructing = false;
when accessing the tail node. It does not dequeue the last node and does not
access (read or write) the tail node's 'next' member. This lets the reader
add more items at the same time as the main thread is dequeuing nodes from
- the head. A custom linked list implementation is used, because QLinkedList
- does not have any thread-safety guarantees and the custom list is more
+ the head. A custom linked list implementation is used, because std::list
+ does not have any thread-safety guarantees. The custom list is
lightweight - no reference counting, back links, etc.
Memory management:
diff --git a/src/plugins/platforms/xcb/qxcbeventqueue.h b/src/plugins/platforms/xcb/qxcbeventqueue.h
index 11d0b8e963..e7327b3fd6 100644
--- a/src/plugins/platforms/xcb/qxcbeventqueue.h
+++ b/src/plugins/platforms/xcb/qxcbeventqueue.h
@@ -49,6 +49,7 @@
#include <xcb/xcb.h>
#include <atomic>
+#include <limits>
QT_BEGIN_NAMESPACE
@@ -106,7 +107,7 @@ public:
bool peekEventQueue(PeekerCallback peeker, void *peekerData = nullptr,
PeekOptions option = PeekDefault, qint32 peekerId = -1);
- void waitForNewEvents(unsigned long time = ULONG_MAX);
+ void waitForNewEvents(unsigned long time = std::numeric_limits<unsigned long>::max());
private:
QXcbEventNode *qXcbEventNodeFactory(xcb_generic_event_t *event);
diff --git a/src/plugins/platforms/xcb/qxcbimage.cpp b/src/plugins/platforms/xcb/qxcbimage.cpp
index b0e610dd51..5b5c37fac4 100644
--- a/src/plugins/platforms/xcb/qxcbimage.cpp
+++ b/src/plugins/platforms/xcb/qxcbimage.cpp
@@ -212,7 +212,7 @@ xcb_pixmap_t qt_xcb_XPixmapFromBitmap(QXcbScreen *screen, const QImage &image)
}
const int width = bitmap.width();
const int height = bitmap.height();
- const int bytesPerLine = bitmap.bytesPerLine();
+ const qsizetype bytesPerLine = bitmap.bytesPerLine();
int destLineSize = width / 8;
if (width % 8)
++destLineSize;
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 3fd989e1f9..cea0511822 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -61,6 +61,9 @@
#include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
#include <QtServiceSupport/private/qgenericunixservices_p.h>
+#if QT_CONFIG(opengl)
+#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
+#endif
#include <stdio.h>
@@ -288,16 +291,23 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont
QPlatformBackingStore *QXcbIntegration::createPlatformBackingStore(QWindow *window) const
{
- const bool isTrayIconWindow = QXcbWindow::isTrayIconWindow(window);
- if (isTrayIconWindow)
- return new QXcbSystemTrayBackingStore(window);
+ QPlatformBackingStore *backingStore = nullptr;
+ const bool isTrayIconWindow = QXcbWindow::isTrayIconWindow(window);
+ if (isTrayIconWindow) {
+ backingStore = new QXcbSystemTrayBackingStore(window);
#if QT_CONFIG(xcb_native_painting)
- if (nativePaintingEnabled())
- return new QXcbNativeBackingStore(window);
+ } else if (nativePaintingEnabled()) {
+ backingStore = new QXcbNativeBackingStore(window);
#endif
-
- return new QXcbBackingStore(window);
+ } else {
+ backingStore = new QXcbBackingStore(window);
+ }
+ Q_ASSERT(backingStore);
+#ifndef QT_NO_OPENGL
+ backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore));
+#endif
+ return backingStore;
}
QPlatformOffscreenSurface *QXcbIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
index a5d05faa9c..1f651e7697 100644
--- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro
+++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
@@ -9,6 +9,9 @@ QT += \
edid_support-private \
xkbcommon_support-private
+qtHaveModule(platformcompositor_support-private): \
+ QT += platformcompositor_support-private
+
qtHaveModule(linuxaccessibility_support-private): \
QT += linuxaccessibility_support-private
diff --git a/src/plugins/platformthemes/CMakeLists.txt b/src/plugins/platformthemes/CMakeLists.txt
new file mode 100644
index 0000000000..6aa17c234c
--- /dev/null
+++ b/src/plugins/platformthemes/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from platformthemes.pro.
+
+if(QT_FEATURE_dbus AND QT_FEATURE_mimetype AND QT_FEATURE_regularexpression)
+ add_subdirectory(xdgdesktopportal)
+endif()
+if(QT_FEATURE_gtk3 AND TARGET Qt::Widgets)
+ add_subdirectory(gtk3)
+endif()
diff --git a/src/plugins/platformthemes/gtk3/.prev_CMakeLists.txt b/src/plugins/platformthemes/gtk3/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..0784de2ca8
--- /dev/null
+++ b/src/plugins/platformthemes/gtk3/.prev_CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from gtk3.pro.
+
+#####################################################################
+## QGtk3ThemePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QGtk3ThemePlugin
+ OUTPUT_NAME qgtk3
+ TYPE platformthemes
+ SOURCES
+ main.cpp
+ qgtk3dialoghelpers.cpp qgtk3dialoghelpers.h
+ qgtk3menu.cpp qgtk3menu.h
+ qgtk3theme.cpp qgtk3theme.h
+ DEFINES
+ GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6
+ PUBLIC_LIBRARIES
+ PkgConfig::GTK3
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:gtk3.pro:<TRUE>:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platformthemes/gtk3/CMakeLists.txt b/src/plugins/platformthemes/gtk3/CMakeLists.txt
new file mode 100644
index 0000000000..4e56e4a6b3
--- /dev/null
+++ b/src/plugins/platformthemes/gtk3/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from gtk3.pro.
+
+qt_find_package(GTK3) # special case
+qt_find_package(X11) # special case
+
+#####################################################################
+## QGtk3ThemePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QGtk3ThemePlugin
+ OUTPUT_NAME qgtk3
+ TYPE platformthemes
+ SOURCES
+ main.cpp
+ qgtk3dialoghelpers.cpp qgtk3dialoghelpers.h
+ qgtk3menu.cpp qgtk3menu.h
+ qgtk3theme.cpp qgtk3theme.h
+ DEFINES
+ GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6
+ LIBRARIES # special case
+ X11::X11 # special case
+ PUBLIC_LIBRARIES
+ PkgConfig::GTK3
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:gtk3.pro:<TRUE>:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platformthemes/xdgdesktopportal/CMakeLists.txt b/src/plugins/platformthemes/xdgdesktopportal/CMakeLists.txt
new file mode 100644
index 0000000000..a9062f695f
--- /dev/null
+++ b/src/plugins/platformthemes/xdgdesktopportal/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from xdgdesktopportal.pro.
+
+#####################################################################
+## QXdgDesktopPortalThemePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QXdgDesktopPortalThemePlugin
+ OUTPUT_NAME qxdgdesktopportal
+ TYPE platformthemes
+ SOURCES
+ main.cpp
+ qxdgdesktopportalfiledialog.cpp qxdgdesktopportalfiledialog_p.h
+ qxdgdesktopportaltheme.cpp qxdgdesktopportaltheme.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::DBus
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:xdgdesktopportal.pro:<TRUE>:
+# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/printsupport/.prev_CMakeLists.txt b/src/plugins/printsupport/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..5853d82c6a
--- /dev/null
+++ b/src/plugins/printsupport/.prev_CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from printsupport.pro.
+
+if(APPLE_OSX)
+ add_subdirectory(cocoa)
+endif()
+if(WIN32)
+ add_subdirectory(windows)
+endif()
+if(QT_FEATURE_cups AND UNIX AND NOT APPLE)
+ add_subdirectory(cups)
+endif()
diff --git a/src/plugins/printsupport/CMakeLists.txt b/src/plugins/printsupport/CMakeLists.txt
new file mode 100644
index 0000000000..22b753f5c0
--- /dev/null
+++ b/src/plugins/printsupport/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from printsupport.pro.
+
+if(APPLE_OSX)
+ add_subdirectory(cocoa)
+endif()
+if(WIN32)
+ # add_subdirectory(windows) # special case TODO
+endif()
+if(QT_FEATURE_cups AND UNIX AND NOT APPLE)
+ add_subdirectory(cups)
+endif()
diff --git a/src/plugins/printsupport/cocoa/CMakeLists.txt b/src/plugins/printsupport/cocoa/CMakeLists.txt
new file mode 100644
index 0000000000..72660dc173
--- /dev/null
+++ b/src/plugins/printsupport/cocoa/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from cocoa.pro.
+
+#####################################################################
+## QCocoaPrinterSupportPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QCocoaPrinterSupportPlugin
+ OUTPUT_NAME cocoaprintersupport
+ TYPE printsupport
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+ Qt::Core
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::PrintSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:cocoa.pro:<TRUE>:
+# MODULE = "cocoaprintersupport"
+# OTHER_FILES = "cocoa.json"
diff --git a/src/plugins/printsupport/cups/.prev_CMakeLists.txt b/src/plugins/printsupport/cups/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c65ffb89c7
--- /dev/null
+++ b/src/plugins/printsupport/cups/.prev_CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from cups.pro.
+
+#####################################################################
+## QCupsPrinterSupportPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QCupsPrinterSupportPlugin
+ OUTPUT_NAME cupsprintersupport
+ TYPE printsupport
+ SOURCES
+ main.cpp
+ qcupsprintengine.cpp qcupsprintengine_p.h
+ qcupsprintersupport.cpp qcupsprintersupport_p.h
+ qppdprintdevice.cpp qppdprintdevice.h
+ INCLUDE_DIRECTORIES
+ ../../../printsupport/kernel
+ LIBRARIES
+ Cups::Cups
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::PrintSupport
+ Qt::PrintSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:cups.pro:<TRUE>:
+# MODULE = "cupsprintersupport"
+# OTHER_FILES = "cups.json"
diff --git a/src/plugins/printsupport/cups/CMakeLists.txt b/src/plugins/printsupport/cups/CMakeLists.txt
new file mode 100644
index 0000000000..5c920443ea
--- /dev/null
+++ b/src/plugins/printsupport/cups/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from cups.pro.
+
+qt_find_package(Cups PROVIDED_TARGETS Cups::Cups) # special case
+
+#####################################################################
+## QCupsPrinterSupportPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QCupsPrinterSupportPlugin
+ OUTPUT_NAME cupsprintersupport
+ TYPE printsupport
+ SOURCES
+ main.cpp
+ qcupsprintengine.cpp qcupsprintengine_p.h
+ qcupsprintersupport.cpp qcupsprintersupport_p.h
+ qppdprintdevice.cpp qppdprintdevice.h
+ INCLUDE_DIRECTORIES
+ ../../../printsupport/kernel
+ LIBRARIES
+ Cups::Cups
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::PrintSupport
+ Qt::PrintSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:cups.pro:<TRUE>:
+# MODULE = "cupsprintersupport"
+# OTHER_FILES = "cups.json"
diff --git a/src/plugins/sqldrivers/.prev_CMakeLists.txt b/src/plugins/sqldrivers/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8752cf701f
--- /dev/null
+++ b/src/plugins/sqldrivers/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from sqldrivers.pro.
+
+cmake_minimum_required(VERSION 3.15.0)
+
+project(ldrivers_FIXME
+ VERSION 6.0.0
+ DESCRIPTION "Qt ldrivers_FIXME Libraries"
+ HOMEPAGE_URL "https://qt.io/"
+ LANGUAGES CXX C
+)
+
+find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core SET_ME_TO_SOMETHING_USEFUL)
+find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS SET_ME_TO_SOMETHING_USEFUL)
+
+qt_build_repo()
diff --git a/src/plugins/sqldrivers/CMakeLists.txt b/src/plugins/sqldrivers/CMakeLists.txt
new file mode 100644
index 0000000000..d45f5712a8
--- /dev/null
+++ b/src/plugins/sqldrivers/CMakeLists.txt
@@ -0,0 +1,55 @@
+# Generated from sqldrivers.pro.
+
+# special case begin
+# Currently handled completely manually.
+
+# TODO sqldrivers_standalone {
+# _QMAKE_CACHE_ = $$shadowed($$SQLDRV_SRC_TREE)/.qmake.conf
+# load(qt_configure)
+# }
+
+qt_feature_module_begin(
+ NO_MODULE
+ PUBLIC_FILE "qtsqldrivers-config.h"
+ PRIVATE_FILE "qtsqldrivers-config_p.h"
+)
+include(configure.cmake)
+qt_feature_module_end(NO_MODULE)
+
+
+if(QT_FEATURE_sql_psql)
+ add_subdirectory(psql)
+endif()
+
+if(QT_FEATURE_sql_mysql)
+ add_subdirectory(mysql)
+endif()
+
+if(QT_FEATURE_sql_odbc)
+ add_subdirectory(odbc)
+endif()
+
+if(QT_FEATURE_sql_tds)
+# TODO add_subdirectory(tds)
+endif()
+
+if(QT_FEATURE_sql_oci)
+ add_subdirectory(oci)
+endif()
+
+if(QT_FEATURE_sql_db2)
+ add_subdirectory(db2)
+endif()
+
+if(QT_FEATURE_sql_sqlite)
+ add_subdirectory(sqlite)
+endif()
+
+if(QT_FEATURE_sql_sqlite2)
+# TODO add_subdirectory(sqlite2)
+endif()
+
+if(QT_FEATURE_sql_ibase)
+# TODO add_subdirectory(ibase)
+endif()
+# special case end
diff --git a/src/plugins/sqldrivers/README b/src/plugins/sqldrivers/README
index 26418c5e36..7da95fe53c 100644
--- a/src/plugins/sqldrivers/README
+++ b/src/plugins/sqldrivers/README
@@ -1,4 +1,4 @@
-Please note that the DB2, MySQL, Oracle and TDS client drivers are not
+Please note that the DB2, MySQL and Oracle client drivers are not
distributed with the Qt Open Source Editions.
This is because the client libraries are distributed under a license which
diff --git a/src/plugins/sqldrivers/configure.cmake b/src/plugins/sqldrivers/configure.cmake
new file mode 100644
index 0000000000..7cf0763da1
--- /dev/null
+++ b/src/plugins/sqldrivers/configure.cmake
@@ -0,0 +1,50 @@
+
+
+#### Inputs
+
+
+
+#### Libraries
+
+qt_find_package(DB2 PROVIDED_TARGETS DB2::DB2)
+qt_find_package(MySQL PROVIDED_TARGETS MySQL::MySQL)
+qt_find_package(PostgreSQL PROVIDED_TARGETS PostgreSQL::PostgreSQL)
+qt_find_package(Oracle PROVIDED_TARGETS Oracle::OCI)
+qt_find_package(ODBC PROVIDED_TARGETS ODBC::ODBC)
+qt_find_package(SQLite3 PROVIDED_TARGETS SQLite::SQLite3)
+
+
+#### Tests
+
+
+
+#### Features
+
+qt_feature("sql-db2" PRIVATE
+ LABEL "DB2 (IBM)"
+ CONDITION DB2_FOUND
+)
+qt_feature("sql-ibase" PRIVATE
+ LABEL "InterBase"
+ CONDITION libs.ibase OR FIXME
+)
+qt_feature("sql-mysql" PRIVATE
+ LABEL "MySql"
+ CONDITION MySQL_FOUND
+)
+qt_feature("sql-oci" PRIVATE
+ LABEL "OCI (Oracle)"
+ CONDITION Oracle_FOUND
+)
+qt_feature("sql-odbc" PRIVATE
+ LABEL "ODBC"
+ CONDITION QT_FEATURE_datestring AND ODBC_FOUND
+)
+qt_feature("sql-psql" PRIVATE
+ LABEL "PostgreSQL"
+ CONDITION PostgreSQL_FOUND
+)
+qt_feature("sql-sqlite" PRIVATE
+ LABEL "SQLite"
+ CONDITION QT_FEATURE_datestring AND SQLite3_FOUND
+)
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
index 28ccbeadcd..f738e58a00 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
@@ -7,9 +7,7 @@
"commandline": {
"assignments": {
- "MYSQL_PATH": "mysql.prefix",
- "SYBASE": "tds.prefix",
- "SYBASE_LIBS": "tds.libs"
+ "MYSQL_PATH": "mysql.prefix"
},
"options": {
"mysql_config": "string",
@@ -22,17 +20,13 @@
"sql-odbc": "boolean",
"sql-psql": "boolean",
"sql-sqlite": "boolean",
- "sql-sqlite2": "boolean",
- "sql-tds": "boolean",
"plugin-sql-db2": { "type": "void", "name": "sql-db2" },
"plugin-sql-ibase": { "type": "void", "name": "sql-ibase" },
"plugin-sql-mysql": { "type": "void", "name": "sql-mysql" },
"plugin-sql-oci": { "type": "void", "name": "sql-oci" },
"plugin-sql-odbc": { "type": "void", "name": "sql-odbc" },
"plugin-sql-psql": { "type": "void", "name": "sql-psql" },
- "plugin-sql-sqlite": { "type": "void", "name": "sql-sqlite" },
- "plugin-sql-sqlite2": { "type": "void", "name": "sql-sqlite2" },
- "plugin-sql-tds": { "type": "void", "name": "sql-tds" }
+ "plugin-sql-sqlite": { "type": "void", "name": "sql-sqlite" }
}
},
@@ -94,15 +88,6 @@
{ "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" }
]
},
- "tds": {
- "label": "TDS (Sybase)",
- "test": {},
- "headers": [ "sybfront.h", "sybdb.h" ],
- "sources": [
- { "type": "sybaseEnv", "libs": "-lNTWDBLIB", "condition": "config.win32" },
- { "type": "sybaseEnv", "libs": "-lsybdb", "condition": "!config.win32" }
- ]
- },
"oci": {
"label": "OCI (Oracle)",
"test": {},
@@ -132,14 +117,6 @@
{ "libs": "-lodbc", "condition": "!config.win32 && !config.darwin" }
]
},
- "sqlite2": {
- "label": "SQLite (version 2)",
- "test": {},
- "headers": "sqlite.h",
- "sources": [
- "-lsqlite"
- ]
- },
"sqlite3": {
"label": "SQLite (version 3)",
"export": "sqlite",
@@ -191,11 +168,6 @@
"condition": "libs.psql",
"output": [ "privateFeature" ]
},
- "sql-sqlite2": {
- "label": "SQLite2",
- "condition": "libs.sqlite2",
- "output": [ "privateFeature" ]
- },
"sql-sqlite": {
"label": "SQLite",
"condition": "features.datestring",
@@ -206,11 +178,6 @@
"autoDetect": false,
"condition": "features.sql-sqlite && libs.sqlite3",
"output": [ "privateFeature" ]
- },
- "sql-tds": {
- "label": "TDS (Sybase)",
- "condition": "features.datestring && libs.tds",
- "output": [ "privateFeature" ]
}
},
@@ -218,9 +185,7 @@
{
"type": "warning",
"condition": "config.win32 && !config.msvc && features.sql-oci",
- "message": "Qt does not support compiling the Oracle database driver with
-MinGW, due to lack of such support from Oracle. Consider disabling the
-Oracle driver, as the current build will most likely fail."
+ "message": "Qt does not support compiling the Oracle database driver with MinGW, due to lack of such support from Oracle. Consider disabling the Oracle driver, as the current build will most likely fail."
}
],
@@ -229,7 +194,7 @@ Oracle driver, as the current build will most likely fail."
"section": "Qt Sql Drivers",
"entries": [
"sql-db2", "sql-ibase", "sql-mysql", "sql-oci", "sql-odbc", "sql-psql",
- "sql-sqlite2", "sql-sqlite", "system-sqlite", "sql-tds"
+ "sql-sqlite", "system-sqlite"
]
}
]
diff --git a/src/plugins/sqldrivers/db2/CMakeLists.txt b/src/plugins/sqldrivers/db2/CMakeLists.txt
new file mode 100644
index 0000000000..637461e168
--- /dev/null
+++ b/src/plugins/sqldrivers/db2/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from db2.pro.
+
+#####################################################################
+## QDB2DriverPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QDB2DriverPlugin
+ OUTPUT_NAME qsqldb2
+ TYPE sqldrivers
+ SOURCES
+ main.cpp
+ qsql_db2.cpp qsql_db2_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ DB2::DB2
+ Qt::Core
+ Qt::CorePrivate
+ Qt::SqlPrivate
+)
+
+#### Keys ignored in scope 1:.:.:db2.pro:<TRUE>:
+# OTHER_FILES = "db2.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QDB2DriverPlugin CONDITION (TEST_architecture_arch STREQUAL "x86_64")
+ DEFINES
+ ODBC64
+)
diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
index ffbc56829b..09c0655f3d 100644
--- a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
+++ b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
@@ -1913,15 +1913,8 @@ void QIBaseDriver::qHandleEventNotification(void *updatedResultBuffer)
isc_event_counts(counts, eBuffer->bufferLength, eBuffer->eventBuffer, eBuffer->resultBuffer);
if (counts[0]) {
- if (eBuffer->subscriptionState == QIBaseEventBuffer::Subscribed) {
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- emit notification(i.key());
-QT_WARNING_POP
-#endif
+ if (eBuffer->subscriptionState == QIBaseEventBuffer::Subscribed)
emit notification(i.key(), QSqlDriver::UnknownSource, QVariant());
- }
else if (eBuffer->subscriptionState == QIBaseEventBuffer::Starting)
eBuffer->subscriptionState = QIBaseEventBuffer::Subscribed;
diff --git a/src/plugins/sqldrivers/mysql/CMakeLists.txt b/src/plugins/sqldrivers/mysql/CMakeLists.txt
new file mode 100644
index 0000000000..c99f322dfb
--- /dev/null
+++ b/src/plugins/sqldrivers/mysql/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from mysql.pro.
+
+#####################################################################
+## QMYSQLDriverPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QMYSQLDriverPlugin
+ OUTPUT_NAME qsqlmysql
+ TYPE sqldrivers
+ SOURCES
+ main.cpp
+ qsql_mysql.cpp qsql_mysql_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ MySQL::MySQL
+ Qt::Core
+ Qt::CorePrivate
+ Qt::SqlPrivate
+)
+
+#### Keys ignored in scope 1:.:.:mysql.pro:<TRUE>:
+# OTHER_FILES = "mysql.json"
diff --git a/src/plugins/sqldrivers/mysql/main.cpp b/src/plugins/sqldrivers/mysql/main.cpp
index 4c6753097f..f7d56dd1c9 100644
--- a/src/plugins/sqldrivers/mysql/main.cpp
+++ b/src/plugins/sqldrivers/mysql/main.cpp
@@ -62,7 +62,6 @@ QMYSQLDriverPlugin::QMYSQLDriverPlugin()
QSqlDriver* QMYSQLDriverPlugin::create(const QString &name)
{
if (name == QLatin1String("QMYSQL") ||
- name == QLatin1String("QMYSQL3") ||
name == QLatin1String("QMARIADB")) {
QMYSQLDriver* driver = new QMYSQLDriver();
return driver;
diff --git a/src/plugins/sqldrivers/mysql/mysql.json b/src/plugins/sqldrivers/mysql/mysql.json
index 89f5e65fb9..8fd3d727b1 100644
--- a/src/plugins/sqldrivers/mysql/mysql.json
+++ b/src/plugins/sqldrivers/mysql/mysql.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "QMYSQL3", "QMYSQL", "QMARIADB" ]
+ "Keys": [ "QMYSQL", "QMARIADB" ]
}
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
index 70b9e7e729..41141e1dd4 100644
--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
@@ -322,7 +322,7 @@ static QSqlError qMakeStmtError(const QString& err, QSqlError::ErrorType type,
MYSQL_STMT* stmt)
{
const char *cerr = mysql_stmt_error(stmt);
- return QSqlError(QLatin1String("QMYSQL3: ") + err,
+ return QSqlError(QLatin1String("QMYSQL: ") + err,
QString::fromLatin1(cerr),
type, QString::number(mysql_stmt_errno(stmt)));
}
diff --git a/src/plugins/sqldrivers/oci/CMakeLists.txt b/src/plugins/sqldrivers/oci/CMakeLists.txt
new file mode 100644
index 0000000000..713c9fc871
--- /dev/null
+++ b/src/plugins/sqldrivers/oci/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from oci.pro.
+
+#####################################################################
+## QOCIDriverPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QOCIDriverPlugin
+ OUTPUT_NAME qsqloci
+ TYPE sqldrivers
+ SOURCES
+ main.cpp
+ qsql_oci.cpp qsql_oci_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ Oracle::OCI
+ Qt::Core
+ Qt::CorePrivate
+ Qt::SqlPrivate
+)
+
+#### Keys ignored in scope 1:.:.:oci.pro:<TRUE>:
+# OTHER_FILES = "oci.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QOCIDriverPlugin CONDITION APPLE
+ LINK_OPTIONS
+ "-Wl,-flat_namespace,-U,_environ"
+)
diff --git a/src/plugins/sqldrivers/oci/main.cpp b/src/plugins/sqldrivers/oci/main.cpp
index e576928d31..db273bfb04 100644
--- a/src/plugins/sqldrivers/oci/main.cpp
+++ b/src/plugins/sqldrivers/oci/main.cpp
@@ -61,7 +61,7 @@ QOCIDriverPlugin::QOCIDriverPlugin()
QSqlDriver* QOCIDriverPlugin::create(const QString &name)
{
- if (name == QLatin1String("QOCI") || name == QLatin1String("QOCI8")) {
+ if (name == QLatin1String("QOCI")) {
QOCIDriver* driver = new QOCIDriver();
return driver;
}
diff --git a/src/plugins/sqldrivers/oci/oci.json b/src/plugins/sqldrivers/oci/oci.json
index cbed8fc1ac..c2bb8c81f6 100644
--- a/src/plugins/sqldrivers/oci/oci.json
+++ b/src/plugins/sqldrivers/oci/oci.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "QOCI8", "QOCI" ]
+ "Keys": [ "QOCI" ]
}
diff --git a/src/plugins/sqldrivers/odbc/.prev_CMakeLists.txt b/src/plugins/sqldrivers/odbc/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..692d1fc294
--- /dev/null
+++ b/src/plugins/sqldrivers/odbc/.prev_CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from odbc.pro.
+
+#####################################################################
+## QODBCDriverPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QODBCDriverPlugin
+ OUTPUT_NAME qsqlodbc
+ TYPE sqldrivers
+ SOURCES
+ main.cpp
+ qsql_odbc.cpp qsql_odbc_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ ODBC::ODBC
+ Qt::Core
+ Qt::CorePrivate
+ Qt::SqlPrivate
+)
+
+#### Keys ignored in scope 1:.:.:odbc.pro:<TRUE>:
+# OTHER_FILES = "odbc.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QODBCDriverPlugin CONDITION UNIX
+ DEFINES
+ UNICODE
+)
diff --git a/src/plugins/sqldrivers/odbc/CMakeLists.txt b/src/plugins/sqldrivers/odbc/CMakeLists.txt
new file mode 100644
index 0000000000..5c163181c5
--- /dev/null
+++ b/src/plugins/sqldrivers/odbc/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from odbc.pro.
+
+#####################################################################
+## QODBCDriverPlugin Plugin:
+#####################################################################
+
+qt_find_package(ODBC) # special case
+qt_add_plugin(QODBCDriverPlugin
+ OUTPUT_NAME qsqlodbc
+ TYPE sqldrivers
+ SOURCES
+ main.cpp
+ qsql_odbc.cpp qsql_odbc_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ ODBC::ODBC
+ Qt::Core
+ Qt::CorePrivate
+ Qt::SqlPrivate
+)
+
+#### Keys ignored in scope 1:.:.:odbc.pro:<TRUE>:
+# OTHER_FILES = "odbc.json"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QODBCDriverPlugin CONDITION UNIX
+ DEFINES
+ UNICODE
+)
diff --git a/src/plugins/sqldrivers/odbc/main.cpp b/src/plugins/sqldrivers/odbc/main.cpp
index ac63941a82..e712514a88 100644
--- a/src/plugins/sqldrivers/odbc/main.cpp
+++ b/src/plugins/sqldrivers/odbc/main.cpp
@@ -61,7 +61,7 @@ QODBCDriverPlugin::QODBCDriverPlugin()
QSqlDriver* QODBCDriverPlugin::create(const QString &name)
{
- if (name == QLatin1String("QODBC") || name == QLatin1String("QODBC3")) {
+ if (name == QLatin1String("QODBC")) {
QODBCDriver* driver = new QODBCDriver();
return driver;
}
diff --git a/src/plugins/sqldrivers/odbc/odbc.json b/src/plugins/sqldrivers/odbc/odbc.json
index 41640776fb..c3f6117f42 100644
--- a/src/plugins/sqldrivers/odbc/odbc.json
+++ b/src/plugins/sqldrivers/odbc/odbc.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "QODBC3", "QODBC" ]
+ "Keys": [ "QODBC" ]
}
diff --git a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
index b3a5cd7f65..63e8f9f9fe 100644
--- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
@@ -328,7 +328,7 @@ static QSqlError qMakeError(const QString& err, QSqlError::ErrorType type, const
{
int nativeCode = -1;
QString message = qODBCWarn(p, &nativeCode);
- return QSqlError(QLatin1String("QODBC3: ") + err, message, type,
+ return QSqlError(QLatin1String("QODBC: ") + err, message, type,
nativeCode != -1 ? QString::number(nativeCode) : QString());
}
@@ -337,7 +337,7 @@ static QSqlError qMakeError(const QString& err, QSqlError::ErrorType type,
{
int nativeCode = -1;
QString message = qODBCWarn(p, &nativeCode);
- return QSqlError(QLatin1String("QODBC3: ") + err, message, type,
+ return QSqlError(QLatin1String("QODBC: ") + err, message, type,
nativeCode != -1 ? QString::number(nativeCode) : QString());
}
@@ -2643,3 +2643,5 @@ bool QODBCDriver::isIdentifierEscaped(const QString &identifier, IdentifierType)
}
QT_END_NAMESPACE
+
+#include "moc_qsql_odbc_p.cpp"
diff --git a/src/plugins/sqldrivers/psql/.prev_CMakeLists.txt b/src/plugins/sqldrivers/psql/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..f3cec6d302
--- /dev/null
+++ b/src/plugins/sqldrivers/psql/.prev_CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from psql.pro.
+
+#####################################################################
+## QPSQLDriverPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QPSQLDriverPlugin
+ OUTPUT_NAME qsqlpsql
+ TYPE sqldrivers
+ SOURCES
+ main.cpp
+ qsql_psql.cpp qsql_psql_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ PostgreSQL::PostgreSQL
+ Qt::Core
+ Qt::CorePrivate
+ Qt::SqlPrivate
+)
+
+#### Keys ignored in scope 1:.:.:psql.pro:<TRUE>:
+# OTHER_FILES = "psql.json"
diff --git a/src/plugins/sqldrivers/psql/CMakeLists.txt b/src/plugins/sqldrivers/psql/CMakeLists.txt
new file mode 100644
index 0000000000..03a2dc69c3
--- /dev/null
+++ b/src/plugins/sqldrivers/psql/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from psql.pro.
+
+# FIXME cmake FindPostgreSQL is more exhaustive than the check we have for libpq-fe.h
+# it also checks for catalog/pg_type.h which is a more internal include, we should
+# add a way to tell cmake FindPostgreSQL to optionally only look for the libpq-fe.h one
+qt_find_package(PostgreSQL) # special case
+
+#####################################################################
+## QPSQLDriverPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QPSQLDriverPlugin
+ OUTPUT_NAME qsqlpsql
+ TYPE sqldrivers
+ SOURCES
+ main.cpp
+ qsql_psql.cpp qsql_psql_p.h
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ PostgreSQL::PostgreSQL
+ Qt::Core
+ Qt::CorePrivate
+ Qt::SqlPrivate
+)
+
+#### Keys ignored in scope 1:.:.:psql.pro:<TRUE>:
+# OTHER_FILES = "psql.json"
diff --git a/src/plugins/sqldrivers/psql/main.cpp b/src/plugins/sqldrivers/psql/main.cpp
index a0862a238a..c31e6f64b7 100644
--- a/src/plugins/sqldrivers/psql/main.cpp
+++ b/src/plugins/sqldrivers/psql/main.cpp
@@ -61,7 +61,7 @@ QPSQLDriverPlugin::QPSQLDriverPlugin()
QSqlDriver* QPSQLDriverPlugin::create(const QString &name)
{
- if (name == QLatin1String("QPSQL") || name == QLatin1String("QPSQL7"))
+ if (name == QLatin1String("QPSQL"))
return new QPSQLDriver;
return nullptr;
}
diff --git a/src/plugins/sqldrivers/psql/psql.json b/src/plugins/sqldrivers/psql/psql.json
index 1579b99160..07092a33e7 100644
--- a/src/plugins/sqldrivers/psql/psql.json
+++ b/src/plugins/sqldrivers/psql/psql.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "QPSQL7", "QPSQL" ]
+ "Keys": [ "QPSQL" ]
}
diff --git a/src/plugins/sqldrivers/psql/qsql_psql.cpp b/src/plugins/sqldrivers/psql/qsql_psql.cpp
index 38bf355856..d2c57bcddc 100644
--- a/src/plugins/sqldrivers/psql/qsql_psql.cpp
+++ b/src/plugins/sqldrivers/psql/qsql_psql.cpp
@@ -1668,12 +1668,6 @@ void QPSQLDriver::_q_handleNotification(int)
if (notify->extra)
payload = d->isUtf8 ? QString::fromUtf8(notify->extra) : QString::fromLatin1(notify->extra);
#endif
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- emit notification(name);
-QT_WARNING_POP
-#endif
QSqlDriver::NotificationSource source = (notify->be_pid == PQbackendPID(d->connection)) ? QSqlDriver::SelfSource : QSqlDriver::OtherSource;
emit notification(name, source, payload);
}
diff --git a/src/plugins/sqldrivers/sqldrivers.pro b/src/plugins/sqldrivers/sqldrivers.pro
index 8a9ae46f82..f1db8f65a2 100644
--- a/src/plugins/sqldrivers/sqldrivers.pro
+++ b/src/plugins/sqldrivers/sqldrivers.pro
@@ -8,9 +8,7 @@ sqldrivers_standalone {
qtConfig(sql-psql) : SUBDIRS += psql
qtConfig(sql-mysql) : SUBDIRS += mysql
qtConfig(sql-odbc) : SUBDIRS += odbc
-qtConfig(sql-tds) : SUBDIRS += tds
qtConfig(sql-oci) : SUBDIRS += oci
qtConfig(sql-db2) : SUBDIRS += db2
qtConfig(sql-sqlite) : SUBDIRS += sqlite
-qtConfig(sql-sqlite2) : SUBDIRS += sqlite2
qtConfig(sql-ibase) : SUBDIRS += ibase
diff --git a/src/plugins/sqldrivers/sqlite/.prev_CMakeLists.txt b/src/plugins/sqldrivers/sqlite/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..d258c23821
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite/.prev_CMakeLists.txt
@@ -0,0 +1,93 @@
+# Generated from sqlite.pro.
+
+#####################################################################
+## QSQLiteDriverPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QSQLiteDriverPlugin
+ OUTPUT_NAME qsqlite
+ TYPE sqldrivers
+ SOURCES
+ qsql_sqlite.cpp qsql_sqlite_p.h
+ smain.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::SqlPrivate
+)
+
+#### Keys ignored in scope 1:.:.:sqlite.pro:<TRUE>:
+# OTHER_FILES = "sqlite.json"
+# QT_FOR_CONFIG = "sqldrivers-private"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(QSQLiteDriverPlugin CONDITION QT_FEATURE_system_sqlite
+ PUBLIC_LIBRARIES
+ sqlite
+)
+
+qt_extend_target(QSQLiteDriverPlugin CONDITION NOT QT_FEATURE_system_sqlite
+ SOURCES
+ ../../../3rdparty/sqlite/sqlite3.c
+ DEFINES
+ SQLITE_ENABLE_COLUMN_METADATA
+ SQLITE_ENABLE_FTS3
+ SQLITE_ENABLE_FTS3_PARENTHESIS
+ SQLITE_ENABLE_FTS5
+ SQLITE_ENABLE_JSON1
+ SQLITE_ENABLE_RTREE
+ SQLITE_OMIT_COMPLETE
+ INCLUDE_DIRECTORIES
+ ../../../3rdparty/sqlite
+)
+
+qt_extend_target(QSQLiteDriverPlugin CONDITION CMAKE_BUILD_TYPE STREQUAL Release AND NOT QT_FEATURE_system_sqlite
+ DEFINES
+ NDEBUG
+)
+
+qt_extend_target(QSQLiteDriverPlugin CONDITION NOT CONFIG___contains___largefile AND NOT QT_FEATURE_system_sqlite
+ DEFINES
+ SQLITE_DISABLE_LFS
+)
+
+qt_extend_target(QSQLiteDriverPlugin CONDITION QT_FEATURE_posix_fallocate AND NOT QT_FEATURE_system_sqlite
+ DEFINES
+ HAVE_POSIX_FALLOCATE=1
+)
+
+qt_extend_target(QSQLiteDriverPlugin CONDITION WINRT AND NOT QT_FEATURE_system_sqlite
+ DEFINES
+ SQLITE_OS_WINRT
+)
+
+#### Keys ignored in scope 8:.:../../../3rdparty:../../../3rdparty/sqlite.pri:WINRT:
+# QMAKE_CFLAGS = "-Gy"
+
+qt_extend_target(QSQLiteDriverPlugin CONDITION QNX AND NOT QT_FEATURE_system_sqlite
+ DEFINES
+ _QNX_SOURCE
+)
+
+qt_extend_target(QSQLiteDriverPlugin CONDITION UNIX AND NOT QT_FEATURE_system_sqlite AND NOT WINRT AND NOT winphone
+ DEFINES
+ HAVE_USLEEP=1
+)
+
+qt_extend_target(QSQLiteDriverPlugin CONDITION QT_FEATURE_dlopen AND NOT QT_FEATURE_system_sqlite
+ PUBLIC_LIBRARIES
+ ${CMAKE_DL_LIBS}
+)
+
+qt_extend_target(QSQLiteDriverPlugin CONDITION NOT QT_FEATURE_dlopen AND NOT QT_FEATURE_system_sqlite
+ DEFINES
+ SQLITE_OMIT_LOAD_EXTENSION
+)
+
+#### Keys ignored in scope 13:.:../../../3rdparty:../../../3rdparty/sqlite.pri:INTEGRITY:
+# QMAKE_CFLAGS = "-include" "qplatformdefs.h"
diff --git a/src/plugins/sqldrivers/sqlite/CMakeLists.txt b/src/plugins/sqldrivers/sqlite/CMakeLists.txt
new file mode 100644
index 0000000000..d1453638b3
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from sqlite.pro.
+
+#####################################################################
+## QSQLiteDriverPlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QSQLiteDriverPlugin
+ OUTPUT_NAME qsqlite
+ TYPE sqldrivers
+ SOURCES
+ qsql_sqlite.cpp qsql_sqlite_p.h
+ smain.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ LIBRARIES # special case
+ SQLite::SQLite3 # special case
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::CorePrivate
+ Qt::SqlPrivate
+)
+
+#### Keys ignored in scope 1:.:.:sqlite.pro:<TRUE>:
+# OTHER_FILES = "sqlite.json"
+# QT_FOR_CONFIG = "sqldrivers-private"
+
+## Scopes:
+#####################################################################
+
+# special case begin
+# Remove non-system-sqlite code
+# qt_extend_target(qsqlite CONDITION QT_FEATURE_system_sqlite
+# special case end
diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
index 5eb9e7d2f8..27e7d02472 100644
--- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
+++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
@@ -1034,15 +1034,8 @@ QStringList QSQLiteDriver::subscribedToNotifications() const
void QSQLiteDriver::handleNotification(const QString &tableName, qint64 rowid)
{
Q_D(const QSQLiteDriver);
- if (d->notificationid.contains(tableName)) {
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- emit notification(tableName);
-QT_WARNING_POP
-#endif
+ if (d->notificationid.contains(tableName))
emit notification(tableName, QSqlDriver::UnknownSource, QVariant(rowid));
- }
}
QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/sqlite2/README b/src/plugins/sqldrivers/sqlite2/README
deleted file mode 100644
index 899361a6f5..0000000000
--- a/src/plugins/sqldrivers/sqlite2/README
+++ /dev/null
@@ -1,6 +0,0 @@
-You will need the SQLite development headers and libraries installed
-before compiling this plugin.
-
-See the Qt SQL documentation for more information on compiling Qt SQL
-driver plugins (sql-driver.html).
-
diff --git a/src/plugins/sqldrivers/sqlite2/qsql_sqlite2.cpp b/src/plugins/sqldrivers/sqlite2/qsql_sqlite2.cpp
deleted file mode 100644
index b7bcd044ab..0000000000
--- a/src/plugins/sqldrivers/sqlite2/qsql_sqlite2.cpp
+++ /dev/null
@@ -1,615 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSql module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qsql_sqlite2_p.h"
-
-#include <qcoreapplication.h>
-#include <qvariant.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qsqlerror.h>
-#include <qsqlfield.h>
-#include <qsqlindex.h>
-#include <qsqlquery.h>
-#include <QtSql/private/qsqlcachedresult_p.h>
-#include <QtSql/private/qsqldriver_p.h>
-#include <qstringlist.h>
-#include <qvector.h>
-
-#if !defined Q_OS_WIN
-# include <unistd.h>
-#endif
-#include <sqlite.h>
-
-typedef struct sqlite_vm sqlite_vm;
-
-Q_DECLARE_OPAQUE_POINTER(sqlite_vm*)
-Q_DECLARE_METATYPE(sqlite_vm*)
-
-Q_DECLARE_OPAQUE_POINTER(sqlite*)
-Q_DECLARE_METATYPE(sqlite*)
-
-QT_BEGIN_NAMESPACE
-
-static QVariant::Type nameToType(const QString& typeName)
-{
- QString tName = typeName.toUpper();
- if (tName.startsWith(QLatin1String("INT")))
- return QVariant::Int;
- if (tName.startsWith(QLatin1String("FLOAT")) || tName.startsWith(QLatin1String("NUMERIC")))
- return QVariant::Double;
- if (tName.startsWith(QLatin1String("BOOL")))
- return QVariant::Bool;
- // SQLite is typeless - consider everything else as string
- return QVariant::String;
-}
-
-class QSQLite2DriverPrivate : public QSqlDriverPrivate
-{
- Q_DECLARE_PUBLIC(QSQLite2Driver)
-
-public:
- QSQLite2DriverPrivate();
- sqlite *access;
- bool utf8;
-};
-
-QSQLite2DriverPrivate::QSQLite2DriverPrivate() : QSqlDriverPrivate(), access(0)
-{
- utf8 = (qstrcmp(sqlite_encoding, "UTF-8") == 0);
- dbmsType = QSqlDriver::SQLite;
-}
-
-class QSQLite2ResultPrivate;
-
-class QSQLite2Result : public QSqlCachedResult
-{
- Q_DECLARE_PRIVATE(QSQLite2Result)
- friend class QSQLite2Driver;
-
-public:
- explicit QSQLite2Result(const QSQLite2Driver* db);
- ~QSQLite2Result();
- QVariant handle() const override;
-
-protected:
- bool gotoNext(QSqlCachedResult::ValueCache &row, int idx) override;
- bool reset(const QString &query) override;
- int size() override;
- int numRowsAffected() override;
- QSqlRecord record() const override;
- void detachFromResultSet() override;
- void virtual_hook(int id, void *data) override;
-};
-
-class QSQLite2ResultPrivate: public QSqlCachedResultPrivate
-{
- Q_DECLARE_PUBLIC(QSQLite2Result)
-
-public:
- Q_DECLARE_SQLDRIVER_PRIVATE(QSQLite2Driver);
- QSQLite2ResultPrivate(QSQLite2Result *q, const QSQLite2Driver *drv);
- void cleanup();
- bool fetchNext(QSqlCachedResult::ValueCache &values, int idx, bool initialFetch);
- bool isSelect();
- // initializes the recordInfo and the cache
- void init(const char **cnames, int numCols);
- void finalize();
-
- // and we have too keep our own struct for the data (sqlite works via
- // callback.
- const char *currentTail;
- sqlite_vm *currentMachine;
-
- bool skippedStatus; // the status of the fetchNext() that's skipped
- bool skipRow; // skip the next fetchNext()?
- QSqlRecord rInf;
- QVector<QVariant> firstRow;
-};
-
-QSQLite2ResultPrivate::QSQLite2ResultPrivate(QSQLite2Result *q, const QSQLite2Driver *drv)
- : QSqlCachedResultPrivate(q, drv),
- currentTail(0),
- currentMachine(0),
- skippedStatus(false),
- skipRow(false)
-{
-}
-
-void QSQLite2ResultPrivate::cleanup()
-{
- Q_Q(QSQLite2Result);
- finalize();
- rInf.clear();
- currentTail = 0;
- currentMachine = 0;
- skippedStatus = false;
- skipRow = false;
- q->setAt(QSql::BeforeFirstRow);
- q->setActive(false);
- q->cleanup();
-}
-
-void QSQLite2ResultPrivate::finalize()
-{
- Q_Q(QSQLite2Result);
- if (!currentMachine)
- return;
-
- char* err = 0;
- int res = sqlite_finalize(currentMachine, &err);
- if (err) {
- q->setLastError(QSqlError(QCoreApplication::translate("QSQLite2Result",
- "Unable to fetch results"), QString::fromLatin1(err),
- QSqlError::StatementError,
- res != -1 ? QString::number(res) : QString()));
- sqlite_freemem(err);
- }
- currentMachine = 0;
-}
-
-// called on first fetch
-void QSQLite2ResultPrivate::init(const char **cnames, int numCols)
-{
- Q_Q(QSQLite2Result);
- if (!cnames)
- return;
-
- rInf.clear();
- if (numCols <= 0)
- return;
- q->init(numCols);
-
- for (int i = 0; i < numCols; ++i) {
- const char* lastDot = strrchr(cnames[i], '.');
- const char* fieldName = lastDot ? lastDot + 1 : cnames[i];
-
- //remove quotations around the field name if any
- QString fieldStr = QString::fromLatin1(fieldName);
- QLatin1Char quote('\"');
- if ( fieldStr.length() > 2 && fieldStr.startsWith(quote) && fieldStr.endsWith(quote)) {
- fieldStr = fieldStr.mid(1);
- fieldStr.chop(1);
- }
- rInf.append(QSqlField(fieldStr,
- nameToType(QString::fromLatin1(cnames[i+numCols]))));
- }
-}
-
-bool QSQLite2ResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, int idx, bool initialFetch)
-{
- Q_Q(QSQLite2Result);
- // may be caching.
- const char **fvals;
- const char **cnames;
- int colNum;
- int res;
- int i;
-
- if (skipRow) {
- // already fetched
- Q_ASSERT(!initialFetch);
- skipRow = false;
- for(int i=0;i<firstRow.count(); i++)
- values[i] = firstRow[i];
- return skippedStatus;
- }
- skipRow = initialFetch;
-
- if (!currentMachine)
- return false;
-
- // keep trying while busy, wish I could implement this better.
- while ((res = sqlite_step(currentMachine, &colNum, &fvals, &cnames)) == SQLITE_BUSY) {
- // sleep instead requesting result again immidiately.
-#if defined Q_OS_WIN
- Sleep(1000);
-#else
- sleep(1);
-#endif
- }
-
- if(initialFetch) {
- firstRow.clear();
- firstRow.resize(colNum);
- }
-
- switch(res) {
- case SQLITE_ROW:
- // check to see if should fill out columns
- if (rInf.isEmpty())
- // must be first call.
- init(cnames, colNum);
- if (!fvals)
- return false;
- if (idx < 0 && !initialFetch)
- return true;
- for (i = 0; i < colNum; ++i)
- values[i + idx] = drv_d_func()->utf8 ? QString::fromUtf8(fvals[i]) : QString::fromLatin1(fvals[i]);
- return true;
- case SQLITE_DONE:
- if (rInf.isEmpty())
- // must be first call.
- init(cnames, colNum);
- q->setAt(QSql::AfterLastRow);
- return false;
- case SQLITE_ERROR:
- case SQLITE_MISUSE:
- default:
- // something wrong, don't get col info, but still return false
- finalize(); // finalize to get the error message.
- q->setAt(QSql::AfterLastRow);
- return false;
- }
- return false;
-}
-
-QSQLite2Result::QSQLite2Result(const QSQLite2Driver* db)
- : QSqlCachedResult(*new QSQLite2ResultPrivate(this, db))
-{
-}
-
-QSQLite2Result::~QSQLite2Result()
-{
- Q_D(QSQLite2Result);
- d->cleanup();
-}
-
-void QSQLite2Result::virtual_hook(int id, void *data)
-{
- QSqlCachedResult::virtual_hook(id, data);
-}
-
-/*
- Execute \a query.
-*/
-bool QSQLite2Result::reset (const QString& query)
-{
- Q_D(QSQLite2Result);
- // this is where we build a query.
- if (!driver())
- return false;
- if (!driver()-> isOpen() || driver()->isOpenError())
- return false;
-
- d->cleanup();
-
- // Um, ok. callback based so.... pass private static function for this.
- setSelect(false);
- char *err = 0;
- int res = sqlite_compile(d->drv_d_func()->access,
- d->drv_d_func()->utf8 ? query.toUtf8().constData()
- : query.toLatin1().constData(),
- &(d->currentTail),
- &(d->currentMachine),
- &err);
- if (res != SQLITE_OK || err) {
- setLastError(QSqlError(QCoreApplication::translate("QSQLite2Result",
- "Unable to execute statement"), QString::fromLatin1(err),
- QSqlError::StatementError, res));
- sqlite_freemem(err);
- }
- //if (*d->currentTail != '\000' then there is more sql to eval
- if (!d->currentMachine) {
- setActive(false);
- return false;
- }
- // we have to fetch one row to find out about
- // the structure of the result set
- d->skippedStatus = d->fetchNext(d->firstRow, 0, true);
- if (lastError().isValid()) {
- setSelect(false);
- setActive(false);
- return false;
- }
- setSelect(!d->rInf.isEmpty());
- setActive(true);
- return true;
-}
-
-bool QSQLite2Result::gotoNext(QSqlCachedResult::ValueCache& row, int idx)
-{
- Q_D(QSQLite2Result);
- return d->fetchNext(row, idx, false);
-}
-
-int QSQLite2Result::size()
-{
- return -1;
-}
-
-int QSQLite2Result::numRowsAffected()
-{
- Q_D(QSQLite2Result);
- return sqlite_changes(d->drv_d_func()->access);
-}
-
-QSqlRecord QSQLite2Result::record() const
-{
- Q_D(const QSQLite2Result);
- if (!isActive() || !isSelect())
- return QSqlRecord();
- return d->rInf;
-}
-
-void QSQLite2Result::detachFromResultSet()
-{
- Q_D(QSQLite2Result);
- d->finalize();
-}
-
-QVariant QSQLite2Result::handle() const
-{
- Q_D(const QSQLite2Result);
- return QVariant::fromValue(d->currentMachine);
-}
-
-/////////////////////////////////////////////////////////
-
-QSQLite2Driver::QSQLite2Driver(QObject *parent)
- : QSqlDriver(*new QSQLite2DriverPrivate, parent)
-{
-}
-
-QSQLite2Driver::QSQLite2Driver(sqlite *connection, QObject *parent)
- : QSqlDriver(*new QSQLite2DriverPrivate, parent)
-{
- Q_D(QSQLite2Driver);
- d->access = connection;
- setOpen(true);
- setOpenError(false);
-}
-
-
-QSQLite2Driver::~QSQLite2Driver()
-{
-}
-
-bool QSQLite2Driver::hasFeature(DriverFeature f) const
-{
- Q_D(const QSQLite2Driver);
- switch (f) {
- case Transactions:
- case SimpleLocking:
- return true;
- case Unicode:
- return d->utf8;
- default:
- return false;
- }
-}
-
-/*
- SQLite dbs have no user name, passwords, hosts or ports.
- just file names.
-*/
-bool QSQLite2Driver::open(const QString & db, const QString &, const QString &, const QString &, int, const QString &)
-{
- Q_D(QSQLite2Driver);
- if (isOpen())
- close();
-
- if (db.isEmpty())
- return false;
-
- char* err = 0;
- d->access = sqlite_open(QFile::encodeName(db), 0, &err);
- if (err) {
- setLastError(QSqlError(tr("Error opening database"), QString::fromLatin1(err),
- QSqlError::ConnectionError));
- sqlite_freemem(err);
- err = 0;
- }
-
- if (d->access) {
- setOpen(true);
- setOpenError(false);
- return true;
- }
- setOpenError(true);
- return false;
-}
-
-void QSQLite2Driver::close()
-{
- Q_D(QSQLite2Driver);
- if (isOpen()) {
- sqlite_close(d->access);
- d->access = 0;
- setOpen(false);
- setOpenError(false);
- }
-}
-
-QSqlResult *QSQLite2Driver::createResult() const
-{
- return new QSQLite2Result(this);
-}
-
-bool QSQLite2Driver::beginTransaction()
-{
- Q_D(QSQLite2Driver);
- if (!isOpen() || isOpenError())
- return false;
-
- char* err;
- int res = sqlite_exec(d->access, "BEGIN", 0, this, &err);
-
- if (res == SQLITE_OK)
- return true;
-
- setLastError(QSqlError(tr("Unable to begin transaction"),
- QString::fromLatin1(err), QSqlError::TransactionError, res));
- sqlite_freemem(err);
- return false;
-}
-
-bool QSQLite2Driver::commitTransaction()
-{
- Q_D(QSQLite2Driver);
- if (!isOpen() || isOpenError())
- return false;
-
- char* err;
- int res = sqlite_exec(d->access, "COMMIT", 0, this, &err);
-
- if (res == SQLITE_OK)
- return true;
-
- setLastError(QSqlError(tr("Unable to commit transaction"),
- QString::fromLatin1(err), QSqlError::TransactionError, res));
- sqlite_freemem(err);
- return false;
-}
-
-bool QSQLite2Driver::rollbackTransaction()
-{
- Q_D(QSQLite2Driver);
- if (!isOpen() || isOpenError())
- return false;
-
- char* err;
- int res = sqlite_exec(d->access, "ROLLBACK", 0, this, &err);
-
- if (res == SQLITE_OK)
- return true;
-
- setLastError(QSqlError(tr("Unable to rollback transaction"),
- QString::fromLatin1(err), QSqlError::TransactionError, res));
- sqlite_freemem(err);
- return false;
-}
-
-QStringList QSQLite2Driver::tables(QSql::TableType type) const
-{
- QStringList res;
- if (!isOpen())
- return res;
-
- QSqlQuery q(createResult());
- q.setForwardOnly(true);
- if ((type & QSql::Tables) && (type & QSql::Views))
- q.exec(QLatin1String("SELECT name FROM sqlite_master WHERE type='table' OR type='view'"));
- else if (type & QSql::Tables)
- q.exec(QLatin1String("SELECT name FROM sqlite_master WHERE type='table'"));
- else if (type & QSql::Views)
- q.exec(QLatin1String("SELECT name FROM sqlite_master WHERE type='view'"));
-
- if (q.isActive()) {
- while(q.next())
- res.append(q.value(0).toString());
- }
-
- if (type & QSql::SystemTables) {
- // there are no internal tables beside this one:
- res.append(QLatin1String("sqlite_master"));
- }
-
- return res;
-}
-
-QSqlIndex QSQLite2Driver::primaryIndex(const QString &tblname) const
-{
- QSqlRecord rec(record(tblname)); // expensive :(
-
- if (!isOpen())
- return QSqlIndex();
-
- QSqlQuery q(createResult());
- q.setForwardOnly(true);
- QString table = tblname;
- if (isIdentifierEscaped(table, QSqlDriver::TableName))
- table = stripDelimiters(table, QSqlDriver::TableName);
- // finrst find a UNIQUE INDEX
- q.exec(QLatin1String("PRAGMA index_list('") + table + QLatin1String("');"));
- QString indexname;
- while(q.next()) {
- if (q.value(2).toInt()==1) {
- indexname = q.value(1).toString();
- break;
- }
- }
- if (indexname.isEmpty())
- return QSqlIndex();
-
- q.exec(QLatin1String("PRAGMA index_info('") + indexname + QLatin1String("');"));
-
- QSqlIndex index(table, indexname);
- while(q.next()) {
- QString name = q.value(2).toString();
- QVariant::Type type = QVariant::Invalid;
- if (rec.contains(name))
- type = rec.field(name).type();
- index.append(QSqlField(name, type, tblname));
- }
- return index;
-}
-
-QSqlRecord QSQLite2Driver::record(const QString &tbl) const
-{
- if (!isOpen())
- return QSqlRecord();
- QString table = tbl;
- if (isIdentifierEscaped(tbl, QSqlDriver::TableName))
- table = stripDelimiters(table, QSqlDriver::TableName);
-
- QSqlQuery q(createResult());
- q.setForwardOnly(true);
- q.exec(QLatin1String("SELECT * FROM ") + tbl + QLatin1String(" LIMIT 1"));
- return q.record();
-}
-
-QVariant QSQLite2Driver::handle() const
-{
- Q_D(const QSQLite2Driver);
- return QVariant::fromValue(d->access);
-}
-
-QString QSQLite2Driver::escapeIdentifier(const QString &identifier, IdentifierType /*type*/) const
-{
- QString res = identifier;
- if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) {
- res.replace(QLatin1Char('"'), QLatin1String("\"\""));
- res.prepend(QLatin1Char('"')).append(QLatin1Char('"'));
- res.replace(QLatin1Char('.'), QLatin1String("\".\""));
- }
- return res;
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/sqlite2/qsql_sqlite2_p.h b/src/plugins/sqldrivers/sqlite2/qsql_sqlite2_p.h
deleted file mode 100644
index 57db0a4d47..0000000000
--- a/src/plugins/sqldrivers/sqlite2/qsql_sqlite2_p.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSql module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QSQL_SQLITE2_H
-#define QSQL_SQLITE2_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtSql/qsqldriver.h>
-
-#if defined (Q_OS_WIN32)
-# include <QtCore/qt_windows.h>
-#endif
-
-struct sqlite;
-
-#ifdef QT_PLUGIN
-#define Q_EXPORT_SQLDRIVER_SQLITE2
-#else
-#define Q_EXPORT_SQLDRIVER_SQLITE2 Q_SQL_EXPORT
-#endif
-
-QT_BEGIN_NAMESPACE
-
-class QSqlResult;
-class QSQLite2DriverPrivate;
-
-class Q_EXPORT_SQLDRIVER_SQLITE2 QSQLite2Driver : public QSqlDriver
-{
- friend class QSQLite2ResultPrivate;
- Q_DECLARE_PRIVATE(QSQLite2Driver)
- Q_OBJECT
-public:
- explicit QSQLite2Driver(QObject *parent = nullptr);
- explicit QSQLite2Driver(sqlite *connection, QObject *parent = nullptr);
- ~QSQLite2Driver();
- bool hasFeature(DriverFeature f) const override;
- bool open(const QString &db,
- const QString &user,
- const QString &password,
- const QString &host,
- int port,
- const QString &connOpts) override;
- bool open(const QString &db,
- const QString &user,
- const QString &password,
- const QString &host,
- int port) { return open(db, user, password, host, port, QString()); }
- void close() override;
- QSqlResult *createResult() const override;
- bool beginTransaction() override;
- bool commitTransaction() override;
- bool rollbackTransaction() override;
- QStringList tables(QSql::TableType) const override;
-
- QSqlRecord record(const QString &tablename) const override;
- QSqlIndex primaryIndex(const QString &table) const override;
- QVariant handle() const override;
- QString escapeIdentifier(const QString &identifier, IdentifierType) const override;
-};
-
-QT_END_NAMESPACE
-
-#endif // QSQL_SQLITE2_H
diff --git a/src/plugins/sqldrivers/sqlite2/smain.cpp b/src/plugins/sqldrivers/sqlite2/smain.cpp
deleted file mode 100644
index 7d971d6e5a..0000000000
--- a/src/plugins/sqldrivers/sqlite2/smain.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qsqldriverplugin.h>
-#include <qstringlist.h>
-#include "qsql_sqlite2_p.h"
-
-QT_BEGIN_NAMESPACE
-
-// ### Qt6: remove, obsolete since 5.14
-class QSQLite2DriverPlugin : public QSqlDriverPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "sqlite2.json")
-
-public:
- QSQLite2DriverPlugin();
-
- QSqlDriver* create(const QString &);
-};
-
-QSQLite2DriverPlugin::QSQLite2DriverPlugin()
- : QSqlDriverPlugin()
-{
-}
-
-QSqlDriver* QSQLite2DriverPlugin::create(const QString &name)
-{
- if (name == QLatin1String("QSQLITE2")) {
- QSQLite2Driver* driver = new QSQLite2Driver();
- return driver;
- }
- return 0;
-}
-
-QT_END_NAMESPACE
-
-#include "smain.moc"
diff --git a/src/plugins/sqldrivers/sqlite2/sqlite2.json b/src/plugins/sqldrivers/sqlite2/sqlite2.json
deleted file mode 100644
index 47bdae4d60..0000000000
--- a/src/plugins/sqldrivers/sqlite2/sqlite2.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "Keys": [ "QSQLITE2" ]
-}
diff --git a/src/plugins/sqldrivers/sqlite2/sqlite2.pro b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
deleted file mode 100644
index 721facb5b8..0000000000
--- a/src/plugins/sqldrivers/sqlite2/sqlite2.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TARGET = qsqlite2
-
-HEADERS += $$PWD/qsql_sqlite2_p.h
-SOURCES += $$PWD/qsql_sqlite2.cpp $$PWD/smain.cpp
-
-QMAKE_USE += sqlite2
-
-OTHER_FILES += sqlite2.json
-
-PLUGIN_CLASS_NAME = QSQLite2DriverPlugin
-include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/tds/README b/src/plugins/sqldrivers/tds/README
deleted file mode 100644
index 3d27ed46d2..0000000000
--- a/src/plugins/sqldrivers/tds/README
+++ /dev/null
@@ -1,6 +0,0 @@
-You will need the dblib development headers and libraries installed before
-compiling this plugin.
-
-See the Qt SQL documentation for more information on compiling Qt SQL
-driver plugins (sql-driver.html).
-
diff --git a/src/plugins/sqldrivers/tds/main.cpp b/src/plugins/sqldrivers/tds/main.cpp
deleted file mode 100644
index 18efb22ea4..0000000000
--- a/src/plugins/sqldrivers/tds/main.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#define Q_UUIDIMPL
-#include <qsqldriverplugin.h>
-#include <qstringlist.h>
-#ifdef Q_OS_WIN32 // We assume that MS SQL Server is used. Set Q_USE_SYBASE to force Sybase.
-// Conflicting declarations of LPCBYTE in sqlfront.h and winscard.h
-#define _WINSCARD_H_
-#include <windows.h>
-#endif
-#include "qsql_tds_p.h"
-
-QT_BEGIN_NAMESPACE
-
-
-// ### Qt6: remove, obsolete since 4.7
-class QTDSDriverPlugin : public QSqlDriverPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "tds.json")
-
-public:
- QTDSDriverPlugin();
-
- QSqlDriver* create(const QString &);
-};
-
-QTDSDriverPlugin::QTDSDriverPlugin()
- : QSqlDriverPlugin()
-{
-}
-
-QSqlDriver* QTDSDriverPlugin::create(const QString &name)
-{
- if (name == QLatin1String("QTDS") || name == QLatin1String("QTDS7")) {
- QTDSDriver* driver = new QTDSDriver();
- return driver;
- }
- return 0;
-}
-
-QT_END_NAMESPACE
-
-#include "main.moc"
diff --git a/src/plugins/sqldrivers/tds/qsql_tds.cpp b/src/plugins/sqldrivers/tds/qsql_tds.cpp
deleted file mode 100644
index 9c8d242028..0000000000
--- a/src/plugins/sqldrivers/tds/qsql_tds.cpp
+++ /dev/null
@@ -1,881 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSql module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qsql_tds_p.h"
-
-#include <qglobal.h>
-#ifdef Q_OS_WIN32 // We assume that MS SQL Server is used. Set Q_USE_SYBASE to force Sybase.
-// Conflicting declarations of LPCBYTE in sqlfront.h and winscard.h
-#define _WINSCARD_H_
-#include <windows.h>
-#else
-#define Q_USE_SYBASE
-#endif
-
-#include <qvariant.h>
-#include <qdatetime.h>
-#include <qhash.h>
-#include <qregexp.h>
-#include <qsqlerror.h>
-#include <qsqlfield.h>
-#include <qsqlindex.h>
-#include <qsqlquery.h>
-#include <QtSql/private/qsqlcachedresult_p.h>
-#include <QtSql/private/qsqldriver_p.h>
-#include <qstringlist.h>
-#include <qvector.h>
-
-#include <stdlib.h>
-
-Q_DECLARE_OPAQUE_POINTER(LOGINREC*)
-Q_DECLARE_OPAQUE_POINTER(DBPROCESS*)
-
-QT_BEGIN_NAMESPACE
-
-#ifdef DBNTWIN32
-#define QMSGHANDLE DBMSGHANDLE_PROC
-#define QERRHANDLE DBERRHANDLE_PROC
-#define QTDSCHAR SQLCHAR
-#define QTDSDATETIME4 SQLDATETIM4
-#define QTDSDATETIME SQLDATETIME
-#define QTDSDATETIME_N SQLDATETIMN
-#define QTDSDECIMAL SQLDECIMAL
-#define QTDSFLT4 SQLFLT4
-#define QTDSFLT8 SQLFLT8
-#define QTDSFLT8_N SQLFLTN
-#define QTDSINT1 SQLINT1
-#define QTDSINT2 SQLINT2
-#define QTDSINT4 SQLINT4
-#define QTDSINT4_N SQLINTN
-#define QTDSMONEY4 SQLMONEY4
-#define QTDSMONEY SQLMONEY
-#define QTDSMONEY_N SQLMONEYN
-#define QTDSNUMERIC SQLNUMERIC
-#define QTDSTEXT SQLTEXT
-#define QTDSVARCHAR SQLVARCHAR
-#define QTDSBIT SQLBIT
-#define QTDSBINARY SQLBINARY
-#define QTDSVARBINARY SQLVARBINARY
-#define QTDSIMAGE SQLIMAGE
-#else
-#define QMSGHANDLE MHANDLEFUNC
-#define QERRHANDLE EHANDLEFUNC
-#define QTDSCHAR SYBCHAR
-#define QTDSDATETIME4 SYBDATETIME4
-#define QTDSDATETIME SYBDATETIME
-#define QTDSDATETIME_N SYBDATETIMN
-#define QTDSDECIMAL SYBDECIMAL
-#define QTDSFLT8 SYBFLT8
-#define QTDSFLT8_N SYBFLTN
-#define QTDSFLT4 SYBREAL
-#define QTDSINT1 SYBINT1
-#define QTDSINT2 SYBINT2
-#define QTDSINT4 SYBINT4
-#define QTDSINT4_N SYBINTN
-#define QTDSMONEY4 SYBMONEY4
-#define QTDSMONEY SYBMONEY
-#define QTDSMONEY_N SYBMONEYN
-#define QTDSNUMERIC SYBNUMERIC
-#define QTDSTEXT SYBTEXT
-#define QTDSVARCHAR SYBVARCHAR
-#define QTDSBIT SYBBIT
-#define QTDSBINARY SYBBINARY
-#define QTDSVARBINARY SYBVARBINARY
-#define QTDSIMAGE SYBIMAGE
-// magic numbers not defined anywhere in Sybase headers
-#define QTDSDECIMAL_2 55
-#define QTDSNUMERIC_2 63
-#endif //DBNTWIN32
-
-#define TDS_CURSOR_SIZE 50
-
-// workaround for FreeTDS
-#ifndef CS_PUBLIC
-#define CS_PUBLIC
-#endif
-
-QSqlError qMakeError(const QString& err, QSqlError::ErrorType type, int errNo = -1)
-{
- return QSqlError(QLatin1String("QTDS: ") + err, QString(), type,
- errNo != -1 ? QString::number(errNo) : QString());
-}
-
-class QTDSDriverPrivate : public QSqlDriverPrivate
-{
- Q_DECLARE_PUBLIC(QTDSDriver)
-
-public:
- QTDSDriverPrivate() : QSqlDriverPrivate(), login(0), initialized(false) { dbmsType = QSqlDriver::Sybase; }
- LOGINREC* login; // login information
- QString hostName;
- QString db;
- bool initialized;
-};
-
-struct QTDSColumnData
-{
- void *data;
- DBINT nullbind;
-};
-Q_DECLARE_TYPEINFO(QTDSColumnData, Q_MOVABLE_TYPE);
-
-class QTDSResultPrivate;
-
-class QTDSResult : public QSqlCachedResult
-{
- Q_DECLARE_PRIVATE(QTDSResult)
-
-public:
- explicit QTDSResult(const QTDSDriver* db);
- ~QTDSResult();
- QVariant handle() const override;
-
-protected:
- void cleanup();
- bool reset(const QString &query) override;
- int size() override;
- int numRowsAffected() override;
- bool gotoNext(QSqlCachedResult::ValueCache &values, int index) override;
- QSqlRecord record() const override;
-};
-
-class QTDSResultPrivate: public QSqlCachedResultPrivate
-{
- Q_DECLARE_PUBLIC(QTDSResult)
-
-public:
- Q_DECLARE_SQLDRIVER_PRIVATE(QTDSDriver)
- QTDSResultPrivate(QTDSResult *q, const QTDSDriver *drv)
- : QSqlCachedResultPrivate(q, drv),
- login(0),
- dbproc(0) {}
- LOGINREC* login; // login information
- DBPROCESS* dbproc; // connection from app to server
- QSqlError lastError;
- void addErrorMsg(QString& errMsg) { errorMsgs.append(errMsg); }
- QString getErrorMsgs() { return errorMsgs.join(QLatin1String("\n")); }
- void clearErrorMsgs() { errorMsgs.clear(); }
- QVector<QTDSColumnData> buffer;
- QSqlRecord rec;
-
-private:
- QStringList errorMsgs;
-};
-
-typedef QHash<DBPROCESS *, QTDSResultPrivate *> QTDSErrorHash;
-Q_GLOBAL_STATIC(QTDSErrorHash, errs)
-
-extern "C" {
-static int CS_PUBLIC qTdsMsgHandler (DBPROCESS* dbproc,
- DBINT msgno,
- int msgstate,
- int severity,
- char* msgtext,
- char* srvname,
- char* /*procname*/,
- int line)
-{
- QTDSResultPrivate* p = errs()->value(dbproc);
-
- if (!p) {
-// ### umm... temporary disabled since this throws a lot of warnings...
-// qWarning("QTDSDriver warning (%d): [%s] from server [%s]", msgstate, msgtext, srvname);
- return INT_CANCEL;
- }
-
- if (severity > 0) {
- QString errMsg = QString::fromLatin1("%1 (Msg %2, Level %3, State %4, Server %5, Line %6)")
- .arg(QString::fromLatin1(msgtext))
- .arg(msgno)
- .arg(severity)
- .arg(msgstate)
- .arg(QString::fromLatin1(srvname))
- .arg(line);
- p->addErrorMsg(errMsg);
- if (severity > 10) {
- // Severe messages are really errors in the sense of lastError
- errMsg = p->getErrorMsgs();
- p->lastError = qMakeError(errMsg, QSqlError::UnknownError, msgno);
- p->clearErrorMsgs();
- }
- }
-
- return INT_CANCEL;
-}
-
-static int CS_PUBLIC qTdsErrHandler(DBPROCESS* dbproc,
- int /*severity*/,
- int dberr,
- int /*oserr*/,
- char* dberrstr,
- char* oserrstr)
-{
- QTDSResultPrivate* p = errs()->value(dbproc);
- if (!p) {
- qWarning("QTDSDriver error (%d): [%s] [%s]", dberr, dberrstr, oserrstr);
- return INT_CANCEL;
- }
- /*
- * If the process is dead or NULL and
- * we are not in the middle of logging in...
- */
- if((dbproc == NULL || DBDEAD(dbproc))) {
- qWarning("QTDSDriver error (%d): [%s] [%s]", dberr, dberrstr, oserrstr);
- return INT_CANCEL;
- }
-
- const QString errMsg = QLatin1String(dberrstr) + QLatin1Char(' ')
- + QLatin1String(oserrstr) + QLatin1Char('\n')
- + p->getErrorMsgs();
- p->lastError = qMakeError(errMsg, QSqlError::UnknownError, dberr);
- p->clearErrorMsgs();
-
- return INT_CANCEL ;
-}
-
-} //extern "C"
-
-
-QVariant::Type qDecodeTDSType(int type)
-{
- QVariant::Type t = QVariant::Invalid;
- switch (type) {
- case QTDSCHAR:
- case QTDSTEXT:
- case QTDSVARCHAR:
- t = QVariant::String;
- break;
- case QTDSINT1:
- case QTDSINT2:
- case QTDSINT4:
- case QTDSINT4_N:
- case QTDSBIT:
- t = QVariant::Int;
- break;
- case QTDSFLT4:
- case QTDSFLT8:
- case QTDSFLT8_N:
- case QTDSMONEY4:
- case QTDSMONEY:
- case QTDSDECIMAL:
- case QTDSNUMERIC:
-#ifdef QTDSNUMERIC_2
- case QTDSNUMERIC_2:
-#endif
-#ifdef QTDSDECIMAL_2
- case QTDSDECIMAL_2:
-#endif
- case QTDSMONEY_N:
- t = QVariant::Double;
- break;
- case QTDSDATETIME4:
- case QTDSDATETIME:
- case QTDSDATETIME_N:
- t = QVariant::DateTime;
- break;
- case QTDSBINARY:
- case QTDSVARBINARY:
- case QTDSIMAGE:
- t = QVariant::ByteArray;
- break;
- default:
- t = QVariant::Invalid;
- break;
- }
- return t;
-}
-
-QVariant::Type qFieldType(QTDSResultPrivate* d, int i)
-{
- QVariant::Type type = qDecodeTDSType(dbcoltype(d->dbproc, i+1));
- return type;
-}
-
-
-QTDSResult::QTDSResult(const QTDSDriver* db)
- : QSqlCachedResult(*new QTDSResultPrivate(this, db))
-{
- Q_D(QTDSResult);
- d->login = d->drv_d_func()->login;
-
- d->dbproc = dbopen(d->login, const_cast<char*>(d->drv_d_func()->hostName.toLatin1().constData()));
- if (!d->dbproc)
- return;
- if (dbuse(d->dbproc, const_cast<char*>(d->drv_d_func()->db.toLatin1().constData())) == FAIL)
- return;
-
- // insert d in error handler dict
- errs()->insert(d->dbproc, d);
- dbcmd(d->dbproc, "set quoted_identifier on");
- dbsqlexec(d->dbproc);
-}
-
-QTDSResult::~QTDSResult()
-{
- Q_D(QTDSResult);
- cleanup();
- if (d->dbproc)
- dbclose(d->dbproc);
- errs()->remove(d->dbproc);
-}
-
-void QTDSResult::cleanup()
-{
- Q_D(QTDSResult);
- d->clearErrorMsgs();
- d->rec.clear();
- for (int i = 0; i < d->buffer.size(); ++i)
- free(d->buffer.at(i).data);
- d->buffer.clear();
- // "can" stands for "cancel"... very clever.
- dbcanquery(d->dbproc);
- dbfreebuf(d->dbproc);
-
- QSqlCachedResult::cleanup();
-}
-
-QVariant QTDSResult::handle() const
-{
- Q_D(const QTDSResult);
- return QVariant(qRegisterMetaType<DBPROCESS *>("DBPROCESS*"), &d->dbproc);
-}
-
-static inline bool qIsNull(const QTDSColumnData &p)
-{
- return p.nullbind == -1;
-}
-
-bool QTDSResult::gotoNext(QSqlCachedResult::ValueCache &values, int index)
-{
- Q_D(QTDSResult);
- STATUS stat = dbnextrow(d->dbproc);
- if (stat == NO_MORE_ROWS) {
- setAt(QSql::AfterLastRow);
- return false;
- }
- if ((stat == FAIL) || (stat == BUF_FULL)) {
- setLastError(d->lastError);
- return false;
- }
-
- if (index < 0)
- return true;
-
- for (int i = 0; i < d->rec.count(); ++i) {
- int idx = index + i;
- switch (d->rec.field(i).type()) {
- case QVariant::DateTime:
- if (qIsNull(d->buffer.at(i))) {
- values[idx] = QVariant(QVariant::DateTime);
- } else {
- DBDATETIME *bdt = (DBDATETIME*) d->buffer.at(i).data;
- QDate date = QDate::fromString(QLatin1String("1900-01-01"), Qt::ISODate);
- QTime time = QTime::fromString(QLatin1String("00:00:00"), Qt::ISODate);
- values[idx] = QDateTime(date.addDays(bdt->dtdays), time.addMSecs(int(bdt->dttime / 0.3)));
- }
- break;
- case QVariant::Int:
- if (qIsNull(d->buffer.at(i)))
- values[idx] = QVariant(QVariant::Int);
- else
- values[idx] = *((int*)d->buffer.at(i).data);
- break;
- case QVariant::Double:
- case QVariant::String:
- if (qIsNull(d->buffer.at(i)))
- values[idx] = QVariant(QVariant::String);
- else
- values[idx] = QString::fromLocal8Bit((const char*)d->buffer.at(i).data).trimmed();
- break;
- case QVariant::ByteArray: {
- if (qIsNull(d->buffer.at(i)))
- values[idx] = QVariant(QVariant::ByteArray);
- else
- values[idx] = QByteArray((const char*)d->buffer.at(i).data);
- break;
- }
- default:
- // should never happen, and we already fired
- // a warning while binding.
- values[idx] = QVariant();
- break;
- }
- }
-
- return true;
-}
-
-bool QTDSResult::reset (const QString& query)
-{
- Q_D(QTDSResult);
- cleanup();
- if (!driver() || !driver()-> isOpen() || driver()->isOpenError())
- return false;
- setActive(false);
- setAt(QSql::BeforeFirstRow);
- if (dbcmd(d->dbproc, const_cast<char*>(query.toLocal8Bit().constData())) == FAIL) {
- setLastError(d->lastError);
- return false;
- }
-
- if (dbsqlexec(d->dbproc) == FAIL) {
- setLastError(d->lastError);
- dbfreebuf(d->dbproc);
- return false;
- }
- if (dbresults(d->dbproc) != SUCCEED) {
- setLastError(d->lastError);
- dbfreebuf(d->dbproc);
- return false;
- }
-
- setSelect((DBCMDROW(d->dbproc) == SUCCEED)); // decide whether or not we are dealing with a SELECT query
- int numCols = dbnumcols(d->dbproc);
- if (numCols > 0) {
- d->buffer.resize(numCols);
- init(numCols);
- }
- for (int i = 0; i < numCols; ++i) {
- int dbType = dbcoltype(d->dbproc, i+1);
- QVariant::Type vType = qDecodeTDSType(dbType);
- QSqlField f(QString::fromLatin1(dbcolname(d->dbproc, i+1)), vType);
- f.setSqlType(dbType);
- f.setLength(dbcollen(d->dbproc, i+1));
- d->rec.append(f);
-
- RETCODE ret = -1;
- void* p = 0;
- switch (vType) {
- case QVariant::Int:
- p = malloc(4);
- ret = dbbind(d->dbproc, i+1, INTBIND, (DBINT) 4, (unsigned char *)p);
- break;
- case QVariant::Double:
- // use string binding to prevent loss of precision
- p = malloc(50);
- ret = dbbind(d->dbproc, i+1, STRINGBIND, 50, (unsigned char *)p);
- break;
- case QVariant::String:
- p = malloc(dbcollen(d->dbproc, i+1) + 1);
- ret = dbbind(d->dbproc, i+1, STRINGBIND, DBINT(dbcollen(d->dbproc, i+1) + 1), (unsigned char *)p);
- break;
- case QVariant::DateTime:
- p = malloc(8);
- ret = dbbind(d->dbproc, i+1, DATETIMEBIND, (DBINT) 8, (unsigned char *)p);
- break;
- case QVariant::ByteArray:
- p = malloc(dbcollen(d->dbproc, i+1) + 1);
- ret = dbbind(d->dbproc, i+1, BINARYBIND, DBINT(dbcollen(d->dbproc, i+1) + 1), (unsigned char *)p);
- break;
- default: //don't bind the field since we do not support it
- qWarning("QTDSResult::reset: Unsupported type for field \"%s\"", dbcolname(d->dbproc, i+1));
- break;
- }
- if (ret == SUCCEED) {
- d->buffer[i].data = p;
- ret = dbnullbind(d->dbproc, i+1, &d->buffer[i].nullbind);
- } else {
- d->buffer[i].data = 0;
- d->buffer[i].nullbind = 0;
- free(p);
- }
- if ((ret != SUCCEED) && (ret != -1)) {
- setLastError(d->lastError);
- return false;
- }
- }
-
- setActive(true);
- return true;
-}
-
-int QTDSResult::size()
-{
- return -1;
-}
-
-int QTDSResult::numRowsAffected()
-{
- Q_D(const QTDSResult);
-#ifdef DBNTWIN32
- if (dbiscount(d->dbproc)) {
- return DBCOUNT(d->dbproc);
- }
- return -1;
-#else
- return DBCOUNT(d->dbproc);
-#endif
-}
-
-QSqlRecord QTDSResult::record() const
-{
- Q_D(const QTDSResult);
- return d->rec;
-}
-
-///////////////////////////////////////////////////////////////////
-
-QTDSDriver::QTDSDriver(QObject* parent)
- : QSqlDriver(*new QTDSDriverPrivate, parent)
-{
- init();
-}
-
-QTDSDriver::QTDSDriver(LOGINREC* rec, const QString& host, const QString &db, QObject* parent)
- : QSqlDriver(*new QTDSDriverPrivate, parent)
-{
- Q_D(QTDSDriver);
- init();
- d->login = rec;
- d->hostName = host;
- d->db = db;
- if (rec) {
- setOpen(true);
- setOpenError(false);
- }
-}
-
-QVariant QTDSDriver::handle() const
-{
- Q_D(const QTDSDriver);
- return QVariant(qRegisterMetaType<LOGINREC *>("LOGINREC*"), &d->login);
-}
-
-void QTDSDriver::init()
-{
- Q_D(QTDSDriver);
- d->initialized = (dbinit() == SUCCEED);
- // the following two code-lines will fail compilation on some FreeTDS versions
- // just comment them out if you have FreeTDS (you won't get any errors and warnings then)
- dberrhandle((QERRHANDLE)qTdsErrHandler);
- dbmsghandle((QMSGHANDLE)qTdsMsgHandler);
-}
-
-QTDSDriver::~QTDSDriver()
-{
- dberrhandle(0);
- dbmsghandle(0);
- // dbexit also calls dbclose if necessary
- dbexit();
-}
-
-bool QTDSDriver::hasFeature(DriverFeature f) const
-{
- switch (f) {
- case Transactions:
- case QuerySize:
- case Unicode:
- case SimpleLocking:
- case EventNotifications:
- case MultipleResultSets:
- return false;
- case BLOB:
- return true;
- default:
- return false;
- }
-}
-
-bool QTDSDriver::open(const QString & db,
- const QString & user,
- const QString & password,
- const QString & host,
- int /*port*/,
- const QString& /*connOpts*/)
-{
- Q_D(QTDSDriver);
- if (isOpen())
- close();
- if (!d->initialized) {
- setOpenError(true);
- return false;
- }
- d->login = dblogin();
- if (!d->login) {
- setOpenError(true);
- return false;
- }
- DBSETLPWD(d->login, const_cast<char*>(password.toLocal8Bit().constData()));
- DBSETLUSER(d->login, const_cast<char*>(user.toLocal8Bit().constData()));
-
- // Now, try to open and use the database. If this fails, return false.
- DBPROCESS* dbproc;
-
- dbproc = dbopen(d->login, const_cast<char*>(host.toLatin1().constData()));
- if (!dbproc) {
- setLastError(qMakeError(tr("Unable to open connection"), QSqlError::ConnectionError, -1));
- setOpenError(true);
- return false;
- }
- if (dbuse(dbproc, const_cast<char*>(db.toLatin1().constData())) == FAIL) {
- setLastError(qMakeError(tr("Unable to use database"), QSqlError::ConnectionError, -1));
- setOpenError(true);
- return false;
- }
- dbclose( dbproc );
-
- setOpen(true);
- setOpenError(false);
- d->hostName = host;
- d->db = db;
- return true;
-}
-
-void QTDSDriver::close()
-{
- Q_D(QTDSDriver);
- if (isOpen()) {
-#ifdef Q_USE_SYBASE
- dbloginfree(d->login);
-#else
- dbfreelogin(d->login);
-#endif
- d->login = 0;
- setOpen(false);
- setOpenError(false);
- }
-}
-
-QSqlResult *QTDSDriver::createResult() const
-{
- return new QTDSResult(this);
-}
-
-bool QTDSDriver::beginTransaction()
-{
- return false;
-/*
- if (!isOpen()) {
- qWarning("QTDSDriver::beginTransaction: Database not open");
- return false;
- }
- if (dbcmd(d->dbproc, "BEGIN TRANSACTION") == FAIL) {
- setLastError(d->lastError);
- dbfreebuf(d->dbproc);
- return false;
- }
- if (dbsqlexec(d->dbproc) == FAIL) {
- setLastError(d->lastError);
- dbfreebuf(d->dbproc);
- return false;
- }
- while(dbresults(d->dbproc) == NO_MORE_RESULTS) {}
- dbfreebuf(d->dbproc);
- inTransaction = true;
- return true;
-*/
-}
-
-bool QTDSDriver::commitTransaction()
-{
- return false;
-/*
- if (!isOpen()) {
- qWarning("QTDSDriver::commitTransaction: Database not open");
- return false;
- }
- if (dbcmd(d->dbproc, "COMMIT TRANSACTION") == FAIL) {
- setLastError(d->lastError);
- dbfreebuf(d->dbproc);
- return false;
- }
- if (dbsqlexec(d->dbproc) == FAIL) {
- setLastError(d->lastError);
- dbfreebuf(d->dbproc);
- return false;
- }
- while(dbresults(d->dbproc) == NO_MORE_RESULTS) {}
- dbfreebuf(d->dbproc);
- inTransaction = false;
- return true;
-*/
-}
-
-bool QTDSDriver::rollbackTransaction()
-{
- return false;
-/*
- if (!isOpen()) {
- qWarning("QTDSDriver::rollbackTransaction: Database not open");
- return false;
- }
- if (dbcmd(d->dbproc, "ROLLBACK TRANSACTION") == FAIL) {
- setLastError(d->lastError);
- dbfreebuf(d->dbproc);
- return false;
- }
- if (dbsqlexec(d->dbproc) == FAIL) {
- setLastError(d->lastError);
- dbfreebuf(d->dbproc);
- return false;
- }
- while(dbresults(d->dbproc) == NO_MORE_RESULTS) {}
- dbfreebuf(d->dbproc);
- inTransaction = false;
- return true;
-*/
-}
-
-QSqlRecord QTDSDriver::record(const QString& tablename) const
-{
- QSqlRecord info;
- if (!isOpen())
- return info;
- QSqlQuery t(createResult());
- t.setForwardOnly(true);
-
- QString table = tablename;
- if (isIdentifierEscaped(table, QSqlDriver::TableName))
- table = stripDelimiters(table, QSqlDriver::TableName);
-
- QString stmt (QLatin1String("select name, type, length, prec from syscolumns "
- "where id = (select id from sysobjects where name = '%1')"));
- t.exec(stmt.arg(table));
- while (t.next()) {
- QSqlField f(t.value(0).toString().simplified(), qDecodeTDSType(t.value(1).toInt()), tablename);
- f.setLength(t.value(2).toInt());
- f.setPrecision(t.value(3).toInt());
- f.setSqlType(t.value(1).toInt());
- info.append(f);
- }
- return info;
-}
-
-QStringList QTDSDriver::tables(QSql::TableType type) const
-{
- QStringList list;
-
- if (!isOpen())
- return list;
-
- QStringList typeFilter;
-
- if (type & QSql::Tables)
- typeFilter += QLatin1String("type='U'");
- if (type & QSql::SystemTables)
- typeFilter += QLatin1String("type='S'");
- if (type & QSql::Views)
- typeFilter += QLatin1String("type='V'");
-
- if (typeFilter.isEmpty())
- return list;
-
- QSqlQuery t(createResult());
- t.setForwardOnly(true);
- t.exec(QLatin1String("select name from sysobjects where ") + typeFilter.join(QLatin1String(" or ")));
- while (t.next())
- list.append(t.value(0).toString().simplified());
-
- return list;
-}
-
-QString QTDSDriver::formatValue(const QSqlField &field,
- bool trim) const
-{
- QString r;
- if (field.isNull())
- r = QLatin1String("NULL");
- else if (field.type() == QVariant::DateTime) {
- if (field.value().toDateTime().isValid()){
- r = field.value().toDateTime().toString(u"yyyyMMdd hh:mm:ss");
- r.prepend(QLatin1String("'"));
- r.append(QLatin1String("'"));
- } else
- r = QLatin1String("NULL");
- } else if (field.type() == QVariant::ByteArray) {
- QByteArray ba = field.value().toByteArray();
- QString res;
- static const char hexchars[] = "0123456789abcdef";
- for (int i = 0; i < ba.size(); ++i) {
- uchar s = (uchar) ba[i];
- res += QLatin1Char(hexchars[s >> 4]);
- res += QLatin1Char(hexchars[s & 0x0f]);
- }
- r = QLatin1String("0x") + res;
- } else {
- r = QSqlDriver::formatValue(field, trim);
- }
- return r;
-}
-
-QSqlIndex QTDSDriver::primaryIndex(const QString& tablename) const
-{
- QSqlRecord rec = record(tablename);
-
- QString table = tablename;
- if (isIdentifierEscaped(table, QSqlDriver::TableName))
- table = stripDelimiters(table, QSqlDriver::TableName);
-
- QSqlIndex idx(table);
- if ((!isOpen()) || (table.isEmpty()))
- return QSqlIndex();
-
- QSqlQuery t(createResult());
- t.setForwardOnly(true);
- t.exec(QString::fromLatin1("sp_helpindex '%1'").arg(table));
- if (t.next()) {
- QStringList fNames = t.value(2).toString().simplified().split(QLatin1Char(','));
- QRegExp regx(QLatin1String("\\s*(\\S+)(?:\\s+(DESC|desc))?\\s*"));
- for(QStringList::Iterator it = fNames.begin(); it != fNames.end(); ++it) {
- regx.indexIn(*it);
- QSqlField f(regx.cap(1), rec.field(regx.cap(1)).type(), tablename);
- if (regx.cap(2).toLower() == QLatin1String("desc")) {
- idx.append(f, true);
- } else {
- idx.append(f, false);
- }
- }
- idx.setName(t.value(0).toString().simplified());
- }
- return idx;
-}
-
-QString QTDSDriver::escapeIdentifier(const QString &identifier, IdentifierType type) const
-{
- Q_UNUSED(type)
- QString res = identifier;
- if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) {
- res.replace(QLatin1Char('"'), QLatin1String("\"\""));
- res.prepend(QLatin1Char('"')).append(QLatin1Char('"'));
- res.replace(QLatin1Char('.'), QLatin1String("\".\""));
- }
- return res;
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/tds/qsql_tds_p.h b/src/plugins/sqldrivers/tds/qsql_tds_p.h
deleted file mode 100644
index b72fababbb..0000000000
--- a/src/plugins/sqldrivers/tds/qsql_tds_p.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSql module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QSQL_TDS_H
-#define QSQL_TDS_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtSql/qsqldriver.h>
-
-#ifdef Q_OS_WIN32
-#define WIN32_LEAN_AND_MEAN
-#ifndef Q_USE_SYBASE
-#define DBNTWIN32 // indicates 32bit windows dblib
-#endif
-#include <winsock2.h>
-#include <QtCore/qt_windows.h>
-#include <sqlfront.h>
-#include <sqldb.h>
-#define CS_PUBLIC
-#else
-#include <sybfront.h>
-#include <sybdb.h>
-#endif //Q_OS_WIN32
-
-#ifdef QT_PLUGIN
-#define Q_EXPORT_SQLDRIVER_TDS
-#else
-#define Q_EXPORT_SQLDRIVER_TDS Q_SQL_EXPORT
-#endif
-
-QT_BEGIN_NAMESPACE
-
-class QSqlResult;
-class QTDSDriverPrivate;
-
-class Q_EXPORT_SQLDRIVER_TDS QTDSDriver : public QSqlDriver
-{
- Q_DECLARE_PRIVATE(QTDSDriver)
- Q_OBJECT
- friend class QTDSResultPrivate;
-public:
- explicit QTDSDriver(QObject* parent = nullptr);
- QTDSDriver(LOGINREC* rec, const QString& host, const QString &db, QObject* parent = nullptr);
- ~QTDSDriver();
- bool hasFeature(DriverFeature f) const override;
- bool open(const QString &db,
- const QString &user,
- const QString &password,
- const QString &host,
- int port,
- const QString &connOpts) override;
- void close() override;
- QStringList tables(QSql::TableType) const override;
- QSqlResult *createResult() const override;
- QSqlRecord record(const QString &tablename) const override;
- QSqlIndex primaryIndex(const QString &tablename) const override;
-
- QString formatValue(const QSqlField &field,
- bool trimStrings) const override;
- QVariant handle() const override;
-
- QString escapeIdentifier(const QString &identifier, IdentifierType type) const override;
-
-protected:
- bool beginTransaction() override;
- bool commitTransaction() override;
- bool rollbackTransaction() override;
-private:
- void init();
-};
-
-QT_END_NAMESPACE
-
-#endif // QSQL_TDS_H
diff --git a/src/plugins/sqldrivers/tds/tds.json b/src/plugins/sqldrivers/tds/tds.json
deleted file mode 100644
index 35955db9fa..0000000000
--- a/src/plugins/sqldrivers/tds/tds.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "Keys": [ "QTDS7", "QTDS" ]
-}
diff --git a/src/plugins/sqldrivers/tds/tds.pro b/src/plugins/sqldrivers/tds/tds.pro
deleted file mode 100644
index 67bc0f5c48..0000000000
--- a/src/plugins/sqldrivers/tds/tds.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TARGET = qsqltds
-
-HEADERS += $$PWD/qsql_tds_p.h
-SOURCES += $$PWD/qsql_tds.cpp $$PWD/main.cpp
-
-QMAKE_USE += tds
-
-OTHER_FILES += tds.json
-
-PLUGIN_CLASS_NAME = QTDSDriverPlugin
-include(../qsqldriverbase.pri)
diff --git a/src/plugins/styles/.prev_CMakeLists.txt b/src/plugins/styles/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..73329915f6
--- /dev/null
+++ b/src/plugins/styles/.prev_CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from styles.pro.
+
+if(QT_FEATURE_style_android)
+ add_subdirectory(android)
+endif()
+if(QT_FEATURE_style_mac)
+ add_subdirectory(mac)
+endif()
+if(QT_FEATURE_style_windowsvista)
+ add_subdirectory(windowsvista)
+endif()
diff --git a/src/plugins/styles/CMakeLists.txt b/src/plugins/styles/CMakeLists.txt
new file mode 100644
index 0000000000..d24e3daff8
--- /dev/null
+++ b/src/plugins/styles/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from styles.pro.
+
+if(QT_FEATURE_style_android)
+ # add_subdirectory(android) # special case TODO
+endif()
+if(QT_FEATURE_style_mac)
+ add_subdirectory(mac)
+endif()
+if(QT_FEATURE_style_windowsvista)
+ add_subdirectory(windowsvista)
+endif()
diff --git a/src/plugins/styles/android/qandroidstyle.cpp b/src/plugins/styles/android/qandroidstyle.cpp
index 086df92322..1d0838daec 100644
--- a/src/plugins/styles/android/qandroidstyle.cpp
+++ b/src/plugins/styles/android/qandroidstyle.cpp
@@ -248,7 +248,7 @@ QAndroidStyle::ItemType QAndroidStyle::qtControl(QStyle::PrimitiveElement primit
case QStyle::PE_FrameLineEdit:
return QC_EditText;
- case QStyle::PE_IndicatorViewItemCheck:
+ case QStyle::PE_IndicatorItemViewItemCheck:
case QStyle::PE_IndicatorCheckBox:
return QC_Checkbox;
diff --git a/src/plugins/styles/mac/CMakeLists.txt b/src/plugins/styles/mac/CMakeLists.txt
new file mode 100644
index 0000000000..140d4e4c93
--- /dev/null
+++ b/src/plugins/styles/mac/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from mac.pro.
+
+#####################################################################
+## QMacStylePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QMacStylePlugin
+ OUTPUT_NAME qmacstyle
+ TYPE styles
+ SOURCES
+ main.mm
+ qmacstyle_mac.mm qmacstyle_mac_p.h
+ qmacstyle_mac_p_p.h
+ LIBRARIES
+ ${FWAppKit}
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 1:.:.:mac.pro:<TRUE>:
+# DISTFILES = "macstyle.json"
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index d5ad1a8ca0..f473c3cbe3 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -854,7 +854,8 @@ static inline int qt_mac_aqua_get_metric(QAquaMetric m)
return qt_mac_aqua_metrics[m];
}
-static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg, QSize szHint,
+static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QStyleOption *opt,
+ const QWidget *widg, QSize szHint,
QStyleHelper::WidgetSizePolicy sz)
{
QSize ret(-1, -1);
@@ -918,12 +919,9 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
switch (ct) {
#if QT_CONFIG(pushbutton)
case QStyle::CT_PushButton: {
- const QPushButton *psh = qobject_cast<const QPushButton *>(widg);
- // If this comparison is false, then the widget was not a push button.
- // This is bad and there's very little we can do since we were requested to find a
- // sensible size for a widget that pretends to be a QPushButton but is not.
- if(psh) {
- QString buttonText = qt_mac_removeMnemonics(psh->text());
+ const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt);
+ if (btn) {
+ QString buttonText = qt_mac_removeMnemonics(btn->text);
if (buttonText.contains(QLatin1Char('\n')))
ret = QSize(-1, -1);
else if (sz == QStyleHelper::SizeLarge)
@@ -933,11 +931,11 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
else if (sz == QStyleHelper::SizeMini)
ret = QSize(-1, qt_mac_aqua_get_metric(MiniPushButtonHeight));
- if (!psh->icon().isNull()){
+ if (!btn->icon.isNull()){
// If the button got an icon, and the icon is larger than the
// button, we can't decide on a default size
ret.setWidth(-1);
- if (ret.height() < psh->iconSize().height())
+ if (ret.height() < btn->iconSize.height())
ret.setHeight(-1);
}
else if (buttonText == QLatin1String("OK") || buttonText == QLatin1String("Cancel")){
@@ -951,18 +949,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
// or accept button (i.e., rightmost) and cancel button have the same width.
ret.setWidth(69);
}
- } else {
- // The only sensible thing to do is to return whatever the style suggests...
- if (sz == QStyleHelper::SizeLarge)
- ret = QSize(-1, qt_mac_aqua_get_metric(PushButtonHeight));
- else if (sz == QStyleHelper::SizeSmall)
- ret = QSize(-1, qt_mac_aqua_get_metric(SmallPushButtonHeight));
- else if (sz == QStyleHelper::SizeMini)
- ret = QSize(-1, qt_mac_aqua_get_metric(MiniPushButtonHeight));
- else
- // Since there's no default size we return the large size...
- ret = QSize(-1, qt_mac_aqua_get_metric(PushButtonHeight));
- }
+ }
#endif
#if 0 //Not sure we are applying the rules correctly for RadioButtons/CheckBoxes --Sam
} else if (ct == QStyle::CT_RadioButton) {
@@ -1018,19 +1005,19 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
int width = 0, height = 0;
if (szHint == QSize(-1, -1)) { //just 'guess'..
#if QT_CONFIG(toolbutton)
- const QToolButton *bt = qobject_cast<const QToolButton *>(widg);
+ const QStyleOptionToolButton *bt = qstyleoption_cast<const QStyleOptionToolButton *>(opt);
// If this conversion fails then the widget was not what it claimed to be.
if(bt) {
- if (!bt->icon().isNull()) {
- QSize iconSize = bt->iconSize();
- QSize pmSize = bt->icon().actualSize(QSize(32, 32), QIcon::Normal);
+ if (!bt->icon.isNull()) {
+ QSize iconSize = bt->iconSize;
+ QSize pmSize = bt->icon.actualSize(QSize(32, 32), QIcon::Normal);
width = qMax(width, qMax(iconSize.width(), pmSize.width()));
height = qMax(height, qMax(iconSize.height(), pmSize.height()));
}
- if (!bt->text().isNull() && bt->toolButtonStyle() != Qt::ToolButtonIconOnly) {
- int text_width = bt->fontMetrics().horizontalAdvance(bt->text()),
- text_height = bt->fontMetrics().height();
- if (bt->toolButtonStyle() == Qt::ToolButtonTextUnderIcon) {
+ if (!bt->text.isNull() && bt->toolButtonStyle != Qt::ToolButtonIconOnly) {
+ int text_width = bt->fontMetrics.horizontalAdvance(bt->text),
+ text_height = bt->fontMetrics.height();
+ if (bt->toolButtonStyle == Qt::ToolButtonTextUnderIcon) {
width = qMax(width, text_width);
height += text_height;
} else {
@@ -1056,37 +1043,37 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
break;
case QStyle::CT_Slider: {
int w = -1;
- const QSlider *sld = qobject_cast<const QSlider *>(widg);
+ const QStyleOptionSlider *sld = qstyleoption_cast<const QStyleOptionSlider *>(opt);
// If this conversion fails then the widget was not what it claimed to be.
if(sld) {
if (sz == QStyleHelper::SizeLarge) {
- if (sld->orientation() == Qt::Horizontal) {
+ if (sld->orientation == Qt::Horizontal) {
w = qt_mac_aqua_get_metric(HSliderHeight);
- if (sld->tickPosition() != QSlider::NoTicks)
+ if (sld->tickPosition != QSlider::NoTicks)
w += qt_mac_aqua_get_metric(HSliderTickHeight);
} else {
w = qt_mac_aqua_get_metric(VSliderWidth);
- if (sld->tickPosition() != QSlider::NoTicks)
+ if (sld->tickPosition != QSlider::NoTicks)
w += qt_mac_aqua_get_metric(VSliderTickWidth);
}
} else if (sz == QStyleHelper::SizeSmall) {
- if (sld->orientation() == Qt::Horizontal) {
+ if (sld->orientation == Qt::Horizontal) {
w = qt_mac_aqua_get_metric(SmallHSliderHeight);
- if (sld->tickPosition() != QSlider::NoTicks)
+ if (sld->tickPosition != QSlider::NoTicks)
w += qt_mac_aqua_get_metric(SmallHSliderTickHeight);
} else {
w = qt_mac_aqua_get_metric(SmallVSliderWidth);
- if (sld->tickPosition() != QSlider::NoTicks)
+ if (sld->tickPosition != QSlider::NoTicks)
w += qt_mac_aqua_get_metric(SmallVSliderTickWidth);
}
} else if (sz == QStyleHelper::SizeMini) {
- if (sld->orientation() == Qt::Horizontal) {
+ if (sld->orientation == Qt::Horizontal) {
w = qt_mac_aqua_get_metric(MiniHSliderHeight);
- if (sld->tickPosition() != QSlider::NoTicks)
+ if (sld->tickPosition != QSlider::NoTicks)
w += qt_mac_aqua_get_metric(MiniHSliderTickHeight);
} else {
w = qt_mac_aqua_get_metric(MiniVSliderWidth);
- if (sld->tickPosition() != QSlider::NoTicks)
+ if (sld->tickPosition != QSlider::NoTicks)
w += qt_mac_aqua_get_metric(MiniVSliderTickWidth);
}
}
@@ -1098,7 +1085,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
w = qt_mac_aqua_get_metric(HSliderHeight);
w += qt_mac_aqua_get_metric(HSliderTickHeight);
}
- if (sld->orientation() == Qt::Horizontal)
+ if (sld->orientation == Qt::Horizontal)
ret.setHeight(w);
else
ret.setWidth(w);
@@ -1496,9 +1483,9 @@ QStyleHelper::WidgetSizePolicy QMacStylePrivate::aquaSizeConstrain(const QStyleO
return QStyleHelper::SizeDefault;
}
- QSize large = qt_aqua_get_known_size(ct, widg, szHint, QStyleHelper::SizeLarge),
- small = qt_aqua_get_known_size(ct, widg, szHint, QStyleHelper::SizeSmall),
- mini = qt_aqua_get_known_size(ct, widg, szHint, QStyleHelper::SizeMini);
+ QSize large = qt_aqua_get_known_size(ct, option, widg, szHint, QStyleHelper::SizeLarge),
+ small = qt_aqua_get_known_size(ct, option, widg, szHint, QStyleHelper::SizeSmall),
+ mini = qt_aqua_get_known_size(ct, option, widg, szHint, QStyleHelper::SizeMini);
bool guess_size = false;
QStyleHelper::WidgetSizePolicy ret = QStyleHelper::SizeDefault;
QStyleHelper::WidgetSizePolicy wsp = QStyleHelper::widgetSizePolicy(widg);
@@ -2489,7 +2476,7 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
aSize = QStyleHelper::SizeSmall;
else
aSize = QStyleHelper::SizeLarge;
- const QSize size = qt_aqua_get_known_size(CT_SizeGrip, widget, QSize(), aSize);
+ const QSize size = qt_aqua_get_known_size(CT_SizeGrip, opt, widget, QSize(), aSize);
ret = size.width();
break; }
case PM_MdiSubWindowFrameWidth:
@@ -2766,12 +2753,12 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
}
const QRgb *sptr = (QRgb*)img.bits(), *srow;
- const int sbpl = img.bytesPerLine();
+ const qsizetype sbpl = img.bytesPerLine();
const int w = sbpl/4, h = img.height();
QImage img_mask(img.width(), img.height(), QImage::Format_ARGB32);
QRgb *dptr = (QRgb*)img_mask.bits(), *drow;
- const int dbpl = img_mask.bytesPerLine();
+ const qsizetype dbpl = img_mask.bytesPerLine();
for (int y = 0; y < h; ++y) {
srow = sptr+((y*sbpl)/4);
@@ -3262,7 +3249,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
CGContextRestoreGState(cg);
break; }
- case PE_IndicatorViewItemCheck:
+ case PE_IndicatorItemViewItemCheck:
case PE_IndicatorRadioButton:
case PE_IndicatorCheckBox: {
const bool isEnabled = opt->state & State_Enabled;
diff --git a/src/plugins/styles/windowsvista/CMakeLists.txt b/src/plugins/styles/windowsvista/CMakeLists.txt
new file mode 100644
index 0000000000..008fa624fe
--- /dev/null
+++ b/src/plugins/styles/windowsvista/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from windowsvista.pro.
+
+#####################################################################
+## QWindowsVistaStylePlugin Plugin:
+#####################################################################
+
+qt_add_plugin(QWindowsVistaStylePlugin
+ OUTPUT_NAME qwindowsvistastyle
+ TYPE styles
+ SOURCES
+ main.cpp
+ qwindowsvistastyle.cpp qwindowsvistastyle_p.h
+ qwindowsvistastyle_p_p.h
+ qwindowsxpstyle.cpp qwindowsxpstyle_p.h
+ qwindowsxpstyle_p_p.h
+ LIBRARIES
+ gdi32
+ user32
+ uxtheme
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 1:.:.:windowsvista.pro:<TRUE>:
+# DISTFILES = "windowsvistastyle.json"