summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2018-06-01 14:15:15 +0200
committerMorten Johan Sørvig <morten.sorvig@qt.io>2018-06-01 14:15:15 +0200
commit02c8fa204f53af27907ef48bc74c500d7a05c3a0 (patch)
tree56519f143a72884a47c757d96c411e26c10c8a10 /src
parent36e8cf3cdb50c0447695f35c2e63eed139704c13 (diff)
parent0a63d5fed6e020e81d3c570d299d1292c33fa284 (diff)
Merge remote-tracking branch 'gerrit/5.11' into wip/webassembly
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/forkfd/forkfd.c85
-rw-r--r--src/3rdparty/freetype/LICENSE.txt2
-rw-r--r--src/android/java/res/values-de/strings.xml1
-rw-r--r--src/android/java/res/values-fr/strings.xml1
-rw-r--r--src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java63
-rw-r--r--src/corelib/configure.json3
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp16
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp13
-rw-r--r--src/corelib/doc/snippets/qstringlist/main.cpp11
-rw-r--r--src/corelib/global/qglobal.cpp78
-rw-r--r--src/corelib/global/qglobal.h2
-rw-r--r--src/corelib/global/qlogging.cpp3
-rw-r--r--src/corelib/global/qnamespace.qdoc9
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.mm2
-rw-r--r--src/corelib/io/qloggingcategory.cpp27
-rw-r--r--src/corelib/io/qprocess_unix.cpp2
-rw-r--r--src/corelib/io/qprocess_win.cpp7
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp69
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp5
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.h1
-rw-r--r--src/corelib/kernel/qcore_mac_objc.mm28
-rw-r--r--src/corelib/kernel/qcore_mac_p.h14
-rw-r--r--src/corelib/kernel/qeventdispatcher_cf.mm17
-rw-r--r--src/corelib/kernel/qobject.cpp1
-rw-r--r--src/corelib/mimetypes/qmimedatabase.cpp4
-rw-r--r--src/corelib/serialization/qjson.cpp45
-rw-r--r--src/corelib/serialization/qjson_p.h2
-rw-r--r--src/corelib/serialization/qjsondocument.cpp3
-rw-r--r--src/corelib/tools/qarraydataops.h10
-rw-r--r--src/corelib/tools/qbytearray.cpp67
-rw-r--r--src/corelib/tools/qdatetimeparser.cpp2
-rw-r--r--src/corelib/tools/qlist.cpp13
-rw-r--r--src/corelib/tools/qlocale_unix.cpp52
-rw-r--r--src/corelib/tools/qpoint.h12
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h11
-rw-r--r--src/corelib/tools/qsimd_p.h5
-rw-r--r--src/corelib/tools/qstring.cpp97
-rw-r--r--src/corelib/tools/qstringlist.cpp15
-rw-r--r--src/dbus/qdbusmisc.cpp7
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp4
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.h4
-rw-r--r--src/gui/kernel/kernel.pri27
-rw-r--r--src/gui/kernel/qdnd.cpp217
-rw-r--r--src/gui/kernel/qdnd_p.h41
-rw-r--r--src/gui/kernel/qdrag.cpp4
-rw-r--r--src/gui/kernel/qdrag.h6
-rw-r--r--src/gui/kernel/qevent.cpp19
-rw-r--r--src/gui/kernel/qevent.h4
-rw-r--r--src/gui/kernel/qguiapplication.cpp13
-rw-r--r--src/gui/kernel/qguiapplication_p.h10
-rw-r--r--src/gui/kernel/qinputdevicemanager.cpp23
-rw-r--r--src/gui/kernel/qinputdevicemanager_p.h2
-rw-r--r--src/gui/kernel/qinternalmimedata.cpp234
-rw-r--r--src/gui/kernel/qinternalmimedata_p.h93
-rw-r--r--src/gui/kernel/qplatformdrag.cpp3
-rw-r--r--src/gui/kernel/qplatformdrag.h6
-rw-r--r--src/gui/kernel/qplatformintegration.cpp7
-rw-r--r--src/gui/kernel/qplatformintegration.h2
-rw-r--r--src/gui/kernel/qshapedpixmapdndwindow_p.h2
-rw-r--r--src/gui/kernel/qshortcutmap.cpp13
-rw-r--r--src/gui/kernel/qsimpledrag.cpp4
-rw-r--r--src/gui/kernel/qsimpledrag_p.h6
-rw-r--r--src/gui/kernel/qwindow.cpp8
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp14
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h3
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp716
-rw-r--r--src/gui/opengl/qopengltexturehelper.cpp6
-rw-r--r--src/gui/painting/qdrawhelper.cpp4
-rw-r--r--src/gui/painting/qdrawhelper_p.h5
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp10
-rw-r--r--src/network/access/qhttp2protocolhandler.cpp1
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp4
-rw-r--r--src/network/access/qnetworkcookiejar.cpp16
-rw-r--r--src/network/access/qnetworkrequest.cpp3
-rw-r--r--src/network/kernel/qnetworkinterface_linux.cpp6
-rw-r--r--src/network/ssl/qsslkey_openssl.cpp41
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp4
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp8
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h4
-rw-r--r--src/network/ssl/qsslsocket_winrt.cpp4
-rw-r--r--src/platformheaders/eglfsfunctions/qeglfsfunctions.qdoc15
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp47
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm11
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp3
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp5
-rw-r--r--src/platformsupport/input/libinput/qlibinputkeyboard.cpp24
-rw-r--r--src/platformsupport/input/libinput/qlibinputkeyboard_p.h1
-rw-r--r--src/platformsupport/input/libinput/qlibinputpointer.cpp2
-rw-r--r--src/plugins/platforms/cocoa/qcocoacursor.mm1
-rw-r--r--src/plugins/platforms/cocoa/qcocoadrag.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm7
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.mm10
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm8
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm2
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.mm24
-rw-r--r--src/plugins/platforms/cocoa/qprintengine_mac.mm14
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_rcar/qeglfsrcarintegration.cpp26
-rw-r--r--src/plugins/platforms/ios/qiosapplicationstate.mm27
-rw-r--r--src/plugins/platforms/ios/qioseventdispatcher.h15
-rw-r--r--src/plugins/platforms/ios/qioseventdispatcher.mm62
-rw-r--r--src/plugins/platforms/ios/qiosintegration.mm5
-rw-r--r--src/plugins/platforms/ios/quiview.mm3
-rw-r--r--src/plugins/platforms/offscreen/qoffscreencommon.h4
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration.cpp4
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration.h4
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp6
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.h4
-rw-r--r--src/plugins/platforms/qnx/qqnxkeytranslator.h245
-rw-r--r--src/plugins/platforms/qnx/qqnxnativeinterface.cpp3
-rw-r--r--src/plugins/platforms/qnx/qqnxrasterwindow.cpp2
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp101
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.h1
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp74
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.h3
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.cpp1
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.h1
-rw-r--r--src/plugins/platforms/windows/qwindowsinputcontext.cpp8
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsinternalmimedata.h2
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.cpp34
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsmenu.cpp6
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.cpp14
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp20
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp6
-rw-r--r--src/plugins/platforms/winrt/qwinrtdrag.h3
-rw-r--r--src/plugins/platforms/winrt/qwinrtintegration.cpp6
-rw-r--r--src/plugins/platforms/winrt/qwinrtintegration.h2
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.cpp8
-rw-r--r--src/plugins/platforms/winrt/winrt.pro8
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp10
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.h6
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbmime.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbmime.h7
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp7
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp6
-rw-r--r--src/plugins/platforms/xcb/xcb_qpa_lib.pro7
-rw-r--r--src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp2
-rw-r--r--src/plugins/printsupport/cups/qcupsprintengine.cpp5
-rw-r--r--src/plugins/sqldrivers/ibase/qsql_ibase.cpp3
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp8
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm1
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac_p_p.h2
-rw-r--r--src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h2
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle.cpp6
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog.cpp17
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog_p.h7
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp4
-rw-r--r--src/printsupport/kernel/qprintengine_win.cpp15
-rw-r--r--src/sql/models/qsqltablemodel.cpp12
-rw-r--r--src/testlib/qabstractitemmodeltester.cpp21
-rw-r--r--src/testlib/qabstractitemmodeltester.h21
-rw-r--r--src/testlib/qtestsystem.h18
-rw-r--r--src/testlib/qtesttable.cpp2
-rw-r--r--src/tools/qlalr/compress.cpp6
-rw-r--r--src/tools/qlalr/cppgenerator.cpp12
-rw-r--r--src/tools/qlalr/lalr.cpp56
-rw-r--r--src/tools/qlalr/lalr.g14
-rw-r--r--src/tools/qlalr/lalr.h5
-rw-r--r--src/tools/qlalr/main.cpp12
-rw-r--r--src/tools/qlalr/recognizer.cpp14
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp20
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp4
-rw-r--r--src/widgets/dialogs/qsidebar.cpp10
-rw-r--r--src/widgets/dialogs/qsidebar_p.h4
-rw-r--r--src/widgets/dialogs/qwizard_win.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.cpp10
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp2
-rw-r--r--src/widgets/itemviews/qabstractitemdelegate.cpp6
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp30
-rw-r--r--src/widgets/itemviews/qabstractitemview.h10
-rw-r--r--src/widgets/itemviews/qabstractitemview_p.h6
-rw-r--r--src/widgets/itemviews/qcolumnview.cpp2
-rw-r--r--src/widgets/itemviews/qlistview.cpp24
-rw-r--r--src/widgets/itemviews/qlistview.h4
-rw-r--r--src/widgets/itemviews/qlistview_p.h8
-rw-r--r--src/widgets/itemviews/qlistwidget.cpp8
-rw-r--r--src/widgets/itemviews/qlistwidget.h2
-rw-r--r--src/widgets/itemviews/qlistwidget_p.h2
-rw-r--r--src/widgets/itemviews/qtableview.cpp2
-rw-r--r--src/widgets/itemviews/qtableview_p.h2
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp4
-rw-r--r--src/widgets/itemviews/qtreeview.cpp4
-rw-r--r--src/widgets/itemviews/qtreeview.h2
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp2
-rw-r--r--src/widgets/kernel/qapplication.cpp28
-rw-r--r--src/widgets/kernel/qapplication_p.h4
-rw-r--r--src/widgets/kernel/qformlayout.cpp2
-rw-r--r--src/widgets/kernel/qlayout.cpp2
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp2
-rw-r--r--src/widgets/kernel/qmacgesturerecognizer.cpp15
-rw-r--r--src/widgets/kernel/qmacgesturerecognizer_p.h4
-rw-r--r--src/widgets/kernel/qwidget.cpp43
-rw-r--r--src/widgets/kernel/qwidget.h2
-rw-r--r--src/widgets/kernel/qwidget_p.h4
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp7
-rw-r--r--src/widgets/kernel/qwidgetwindow_p.h4
-rw-r--r--src/widgets/kernel/qwindowcontainer.cpp3
-rw-r--r--src/widgets/statemachine/qguistatemachine.cpp6
-rw-r--r--src/widgets/styles/qcommonstyle.cpp22
-rw-r--r--src/widgets/styles/qfusionstyle.cpp2
-rw-r--r--src/widgets/styles/qstyleoption.cpp2
-rw-r--r--src/widgets/styles/qstyleoption.h4
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp32
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp8
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp6
-rw-r--r--src/widgets/widgets/qabstractscrollarea.h2
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp2
-rw-r--r--src/widgets/widgets/qcombobox.cpp2
-rw-r--r--src/widgets/widgets/qdialogbuttonbox.cpp2
-rw-r--r--src/widgets/widgets/qdockarealayout.cpp1
-rw-r--r--src/widgets/widgets/qlineedit.cpp16
-rw-r--r--src/widgets/widgets/qlineedit.h2
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp7
-rw-r--r--src/widgets/widgets/qlineedit_p.h2
-rw-r--r--src/widgets/widgets/qmainwindow.cpp18
-rw-r--r--src/widgets/widgets/qmainwindow.h6
-rw-r--r--src/widgets/widgets/qmainwindowlayout.cpp77
-rw-r--r--src/widgets/widgets/qmainwindowlayout_p.h32
-rw-r--r--src/widgets/widgets/qmenu_p.h27
-rw-r--r--src/widgets/widgets/qmenubar.cpp2
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp6
-rw-r--r--src/widgets/widgets/qplaintextedit.h2
-rw-r--r--src/widgets/widgets/qpushbutton.cpp4
-rw-r--r--src/widgets/widgets/qtabbar.cpp2
-rw-r--r--src/widgets/widgets/qtabwidget.cpp12
-rw-r--r--src/widgets/widgets/qtextedit.cpp6
-rw-r--r--src/widgets/widgets/qtextedit.h2
-rw-r--r--src/widgets/widgets/qtoolbar.cpp4
-rw-r--r--src/widgets/widgets/qtoolbar.h7
-rw-r--r--src/widgets/widgets/qtoolbar_p.h6
-rw-r--r--src/widgets/widgets/qtoolbararealayout.cpp4
-rw-r--r--src/widgets/widgets/qtoolbararealayout_p.h35
-rw-r--r--src/widgets/widgets/qtoolbarlayout.cpp4
-rw-r--r--src/widgets/widgets/qtoolbarlayout_p.h6
-rw-r--r--src/widgets/widgets/qtoolbarseparator.cpp4
-rw-r--r--src/widgets/widgets/qtoolbarseparator_p.h6
-rw-r--r--src/widgets/widgets/qtoolbutton.cpp12
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp23
-rw-r--r--src/widgets/widgets/widgets.pri28
247 files changed, 2528 insertions, 1840 deletions
diff --git a/src/3rdparty/forkfd/forkfd.c b/src/3rdparty/forkfd/forkfd.c
index 7f02ee9a22..bef109e401 100644
--- a/src/3rdparty/forkfd/forkfd.c
+++ b/src/3rdparty/forkfd/forkfd.c
@@ -283,6 +283,7 @@ static void notifyAndFreeInfo(Header *header, ProcessInfo *entry,
freeInfo(header, entry);
}
+static void reapChildProcesses();
static void sigchld_handler(int signum, siginfo_t *handler_info, void *handler_context)
{
/*
@@ -307,19 +308,25 @@ static void sigchld_handler(int signum, siginfo_t *handler_info, void *handler_c
}
if (ffd_atomic_load(&forkfd_status, FFD_ATOMIC_RELAXED) == 1) {
- /* is this one of our children? */
- BigArray *array;
- siginfo_t info;
- struct pipe_payload payload;
- int i;
+ int saved_errno = errno;
+ reapChildProcesses();
+ errno = saved_errno;
+ }
+}
- memset(&info, 0, sizeof info);
- memset(&payload, 0, sizeof payload);
+static inline void reapChildProcesses()
+{
+ /* is this one of our children? */
+ BigArray *array;
+ siginfo_t info;
+ struct pipe_payload payload;
+ int i;
-#ifdef HAVE_WAITID
- if (!waitid_works)
- goto search_arrays;
+ memset(&info, 0, sizeof info);
+ memset(&payload, 0, sizeof payload);
+#ifdef HAVE_WAITID
+ if (waitid_works) {
/* be optimistic: try to see if we can get the child that exited */
search_next_child:
/* waitid returns -1 ECHILD if there are no further children at all;
@@ -371,12 +378,34 @@ search_next_child:
* belongs to one of the chained SIGCHLD handlers. However, there might be another
* child that exited and does belong to us, so we need to check each one individually.
*/
+ }
+#endif
-search_arrays:
+ for (i = 0; i < (int)sizeofarray(children.entries); ++i) {
+ int pid = ffd_atomic_load(&children.entries[i].pid, FFD_ATOMIC_ACQUIRE);
+ if (pid <= 0)
+ continue;
+#ifdef HAVE_WAITID
+ if (waitid_works) {
+ /* The child might have been reaped by the block above in another thread,
+ * so first check if it's ready and, if it is, lock it */
+ if (!isChildReady(pid, &info) ||
+ !ffd_atomic_compare_exchange(&children.entries[i].pid, &pid, -1,
+ FFD_ATOMIC_RELAXED, FFD_ATOMIC_RELAXED))
+ continue;
+ }
#endif
+ if (tryReaping(pid, &payload)) {
+ /* this is our child, send notification and free up this entry */
+ notifyAndFreeInfo(&children.header, &children.entries[i], &payload);
+ }
+ }
- for (i = 0; i < (int)sizeofarray(children.entries); ++i) {
- int pid = ffd_atomic_load(&children.entries[i].pid, FFD_ATOMIC_ACQUIRE);
+ /* try the arrays */
+ array = ffd_atomic_load(&children.header.nextArray, FFD_ATOMIC_ACQUIRE);
+ while (array != NULL) {
+ for (i = 0; i < (int)sizeofarray(array->entries); ++i) {
+ int pid = ffd_atomic_load(&array->entries[i].pid, FFD_ATOMIC_ACQUIRE);
if (pid <= 0)
continue;
#ifdef HAVE_WAITID
@@ -384,42 +413,18 @@ search_arrays:
/* The child might have been reaped by the block above in another thread,
* so first check if it's ready and, if it is, lock it */
if (!isChildReady(pid, &info) ||
- !ffd_atomic_compare_exchange(&children.entries[i].pid, &pid, -1,
+ !ffd_atomic_compare_exchange(&array->entries[i].pid, &pid, -1,
FFD_ATOMIC_RELAXED, FFD_ATOMIC_RELAXED))
continue;
}
#endif
if (tryReaping(pid, &payload)) {
/* this is our child, send notification and free up this entry */
- notifyAndFreeInfo(&children.header, &children.entries[i], &payload);
+ notifyAndFreeInfo(&array->header, &array->entries[i], &payload);
}
}
- /* try the arrays */
- array = ffd_atomic_load(&children.header.nextArray, FFD_ATOMIC_ACQUIRE);
- while (array != NULL) {
- for (i = 0; i < (int)sizeofarray(array->entries); ++i) {
- int pid = ffd_atomic_load(&array->entries[i].pid, FFD_ATOMIC_ACQUIRE);
- if (pid <= 0)
- continue;
-#ifdef HAVE_WAITID
- if (waitid_works) {
- /* The child might have been reaped by the block above in another thread,
- * so first check if it's ready and, if it is, lock it */
- if (!isChildReady(pid, &info) ||
- !ffd_atomic_compare_exchange(&array->entries[i].pid, &pid, -1,
- FFD_ATOMIC_RELAXED, FFD_ATOMIC_RELAXED))
- continue;
- }
-#endif
- if (tryReaping(pid, &payload)) {
- /* this is our child, send notification and free up this entry */
- notifyAndFreeInfo(&array->header, &array->entries[i], &payload);
- }
- }
-
- array = ffd_atomic_load(&array->header.nextArray, FFD_ATOMIC_ACQUIRE);
- }
+ array = ffd_atomic_load(&array->header.nextArray, FFD_ATOMIC_ACQUIRE);
}
}
diff --git a/src/3rdparty/freetype/LICENSE.txt b/src/3rdparty/freetype/LICENSE.txt
index 382225f105..1119880c09 100644
--- a/src/3rdparty/freetype/LICENSE.txt
+++ b/src/3rdparty/freetype/LICENSE.txt
@@ -85,7 +85,7 @@ Introduction
encourage you to use the following text:
"""
- Portions of this software are copyright © <year> The FreeType
+ Portions of this software are copyright © <year> The FreeType
Project (www.freetype.org). All rights reserved.
"""
diff --git a/src/android/java/res/values-de/strings.xml b/src/android/java/res/values-de/strings.xml
index 320d9ec33f..21881ec97f 100644
--- a/src/android/java/res/values-de/strings.xml
+++ b/src/android/java/res/values-de/strings.xml
@@ -3,4 +3,5 @@
<string name="ministro_not_found_msg">Ministro-Dienst wurde nicht gefunden.\nAnwendung kann nicht gestartet werden</string>
<string name="ministro_needed_msg">Diese Anwendung benötigt den Ministro-Dienst. Möchten Sie ihn installieren?</string>
<string name="fatal_error_msg">In Ihrer Anwendung ist ein schwerwiegender Fehler aufgetreten, sie kann nicht fortgesetzt werden</string>
+ <string name="unsupported_android_version">Diese Android-Version wird nicht unterstützt.</string>
</resources>
diff --git a/src/android/java/res/values-fr/strings.xml b/src/android/java/res/values-fr/strings.xml
index efc0fb6e1e..ce8e5f5af1 100644
--- a/src/android/java/res/values-fr/strings.xml
+++ b/src/android/java/res/values-fr/strings.xml
@@ -3,4 +3,5 @@
<string name="ministro_not_found_msg">Le service Ministro est introuvable.\nL\'application ne peut pas démarrer.</string>
<string name="ministro_needed_msg">Cette application requiert le service Ministro. Voulez-vous l\'installer?</string>
<string name="fatal_error_msg">Votre application a rencontré une erreur fatale et ne peut pas continuer.</string>
+ <string name="unsupported_android_version">Cette version d\'Android n\'est pas supportée.</string>
</resources>
diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
index 424bf45c53..fc3d7e04ce 100644
--- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
+++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
@@ -355,12 +355,21 @@ public abstract class QtLoader {
destinationFile.createNewFile();
AssetManager assetsManager = m_context.getAssets();
- InputStream inputStream = assetsManager.open(source);
- OutputStream outputStream = new FileOutputStream(destinationFile);
- copyFile(inputStream, outputStream);
+ InputStream inputStream = null;
+ OutputStream outputStream = null;
+ try {
+ inputStream = assetsManager.open(source);
+ outputStream = new FileOutputStream(destinationFile);
+ copyFile(inputStream, outputStream);
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (inputStream != null)
+ inputStream.close();
- inputStream.close();
- outputStream.close();
+ if (outputStream != null)
+ outputStream.close();
+ }
}
private static void createBundledBinary(String source, String destination)
@@ -377,12 +386,21 @@ public abstract class QtLoader {
destinationFile.createNewFile();
- InputStream inputStream = new FileInputStream(source);
- OutputStream outputStream = new FileOutputStream(destinationFile);
- copyFile(inputStream, outputStream);
+ InputStream inputStream = null;
+ OutputStream outputStream = null;
+ try {
+ inputStream = new FileInputStream(source);
+ outputStream = new FileOutputStream(destinationFile);
+ copyFile(inputStream, outputStream);
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (inputStream != null)
+ inputStream.close();
- inputStream.close();
- outputStream.close();
+ if (outputStream != null)
+ outputStream.close();
+ }
}
private boolean cleanCacheIfNecessary(String pluginsPrefix, long packageVersion)
@@ -391,12 +409,20 @@ public abstract class QtLoader {
long cacheVersion = 0;
if (versionFile.exists() && versionFile.canRead()) {
+ DataInputStream inputStream = null;
try {
- DataInputStream inputStream = new DataInputStream(new FileInputStream(versionFile));
+ inputStream = new DataInputStream(new FileInputStream(versionFile));
cacheVersion = inputStream.readLong();
- inputStream.close();
} catch (Exception e) {
e.printStackTrace();
+ } finally {
+ if (inputStream != null) {
+ try {
+ inputStream.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
}
}
@@ -431,9 +457,16 @@ public abstract class QtLoader {
versionFile.createNewFile();
- DataOutputStream outputStream = new DataOutputStream(new FileOutputStream(versionFile));
- outputStream.writeLong(packageVersion);
- outputStream.close();
+ DataOutputStream outputStream = null;
+ try {
+ outputStream = new DataOutputStream(new FileOutputStream(versionFile));
+ outputStream.writeLong(packageVersion);
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (outputStream != null)
+ outputStream.close();
+ }
}
{
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index 5019497dad..4c2506d8bc 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -569,7 +569,8 @@
},
"linkat": {
"label": "linkat()",
- "autoDetect": "config.linux",
+ "comment": "Currently only used by QTemporaryFile; linkat() exists on Android, but hardlink creation fails due to security rules",
+ "autoDetect": "config.linux && !config.android",
"condition": "tests.linkat",
"output": [ "privateFeature" ]
},
diff --git a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
index ceb3f8adf3..2d7b9a9ac8 100644
--- a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
@@ -387,11 +387,11 @@ CONFIG += no_keywords
//! [34]
QString FriendlyConversation::greeting(int type)
{
-static const char *greeting_strings[] = {
- QT_TR_NOOP("Hello"),
- QT_TR_NOOP("Goodbye")
-};
-return tr(greeting_strings[type]);
+ static const char *greeting_strings[] = {
+ QT_TR_NOOP("Hello"),
+ QT_TR_NOOP("Goodbye")
+ };
+ return tr(greeting_strings[type]);
}
//! [34]
@@ -410,7 +410,7 @@ QString FriendlyConversation::greeting(int type)
QString global_greeting(int type)
{
return qApp->translate("FriendlyConversation",
- greeting_strings[type]);
+ greeting_strings[type]);
}
//! [35]
@@ -434,8 +434,8 @@ QString FriendlyConversation::greeting(int type)
QString global_greeting(int type)
{
return qApp->translate("FriendlyConversation",
- greeting_strings[type].source,
- greeting_strings[type].comment);
+ greeting_strings[type].source,
+ greeting_strings[type].comment);
}
//! [36]
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp
index ac17de1bee..27565a7878 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp
@@ -54,11 +54,14 @@ QList<QDate> dateList;
//! [0]
-//! [1]
-QList<QString> list;
-list << "one" << "two" << "three";
-// list: ["one", "two", "three"]
-//! [1]
+//! [1a]
+QList<QString> list = { "one", "two", "three" };
+//! [1a]
+
+
+//! [1b]
+list << "four" << "five";
+//! [1b]
//! [2]
diff --git a/src/corelib/doc/snippets/qstringlist/main.cpp b/src/corelib/doc/snippets/qstringlist/main.cpp
index 4d9c015747..55c60650fe 100644
--- a/src/corelib/doc/snippets/qstringlist/main.cpp
+++ b/src/corelib/doc/snippets/qstringlist/main.cpp
@@ -61,10 +61,13 @@ public:
Widget::Widget(QWidget *parent)
: QWidget(parent)
{
-//! [0]
- QStringList fonts;
- fonts << "Arial" << "Helvetica" << "Times" << "Courier";
-//! [0]
+//! [0a]
+ QStringList fonts = { "Arial", "Helvetica", "Times" };
+//! [0a]
+
+//! [0b]
+ fonts << "Courier" << "Verdana";
+//! [0b]
//! [1]
for (int i = 0; i < fonts.size(); ++i)
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index ad015ee048..2fbd31b3d7 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -648,10 +648,10 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
compiler or platform specific code to their application.
The remaining macros are convenience macros for larger operations:
- The QT_TRANSLATE_NOOP() and QT_TR_NOOP() macros provide the
- possibility of marking text for dynamic translation,
- i.e. translation without changing the stored source text. The
- Q_ASSERT() and Q_ASSERT_X() enables warning messages of various
+ The QT_TR_NOOP(), QT_TRANSLATE_NOOP(), and QT_TRANSLATE_NOOP3()
+ macros provide the possibility of marking strings for delayed
+ translation.
+ The Q_ASSERT() and Q_ASSERT_X() enables warning messages of various
level of refinement. The Q_FOREACH() and foreach() macros
implement Qt's foreach loop.
@@ -662,11 +662,11 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
memory, if the pointer is 0. The qPrintable() and qUtf8Printable()
macros represent an easy way of printing text.
- Finally, the QT_POINTER_SIZE macro expands to the size of a
- pointer in bytes, and the QT_VERSION and QT_VERSION_STR macros
- expand to a numeric value or a string, respectively, specifying
- Qt's version number, i.e the version the application is compiled
- against.
+ The QT_POINTER_SIZE macro expands to the size of a pointer in bytes.
+
+ The macros QT_VERSION and QT_VERSION_STR expand to a numeric value
+ or a string, respectively, that specifies the version of Qt that the
+ application is compiled against.
\sa <QtAlgorithms>, QSysInfo
*/
@@ -939,6 +939,8 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
Rounds \a d to the nearest integer.
+ Rounds half up (e.g. 0.5 -> 1, -0.5 -> 0).
+
Example:
\snippet code/src_corelib_global_qglobal.cpp 11A
@@ -949,6 +951,8 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
Rounds \a d to the nearest integer.
+ Rounds half up (e.g. 0.5f -> 1, -0.5f -> 0).
+
Example:
\snippet code/src_corelib_global_qglobal.cpp 11B
@@ -959,6 +963,8 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
Rounds \a d to the nearest 64-bit integer.
+ Rounds half up (e.g. 0.5 -> 1, -0.5 -> 0).
+
Example:
\snippet code/src_corelib_global_qglobal.cpp 12A
@@ -969,6 +975,8 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
Rounds \a d to the nearest 64-bit integer.
+ Rounds half up (e.g. 0.5f -> 1, -0.5f -> 0).
+
Example:
\snippet code/src_corelib_global_qglobal.cpp 12B
@@ -3268,14 +3276,15 @@ QByteArray qgetenv(const char *varName)
/*!
- QString qEnvironmentVariable(const char *varName, const QString &defaultValue);
+ \fn QString qEnvironmentVariable(const char *varName, const QString &defaultValue)
+ \fn QString qEnvironmentVariable(const char *varName)
\relates <QtGlobal>
\since 5.10
- Returns the value of the environment variable with name \a varName as a
- QString. If no variable by that name is found in the environment, this
- function returns \a defaultValue.
+ These functions return the value of the environment variable, \a varName, as a
+ QString. If no variable \a varName is found in the environment and \a defaultValue
+ is provided, \a defaultValue is returned. Otherwise QString() is returned.
The Qt environment manipulation functions are thread-safe, but this
requires that the C library equivalent functions like getenv and putenv are
@@ -3344,9 +3353,6 @@ QString qEnvironmentVariable(const char *varName, const QString &defaultValue)
#endif
}
-/*!
- \internal
-*/
QString qEnvironmentVariable(const char *varName)
{
return qEnvironmentVariable(varName, QString());
@@ -3678,19 +3684,18 @@ bool qunsetenv(const char *varName)
\macro QT_TR_NOOP(sourceText)
\relates <QtGlobal>
- Marks the string literal \a sourceText for dynamic translation in
- the current context (class), i.e the stored \a sourceText will not
- be altered.
+ Marks the UTF-8 encoded string literal \a sourceText for delayed
+ translation in the current context (class).
- The macro expands to \a sourceText.
+ The macro tells lupdate to collect the string, and expands to
+ \a sourceText itself.
Example:
\snippet code/src_corelib_global_qglobal.cpp 34
- The macro QT_TR_NOOP_UTF8() is identical except that it tells lupdate
- that the source string is encoded in UTF-8. Corresponding variants
- exist in the QT_TRANSLATE_NOOP() family of macros, too.
+ The macro QT_TR_NOOP_UTF8() is identical and obsolete; this applies
+ to all other _UTF8 macros as well.
\sa QT_TRANSLATE_NOOP(), {Internationalization with Qt}
*/
@@ -3699,12 +3704,12 @@ bool qunsetenv(const char *varName)
\macro QT_TRANSLATE_NOOP(context, sourceText)
\relates <QtGlobal>
- Marks the string literal \a sourceText for dynamic translation in
- the given \a context; i.e, the stored \a sourceText will not be
- altered. The \a context is typically a class and also needs to
- be specified as string literal.
+ Marks the UTF-8 encoded string literal \a sourceText for delayed
+ translation in the given \a context. The \a context is typically
+ a class name and also needs to be specified as a string literal.
- The macro expands to \a sourceText.
+ The macro tells lupdate to collect the string, and expands to
+ \a sourceText itself.
Example:
@@ -3714,18 +3719,19 @@ bool qunsetenv(const char *varName)
*/
/*!
- \macro QT_TRANSLATE_NOOP3(context, sourceText, comment)
+ \macro QT_TRANSLATE_NOOP3(context, sourceText, disambiguation)
\relates <QtGlobal>
\since 4.4
- Marks the string literal \a sourceText for dynamic translation in the
- given \a context and with \a comment, i.e the stored \a sourceText will
- not be altered. The \a context is typically a class and also needs to
- be specified as string literal. The string literal \a comment
- will be available for translators using e.g. Qt Linguist.
+ Marks the UTF-8 encoded string literal \a sourceText for delayed
+ translation in the given \a context with the given \a disambiguation.
+ The \a context is typically a class and also needs to be specified
+ as a string literal. The string literal \a disambiguation should be
+ a short semantic tag to tell apart otherwise identical strings.
- The macro expands to anonymous struct of the two string
- literals passed as \a sourceText and \a comment.
+ The macro tells lupdate to collect the string, and expands to an
+ anonymous struct of the two string literals passed as \a sourceText
+ and \a disambiguation.
Example:
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index e31d4d9ad7..3684c6b5de 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1062,7 +1062,7 @@ template <typename Wrapper> static inline typename Wrapper::pointer qGetPtrHelpe
#define QT_TRANSLATE_NOOP3(scope, x, comment) {x, comment}
#define QT_TRANSLATE_NOOP3_UTF8(scope, x, comment) {x, comment}
-#ifndef QT_NO_TRANSLATION // ### This should enclose the NOOPs above
+#ifndef QT_NO_TRANSLATION // ### Qt6: This should enclose the NOOPs above
// Defined in qcoreapplication.cpp
// The better name qTrId() is reserved for an upcoming function which would
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 17002c4231..7444145e82 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -208,6 +208,7 @@ static bool isDefaultCategory(const char *category)
/*!
Returns true if writing to \c stderr is supported.
+ \internal
\sa stderrHasConsoleAttached()
*/
static bool systemHasStderr()
@@ -236,6 +237,7 @@ static bool systemHasStderr()
the output might still end up visible to the user. For this reason, we don't guard
the stderr output in the default message handler with stderrHasConsoleAttached().
+ \internal
\sa systemHasStderr()
*/
bool stderrHasConsoleAttached()
@@ -288,6 +290,7 @@ namespace QtPrivate {
This is normally the case if \c stderr has a console attached, but may be overridden
by the user by setting the QT_FORCE_STDERR_LOGGING environment variable to \c 1.
+ \internal
\sa stderrHasConsoleAttached()
*/
bool shouldLogToStderr()
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 11c431d015..0361fd6085 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1329,7 +1329,14 @@
\omitvalue WA_WState_WindowOpacitySet
\omitvalue WA_WState_AcceptedTouchBeginEvent
\omitvalue WA_MacNoShadow
- \omitvalue WA_ContentsMarginsRespectsSafeArea
+ \value WA_ContentsMarginsRespectsSafeArea A QWidget respects the safe
+ area margins of a window by incorporating the margins into its contents'
+ margins by default. This means, that a QLayout will use the content area
+ of a widget for its layout, unless the Qt::WA_LayoutOnEntireRect attribute
+ is set. This along with a contents margin of 0 can be used on the actual
+ layout, to allow for example a background image to underlay the status bar and other
+ system areas on an iOS device, while still allowing child widgets of
+ that background to be inset based on the safe area.
*/
/*! \typedef Qt::HANDLE
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 0c38731052..5561ecbb6d 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -114,6 +114,8 @@ static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newp
# if !QT_CONFIG(statx) && defined(SYS_statx)
static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf)
{ return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); }
+# elif !QT_CONFIG(statx) && !defined(SYS_statx)
+# undef STATX_BASIC_STATS
# endif
# endif // !Q_OS_ANDROID
#endif
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.mm b/src/corelib/io/qfilesystemwatcher_fsevents.mm
index 792ea387ac..0254d0f7a1 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents.mm
+++ b/src/corelib/io/qfilesystemwatcher_fsevents.mm
@@ -377,7 +377,7 @@ QStringList QFseventsFileSystemWatcherEngine::addPaths(const QStringList &paths,
for (PathRefCounts::const_iterator i = watchingState.watchedPaths.begin(),
ei = watchingState.watchedPaths.end(); i != ei; ++i) {
- if (watchedPath.startsWith(i.key())) {
+ if (watchedPath.startsWith(i.key() % QDir::separator())) {
watchedPath = i.key();
break;
}
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp
index b029274329..a6c27d19c0 100644
--- a/src/corelib/io/qloggingcategory.cpp
+++ b/src/corelib/io/qloggingcategory.cpp
@@ -147,9 +147,15 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
Rules are evaluated in text order, from first to last. That is, if two rules
apply to a category/type, the rule that comes later is applied.
- Rules can be set via \l setFilterRules(). Since Qt 5.3, logging rules can also
- be set in the \c QT_LOGGING_RULES environment variable, and
- are automatically loaded from the \c [Rules] section of a logging
+ Rules can be set via \l setFilterRules():
+
+ \code
+ QLoggingCategory::setFilterRules("*.debug=false\n"
+ "driver.usb.debug=true");
+ \endcode
+
+ Since Qt 5.3, logging rules are also
+ automatically loaded from the \c [Rules] section of a logging
configuration file. Such configuration files are looked up in the QtProject
configuration directory, or explicitly set in a \c QT_LOGGING_CONF
environment variable:
@@ -160,19 +166,18 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
driver.usb.debug=true
\endcode
- Rules set by \l setFilterRules() take precedence over rules specified
- in the QtProject configuration directory, and can, in turn, be
- overwritten by rules from the configuration file specified by
- \c QT_LOGGING_CONF, and rules set by \c QT_LOGGING_RULES.
-
-
- Since Qt 5.6, \c QT_LOGGING_RULES may contain multiple rules separated
- by semicolons:
+ Since Qt 5.3, logging rules can also be specified in a \c QT_LOGGING_RULES
+ environment variable. And since Qt 5.6, multiple rules can also be
+ separated by semicolons:
\code
QT_LOGGING_RULES="*.debug=false;driver.usb.debug=true"
\endcode
+ Rules set by \l setFilterRules() take precedence over rules specified
+ in the QtProject configuration directory, and can, in turn, be
+ overwritten by rules from the configuration file specified by
+ \c QT_LOGGING_CONF, and rules set by \c QT_LOGGING_RULES.
Order of evaluation:
\list
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 68b7a8bf9b..a849519635 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -925,6 +925,8 @@ bool QProcessPrivate::startDetached(qint64 *pid)
closeChannel(&stdinChannel);
closeChannel(&stdoutChannel);
closeChannel(&stderrChannel);
+ qt_safe_close(pidPipe[0]);
+ qt_safe_close(pidPipe[1]);
qt_safe_close(startedPipe[0]);
qt_safe_close(startedPipe[1]);
return false;
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 3a62a67e3b..b1ec2c560c 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -499,8 +499,13 @@ void QProcessPrivate::startProcess()
if (!openChannel(stdinChannel) ||
!openChannel(stdoutChannel) ||
- !openChannel(stderrChannel))
+ !openChannel(stderrChannel)) {
+ QString errorString = QProcess::tr("Process failed to start: %1").arg(qt_error_string());
+ cleanup();
+ setErrorAndEmit(QProcess::FailedToStart, errorString);
+ q->setProcessState(QProcess::NotRunning);
return;
+ }
const QString args = qt_create_commandline(program, arguments, nativeArguments);
QByteArray envlist;
diff --git a/src/corelib/itemmodels/qitemselectionmodel.cpp b/src/corelib/itemmodels/qitemselectionmodel.cpp
index 9af4fd9133..edb9bb9098 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.cpp
+++ b/src/corelib/itemmodels/qitemselectionmodel.cpp
@@ -1502,30 +1502,40 @@ bool QItemSelectionModel::isRowSelected(int row, const QModelIndex &parent) cons
&& d->currentSelection.at(i).intersected(d->ranges.at(j)).isValid())
return false;
}
+
+ auto isSelectable = [&](int row, int column) {
+ Qt::ItemFlags flags = d->model->index(row, column, parent).flags();
+ return (flags & Qt::ItemIsSelectable);
+ };
+
+ const int colCount = d->model->columnCount(parent);
+ int unselectable = 0;
// add ranges and currentSelection and check through them all
QList<QItemSelectionRange>::const_iterator it;
QList<QItemSelectionRange> joined = d->ranges;
if (d->currentSelection.count())
joined += d->currentSelection;
- int colCount = d->model->columnCount(parent);
for (int column = 0; column < colCount; ++column) {
+ if (!isSelectable(row, column)) {
+ ++unselectable;
+ continue;
+ }
+
for (it = joined.constBegin(); it != joined.constEnd(); ++it) {
if ((*it).contains(row, column, parent)) {
- bool selectable = false;
- for (int i = column; !selectable && i <= (*it).right(); ++i) {
- Qt::ItemFlags flags = d->model->index(row, i, parent).flags();
- selectable = flags & Qt::ItemIsSelectable;
- }
- if (selectable){
- column = qMax(column, (*it).right());
- break;
+ for (int i = column; i <= (*it).right(); ++i) {
+ if (!isSelectable(row, i))
+ ++unselectable;
}
+
+ column = qMax(column, (*it).right());
+ break;
}
}
if (it == joined.constEnd())
return false;
}
- return colCount > 0; // no columns means no selected items
+ return unselectable < colCount;
}
/*!
@@ -1568,26 +1578,39 @@ bool QItemSelectionModel::isColumnSelected(int column, const QModelIndex &parent
}
}
}
+
+ auto isSelectable = [&](int row, int column) {
+ Qt::ItemFlags flags = d->model->index(row, column, parent).flags();
+ return (flags & Qt::ItemIsSelectable);
+ };
+ const int rowCount = d->model->rowCount(parent);
+ int unselectable = 0;
+
// add ranges and currentSelection and check through them all
QList<QItemSelectionRange>::const_iterator it;
QList<QItemSelectionRange> joined = d->ranges;
if (d->currentSelection.count())
joined += d->currentSelection;
- int rowCount = d->model->rowCount(parent);
for (int row = 0; row < rowCount; ++row) {
- for (it = joined.constBegin(); it != joined.constEnd(); ++it) {
- if ((*it).contains(row, column, parent)) {
- Qt::ItemFlags flags = d->model->index(row, column, parent).flags();
- if ((flags & Qt::ItemIsSelectable) && (flags & Qt::ItemIsEnabled)) {
- row = qMax(row, (*it).bottom());
- break;
- }
- }
- }
- if (it == joined.constEnd())
- return false;
+ if (!isSelectable(row, column)) {
+ ++unselectable;
+ continue;
+ }
+ for (it = joined.constBegin(); it != joined.constEnd(); ++it) {
+ if ((*it).contains(row, column, parent)) {
+ for (int i = row; i <= (*it).bottom(); ++i) {
+ if (!isSelectable(i, column)) {
+ ++unselectable;
+ }
+ }
+ row = qMax(row, (*it).bottom());
+ break;
+ }
+ }
+ if (it == joined.constEnd())
+ return false;
}
- return rowCount > 0; // no rows means no selected items
+ return unselectable < rowCount;
}
/*!
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
index 78093727b8..08279cb244 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
@@ -1910,7 +1910,10 @@ void QSortFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
disconnect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_sourceAboutToBeReset()));
disconnect(d->model, SIGNAL(modelReset()), this, SLOT(_q_sourceReset()));
- d->_q_sourceModelDestroyed();
+ // same as in _q_sourceReset()
+ d->invalidatePersistentIndexes();
+ d->_q_clearMapping();
+
QAbstractProxyModel::setSourceModel(sourceModel);
connect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)),
diff --git a/src/corelib/kernel/qabstracteventdispatcher.h b/src/corelib/kernel/qabstracteventdispatcher.h
index 4775d3d47a..bd8da5c35d 100644
--- a/src/corelib/kernel/qabstracteventdispatcher.h
+++ b/src/corelib/kernel/qabstracteventdispatcher.h
@@ -87,6 +87,7 @@ public:
QT_DEPRECATED inline void registerTimer(int timerId, int interval, QObject *object)
{ registerTimer(timerId, interval, Qt::CoarseTimer, object); }
#endif
+ // ### Qt6: change interval range to qint64 (or use QDeadlineTimer)
int registerTimer(int interval, Qt::TimerType timerType, QObject *object);
virtual void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) = 0;
virtual bool unregisterTimer(int timerId) = 0;
diff --git a/src/corelib/kernel/qcore_mac_objc.mm b/src/corelib/kernel/qcore_mac_objc.mm
index 5ecd86a30e..c29c4dfc14 100644
--- a/src/corelib/kernel/qcore_mac_objc.mm
+++ b/src/corelib/kernel/qcore_mac_objc.mm
@@ -161,6 +161,34 @@ QDebug operator<<(QDebug debug, const QMacAutoReleasePool *pool)
}
#endif // !QT_NO_DEBUG_STREAM
+bool qt_apple_isApplicationExtension()
+{
+ static bool isExtension = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSExtension"];
+ return isExtension;
+}
+
+#if !defined(QT_BOOTSTRAPPED) && !defined(Q_OS_WATCHOS)
+AppleApplication *qt_apple_sharedApplication()
+{
+ // Application extensions are not allowed to access the shared application
+ if (qt_apple_isApplicationExtension()) {
+ qWarning() << "accessing the shared" << [AppleApplication class]
+ << "is not allowed in application extensions";
+
+ // In practice the application is actually available, but the the App
+ // review process will likely catch uses of it, so we return nil just
+ // in case, unless we don't care about being App Store compliant.
+#if QT_CONFIG(appstore_compliant)
+ return nil;
+#endif
+ }
+
+ // We use performSelector so that building with -fapplication-extension will
+ // not mistakenly think we're using the shared application in extensions.
+ return [[AppleApplication class] performSelector:@selector(sharedApplication)];
+}
+#endif
+
#ifdef Q_OS_MACOS
/*
Ensure that Objective-C objects auto-released in main(), directly or indirectly,
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index 9c6cef68b2..9bd2e31bc9 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -158,6 +158,20 @@ QDebug operator<<(QDebug debug, const QMacAutoReleasePool *pool);
#endif
Q_CORE_EXPORT void qt_apple_check_os_version();
+Q_CORE_EXPORT bool qt_apple_isApplicationExtension();
+
+#if !defined(QT_BOOTSTRAPPED) && !defined(Q_OS_WATCHOS)
+QT_END_NAMESPACE
+# if defined(Q_OS_MACOS)
+Q_FORWARD_DECLARE_OBJC_CLASS(NSApplication);
+using AppleApplication = NSApplication;
+# else
+Q_FORWARD_DECLARE_OBJC_CLASS(UIApplication);
+using AppleApplication = UIApplication;
+# endif
+QT_BEGIN_NAMESPACE
+Q_CORE_EXPORT AppleApplication *qt_apple_sharedApplication();
+#endif
// --------------------------------------------------------------------------
diff --git a/src/corelib/kernel/qeventdispatcher_cf.mm b/src/corelib/kernel/qeventdispatcher_cf.mm
index 8499b3fd57..503836d071 100644
--- a/src/corelib/kernel/qeventdispatcher_cf.mm
+++ b/src/corelib/kernel/qeventdispatcher_cf.mm
@@ -72,17 +72,12 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(RunLoopModeTracker);
if (self = [super init]) {
m_runLoopModes.push(kCFRunLoopDefaultMode);
- [[NSNotificationCenter defaultCenter]
- addObserver:self
- selector:@selector(receivedNotification:)
- name:nil
-#ifdef Q_OS_OSX
- object:[NSApplication sharedApplication]];
-#elif defined(Q_OS_WATCHOS)
- object:[WKExtension sharedExtension]];
-#else
- // Use performSelector so this can work in an App Extension
- object:[[UIApplication class] performSelector:@selector(sharedApplication)]];
+#if !defined(Q_OS_WATCHOS)
+ if (!qt_apple_isApplicationExtension()) {
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self selector:@selector(receivedNotification:)
+ name:nil object:qt_apple_sharedApplication()];
+ }
#endif
}
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 69d76915c9..016b67d790 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4430,6 +4430,7 @@ QDebug operator<<(QDebug dbg, const QObject *o)
/*!
\macro Q_NAMESPACE
+ \relates QObject
\since 5.8
The Q_NAMESPACE macro can be used to add QMetaObject capabilities
diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp
index 7d529372c4..68e3c8f10d 100644
--- a/src/corelib/mimetypes/qmimedatabase.cpp
+++ b/src/corelib/mimetypes/qmimedatabase.cpp
@@ -311,9 +311,9 @@ static inline bool isTextFile(const QByteArray &data)
if (data.startsWith(bigEndianBOM) || data.startsWith(littleEndianBOM))
return true;
- // Check the first 32 bytes (see shared-mime spec)
+ // Check the first 128 bytes (see shared-mime spec)
const char *p = data.constData();
- const char *e = p + qMin(32, data.size());
+ const char *e = p + qMin(128, data.size());
for ( ; p < e; ++p) {
if ((unsigned char)(*p) < 32 && *p != 9 && *p !=10 && *p != 13)
return false;
diff --git a/src/corelib/serialization/qjson.cpp b/src/corelib/serialization/qjson.cpp
index e4bca3bcd0..7912b5040c 100644
--- a/src/corelib/serialization/qjson.cpp
+++ b/src/corelib/serialization/qjson.cpp
@@ -326,40 +326,35 @@ int Value::usedStorage(const Base *b) const
return alignedSize(s);
}
+inline bool isValidValueOffset(uint offset, uint tableOffset)
+{
+ return offset >= sizeof(Base)
+ && offset + sizeof(uint) <= tableOffset;
+}
+
bool Value::isValid(const Base *b) const
{
- int offset = 0;
switch (type) {
+ case QJsonValue::Null:
+ case QJsonValue::Bool:
+ return true;
case QJsonValue::Double:
- if (latinOrIntValue)
- break;
- Q_FALLTHROUGH();
+ return latinOrIntValue || isValidValueOffset(value, b->tableOffset);
case QJsonValue::String:
+ if (!isValidValueOffset(value, b->tableOffset))
+ return false;
+ if (latinOrIntValue)
+ return asLatin1String(b).isValid(b->tableOffset - value);
+ return asString(b).isValid(b->tableOffset - value);
case QJsonValue::Array:
+ return isValidValueOffset(value, b->tableOffset)
+ && static_cast<Array *>(base(b))->isValid(b->tableOffset - value);
case QJsonValue::Object:
- offset = value;
- break;
- case QJsonValue::Null:
- case QJsonValue::Bool:
+ return isValidValueOffset(value, b->tableOffset)
+ && static_cast<Object *>(base(b))->isValid(b->tableOffset - value);
default:
- break;
- }
-
- if (!offset)
- return true;
- if (offset + sizeof(uint) > b->tableOffset)
return false;
-
- int s = usedStorage(b);
- if (!s)
- return true;
- if (s < 0 || s > (int)b->tableOffset - offset)
- return false;
- if (type == QJsonValue::Array)
- return static_cast<Array *>(base(b))->isValid(s);
- if (type == QJsonValue::Object)
- return static_cast<Object *>(base(b))->isValid(s);
- return true;
+ }
}
/*!
diff --git a/src/corelib/serialization/qjson_p.h b/src/corelib/serialization/qjson_p.h
index 7743382806..dc56a49084 100644
--- a/src/corelib/serialization/qjson_p.h
+++ b/src/corelib/serialization/qjson_p.h
@@ -450,7 +450,7 @@ static inline void copyString(char *dest, const QString &str, bool compress)
/*
- Base is the base class for both Object and Array. Both classe work more or less the same way.
+ Base is the base class for both Object and Array. Both classes work more or less the same way.
The class starts with a header (defined by the struct below), then followed by data (the data for
values in the Array case and Entry's (see below) for objects.
diff --git a/src/corelib/serialization/qjsondocument.cpp b/src/corelib/serialization/qjsondocument.cpp
index 9794bca60d..ab27b45fda 100644
--- a/src/corelib/serialization/qjsondocument.cpp
+++ b/src/corelib/serialization/qjsondocument.cpp
@@ -210,6 +210,9 @@ QJsonDocument QJsonDocument::fromRawData(const char *data, int size, DataValidat
return QJsonDocument();
}
+ if (size < (int)(sizeof(QJsonPrivate::Header) + sizeof(QJsonPrivate::Base)))
+ return QJsonDocument();
+
QJsonPrivate::Data *d = new QJsonPrivate::Data((char *)data, size);
d->ownsData = false;
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h
index d0f83d2b6a..7e1b43f9b1 100644
--- a/src/corelib/tools/qarraydataops.h
+++ b/src/corelib/tools/qarraydataops.h
@@ -65,7 +65,7 @@ struct QPodArrayOps
Q_ASSERT(newSize > uint(this->size));
Q_ASSERT(newSize <= this->alloc);
- ::memset(this->end(), 0, (newSize - this->size) * sizeof(T));
+ ::memset(static_cast<void *>(this->end()), 0, (newSize - this->size) * sizeof(T));
this->size = int(newSize);
}
@@ -121,8 +121,9 @@ struct QPodArrayOps
Q_ASSERT(e <= where || b > this->end()); // No overlap
Q_ASSERT(size_t(e - b) <= this->alloc - uint(this->size));
- ::memmove(where + (e - b), where, (static_cast<const T*>(this->end()) - where) * sizeof(T));
- ::memcpy(where, b, (e - b) * sizeof(T));
+ ::memmove(static_cast<void *>(where + (e - b)), static_cast<void *>(where),
+ (static_cast<const T*>(this->end()) - where) * sizeof(T));
+ ::memcpy(static_cast<void *>(where), static_cast<const void *>(b), (e - b) * sizeof(T));
this->size += (e - b);
}
@@ -133,7 +134,8 @@ struct QPodArrayOps
Q_ASSERT(b >= this->begin() && b < this->end());
Q_ASSERT(e > this->begin() && e < this->end());
- ::memmove(b, e, (static_cast<T *>(this->end()) - e) * sizeof(T));
+ ::memmove(static_cast<void *>(b), static_cast<void *>(e),
+ (static_cast<T *>(this->end()) - e) * sizeof(T));
this->size -= (e - b);
}
};
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 421e716d14..7c601e1336 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -238,7 +238,8 @@ qCalculateGrowingBlockSize(size_t elementCount, size_t elementSize, size_t heade
Returns a duplicate string.
Allocates space for a copy of \a src, copies it, and returns a
- pointer to the copy. If \a src is 0, it immediately returns 0.
+ pointer to the copy. If \a src is nullptr, it immediately returns
+ nullptr.
Ownership is passed to the caller, so the returned string must be
deleted using \c delete[].
@@ -247,7 +248,7 @@ qCalculateGrowingBlockSize(size_t elementCount, size_t elementSize, size_t heade
char *qstrdup(const char *src)
{
if (!src)
- return 0;
+ return nullptr;
char *dst = new char[strlen(src) + 1];
return qstrcpy(dst, src);
}
@@ -255,26 +256,28 @@ char *qstrdup(const char *src)
/*! \relates QByteArray
Copies all the characters up to and including the '\\0' from \a
- src into \a dst and returns a pointer to \a dst. If \a src is 0,
- it immediately returns 0.
+ src into \a dst and returns a pointer to \a dst. If \a src is
+ nullptr, it immediately returns nullptr.
This function assumes that \a dst is large enough to hold the
contents of \a src.
+ \note If \a dst and \a src overlap, the behavior is undefined.
+
\sa qstrncpy()
*/
char *qstrcpy(char *dst, const char *src)
{
if (!src)
- return 0;
+ return nullptr;
#ifdef Q_CC_MSVC
const int len = int(strlen(src));
// This is actually not secure!!! It will be fixed
// properly in a later release!
if (len >= 0 && strcpy_s(dst, len+1, src) == 0)
return dst;
- return 0;
+ return nullptr;
#else
return strcpy(dst, src);
#endif
@@ -287,11 +290,13 @@ char *qstrcpy(char *dst, const char *src)
Copies at most \a len bytes from \a src (stopping at \a len or the
terminating '\\0' whichever comes first) into \a dst and returns a
pointer to \a dst. Guarantees that \a dst is '\\0'-terminated. If
- \a src or \a dst is 0, returns 0 immediately.
+ \a src or \a dst is nullptr, returns nullptr immediately.
This function assumes that \a dst is at least \a len characters
long.
+ \note If \a dst and \a src overlap, the behavior is undefined.
+
\note When compiling with Visual C++ compiler version 14.00
(Visual C++ 2005) or later, internally the function strncpy_s
will be used.
@@ -302,7 +307,7 @@ char *qstrcpy(char *dst, const char *src)
char *qstrncpy(char *dst, const char *src, uint len)
{
if (!src || !dst)
- return 0;
+ return nullptr;
if (len > 0) {
#ifdef Q_CC_MSVC
strncpy_s(dst, len, src, len - 1);
@@ -320,7 +325,7 @@ char *qstrncpy(char *dst, const char *src, uint len)
A safe \c strlen() function.
Returns the number of characters that precede the terminating '\\0',
- or 0 if \a str is 0.
+ or 0 if \a str is nullptr.
\sa qstrnlen()
*/
@@ -332,7 +337,7 @@ char *qstrncpy(char *dst, const char *src, uint len)
A safe \c strnlen() function.
Returns the number of characters that precede the terminating '\\0', but
- at most \a maxlen. If \a str is 0, returns 0.
+ at most \a maxlen. If \a str is nullptr, returns 0.
\sa qstrlen()
*/
@@ -346,10 +351,10 @@ char *qstrncpy(char *dst, const char *src, uint len)
is less than \a str2, 0 if \a str1 is equal to \a str2 or a
positive value if \a str1 is greater than \a str2.
- Special case 1: Returns 0 if \a str1 and \a str2 are both 0.
+ Special case 1: Returns 0 if \a str1 and \a str2 are both nullptr.
- Special case 2: Returns an arbitrary non-zero value if \a str1 is 0
- or \a str2 is 0 (but not both).
+ Special case 2: Returns an arbitrary non-zero value if \a str1 is
+ nullptr or \a str2 is nullptr (but not both).
\sa qstrncmp(), qstricmp(), qstrnicmp(), {8-bit Character Comparisons}
*/
@@ -371,10 +376,10 @@ int qstrcmp(const char *str1, const char *str2)
str1 is equal to \a str2 or a positive value if \a str1 is greater
than \a str2.
- Special case 1: Returns 0 if \a str1 and \a str2 are both 0.
+ Special case 1: Returns 0 if \a str1 and \a str2 are both nullptr.
- Special case 2: Returns a random non-zero value if \a str1 is 0
- or \a str2 is 0 (but not both).
+ Special case 2: Returns a random non-zero value if \a str1 is nullptr
+ or \a str2 is nullptr (but not both).
\sa qstrcmp(), qstricmp(), qstrnicmp(), {8-bit Character Comparisons}
*/
@@ -390,10 +395,10 @@ int qstrcmp(const char *str1, const char *str2)
str1 is equal to \a str2 or a positive value if \a str1 is greater
than \a str2.
- Special case 1: Returns 0 if \a str1 and \a str2 are both 0.
+ Special case 1: Returns 0 if \a str1 and \a str2 are both nullptr.
- Special case 2: Returns a random non-zero value if \a str1 is 0
- or \a str2 is 0 (but not both).
+ Special case 2: Returns a random non-zero value if \a str1 is nullptr
+ or \a str2 is nullptr (but not both).
\sa qstrcmp(), qstrncmp(), qstrnicmp(), {8-bit Character Comparisons}
*/
@@ -424,10 +429,10 @@ int qstricmp(const char *str1, const char *str2)
is equal to \a str2 or a positive value if \a str1 is greater than \a
str2.
- Special case 1: Returns 0 if \a str1 and \a str2 are both 0.
+ Special case 1: Returns 0 if \a str1 and \a str2 are both nullptr.
- Special case 2: Returns a random non-zero value if \a str1 is 0
- or \a str2 is 0 (but not both).
+ Special case 2: Returns a random non-zero value if \a str1 is nullptr
+ or \a str2 is nullptr (but not both).
\sa qstrcmp(), qstrncmp(), qstricmp(), {8-bit Character Comparisons}
*/
@@ -777,19 +782,6 @@ QByteArray qUncompress(const uchar* data, int nbytes)
}
#endif
-static inline bool qIsUpper(char c)
-{
- return c >= 'A' && c <= 'Z';
-}
-
-static inline char qToLower(char c)
-{
- if (c >= 'A' && c <= 'Z')
- return c - 'A' + 'a';
- else
- return c;
-}
-
/*!
\class QByteArray
\inmodule QtCore
@@ -4131,9 +4123,10 @@ QByteArray &QByteArray::setNum(double n, char f, int prec)
QLocaleData::DoubleForm form = QLocaleData::DFDecimal;
uint flags = QLocaleData::ZeroPadExponent;
- if (qIsUpper(f))
+ char lower = latin1_lowercased[uchar(f)];
+ if (f != lower)
flags |= QLocaleData::CapitalEorX;
- f = qToLower(f);
+ f = lower;
switch (f) {
case 'f':
diff --git a/src/corelib/tools/qdatetimeparser.cpp b/src/corelib/tools/qdatetimeparser.cpp
index 551e01e076..d03518e70d 100644
--- a/src/corelib/tools/qdatetimeparser.cpp
+++ b/src/corelib/tools/qdatetimeparser.cpp
@@ -44,7 +44,9 @@
#include "qset.h"
#include "qlocale.h"
#include "qdatetime.h"
+#if QT_CONFIG(timezone)
#include "qtimezone.h"
+#endif
#include "qregexp.h"
#include "qdebug.h"
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 33835e3d28..17aba8035b 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -408,15 +408,20 @@ void **QListData::erase(void **xi)
from strings.
QList stores a list of items. The default constructor creates an
- empty list. To insert items into the list, you can use
- operator<<():
+ empty list. You can use the initializer-list constructor to create
+ a list with elements:
- \snippet code/src_corelib_tools_qlistdata.cpp 1
+ \snippet code/src_corelib_tools_qlistdata.cpp 1a
QList provides these basic functions to add, move, and remove
items: insert(), replace(), removeAt(), move(), and swap(). In
addition, it provides the following convenience functions:
- append(), prepend(), removeFirst(), and removeLast().
+ append(), \l{operator<<()}, \l{operator+=()}, prepend(), removeFirst(),
+ and removeLast().
+
+ \l{operator<<()} allows to conveniently add multiple elements to a list:
+
+ \snippet code/src_corelib_tools_qlistdata.cpp 1b
QList uses 0-based indexes, just like C++ arrays. To access the
item at a particular index position, you can use operator[](). On
diff --git a/src/corelib/tools/qlocale_unix.cpp b/src/corelib/tools/qlocale_unix.cpp
index 095001e0a3..f202082213 100644
--- a/src/corelib/tools/qlocale_unix.cpp
+++ b/src/corelib/tools/qlocale_unix.cpp
@@ -107,27 +107,55 @@ Q_GLOBAL_STATIC(QSystemLocaleData, qSystemLocaleData)
#ifndef QT_NO_SYSTEMLOCALE
+static bool contradicts(const QString &maybe, const QString &known)
+{
+ if (maybe.isEmpty())
+ return false;
+
+ /*
+ If \a known (our current best shot at deciding which language to use)
+ provides more information (e.g. script, country) than \a maybe (a
+ candidate to replace \a known) and \a maybe agrees with \a known in what
+ it does provide, we keep \a known; this happens when \a maybe comes from
+ LANGUAGE (usually a simple language code) and LANG includes script and/or
+ country. A textual comparison won't do because, for example, bn (Bengali)
+ isn't a prefix of ben_IN, but the latter is a refinement of the former.
+ (Meanwhile, bn is a prefix of bnt, Bantu; and a prefix of ben is be,
+ Belarusian. There are many more such prefixings between two- and
+ three-letter codes.)
+ */
+ QLocale::Language langm, langk;
+ QLocale::Script scriptm, scriptk;
+ QLocale::Country landm, landk;
+ QLocalePrivate::getLangAndCountry(maybe, langm, scriptm, landm);
+ QLocalePrivate::getLangAndCountry(known, langk, scriptk, landk);
+ return (langm != QLocale::AnyLanguage && langm != langk)
+ || (scriptm != QLocale::AnyScript && scriptm != scriptk)
+ || (landm != QLocale::AnyCountry && landm != landk);
+}
+
QLocale QSystemLocale::fallbackUiLocale() const
{
- QByteArray lang = qgetenv("LC_ALL");
+ // See man 7 locale for precedence - LC_ALL beats LC_MESSAGES beats LANG:
+ QString lang = qEnvironmentVariable("LC_ALL");
if (lang.isEmpty())
- lang = qgetenv("LC_MESSAGES");
+ lang = qEnvironmentVariable("LC_MESSAGES");
if (lang.isEmpty())
- lang = qgetenv("LANG");
+ lang = qEnvironmentVariable("LANG");
// if the locale is the "C" locale, then we can return the language we found here:
- if (lang.isEmpty() || lang == QByteArray("C") || lang == QByteArray("POSIX"))
- return QLocale(QString::fromLatin1(lang));
+ if (lang.isEmpty() || lang == QLatin1String("C") || lang == QLatin1String("POSIX"))
+ return QLocale(lang);
- // if the locale is not the "C" locale and LANGUAGE is not empty, return
- // the first part of LANGUAGE if LANGUAGE is set and has a first part:
- QByteArray language = qgetenv("LANGUAGE");
+ // ... otherwise, if the first part of LANGUAGE says more than or
+ // contradicts what we have, use that:
+ QString language = qEnvironmentVariable("LANGUAGE");
if (!language.isEmpty()) {
- language = language.split(':').constFirst();
- if (!language.isEmpty())
- return QLocale(QString::fromLatin1(language));
+ language = language.split(QLatin1Char(':')).constFirst();
+ if (contradicts(language, lang))
+ return QLocale(language);
}
- return QLocale(QString::fromLatin1(lang));
+ return QLocale(lang);
}
QVariant QSystemLocale::query(QueryType type, QVariant in) const
diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h
index 0f3e0c3517..ae46f0d39f 100644
--- a/src/corelib/tools/qpoint.h
+++ b/src/corelib/tools/qpoint.h
@@ -345,16 +345,24 @@ Q_DECL_RELAXED_CONSTEXPR inline QPointF &QPointF::operator*=(qreal c)
xp*=c; yp*=c; return *this;
}
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
+QT_WARNING_DISABLE_GCC("-Wfloat-equal")
+
Q_DECL_CONSTEXPR inline bool operator==(const QPointF &p1, const QPointF &p2)
{
- return qFuzzyIsNull(p1.xp - p2.xp) && qFuzzyIsNull(p1.yp - p2.yp);
+ return ((!p1.xp && !p1.yp) || (!p2.xp && !p2.yp))
+ ? (qFuzzyIsNull(p1.xp - p2.xp) && qFuzzyIsNull(p1.yp - p2.yp))
+ : (qFuzzyCompare(p1.xp, p2.xp) && qFuzzyCompare(p1.yp, p2.yp));
}
Q_DECL_CONSTEXPR inline bool operator!=(const QPointF &p1, const QPointF &p2)
{
- return !qFuzzyIsNull(p1.xp - p2.xp) || !qFuzzyIsNull(p1.yp - p2.yp);
+ return !(p1 == p2);
}
+QT_WARNING_POP
+
Q_DECL_CONSTEXPR inline const QPointF operator+(const QPointF &p1, const QPointF &p2)
{
return QPointF(p1.xp+p2.xp, p1.yp+p2.yp);
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index a0e408b94a..bccf8c5740 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -246,7 +246,8 @@ namespace QtSharedPointer {
struct ExternalRefCountWithContiguousData: public ExternalRefCountData
{
typedef ExternalRefCountData Parent;
- T data;
+ typedef typename std::remove_cv<T>::type NoCVType;
+ NoCVType data;
static void deleter(ExternalRefCountData *self)
{
@@ -262,7 +263,7 @@ namespace QtSharedPointer {
}
static void noDeleter(ExternalRefCountData *) { }
- static inline ExternalRefCountData *create(T **ptr, DestroyerFn destroy)
+ static inline ExternalRefCountData *create(NoCVType **ptr, DestroyerFn destroy)
{
ExternalRefCountWithContiguousData *d =
static_cast<ExternalRefCountWithContiguousData *>(::operator new(sizeof(ExternalRefCountWithContiguousData)));
@@ -437,10 +438,12 @@ public:
# endif
typename Private::DestroyerFn noDestroy = &Private::noDeleter;
QSharedPointer result(Qt::Uninitialized);
- result.d = Private::create(&result.value, noDestroy);
+ typename std::remove_cv<T>::type *ptr;
+ result.d = Private::create(&ptr, noDestroy);
// now initialize the data
- new (result.data()) T(std::forward<Args>(arguments)...);
+ new (ptr) T(std::forward<Args>(arguments)...);
+ result.value = ptr;
result.d->destroyer = destroy;
result.d->setQObjectShared(result.value, true);
# ifdef QT_SHAREDPOINTER_TRACK_POINTERS
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index eb56b31348..18684caefb 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -219,9 +219,8 @@
// AVX intrinsics
# if defined(__AVX__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC))
// AES, PCLMULQDQ instructions:
-// All processors that support AVX support AES, PCLMULQDQ
-// (but neither MSVC nor the Intel compiler define these macros)
-# define __AES__ 1
+// All processors that support AVX support PCLMULQDQ
+// (but neither MSVC nor the Intel compiler define this macro)
# define __PCLMUL__ 1
# endif
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index f6360f5504..a4b34263df 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -259,7 +259,7 @@ static bool simdTestMask(const char *&ptr, const char *end, quint32 maskval)
# if defined(__AVX2__)
// AVX2 implementation: test 32 bytes at a time
const __m256i mask256 = _mm256_broadcastd_epi32(_mm_cvtsi32_si128(maskval));
- while (ptr + 32 < end) {
+ while (ptr + 32 <= end) {
__m256i data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(ptr));
if (!_mm256_testz_si256(mask256, data))
return false;
@@ -271,7 +271,7 @@ static bool simdTestMask(const char *&ptr, const char *end, quint32 maskval)
// SSE 4.1 implementation: test 32 bytes at a time (two 16-byte
// comparisons, unrolled)
const __m128i mask = _mm_set1_epi32(maskval);
- while (ptr + 32 < end) {
+ while (ptr + 32 <= end) {
__m128i data1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr));
__m128i data2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr + 16));
if (!_mm_testz_si128(mask, data1))
@@ -283,7 +283,7 @@ static bool simdTestMask(const char *&ptr, const char *end, quint32 maskval)
# endif
# if defined(__SSE4_1__)
// AVX2 and SSE4.1: final 16-byte comparison
- if (ptr + 16 < end) {
+ if (ptr + 16 <= end) {
__m128i data1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr));
if (!_mm_testz_si128(mask, data1))
return false;
@@ -311,12 +311,19 @@ bool QtPrivate::isAscii(QLatin1String s) Q_DECL_NOTHROW
const char *ptr = s.begin();
const char *end = s.end();
-#if defined(__AVX2__)
- if (!simdTestMask(ptr, end, 0x80808080))
- return false;
-#elif defined(__SSE2__)
+#if defined(__SSE2__)
// Testing for the high bit can be done efficiently with just PMOVMSKB
- while (ptr + 16 < end) {
+# if defined(__AVX2__)
+ while (ptr + 32 <= end) {
+ __m256i data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(ptr));
+ quint32 mask = _mm256_movemask_epi8(data);
+ if (mask)
+ return false;
+ ptr += 32;
+ }
+# endif
+
+ while (ptr + 16 <= end) {
__m128i data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr));
quint32 mask = _mm_movemask_epi8(data);
if (mask)
@@ -325,7 +332,7 @@ bool QtPrivate::isAscii(QLatin1String s) Q_DECL_NOTHROW
}
#endif
- while (ptr + 4 < end) {
+ while (ptr + 4 <= end) {
quint32 data = qFromUnaligned<quint32>(ptr);
if (data & 0x80808080U)
return false;
@@ -646,30 +653,70 @@ static int ucstrncmp(const QChar *a, const QChar *b, size_t l)
}
#endif // __mips_dsp
#ifdef __SSE2__
- const char *ptr = reinterpret_cast<const char*>(a);
- qptrdiff distance = reinterpret_cast<const char*>(b) - ptr;
- a += l & ~7;
- b += l & ~7;
- l &= 7;
-
- // we're going to read ptr[0..15] (16 bytes)
- for ( ; ptr + 15 < reinterpret_cast<const char *>(a); ptr += 16) {
- __m128i a_data = _mm_loadu_si128((const __m128i*)ptr);
- __m128i b_data = _mm_loadu_si128((const __m128i*)(ptr + distance));
+ const QChar *end = a + l;
+ qptrdiff offset = 0;
+
+ // we're going to read a[0..15] and b[0..15] (32 bytes)
+ for ( ; a + offset + 16 <= end; offset += 16) {
+#ifdef __AVX2__
+ __m256i a_data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(a + offset));
+ __m256i b_data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(b + offset));
+ __m256i result = _mm256_cmpeq_epi16(a_data, b_data);
+ uint mask = _mm256_movemask_epi8(result);
+#else
+ __m128i a_data1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(a + offset));
+ __m128i a_data2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(a + offset + 8));
+ __m128i b_data1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(b + offset));
+ __m128i b_data2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(b + offset + 8));
+ __m128i result1 = _mm_cmpeq_epi16(a_data1, b_data1);
+ __m128i result2 = _mm_cmpeq_epi16(a_data2, b_data2);
+ uint mask = _mm_movemask_epi8(result1) | (_mm_movemask_epi8(result2) << 16);
+#endif
+ mask = ~mask;
+ if (mask) {
+ // found a different character
+ uint idx = qCountTrailingZeroBits(mask);
+ return a[offset + idx / 2].unicode() - b[offset + idx / 2].unicode();
+ }
+ }
+
+ // we're going to read a[0..7] and b[0..7] (16 bytes)
+ if (a + offset + 8 <= end) {
+ __m128i a_data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(a + offset));
+ __m128i b_data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(b + offset));
__m128i result = _mm_cmpeq_epi16(a_data, b_data);
uint mask = ~_mm_movemask_epi8(result);
if (ushort(mask)) {
- // found a different byte
+ // found a different character
+ uint idx = qCountTrailingZeroBits(mask);
+ return a[offset + idx / 2].unicode() - b[offset + idx / 2].unicode();
+ }
+
+ offset += 8;
+ }
+
+ // we're going to read a[0..3] and b[0..3] (8 bytes)
+ if (a + offset + 4 <= end) {
+ __m128i a_data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(a + offset));
+ __m128i b_data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(b + offset));
+ __m128i result = _mm_cmpeq_epi16(a_data, b_data);
+ uint mask = ~_mm_movemask_epi8(result);
+ if (uchar(mask)) {
+ // found a different character
uint idx = qCountTrailingZeroBits(mask);
- return reinterpret_cast<const QChar *>(ptr + idx)->unicode()
- - reinterpret_cast<const QChar *>(ptr + distance + idx)->unicode();
+ return a[offset + idx / 2].unicode() - b[offset + idx / 2].unicode();
}
+
+ offset += 4;
}
+
+ // reset l
+ l &= 3;
+
const auto lambda = [=](size_t i) -> int {
- return reinterpret_cast<const QChar *>(ptr)[i].unicode()
- - reinterpret_cast<const QChar *>(ptr + distance)[i].unicode();
+ return a[offset + i].unicode() - b[offset + i].unicode();
};
- return UnrollTailLoop<7>::exec(l, 0, lambda, lambda);
+ return UnrollTailLoop<3>::exec(l, 0, lambda, lambda);
#endif
#if defined(__ARM_NEON__) && defined(Q_PROCESSOR_ARM_64) // vaddv is only available on Aarch64
if (l >= 8) {
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp
index d10d9ad9d0..c9db39a29f 100644
--- a/src/corelib/tools/qstringlist.cpp
+++ b/src/corelib/tools/qstringlist.cpp
@@ -98,14 +98,25 @@ QT_BEGIN_NAMESPACE
\tableofcontents
+ \section1 Initializing
+
+ The default constructor creates an empty list. You can use the
+ initializer-list constructor to create a list with elements:
+
+ \snippet qstringlist/main.cpp 0a
+
\section1 Adding Strings
Strings can be added to a list using the \l
+ {QList::insert()}{insert()} \l
{QList::append()}{append()}, \l
{QList::operator+=()}{operator+=()} and \l
- {QStringList::operator<<()}{operator<<()} functions. For example:
+ {operator<<()} functions.
+
+ \l{operator<<()} can be used to
+ conveniently add multiple elements to a list:
- \snippet qstringlist/main.cpp 0
+ \snippet qstringlist/main.cpp 0b
\section1 Iterating Over the Strings
diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp
index 930c3bd2da..eb8f61c783 100644
--- a/src/dbus/qdbusmisc.cpp
+++ b/src/dbus/qdbusmisc.cpp
@@ -181,6 +181,13 @@ int qDBusParametersForMethod(const QList<QByteArray> &parameterTypes, QVector<in
}
int id = QMetaType::type(type);
+#ifdef QT_BOOTSTRAPPED
+ // in bootstrap mode QDBusMessage isn't included, thus we need to resolve it manually here
+ if (type == "QDBusMessage") {
+ id = QDBusMetaTypeId::message();
+ }
+#endif
+
if (id == QMetaType::UnknownType) {
errorMsg = QLatin1String("Unregistered input type in parameter list: ") + QLatin1String(type);
return -1;
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp
index c340bddc51..f55e90c153 100644
--- a/src/gui/itemmodels/qstandarditemmodel.cpp
+++ b/src/gui/itemmodels/qstandarditemmodel.cpp
@@ -1414,7 +1414,7 @@ void QStandardItem::setTristate(bool tristate)
}
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
Sets whether the item is drag enabled. If \a dragEnabled is true, the item
@@ -1472,7 +1472,7 @@ void QStandardItem::setDropEnabled(bool dropEnabled)
\sa setDropEnabled(), isDragEnabled(), flags()
*/
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*!
Returns the row where the item is located in its parent's child table, or
diff --git a/src/gui/itemmodels/qstandarditemmodel.h b/src/gui/itemmodels/qstandarditemmodel.h
index d1c04d6b51..827179b31d 100644
--- a/src/gui/itemmodels/qstandarditemmodel.h
+++ b/src/gui/itemmodels/qstandarditemmodel.h
@@ -179,7 +179,7 @@ public:
QT_DEPRECATED void setTristate(bool tristate);
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
inline bool isDragEnabled() const {
return (flags() & Qt::ItemIsDragEnabled) != 0;
}
@@ -189,7 +189,7 @@ public:
return (flags() & Qt::ItemIsDropEnabled) != 0;
}
void setDropEnabled(bool dropEnabled);
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
QStandardItem *parent() const;
int row() const;
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 792ca9fbaf..3b9afdfe8b 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -13,7 +13,6 @@ HEADERS += \
kernel/qwindowsysteminterface.h \
kernel/qwindowsysteminterface_p.h \
kernel/qplatformintegration.h \
- kernel/qplatformdrag.h \
kernel/qplatformscreen.h \
kernel/qplatformscreen_p.h \
kernel/qplatforminputcontext.h \
@@ -33,8 +32,6 @@ HEADERS += \
kernel/qplatformclipboard.h \
kernel/qplatformnativeinterface.h \
kernel/qplatformmenu.h \
- kernel/qshapedpixmapdndwindow_p.h \
- kernel/qsimpledrag_p.h \
kernel/qsurfaceformat.h \
kernel/qguiapplication.h \
kernel/qguiapplication_p.h \
@@ -46,12 +43,11 @@ HEADERS += \
kernel/qclipboard.h \
kernel/qcursor.h \
kernel/qcursor_p.h \
- kernel/qdrag.h \
- kernel/qdnd_p.h \
kernel/qevent.h \
kernel/qevent_p.h \
kernel/qinputmethod.h \
kernel/qinputmethod_p.h \
+ kernel/qinternalmimedata_p.h \
kernel/qkeysequence.h \
kernel/qkeysequence_p.h \
kernel/qkeymapper_p.h \
@@ -89,7 +85,6 @@ SOURCES += \
kernel/qplatforminputcontextplugin.cpp \
kernel/qplatforminputcontext.cpp \
kernel/qplatformintegration.cpp \
- kernel/qplatformdrag.cpp \
kernel/qplatformscreen.cpp \
kernel/qplatformintegrationfactory.cpp \
kernel/qplatformintegrationplugin.cpp \
@@ -102,8 +97,6 @@ SOURCES += \
kernel/qplatformclipboard.cpp \
kernel/qplatformnativeinterface.cpp \
kernel/qsessionmanager.cpp \
- kernel/qshapedpixmapdndwindow.cpp \
- kernel/qsimpledrag.cpp \
kernel/qsurfaceformat.cpp \
kernel/qguiapplication.cpp \
kernel/qwindow.cpp \
@@ -112,10 +105,9 @@ SOURCES += \
kernel/qsurface.cpp \
kernel/qclipboard.cpp \
kernel/qcursor.cpp \
- kernel/qdrag.cpp \
- kernel/qdnd.cpp \
kernel/qevent.cpp \
kernel/qinputmethod.cpp \
+ kernel/qinternalmimedata.cpp \
kernel/qkeysequence.cpp \
kernel/qkeymapper.cpp \
kernel/qpalette.cpp \
@@ -138,6 +130,21 @@ SOURCES += \
kernel/qinputdevicemanager.cpp \
kernel/qhighdpiscaling.cpp
+qtConfig(draganddrop) {
+ HEADERS += \
+ kernel/qdnd_p.h \
+ kernel/qdrag.h \
+ kernel/qplatformdrag.h \
+ kernel/qshapedpixmapdndwindow_p.h \
+ kernel/qsimpledrag_p.h
+
+ SOURCES += \
+ kernel/qdnd.cpp \
+ kernel/qdrag.cpp \
+ kernel/qplatformdrag.cpp \
+ kernel/qshapedpixmapdndwindow.cpp \
+ kernel/qsimpledrag.cpp
+}
qtConfig(opengl) {
HEADERS += \
diff --git a/src/gui/kernel/qdnd.cpp b/src/gui/kernel/qdnd.cpp
index 3af7f5c181..5c5f166554 100644
--- a/src/gui/kernel/qdnd.cpp
+++ b/src/gui/kernel/qdnd.cpp
@@ -37,39 +37,19 @@
**
****************************************************************************/
-#include "qplatformdefs.h"
+#include "qdnd_p.h"
-#include "qbitmap.h"
-#include "qdrag.h"
-#include "qpixmap.h"
-#include "qevent.h"
-#include "qfile.h"
-#include "qtextcodec.h"
#include "qguiapplication.h"
-#include "qpoint.h"
-#include "qbuffer.h"
-#include "qimage.h"
-#include "qpainter.h"
-#include "qregexp.h"
-#include "qdir.h"
-#include "qdnd_p.h"
-#include "qimagereader.h"
-#include "qimagewriter.h"
-#include "qdebug.h"
#include <ctype.h>
-#include <qpa/qplatformintegration.h>
#include <qpa/qplatformdrag.h>
-
+#include <qpa/qplatformintegration.h>
#include <private/qguiapplication_p.h>
-#ifndef QT_NO_DRAGANDDROP
-
QT_BEGIN_NAMESPACE
// the universe's only drag manager
QDragManager *QDragManager::m_instance = 0;
-
QDragManager::QDragManager()
: QObject(qApp), m_currentDropTarget(0),
m_platformDrag(QGuiApplicationPrivate::platformIntegration()->drag()),
@@ -78,7 +58,6 @@ QDragManager::QDragManager()
Q_ASSERT(!m_instance);
}
-
QDragManager::~QDragManager()
{
m_instance = 0;
@@ -142,196 +121,4 @@ Qt::DropAction QDragManager::drag(QDrag *o)
return result;
}
-#endif // QT_NO_DRAGANDDROP
-
-#if !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD))
-
-static QStringList imageMimeFormats(const QList<QByteArray> &imageFormats)
-{
- QStringList formats;
- formats.reserve(imageFormats.size());
- for (const auto &format : imageFormats)
- formats.append(QLatin1String("image/") + QLatin1String(format.toLower()));
-
- //put png at the front because it is best
- int pngIndex = formats.indexOf(QLatin1String("image/png"));
- if (pngIndex != -1 && pngIndex != 0)
- formats.move(pngIndex, 0);
-
- return formats;
-}
-
-static inline QStringList imageReadMimeFormats()
-{
- return imageMimeFormats(QImageReader::supportedImageFormats());
-}
-
-
-static inline QStringList imageWriteMimeFormats()
-{
- return imageMimeFormats(QImageWriter::supportedImageFormats());
-}
-
-QInternalMimeData::QInternalMimeData()
- : QMimeData()
-{
-}
-
-QInternalMimeData::~QInternalMimeData()
-{
-}
-
-bool QInternalMimeData::hasFormat(const QString &mimeType) const
-{
- bool foundFormat = hasFormat_sys(mimeType);
- if (!foundFormat && mimeType == QLatin1String("application/x-qt-image")) {
- QStringList imageFormats = imageReadMimeFormats();
- for (int i = 0; i < imageFormats.size(); ++i) {
- if ((foundFormat = hasFormat_sys(imageFormats.at(i))))
- break;
- }
- }
- return foundFormat;
-}
-
-QStringList QInternalMimeData::formats() const
-{
- QStringList realFormats = formats_sys();
- if (!realFormats.contains(QLatin1String("application/x-qt-image"))) {
- QStringList imageFormats = imageReadMimeFormats();
- for (int i = 0; i < imageFormats.size(); ++i) {
- if (realFormats.contains(imageFormats.at(i))) {
- realFormats += QLatin1String("application/x-qt-image");
- break;
- }
- }
- }
- return realFormats;
-}
-
-QVariant QInternalMimeData::retrieveData(const QString &mimeType, QVariant::Type type) const
-{
- QVariant data = retrieveData_sys(mimeType, type);
- if (mimeType == QLatin1String("application/x-qt-image")) {
- if (data.isNull() || (data.type() == QVariant::ByteArray && data.toByteArray().isEmpty())) {
- // try to find an image
- QStringList imageFormats = imageReadMimeFormats();
- for (int i = 0; i < imageFormats.size(); ++i) {
- data = retrieveData_sys(imageFormats.at(i), type);
- if (data.isNull() || (data.type() == QVariant::ByteArray && data.toByteArray().isEmpty()))
- continue;
- break;
- }
- }
- // we wanted some image type, but all we got was a byte array. Convert it to an image.
- if (data.type() == QVariant::ByteArray
- && (type == QVariant::Image || type == QVariant::Pixmap || type == QVariant::Bitmap))
- data = QImage::fromData(data.toByteArray());
-
- } else if (mimeType == QLatin1String("application/x-color") && data.type() == QVariant::ByteArray) {
- QColor c;
- QByteArray ba = data.toByteArray();
- if (ba.size() == 8) {
- ushort * colBuf = (ushort *)ba.data();
- c.setRgbF(qreal(colBuf[0]) / qreal(0xFFFF),
- qreal(colBuf[1]) / qreal(0xFFFF),
- qreal(colBuf[2]) / qreal(0xFFFF),
- qreal(colBuf[3]) / qreal(0xFFFF));
- data = c;
- } else {
- qWarning("Qt: Invalid color format");
- }
- } else if (data.type() != type && data.type() == QVariant::ByteArray) {
- // try to use mime data's internal conversion stuf.
- QInternalMimeData *that = const_cast<QInternalMimeData *>(this);
- that->setData(mimeType, data.toByteArray());
- data = QMimeData::retrieveData(mimeType, type);
- that->clear();
- }
- return data;
-}
-
-bool QInternalMimeData::canReadData(const QString &mimeType)
-{
- return imageReadMimeFormats().contains(mimeType);
-}
-
-// helper functions for rendering mimedata to the system, this is needed because QMimeData is in core.
-QStringList QInternalMimeData::formatsHelper(const QMimeData *data)
-{
- QStringList realFormats = data->formats();
- if (realFormats.contains(QLatin1String("application/x-qt-image"))) {
- // add all supported image formats
- QStringList imageFormats = imageWriteMimeFormats();
- for (int i = 0; i < imageFormats.size(); ++i) {
- if (!realFormats.contains(imageFormats.at(i)))
- realFormats.append(imageFormats.at(i));
- }
- }
- return realFormats;
-}
-
-bool QInternalMimeData::hasFormatHelper(const QString &mimeType, const QMimeData *data)
-{
-
- bool foundFormat = data->hasFormat(mimeType);
- if (!foundFormat) {
- if (mimeType == QLatin1String("application/x-qt-image")) {
- // check all supported image formats
- QStringList imageFormats = imageWriteMimeFormats();
- for (int i = 0; i < imageFormats.size(); ++i) {
- if ((foundFormat = data->hasFormat(imageFormats.at(i))))
- break;
- }
- } else if (mimeType.startsWith(QLatin1String("image/"))) {
- return data->hasImage() && imageWriteMimeFormats().contains(mimeType);
- }
- }
- return foundFormat;
-}
-
-QByteArray QInternalMimeData::renderDataHelper(const QString &mimeType, const QMimeData *data)
-{
- QByteArray ba;
- if (mimeType == QLatin1String("application/x-color")) {
- /* QMimeData can only provide colors as QColor or the name
- of a color as a QByteArray or a QString. So we need to do
- the conversion to application/x-color here.
- The application/x-color format is :
- type: application/x-color
- format: 16
- data[0]: red
- data[1]: green
- data[2]: blue
- data[3]: opacity
- */
- ba.resize(8);
- ushort * colBuf = (ushort *)ba.data();
- QColor c = qvariant_cast<QColor>(data->colorData());
- colBuf[0] = ushort(c.redF() * 0xFFFF);
- colBuf[1] = ushort(c.greenF() * 0xFFFF);
- colBuf[2] = ushort(c.blueF() * 0xFFFF);
- colBuf[3] = ushort(c.alphaF() * 0xFFFF);
- } else {
- ba = data->data(mimeType);
- if (ba.isEmpty()) {
- if (mimeType == QLatin1String("application/x-qt-image") && data->hasImage()) {
- QImage image = qvariant_cast<QImage>(data->imageData());
- QBuffer buf(&ba);
- buf.open(QBuffer::WriteOnly);
- // would there not be PNG ??
- image.save(&buf, "PNG");
- } else if (mimeType.startsWith(QLatin1String("image/")) && data->hasImage()) {
- QImage image = qvariant_cast<QImage>(data->imageData());
- QBuffer buf(&ba);
- buf.open(QBuffer::WriteOnly);
- image.save(&buf, mimeType.mid(mimeType.indexOf(QLatin1Char('/')) + 1).toLatin1().toUpper());
- }
- }
- }
- return ba;
-}
-
-#endif // QT_NO_DRAGANDDROP && QT_NO_CLIPBOARD
-
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h
index e7d83cbbaf..cc00bc1442 100644
--- a/src/gui/kernel/qdnd_p.h
+++ b/src/gui/kernel/qdnd_p.h
@@ -62,41 +62,16 @@
#include "QtCore/qpoint.h"
#include "private/qobject_p.h"
#include "QtGui/qbackingstore.h"
-QT_BEGIN_NAMESPACE
-
-class QEventLoop;
-class QMouseEvent;
-class QPlatformDrag;
-
-#if !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD))
-
-class Q_GUI_EXPORT QInternalMimeData : public QMimeData
-{
- Q_OBJECT
-public:
- QInternalMimeData();
- ~QInternalMimeData();
-
- bool hasFormat(const QString &mimeType) const override;
- QStringList formats() const override;
- static bool canReadData(const QString &mimeType);
+// ### Remove the following include, once everybody includes
+// qinternalmimedata_p.h for QInternalMimeData.
+#include "qinternalmimedata_p.h"
- static QStringList formatsHelper(const QMimeData *data);
- static bool hasFormatHelper(const QString &mimeType, const QMimeData *data);
- static QByteArray renderDataHelper(const QString &mimeType, const QMimeData *data);
+QT_REQUIRE_CONFIG(draganddrop);
-protected:
- QVariant retrieveData(const QString &mimeType, QVariant::Type type) const override;
-
- virtual bool hasFormat_sys(const QString &mimeType) const = 0;
- virtual QStringList formats_sys() const = 0;
- virtual QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const = 0;
-};
-
-#endif // !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD))
+QT_BEGIN_NAMESPACE
-#ifndef QT_NO_DRAGANDDROP
+class QPlatformDrag;
class QDragPrivate : public QObjectPrivate
{
@@ -142,10 +117,6 @@ private:
Q_DISABLE_COPY(QDragManager)
};
-
-#endif // !QT_NO_DRAGANDDROP
-
-
QT_END_NAMESPACE
#endif // QDND_P_H
diff --git a/src/gui/kernel/qdrag.cpp b/src/gui/kernel/qdrag.cpp
index 982c9e7659..bb0e490aa0 100644
--- a/src/gui/kernel/qdrag.cpp
+++ b/src/gui/kernel/qdrag.cpp
@@ -45,8 +45,6 @@
#include <qpoint.h>
#include "qdnd_p.h"
-#ifndef QT_NO_DRAGANDDROP
-
QT_BEGIN_NAMESPACE
/*!
@@ -420,5 +418,3 @@ void QDrag::cancel()
*/
QT_END_NAMESPACE
-
-#endif // QT_NO_DRAGANDDROP
diff --git a/src/gui/kernel/qdrag.h b/src/gui/kernel/qdrag.h
index a8288e1b53..27b9c2c88f 100644
--- a/src/gui/kernel/qdrag.h
+++ b/src/gui/kernel/qdrag.h
@@ -43,10 +43,10 @@
#include <QtGui/qtguiglobal.h>
#include <QtCore/qobject.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(draganddrop);
+QT_BEGIN_NAMESPACE
-#ifndef QT_NO_DRAGANDDROP
class QMimeData;
class QDragPrivate;
class QPixmap;
@@ -95,8 +95,6 @@ private:
Q_DISABLE_COPY(QDrag)
};
-#endif // QT_NO_DRAGANDDROP
-
QT_END_NAMESPACE
#endif // QDRAG_H
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 50d9bbb2cc..3c412903e1 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -42,16 +42,19 @@
#include "private/qguiapplication_p.h"
#include "private/qtouchdevice_p.h"
#include "qpa/qplatformintegration.h"
-#include "qpa/qplatformdrag.h"
#include "private/qevent_p.h"
#include "qfile.h"
#include "qhashfunctions.h"
#include "qmetaobject.h"
#include "qmimedata.h"
-#include "private/qdnd_p.h"
#include "qevent_p.h"
#include "qmath.h"
+#if QT_CONFIG(draganddrop)
+#include <qpa/qplatformdrag.h>
+#include <private/qdnd_p.h>
+#endif
+
#include <private/qdebug_p.h>
QT_BEGIN_NAMESPACE
@@ -2883,7 +2886,7 @@ const QTouchDevice *QNativeGestureEvent::device() const
*/
#endif // QT_NO_GESTURES
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
Creates a QDragMoveEvent of the required \a type indicating
that the mouse is at position \a pos given within a widget.
@@ -3227,7 +3230,7 @@ QDragLeaveEvent::QDragLeaveEvent()
QDragLeaveEvent::~QDragLeaveEvent()
{
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*!
\class QHelpEvent
@@ -3902,7 +3905,7 @@ static const char *eventClassName(QEvent::Type t)
return "QEvent";
}
-# ifndef QT_NO_DRAGANDDROP
+# if QT_CONFIG(draganddrop)
static void formatDropEvent(QDebug d, const QDropEvent *e)
{
@@ -3923,7 +3926,7 @@ static void formatDropEvent(QDebug d, const QDropEvent *e)
QtDebugUtils::formatQFlags(d, e->mouseButtons());
}
-# endif // !QT_NO_DRAGANDDROP
+# endif // QT_CONFIG(draganddrop)
# if QT_CONFIG(tabletevent)
@@ -4086,13 +4089,13 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
dbg << ')';
}
break;
-# ifndef QT_NO_DRAGANDDROP
+# if QT_CONFIG(draganddrop)
case QEvent::DragEnter:
case QEvent::DragMove:
case QEvent::Drop:
formatDropEvent(dbg, static_cast<const QDropEvent *>(e));
break;
-# endif // !QT_NO_DRAGANDDROP
+# endif // QT_CONFIG(draganddrop)
case QEvent::InputMethod:
formatInputMethodEvent(dbg, static_cast<const QInputMethodEvent *>(e));
break;
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index d95da40368..033d24d665 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -598,7 +598,7 @@ Q_DECLARE_TYPEINFO(QInputMethodQueryEvent::QueryPair, Q_MOVABLE_TYPE);
#endif // QT_NO_INPUTMETHOD
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
class QMimeData;
@@ -671,7 +671,7 @@ public:
QDragLeaveEvent();
~QDragLeaveEvent();
};
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
class Q_GUI_EXPORT QHelpEvent : public QEvent
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 30b942b30c..393a49587c 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -50,7 +50,6 @@
#include <qpa/qplatformnativeinterface.h>
#include <qpa/qplatformtheme.h>
#include <qpa/qplatformintegration.h>
-#include <qpa/qplatformdrag.h>
#include <QtCore/QAbstractEventDispatcher>
#include <QtCore/QStandardPaths>
@@ -87,9 +86,13 @@
#include "private/qinputdevicemanager_p.h"
#include "private/qtouchdevice_p.h"
-#include "private/qdnd_p.h"
#include <qpa/qplatformthemefactory_p.h>
+#if QT_CONFIG(draganddrop)
+#include <qpa/qplatformdrag.h>
+#include <private/qdnd_p.h>
+#endif
+
#ifndef QT_NO_CURSOR
#include <qpa/qplatformcursor.h>
#endif
@@ -3047,7 +3050,7 @@ void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::E
QCoreApplication::sendSpontaneousEvent(window, &exposeEvent);
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QPlatformDragQtResponse QGuiApplicationPrivate::processDrag(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions)
{
@@ -3107,7 +3110,7 @@ QPlatformDropQtResponse QGuiApplicationPrivate::processDrop(QWindow *w, const QM
return response;
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
#ifndef QT_NO_CLIPBOARD
/*!
@@ -3923,7 +3926,7 @@ void QGuiApplicationPrivate::notifyThemeChanged()
}
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void QGuiApplicationPrivate::notifyDragStarted(const QDrag *drag)
{
Q_UNUSED(drag)
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index 75cbc7abde..2fefaf0af6 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -70,9 +70,9 @@ class QColorProfile;
class QPlatformIntegration;
class QPlatformTheme;
class QPlatformDragQtResponse;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
class QDrag;
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
class QInputDeviceManager;
class Q_GUI_EXPORT QGuiApplicationPrivate : public QCoreApplicationPrivate
@@ -162,7 +162,7 @@ public:
static void processContextMenuEvent(QWindowSystemInterfacePrivate::ContextMenuEvent *e);
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
static QPlatformDragQtResponse processDrag(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions);
static QPlatformDropQtResponse processDrop(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions);
#endif
@@ -309,9 +309,9 @@ public:
protected:
virtual void notifyThemeChanged();
bool tryCloseRemainingWindows(QWindowList processedWindows);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
virtual void notifyDragStarted(const QDrag *);
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
private:
friend class QDragManager;
diff --git a/src/gui/kernel/qinputdevicemanager.cpp b/src/gui/kernel/qinputdevicemanager.cpp
index 37b1450d5a..6e4e5a9c93 100644
--- a/src/gui/kernel/qinputdevicemanager.cpp
+++ b/src/gui/kernel/qinputdevicemanager.cpp
@@ -109,30 +109,9 @@ Qt::KeyboardModifiers QInputDeviceManager::keyboardModifiers() const
return d->keyboardModifiers;
}
-void QInputDeviceManager::setKeyboardModifiers(Qt::KeyboardModifiers modsBeforeEvent, int key)
+void QInputDeviceManager::setKeyboardModifiers(Qt::KeyboardModifiers mods)
{
Q_D(QInputDeviceManager);
- Qt::KeyboardModifiers mods;
- switch (key) {
- case Qt::Key_Shift:
- mods = Qt::KeyboardModifiers(modsBeforeEvent ^ Qt::ShiftModifier);
- break;
- case Qt::Key_Control:
- mods = Qt::KeyboardModifiers(modsBeforeEvent ^ Qt::ControlModifier);
- break;
- case Qt::Key_Alt:
- mods = Qt::KeyboardModifiers(modsBeforeEvent ^ Qt::AltModifier);
- break;
- case Qt::Key_Meta:
- mods = Qt::KeyboardModifiers(modsBeforeEvent ^ Qt::MetaModifier);
- break;
- case Qt::Key_AltGr:
- mods = Qt::KeyboardModifiers(modsBeforeEvent ^ Qt::GroupSwitchModifier);
- break;
- default:
- mods = modsBeforeEvent;
- break;
- }
d->keyboardModifiers = mods;
}
diff --git a/src/gui/kernel/qinputdevicemanager_p.h b/src/gui/kernel/qinputdevicemanager_p.h
index ddf1e6befa..d73c5526d0 100644
--- a/src/gui/kernel/qinputdevicemanager_p.h
+++ b/src/gui/kernel/qinputdevicemanager_p.h
@@ -79,7 +79,7 @@ public:
void setCursorPos(const QPoint &pos);
Qt::KeyboardModifiers keyboardModifiers() const;
- void setKeyboardModifiers(Qt::KeyboardModifiers modsBeforeEvent, int key);
+ void setKeyboardModifiers(Qt::KeyboardModifiers mods);
signals:
void deviceListChanged(QInputDeviceManager::DeviceType type);
diff --git a/src/gui/kernel/qinternalmimedata.cpp b/src/gui/kernel/qinternalmimedata.cpp
new file mode 100644
index 0000000000..8f4da1afb5
--- /dev/null
+++ b/src/gui/kernel/qinternalmimedata.cpp
@@ -0,0 +1,234 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtGui 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 "qinternalmimedata_p.h"
+
+#include <QtCore/qbuffer.h>
+#include <QtGui/qimage.h>
+#include <QtGui/qimagereader.h>
+#include <QtGui/qimagewriter.h>
+
+QT_BEGIN_NAMESPACE
+
+static QStringList imageMimeFormats(const QList<QByteArray> &imageFormats)
+{
+ QStringList formats;
+ formats.reserve(imageFormats.size());
+ for (const auto &format : imageFormats)
+ formats.append(QLatin1String("image/") + QLatin1String(format.toLower()));
+
+ //put png at the front because it is best
+ int pngIndex = formats.indexOf(QLatin1String("image/png"));
+ if (pngIndex != -1 && pngIndex != 0)
+ formats.move(pngIndex, 0);
+
+ return formats;
+}
+
+static inline QStringList imageReadMimeFormats()
+{
+ return imageMimeFormats(QImageReader::supportedImageFormats());
+}
+
+static inline QStringList imageWriteMimeFormats()
+{
+ return imageMimeFormats(QImageWriter::supportedImageFormats());
+}
+
+QInternalMimeData::QInternalMimeData()
+ : QMimeData()
+{
+}
+
+QInternalMimeData::~QInternalMimeData()
+{
+}
+
+bool QInternalMimeData::hasFormat(const QString &mimeType) const
+{
+ bool foundFormat = hasFormat_sys(mimeType);
+ if (!foundFormat && mimeType == QLatin1String("application/x-qt-image")) {
+ QStringList imageFormats = imageReadMimeFormats();
+ for (int i = 0; i < imageFormats.size(); ++i) {
+ if ((foundFormat = hasFormat_sys(imageFormats.at(i))))
+ break;
+ }
+ }
+ return foundFormat;
+}
+
+QStringList QInternalMimeData::formats() const
+{
+ QStringList realFormats = formats_sys();
+ if (!realFormats.contains(QLatin1String("application/x-qt-image"))) {
+ QStringList imageFormats = imageReadMimeFormats();
+ for (int i = 0; i < imageFormats.size(); ++i) {
+ if (realFormats.contains(imageFormats.at(i))) {
+ realFormats += QLatin1String("application/x-qt-image");
+ break;
+ }
+ }
+ }
+ return realFormats;
+}
+
+QVariant QInternalMimeData::retrieveData(const QString &mimeType, QVariant::Type type) const
+{
+ QVariant data = retrieveData_sys(mimeType, type);
+ if (mimeType == QLatin1String("application/x-qt-image")) {
+ if (data.isNull() || (data.type() == QVariant::ByteArray && data.toByteArray().isEmpty())) {
+ // try to find an image
+ QStringList imageFormats = imageReadMimeFormats();
+ for (int i = 0; i < imageFormats.size(); ++i) {
+ data = retrieveData_sys(imageFormats.at(i), type);
+ if (data.isNull() || (data.type() == QVariant::ByteArray && data.toByteArray().isEmpty()))
+ continue;
+ break;
+ }
+ }
+ // we wanted some image type, but all we got was a byte array. Convert it to an image.
+ if (data.type() == QVariant::ByteArray
+ && (type == QVariant::Image || type == QVariant::Pixmap || type == QVariant::Bitmap))
+ data = QImage::fromData(data.toByteArray());
+
+ } else if (mimeType == QLatin1String("application/x-color") && data.type() == QVariant::ByteArray) {
+ QColor c;
+ QByteArray ba = data.toByteArray();
+ if (ba.size() == 8) {
+ ushort * colBuf = (ushort *)ba.data();
+ c.setRgbF(qreal(colBuf[0]) / qreal(0xFFFF),
+ qreal(colBuf[1]) / qreal(0xFFFF),
+ qreal(colBuf[2]) / qreal(0xFFFF),
+ qreal(colBuf[3]) / qreal(0xFFFF));
+ data = c;
+ } else {
+ qWarning("Qt: Invalid color format");
+ }
+ } else if (data.type() != type && data.type() == QVariant::ByteArray) {
+ // try to use mime data's internal conversion stuf.
+ QInternalMimeData *that = const_cast<QInternalMimeData *>(this);
+ that->setData(mimeType, data.toByteArray());
+ data = QMimeData::retrieveData(mimeType, type);
+ that->clear();
+ }
+ return data;
+}
+
+bool QInternalMimeData::canReadData(const QString &mimeType)
+{
+ return imageReadMimeFormats().contains(mimeType);
+}
+
+// helper functions for rendering mimedata to the system, this is needed because QMimeData is in core.
+QStringList QInternalMimeData::formatsHelper(const QMimeData *data)
+{
+ QStringList realFormats = data->formats();
+ if (realFormats.contains(QLatin1String("application/x-qt-image"))) {
+ // add all supported image formats
+ QStringList imageFormats = imageWriteMimeFormats();
+ for (int i = 0; i < imageFormats.size(); ++i) {
+ if (!realFormats.contains(imageFormats.at(i)))
+ realFormats.append(imageFormats.at(i));
+ }
+ }
+ return realFormats;
+}
+
+bool QInternalMimeData::hasFormatHelper(const QString &mimeType, const QMimeData *data)
+{
+
+ bool foundFormat = data->hasFormat(mimeType);
+ if (!foundFormat) {
+ if (mimeType == QLatin1String("application/x-qt-image")) {
+ // check all supported image formats
+ QStringList imageFormats = imageWriteMimeFormats();
+ for (int i = 0; i < imageFormats.size(); ++i) {
+ if ((foundFormat = data->hasFormat(imageFormats.at(i))))
+ break;
+ }
+ } else if (mimeType.startsWith(QLatin1String("image/"))) {
+ return data->hasImage() && imageWriteMimeFormats().contains(mimeType);
+ }
+ }
+ return foundFormat;
+}
+
+QByteArray QInternalMimeData::renderDataHelper(const QString &mimeType, const QMimeData *data)
+{
+ QByteArray ba;
+ if (mimeType == QLatin1String("application/x-color")) {
+ /* QMimeData can only provide colors as QColor or the name
+ of a color as a QByteArray or a QString. So we need to do
+ the conversion to application/x-color here.
+ The application/x-color format is :
+ type: application/x-color
+ format: 16
+ data[0]: red
+ data[1]: green
+ data[2]: blue
+ data[3]: opacity
+ */
+ ba.resize(8);
+ ushort * colBuf = (ushort *)ba.data();
+ QColor c = qvariant_cast<QColor>(data->colorData());
+ colBuf[0] = ushort(c.redF() * 0xFFFF);
+ colBuf[1] = ushort(c.greenF() * 0xFFFF);
+ colBuf[2] = ushort(c.blueF() * 0xFFFF);
+ colBuf[3] = ushort(c.alphaF() * 0xFFFF);
+ } else {
+ ba = data->data(mimeType);
+ if (ba.isEmpty()) {
+ if (mimeType == QLatin1String("application/x-qt-image") && data->hasImage()) {
+ QImage image = qvariant_cast<QImage>(data->imageData());
+ QBuffer buf(&ba);
+ buf.open(QBuffer::WriteOnly);
+ // would there not be PNG ??
+ image.save(&buf, "PNG");
+ } else if (mimeType.startsWith(QLatin1String("image/")) && data->hasImage()) {
+ QImage image = qvariant_cast<QImage>(data->imageData());
+ QBuffer buf(&ba);
+ buf.open(QBuffer::WriteOnly);
+ image.save(&buf, mimeType.mid(mimeType.indexOf(QLatin1Char('/')) + 1).toLatin1().toUpper());
+ }
+ }
+ }
+ return ba;
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qinternalmimedata_p.h b/src/gui/kernel/qinternalmimedata_p.h
new file mode 100644
index 0000000000..aa5e896323
--- /dev/null
+++ b/src/gui/kernel/qinternalmimedata_p.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtGui 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 QINTERNALMIMEDATA_P_H
+#define QINTERNALMIMEDATA_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qbytearray.h>
+#include <QtCore/qmimedata.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/qvariant.h>
+#include <QtGui/private/qtguiglobal_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QEventLoop;
+class QMouseEvent;
+class QPlatformDrag;
+
+class Q_GUI_EXPORT QInternalMimeData : public QMimeData
+{
+ Q_OBJECT
+public:
+ QInternalMimeData();
+ ~QInternalMimeData();
+
+ bool hasFormat(const QString &mimeType) const override;
+ QStringList formats() const override;
+ static bool canReadData(const QString &mimeType);
+
+
+ static QStringList formatsHelper(const QMimeData *data);
+ static bool hasFormatHelper(const QString &mimeType, const QMimeData *data);
+ static QByteArray renderDataHelper(const QString &mimeType, const QMimeData *data);
+
+protected:
+ QVariant retrieveData(const QString &mimeType, QVariant::Type type) const override;
+
+ virtual bool hasFormat_sys(const QString &mimeType) const = 0;
+ virtual QStringList formats_sys() const = 0;
+ virtual QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const = 0;
+};
+
+QT_END_NAMESPACE
+
+#endif // QINTERNALMIMEDATA_P_H
diff --git a/src/gui/kernel/qplatformdrag.cpp b/src/gui/kernel/qplatformdrag.cpp
index 3c23406a6b..b40ddcbfb8 100644
--- a/src/gui/kernel/qplatformdrag.cpp
+++ b/src/gui/kernel/qplatformdrag.cpp
@@ -46,7 +46,6 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_DRAGANDDROP
#ifdef QDND_DEBUG
# include <QtCore/QDebug>
#endif
@@ -222,6 +221,4 @@ bool QPlatformDrag::ownsDragObject() const
return false;
}
-#endif // QT_NO_DRAGANDDROP
-
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformdrag.h b/src/gui/kernel/qplatformdrag.h
index 54e6a667fe..9d4e352b4b 100644
--- a/src/gui/kernel/qplatformdrag.h
+++ b/src/gui/kernel/qplatformdrag.h
@@ -52,9 +52,9 @@
#include <QtGui/qtguiglobal.h>
#include <QtGui/QPixmap>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(draganddrop);
-#ifndef QT_NO_DRAGANDDROP
+QT_BEGIN_NAMESPACE
class QMimeData;
class QMouseEvent;
@@ -112,8 +112,6 @@ private:
Q_DISABLE_COPY(QPlatformDrag)
};
-#endif // QT_NO_DRAGANDDROP
-
QT_END_NAMESPACE
#endif
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index 2aaa4c8510..dfb8f60915 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -45,8 +45,11 @@
#include <qpa/qplatformtheme.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/private/qpixmap_raster_p.h>
+
+#if QT_CONFIG(draganddrop)
#include <private/qdnd_p.h>
#include <private/qsimpledrag_p.h>
+#endif
#ifndef QT_NO_SESSIONMANAGER
# include <qpa/qplatformsessionmanager.h>
@@ -92,7 +95,7 @@ QPlatformClipboard *QPlatformIntegration::clipboard() const
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
Accessor for the platform integration's drag object.
@@ -107,7 +110,7 @@ QPlatformDrag *QPlatformIntegration::drag() const
}
return drag;
}
-#endif
+#endif // QT_CONFIG(draganddrop)
QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const
{
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index d88f818920..efb1481f6d 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -130,7 +130,7 @@ public:
#ifndef QT_NO_CLIPBOARD
virtual QPlatformClipboard *clipboard() const;
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
virtual QPlatformDrag *drag() const;
#endif
virtual QPlatformInputContext *inputContext() const;
diff --git a/src/gui/kernel/qshapedpixmapdndwindow_p.h b/src/gui/kernel/qshapedpixmapdndwindow_p.h
index 477938867c..072e7c6aea 100644
--- a/src/gui/kernel/qshapedpixmapdndwindow_p.h
+++ b/src/gui/kernel/qshapedpixmapdndwindow_p.h
@@ -55,6 +55,8 @@
#include <QtGui/QRasterWindow>
#include <QtGui/QPixmap>
+QT_REQUIRE_CONFIG(draganddrop);
+
QT_BEGIN_NAMESPACE
class QShapedPixmapWindow : public QRasterWindow
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index 6c19eab287..fa1eb6f6bf 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -648,10 +648,16 @@ void QShortcutMap::dispatchEvent(QKeyEvent *e)
// Find next
const QShortcutEntry *current = 0, *next = 0;
int i = 0, enabledShortcuts = 0;
+#if defined(DEBUG_QSHORTCUTMAP)
+ QVector<const QShortcutEntry*> ambiguousShortcuts;
+#endif
while(i < d->identicals.size()) {
current = d->identicals.at(i);
if (current->enabled || !next){
++enabledShortcuts;
+#if defined(DEBUG_QSHORTCUTMAP)
+ ambiguousShortcuts.append(current);
+#endif
if (enabledShortcuts > d->ambigCount + 1)
break;
next = current;
@@ -665,6 +671,13 @@ void QShortcutMap::dispatchEvent(QKeyEvent *e)
return;
// Dispatch next enabled
#if defined(DEBUG_QSHORTCUTMAP)
+ if (ambiguousShortcuts.size() > 1) {
+ qDebug() << "The following shortcuts are about to be activated ambiguously:";
+ for (const QShortcutEntry *entry : qAsConst(ambiguousShortcuts)) {
+ qDebug().nospace() << "- " << entry->keyseq << " (belonging to " << entry->owner << ")";
+ }
+ }
+
qDebug().nospace()
<< "QShortcutMap::dispatchEvent(): Sending QShortcutEvent(\""
<< next->keyseq.toString() << "\", " << next->id << ", "
diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp
index c98b879a15..12e204a09f 100644
--- a/src/gui/kernel/qsimpledrag.cpp
+++ b/src/gui/kernel/qsimpledrag.cpp
@@ -68,8 +68,6 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_DRAGANDDROP
-
Q_LOGGING_CATEGORY(lcDnd, "qt.gui.dnd")
static QWindow* topLevelAt(const QPoint &pos)
@@ -434,6 +432,4 @@ void QSimpleDrag::drop(const QPoint &nativeGlobalPos)
}
}
-#endif // QT_NO_DRAGANDDROP
-
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h
index e56c7bf306..d980a3c49d 100644
--- a/src/gui/kernel/qsimpledrag_p.h
+++ b/src/gui/kernel/qsimpledrag_p.h
@@ -56,9 +56,9 @@
#include <QtCore/QObject>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(draganddrop);
-#ifndef QT_NO_DRAGANDDROP
+QT_BEGIN_NAMESPACE
class QMouseEvent;
class QWindow;
@@ -136,8 +136,6 @@ protected:
virtual void drop(const QPoint &globalPos) override;
};
-#endif // QT_NO_DRAGANDDROP
-
QT_END_NAMESPACE
#endif
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 2c7e061bcf..9abe04810b 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -55,7 +55,9 @@
# include "qaccessible.h"
#endif
#include "qhighdpiscaling_p.h"
+#if QT_CONFIG(draganddrop)
#include "qshapedpixmapdndwindow_p.h"
+#endif // QT_CONFIG(draganddrop)
#include <private/qevent_p.h>
@@ -382,7 +384,11 @@ void QWindowPrivate::setVisible(bool visible)
QGuiApplicationPrivate::hideModalWindow(q);
// QShapedPixmapWindow is used on some platforms for showing a drag pixmap, so don't block
// input to this window as it is performing a drag - QTBUG-63846
- } else if (visible && QGuiApplication::modalWindow() && !qobject_cast<QShapedPixmapWindow *>(q)) {
+ } else if (visible && QGuiApplication::modalWindow()
+#if QT_CONFIG(draganddrop)
+ && !qobject_cast<QShapedPixmapWindow *>(q)
+#endif // QT_CONFIG(draganddrop)
+ ) {
QGuiApplicationPrivate::updateBlockedStatus(q);
}
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 5243ae66a2..6edcdfc255 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -43,12 +43,15 @@
#include "private/qevent_p.h"
#include "private/qtouchdevice_p.h"
#include <QAbstractEventDispatcher>
-#include <qpa/qplatformdrag.h>
#include <qpa/qplatformintegration.h>
#include <qdebug.h>
#include "qhighdpiscaling_p.h"
#include <QtCore/qscopedvaluerollback.h>
+#if QT_CONFIG(draganddrop)
+#include <qpa/qplatformdrag.h>
+#endif
+
QT_BEGIN_NAMESPACE
@@ -258,11 +261,12 @@ QT_DEFINE_QPA_EVENT_HANDLER(void, handleWindowStateChanged, QWindow *window, Qt:
QWindowSystemInterfacePrivate::handleWindowSystemEvent<Delivery>(e);
}
-void QWindowSystemInterface::handleWindowScreenChanged(QWindow *window, QScreen *screen)
+QT_DEFINE_QPA_EVENT_HANDLER(void, handleWindowScreenChanged, QWindow *window, QScreen *screen)
{
+
QWindowSystemInterfacePrivate::WindowScreenChangedEvent *e =
new QWindowSystemInterfacePrivate::WindowScreenChangedEvent(window, screen);
- QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
+ QWindowSystemInterfacePrivate::handleWindowSystemEvent<Delivery>(e);
}
QT_DEFINE_QPA_EVENT_HANDLER(void, handleSafeAreaMarginsChanged, QWindow *window)
@@ -790,7 +794,7 @@ void QWindowSystemInterface::handleThemeChange(QWindow *window)
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QPlatformDragQtResponse QWindowSystemInterface::handleDrag(QWindow *window, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions)
{
return QGuiApplicationPrivate::processDrag(window, dropData, QHighDpi::fromNativeLocalPosition(p, window) ,supportedActions);
@@ -800,7 +804,7 @@ QPlatformDropQtResponse QWindowSystemInterface::handleDrop(QWindow *window, cons
{
return QGuiApplicationPrivate::processDrop(window, dropData, QHighDpi::fromNativeLocalPosition(p, window),supportedActions);
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*!
\fn static QWindowSystemInterface::handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result)
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index b22495f9d0..bba0b05c5a 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -205,6 +205,7 @@ public:
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleWindowStateChanged(QWindow *window, Qt::WindowStates newState, int oldState = -1);
+ template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleWindowScreenChanged(QWindow *window, QScreen *newScreen);
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
@@ -213,7 +214,7 @@ public:
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleApplicationStateChanged(Qt::ApplicationState newState, bool forcePropagate = false);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
// Drag and drop. These events are sent immediately.
static QPlatformDragQtResponse handleDrag(QWindow *window, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions);
static QPlatformDropQtResponse handleDrop(QWindow *window, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions);
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index ff044a91da..977565516f 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -598,7 +598,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glBindTexture(\a target, \a texture).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBindTexture.xml}{glBindTexture()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindTexture.xhtml}{glBindTexture()}.
\since 5.3
*/
@@ -609,7 +609,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glBlendFunc(\a sfactor, \a dfactor).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBlendFunc.xml}{glBlendFunc()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBlendFunc.xhtml}{glBlendFunc()}.
\since 5.3
*/
@@ -620,7 +620,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glClear(\a mask).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glClear.xml}{glClear()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glClear.xhtml}{glClear()}.
\since 5.3
*/
@@ -631,7 +631,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glClearColor(\a red, \a green, \a blue, \a alpha).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glClearColor.xml}{glClearColor()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glClearColor.xhtml}{glClearColor()}.
\since 5.3
*/
@@ -642,7 +642,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glClearStencil(\a s).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glClearStencil.xml}{glClearStencil()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glClearStencil.xhtml}{glClearStencil()}.
\since 5.3
*/
@@ -653,7 +653,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glColorMask(\a red, \a green, \a blue, \a alpha).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glColorMask.xml}{glColorMask()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glColorMask.xhtml}{glColorMask()}.
\since 5.3
*/
@@ -664,7 +664,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glCopyTexImage2D(\a target, \a level, \a internalformat, \a x, \a y, \a width, \a height, \a border).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glCopyTexImage2D.xml}{glCopyTexImage2D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCopyTexImage2D.xhtml}{glCopyTexImage2D()}.
\since 5.3
*/
@@ -675,7 +675,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glCopyTexSubImage2D(\a target, \a level, \a xoffset, \a yoffset, \a x, \a y, \a width, \a height).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glCopyTexSubImage2D.xml}{glCopyTexSubImage2D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCopyTexSubImage2D.xhtml}{glCopyTexSubImage2D()}.
\since 5.3
*/
@@ -686,7 +686,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glCullFace(\a mode).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glCullFace.xml}{glCullFace()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCullFace.xhtml}{glCullFace()}.
\since 5.3
*/
@@ -697,7 +697,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDeleteTextures(\a n, \a textures).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDeleteTextures.xml}{glDeleteTextures()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteTextures.xhtml}{glDeleteTextures()}.
\since 5.3
*/
@@ -708,7 +708,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDepthFunc(\a func).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDepthFunc.xml}{glDepthFunc()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDepthFunc.xhtml}{glDepthFunc()}.
\since 5.3
*/
@@ -719,7 +719,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDepthMask(\a flag).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDepthMask.xml}{glDepthMask()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDepthMask.xhtml}{glDepthMask()}.
\since 5.3
*/
@@ -730,7 +730,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDisable(\a cap).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDisable.xml}{glDisable()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDisable.xhtml}{glDisable()}.
\since 5.3
*/
@@ -741,7 +741,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDrawArrays(\a mode, \a first, \a count).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDrawArrays.xml}{glDrawArrays()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawArrays.xhtml}{glDrawArrays()}.
\since 5.3
*/
@@ -752,7 +752,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDrawElements(\a mode, \a count, \a type, \a indices).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDrawElements.xml}{glDrawElements()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawElements.xhtml}{glDrawElements()}.
\since 5.3
*/
@@ -763,7 +763,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glEnable(\a cap).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glEnable.xml}{glEnable()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glEnable.xhtml}{glEnable()}.
\since 5.3
*/
@@ -774,7 +774,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glFinish().
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glFinish.xml}{glFinish()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glFinish.xhtml}{glFinish()}.
\since 5.3
*/
@@ -785,7 +785,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glFlush().
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glFlush.xml}{glFlush()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glFlush.xhtml}{glFlush()}.
\since 5.3
*/
@@ -796,7 +796,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glFrontFace(\a mode).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glFrontFace.xml}{glFrontFace()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glFrontFace.xhtml}{glFrontFace()}.
\since 5.3
*/
@@ -807,7 +807,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGenTextures(\a n, \a textures).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGenTextures.xml}{glGenTextures()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGenTextures.xhtml}{glGenTextures()}.
\since 5.3
*/
@@ -818,7 +818,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetBooleanv(\a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetBooleanv.xml}{glGetBooleanv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGet.xhtml}{glGetBooleanv()}.
\since 5.3
*/
@@ -829,7 +829,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetError().
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetError.xml}{glGetError()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetError.xhtml}{glGetError()}.
\since 5.3
*/
@@ -840,7 +840,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetFloatv(\a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetFloatv.xml}{glGetFloatv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGet.xhtml}{glGetFloatv()}.
\since 5.3
*/
@@ -851,7 +851,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetIntegerv(\a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetIntegerv.xml}{glGetIntegerv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGet.xhtml}{glGetIntegerv()}.
\since 5.3
*/
@@ -862,7 +862,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetString(\a name).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetString.xml}{glGetString()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetString.xhtml}{glGetString()}.
\since 5.3
*/
@@ -873,7 +873,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetTexParameterfv(\a target, \a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetTexParameterfv.xml}{glGetTexParameterfv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetTexParameter.xhtml}{glGetTexParameterfv()}.
\since 5.3
*/
@@ -884,7 +884,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetTexParameteriv(\a target, \a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetTexParameteriv.xml}{glGetTexParameteriv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetTexParameter.xhtml}{glGetTexParameteriv()}.
\since 5.3
*/
@@ -895,7 +895,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glHint(\a target, \a mode).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glHint.xml}{glHint()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glHint.xhtml}{glHint()}.
\since 5.3
*/
@@ -906,7 +906,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glIsEnabled(\a cap).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glIsEnabled.xml}{glIsEnabled()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsEnabled.xhtml}{glIsEnabled()}.
\since 5.3
*/
@@ -917,7 +917,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glIsTexture(\a texture).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glIsTexture.xml}{glIsTexture()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsTexture.xhtml}{glIsTexture()}.
\since 5.3
*/
@@ -928,7 +928,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glLineWidth(\a width).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glLineWidth.xml}{glLineWidth()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glLineWidth.xhtml}{glLineWidth()}.
\since 5.3
*/
@@ -939,7 +939,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glPixelStorei(\a pname, \a param).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glPixelStorei.xml}{glPixelStorei()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glPixelStorei.xhtml}{glPixelStorei()}.
\since 5.3
*/
@@ -950,7 +950,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glPolygonOffset(\a factor, \a units).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glPolygonOffset.xml}{glPolygonOffset()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glPolygonOffset.xhtml}{glPolygonOffset()}.
\since 5.3
*/
@@ -961,7 +961,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glReadPixels(\a x, \a y, \a width, \a height, \a format, \a type, \a pixels).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glReadPixels.xml}{glReadPixels()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glReadPixels.xhtml}{glReadPixels()}.
\since 5.3
*/
@@ -972,7 +972,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glScissor(\a x, \a y, \a width, \a height).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glScissor.xml}{glScissor()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glScissor.xhtml}{glScissor()}.
\since 5.3
*/
@@ -983,7 +983,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glStencilFunc(\a func, \a ref, \a mask).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glStencilFunc.xml}{glStencilFunc()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glStencilFunc.xhtml}{glStencilFunc()}.
\since 5.3
*/
@@ -994,7 +994,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glStencilMask(\a mask).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glStencilMask.xml}{glStencilMask()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glStencilMask.xhtml}{glStencilMask()}.
\since 5.3
*/
@@ -1005,7 +1005,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glStencilOp(\a fail, \a zfail, \a zpass).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glStencilOp.xml}{glStencilOp()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glStencilOp.xhtml}{glStencilOp()}.
\since 5.3
*/
@@ -1016,7 +1016,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glTexImage2D(\a target, \a level, \a internalformat, \a width, \a height, \a border, \a format, \a type, \a pixels).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glTexImage2D.xml}{glTexImage2D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexImage2D.xhtml}{glTexImage2D()}.
\since 5.3
*/
@@ -1027,7 +1027,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glTexParameterf(\a target, \a pname, \a param).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glTexParameterf.xml}{glTexParameterf()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexParameter.xhtml}{glTexParameterf()}.
\since 5.3
*/
@@ -1038,7 +1038,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glTexParameterfv(\a target, \a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glTexParameterfv.xml}{glTexParameterfv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexParameter.xhtml}{glTexParameterfv()}.
\since 5.3
*/
@@ -1049,7 +1049,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glTexParameteri(\a target, \a pname, \a param).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glTexParameteri.xml}{glTexParameteri()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexParameter.xhtml}{glTexParameteri()}.
\since 5.3
*/
@@ -1060,7 +1060,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glTexParameteriv(\a target, \a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glTexParameteriv.xml}{glTexParameteriv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexParameter.xhtml}{glTexParameteriv()}.
\since 5.3
*/
@@ -1071,7 +1071,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glTexSubImage2D(\a target, \a level, \a xoffset, \a yoffset, \a width, \a height, \a format, \a type, \a pixels).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glTexSubImage2D.xml}{glTexSubImage2D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexSubImage2D.xhtml}{glTexSubImage2D()}.
\since 5.3
*/
@@ -1082,7 +1082,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glViewport(\a x, \a y, \a width, \a height).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glViewport.xml}{glViewport()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glViewport.xhtml}{glViewport()}.
\since 5.3
*/
@@ -1093,7 +1093,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glActiveTexture(\a texture).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glActiveTexture.xml}{glActiveTexture()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glActiveTexture.xhtml}{glActiveTexture()}.
*/
/*!
@@ -1102,7 +1102,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glAttachShader(\a program, \a shader).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glAttachShader.xml}{glAttachShader()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glAttachShader.xhtml}{glAttachShader()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1113,7 +1113,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glBindAttribLocation(\a program, \a index, \a name).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBindAttribLocation.xml}{glBindAttribLocation()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindAttribLocation.xhtml}{glBindAttribLocation()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1124,7 +1124,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glBindBuffer(\a target, \a buffer).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBindBuffer.xml}{glBindBuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindBuffer.xhtml}{glBindBuffer()}.
*/
/*!
@@ -1136,7 +1136,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
bound QOpenGLContext's defaultFramebufferObject().
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBindFramebuffer.xml}{glBindFramebuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindFramebuffer.xhtml}{glBindFramebuffer()}.
*/
/*!
@@ -1145,7 +1145,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glBindRenderbuffer(\a target, \a renderbuffer).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBindRenderbuffer.xml}{glBindRenderbuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindRenderbuffer.xhtml}{glBindRenderbuffer()}.
*/
/*!
@@ -1154,7 +1154,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glBlendColor(\a red, \a green, \a blue, \a alpha).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBlendColor.xml}{glBlendColor()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBlendColor.xhtml}{glBlendColor()}.
*/
/*!
@@ -1163,7 +1163,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glBlendEquation(\a mode).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBlendEquation.xml}{glBlendEquation()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBlendEquation.xhtml}{glBlendEquation()}.
*/
/*!
@@ -1172,7 +1172,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glBlendEquationSeparate(\a modeRGB, \a modeAlpha).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBlendEquationSeparate.xml}{glBlendEquationSeparate()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBlendEquationSeparate.xhtml}{glBlendEquationSeparate()}.
*/
/*!
@@ -1181,7 +1181,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glBlendFuncSeparate(\a srcRGB, \a dstRGB, \a srcAlpha, \a dstAlpha).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBlendFuncSeparate.xml}{glBlendFuncSeparate()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBlendFuncSeparate.xhtml}{glBlendFuncSeparate()}.
*/
/*!
@@ -1190,7 +1190,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glBufferData(\a target, \a size, \a data, \a usage).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBufferData.xml}{glBufferData()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBufferData.xhtml}{glBufferData()}.
*/
/*!
@@ -1199,7 +1199,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glBufferSubData(\a target, \a offset, \a size, \a data).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glBufferSubData.xml}{glBufferSubData()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBufferSubData.xhtml}{glBufferSubData()}.
*/
/*!
@@ -1208,7 +1208,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glCheckFramebufferStatus(\a target).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glCheckFramebufferStatus.xml}{glCheckFramebufferStatus()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCheckFramebufferStatus.xhtml}{glCheckFramebufferStatus()}.
*/
/*!
@@ -1219,7 +1219,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
embedded OpenGL ES systems.
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glClearDepthf.xml}{glClearDepthf()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glClearDepthf.xhtml}{glClearDepthf()}.
*/
/*!
@@ -1228,7 +1228,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glCompileShader(\a shader).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glCompileShader.xml}{glCompileShader()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCompileShader.xhtml}{glCompileShader()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1239,7 +1239,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glCompressedTexImage2D(\a target, \a level, \a internalformat, \a width, \a height, \a border, \a imageSize, \a data).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glCompressedTexImage2D.xml}{glCompressedTexImage2D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCompressedTexImage2D.xhtml}{glCompressedTexImage2D()}.
*/
/*!
@@ -1248,7 +1248,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glCompressedTexSubImage2D(\a target, \a level, \a xoffset, \a yoffset, \a width, \a height, \a format, \a imageSize, \a data).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glCompressedTexSubImage2D.xml}{glCompressedTexSubImage2D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCompressedTexSubImage2D.xhtml}{glCompressedTexSubImage2D()}.
*/
/*!
@@ -1257,7 +1257,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glCreateProgram().
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glCreateProgram.xml}{glCreateProgram()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCreateProgram.xhtml}{glCreateProgram()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1268,7 +1268,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glCreateShader(\a type).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glCreateShader.xml}{glCreateShader()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCreateShader.xhtml}{glCreateShader()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1279,7 +1279,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDeleteBuffers(\a n, \a buffers).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDeleteBuffers.xml}{glDeleteBuffers()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteBuffers.xhtml}{glDeleteBuffers()}.
*/
/*!
@@ -1288,7 +1288,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDeleteFramebuffers(\a n, \a framebuffers).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDeleteFramebuffers.xml}{glDeleteFramebuffers()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteFramebuffers.xhtml}{glDeleteFramebuffers()}.
*/
/*!
@@ -1297,7 +1297,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDeleteProgram(\a program).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDeleteProgram.xml}{glDeleteProgram()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteProgram.xhtml}{glDeleteProgram()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1308,7 +1308,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDeleteRenderbuffers(\a n, \a renderbuffers).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDeleteRenderbuffers.xml}{glDeleteRenderbuffers()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteRenderbuffers.xhtml}{glDeleteRenderbuffers()}.
*/
/*!
@@ -1317,7 +1317,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDeleteShader(\a shader).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDeleteShader.xml}{glDeleteShader()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteShader.xhtml}{glDeleteShader()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1330,7 +1330,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
embedded OpenGL ES systems.
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDepthRangef.xml}{glDepthRangef()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDepthRangef.xhtml}{glDepthRangef()}.
*/
/*!
@@ -1339,7 +1339,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDetachShader(\a program, \a shader).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDetachShader.xml}{glDetachShader()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDetachShader.xhtml}{glDetachShader()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1350,7 +1350,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glDisableVertexAttribArray(\a index).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glDisableVertexAttribArray.xml}{glDisableVertexAttribArray()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es2.0/html/glDisableVertexAttribArray.xhtml}{glDisableVertexAttribArray()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1361,7 +1361,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glEnableVertexAttribArray(\a index).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glEnableVertexAttribArray.xml}{glEnableVertexAttribArray()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glEnableVertexAttribArray.xhtml}{glEnableVertexAttribArray()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1372,7 +1372,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glFramebufferRenderbuffer(\a target, \a attachment, \a renderbuffertarget, \a renderbuffer).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glFramebufferRenderbuffer.xml}{glFramebufferRenderbuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glFramebufferRenderbuffer.xhtml}{glFramebufferRenderbuffer()}.
*/
/*!
@@ -1381,7 +1381,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glFramebufferTexture2D(\a target, \a attachment, \a textarget, \a texture, \a level).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glFramebufferTexture2D.xml}{glFramebufferTexture2D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glFramebufferTexture2D.xhtml}{glFramebufferTexture2D()}.
*/
/*!
@@ -1390,7 +1390,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGenBuffers(\a n, \a buffers).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGenBuffers.xml}{glGenBuffers()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGenBuffers.xhtml}{glGenBuffers()}.
*/
/*!
@@ -1399,7 +1399,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGenerateMipmap(\a target).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGenerateMipmap.xml}{glGenerateMipmap()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGenerateMipmap.xhtml}{glGenerateMipmap()}.
*/
/*!
@@ -1408,7 +1408,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGenFramebuffers(\a n, \a framebuffers).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGenFramebuffers.xml}{glGenFramebuffers()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGenFramebuffers.xhtml}{glGenFramebuffers()}.
*/
/*!
@@ -1417,7 +1417,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGenRenderbuffers(\a n, \a renderbuffers).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGenRenderbuffers.xml}{glGenRenderbuffers()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGenRenderbuffers.xhtml}{glGenRenderbuffers()}.
*/
/*!
@@ -1426,7 +1426,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetActiveAttrib(\a program, \a index, \a bufsize, \a length, \a size, \a type, \a name).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetActiveAttrib.xml}{glGetActiveAttrib()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetActiveAttrib.xhtml}{glGetActiveAttrib()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1437,7 +1437,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetActiveUniform(\a program, \a index, \a bufsize, \a length, \a size, \a type, \a name).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetActiveUniform.xml}{glGetActiveUniform()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetActiveUniform.xhtml}{glGetActiveUniform()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1448,7 +1448,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetAttachedShaders(\a program, \a maxcount, \a count, \a shaders).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetAttachedShaders.xml}{glGetAttachedShaders()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetAttachedShaders.xhtml}{glGetAttachedShaders()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1459,7 +1459,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetAttribLocation(\a program, \a name).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetAttribLocation.xml}{glGetAttribLocation()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetAttribLocation.xhtml}{glGetAttribLocation()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1470,7 +1470,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetBufferParameteriv(\a target, \a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetBufferParameteriv.xml}{glGetBufferParameteriv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetBufferParameteriv.xhtml}{glGetBufferParameteriv()}.
*/
/*!
@@ -1479,7 +1479,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetFramebufferAttachmentParameteriv(\a target, \a attachment, \a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetFramebufferAttachmentParameteriv.xml}{glGetFramebufferAttachmentParameteriv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetFramebufferAttachmentParameteriv.xhtml}{glGetFramebufferAttachmentParameteriv()}.
*/
/*!
@@ -1488,7 +1488,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetProgramiv(\a program, \a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetProgramiv.xml}{glGetProgramiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetProgramiv.xhtml}{glGetProgramiv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1499,7 +1499,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetProgramInfoLog(\a program, \a bufsize, \a length, \a infolog).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetProgramInfoLog.xml}{glGetProgramInfoLog()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetProgramInfoLog.xhtml}{glGetProgramInfoLog()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1510,7 +1510,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetRenderbufferParameteriv(\a target, \a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetRenderbufferParameteriv.xml}{glGetRenderbufferParameteriv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetRenderbufferParameteriv.xhtml}{glGetRenderbufferParameteriv()}.
*/
/*!
@@ -1519,7 +1519,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetShaderiv(\a shader, \a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetShaderiv.xml}{glGetShaderiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetShaderiv.xhtml}{glGetShaderiv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1530,7 +1530,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetShaderInfoLog(\a shader, \a bufsize, \a length, \a infolog).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetShaderInfoLog.xml}{glGetShaderInfoLog()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetShaderInfoLog.xhtml}{glGetShaderInfoLog()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1541,7 +1541,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetShaderPrecisionFormat(\a shadertype, \a precisiontype, \a range, \a precision).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetShaderPrecisionFormat.xml}{glGetShaderPrecisionFormat()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetShaderPrecisionFormat.xhtml}{glGetShaderPrecisionFormat()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1552,7 +1552,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetShaderSource(\a shader, \a bufsize, \a length, \a source).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetShaderSource.xml}{glGetShaderSource()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetShaderSource.xhtml}{glGetShaderSource()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1563,7 +1563,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetUniformfv(\a program, \a location, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetUniformfv.xml}{glGetUniformfv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetUniform.xhtml}{glGetUniformfv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1574,7 +1574,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetUniformiv(\a program, \a location, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetUniformiv.xml}{glGetUniformiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetUniform.xhtml}{glGetUniformiv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1585,7 +1585,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetUniformLocation(\a program, \a name).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetUniformLocation.xml}{glGetUniformLocation()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetUniformLocation.xhtml}{glGetUniformLocation()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1596,7 +1596,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetVertexAttribfv(\a index, \a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetVertexAttribfv.xml}{glGetVertexAttribfv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetVertexAttribfv.xhtml}{glGetVertexAttribfv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1607,7 +1607,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetVertexAttribiv(\a index, \a pname, \a params).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetVertexAttribiv.xml}{glGetVertexAttribiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetVertexAttribiv.xhtml}{glGetVertexAttribiv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1618,7 +1618,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glGetVertexAttribPointerv(\a index, \a pname, \a pointer).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glGetVertexAttribPointerv.xml}{glGetVertexAttribPointerv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetVertexAttribPointerv.xhtml}{glGetVertexAttribPointerv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1629,7 +1629,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glIsBuffer(\a buffer).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glIsBuffer.xml}{glIsBuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsBuffer.xhtml}{glIsBuffer()}.
*/
/*!
@@ -1638,7 +1638,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glIsFramebuffer(\a framebuffer).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glIsFramebuffer.xml}{glIsFramebuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsFramebuffer.xhtml}{glIsFramebuffer()}.
*/
/*!
@@ -1647,7 +1647,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glIsProgram(\a program).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glIsProgram.xml}{glIsProgram()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsProgram.xhtml}{glIsProgram()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1658,7 +1658,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glIsRenderbuffer(\a renderbuffer).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glIsRenderbuffer.xml}{glIsRenderbuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsRenderbuffer.xhtml}{glIsRenderbuffer()}.
*/
/*!
@@ -1667,7 +1667,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glIsShader(\a shader).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glIsShader.xml}{glIsShader()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsShader.xhtml}{glIsShader()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1678,7 +1678,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glLinkProgram(\a program).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glLinkProgram.xml}{glLinkProgram()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glLinkProgram.xhtml}{glLinkProgram()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1689,7 +1689,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glReleaseShaderCompiler().
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glReleaseShaderCompiler.xml}{glReleaseShaderCompiler()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glReleaseShaderCompiler.xhtml}{glReleaseShaderCompiler()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1700,7 +1700,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glRenderbufferStorage(\a target, \a internalformat, \a width, \a height).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glRenderbufferStorage.xml}{glRenderbufferStorage()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glRenderbufferStorage.xhtml}{glRenderbufferStorage()}.
*/
/*!
@@ -1709,7 +1709,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glSampleCoverage(\a value, \a invert).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glSampleCoverage.xml}{glSampleCoverage()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glSampleCoverage.xhtml}{glSampleCoverage()}.
*/
/*!
@@ -1718,7 +1718,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glShaderBinary(\a n, \a shaders, \a binaryformat, \a binary, \a length).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glShaderBinary.xml}{glShaderBinary()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glShaderBinary.xhtml}{glShaderBinary()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1729,7 +1729,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glShaderSource(\a shader, \a count, \a string, \a length).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glShaderSource.xml}{glShaderSource()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glShaderSource.xhtml}{glShaderSource()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1740,7 +1740,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glStencilFuncSeparate(\a face, \a func, \a ref, \a mask).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glStencilFuncSeparate.xml}{glStencilFuncSeparate()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glStencilFuncSeparate.xhtml}{glStencilFuncSeparate()}.
*/
/*!
@@ -1749,7 +1749,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glStencilMaskSeparate(\a face, \a mask).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glStencilMaskSeparate.xml}{glStencilMaskSeparate()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glStencilMaskSeparate.xhtml}{glStencilMaskSeparate()}.
*/
/*!
@@ -1758,7 +1758,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glStencilOpSeparate(\a face, \a fail, \a zfail, \a zpass).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glStencilOpSeparate.xml}{glStencilOpSeparate()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glStencilOpSeparate.xhtml}{glStencilOpSeparate()}.
*/
/*!
@@ -1767,7 +1767,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform1f(\a location, \a x).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform1f.xml}{glUniform1f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform1f()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1778,7 +1778,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform1fv(\a location, \a count, \a v).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform1fv.xml}{glUniform1fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform1fv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1789,7 +1789,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform1i(\a location, \a x).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform1i.xml}{glUniform1i()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform1i()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1800,7 +1800,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform1iv(\a location, \a count, \a v).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform1iv.xml}{glUniform1iv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform1iv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1811,7 +1811,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform2f(\a location, \a x, \a y).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform2f.xml}{glUniform2f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform2f()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1822,7 +1822,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform2fv(\a location, \a count, \a v).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform2fv.xml}{glUniform2fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform2fv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1833,7 +1833,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform2i(\a location, \a x, \a y).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform2i.xml}{glUniform2i()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform2i()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1844,7 +1844,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform2iv(\a location, \a count, \a v).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform2iv.xml}{glUniform2iv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform2iv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1855,7 +1855,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform3f(\a location, \a x, \a y, \a z).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform3f.xml}{glUniform3f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform3f()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1866,7 +1866,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform3fv(\a location, \a count, \a v).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform3fv.xml}{glUniform3fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform3fv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1877,7 +1877,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform3i(\a location, \a x, \a y, \a z).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform3i.xml}{glUniform3i()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform3i()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1888,7 +1888,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform3iv(\a location, \a count, \a v).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform3iv.xml}{glUniform3iv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform3iv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1899,7 +1899,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform4f(\a location, \a x, \a y, \a z, \a w).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform4f.xml}{glUniform4f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform4f()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1910,7 +1910,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform4fv(\a location, \a count, \a v).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform4fv.xml}{glUniform4fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform4fv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1921,7 +1921,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform4i(\a location, \a x, \a y, \a z, \a w).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform4i.xml}{glUniform4i()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform4i()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1932,7 +1932,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniform4iv(\a location, \a count, \a v).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniform4iv.xml}{glUniform4iv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform4iv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1943,7 +1943,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniformMatrix2fv(\a location, \a count, \a transpose, \a value).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniformMatrix2fv.xml}{glUniformMatrix2fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniformMatrix2fv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1954,7 +1954,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniformMatrix3fv(\a location, \a count, \a transpose, \a value).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniformMatrix3fv.xml}{glUniformMatrix3fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniformMatrix3fv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1965,7 +1965,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUniformMatrix4fv(\a location, \a count, \a transpose, \a value).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUniformMatrix4fv.xml}{glUniformMatrix4fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniformMatrix4fv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1976,7 +1976,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glUseProgram(\a program).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glUseProgram.xml}{glUseProgram()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUseProgram.xhtml}{glUseProgram()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1987,7 +1987,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glValidateProgram(\a program).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glValidateProgram.xml}{glValidateProgram()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glValidateProgram.xhtml}{glValidateProgram()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -1998,7 +1998,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glVertexAttrib1f(\a indx, \a x).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glVertexAttrib1f.xml}{glVertexAttrib1f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttrib1f()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -2009,7 +2009,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glVertexAttrib1fv(\a indx, \a values).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glVertexAttrib1fv.xml}{glVertexAttrib1fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttrib1fv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -2020,7 +2020,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glVertexAttrib2f(\a indx, \a x, \a y).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glVertexAttrib2f.xml}{glVertexAttrib2f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttrib2f()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -2031,7 +2031,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glVertexAttrib2fv(\a indx, \a values).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glVertexAttrib2fv.xml}{glVertexAttrib2fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttrib2fv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -2042,7 +2042,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glVertexAttrib3f(\a indx, \a x, \a y, \a z).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glVertexAttrib3f.xml}{glVertexAttrib3f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttrib3f()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -2053,7 +2053,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glVertexAttrib3fv(\a indx, \a values).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glVertexAttrib3fv.xml}{glVertexAttrib3fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttrib3fv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -2064,7 +2064,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glVertexAttrib4f(\a indx, \a x, \a y, \a z, \a w).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glVertexAttrib4f.xml}{glVertexAttrib4f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttrib4f()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -2075,7 +2075,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glVertexAttrib4fv(\a indx, \a values).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glVertexAttrib4fv.xml}{glVertexAttrib4fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttrib4fv()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -2086,7 +2086,7 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
Convenience function that calls glVertexAttribPointer(\a indx, \a size, \a type, \a normalized, \a stride, \a ptr).
For more information, see the OpenGL ES 2.0 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man/glVertexAttribPointer.xml}{glVertexAttribPointer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttribPointer.xhtml}{glVertexAttribPointer()}.
This convenience function will do nothing on OpenGL ES 1.x systems.
*/
@@ -2242,7 +2242,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glBeginQuery.xml}{glBeginQuery()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBeginQuery.xhtml}{glBeginQuery()}.
*/
/*!
@@ -2255,7 +2255,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glBeginTransformFeedback.xml}{glBeginTransformFeedback()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBeginTransformFeedback.xhtml}{glBeginTransformFeedback()}.
*/
/*!
@@ -2268,7 +2268,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glBindBufferBase.xml}{glBindBufferBase()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindBufferBase.xhtml}{glBindBufferBase()}.
*/
/*!
@@ -2281,7 +2281,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glBindBufferRange.xml}{glBindBufferRange()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindBufferRange.xhtml}{glBindBufferRange()}.
*/
/*!
@@ -2294,7 +2294,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glBindSampler.xml}{glBindSampler()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindSampler.xhtml}{glBindSampler()}.
*/
/*!
@@ -2307,7 +2307,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glBindTransformFeedback.xml}{glBindTransformFeedback()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindTransformFeedback.xhtml}{glBindTransformFeedback()}.
*/
/*!
@@ -2320,7 +2320,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glBindVertexArray.xml}{glBindVertexArray()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindVertexArray.xhtml}{glBindVertexArray()}.
*/
/*!
@@ -2333,7 +2333,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glBlitFramebuffer.xml}{glBlitFramebuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBlitFramebuffer.xhtml}{glBlitFramebuffer()}.
*/
/*!
@@ -2346,7 +2346,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glClearBufferfi.xml}{glClearBufferfi()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glClearBuffer.xhtml}{glClearBufferfi()}.
*/
/*!
@@ -2359,7 +2359,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glClearBufferfv.xml}{glClearBufferfv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glClearBuffer.xhtml}{glClearBufferfv()}.
*/
/*!
@@ -2372,7 +2372,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glClearBufferiv.xml}{glClearBufferiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glClearBuffer.xhtml}{glClearBufferiv()}.
*/
/*!
@@ -2385,7 +2385,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glClearBufferuiv.xml}{glClearBufferuiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glClearBuffer.xhtml}{glClearBufferuiv()}.
*/
/*!
@@ -2398,7 +2398,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glClientWaitSync.xml}{glClientWaitSync()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glClientWaitSync.xhtml}{glClientWaitSync()}.
*/
/*!
@@ -2411,7 +2411,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glCompressedTexImage3D.xml}{glCompressedTexImage3D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCompressedTexImage3D.xhtml}{glCompressedTexImage3D()}.
*/
/*!
@@ -2424,7 +2424,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glCompressedTexSubImage3D.xml}{glCompressedTexSubImage3D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCompressedTexSubImage3D.xhtml}{glCompressedTexSubImage3D()}.
*/
/*!
@@ -2437,7 +2437,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glCopyBufferSubData.xml}{glCopyBufferSubData()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCopyBufferSubData.xhtml}{glCopyBufferSubData()}.
*/
/*!
@@ -2450,7 +2450,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glCopyTexSubImage3D.xml}{glCopyTexSubImage3D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCopyTexSubImage3D.xhtml}{glCopyTexSubImage3D()}.
*/
/*!
@@ -2463,7 +2463,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDeleteQueries.xml}{glDeleteQueries()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteQueries.xhtml}{glDeleteQueries()}.
*/
/*!
@@ -2476,7 +2476,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDeleteSamplers.xml}{glDeleteSamplers()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteSamplers.xhtml}{glDeleteSamplers()}.
*/
/*!
@@ -2489,7 +2489,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDeleteSync.xml}{glDeleteSync()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteSync.xhtml}{glDeleteSync()}.
*/
/*!
@@ -2502,7 +2502,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDeleteTransformFeedbacks.xml}{glDeleteTransformFeedbacks()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteTransformFeedbacks.xhtml}{glDeleteTransformFeedbacks()}.
*/
/*!
@@ -2515,7 +2515,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDeleteVertexArrays.xml}{glDeleteVertexArrays()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteVertexArrays.xhtml}{glDeleteVertexArrays()}.
*/
/*!
@@ -2528,7 +2528,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDrawArraysInstanced.xml}{glDrawArraysInstanced()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawArraysInstanced.xhtml}{glDrawArraysInstanced()}.
*/
/*!
@@ -2541,7 +2541,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDrawBuffers.xml}{glDrawBuffers()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawBuffers.xhtml}{glDrawBuffers()}.
*/
/*!
@@ -2554,7 +2554,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDrawElementsInstanced.xml}{glDrawElementsInstanced()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawElementsInstanced.xhtml}{glDrawElementsInstanced()}.
*/
/*!
@@ -2567,7 +2567,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDrawRangeElements.xml}{glDrawRangeElements()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawRangeElements.xhtml}{glDrawRangeElements()}.
*/
/*!
@@ -2580,7 +2580,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glEndQuery.xml}{glEndQuery()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glEndQuery.xhtml}{glEndQuery()}.
*/
/*!
@@ -2593,7 +2593,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glEndTransformFeedback.xml}{glEndTransformFeedback()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glEndTransformFeedback.xhtml}{glEndTransformFeedback()}.
*/
/*!
@@ -2606,7 +2606,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glFenceSync.xml}{glFenceSync()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glFenceSync.xhtml}{glFenceSync()}.
*/
/*!
@@ -2619,7 +2619,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glFlushMappedBufferRange.xml}{glFlushMappedBufferRange()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glFlushMappedBufferRange.xhtml}{glFlushMappedBufferRange()}.
*/
/*!
@@ -2632,7 +2632,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glFramebufferTextureLayer.xml}{glFramebufferTextureLayer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glFramebufferTextureLayer.xhtml}{glFramebufferTextureLayer()}.
*/
/*!
@@ -2645,7 +2645,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGenQueries.xml}{glGenQueries()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGenQueries.xhtml}{glGenQueries()}.
*/
/*!
@@ -2658,7 +2658,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGenSamplers.xml}{glGenSamplers()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGenSamplers.xhtml}{glGenSamplers()}.
*/
/*!
@@ -2671,7 +2671,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGenTransformFeedbacks.xml}{glGenTransformFeedbacks()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGenTransformFeedbacks.xhtml}{glGenTransformFeedbacks()}.
*/
/*!
@@ -2684,7 +2684,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGenVertexArrays.xml}{glGenVertexArrays()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGenVertexArrays.xhtml}{glGenVertexArrays()}.
*/
/*!
@@ -2697,7 +2697,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetActiveUniformBlockName.xml}{glGetActiveUniformBlockName()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetActiveUniformBlockName.xhtml}{glGetActiveUniformBlockName()}.
*/
/*!
@@ -2710,7 +2710,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetActiveUniformBlockiv.xml}{glGetActiveUniformBlockiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetActiveUniformBlockiv.xhtml}{glGetActiveUniformBlockiv()}.
*/
/*!
@@ -2723,7 +2723,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetActiveUniformsiv.xml}{glGetActiveUniformsiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetActiveUniformsiv.xhtml}{glGetActiveUniformsiv()}.
*/
/*!
@@ -2736,7 +2736,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetBufferParameteri64v.xml}{glGetBufferParameteri64v()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetBufferParameter.xhtml}{glGetBufferParameteri64v()}.
*/
/*!
@@ -2749,7 +2749,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetBufferPointerv.xml}{glGetBufferPointerv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetBufferPointerv.xhtml}{glGetBufferPointerv()}.
*/
/*!
@@ -2762,7 +2762,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetFragDataLocation.xml}{glGetFragDataLocation()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetFragDataLocation.xhtml}{glGetFragDataLocation()}.
*/
/*!
@@ -2775,7 +2775,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetInteger64i_v.xml}{glGetInteger64i_v()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGet.xhtml}{glGetInteger64i_v()}.
*/
/*!
@@ -2788,7 +2788,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetInteger64v.xml}{glGetInteger64v()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGet.xhtml}{glGetInteger64v()}.
*/
/*!
@@ -2801,7 +2801,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetIntegeri_v.xml}{glGetIntegeri_v()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGet.xhtml}{glGetIntegeri_v()}.
*/
/*!
@@ -2814,7 +2814,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetInternalformativ.xml}{glGetInternalformativ()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetInternalformativ.xhtml}{glGetInternalformativ()}.
*/
/*!
@@ -2827,7 +2827,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetProgramBinary.xml}{glGetProgramBinary()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetProgramBinary.xhtml}{glGetProgramBinary()}.
*/
/*!
@@ -2840,7 +2840,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetQueryObjectuiv.xml}{glGetQueryObjectuiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetQueryObjectuiv.xhtml}{glGetQueryObjectuiv()}.
*/
/*!
@@ -2853,7 +2853,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetQueryiv.xml}{glGetQueryiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetQueryiv.xhtml}{glGetQueryiv()}.
*/
/*!
@@ -2866,7 +2866,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetSamplerParameterfv.xml}{glGetSamplerParameterfv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetSamplerParameter.xhtml}{glGetSamplerParameterfv()}.
*/
/*!
@@ -2879,7 +2879,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetSamplerParameteriv.xml}{glGetSamplerParameteriv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetSamplerParameter.xhtml}{glGetSamplerParameteriv()}.
*/
/*!
@@ -2892,7 +2892,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetStringi.xml}{glGetStringi()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetString.xhtml}{glGetStringi()}.
*/
/*!
@@ -2905,7 +2905,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetSynciv.xml}{glGetSynciv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetSynciv.xhtml}{glGetSynciv()}.
*/
/*!
@@ -2918,7 +2918,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetTransformFeedbackVarying.xml}{glGetTransformFeedbackVarying()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetTransformFeedbackVarying.xhtml}{glGetTransformFeedbackVarying()}.
*/
/*!
@@ -2931,7 +2931,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetUniformBlockIndex.xml}{glGetUniformBlockIndex()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetUniformBlockIndex.xhtml}{glGetUniformBlockIndex()}.
*/
/*!
@@ -2944,7 +2944,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetUniformIndices.xml}{glGetUniformIndices()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetUniformIndices.xhtml}{glGetUniformIndices()}.
*/
/*!
@@ -2957,7 +2957,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetUniformuiv.xml}{glGetUniformuiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetUniform.xhtml}{glGetUniformuiv()}.
*/
/*!
@@ -2970,7 +2970,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetVertexAttribIiv.xml}{glGetVertexAttribIiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetVertexAttrib.xhtml}{glGetVertexAttribIiv()}.
*/
/*!
@@ -2983,7 +2983,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetVertexAttribIuiv.xml}{glGetVertexAttribIuiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetVertexAttrib.xhtml}{glGetVertexAttribIuiv()}.
*/
/*!
@@ -2996,7 +2996,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glInvalidateFramebuffer.xml}{glInvalidateFramebuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glInvalidateFramebuffer.xhtml}{glInvalidateFramebuffer()}.
*/
/*!
@@ -3009,7 +3009,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glInvalidateSubFramebuffer.xml}{glInvalidateSubFramebuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glInvalidateSubFramebuffer.xhtml}{glInvalidateSubFramebuffer()}.
*/
/*!
@@ -3022,7 +3022,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glIsQuery.xml}{glIsQuery()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsQuery.xhtml}{glIsQuery()}.
*/
/*!
@@ -3035,7 +3035,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glIsSampler.xml}{glIsSampler()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsSampler.xhtml}{glIsSampler()}.
*/
/*!
@@ -3048,7 +3048,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glIsSync.xml}{glIsSync()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsSync.xhtml}{glIsSync()}.
*/
/*!
@@ -3061,7 +3061,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glIsTransformFeedback.xml}{glIsTransformFeedback()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsTransformFeedback.xhtml}{glIsTransformFeedback()}.
*/
/*!
@@ -3074,7 +3074,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glIsVertexArray.xml}{glIsVertexArray()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsVertexArray.xhtml}{glIsVertexArray()}.
*/
/*!
@@ -3087,7 +3087,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glMapBufferRange.xml}{glMapBufferRange()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glMapBufferRange.xhtml}{glMapBufferRange()}.
*/
/*!
@@ -3100,7 +3100,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glPauseTransformFeedback.xml}{glPauseTransformFeedback()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glPauseTransformFeedback.xhtml}{glPauseTransformFeedback()}.
*/
/*!
@@ -3113,7 +3113,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramBinary.xml}{glProgramBinary()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramBinary.xhtml}{glProgramBinary()}.
*/
/*!
@@ -3126,7 +3126,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramParameteri.xml}{glProgramParameteri()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramParameteri.xhtml}{glProgramParameteri()}.
*/
/*!
@@ -3139,7 +3139,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glReadBuffer.xml}{glReadBuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glReadBuffer.xhtml}{glReadBuffer()}.
*/
/*!
@@ -3152,7 +3152,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glRenderbufferStorageMultisample.xml}{glRenderbufferStorageMultisample()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glRenderbufferStorageMultisample.xhtml}{glRenderbufferStorageMultisample()}.
*/
/*!
@@ -3165,7 +3165,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glResumeTransformFeedback.xml}{glResumeTransformFeedback()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glResumeTransformFeedback.xhtml}{glResumeTransformFeedback()}.
*/
/*!
@@ -3178,7 +3178,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glSamplerParameterf.xml}{glSamplerParameterf()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glSamplerParameter.xhtml}{glSamplerParameterf()}.
*/
/*!
@@ -3191,7 +3191,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glSamplerParameterfv.xml}{glSamplerParameterfv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glSamplerParameter.xhtml}{glSamplerParameterfv()}.
*/
/*!
@@ -3204,7 +3204,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glSamplerParameteri.xml}{glSamplerParameteri()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glSamplerParameter.xhtml}{glSamplerParameteri()}.
*/
/*!
@@ -3217,7 +3217,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glSamplerParameteriv.xml}{glSamplerParameteriv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glSamplerParameter.xhtml}{glSamplerParameteriv()}.
*/
/*!
@@ -3230,7 +3230,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glTexImage3D.xml}{glTexImage3D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexImage3D.xhtml}{glTexImage3D()}.
*/
/*!
@@ -3243,7 +3243,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glTexStorage2D.xml}{glTexStorage2D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexStorage2D.xhtml}{glTexStorage2D()}.
*/
/*!
@@ -3256,7 +3256,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glTexStorage3D.xml}{glTexStorage3D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexStorage3D.xhtml}{glTexStorage3D()}.
*/
/*!
@@ -3269,7 +3269,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glTexSubImage3D.xml}{glTexSubImage3D()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexSubImage3D.xhtml}{glTexSubImage3D()}.
*/
/*!
@@ -3282,7 +3282,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glTransformFeedbackVaryings.xml}{glTransformFeedbackVaryings()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTransformFeedbackVaryings.xhtml}{glTransformFeedbackVaryings()}.
*/
/*!
@@ -3295,7 +3295,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniform1ui.xml}{glUniform1ui()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform1ui()}.
*/
/*!
@@ -3308,7 +3308,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniform1uiv.xml}{glUniform1uiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform1uiv()}.
*/
/*!
@@ -3321,7 +3321,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniform2ui.xml}{glUniform2ui()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform2ui()}.
*/
/*!
@@ -3334,7 +3334,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniform2uiv.xml}{glUniform2uiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform2uiv()}.
*/
/*!
@@ -3347,7 +3347,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniform3ui.xml}{glUniform3ui()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform3ui()}.
*/
/*!
@@ -3360,7 +3360,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniform3uiv.xml}{glUniform3uiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform3uiv()}.
*/
/*!
@@ -3373,7 +3373,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniform4ui.xml}{glUniform4ui()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform4ui()}.
*/
/*!
@@ -3386,7 +3386,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniform4uiv.xml}{glUniform4uiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniform4uiv()}.
*/
/*!
@@ -3399,7 +3399,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniformBlockBinding.xml}{glUniformBlockBinding()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniformBlockBinding.xhtml}{glUniformBlockBinding()}.
*/
/*!
@@ -3412,7 +3412,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniformMatrix2x3fv.xml}{glUniformMatrix2x3fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniformMatrix2x3fv()}.
*/
/*!
@@ -3425,7 +3425,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniformMatrix2x4fv.xml}{glUniformMatrix2x4fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniformMatrix2x4fv()}.
*/
/*!
@@ -3438,7 +3438,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniformMatrix3x2fv.xml}{glUniformMatrix3x2fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniformMatrix3x2fv()}.
*/
/*!
@@ -3451,7 +3451,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniformMatrix3x4fv.xml}{glUniformMatrix3x4fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniformMatrix3x4fv()}.
*/
/*!
@@ -3464,7 +3464,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniformMatrix4x2fv.xml}{glUniformMatrix4x2fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniformMatrix4x2fv()}.
*/
/*!
@@ -3477,7 +3477,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUniformMatrix4x3fv.xml}{glUniformMatrix4x3fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUniform.xhtml}{glUniformMatrix4x3fv()}.
*/
/*!
@@ -3490,7 +3490,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUnmapBuffer.xml}{glUnmapBuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUnmapBuffer.xhtml}{glUnmapBuffer()}.
*/
/*!
@@ -3503,7 +3503,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glVertexAttribDivisor.xml}{glVertexAttribDivisor()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttribDivisor.xhtml}{glVertexAttribDivisor()}.
*/
/*!
@@ -3516,7 +3516,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glVertexAttribI4i.xml}{glVertexAttribI4i()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttribI4i()}.
*/
/*!
@@ -3529,7 +3529,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glVertexAttribI4iv.xml}{glVertexAttribI4iv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttribI4iv()}.
*/
/*!
@@ -3542,7 +3542,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glVertexAttribI4ui.xml}{glVertexAttribI4ui()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttribI4ui()}.
*/
/*!
@@ -3555,7 +3555,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glVertexAttribI4uiv.xml}{glVertexAttribI4uiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttrib.xhtml}{glVertexAttribI4uiv()}.
*/
/*!
@@ -3568,7 +3568,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glVertexAttribIPointer.xml}{glVertexAttribIPointer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glVertexAttribPointer.xhtml}{glVertexAttribIPointer()}.
*/
/*!
@@ -3581,7 +3581,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glWaitSync.xml}{glWaitSync()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glWaitSync.xhtml}{glWaitSync()}.
*/
/*!
@@ -3594,7 +3594,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glActiveShaderProgram.xml}{glActiveShaderProgram()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glActiveShaderProgram.xhtml}{glActiveShaderProgram()}.
*/
/*!
@@ -3607,7 +3607,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glBindImageTexture.xml}{glBindImageTexture()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindImageTexture.xhtml}{glBindImageTexture()}.
*/
/*!
@@ -3620,7 +3620,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glBindProgramPipeline.xml}{glBindProgramPipeline()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindProgramPipeline.xhtml}{glBindProgramPipeline()}.
*/
/*!
@@ -3633,7 +3633,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glBindVertexBuffer.xml}{glBindVertexBuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBindVertexBuffer.xhtml}{glBindVertexBuffer()}.
*/
/*!
@@ -3646,7 +3646,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glCreateShaderProgramv.xml}{glCreateShaderProgramv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCreateShaderProgramv.xhtml}{glCreateShaderProgramv()}.
*/
/*!
@@ -3659,7 +3659,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDeleteProgramPipelines.xml}{glDeleteProgramPipelines()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDeleteProgramPipelines.xhtml}{glDeleteProgramPipelines()}.
*/
/*!
@@ -3672,7 +3672,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDispatchCompute.xml}{glDispatchCompute()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDispatchCompute.xhtml}{glDispatchCompute()}.
*/
/*!
@@ -3685,7 +3685,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDispatchComputeIndirect.xml}{glDispatchComputeIndirect()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDispatchComputeIndirect.xhtml}{glDispatchComputeIndirect()}.
*/
/*!
@@ -3698,7 +3698,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDrawArraysIndirect.xml}{glDrawArraysIndirect()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawArraysIndirect.xhtml}{glDrawArraysIndirect()}.
*/
/*!
@@ -3711,7 +3711,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glDrawElementsIndirect.xml}{glDrawElementsIndirect()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawElementsIndirect.xhtml}{glDrawElementsIndirect()}.
*/
/*!
@@ -3724,7 +3724,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glFramebufferParameteri.xml}{glFramebufferParameteri()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glFramebufferParameteri.xhtml}{glFramebufferParameteri()}.
*/
/*!
@@ -3737,7 +3737,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGenProgramPipelines.xml}{glGenProgramPipelines()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGenProgramPipelines.xhtml}{glGenProgramPipelines()}.
*/
/*!
@@ -3750,7 +3750,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetBooleani_v.xml}{glGetBooleani_v()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGet.xhtml}{glGetBooleani_v()}.
*/
/*!
@@ -3763,7 +3763,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetFramebufferParameteriv.xml}{glGetFramebufferParameteriv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetFramebufferParameteriv.xhtml}{glGetFramebufferParameteriv()}.
*/
/*!
@@ -3776,7 +3776,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetMultisamplefv.xml}{glGetMultisamplefv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetMultisamplefv.xhtml}{glGetMultisamplefv()}.
*/
/*!
@@ -3789,7 +3789,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetProgramInterfaceiv.xml}{glGetProgramInterfaceiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetProgramInterface.xhtml}{glGetProgramInterfaceiv()}.
*/
/*!
@@ -3802,7 +3802,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetProgramPipelineInfoLog.xml}{glGetProgramPipelineInfoLog()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetProgramPipelineInfoLog.xhtml}{glGetProgramPipelineInfoLog()}.
*/
/*!
@@ -3815,7 +3815,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetProgramPipelineiv.xml}{glGetProgramPipelineiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetProgramPipeline.xhtml}{glGetProgramPipelineiv()}.
*/
/*!
@@ -3828,7 +3828,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetProgramResourceIndex.xml}{glGetProgramResourceIndex()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetProgramResourceIndex.xhtml}{glGetProgramResourceIndex()}.
*/
/*!
@@ -3841,7 +3841,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetProgramResourceLocation.xml}{glGetProgramResourceLocation()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetProgramResourceLocation.xhtml}{glGetProgramResourceLocation()}.
*/
/*!
@@ -3854,7 +3854,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetProgramResourceName.xml}{glGetProgramResourceName()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetProgramResourceName.xhtml}{glGetProgramResourceName()}.
*/
/*!
@@ -3867,7 +3867,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetProgramResourceiv.xml}{glGetProgramResourceiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetProgramResource.xhtml}{glGetProgramResourceiv()}.
*/
/*!
@@ -3880,7 +3880,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetTexLevelParameterfv.xml}{glGetTexLevelParameterfv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetTexLevelParameter.xhtml}{glGetTexLevelParameterfv()}.
*/
/*!
@@ -3893,7 +3893,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glGetTexLevelParameteriv.xml}{glGetTexLevelParameteriv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetTexLevelParameter.xhtml}{glGetTexLevelParameteriv()}.
*/
/*!
@@ -3906,7 +3906,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glIsProgramPipeline.xml}{glIsProgramPipeline()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsProgramPipeline.xhtml}{glIsProgramPipeline()}.
*/
/*!
@@ -3919,7 +3919,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glMemoryBarrier.xml}{glMemoryBarrier()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3.1/html/glMemoryBarrier.xhtml}{glMemoryBarrier()}.
*/
/*!
@@ -3932,7 +3932,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glMemoryBarrierByRegion.xml}{glMemoryBarrierByRegion()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3.1/html/glMemoryBarrier.xhtml}{glMemoryBarrierByRegion()}.
*/
/*!
@@ -3945,7 +3945,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform1f.xml}{glProgramUniform1f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform1f()}.
*/
/*!
@@ -3958,7 +3958,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform1fv.xml}{glProgramUniform1fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform1fv()}.
*/
/*!
@@ -3971,7 +3971,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform1i.xml}{glProgramUniform1i()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform1i()}.
*/
/*!
@@ -3984,7 +3984,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform1iv.xml}{glProgramUniform1iv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform1iv()}.
*/
/*!
@@ -3997,7 +3997,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform1ui.xml}{glProgramUniform1ui()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform1ui()}.
*/
/*!
@@ -4010,7 +4010,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform1uiv.xml}{glProgramUniform1uiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform1uiv()}.
*/
/*!
@@ -4023,7 +4023,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform2f.xml}{glProgramUniform2f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform2f()}.
*/
/*!
@@ -4036,7 +4036,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform2fv.xml}{glProgramUniform2fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform2fv()}.
*/
/*!
@@ -4049,7 +4049,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform2i.xml}{glProgramUniform2i()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform2i()}.
*/
/*!
@@ -4062,7 +4062,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform2iv.xml}{glProgramUniform2iv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform2iv()}.
*/
/*!
@@ -4075,7 +4075,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform2ui.xml}{glProgramUniform2ui()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform2ui()}.
*/
/*!
@@ -4088,7 +4088,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform2uiv.xml}{glProgramUniform2uiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform2uiv()}.
*/
/*!
@@ -4101,7 +4101,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform3f.xml}{glProgramUniform3f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform3f()}.
*/
/*!
@@ -4114,7 +4114,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform3fv.xml}{glProgramUniform3fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform3fv()}.
*/
/*!
@@ -4127,7 +4127,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform3i.xml}{glProgramUniform3i()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform3i()}.
*/
/*!
@@ -4140,7 +4140,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform3iv.xml}{glProgramUniform3iv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform3iv()}.
*/
/*!
@@ -4153,7 +4153,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform3ui.xml}{glProgramUniform3ui()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform3ui()}.
*/
/*!
@@ -4166,7 +4166,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform3uiv.xml}{glProgramUniform3uiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform3uiv()}.
*/
/*!
@@ -4179,7 +4179,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform4f.xml}{glProgramUniform4f()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform4f()}.
*/
/*!
@@ -4192,7 +4192,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform4fv.xml}{glProgramUniform4fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform4fv()}.
*/
/*!
@@ -4205,7 +4205,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform4i.xml}{glProgramUniform4i()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform4i()}.
*/
/*!
@@ -4218,7 +4218,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform4iv.xml}{glProgramUniform4iv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform4iv()}.
*/
/*!
@@ -4231,7 +4231,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform4ui.xml}{glProgramUniform4ui()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform4ui()}.
*/
/*!
@@ -4244,7 +4244,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniform4uiv.xml}{glProgramUniform4uiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniform4uiv()}.
*/
/*!
@@ -4257,7 +4257,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniformMatrix2fv.xml}{glProgramUniformMatrix2fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniformMatrix2fv()}.
*/
/*!
@@ -4270,7 +4270,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniformMatrix2x3fv.xml}{glProgramUniformMatrix2x3fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniformMatrix2x3fv()}.
*/
/*!
@@ -4283,7 +4283,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniformMatrix2x4fv.xml}{glProgramUniformMatrix2x4fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniformMatrix2x4fv()}.
*/
/*!
@@ -4296,7 +4296,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniformMatrix3fv.xml}{glProgramUniformMatrix3fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniformMatrix3fv()}.
*/
/*!
@@ -4309,7 +4309,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniformMatrix3x2fv.xml}{glProgramUniformMatrix3x2fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniformMatrix3x2fv()}.
*/
/*!
@@ -4322,7 +4322,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniformMatrix3x4fv.xml}{glProgramUniformMatrix3x4fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniformMatrix3x4fv()}.
*/
/*!
@@ -4335,7 +4335,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniformMatrix4fv.xml}{glProgramUniformMatrix4fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniformMatrix4fv()}.
*/
/*!
@@ -4348,7 +4348,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniformMatrix4x2fv.xml}{glProgramUniformMatrix4x2fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniformMatrix4x2fv()}.
*/
/*!
@@ -4361,7 +4361,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glProgramUniformMatrix4x3fv.xml}{glProgramUniformMatrix4x3fv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glProgramUniform.xhtml}{glProgramUniformMatrix4x3fv()}.
*/
/*!
@@ -4374,7 +4374,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glSampleMaski.xml}{glSampleMaski()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glSampleMaski.xhtml}{glSampleMaski()}.
*/
/*!
@@ -4387,7 +4387,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glTexStorage2DMultisample.xml}{glTexStorage2DMultisample()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexStorage2DMultisample.xhtml}{glTexStorage2DMultisample()}.
*/
/*!
@@ -4400,7 +4400,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glUseProgramStages.xml}{glUseProgramStages()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glUseProgramStages.xhtml}{glUseProgramStages()}.
*/
/*!
@@ -4413,7 +4413,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glValidateProgramPipeline.xml}{glValidateProgramPipeline()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glValidateProgramPipeline.xhtml}{glValidateProgramPipeline()}.
*/
/*!
@@ -4426,7 +4426,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glVertexAttribBinding.xml}{glVertexAttribBinding()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttribBinding.xhtml}{glVertexAttribBinding()}.
*/
/*!
@@ -4439,7 +4439,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glVertexAttribFormat.xml}{glVertexAttribFormat()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttribFormat.xhtml}{glVertexAttribFormat()}.
*/
/*!
@@ -4452,7 +4452,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glVertexAttribIFormat.xml}{glVertexAttribIFormat()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexAttribIFormat.xhtml}{glVertexAttribIFormat()}.
*/
/*!
@@ -4465,7 +4465,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.x documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man31/glVertexBindingDivisor.xml}{glVertexBindingDivisor()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glVertexBindingDivisor.xhtml}{glVertexBindingDivisor()}.
*/
/*!
@@ -4478,7 +4478,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendBarrier.xml}{glBlendBarrier()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBlendBarrier.xhtml}{glBlendBarrier()}.
*/
/*!
@@ -4491,7 +4491,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendEquationSeparatei.xml}{glBlendEquationSeparatei()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBlendEquationSeparate.xhtml}{glBlendEquationSeparatei()}.
*/
/*!
@@ -4504,7 +4504,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendEquationi.xml}{glBlendEquationi()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBlendEquationi.xhtml}{glBlendEquationi()}.
*/
/*!
@@ -4517,7 +4517,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendFuncSeparatei.xml}{glBlendFuncSeparatei()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBlendFuncSeparate.xhtml}{glBlendFuncSeparatei()}.
*/
/*!
@@ -4530,7 +4530,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendFunci.xml}{glBlendFunci()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glBlendFunci.xhtml}{glBlendFunci()}.
*/
/*!
@@ -4543,7 +4543,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glColorMaski.xml}{glColorMaski()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glColorMask.xhtml}{glColorMaski()}.
*/
/*!
@@ -4556,7 +4556,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glCopyImageSubData.xml}{glCopyImageSubData()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glCopyImageSubData.xhtml}{glCopyImageSubData()}.
*/
/*!
@@ -4569,7 +4569,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDebugMessageCallback.xml}{glDebugMessageCallback()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDebugMessageCallback.xhtml}{glDebugMessageCallback()}.
*/
/*!
@@ -4582,7 +4582,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDebugMessageControl.xml}{glDebugMessageContro()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDebugMessageControl.xhtml}{glDebugMessageContro()}.
*/
/*!
@@ -4595,7 +4595,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDebugMessageInsert.xml}{glDebugMessageInsert()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDebugMessageInsert.xhtml}{glDebugMessageInsert()}.
*/
/*!
@@ -4608,7 +4608,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDisablei.xml}{glDisablei()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glEnable.xhtml}{glDisablei()}.
*/
/*!
@@ -4621,7 +4621,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDrawElementsBaseVertex.xml}{glDrawElementsBaseVerte()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawElementsBaseVertex.xhtml}{glDrawElementsBaseVerte()}.
*/
/*!
@@ -4634,7 +4634,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDrawElementsInstancedBaseVertex.xml}{glDrawElementsInstancedBaseVerte()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawElementsInstancedBaseVertex.xhtml}{glDrawElementsInstancedBaseVerte()}.
*/
/*!
@@ -4647,7 +4647,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDrawRangeElementsBaseVertex.xml}{glDrawRangeElementsBaseVerte()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glDrawRangeElementsBaseVertex.xhtml}{glDrawRangeElementsBaseVerte()}.
*/
/*!
@@ -4660,7 +4660,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glEnablei.xml}{glEnablei()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glEnablei.xhtml}{glEnablei()}.
*/
/*!
@@ -4673,7 +4673,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glFramebufferTexture.xml}{glFramebufferTexture()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glFramebufferTexture.xhtml}{glFramebufferTexture()}.
*/
/*!
@@ -4686,7 +4686,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetDebugMessageLog.xml}{glGetDebugMessageLog()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetDebugMessageLog.xhtml}{glGetDebugMessageLog()}.
*/
/*!
@@ -4699,7 +4699,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetGraphicsResetStatus.xml}{glGetGraphicsResetStatus()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetGraphicsResetStatus.xhtml}{glGetGraphicsResetStatus()}.
*/
/*!
@@ -4712,7 +4712,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetObjectLabel.xml}{glGetObjectLabe()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetObjectLabel.xhtml}{glGetObjectLabe()}.
*/
/*!
@@ -4725,7 +4725,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetObjectPtrLabel.xml}{glGetObjectPtrLabe()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetObjectPtrLabel.xhtml}{glGetObjectPtrLabe()}.
*/
/*!
@@ -4738,7 +4738,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetPointerv.xml}{glGetPointerv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetPointerv.xhtml}{glGetPointerv()}.
*/
/*!
@@ -4751,7 +4751,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetSamplerParameterIiv.xml}{glGetSamplerParameterIiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetSamplerParameter.xhtml}{glGetSamplerParameterIiv()}.
*/
/*!
@@ -4764,7 +4764,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetSamplerParameterIuiv.xml}{glGetSamplerParameterIuiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetSamplerParameter.xhtml}{glGetSamplerParameterIuiv()}.
*/
/*!
@@ -4777,7 +4777,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetTexParameterIiv.xml}{glGetTexParameterIiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetTexParameter.xhtml}{glGetTexParameterIiv()}.
*/
/*!
@@ -4790,7 +4790,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetTexParameterIuiv.xml}{glGetTexParameterIuiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetTexParameter.xhtml}{glGetTexParameterIuiv()}.
*/
/*!
@@ -4803,7 +4803,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetnUniformfv.xml}{glGetnUniformfv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetUniform.xhtml}{glGetnUniformfv()}.
*/
/*!
@@ -4816,7 +4816,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetnUniformiv.xml}{glGetnUniformiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetUniform.xhtml}{glGetnUniformiv()}.
*/
/*!
@@ -4829,7 +4829,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetnUniformuiv.xml}{glGetnUniformuiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glGetUniform.xhtml}{glGetnUniformuiv()}.
*/
/*!
@@ -4842,7 +4842,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glIsEnabledi.xml}{glIsEnabledi()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glIsEnabled.xhtml}{glIsEnabledi()}.
*/
/*!
@@ -4855,7 +4855,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glMinSampleShading.xml}{glMinSampleShading()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glMinSampleShading.xhtml}{glMinSampleShading()}.
*/
/*!
@@ -4868,7 +4868,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glObjectLabel.xml}{glObjectLabe()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glObjectLabel.xhtml}{glObjectLabe()}.
*/
/*!
@@ -4881,7 +4881,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glObjectPtrLabel.xml}{glObjectPtrLabe()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glObjectPtrLabel.xhtml}{glObjectPtrLabe()}.
*/
/*!
@@ -4894,7 +4894,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glPatchParameteri.xml}{glPatchParameteri()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glPatchParameteri.xhtml}{glPatchParameteri()}.
*/
/*!
@@ -4907,7 +4907,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glPopDebugGroup.xml}{glPopDebugGroup()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glPopDebugGroup.xhtml}{glPopDebugGroup()}.
*/
/*!
@@ -4920,7 +4920,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glPrimitiveBoundingBox.xml}{glPrimitiveBoundingBo()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glPrimitiveBoundingBox.xhtml}{glPrimitiveBoundingBo()}.
*/
/*!
@@ -4933,7 +4933,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glPushDebugGroup.xml}{glPushDebugGroup()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glPushDebugGroup.xhtml}{glPushDebugGroup()}.
*/
/*!
@@ -4946,7 +4946,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glReadnPixels.xml}{glReadnPixels()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glReadPixels.xhtml}{glReadnPixels()}.
*/
/*!
@@ -4959,7 +4959,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glSamplerParameterIiv.xml}{glSamplerParameterIiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glSamplerParameter.xhtml}{glSamplerParameterIiv()}.
*/
/*!
@@ -4972,7 +4972,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glSamplerParameterIuiv.xml}{glSamplerParameterIuiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glSamplerParameter.xhtml}{glSamplerParameterIuiv()}.
*/
/*!
@@ -4985,7 +4985,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexBuffer.xml}{glTexBuffer()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexBuffer.xhtml}{glTexBuffer()}.
*/
/*!
@@ -4998,7 +4998,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexBufferRange.xml}{glTexBufferRange()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexBufferRange.xhtml}{glTexBufferRange()}.
*/
/*!
@@ -5011,7 +5011,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexParameterIiv.xml}{glTexParameterIiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexParameter.xhtml}{glTexParameterIiv()}.
*/
/*!
@@ -5024,7 +5024,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexParameterIuiv.xml}{glTexParameterIuiv()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexParameter.xhtml}{glTexParameterIuiv()}.
*/
/*!
@@ -5037,7 +5037,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexStorage3DMultisample.xml}{glTexStorage3DMultisample()}.
+ \l{https://www.khronos.org/registry/OpenGL-Refpages/es3/html/glTexStorage3DMultisample.xhtml}{glTexStorage3DMultisample()}.
*/
/*!
diff --git a/src/gui/opengl/qopengltexturehelper.cpp b/src/gui/opengl/qopengltexturehelper.cpp
index be88946e90..6709edc4e2 100644
--- a/src/gui/opengl/qopengltexturehelper.cpp
+++ b/src/gui/opengl/qopengltexturehelper.cpp
@@ -188,6 +188,12 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
TexBufferRange = 0;
TextureView = 0;
+ // OpenGL ES 3.1+ has TexStorage2DMultisample
+ if (ctx->format().version() >= qMakePair(3, 1)) {
+ QOpenGLExtraFunctionsPrivate *extra = static_cast<QOpenGLExtensions *>(context->extraFunctions())->d();
+ TexStorage2DMultisample = extra->f.TexStorage2DMultisample;
+ }
+
#endif
if (context->isOpenGLES() && context->hasExtension(QByteArrayLiteral("GL_OES_texture_3D"))) {
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index f3df62b855..34847daf55 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -3193,9 +3193,9 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64(QRgba64 *buffer, co
const qreal px = fx * iw - qreal(0.5);
const qreal py = fy * iw - qreal(0.5);
- int x1 = int(px) - (px < 0);
+ int x1 = qFloor(px);
int x2;
- int y1 = int(py) - (py < 0);
+ int y1 = qFloor(py);
int y2;
distxs[i] = int((px - x1) * (1<<16));
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index b94fd34b51..6f3c92ca64 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -520,7 +520,12 @@ public:
const typename Simd::Float32x4 v_r0 = Simd::v_dup(data->gradient.radial.focal.radius);
const typename Simd::Float32x4 v_dr = Simd::v_dup(op->radial.dr);
+#if defined(__ARM_NEON__)
+ // NEON doesn't have SIMD sqrt, but uses rsqrt instead that can't be taken of 0.
+ const typename Simd::Float32x4 v_min = Simd::v_dup(std::numeric_limits<float>::epsilon());
+#else
const typename Simd::Float32x4 v_min = Simd::v_dup(0.0f);
+#endif
const typename Simd::Float32x4 v_max = Simd::v_dup(float(GRADIENT_STOPTABLE_SIZE-1));
const typename Simd::Float32x4 v_half = Simd::v_dup(0.5f);
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index 9877a23fa6..2957b8d5c0 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -2494,7 +2494,7 @@ void QTextDocumentLayoutPrivate::layoutFlow(QTextFrame::Iterator it, QTextLayout
QTextTableData *td = static_cast<QTextTableData *>(data(lastIt.currentFrame()));
QTextLayout *layout = block.layout();
- QFixed height = QFixed::fromReal(layout->lineAt(0).height());
+ QFixed height = layout->lineCount() > 0 ? QFixed::fromReal(layout->lineAt(0).height()) : QFixed();
if (layoutStruct->pageBottom == origPageBottom) {
layoutStruct->y -= height;
@@ -2506,10 +2506,12 @@ void QTextDocumentLayoutPrivate::layoutFlow(QTextFrame::Iterator it, QTextLayout
layoutBlock(block, docPos, blockFormat, layoutStruct, layoutFrom, layoutTo, previousBlockFormatPtr);
}
- QPointF linePos((td->position.x + td->size.width).toReal(),
- (td->position.y + td->size.height - height).toReal());
+ if (layout->lineCount() > 0) {
+ QPointF linePos((td->position.x + td->size.width).toReal(),
+ (td->position.y + td->size.height - height).toReal());
- layout->lineAt(0).setPosition(linePos - layout->position());
+ layout->lineAt(0).setPosition(linePos - layout->position());
+ }
}
if (blockFormat.pageBreakPolicy() & QTextFormat::PageBreak_AlwaysAfter)
diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp
index 22541e83ba..c207d6e240 100644
--- a/src/network/access/qhttp2protocolhandler.cpp
+++ b/src/network/access/qhttp2protocolhandler.cpp
@@ -1150,7 +1150,6 @@ void QHttp2ProtocolHandler::updateStream(Stream &stream, const Frame &frame,
auto &httpRequest = stream.request();
auto replyPrivate = httpReply->d_func();
- replyPrivate->compressedData.append(data, length);
replyPrivate->totalProgress += length;
const QByteArray wrapped(data, length);
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 7aa4c8cbb0..8b174d813f 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -182,7 +182,9 @@ static void ensureInitialized()
it sends. It contains the proxy and cache configuration, as well as the
signals related to such issues, and reply signals that can be used to
monitor the progress of a network operation. One QNetworkAccessManager
- should be enough for the whole Qt application.
+ instance should be enough for the whole Qt application. Since
+ QNetworkAccessManager is based on QObject, it can only be used from the
+ thread it belongs to.
Once a QNetworkAccessManager object has been created, the application can
use it to send requests over the network. A group of standard functions
diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp
index f62a03b11d..2ec4acf26c 100644
--- a/src/network/access/qnetworkcookiejar.cpp
+++ b/src/network/access/qnetworkcookiejar.cpp
@@ -241,6 +241,17 @@ QList<QNetworkCookie> QNetworkCookieJar::cookiesForUrl(const QUrl &url) const
if ((*it).isSecure() && !isEncrypted)
continue;
+ QString domain = it->domain();
+ if (domain.startsWith(QLatin1Char('.'))) /// Qt6?: remove when compliant with RFC6265
+ domain = domain.mid(1);
+#if QT_CONFIG(topleveldomain)
+ if (qIsEffectiveTLD(domain) && url.host() != domain)
+ continue;
+#else
+ if (!domain.contains(QLatin1Char('.')) && url.host() != domain)
+ continue;
+#endif // topleveldomain
+
// insert this cookie into result, sorted by path
QList<QNetworkCookie>::Iterator insertIt = result.begin();
while (insertIt != result.end()) {
@@ -340,6 +351,11 @@ bool QNetworkCookieJar::validateCookie(const QNetworkCookie &cookie, const QUrl
if (domain.startsWith(QLatin1Char('.')))
domain = domain.mid(1);
+ // We shouldn't reject if:
+ // "[...] the domain-attribute is identical to the canonicalized request-host"
+ // https://tools.ietf.org/html/rfc6265#section-5.3 step 5
+ if (host == domain)
+ return true;
#if QT_CONFIG(topleveldomain)
// the check for effective TLDs makes the "embedded dot" rule from RFC 2109 section 4.3.2
// redundant; the "leading dot" rule has been relaxed anyway, see QNetworkCookie::normalize()
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 1d7c5bec51..9ce2128ead 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -889,6 +889,8 @@ static int parseHeaderName(const QByteArray &headerName)
return QNetworkRequest::ContentLengthHeader;
else if (qstricmp(headerName.constData(), "cookie") == 0)
return QNetworkRequest::CookieHeader;
+ else if (qstricmp(headerName.constData(), "content-disposition") == 0)
+ return QNetworkRequest::ContentDispositionHeader;
break;
case 'l':
@@ -944,6 +946,7 @@ static QVariant parseHeaderValue(QNetworkRequest::KnownHeaders header, const QBy
case QNetworkRequest::UserAgentHeader:
case QNetworkRequest::ServerHeader:
case QNetworkRequest::ContentTypeHeader:
+ case QNetworkRequest::ContentDispositionHeader:
// copy exactly, convert to QString
return QString::fromLatin1(value);
diff --git a/src/network/kernel/qnetworkinterface_linux.cpp b/src/network/kernel/qnetworkinterface_linux.cpp
index 23ed2e0e15..25aba5836e 100644
--- a/src/network/kernel/qnetworkinterface_linux.cpp
+++ b/src/network/kernel/qnetworkinterface_linux.cpp
@@ -169,7 +169,7 @@ template <typename Lambda> struct ProcessNetlinkRequest
forever {
qsizetype len = recv(sock, buf, bufsize, 0);
hdr = reinterpret_cast<struct nlmsghdr *>(buf);
- if (!NLMSG_OK(hdr, len))
+ if (!NLMSG_OK(hdr, quint32(len)))
return;
auto arg = reinterpret_cast<FirstArgument>(NLMSG_DATA(hdr));
@@ -194,14 +194,14 @@ template <typename Lambda> struct ProcessNetlinkRequest
hdr = NLMSG_NEXT(hdr, len);
arg = reinterpret_cast<FirstArgument>(NLMSG_DATA(hdr));
payloadLen = NLMSG_PAYLOAD(hdr, 0);
- } while (NLMSG_OK(hdr, len));
+ } while (NLMSG_OK(hdr, quint32(len)));
if (len == 0)
continue; // get new datagram
}
#ifndef QT_NO_DEBUG
- if (NLMSG_OK(hdr, len))
+ if (NLMSG_OK(hdr, quint32(len)))
qWarning("QNetworkInterface/AF_NETLINK: received unknown packet type (%d) or too short (%u)",
hdr->nlmsg_type, hdr->nlmsg_len);
else
diff --git a/src/network/ssl/qsslkey_openssl.cpp b/src/network/ssl/qsslkey_openssl.cpp
index aa81b735b9..58df544a0e 100644
--- a/src/network/ssl/qsslkey_openssl.cpp
+++ b/src/network/ssl/qsslkey_openssl.cpp
@@ -193,6 +193,16 @@ QByteArray QSslKeyPrivate::toPem(const QByteArray &passPhrase) const
if (!QSslSocket::supportsSsl() || isNull || algorithm == QSsl::Opaque)
return QByteArray();
+ // ### the cipher should be selectable in the API:
+ const EVP_CIPHER *cipher = nullptr;
+ if (type == QSsl::PrivateKey && !passPhrase.isEmpty()) {
+#ifndef OPENSSL_NO_DES
+ cipher = q_EVP_des_ede3_cbc();
+#else
+ return QByteArray();
+#endif
+ }
+
BIO *bio = q_BIO_new(q_BIO_s_mem());
if (!bio)
return QByteArray();
@@ -205,9 +215,7 @@ QByteArray QSslKeyPrivate::toPem(const QByteArray &passPhrase) const
fail = true;
} else {
if (!q_PEM_write_bio_RSAPrivateKey(
- bio, rsa,
- // ### the cipher should be selectable in the API:
- passPhrase.isEmpty() ? (const EVP_CIPHER *)0 : q_EVP_des_ede3_cbc(),
+ bio, rsa, cipher,
const_cast<uchar *>((const uchar *)passPhrase.data()), passPhrase.size(), 0, 0)) {
fail = true;
}
@@ -218,9 +226,7 @@ QByteArray QSslKeyPrivate::toPem(const QByteArray &passPhrase) const
fail = true;
} else {
if (!q_PEM_write_bio_DSAPrivateKey(
- bio, dsa,
- // ### the cipher should be selectable in the API:
- passPhrase.isEmpty() ? (const EVP_CIPHER *)0 : q_EVP_des_ede3_cbc(),
+ bio, dsa, cipher,
const_cast<uchar *>((const uchar *)passPhrase.data()), passPhrase.size(), 0, 0)) {
fail = true;
}
@@ -232,9 +238,7 @@ QByteArray QSslKeyPrivate::toPem(const QByteArray &passPhrase) const
fail = true;
} else {
if (!q_PEM_write_bio_ECPrivateKey(
- bio, ec,
- // ### the cipher should be selectable in the API:
- passPhrase.isEmpty() ? (const EVP_CIPHER *)0 : q_EVP_des_ede3_cbc(),
+ bio, ec, cipher,
const_cast<uchar *>((const uchar *)passPhrase.data()), passPhrase.size(), 0, 0)) {
fail = true;
}
@@ -274,34 +278,39 @@ Qt::HANDLE QSslKeyPrivate::handle() const
static QByteArray doCrypt(QSslKeyPrivate::Cipher cipher, const QByteArray &data, const QByteArray &key, const QByteArray &iv, int enc)
{
-#if QT_CONFIG(opensslv11)
- EVP_CIPHER_CTX *ctx = q_EVP_CIPHER_CTX_new();
-#else
- EVP_CIPHER_CTX evpCipherContext;
- EVP_CIPHER_CTX *ctx = &evpCipherContext;
-#endif
-
const EVP_CIPHER* type = 0;
int i = 0, len = 0;
switch (cipher) {
case QSslKeyPrivate::DesCbc:
+#ifndef OPENSSL_NO_DES
type = q_EVP_des_cbc();
+#endif
break;
case QSslKeyPrivate::DesEde3Cbc:
+#ifndef OPENSSL_NO_DES
type = q_EVP_des_ede3_cbc();
+#endif
break;
case QSslKeyPrivate::Rc2Cbc:
+#ifndef OPENSSL_NO_RC2
type = q_EVP_rc2_cbc();
+#endif
break;
}
+ if (type == nullptr)
+ return QByteArray();
+
QByteArray output;
output.resize(data.size() + EVP_MAX_BLOCK_LENGTH);
#if QT_CONFIG(opensslv11)
+ EVP_CIPHER_CTX *ctx = q_EVP_CIPHER_CTX_new();
q_EVP_CIPHER_CTX_reset(ctx);
#else
+ EVP_CIPHER_CTX evpCipherContext;
+ EVP_CIPHER_CTX *ctx = &evpCipherContext;
q_EVP_CIPHER_CTX_init(ctx);
#endif
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 1fc7817fe8..cecb4fb753 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -1517,7 +1517,7 @@ bool QSslSocketBackendPrivate::importPkcs12(QIODevice *device,
if (!key->d->fromEVP_PKEY(pkey)) {
qCWarning(lcSsl, "Unable to convert private key");
q_OPENSSL_sk_pop_free(reinterpret_cast<OPENSSL_STACK *>(ca),
- reinterpret_cast<void (*)(void *)>(q_OPENSSL_sk_free));
+ reinterpret_cast<void (*)(void *)>(q_X509_free));
q_X509_free(x509);
q_EVP_PKEY_free(pkey);
q_PKCS12_free(p12);
@@ -1532,8 +1532,6 @@ bool QSslSocketBackendPrivate::importPkcs12(QIODevice *device,
*caCertificates = QSslSocketBackendPrivate::STACKOFX509_to_QSslCertificates(ca);
// Clean up
- // TODO: verify ASAP, in the past we had sk_pop_free with q_OPENSSL_sk_free
- // which seems to be blatantly wrong and even crashes with 1.1.
q_OPENSSL_sk_pop_free(reinterpret_cast<OPENSSL_STACK *>(ca),
reinterpret_cast<void (*)(void *)>(q_X509_free));
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index 82ff5e9e3a..466eba0bd0 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -322,9 +322,13 @@ DEFINEFUNC5(int, EVP_CipherInit, EVP_CIPHER_CTX *ctx, ctx, const EVP_CIPHER *typ
DEFINEFUNC6(int, EVP_CipherInit_ex, EVP_CIPHER_CTX *ctx, ctx, const EVP_CIPHER *cipher, cipher, ENGINE *impl, impl, const unsigned char *key, key, const unsigned char *iv, iv, int enc, enc, return 0, return)
DEFINEFUNC5(int, EVP_CipherUpdate, EVP_CIPHER_CTX *ctx, ctx, unsigned char *out, out, int *outl, outl, const unsigned char *in, in, int inl, inl, return 0, return)
DEFINEFUNC3(int, EVP_CipherFinal, EVP_CIPHER_CTX *ctx, ctx, unsigned char *out, out, int *outl, outl, return 0, return)
+#ifndef OPENSSL_NO_DES
DEFINEFUNC(const EVP_CIPHER *, EVP_des_cbc, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(const EVP_CIPHER *, EVP_des_ede3_cbc, DUMMYARG, DUMMYARG, return 0, return)
+#endif
+#ifndef OPENSSL_NO_RC2
DEFINEFUNC(const EVP_CIPHER *, EVP_rc2_cbc, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const EVP_MD *, EVP_sha1, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC3(int, EVP_PKEY_assign, EVP_PKEY *a, a, int b, b, char *c, c, return -1, return)
DEFINEFUNC2(int, EVP_PKEY_set1_RSA, EVP_PKEY *a, a, RSA *b, b, return -1, return)
@@ -1042,9 +1046,13 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(EVP_CipherInit_ex)
RESOLVEFUNC(EVP_CipherUpdate)
RESOLVEFUNC(EVP_CipherFinal)
+#ifndef OPENSSL_NO_DES
RESOLVEFUNC(EVP_des_cbc)
RESOLVEFUNC(EVP_des_ede3_cbc)
+#endif
+#ifndef OPENSSL_NO_RC2
RESOLVEFUNC(EVP_rc2_cbc)
+#endif
RESOLVEFUNC(EVP_sha1)
RESOLVEFUNC(EVP_PKEY_assign)
RESOLVEFUNC(EVP_PKEY_set1_RSA)
diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
index 4fb8f26cf6..68b519d74e 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -266,9 +266,13 @@ int q_EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, const unsigned
int q_EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv, int enc);
int q_EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl);
int q_EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
+#ifndef OPENSSL_NO_DES
const EVP_CIPHER *q_EVP_des_cbc();
const EVP_CIPHER *q_EVP_des_ede3_cbc();
+#endif
+#ifndef OPENSSL_NO_RC2
const EVP_CIPHER *q_EVP_rc2_cbc();
+#endif
const EVP_MD *q_EVP_sha1();
int q_EVP_PKEY_assign(EVP_PKEY *a, int b, char *c);
Q_AUTOTEST_EXPORT int q_EVP_PKEY_set1_RSA(EVP_PKEY *a, RSA *b);
diff --git a/src/network/ssl/qsslsocket_winrt.cpp b/src/network/ssl/qsslsocket_winrt.cpp
index 53a8a8b61b..e72edcbc52 100644
--- a/src/network/ssl/qsslsocket_winrt.cpp
+++ b/src/network/ssl/qsslsocket_winrt.cpp
@@ -647,6 +647,10 @@ HRESULT QSslSocketBackendPrivate::onSslUpgrade(IAsyncAction *action, AsyncStatus
connectionEncrypted = true;
emit q->encrypted();
+ // The write buffer may already have data written to it, so we need to call transmit.
+ // This has to be done in 'q's thread, and not in the current thread (the XAML thread).
+ QMetaObject::invokeMethod(q, [this](){ transmit(); });
+
if (pendingClose) {
pendingClose = false;
q->disconnectFromHost();
diff --git a/src/platformheaders/eglfsfunctions/qeglfsfunctions.qdoc b/src/platformheaders/eglfsfunctions/qeglfsfunctions.qdoc
index fc392ac369..0bee9190cf 100644
--- a/src/platformheaders/eglfsfunctions/qeglfsfunctions.qdoc
+++ b/src/platformheaders/eglfsfunctions/qeglfsfunctions.qdoc
@@ -91,6 +91,12 @@
*/
/*!
+ \fn bool QEglFSFunctions::vsp2SetLayerAlpha(const QScreen *screen, int id, qreal alpha)
+ \internal
+ \preliminary
+*/
+
+/*!
\fn void QEglFSFunctions::vsp2AddBlendListener(const QScreen *screen, void(*callback)())
\internal
\preliminary
@@ -121,6 +127,11 @@
\internal
*/
+/*!
+ \typedef QEglFSFunctions::Vsp2SetLayerAlphaType
+ \internal
+*/
+
/*! \fn QByteArray QEglFSFunctions::vsp2AddBlendListenerTypeIdentifier()
\internal
*/
@@ -140,3 +151,7 @@
/*! \fn QByteArray QEglFSFunctions::vsp2SetLayerPositionTypeIdentifier()
\internal
*/
+
+/*! \fn QByteArray QEglFSFunctions::vsp2SetLayerAlphaTypeIdentifier()
+ \internal
+ */
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 6ed55d7337..5131816213 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -798,6 +798,53 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
{ "glVertexAttribIFormat", (QFunctionPointer) ::glVertexAttribIFormat },
{ "glVertexBindingDivisor", (QFunctionPointer) ::glVertexBindingDivisor },
#endif // QT_OPENGL_ES_3_1
+
+#ifdef QT_OPENGL_ES_3_2
+ { "glBlendBarrier", (QFunctionPointer) ::glBlendBarrier },
+ { "glCopyImageSubData", (QFunctionPointer) ::glCopyImageSubData },
+ { "glDebugMessageControl", (QFunctionPointer) ::glDebugMessageControl },
+ { "glDebugMessageInsert", (QFunctionPointer) ::glDebugMessageInsert },
+ { "glDebugMessageCallback", (QFunctionPointer) ::glDebugMessageCallback },
+ { "glGetDebugMessageLog", (QFunctionPointer) ::glGetDebugMessageLog },
+ { "glPushDebugGroup", (QFunctionPointer) ::glPushDebugGroup },
+ { "glPopDebugGroup", (QFunctionPointer) ::glPopDebugGroup },
+ { "glObjectLabel", (QFunctionPointer) ::glObjectLabel },
+ { "glGetObjectLabel", (QFunctionPointer) ::glGetObjectLabel },
+ { "glObjectPtrLabel", (QFunctionPointer) ::glObjectPtrLabel },
+ { "glGetObjectPtrLabel", (QFunctionPointer) ::glGetObjectPtrLabel },
+ { "glGetPointerv", (QFunctionPointer) ::glGetPointerv },
+ { "glEnablei", (QFunctionPointer) ::glEnablei },
+ { "glDisablei", (QFunctionPointer) ::glDisablei },
+ { "glBlendEquationi", (QFunctionPointer) ::glBlendEquationi },
+ { "glBlendEquationSeparatei", (QFunctionPointer) ::glBlendEquationSeparatei },
+ { "glBlendFunci", (QFunctionPointer) ::glBlendFunci },
+ { "glBlendFuncSeparatei", (QFunctionPointer) ::glBlendFuncSeparatei },
+ { "glColorMaski", (QFunctionPointer) ::glColorMaski },
+ { "glIsEnabledi", (QFunctionPointer) ::glIsEnabledi },
+ { "glDrawElementsBaseVertex", (QFunctionPointer) ::glDrawElementsBaseVertex },
+ { "glDrawRangeElementsBaseVertex", (QFunctionPointer) ::glDrawRangeElementsBaseVertex },
+ { "glDrawElementsInstancedBaseVertex", (QFunctionPointer) ::glDrawElementsInstancedBaseVertex },
+ { "glFramebufferTexture", (QFunctionPointer) ::glFramebufferTexture },
+ { "glPrimitiveBoundingBox", (QFunctionPointer) ::glPrimitiveBoundingBox },
+ { "glGetGraphicsResetStatus", (QFunctionPointer) ::glGetGraphicsResetStatus },
+ { "glReadnPixels", (QFunctionPointer) ::glReadnPixels },
+ { "glGetnUniformfv", (QFunctionPointer) ::glGetnUniformfv },
+ { "glGetnUniformiv", (QFunctionPointer) ::glGetnUniformiv },
+ { "glGetnUniformuiv", (QFunctionPointer) ::glGetnUniformuiv },
+ { "glMinSampleShading", (QFunctionPointer) ::glMinSampleShading },
+ { "glPatchParameteri", (QFunctionPointer) ::glPatchParameteri },
+ { "glTexParameterIiv", (QFunctionPointer) ::glTexParameterIiv },
+ { "glTexParameterIuiv", (QFunctionPointer) ::glTexParameterIuiv },
+ { "glGetTexParameterIiv", (QFunctionPointer) ::glGetTexParameterIiv },
+ { "glGetTexParameterIuiv", (QFunctionPointer) ::glGetTexParameterIuiv },
+ { "glSamplerParameterIiv", (QFunctionPointer) ::glSamplerParameterIiv },
+ { "glSamplerParameterIuiv", (QFunctionPointer) ::glSamplerParameterIuiv },
+ { "glGetSamplerParameterIiv", (QFunctionPointer) ::glGetSamplerParameterIiv },
+ { "glGetSamplerParameterIuiv", (QFunctionPointer) ::glGetSamplerParameterIuiv },
+ { "glTexBuffer", (QFunctionPointer) ::glTexBuffer },
+ { "glTexBufferRange", (QFunctionPointer) ::glTexBufferRange },
+ { "glTexStorage3DMultisample", (QFunctionPointer) ::glTexStorage3DMultisample },
+#endif // QT_OPENGL_ES_3_2
};
for (size_t i = 0; i < sizeof(standardFuncs) / sizeof(StdFunc); ++i) {
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index f31f58945b..91c2dc8cf0 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -451,16 +451,15 @@ QFontEngine *QCoreTextFontDatabaseEngineFactory<QFontEngineFT>::fontEngine(const
{
CTFontDescriptorRef descriptor = static_cast<CTFontDescriptorRef>(usrPtr);
- if (NSURL *url = descriptorAttribute<NSURL>(descriptor, kCTFontURLAttribute)) {
+ if (NSValue *fontDataValue = descriptorAttribute<NSValue>(descriptor, (CFStringRef)kQtFontDataAttribute)) {
+ QByteArray *fontData = static_cast<QByteArray *>(fontDataValue.pointerValue);
+ return QFontEngineFT::create(*fontData, fontDef.pixelSize,
+ static_cast<QFont::HintingPreference>(fontDef.hintingPreference));
+ } else if (NSURL *url = descriptorAttribute<NSURL>(descriptor, kCTFontURLAttribute)) {
Q_ASSERT(url.fileURL);
QFontEngine::FaceId faceId;
faceId.filename = QString::fromNSString(url.path).toUtf8();
return QFontEngineFT::create(fontDef, faceId);
-
- } else if (NSValue *fontDataValue = descriptorAttribute<NSValue>(descriptor, (CFStringRef)kQtFontDataAttribute)) {
- QByteArray *fontData = static_cast<QByteArray *>(fontDataValue.pointerValue);
- return QFontEngineFT::create(*fontData, fontDef.pixelSize,
- static_cast<QFont::HintingPreference>(fontDef.hintingPreference));
}
Q_UNREACHABLE();
}
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
index 47a65eded8..b21d5d9ef5 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
@@ -225,7 +225,8 @@ void QEvdevKeyboardHandler::readKeycode()
void QEvdevKeyboardHandler::processKeyEvent(int nativecode, int unicode, int qtcode,
Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat)
{
- QGuiApplicationPrivate::inputDeviceManager()->setKeyboardModifiers(modifiers, qtcode);
+ if (!autoRepeat)
+ QGuiApplicationPrivate::inputDeviceManager()->setKeyboardModifiers(QEvdevKeyboardHandler::toQtModifiers(m_modifiers));
QWindowSystemInterface::handleExtendedKeyEvent(0, (isPress ? QEvent::KeyPress : QEvent::KeyRelease),
qtcode, modifiers, nativecode + 8, 0, int(modifiers),
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp
index 5264736dd6..ae81bca00f 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp
+++ b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp
@@ -148,14 +148,13 @@ void QEvdevMouseManager::handleMouseEvent(int x, int y, bool abs, Qt::MouseButto
QPoint pos(m_x + m_xoffset, m_y + m_yoffset);
// Cannot track the keyboard modifiers ourselves here. Instead, report the
// modifiers from the last key event that has been seen by QGuiApplication.
- Qt::KeyboardModifiers mods = QGuiApplication::keyboardModifiers();
- QWindowSystemInterface::handleMouseEvent(0, pos, pos, buttons, button, type, mods);
+ QWindowSystemInterface::handleMouseEvent(0, pos, pos, buttons, button, type, QGuiApplicationPrivate::inputDeviceManager()->keyboardModifiers());
}
void QEvdevMouseManager::handleWheelEvent(QPoint delta)
{
QPoint pos(m_x + m_xoffset, m_y + m_yoffset);
- QWindowSystemInterface::handleWheelEvent(0, pos, pos, QPoint(), delta, QGuiApplication::keyboardModifiers());
+ QWindowSystemInterface::handleWheelEvent(0, pos, pos, QPoint(), delta, QGuiApplicationPrivate::inputDeviceManager()->keyboardModifiers());
}
void QEvdevMouseManager::addMouse(const QString &deviceNode)
diff --git a/src/platformsupport/input/libinput/qlibinputkeyboard.cpp b/src/platformsupport/input/libinput/qlibinputkeyboard.cpp
index ec01f95947..5152725468 100644
--- a/src/platformsupport/input/libinput/qlibinputkeyboard.cpp
+++ b/src/platformsupport/input/libinput/qlibinputkeyboard.cpp
@@ -135,7 +135,8 @@ QLibInputKeyboard::QLibInputKeyboard()
#ifndef QT_NO_XKBCOMMON_EVDEV
: m_ctx(0),
m_keymap(0),
- m_state(0)
+ m_state(0),
+ m_mods(Qt::NoModifier)
#endif
{
#ifndef QT_NO_XKBCOMMON_EVDEV
@@ -203,22 +204,27 @@ void QLibInputKeyboard::processKey(libinput_event_keyboard *e)
Qt::KeyboardModifiers mods = Qt::NoModifier;
const int qtkey = keysymToQtKey(sym, &mods, text);
- xkb_state_component modtype = xkb_state_component(XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_LATCHED);
- if (xkb_state_mod_index_is_active(m_state, m_modindex[0], modtype) && (qtkey != Qt::Key_Control || !pressed))
+ if (qtkey == Qt::Key_Control)
mods |= Qt::ControlModifier;
- if (xkb_state_mod_index_is_active(m_state, m_modindex[1], modtype) && (qtkey != Qt::Key_Alt || !pressed))
+ if (qtkey == Qt::Key_Alt)
mods |= Qt::AltModifier;
- if (xkb_state_mod_index_is_active(m_state, m_modindex[2], modtype) && (qtkey != Qt::Key_Shift || !pressed))
+ if (qtkey == Qt::Key_Shift)
mods |= Qt::ShiftModifier;
- if (xkb_state_mod_index_is_active(m_state, m_modindex[3], modtype) && (qtkey != Qt::Key_Meta || !pressed))
+ if (qtkey == Qt::Key_Meta)
mods |= Qt::MetaModifier;
-
xkb_state_update_key(m_state, k, pressed ? XKB_KEY_DOWN : XKB_KEY_UP);
- QGuiApplicationPrivate::inputDeviceManager()->setKeyboardModifiers(mods, qtkey);
+ if (mods != Qt::NoModifier) {
+ if (pressed)
+ m_mods |= mods;
+ else
+ m_mods &= ~mods;
+
+ QGuiApplicationPrivate::inputDeviceManager()->setKeyboardModifiers(m_mods);
+ }
QWindowSystemInterface::handleExtendedKeyEvent(nullptr,
pressed ? QEvent::KeyPress : QEvent::KeyRelease,
- qtkey, mods, k, sym, mods, text);
+ qtkey, m_mods, k, sym, m_mods, text);
if (pressed && xkb_keymap_key_repeats(m_keymap, k)) {
m_repeatData.qtkey = qtkey;
diff --git a/src/platformsupport/input/libinput/qlibinputkeyboard_p.h b/src/platformsupport/input/libinput/qlibinputkeyboard_p.h
index b7ee8a363f..9e09bccd79 100644
--- a/src/platformsupport/input/libinput/qlibinputkeyboard_p.h
+++ b/src/platformsupport/input/libinput/qlibinputkeyboard_p.h
@@ -93,6 +93,7 @@ private:
QString unicodeText;
int repeatCount;
} m_repeatData;
+ Qt::KeyboardModifiers m_mods;
#endif
};
diff --git a/src/platformsupport/input/libinput/qlibinputpointer.cpp b/src/platformsupport/input/libinput/qlibinputpointer.cpp
index cb08ab53b2..c54b61fc66 100644
--- a/src/platformsupport/input/libinput/qlibinputpointer.cpp
+++ b/src/platformsupport/input/libinput/qlibinputpointer.cpp
@@ -125,7 +125,7 @@ void QLibInputPointer::processAxis(libinput_event_pointer *e)
#endif
const int factor = 8;
angleDelta *= -factor;
- Qt::KeyboardModifiers mods = QGuiApplication::keyboardModifiers();
+ Qt::KeyboardModifiers mods = QGuiApplicationPrivate::inputDeviceManager()->keyboardModifiers();
QWindowSystemInterface::handleWheelEvent(nullptr, m_pos, m_pos, QPoint(), angleDelta, mods);
}
diff --git a/src/plugins/platforms/cocoa/qcocoacursor.mm b/src/plugins/platforms/cocoa/qcocoacursor.mm
index c021128e4c..8c98dc69f7 100644
--- a/src/plugins/platforms/cocoa/qcocoacursor.mm
+++ b/src/plugins/platforms/cocoa/qcocoacursor.mm
@@ -314,6 +314,7 @@ NSCursor *QCocoaCursor::createCursorFromPixmap(const QPixmap pixmap, const QPoin
if (pixmap.devicePixelRatio() > 1.0) {
QSize layoutSize = pixmap.size() / pixmap.devicePixelRatio();
QPixmap scaledPixmap = pixmap.scaled(layoutSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+ scaledPixmap.setDevicePixelRatio(1.0);
nsimage = static_cast<NSImage *>(qt_mac_create_nsimage(scaledPixmap));
CGImageRef cgImage = qt_mac_toCGImage(pixmap.toImage());
NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithCGImage:cgImage];
diff --git a/src/plugins/platforms/cocoa/qcocoadrag.h b/src/plugins/platforms/cocoa/qcocoadrag.h
index dc0cc17dfb..5a5b985c6e 100644
--- a/src/plugins/platforms/cocoa/qcocoadrag.h
+++ b/src/plugins/platforms/cocoa/qcocoadrag.h
@@ -46,6 +46,7 @@
#include <private/qsimpledrag_p.h>
#include <QtGui/private/qdnd_p.h>
+#include <QtGui/private/qinternalmimedata_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
index 9a96895d07..815882ab06 100644
--- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
@@ -73,8 +73,6 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
return newFont;
}
-@class QT_MANGLE_NAMESPACE(QNSFontPanelDelegate);
-
@interface QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) : NSObject<NSWindowDelegate, QNSPanelDelegate>
{
@public
@@ -110,7 +108,8 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate);
[mFontPanel setRestorable:NO];
[mFontPanel setDelegate:self];
- [[NSFontManager sharedFontManager] setDelegate:self];
+
+ [NSFontManager sharedFontManager].target = self; // Action is changeFont:
[mFontPanel retain];
return self;
@@ -120,7 +119,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate);
{
[mStolenContentView release];
[mFontPanel setDelegate:nil];
- [[NSFontManager sharedFontManager] setDelegate:nil];
+ [NSFontManager sharedFontManager].target = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm
index b729c7f4c0..e5954f277c 100644
--- a/src/plugins/platforms/cocoa/qcocoahelpers.mm
+++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm
@@ -265,6 +265,16 @@ QRectF qt_mac_flip(const QRectF &rect, const QRectF &reference)
// -------------------------------------------------------------------------
+/*!
+ \fn Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
+
+ Returns the Qt::Button that corresponds to an NSEvent.buttonNumber.
+
+ \note AppKit will use buttonNumber 0 to indicate both "left button"
+ and "no button". Only NSEvents that describes mouse press/release
+ events (e.g NSEventTypeOtherMouseDown) will contain a valid
+ button number.
+*/
Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
{
if (buttonNum >= 0 && buttonNum <= 31)
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 54254455e4..72f3bc0075 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -404,8 +404,10 @@ void QCocoaWindow::setVisible(bool visible)
removeMonitor();
monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask|NSOtherMouseDownMask|NSMouseMovedMask handler:^(NSEvent *e) {
QPointF localPoint = QCocoaScreen::mapFromNative([NSEvent mouseLocation]);
+ const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
+ const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint,
- cocoaButton2QtButton([e buttonNumber]));
+ Qt::MouseButtons(uint(NSEvent.pressedMouseButtons & 0xFFFF)), button, eventType);
}];
}
}
@@ -571,7 +573,7 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
Qt::WindowType type = window()->type();
if ((type & Qt::Popup) != Qt::Popup && (type & Qt::Dialog) != Qt::Dialog) {
NSWindowCollectionBehavior behavior = m_view.window.collectionBehavior;
- if (flags & Qt::WindowFullscreenButtonHint) {
+ if ((flags & Qt::WindowFullscreenButtonHint) || m_view.window.qt_fullScreen) {
behavior |= NSWindowCollectionBehaviorFullScreenPrimary;
behavior &= ~NSWindowCollectionBehaviorFullScreenAuxiliary;
} else {
@@ -1334,7 +1336,7 @@ void QCocoaWindow::recreateWindowIfNeeded()
void QCocoaWindow::requestUpdate()
{
qCDebug(lcQpaCocoaDrawing) << "QCocoaWindow::requestUpdate" << window();
- [qnsview_cast(m_view) requestUpdate];
+ QPlatformWindow::requestUpdate();
}
void QCocoaWindow::requestActivateWindow()
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index a88cd5feda..c88ffc76d7 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -358,7 +358,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
m_platformWindow->handleExposeEvent(dirtyRegion);
}
- if (windowPrivate->updateRequestPending) {
+ if (m_updateRequested && windowPrivate->updateRequestPending) {
// A call to QWindow::requestUpdate was issued during event delivery above,
// but AppKit will reset the needsDisplay state of the view after completing
// the current display cycle, so we need to defer the request to redisplay.
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
index 6e5623d679..15c141448d 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
@@ -39,6 +39,7 @@
#include "qnswindowdelegate.h"
#include "qcocoahelpers.h"
+#include "qcocoascreen.h"
#include <QDebug>
#include <qpa/qplatformscreen.h>
@@ -69,15 +70,24 @@ static QRegExp whitespaceRegex = QRegExp(QStringLiteral("\\s*"));
Overridden to ensure that the zoomed state always results in a maximized
window, which would otherwise not be the case for borderless windows.
*/
-- (NSRect)windowWillUseStandardFrame:(NSWindow *)window defaultFrame:(NSRect)newFrame
+- (NSRect)windowWillUseStandardFrame:(NSWindow *)window defaultFrame:(NSRect)proposedFrame
{
- Q_UNUSED(newFrame);
-
- // We explicitly go through the QScreen API here instead of just using
- // window.screen.visibleFrame directly, as that ensures we have the same
- // behavior for both use-cases/APIs.
+ Q_UNUSED(proposedFrame);
Q_ASSERT(window == m_cocoaWindow->nativeWindow());
- return NSRectFromCGRect(m_cocoaWindow->screen()->availableGeometry().toCGRect());
+
+ // We compute the maximized state based on the maximum size, and
+ // the current position of the window. This may result in the window
+ // geometry falling outside of the current screen's available geometry,
+ // e.g. when there is not maximize size set, but this is okey, AppKit
+ // will then shift and possibly clip the geometry for us.
+ const QWindow *w = m_cocoaWindow->window();
+ QRect maximizedRect = QRect(w->framePosition(), w->maximumSize());
+
+ // QWindow::maximumSize() refers to the client size,
+ // but AppKit expects the full frame size.
+ maximizedRect.adjust(0, 0, 0, w->frameMargins().top());
+
+ return QCocoaScreen::mapToNative(maximizedRect);
}
- (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
diff --git a/src/plugins/platforms/cocoa/qprintengine_mac.mm b/src/plugins/platforms/cocoa/qprintengine_mac.mm
index b3d48c1ec3..eade407500 100644
--- a/src/plugins/platforms/cocoa/qprintengine_mac.mm
+++ b/src/plugins/platforms/cocoa/qprintengine_mac.mm
@@ -574,6 +574,11 @@ void QMacPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va
d->setPageSize(QPageSize(QPageSize::id(value.toInt())));
break;
case PPK_PrinterName: {
+ QVariant pageSize = QVariant::fromValue(d->m_pageLayout.pageSize());
+ const bool isFullPage = d->m_pageLayout.mode() == QPageLayout::FullPageMode;
+ QVariant orientation = QVariant::fromValue(d->m_pageLayout.orientation());
+ QVariant margins = QVariant::fromValue(QPair<QMarginsF, QPageLayout::Unit>(d->m_pageLayout.margins(),
+ d->m_pageLayout.units()));
QString id = value.toString();
if (id.isEmpty())
id = QCocoaPrinterSupport().defaultPrintDeviceId();
@@ -583,7 +588,14 @@ void QMacPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va
PMPrinter printer = d->m_printDevice->macPrinter();
PMRetain(printer);
PMSessionSetCurrentPMPrinter(d->session(), printer);
- // TODO Do we need to check if the page size, etc, are valid on new printer?
+ // Ensure the settings are up to date and valid
+ if (d->m_printDevice->supportedPageSize(pageSize.value<QPageSize>()).isValid())
+ setProperty(PPK_QPageSize, pageSize);
+ else
+ setProperty(PPK_CustomPaperSize, pageSize.value<QPageSize>().size(QPageSize::Point));
+ setProperty(PPK_FullPage, QVariant(isFullPage));
+ setProperty(PPK_Orientation, orientation);
+ setProperty(PPK_QPageMargins, margins);
break;
}
case PPK_CustomPaperSize:
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_rcar/qeglfsrcarintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_rcar/qeglfsrcarintegration.cpp
index 98cf1d3bfb..212ebde05a 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_rcar/qeglfsrcarintegration.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_rcar/qeglfsrcarintegration.cpp
@@ -52,12 +52,28 @@ QT_BEGIN_NAMESPACE
void QEglFSRcarIntegration::platformInit()
{
+ bool ok;
+
QEglFSDeviceIntegration::platformInit();
PVRGrfxServerInit();
mScreenSize = q_screenSizeFromFb(0);
mNativeDisplay = (NativeDisplayType)EGL_DEFAULT_DISPLAY;
+
+ mNativeDisplayID = qEnvironmentVariableIntValue("QT_QPA_WM_DISP_ID", &ok);
+ if (!ok)
+ mNativeDisplayID = RCAR_DEFAULT_DISPLAY;
+
+ r_wm_Error_t wm_err = R_WM_DevInit(mNativeDisplayID);
+ if (wm_err != R_WM_ERR_OK)
+ qFatal("Failed to init WM Dev: %d, error: %d", mNativeDisplayID, wm_err);
+ wm_err = R_WM_ScreenBgColorSet(mNativeDisplayID, 0x20, 0x20, 0x20); // Grey
+ if (wm_err != R_WM_ERR_OK)
+ qFatal("Failed to set screen background: %d", wm_err);
+ wm_err = R_WM_ScreenEnable(mNativeDisplayID);
+ if (wm_err != R_WM_ERR_OK)
+ qFatal("Failed to enable screen: %d", wm_err);
}
QSize QEglFSRcarIntegration::screenSize() const
@@ -104,14 +120,6 @@ EGLNativeWindowType QEglFSRcarIntegration::createNativeWindow(QPlatformWindow *w
{
bool ok;
- mNativeDisplayID = qEnvironmentVariableIntValue("QT_QPA_WM_DISP_ID", &ok);
- if (!ok)
- mNativeDisplayID = RCAR_DEFAULT_DISPLAY;
-
- r_wm_Error_t wm_err = R_WM_DevInit(mNativeDisplayID);
- if (wm_err != R_WM_ERR_OK)
- qFatal("Failed to init WM Dev: %d, error: %d", mNativeDisplayID, wm_err);
-
mNativeWindow = (EGLNativeWindowTypeREL*)malloc(sizeof(EGLNativeWindowTypeREL));
memset(mNativeWindow, 0, sizeof(EGLNativeWindowTypeREL));
@@ -134,7 +142,7 @@ EGLNativeWindowType QEglFSRcarIntegration::createNativeWindow(QPlatformWindow *w
mNativeWindow->Surface.Type = R_WM_SURFACE_FB;
mNativeWindow->Surface.BufMode = R_WM_WINBUF_ALLOC_INTERNAL;
- wm_err = R_WM_WindowCreate(mNativeDisplayID, mNativeWindow);
+ r_wm_Error_t wm_err = R_WM_WindowCreate(mNativeDisplayID, mNativeWindow);
if (wm_err != R_WM_ERR_OK)
qFatal("Failed to create window layer: %d", wm_err);
wm_err = R_WM_DevEventRegister(mNativeDisplayID, R_WM_EVENT_VBLANK, 0);
diff --git a/src/plugins/platforms/ios/qiosapplicationstate.mm b/src/plugins/platforms/ios/qiosapplicationstate.mm
index 6d9bcdacbf..cc76d198f5 100644
--- a/src/plugins/platforms/ios/qiosapplicationstate.mm
+++ b/src/plugins/platforms/ios/qiosapplicationstate.mm
@@ -44,6 +44,7 @@
#include <qpa/qwindowsysteminterface.h>
#include <QtCore/qcoreapplication.h>
+#include <QtCore/private/qcore_mac_p.h>
#include <QtGui/private/qguiapplication_p.h>
@@ -57,7 +58,13 @@ static void qRegisterApplicationStateNotifications()
// Map between notifications and corresponding application state. Note that
// there's no separate notification for moving to UIApplicationStateInactive,
// so we use UIApplicationWillResignActiveNotification as an intermediate.
- static QMap<NSNotificationName, UIApplicationState> notifications {
+ using NotificationMap = QMap<NSNotificationName, UIApplicationState>;
+ static auto notifications = qt_apple_isApplicationExtension() ? NotificationMap{
+ { NSExtensionHostWillEnterForegroundNotification, UIApplicationStateInactive },
+ { NSExtensionHostDidBecomeActiveNotification, UIApplicationStateActive },
+ { NSExtensionHostWillResignActiveNotification, UIApplicationStateInactive },
+ { NSExtensionHostDidEnterBackgroundNotification, UIApplicationStateBackground },
+ } : NotificationMap{
{ UIApplicationWillEnterForegroundNotification, UIApplicationStateInactive },
{ UIApplicationDidBecomeActiveNotification, UIApplicationStateActive },
{ UIApplicationWillResignActiveNotification, UIApplicationStateInactive },
@@ -73,16 +80,24 @@ static void qRegisterApplicationStateNotifications()
}];
}
- // Initialize correct startup state, which may not be the Qt default (inactive)
- UIApplicationState startupState = [UIApplication sharedApplication].applicationState;
- QIOSApplicationState::handleApplicationStateChanged(startupState, QLatin1String("Application loaded"));
+ if (qt_apple_isApplicationExtension()) {
+ // Extensions are not allowed to access UIApplication, so we assume the state is active
+ QIOSApplicationState::handleApplicationStateChanged(UIApplicationStateActive,
+ QLatin1String("Extension loaded, assuming state is active"));
+ } else {
+ // Initialize correct startup state, which may not be the Qt default (inactive)
+ UIApplicationState startupState = [UIApplication sharedApplication].applicationState;
+ QIOSApplicationState::handleApplicationStateChanged(startupState, QLatin1String("Application loaded"));
+ }
}
Q_CONSTRUCTOR_FUNCTION(qRegisterApplicationStateNotifications)
QIOSApplicationState::QIOSApplicationState()
{
- UIApplicationState startupState = [UIApplication sharedApplication].applicationState;
- QIOSApplicationState::handleApplicationStateChanged(startupState, QLatin1String("Application launched"));
+ if (!qt_apple_isApplicationExtension()) {
+ UIApplicationState startupState = [UIApplication sharedApplication].applicationState;
+ QIOSApplicationState::handleApplicationStateChanged(startupState, QLatin1String("Application launched"));
+ }
}
void QIOSApplicationState::handleApplicationStateChanged(UIApplicationState uiState, const QString &reason)
diff --git a/src/plugins/platforms/ios/qioseventdispatcher.h b/src/plugins/platforms/ios/qioseventdispatcher.h
index 62133b9510..1f4c78dc74 100644
--- a/src/plugins/platforms/ios/qioseventdispatcher.h
+++ b/src/plugins/platforms/ios/qioseventdispatcher.h
@@ -49,18 +49,29 @@ class QIOSEventDispatcher : public QEventDispatcherCoreFoundation
Q_OBJECT
public:
+ static QIOSEventDispatcher* create();
+ bool processPostedEvents() override;
+
+protected:
explicit QIOSEventDispatcher(QObject *parent = 0);
+};
+
+class QIOSJumpingEventDispatcher : public QIOSEventDispatcher
+{
+ Q_OBJECT
+public:
+ QIOSJumpingEventDispatcher(QObject *parent = 0);
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
- bool processPostedEvents() override;
+ // Public since we can't friend Objective-C methods
void handleRunLoopExit(CFRunLoopActivity activity);
void interruptEventLoopExec();
private:
uint m_processEventLevel;
- RunLoopObserver<QIOSEventDispatcher> m_runLoopExitObserver;
+ RunLoopObserver<QIOSJumpingEventDispatcher> m_runLoopExitObserver;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/ios/qioseventdispatcher.mm b/src/plugins/platforms/ios/qioseventdispatcher.mm
index a6f6a7aac9..06e5e6cb80 100644
--- a/src/plugins/platforms/ios/qioseventdispatcher.mm
+++ b/src/plugins/platforms/ios/qioseventdispatcher.mm
@@ -403,7 +403,7 @@ static const char kApplicationWillTerminateExitCode = char(SIGTERM | 0x80);
// so we'll never see the exit activity and have a chance to return from
// QEventLoop::exec(). We initiate the return manually as a workaround.
qCDebug(lcEventDispatcher) << "Manually triggering return from event loop exec";
- static_cast<QIOSEventDispatcher *>(qApp->eventDispatcher())->interruptEventLoopExec();
+ static_cast<QIOSJumpingEventDispatcher *>(qApp->eventDispatcher())->interruptEventLoopExec();
break;
case kJumpedFromUserMainTrampoline:
// The user's main has returned, so we're ready to let iOS terminate the application
@@ -419,20 +419,48 @@ static const char kApplicationWillTerminateExitCode = char(SIGTERM | 0x80);
QT_BEGIN_NAMESPACE
QT_USE_NAMESPACE
+QIOSEventDispatcher *QIOSEventDispatcher::create()
+{
+ if (isQtApplication() && rootLevelRunLoopIntegration())
+ return new QIOSJumpingEventDispatcher;
+
+ return new QIOSEventDispatcher;
+}
+
QIOSEventDispatcher::QIOSEventDispatcher(QObject *parent)
: QEventDispatcherCoreFoundation(parent)
- , m_processEventLevel(0)
- , m_runLoopExitObserver(this, &QIOSEventDispatcher::handleRunLoopExit, kCFRunLoopExit)
{
// We want all delivery of events from the system to be handled synchronously
QWindowSystemInterface::setSynchronousWindowSystemEvents(true);
}
-bool __attribute__((returns_twice)) QIOSEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
+/*!
+ Override of the CoreFoundation posted events runloop source callback
+ so that we can send window system (QPA) events in addition to sending
+ normal Qt events.
+*/
+bool QIOSEventDispatcher::processPostedEvents()
{
- if (!rootLevelRunLoopIntegration())
- return QEventDispatcherCoreFoundation::processEvents(flags);
+ // Don't send window system events if the base CF dispatcher has determined
+ // that events should not be sent for this pass of the runloop source.
+ if (!QEventDispatcherCoreFoundation::processPostedEvents())
+ return false;
+ qCDebug(lcEventDispatcher) << "Sending window system events for" << m_processEvents.flags;
+ QWindowSystemInterface::sendWindowSystemEvents(m_processEvents.flags);
+
+ return true;
+}
+
+QIOSJumpingEventDispatcher::QIOSJumpingEventDispatcher(QObject *parent)
+ : QIOSEventDispatcher(parent)
+ , m_processEventLevel(0)
+ , m_runLoopExitObserver(this, &QIOSJumpingEventDispatcher::handleRunLoopExit, kCFRunLoopExit)
+{
+}
+
+bool __attribute__((returns_twice)) QIOSJumpingEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
+{
if (applicationAboutToTerminate) {
qCDebug(lcEventDispatcher) << "Detected QEventLoop exec after application termination";
// Re-issue exit, and return immediately
@@ -475,25 +503,7 @@ bool __attribute__((returns_twice)) QIOSEventDispatcher::processEvents(QEventLoo
return processedEvents;
}
-/*!
- Override of the CoreFoundation posted events runloop source callback
- so that we can send window system (QPA) events in addition to sending
- normal Qt events.
-*/
-bool QIOSEventDispatcher::processPostedEvents()
-{
- // Don't send window system events if the base CF dispatcher has determined
- // that events should not be sent for this pass of the runloop source.
- if (!QEventDispatcherCoreFoundation::processPostedEvents())
- return false;
-
- qCDebug(lcEventDispatcher) << "Sending window system events for" << m_processEvents.flags;
- QWindowSystemInterface::sendWindowSystemEvents(m_processEvents.flags);
-
- return true;
-}
-
-void QIOSEventDispatcher::handleRunLoopExit(CFRunLoopActivity activity)
+void QIOSJumpingEventDispatcher::handleRunLoopExit(CFRunLoopActivity activity)
{
Q_UNUSED(activity);
Q_ASSERT(activity == kCFRunLoopExit);
@@ -502,7 +512,7 @@ void QIOSEventDispatcher::handleRunLoopExit(CFRunLoopActivity activity)
interruptEventLoopExec();
}
-void QIOSEventDispatcher::interruptEventLoopExec()
+void QIOSJumpingEventDispatcher::interruptEventLoopExec()
{
Q_ASSERT(m_processEventLevel == 1);
diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm
index 2e657b3798..b8ce49aaca 100644
--- a/src/plugins/platforms/ios/qiosintegration.mm
+++ b/src/plugins/platforms/ios/qiosintegration.mm
@@ -217,10 +217,7 @@ QPlatformOffscreenSurface *QIOSIntegration::createPlatformOffscreenSurface(QOffs
QAbstractEventDispatcher *QIOSIntegration::createEventDispatcher() const
{
- if (isQtApplication())
- return new QIOSEventDispatcher;
- else
- return new QEventDispatcherCoreFoundation;
+ return QIOSEventDispatcher::create();
}
QPlatformFontDatabase * QIOSIntegration::fontDatabase() const
diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm
index 29afae7176..8db36705c0 100644
--- a/src/plugins/platforms/ios/quiview.mm
+++ b/src/plugins/platforms/ios/quiview.mm
@@ -440,7 +440,8 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
if (m_activeTouches.isEmpty())
return;
- if (!static_cast<QUIWindow *>(self.window).sendingEvent) {
+ if ([self.window isKindOfClass:[QUIWindow class]] &&
+ !static_cast<QUIWindow *>(self.window).sendingEvent) {
// The event is likely delivered as part of delayed touch delivery, via
// _UIGestureEnvironmentSortAndSendDelayedTouches, due to one of the two
// _UISystemGestureGateGestureRecognizer instances on the top level window
diff --git a/src/plugins/platforms/offscreen/qoffscreencommon.h b/src/plugins/platforms/offscreen/qoffscreencommon.h
index 541c07384c..f4f0142911 100644
--- a/src/plugins/platforms/offscreen/qoffscreencommon.h
+++ b/src/plugins/platforms/offscreen/qoffscreencommon.h
@@ -41,7 +41,9 @@
#define QOFFSCREENCOMMON_H
#include <qpa/qplatformbackingstore.h>
+#if QT_CONFIG(draganddrop)
#include <qpa/qplatformdrag.h>
+#endif
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformscreen.h>
#include <qpa/qplatformwindow.h>
@@ -71,7 +73,7 @@ public:
QScopedPointer<QPlatformCursor> m_cursor;
};
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
class QOffscreenDrag : public QPlatformDrag
{
public:
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
index 75bb786b28..01cd254501 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
@@ -109,7 +109,7 @@ QOffscreenIntegration::QOffscreenIntegration()
m_fontDatabase.reset(new QFreeTypeFontDatabase());
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
m_drag.reset(new QOffscreenDrag);
#endif
m_services.reset(new QPlatformServices);
@@ -204,7 +204,7 @@ QPlatformFontDatabase *QOffscreenIntegration::fontDatabase() const
return m_fontDatabase.data();
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QPlatformDrag *QOffscreenIntegration::drag() const
{
return m_drag.data();
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration.h b/src/plugins/platforms/offscreen/qoffscreenintegration.h
index a1e3a9bde8..fc988126bb 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration.h
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration.h
@@ -59,7 +59,7 @@ public:
QPlatformWindow *createPlatformWindow(QWindow *window) const override;
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QPlatformDrag *drag() const override;
#endif
@@ -76,7 +76,7 @@ public:
private:
QScopedPointer<QPlatformFontDatabase> m_fontDatabase;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QScopedPointer<QPlatformDrag> m_drag;
#endif
QScopedPointer<QPlatformInputContext> m_inputContext;
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index bffe7ee34b..6085cd34c0 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -139,7 +139,7 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
, m_clipboard(0)
#endif
, m_navigator(0)
-#if !defined(QT_NO_DRAGANDDROP)
+#if QT_CONFIG(draganddrop)
, m_drag(new QSimpleDrag())
#endif
{
@@ -212,7 +212,7 @@ QQnxIntegration::~QQnxIntegration()
qIntegrationDebug("platform plugin shutdown begin");
delete m_nativeInterface;
-#if !defined(QT_NO_DRAGANDDROP)
+#if QT_CONFIG(draganddrop)
// Destroy the drag object
delete m_drag;
#endif
@@ -419,7 +419,7 @@ QPlatformClipboard *QQnxIntegration::clipboard() const
}
#endif
-#if !defined(QT_NO_DRAGANDDROP)
+#if QT_CONFIG(draganddrop)
QPlatformDrag *QQnxIntegration::drag() const
{
return m_drag;
diff --git a/src/plugins/platforms/qnx/qqnxintegration.h b/src/plugins/platforms/qnx/qqnxintegration.h
index d1ebb1d4bf..f11afa1748 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.h
+++ b/src/plugins/platforms/qnx/qqnxintegration.h
@@ -113,7 +113,7 @@ public:
#if !defined(QT_NO_CLIPBOARD)
QPlatformClipboard *clipboard() const override;
#endif
-#if !defined(QT_NO_DRAGANDDROP)
+#if QT_CONFIG(draganddrop)
QPlatformDrag *drag() const override;
#endif
QVariant styleHint(StyleHint hint) const override;
@@ -158,7 +158,7 @@ private:
mutable QQnxClipboard* m_clipboard;
#endif
QQnxAbstractNavigator *m_navigator;
-#if !defined(QT_NO_DRAGANDDROP)
+#if QT_CONFIG(draganddrop)
QSimpleDrag *m_drag;
#endif
static QQnxWindowMapper ms_windowMapper;
diff --git a/src/plugins/platforms/qnx/qqnxkeytranslator.h b/src/plugins/platforms/qnx/qqnxkeytranslator.h
index 043e38fec9..9400b88dbb 100644
--- a/src/plugins/platforms/qnx/qqnxkeytranslator.h
+++ b/src/plugins/platforms/qnx/qqnxkeytranslator.h
@@ -48,179 +48,68 @@
QT_BEGIN_NAMESPACE
-Qt::Key keyTranslator( int key )
+int qtKeyForPrivateUseQnxKey( int key )
{
switch (key) {
- case KEYCODE_PAUSE:
- return Qt::Key_Pause;
-
- case KEYCODE_SCROLL_LOCK:
- return Qt::Key_ScrollLock;
-
- case KEYCODE_PRINT:
- return Qt::Key_Print;
-
- case KEYCODE_SYSREQ:
- return Qt::Key_SysReq;
-
+ case KEYCODE_PAUSE: return Qt::Key_Pause;
+ case KEYCODE_SCROLL_LOCK: return Qt::Key_ScrollLock;
+ case KEYCODE_PRINT: return Qt::Key_Print;
+ case KEYCODE_SYSREQ: return Qt::Key_SysReq;
// case KEYCODE_BREAK:
-
- case KEYCODE_ESCAPE:
- return Qt::Key_Escape;
-
- case KEYCODE_BACKSPACE:
- return Qt::Key_Backspace;
-
- case KEYCODE_TAB:
- return Qt::Key_Tab;
-
- case KEYCODE_BACK_TAB:
- return Qt::Key_Backtab;
-
- case KEYCODE_RETURN:
- return Qt::Key_Return;
-
- case KEYCODE_CAPS_LOCK:
- return Qt::Key_CapsLock;
-
- case KEYCODE_LEFT_SHIFT:
- case KEYCODE_RIGHT_SHIFT:
- return Qt::Key_Shift;
-
- case KEYCODE_LEFT_CTRL:
- case KEYCODE_RIGHT_CTRL:
- return Qt::Key_Control;
-
- case KEYCODE_LEFT_ALT:
- case KEYCODE_RIGHT_ALT:
- return Qt::Key_Alt;
-
- case KEYCODE_MENU:
- return Qt::Key_Menu;
-
- case KEYCODE_LEFT_HYPER:
- return Qt::Key_Hyper_L;
-
- case KEYCODE_RIGHT_HYPER:
- return Qt::Key_Hyper_R;
-
- case KEYCODE_INSERT:
- return Qt::Key_Insert;
-
- case KEYCODE_HOME:
- return Qt::Key_Home;
-
- case KEYCODE_PG_UP:
- return Qt::Key_PageUp;
-
- case KEYCODE_DELETE:
- return Qt::Key_Delete;
-
- case KEYCODE_END:
- return Qt::Key_End;
-
- case KEYCODE_PG_DOWN:
- return Qt::Key_PageDown;
-
- case KEYCODE_LEFT:
- return Qt::Key_Left;
-
- case KEYCODE_RIGHT:
- return Qt::Key_Right;
-
- case KEYCODE_UP:
- return Qt::Key_Up;
-
- case KEYCODE_DOWN:
- return Qt::Key_Down;
-
- case KEYCODE_NUM_LOCK:
- return Qt::Key_NumLock;
-
- case KEYCODE_KP_PLUS:
- return Qt::Key_Plus;
-
- case KEYCODE_KP_MINUS:
- return Qt::Key_Minus;
-
- case KEYCODE_KP_MULTIPLY:
- return Qt::Key_Asterisk;
-
- case KEYCODE_KP_DIVIDE:
- return Qt::Key_Slash;
-
- case KEYCODE_KP_ENTER:
- return Qt::Key_Enter;
-
- case KEYCODE_KP_HOME:
- return Qt::Key_Home;
-
- case KEYCODE_KP_UP:
- return Qt::Key_Up;
-
- case KEYCODE_KP_PG_UP:
- return Qt::Key_PageUp;
-
- case KEYCODE_KP_LEFT:
- return Qt::Key_Left;
-
- // Is this right?
- case KEYCODE_KP_FIVE:
- return Qt::Key_5;
-
- case KEYCODE_KP_RIGHT:
- return Qt::Key_Right;
-
- case KEYCODE_KP_END:
- return Qt::Key_End;
-
- case KEYCODE_KP_DOWN:
- return Qt::Key_Down;
-
- case KEYCODE_KP_PG_DOWN:
- return Qt::Key_PageDown;
-
- case KEYCODE_KP_INSERT:
- return Qt::Key_Insert;
-
- case KEYCODE_KP_DELETE:
- return Qt::Key_Delete;
-
- case KEYCODE_F1:
- return Qt::Key_F1;
-
- case KEYCODE_F2:
- return Qt::Key_F2;
-
- case KEYCODE_F3:
- return Qt::Key_F3;
-
- case KEYCODE_F4:
- return Qt::Key_F4;
-
- case KEYCODE_F5:
- return Qt::Key_F5;
-
- case KEYCODE_F6:
- return Qt::Key_F6;
-
- case KEYCODE_F7:
- return Qt::Key_F7;
-
- case KEYCODE_F8:
- return Qt::Key_F8;
-
- case KEYCODE_F9:
- return Qt::Key_F9;
-
- case KEYCODE_F10:
- return Qt::Key_F10;
-
- case KEYCODE_F11:
- return Qt::Key_F11;
-
- case KEYCODE_F12:
- return Qt::Key_F12;
+ case KEYCODE_ESCAPE: return Qt::Key_Escape;
+ case KEYCODE_BACKSPACE: return Qt::Key_Backspace;
+ case KEYCODE_TAB: return Qt::Key_Tab;
+ case KEYCODE_BACK_TAB: return Qt::Key_Backtab;
+ case KEYCODE_RETURN: return Qt::Key_Return;
+ case KEYCODE_CAPS_LOCK: return Qt::Key_CapsLock;
+ case KEYCODE_LEFT_SHIFT: return Qt::Key_Shift;
+ case KEYCODE_RIGHT_SHIFT: return Qt::Key_Shift;
+ case KEYCODE_LEFT_CTRL: return Qt::Key_Control;
+ case KEYCODE_RIGHT_CTRL: return Qt::Key_Control;
+ case KEYCODE_LEFT_ALT: return Qt::Key_Alt;
+ case KEYCODE_RIGHT_ALT: return Qt::Key_Alt;
+ case KEYCODE_MENU: return Qt::Key_Menu;
+ case KEYCODE_LEFT_HYPER: return Qt::Key_Hyper_L;
+ case KEYCODE_RIGHT_HYPER: return Qt::Key_Hyper_R;
+ case KEYCODE_INSERT: return Qt::Key_Insert;
+ case KEYCODE_HOME: return Qt::Key_Home;
+ case KEYCODE_PG_UP: return Qt::Key_PageUp;
+ case KEYCODE_DELETE: return Qt::Key_Delete;
+ case KEYCODE_END: return Qt::Key_End;
+ case KEYCODE_PG_DOWN: return Qt::Key_PageDown;
+ case KEYCODE_LEFT: return Qt::Key_Left;
+ case KEYCODE_RIGHT: return Qt::Key_Right;
+ case KEYCODE_UP: return Qt::Key_Up;
+ case KEYCODE_DOWN: return Qt::Key_Down;
+ case KEYCODE_NUM_LOCK: return Qt::Key_NumLock;
+ case KEYCODE_KP_PLUS: return Qt::Key_Plus;
+ case KEYCODE_KP_MINUS: return Qt::Key_Minus;
+ case KEYCODE_KP_MULTIPLY: return Qt::Key_Asterisk;
+ case KEYCODE_KP_DIVIDE: return Qt::Key_Slash;
+ case KEYCODE_KP_ENTER: return Qt::Key_Enter;
+ case KEYCODE_KP_HOME: return Qt::Key_Home;
+ case KEYCODE_KP_UP: return Qt::Key_Up;
+ case KEYCODE_KP_PG_UP: return Qt::Key_PageUp;
+ case KEYCODE_KP_LEFT: return Qt::Key_Left;
+ case KEYCODE_KP_FIVE: return Qt::Key_5;
+ case KEYCODE_KP_RIGHT: return Qt::Key_Right;
+ case KEYCODE_KP_END: return Qt::Key_End;
+ case KEYCODE_KP_DOWN: return Qt::Key_Down;
+ case KEYCODE_KP_PG_DOWN: return Qt::Key_PageDown;
+ case KEYCODE_KP_INSERT: return Qt::Key_Insert;
+ case KEYCODE_KP_DELETE: return Qt::Key_Delete;
+ case KEYCODE_F1: return Qt::Key_F1;
+ case KEYCODE_F2: return Qt::Key_F2;
+ case KEYCODE_F3: return Qt::Key_F3;
+ case KEYCODE_F4: return Qt::Key_F4;
+ case KEYCODE_F5: return Qt::Key_F5;
+ case KEYCODE_F6: return Qt::Key_F6;
+ case KEYCODE_F7: return Qt::Key_F7;
+ case KEYCODE_F8: return Qt::Key_F8;
+ case KEYCODE_F9: return Qt::Key_F9;
+ case KEYCODE_F10: return Qt::Key_F10;
+ case KEYCODE_F11: return Qt::Key_F11;
+ case KEYCODE_F12: return Qt::Key_F12;
// See keycodes.h for more, but these are all the basics. And printables are already included.
@@ -231,7 +120,21 @@ Qt::Key keyTranslator( int key )
break;
}
- return Qt::Key_Escape;
+ return Qt::Key_unknown;
+}
+
+QString keyStringForPrivateUseQnxKey( int key )
+{
+ switch (key) {
+ case KEYCODE_ESCAPE: return QStringLiteral("\x1B");
+ case KEYCODE_BACKSPACE: return QStringLiteral("\b");
+ case KEYCODE_TAB: return QStringLiteral("\t");
+ case KEYCODE_RETURN: return QStringLiteral("\r");
+ case KEYCODE_DELETE: return QStringLiteral("\x7F");
+ case KEYCODE_KP_ENTER: return QStringLiteral("\r");
+ }
+
+ return QString();
}
bool isKeypadKey( int key )
diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
index 3eebb9c742..3bd6a86b59 100644
--- a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
+++ b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
@@ -91,6 +91,9 @@ void *QQnxNativeInterface::nativeResourceForScreen(const QByteArray &resource, Q
void *QQnxNativeInterface::nativeResourceForIntegration(const QByteArray &resource)
{
+ if (resource == "screenContext")
+ return m_integration->screenContext();
+
return 0;
}
diff --git a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
index dc844189d1..0014ef8c6e 100644
--- a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
@@ -158,7 +158,7 @@ QQnxBuffer &QQnxRasterWindow::renderBuffer()
"Failed to clear window buffer");
}
- Q_SCREEN_CHECKERROR(screen_flush_blits(platformScreen->nativeContext(), 0),
+ Q_SCREEN_CHECKERROR(screen_flush_blits(platformScreen->nativeContext(), SCREEN_WAIT_IDLE),
"Failed to flush blits");
// Use the first available render buffer
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
index 5d230e2145..ff1133aaa7 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
@@ -58,6 +58,37 @@
#define qScreenEventDebug QT_NO_QDEBUG_MACRO
#endif
+static int qtKey(int virtualKey, QChar::Category category)
+{
+ if (Q_UNLIKELY(category == QChar::Other_NotAssigned))
+ return virtualKey;
+ else if (category == QChar::Other_PrivateUse)
+ return qtKeyForPrivateUseQnxKey(virtualKey);
+ else
+ return QChar::toUpper(virtualKey);
+}
+
+static QString keyString(int sym, QChar::Category category)
+{
+ if (Q_UNLIKELY(category == QChar::Other_NotAssigned)) {
+ return QString();
+ } else if (category == QChar::Other_PrivateUse) {
+ return keyStringForPrivateUseQnxKey(sym);
+ } else {
+ uint ucs4_sym = sym;
+ return QString::fromUcs4(&ucs4_sym, 1);
+ }
+}
+
+static QString capKeyString(int cap, int modifiers, int key)
+{
+ if (cap >= 0x20 && cap <= 0x0ff) {
+ if (modifiers & KEYMOD_CTRL)
+ return QChar((int)(key & 0x3f));
+ }
+ return QString();
+}
+
QT_BEGIN_NAMESPACE
QQnxScreenEventHandler::QQnxScreenEventHandler(QQnxIntegration *integration)
@@ -154,6 +185,13 @@ void QQnxScreenEventHandler::injectKeyboardEvent(int flags, int sym, int modifie
{
Q_UNUSED(scan);
+ if (!(flags & KEY_CAP_VALID))
+ return;
+
+ // Correct erroneous information.
+ if ((flags & KEY_SYM_VALID) && sym == static_cast<int>(0xFFFFFFFF))
+ flags &= ~(KEY_SYM_VALID);
+
Qt::KeyboardModifiers qtMod = Qt::NoModifier;
if (modifiers & KEYMOD_SHIFT)
qtMod |= Qt::ShiftModifier;
@@ -161,37 +199,20 @@ void QQnxScreenEventHandler::injectKeyboardEvent(int flags, int sym, int modifie
qtMod |= Qt::ControlModifier;
if (modifiers & KEYMOD_ALT)
qtMod |= Qt::AltModifier;
+ if (isKeypadKey(cap))
+ qtMod |= Qt::KeypadModifier;
- // determine event type
QEvent::Type type = (flags & KEY_DOWN) ? QEvent::KeyPress : QEvent::KeyRelease;
- // Check if the key cap is valid
- if (flags & KEY_CAP_VALID) {
- Qt::Key key;
- QString keyStr;
+ int virtualKey = (flags & KEY_SYM_VALID) ? sym : cap;
+ QChar::Category category = QChar::category(virtualKey);
+ int key = qtKey(virtualKey, category);
+ QString keyStr = (flags & KEY_SYM_VALID) ? keyString(sym, category) :
+ capKeyString(cap, modifiers, key);
- if (cap >= 0x20 && cap <= 0x0ff) {
- key = Qt::Key(std::toupper(cap)); // Qt expects the CAP to be upper case.
-
- if ( qtMod & Qt::ControlModifier ) {
- keyStr = QChar((int)(key & 0x3f));
- } else {
- if (flags & KEY_SYM_VALID)
- keyStr = QChar(sym);
- }
- } else if ((cap > 0x0ff && cap < UNICODE_PRIVATE_USE_AREA_FIRST) || cap > UNICODE_PRIVATE_USE_AREA_LAST) {
- key = (Qt::Key)cap;
- keyStr = QChar(sym);
- } else {
- if (isKeypadKey(cap))
- qtMod |= Qt::KeypadModifier; // Is this right?
- key = keyTranslator(cap);
- }
-
- QWindowSystemInterface::handleExtendedKeyEvent(QGuiApplication::focusWindow(), type, key, qtMod,
- scan, sym, modifiers, keyStr);
- qScreenEventDebug() << "Qt key t=" << type << ", k=" << key << ", s=" << keyStr;
- }
+ QWindowSystemInterface::handleExtendedKeyEvent(QGuiApplication::focusWindow(), type, key, qtMod,
+ scan, virtualKey, modifiers, keyStr);
+ qScreenEventDebug() << "Qt key t=" << type << ", k=" << key << ", s=" << keyStr;
}
void QQnxScreenEventHandler::setScreenEventThread(QQnxScreenEventThread *eventThread)
@@ -591,6 +612,10 @@ void QQnxScreenEventHandler::handlePropertyEvent(screen_event_t event)
case SCREEN_PROPERTY_FOCUS:
handleKeyboardFocusPropertyEvent(window);
break;
+ case SCREEN_PROPERTY_SIZE:
+ case SCREEN_PROPERTY_POSITION:
+ handleGeometryPropertyEvent(window);
+ break;
default:
// event ignored
qScreenEventDebug() << "Ignore property event for property: " << property;
@@ -617,6 +642,28 @@ void QQnxScreenEventHandler::handleKeyboardFocusPropertyEvent(screen_window_t wi
m_focusLostTimer = startTimer(50);
}
+void QQnxScreenEventHandler::handleGeometryPropertyEvent(screen_window_t window)
+{
+ int pos[2];
+ if (screen_get_window_property_iv(window, SCREEN_PROPERTY_POSITION, pos) != 0) {
+ qFatal("QQnx: failed to query window property, errno=%d", errno);
+ }
+
+ int size[2];
+ if (screen_get_window_property_iv(window, SCREEN_PROPERTY_SIZE, size) != 0) {
+ qFatal("QQnx: failed to query window property, errno=%d", errno);
+ }
+
+ QRect rect(pos[0], pos[1], size[0], size[1]);
+ QWindow *qtWindow = QQnxIntegration::window(window);
+ if (qtWindow) {
+ qtWindow->setGeometry(rect);
+ QWindowSystemInterface::handleGeometryChange(qtWindow, rect);
+ }
+
+ qScreenEventDebug() << qtWindow << "moved to" << rect;
+}
+
void QQnxScreenEventHandler::timerEvent(QTimerEvent *event)
{
if (event->timerId() == m_focusLostTimer) {
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.h b/src/plugins/platforms/qnx/qqnxscreeneventhandler.h
index d872f9b9aa..40697b7a09 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.h
+++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.h
@@ -85,6 +85,7 @@ private:
void handleDisplayEvent(screen_event_t event);
void handlePropertyEvent(screen_event_t event);
void handleKeyboardFocusPropertyEvent(screen_window_t window);
+ void handleGeometryPropertyEvent(screen_window_t window);
private:
enum {
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index 072012064f..98a4b261fd 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -246,14 +246,12 @@ struct QWindowsContextPrivate {
QScopedPointer<QWindowsTabletSupport> m_tabletSupport;
#endif
const HRESULT m_oleInitializeResult;
- const QByteArray m_eventType;
QWindow *m_lastActiveWindow = nullptr;
bool m_asyncExpose = false;
};
QWindowsContextPrivate::QWindowsContextPrivate()
: m_oleInitializeResult(OleInitialize(NULL))
- , m_eventType(QByteArrayLiteral("windows_generic_MSG"))
{
QWindowsContext::user32dll.init();
QWindowsContext::shcoredll.init();
@@ -866,6 +864,33 @@ static bool shouldHaveNonClientDpiScaling(const QWindow *window)
;
}
+static inline bool isInputMessage(UINT m)
+{
+ switch (m) {
+ case WM_IME_STARTCOMPOSITION:
+ case WM_IME_ENDCOMPOSITION:
+ case WM_IME_COMPOSITION:
+ case WM_TOUCH:
+ case WM_MOUSEHOVER:
+ case WM_MOUSELEAVE:
+ case WM_NCHITTEST:
+ case WM_NCMOUSEHOVER:
+ case WM_NCMOUSELEAVE:
+ case WM_SIZING:
+ case WM_MOVING:
+ case WM_SYSCOMMAND:
+ case WM_COMMAND:
+ case WM_DWMNCRENDERINGCHANGED:
+ case WM_PAINT:
+ return true;
+ default:
+ break;
+ }
+ return (m >= WM_MOUSEFIRST && m <= WM_MOUSELAST)
+ || (m >= WM_NCMOUSEMOVE && m <= WM_NCXBUTTONDBLCLK)
+ || (m >= WM_KEYFIRST && m <= WM_KEYLAST);
+}
+
/*!
\brief Main windows procedure registered for windows.
@@ -901,21 +926,14 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
QWindowsWindow *platformWindow = findPlatformWindow(hwnd);
*platformWindowPtr = platformWindow;
- // Run the native event filters.
- long filterResult = 0;
- QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance();
- if (dispatcher && dispatcher->filterNativeEvent(d->m_eventType, &msg, &filterResult)) {
- *result = LRESULT(filterResult);
+ // Run the native event filters. QTBUG-67095: Exclude input messages which are sent
+ // by QEventDispatcherWin32::processEvents()
+ if (!isInputMessage(msg.message) && filterNativeEvent(&msg, result))
+ return true;
+
+ if (platformWindow && filterNativeEvent(platformWindow->window(), &msg, result))
return true;
- }
- if (platformWindow) {
- filterResult = 0;
- if (QWindowSystemInterface::handleNativeEvent(platformWindow->window(), d->m_eventType, &msg, &filterResult)) {
- *result = LRESULT(filterResult);
- return true;
- }
- }
if (et & QtWindows::InputMethodEventFlag) {
QWindowsInputContext *windowsInputContext = ::windowsInputContext();
// Disable IME assuming this is a special implementation hooking into keyboard input.
@@ -1393,4 +1411,30 @@ extern "C" LRESULT QT_WIN_CALLBACK qWindowsWndProc(HWND hwnd, UINT message, WPAR
return result;
}
+
+static inline QByteArray nativeEventType() { return QByteArrayLiteral("windows_generic_MSG"); }
+
+// Send to QAbstractEventDispatcher
+bool QWindowsContext::filterNativeEvent(MSG *msg, LRESULT *result)
+{
+ QAbstractEventDispatcher *dispatcher = QAbstractEventDispatcher::instance();
+ long filterResult = 0;
+ if (dispatcher && dispatcher->filterNativeEvent(nativeEventType(), msg, &filterResult)) {
+ *result = LRESULT(filterResult);
+ return true;
+ }
+ return false;
+}
+
+// Send to QWindowSystemInterface
+bool QWindowsContext::filterNativeEvent(QWindow *window, MSG *msg, LRESULT *result)
+{
+ long filterResult = 0;
+ if (QWindowSystemInterface::handleNativeEvent(window, nativeEventType(), &msg, &filterResult)) {
+ *result = LRESULT(filterResult);
+ return true;
+ }
+ return false;
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h
index f2ec307be2..0a7f20ca83 100644
--- a/src/plugins/platforms/windows/qwindowscontext.h
+++ b/src/plugins/platforms/windows/qwindowscontext.h
@@ -212,6 +212,9 @@ public:
QTouchDevice *touchDevice() const;
+ static bool filterNativeEvent(MSG *msg, LRESULT *result);
+ static bool filterNativeEvent(QWindow *window, MSG *msg, LRESULT *result);
+
private:
void handleFocusEvent(QtWindows::WindowsEventType et, QWindowsWindow *w);
#ifndef QT_NO_CONTEXTMENU
diff --git a/src/plugins/platforms/windows/qwindowsdrag.cpp b/src/plugins/platforms/windows/qwindowsdrag.cpp
index 593ff3cef1..e427ee162a 100644
--- a/src/plugins/platforms/windows/qwindowsdrag.cpp
+++ b/src/plugins/platforms/windows/qwindowsdrag.cpp
@@ -56,6 +56,7 @@
#include <QtGui/QRasterWindow>
#include <QtGui/QGuiApplication>
#include <qpa/qwindowsysteminterface_p.h>
+#include <QtGui/private/qdnd_p.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/private/qhighdpiscaling_p.h>
diff --git a/src/plugins/platforms/windows/qwindowsdrag.h b/src/plugins/platforms/windows/qwindowsdrag.h
index 2b4ca2dce1..d934679488 100644
--- a/src/plugins/platforms/windows/qwindowsdrag.h
+++ b/src/plugins/platforms/windows/qwindowsdrag.h
@@ -44,6 +44,7 @@
#include "qwindowsinternalmimedata.h"
#include <qpa/qplatformdrag.h>
+#include <QtGui/qdrag.h>
#include <QtGui/QPixmap>
struct IDropTargetHelper;
diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
index b9dd2c557e..2dbca6047c 100644
--- a/src/plugins/platforms/windows/qwindowsinputcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
@@ -530,6 +530,14 @@ bool QWindowsInputContext::endComposition(HWND hwnd)
if (m_compositionContext.focusObject.isNull())
return false;
+ // QTBUG-58300: Ignore WM_IME_ENDCOMPOSITION when CTRL is pressed to prevent
+ // for example the text being cleared when pressing CTRL+A
+ if (m_locale.language() == QLocale::Korean
+ && QGuiApplication::queryKeyboardModifiers().testFlag(Qt::ControlModifier)) {
+ reset();
+ return true;
+ }
+
m_endCompositionRecursionGuard = true;
imeNotifyCancelComposition(m_compositionContext.hwnd);
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 287b65cd5d..0a9e8b9d91 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -552,7 +552,7 @@ QPlatformDrag *QWindowsIntegration::drag() const
{
return &d->m_drag;
}
-# endif // !QT_NO_DRAGANDDROP
+# endif // QT_CONFIG(draganddrop)
#endif // !QT_NO_CLIPBOARD
QPlatformInputContext * QWindowsIntegration::inputContext() const
diff --git a/src/plugins/platforms/windows/qwindowsinternalmimedata.h b/src/plugins/platforms/windows/qwindowsinternalmimedata.h
index a7df1ee6e0..a44f5b509c 100644
--- a/src/plugins/platforms/windows/qwindowsinternalmimedata.h
+++ b/src/plugins/platforms/windows/qwindowsinternalmimedata.h
@@ -42,7 +42,7 @@
#include <QtCore/qt_windows.h>
-#include <QtGui/private/qdnd_p.h> // QInternalMime
+#include <QtGui/private/qinternalmimedata_p.h>
#include <QtCore/QVariant>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index af62936a18..950d8ecd36 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -102,6 +102,7 @@ QWindowsKeyMapper::QWindowsKeyMapper()
QGuiApplication *app = static_cast<QGuiApplication *>(QGuiApplication::instance());
QObject::connect(app, &QGuiApplication::applicationStateChanged,
app, clearKeyRecorderOnApplicationInActive);
+ changeKeyboard();
}
QWindowsKeyMapper::~QWindowsKeyMapper()
@@ -317,9 +318,9 @@ static const uint KeyTbl[] = { // Keyboard mapping table
Qt::Key_9, // 105 0x69 VK_NUMPAD9 | Numeric keypad 9 key
Qt::Key_Asterisk, // 106 0x6A VK_MULTIPLY | Multiply key
Qt::Key_Plus, // 107 0x6B VK_ADD | Add key
- Qt::Key_Comma, // 108 0x6C VK_SEPARATOR | Separator key
+ Qt::Key_unknown, // 108 0x6C VK_SEPARATOR | Separator key (locale-dependent)
Qt::Key_Minus, // 109 0x6D VK_SUBTRACT | Subtract key
- Qt::Key_Period, // 110 0x6E VK_DECIMAL | Decimal key
+ Qt::Key_unknown, // 110 0x6E VK_DECIMAL | Decimal key (locale-dependent)
Qt::Key_Slash, // 111 0x6F VK_DIVIDE | Divide key
Qt::Key_F1, // 112 0x70 VK_F1 | F1 key
Qt::Key_F2, // 113 0x71 VK_F2 | F2 key
@@ -810,7 +811,7 @@ bool QWindowsKeyMapper::translateKeyEvent(QWindow *widget, HWND hwnd,
// Reset layout map when system keyboard layout is changed
if (msg.message == WM_INPUTLANGCHANGE) {
- deleteLayouts();
+ changeKeyboard();
return true;
}
@@ -830,7 +831,7 @@ bool QWindowsKeyMapper::translateKeyEvent(QWindow *widget, HWND hwnd,
if (PeekMessage(&peekedMsg, hwnd, 0, 0, PM_NOREMOVE) && peekedMsg.message == WM_DEADCHAR)
return true;
- return translateKeyEventInternal(widget, msg, false);
+ return translateKeyEventInternal(widget, msg, false, result);
}
bool QWindowsKeyMapper::translateMultimediaKeyEventInternal(QWindow *window, const MSG &msg)
@@ -854,15 +855,19 @@ bool QWindowsKeyMapper::translateMultimediaKeyEventInternal(QWindow *window, con
sendExtendedPressRelease(receiver, qtKey, Qt::KeyboardModifier(state), 0, 0, 0);
// QTBUG-43343: Make sure to return false if Qt does not handle the key, otherwise,
// the keys are not passed to the active media player.
+# if QT_CONFIG(shortcut)
const QKeySequence sequence(Qt::Modifier(state) + qtKey);
return QGuiApplicationPrivate::instance()->shortcutMap.hasShortcutForKeySequence(sequence);
+# else
+ return false;
+# endif
#else
Q_UNREACHABLE();
return false;
#endif
}
-bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &msg, bool /* grab */)
+bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &msg, bool /* grab */, LRESULT *lResult)
{
const UINT msgType = msg.message;
@@ -1056,6 +1061,10 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms
QChar uch;
if (PeekMessage(&wm_char, 0, charType, charType, PM_REMOVE)) {
+ if (QWindowsContext::filterNativeEvent(&wm_char, lResult))
+ return true;
+ if (receiver && QWindowsContext::filterNativeEvent(receiver, &wm_char, lResult))
+ return true;
// Found a ?_CHAR
uch = QChar(ushort(wm_char.wParam));
if (uch.isHighSurrogate()) {
@@ -1264,8 +1273,19 @@ QList<int> QWindowsKeyMapper::possibleKeys(const QKeyEvent *e) const
for (size_t i = 1; i < NumMods; ++i) {
Qt::KeyboardModifiers neededMods = ModsTbl[i];
quint32 key = kbItem.qtKey[i];
- if (key && key != baseKey && ((keyMods & neededMods) == neededMods))
- result << int(key + (keyMods & ~neededMods));
+ if (key && key != baseKey && ((keyMods & neededMods) == neededMods)) {
+ const Qt::KeyboardModifiers missingMods = keyMods & ~neededMods;
+ const int matchedKey = int(key) + missingMods;
+ const QList<int>::iterator it =
+ std::find_if(result.begin(), result.end(),
+ [key] (int k) { return (k & ~Qt::KeyboardModifierMask) == key; });
+ // QTBUG-67200: Use the match with the least modifiers (prefer
+ // Shift+9 over Alt + Shift + 9) resulting in more missing modifiers.
+ if (it == result.end())
+ result << matchedKey;
+ else if (missingMods > (*it & Qt::KeyboardModifierMask))
+ *it = matchedKey;
+ }
}
return result;
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.h b/src/plugins/platforms/windows/qwindowskeymapper.h
index 2657644780..c6b46b0c30 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.h
+++ b/src/plugins/platforms/windows/qwindowskeymapper.h
@@ -90,7 +90,7 @@ public:
QList<int> possibleKeys(const QKeyEvent *e) const;
private:
- bool translateKeyEventInternal(QWindow *receiver, const MSG &msg, bool grab);
+ bool translateKeyEventInternal(QWindow *receiver, const MSG &msg, bool grab, LRESULT *lResult);
bool translateMultimediaKeyEventInternal(QWindow *receiver, const MSG &msg);
void updateKeyMap(const MSG &msg);
diff --git a/src/plugins/platforms/windows/qwindowsmenu.cpp b/src/plugins/platforms/windows/qwindowsmenu.cpp
index b89e1b66a3..71802b9017 100644
--- a/src/plugins/platforms/windows/qwindowsmenu.cpp
+++ b/src/plugins/platforms/windows/qwindowsmenu.cpp
@@ -390,6 +390,7 @@ void QWindowsMenuItem::setChecked(bool isChecked)
menuItemSetChangeState(parentMenuHandle(), m_id, FALSE, m_checked, MF_CHECKED, MF_UNCHECKED);
}
+#if QT_CONFIG(shortcut)
void QWindowsMenuItem::setShortcut(const QKeySequence &shortcut)
{
qCDebug(lcQpaMenus) << __FUNCTION__ << '(' << shortcut << ')' << this;
@@ -399,6 +400,7 @@ void QWindowsMenuItem::setShortcut(const QKeySequence &shortcut)
if (m_parentMenu != nullptr)
updateText();
}
+#endif
void QWindowsMenuItem::setEnabled(bool enabled)
{
@@ -441,10 +443,12 @@ UINT QWindowsMenuItem::state() const
QString QWindowsMenuItem::nativeText() const
{
QString result = m_text;
+#if QT_CONFIG(shortcut)
if (!m_shortcut.isEmpty()) {
result += QLatin1Char('\t');
result += m_shortcut.toString(QKeySequence::NativeText);
}
+#endif
return result;
}
@@ -894,8 +898,10 @@ void QWindowsMenuItem::formatDebug(QDebug &d) const
d << ", subMenu=" << static_cast<const void *>(m_subMenu);
d << ", tag=" << showbase << hex
<< tag() << noshowbase << dec << ", id=" << m_id;
+#if QT_CONFIG(shortcut)
if (!m_shortcut.isEmpty())
d << ", shortcut=" << m_shortcut;
+#endif
if (m_visible)
d << " [visible]";
if (m_enabled)
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index 34e6041687..0439797a7d 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -40,7 +40,7 @@
#include "qwindowsmime.h"
#include "qwindowscontext.h"
-#include <QtGui/private/qdnd_p.h>
+#include <QtGui/private/qinternalmimedata_p.h>
#include <QtCore/QByteArrayMatcher>
#include <QtCore/QTextCodec>
#include <QtCore/QMap>
@@ -1255,7 +1255,7 @@ bool QBuiltInMimes::convertFromMime(const FORMATETC &formatetc, const QMimeData
} else {
#if QT_CONFIG(draganddrop)
data = QInternalMimeData::renderDataHelper(outFormats.value(getCf(formatetc)), mimeData);
-#endif //QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
}
return setData(data, pmedium);
}
@@ -1363,7 +1363,7 @@ bool QLastResortMimes::canConvertFromMime(const FORMATETC &formatetc, const QMim
Q_UNUSED(formatetc);
return formatetc.tymed & TYMED_HGLOBAL
&& formats.contains(formatetc.cfFormat);
-#endif //QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
}
bool QLastResortMimes::convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const
@@ -1376,7 +1376,7 @@ bool QLastResortMimes::convertFromMime(const FORMATETC &formatetc, const QMimeDa
Q_UNUSED(formatetc);
Q_UNUSED(pmedium);
return false;
-#endif //QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
}
QVector<FORMATETC> QLastResortMimes::formatsForMime(const QString &mimeType, const QMimeData * /*mimeData*/) const
@@ -1484,7 +1484,7 @@ QString QLastResortMimes::mimeForFormat(const FORMATETC &formatetc) const
format = clipFormat;
}
}
-#endif //QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
}
return format;
@@ -1559,7 +1559,7 @@ QVector<FORMATETC> QWindowsMimeConverter::allFormatsForMime(const QMimeData *mim
{
ensureInitialized();
QVector<FORMATETC> formatics;
-#ifdef QT_NO_DRAGANDDROP
+#if !QT_CONFIG(draganddrop)
Q_UNUSED(mimeData);
#else
formatics.reserve(20);
@@ -1568,7 +1568,7 @@ QVector<FORMATETC> QWindowsMimeConverter::allFormatsForMime(const QMimeData *mim
for (int i = m_mimes.size() - 1; i >= 0; --i)
formatics += m_mimes.at(i)->formatsForMime(formats.at(f), mimeData);
}
-#endif //QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
return formatics;
}
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
index 814291c54a..17851618b4 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
@@ -395,10 +395,24 @@ static bool isValidWheelReceiver(QWindow *candidate)
static void redirectWheelEvent(QWindow *window, const QPoint &globalPos, int delta,
Qt::Orientation orientation, Qt::KeyboardModifiers mods)
{
+ // Redirect wheel event to one of the following, in order of preference:
+ // 1) The window under mouse
+ // 2) The window receiving the event
// If a window is blocked by modality, it can't get the event.
- if (isValidWheelReceiver(window)) {
- QWindowSystemInterface::handleWheelEvent(window,
- QWindowsGeometryHint::mapFromGlobal(window, globalPos),
+
+ QWindow *receiver = QWindowsScreen::windowAt(globalPos, CWP_SKIPINVISIBLE);
+ while (receiver && receiver->flags().testFlag(Qt::WindowTransparentForInput))
+ receiver = receiver->parent();
+ bool handleEvent = true;
+ if (!isValidWheelReceiver(receiver)) {
+ receiver = window;
+ if (!isValidWheelReceiver(receiver))
+ handleEvent = false;
+ }
+
+ if (handleEvent) {
+ QWindowSystemInterface::handleWheelEvent(receiver,
+ QWindowsGeometryHint::mapFromGlobal(receiver, globalPos),
globalPos, delta, orientation, mods);
}
}
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index f1762146ec..a2883e2601 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1144,11 +1144,11 @@ void QWindowsWindow::initialize()
const Qt::WindowState state = w->windowState();
if (state != Qt::WindowMaximized && state != Qt::WindowFullScreen
&& creationContext->requestedGeometryIn != creationContext->obtainedGeometry) {
- QWindowSystemInterface::handleGeometryChange(w, creationContext->obtainedGeometry);
+ QWindowSystemInterface::handleGeometryChange<QWindowSystemInterface::SynchronousDelivery>(w, creationContext->obtainedGeometry);
}
QPlatformScreen *obtainedScreen = screenForGeometry(creationContext->obtainedGeometry);
if (obtainedScreen && screen() != obtainedScreen)
- QWindowSystemInterface::handleWindowScreenChanged(w, obtainedScreen->screen());
+ QWindowSystemInterface::handleWindowScreenChanged<QWindowSystemInterface::SynchronousDelivery>(w, obtainedScreen->screen());
}
}
@@ -1248,7 +1248,7 @@ void QWindowsWindow::setDropSiteEnabled(bool dropEnabled)
RevokeDragDrop(m_data.hwnd);
m_dropTarget = 0;
}
-#endif // !QT_NO_CLIPBOARD && !QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(clipboard) && QT_CONFIG(draganddrop)
}
// Returns topmost QWindowsWindow ancestor even if there are embedded windows in the chain.
diff --git a/src/plugins/platforms/winrt/qwinrtdrag.h b/src/plugins/platforms/winrt/qwinrtdrag.h
index 2371201507..3868c9f015 100644
--- a/src/plugins/platforms/winrt/qwinrtdrag.h
+++ b/src/plugins/platforms/winrt/qwinrtdrag.h
@@ -41,7 +41,8 @@
#include <QtCore/QLoggingCategory>
#include <QtCore/QMimeData>
-#include <QtGui/private/qdnd_p.h> // QInternalMime
+#include <QtGui/private/qdnd_p.h>
+#include <QtGui/private/qinternalmimedata_p.h>
#include <wrl.h>
diff --git a/src/plugins/platforms/winrt/qwinrtintegration.cpp b/src/plugins/platforms/winrt/qwinrtintegration.cpp
index 7a30c8d98b..c52207d23b 100644
--- a/src/plugins/platforms/winrt/qwinrtintegration.cpp
+++ b/src/plugins/platforms/winrt/qwinrtintegration.cpp
@@ -47,7 +47,7 @@
#include "qwinrteglcontext.h"
#include "qwinrttheme.h"
#include "qwinrtclipboard.h"
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
#include "qwinrtdrag.h"
#endif
@@ -308,12 +308,12 @@ QPlatformClipboard *QWinRTIntegration::clipboard() const
return d->clipboard;
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QPlatformDrag *QWinRTIntegration::drag() const
{
return QWinRTDrag::instance();
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
Qt::KeyboardModifiers QWinRTIntegration::queryKeyboardModifiers() const
{
diff --git a/src/plugins/platforms/winrt/qwinrtintegration.h b/src/plugins/platforms/winrt/qwinrtintegration.h
index e22532a266..d1a9b7edbd 100644
--- a/src/plugins/platforms/winrt/qwinrtintegration.h
+++ b/src/plugins/platforms/winrt/qwinrtintegration.h
@@ -97,7 +97,7 @@ public:
QPlatformInputContext *inputContext() const override;
QPlatformServices *services() const override;
QPlatformClipboard *clipboard() const override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QPlatformDrag *drag() const override;
#endif
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp
index e37aeb0bc5..531e843829 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.cpp
+++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp
@@ -42,7 +42,7 @@
#include "qwinrtbackingstore.h"
#include "qwinrtinputcontext.h"
#include "qwinrtcursor.h"
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
#include "qwinrtdrag.h"
#endif
#include "qwinrtwindow.h"
@@ -567,7 +567,7 @@ QWinRTScreen::QWinRTScreen()
ComPtr<Xaml::IUIElement> uiElement;
hr = canvas.As(&uiElement);
Q_ASSERT_SUCCEEDED(hr);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QWinRTDrag::instance()->setUiElement(uiElement);
#endif
hr = window->put_Content(uiElement.Get());
@@ -850,7 +850,7 @@ void QWinRTScreen::addWindow(QWindow *window)
handleExpose();
QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QWinRTDrag::instance()->setDropTarget(window);
#endif
}
@@ -869,7 +869,7 @@ void QWinRTScreen::removeWindow(QWindow *window)
QWindowSystemInterface::handleWindowActivated(nullptr, Qt::OtherFocusReason);
handleExpose();
QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (wasTopWindow)
QWinRTDrag::instance()->setDropTarget(topWindow());
#endif
diff --git a/src/plugins/platforms/winrt/winrt.pro b/src/plugins/platforms/winrt/winrt.pro
index 042b270cff..46371b4880 100644
--- a/src/plugins/platforms/winrt/winrt.pro
+++ b/src/plugins/platforms/winrt/winrt.pro
@@ -15,7 +15,6 @@ SOURCES = \
qwinrtbackingstore.cpp \
qwinrtclipboard.cpp \
qwinrtcursor.cpp \
- qwinrtdrag.cpp \
qwinrteglcontext.cpp \
qwinrteventdispatcher.cpp \
qwinrtfiledialoghelper.cpp \
@@ -33,7 +32,6 @@ HEADERS = \
qwinrtbackingstore.h \
qwinrtclipboard.h \
qwinrtcursor.h \
- qwinrtdrag.h \
qwinrteglcontext.h \
qwinrteventdispatcher.h \
qwinrtfiledialoghelper.h \
@@ -53,9 +51,9 @@ WINRT_SDK_VERSION = $$member($$list($$split(WINRT_SDK_VERSION_STRING, .)), 2)
lessThan(WINRT_SDK_VERSION, 14322): DEFINES += QT_WINRT_LIMITED_DRAGANDDROP
greaterThan(WINRT_SDK_VERSION, 14393): DEFINES += QT_WINRT_DISABLE_PHONE_COLORS
-contains(DEFINES, QT_NO_DRAGANDDROP) {
- SOURCES -= qwinrtdrag.cpp
- HEADERS -= qwinrtdrag.h
+qtConfig(draganddrop) {
+ SOURCES += qwinrtdrag.cpp
+ HEADERS += qwinrtdrag.h
}
PLUGIN_TYPE = platforms
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 444e3a7669..879d31f29a 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -46,7 +46,9 @@
#include "qxcbscreen.h"
#include "qxcbwindow.h"
#include "qxcbclipboard.h"
+#if QT_CONFIG(draganddrop)
#include "qxcbdrag.h"
+#endif
#include "qxcbwmsupport.h"
#include "qxcbnativeinterface.h"
#include "qxcbintegration.h"
@@ -604,7 +606,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
#ifndef QT_NO_CLIPBOARD
m_clipboard = new QXcbClipboard(this);
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
m_drag = new QXcbDrag(this);
#endif
@@ -648,7 +650,7 @@ QXcbConnection::~QXcbConnection()
#ifndef QT_NO_CLIPBOARD
delete m_clipboard;
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
delete m_drag;
#endif
if (m_reader && m_reader->isRunning()) {
@@ -1139,7 +1141,7 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
#if QT_CONFIG(draganddrop) || QT_CONFIG(clipboard)
xcb_selection_request_event_t *sr = reinterpret_cast<xcb_selection_request_event_t *>(event);
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (sr->selection == atom(QXcbAtom::XdndSelection))
m_drag->handleSelectionRequest(sr);
else
@@ -1802,7 +1804,7 @@ void QXcbConnection::handleClientMessageEvent(const xcb_client_message_event_t *
if (event->format != 32)
return;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (event->type == atom(QXcbAtom::XdndStatus)) {
drag()->handleStatus(event);
} else if (event->type == atom(QXcbAtom::XdndFinished)) {
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index d9321d94d0..583659ea81 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -424,7 +424,7 @@ public:
#ifndef QT_NO_CLIPBOARD
QXcbClipboard *clipboard() const { return m_clipboard; }
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QXcbDrag *drag() const { return m_drag; }
#endif
@@ -673,7 +673,7 @@ private:
#ifndef QT_NO_CLIPBOARD
QXcbClipboard *m_clipboard = nullptr;
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QXcbDrag *m_drag = nullptr;
#endif
QScopedPointer<QXcbWMSupport> m_wmSupport;
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
index 8d151b760b..b401100dd4 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -301,8 +301,10 @@ QXcbCursorCacheKey::QXcbCursorCacheKey(const QCursor &c)
QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)
: QXcbObject(conn), m_screen(screen), m_gtkCursorThemeInitialized(false)
{
+#if QT_CONFIG(cursor)
// see NUM_BITMAPS in libXcursor/src/xcursorint.h
m_bitmapCache.setMaxCost(8);
+#endif
if (cursorCount++)
return;
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
index 8ea0ebf966..c8ba33edf5 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -63,8 +63,6 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_DRAGANDDROP
-
//#define DND_DEBUG
#ifdef DND_DEBUG
#define DEBUG qDebug
@@ -1312,6 +1310,4 @@ QStringList QXcbDropData::formats_sys() const
return formats;
}
-#endif // QT_NO_DRAGANDDROP
-
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h
index 31f1c47d83..60287b717b 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.h
+++ b/src/plugins/platforms/xcb/qxcbdrag.h
@@ -55,9 +55,9 @@
#include <QtCore/QDebug>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(draganddrop);
-#ifndef QT_NO_DRAGANDDROP
+QT_BEGIN_NAMESPACE
class QWindow;
class QPlatformWindow;
@@ -173,8 +173,6 @@ private:
};
Q_DECLARE_TYPEINFO(QXcbDrag::Transaction, Q_MOVABLE_TYPE);
-#endif // QT_NO_DRAGANDDROP
-
QT_END_NAMESPACE
#endif
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 471287eb44..7b6fd844e0 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -46,7 +46,9 @@
#include "qxcbbackingstore.h"
#include "qxcbnativeinterface.h"
#include "qxcbclipboard.h"
+#if QT_CONFIG(draganddrop)
#include "qxcbdrag.h"
+#endif
#include "qxcbglintegration.h"
#ifndef QT_NO_SESSIONMANAGER
@@ -376,7 +378,7 @@ QPlatformClipboard *QXcbIntegration::clipboard() const
}
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QPlatformDrag *QXcbIntegration::drag() const
{
return m_connections.at(0)->drag();
diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h
index 186b6c5ddd..69e49cb7f6 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.h
+++ b/src/plugins/platforms/xcb/qxcbintegration.h
@@ -84,7 +84,7 @@ public:
#ifndef QT_NO_CLIPBOARD
QPlatformClipboard *clipboard() const override;
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QPlatformDrag *drag() const override;
#endif
diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp
index 58e2e8c0e6..7170d259fd 100644
--- a/src/plugins/platforms/xcb/qxcbmime.cpp
+++ b/src/plugins/platforms/xcb/qxcbmime.cpp
@@ -46,8 +46,6 @@
QT_BEGIN_NAMESPACE
-#if !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD))
-
QXcbMime::QXcbMime()
: QInternalMimeData()
{ }
@@ -320,6 +318,4 @@ xcb_atom_t QXcbMime::mimeAtomForFormat(QXcbConnection *connection, const QString
return 0;
}
-#endif // !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD))
-
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbmime.h b/src/plugins/platforms/xcb/qxcbmime.h
index 561631a377..f2136ec9f4 100644
--- a/src/plugins/platforms/xcb/qxcbmime.h
+++ b/src/plugins/platforms/xcb/qxcbmime.h
@@ -40,7 +40,7 @@
#ifndef QXCBMIME_H
#define QXCBMIME_H
-#include <private/qdnd_p.h>
+#include <QtGui/private/qinternalmimedata_p.h>
#include <QtGui/QClipboard>
@@ -49,8 +49,6 @@
QT_BEGIN_NAMESPACE
-#if !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD))
-
class QXcbMime : public QInternalMimeData {
Q_OBJECT
public:
@@ -67,9 +65,6 @@ public:
const QVector<xcb_atom_t> &atoms, QByteArray *requestedEncoding);
};
-#endif // !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD))
-
-
QT_END_NAMESPACE
#endif // QXCBMIME_H
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index df458e85d7..e1bd8eb752 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -750,7 +750,12 @@ void QXcbScreen::updateGeometry(const QRect &geometry, uint8_t rotation)
m_sizeMillimeters = sizeInMillimeters(geometry.size(), virtualDpi());
qreal dpi = geometry.width() / physicalSize().width() * qreal(25.4);
- m_pixelDensity = qMax(1, qRound(dpi/96));
+ qreal rawFactor = dpi/96;
+ int roundedFactor = qFloor(rawFactor);
+ // Round up for .8 and higher. This favors "small UI" over "large UI".
+ if (rawFactor - roundedFactor >= 0.8)
+ roundedFactor = qCeil(rawFactor);
+ m_pixelDensity = qMax(1, roundedFactor);
m_geometry = geometry;
m_availableGeometry = geometry & m_virtualDesktop->workArea();
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index f87da28ee0..731b00f8fd 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -49,7 +49,9 @@
#include "qxcbintegration.h"
#include "qxcbconnection.h"
#include "qxcbscreen.h"
+#if QT_CONFIG(draganddrop)
#include "qxcbdrag.h"
+#endif
#include "qxcbkeyboard.h"
#include "qxcbimage.h"
#include "qxcbwmsupport.h"
@@ -541,7 +543,7 @@ void QXcbWindow::create()
XSync(static_cast<Display*>(platformScreen->connection()->xlib_display()), false);
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
connection()->drag()->dndEnable(this, true);
#endif
@@ -1983,7 +1985,7 @@ void QXcbWindow::handleClientMessageEvent(const xcb_client_message_event_t *even
qCWarning(lcQpaXcb, "Unhandled WM_PROTOCOLS (%s)",
connection()->atomName(protocolAtom).constData());
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
} else if (event->type == atom(QXcbAtom::XdndEnter)) {
connection()->drag()->handleEnter(this, event);
} else if (event->type == atom(QXcbAtom::XdndPosition)) {
diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
index ffc8a29116..9c4797ac26 100644
--- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro
+++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
@@ -19,7 +19,6 @@ SOURCES = \
qxcbintegration.cpp \
qxcbkeyboard.cpp \
qxcbmime.cpp \
- qxcbdrag.cpp \
qxcbscreen.cpp \
qxcbwindow.cpp \
qxcbbackingstore.cpp \
@@ -35,7 +34,6 @@ HEADERS = \
qxcbconnection.h \
qxcbintegration.h \
qxcbkeyboard.h \
- qxcbdrag.h \
qxcbmime.h \
qxcbobject.h \
qxcbscreen.h \
@@ -49,6 +47,11 @@ HEADERS = \
qxcbsystemtraytracker.h \
qxcbxkbcommon.h
+qtConfig(draganddrop) {
+ SOURCES += qxcbdrag.cpp
+ HEADERS += qxcbdrag.h
+}
+
load(qt_build_paths)
DEFINES += QT_BUILD_XCB_PLUGIN
diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp
index 186084abd4..c31b326357 100644
--- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp
+++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp
@@ -210,7 +210,7 @@ void QFlatpakFileDialog::openPortal()
QRegularExpressionMatch match = regexp.match(filter);
if (match.hasMatch()) {
QString userVisibleName = match.captured(1);
- QStringList filterStrings = match.captured(2).split(QLatin1String(" "));
+ QStringList filterStrings = match.captured(2).split(QLatin1Char(' '), QString::SkipEmptyParts);
FilterConditionList filterConditions;
for (const QString &filterString : filterStrings) {
diff --git a/src/plugins/printsupport/cups/qcupsprintengine.cpp b/src/plugins/printsupport/cups/qcupsprintengine.cpp
index bd0d641e79..6c29a99705 100644
--- a/src/plugins/printsupport/cups/qcupsprintengine.cpp
+++ b/src/plugins/printsupport/cups/qcupsprintengine.cpp
@@ -276,7 +276,10 @@ void QCupsPrintEnginePrivate::changePrinter(const QString &newPrinter)
grayscale = m_printDevice.defaultColorMode() == QPrint::GrayScale;
// Get the equivalent page size for this printer as supported names may be different
- setPageSize(m_pageLayout.pageSize());
+ if (m_printDevice.supportedPageSize(m_pageLayout.pageSize()).isValid())
+ setPageSize(m_pageLayout.pageSize());
+ else
+ setPageSize(QPageSize(m_pageLayout.pageSize().size(QPageSize::Point), QPageSize::Point));
}
void QCupsPrintEnginePrivate::setPageSize(const QPageSize &pageSize)
diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
index d89051191c..6fbdef2695 100644
--- a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
+++ b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
@@ -323,7 +323,8 @@ public:
return false;
q->setLastError(QSqlError(QCoreApplication::translate("QIBaseDriver", msg),
- imsg, typ, int(sqlcode)));
+ imsg, typ,
+ sqlcode != -1 ? QString::number(sqlcode) : QString()));
return true;
}
diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
index 6375825720..2a770d0245 100644
--- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
+++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
@@ -55,7 +55,9 @@
#include <qcache.h>
#include <qregularexpression.h>
#endif
+#if QT_CONFIG(timezone)
#include <QTimeZone>
+#endif
#include <QScopedValueRollback>
#if defined Q_OS_WIN
@@ -438,8 +440,10 @@ static QString timespecToString(const QDateTime &dateTime)
return QStringLiteral("Z");
case Qt::OffsetFromUTC:
return secondsToOffset(dateTime.offsetFromUtc());
+#if QT_CONFIG(timezone)
case Qt::TimeZone:
return secondsToOffset(dateTime.timeZone().offsetFromUtc(dateTime));
+#endif
default:
return QString();
}
@@ -492,10 +496,10 @@ bool QSQLiteResult::exec()
#if (SQLITE_VERSION_NUMBER >= 3003011)
// In the case of the reuse of a named placeholder
- // We need to check explicitly that paramCount is greater than 1, as sqlite
+ // We need to check explicitly that paramCount is greater than or equal to 1, as sqlite
// can end up in a case where for virtual tables it returns 0 even though it
// has parameters
- if (paramCount > 1 && paramCount < values.count()) {
+ if (paramCount >= 1 && paramCount < values.count()) {
const auto countIndexes = [](int counter, const QVector<int> &indexList) {
return counter + indexList.length();
};
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index 569eeef0ff..95809906c1 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -121,7 +121,6 @@
#include <qwizard.h>
#endif
#include <qdebug.h>
-#include <qlibrary.h>
#if QT_CONFIG(datetimeedit)
#include <qdatetimeedit.h>
#endif
diff --git a/src/plugins/styles/mac/qmacstyle_mac_p_p.h b/src/plugins/styles/mac/qmacstyle_mac_p_p.h
index 4eac0a59d6..8c712e838a 100644
--- a/src/plugins/styles/mac/qmacstyle_mac_p_p.h
+++ b/src/plugins/styles/mac/qmacstyle_mac_p_p.h
@@ -110,7 +110,9 @@
#include <qstyleoption.h>
#include <qtextedit.h>
#include <qtextstream.h>
+#if QT_CONFIG(toolbar)
#include <qtoolbar.h>
+#endif
#if QT_CONFIG(toolbutton)
#include <qtoolbutton.h>
#endif
diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h b/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h
index b649426811..d66b17e9f8 100644
--- a/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h
+++ b/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h
@@ -75,7 +75,9 @@
#if QT_CONFIG(spinbox)
#include <qspinbox.h>
#endif
+#if QT_CONFIG(toolbar)
#include <qtoolbar.h>
+#endif
#if QT_CONFIG(combobox)
#include <qcombobox.h>
#endif
diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
index 733b3a9e9c..9d2e770191 100644
--- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
+++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
@@ -79,7 +79,9 @@
#if QT_CONFIG(pushbutton)
#include <qpushbutton.h>
#endif
+#if QT_CONFIG(toolbar)
#include <qtoolbar.h>
+#endif
#include <qlabel.h>
#include <qvarlengtharray.h>
#include <qdebug.h>
@@ -3311,12 +3313,12 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con
res = 160;
break;
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case PM_ToolBarHandleExtent:
res = int(QStyleHelper::dpiScaled(8.));
break;
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
case PM_DockWidgetSeparatorExtent:
case PM_DockWidgetTitleMargin:
res = int(QStyleHelper::dpiScaled(4.));
diff --git a/src/printsupport/dialogs/qabstractprintdialog.cpp b/src/printsupport/dialogs/qabstractprintdialog.cpp
index 71b5500bab..1a2aa7afac 100644
--- a/src/printsupport/dialogs/qabstractprintdialog.cpp
+++ b/src/printsupport/dialogs/qabstractprintdialog.cpp
@@ -45,11 +45,6 @@
QT_BEGIN_NAMESPACE
-// hack
-class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
-{
-};
-
/*!
\class QAbstractPrintDialog
\brief The QAbstractPrintDialog class provides a base implementation for
@@ -145,7 +140,7 @@ QAbstractPrintDialog::~QAbstractPrintDialog()
*/
void QPrintDialog::setOption(PrintDialogOption option, bool on)
{
- Q_D(QPrintDialog);
+ auto *d = static_cast<QAbstractPrintDialogPrivate *>(d_ptr.data());
if (!(d->options & option) != !on)
setOptions(d->options ^ option);
}
@@ -158,7 +153,7 @@ void QPrintDialog::setOption(PrintDialogOption option, bool on)
*/
bool QPrintDialog::testOption(PrintDialogOption option) const
{
- Q_D(const QPrintDialog);
+ auto *d = static_cast<const QAbstractPrintDialogPrivate *>(d_ptr.data());
return (d->options & option) != 0;
}
@@ -177,7 +172,7 @@ bool QPrintDialog::testOption(PrintDialogOption option) const
*/
void QPrintDialog::setOptions(PrintDialogOptions options)
{
- Q_D(QPrintDialog);
+ auto *d = static_cast<QAbstractPrintDialogPrivate *>(d_ptr.data());
PrintDialogOptions changed = (options ^ d->options);
if (!changed)
@@ -188,7 +183,7 @@ void QPrintDialog::setOptions(PrintDialogOptions options)
QPrintDialog::PrintDialogOptions QPrintDialog::options() const
{
- Q_D(const QPrintDialog);
+ auto *d = static_cast<const QAbstractPrintDialogPrivate *>(d_ptr.data());
return d->options;
}
@@ -464,7 +459,7 @@ void QAbstractPrintDialog::setOptionTabs(const QList<QWidget*> &tabs)
*/
void QPrintDialog::done(int result)
{
- Q_D(QPrintDialog);
+ auto *d = static_cast<QAbstractPrintDialogPrivate *>(d_ptr.data());
QDialog::done(result);
if (result == Accepted)
emit accepted(printer());
@@ -487,7 +482,7 @@ void QPrintDialog::done(int result)
*/
void QPrintDialog::open(QObject *receiver, const char *member)
{
- Q_D(QPrintDialog);
+ auto *d = static_cast<QAbstractPrintDialogPrivate *>(d_ptr.data());
connect(this, SIGNAL(accepted(QPrinter*)), receiver, member);
d->receiverToDisconnectOnClose = receiver;
d->memberToDisconnectOnClose = member;
diff --git a/src/printsupport/dialogs/qabstractprintdialog_p.h b/src/printsupport/dialogs/qabstractprintdialog_p.h
index a17a28f564..b646b74f34 100644
--- a/src/printsupport/dialogs/qabstractprintdialog_p.h
+++ b/src/printsupport/dialogs/qabstractprintdialog_p.h
@@ -69,16 +69,15 @@ class QAbstractPrintDialogPrivate : public QDialogPrivate
public:
QAbstractPrintDialogPrivate()
- : printer(nullptr), pd(nullptr), ownsPrinter(false)
+ : printer(nullptr), pd(nullptr)
, options(QAbstractPrintDialog::PrintToFile | QAbstractPrintDialog::PrintPageRange |
QAbstractPrintDialog::PrintCollateCopies | QAbstractPrintDialog::PrintShowPageSize),
- minPage(0), maxPage(INT_MAX)
+ minPage(0), maxPage(INT_MAX), ownsPrinter(false)
{
}
QPrinter *printer;
QPrinterPrivate *pd;
- bool ownsPrinter;
QPointer<QObject> receiverToDisconnectOnClose;
QByteArray memberToDisconnectOnClose;
@@ -88,6 +87,8 @@ public:
void setPrinter(QPrinter *newPrinter);
int minPage;
int maxPage;
+
+ bool ownsPrinter;
};
QT_END_NAMESPACE
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index caab7867dc..86daea3b02 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -146,7 +146,9 @@ private slots:
private:
friend class QUnixPrintWidgetPrivate;
+#if QT_CONFIG(cups)
QPrinter *m_printer;
+#endif
Ui::QPrintPropertiesWidget widget;
QDialogButtonBox *m_buttons;
#if QT_CONFIG(cupsjobwidget)
@@ -351,7 +353,9 @@ QPrintPropertiesDialog::QPrintPropertiesDialog(QPrinter *printer, QPrintDevice *
QPrinter::OutputFormat outputFormat, const QString &printerName,
QAbstractPrintDialog *parent)
: QDialog(parent)
+#if QT_CONFIG(cups)
, m_printer(printer)
+#endif
{
setWindowTitle(tr("Printer Properties"));
QVBoxLayout *lay = new QVBoxLayout(this);
diff --git a/src/printsupport/kernel/qprintengine_win.cpp b/src/printsupport/kernel/qprintengine_win.cpp
index a943d24cb1..6f263e5ea8 100644
--- a/src/printsupport/kernel/qprintengine_win.cpp
+++ b/src/printsupport/kernel/qprintengine_win.cpp
@@ -587,12 +587,9 @@ void QWin32PrintEngine::drawPixmap(const QRectF &targetRect,
QPixmap p = QPixmap::fromImage(img);
HBITMAP hbitmap = qt_pixmapToWinHBITMAP(p, HBitmapNoAlpha);
- HDC display_dc = GetDC(0);
- HDC hbitmap_hdc = CreateCompatibleDC(display_dc);
+ HDC hbitmap_hdc = CreateCompatibleDC(d->hdc);
HGDIOBJ null_bitmap = SelectObject(hbitmap_hdc, hbitmap);
- ReleaseDC(0, display_dc);
-
if (!StretchBlt(d->hdc, qRound(tposx - xform_offset_x), qRound(tposy - xform_offset_y), width, height,
hbitmap_hdc, 0, 0, p.width(), p.height(), SRCCOPY))
qErrnoWarning("QWin32PrintEngine::drawPixmap, StretchBlt failed");
@@ -620,13 +617,10 @@ void QWin32PrintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, cons
} else {
int dc_state = SaveDC(d->hdc);
- HDC display_dc = GetDC(0);
HBITMAP hbitmap = qt_pixmapToWinHBITMAP(pm, HBitmapNoAlpha);
- HDC hbitmap_hdc = CreateCompatibleDC(display_dc);
+ HDC hbitmap_hdc = CreateCompatibleDC(d->hdc);
HGDIOBJ null_bitmap = SelectObject(hbitmap_hdc, hbitmap);
- ReleaseDC(0, display_dc);
-
QRectF trect = d->painterMatrix.mapRect(r);
int tx = int(trect.left() * d->stretch_x + d->origin_x);
int ty = int(trect.top() * d->stretch_y + d->origin_y);
@@ -1234,7 +1228,10 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
if (printDevice.isValid()) {
d->m_printDevice = printDevice;
d->initialize();
- setProperty(PPK_QPageSize, pageSize);
+ if (d->m_printDevice.supportedPageSize(pageSize.value<QPageSize>()).isValid())
+ setProperty(PPK_QPageSize, pageSize);
+ else
+ setProperty(PPK_CustomPaperSize, pageSize.value<QPageSize>().size(QPageSize::Point));
setProperty(PPK_FullPage, QVariant(isFullPage));
setProperty(PPK_Orientation, orientation);
setProperty(PPK_QPageMargins, margins);
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 05feb87466..865f76c73a 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -1368,12 +1368,12 @@ QSqlRecord QSqlTableModel::record(int row) const
target fields are mapped by field name, not by position in
the record.
- Note that the generated flags in \a values are preserved
- and determine whether the corresponding fields are used when
- changes are submitted to the database. The caller should
- remember to set the generated flag to FALSE for fields
- where the database is meant to supply the value, such as an
- automatically incremented ID.
+ Note that the generated flags in \a values are preserved to
+ determine whether the corresponding fields are used when changes
+ are submitted to the database. By default, it is set to \c true
+ for all fields in a QSqlRecord. You must set the flag to \c false
+ using \l{QSqlRecord::}{setGenerated}(false) for any value in
+ \a values, to save changes back to the database.
For edit strategies OnFieldChange and OnRowChange, a row may
receive a change only if no other row has a cached change.
diff --git a/src/testlib/qabstractitemmodeltester.cpp b/src/testlib/qabstractitemmodeltester.cpp
index 18ae14be3a..e970be2c8d 100644
--- a/src/testlib/qabstractitemmodeltester.cpp
+++ b/src/testlib/qabstractitemmodeltester.cpp
@@ -4,9 +4,9 @@
** Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the test suite of the Qt Toolkit.
+** This file is part of the QtTest module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** $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
@@ -15,13 +15,24 @@
** 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 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** 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-3.0.html.
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/src/testlib/qabstractitemmodeltester.h b/src/testlib/qabstractitemmodeltester.h
index 706c0ac16f..07bc170a7a 100644
--- a/src/testlib/qabstractitemmodeltester.h
+++ b/src/testlib/qabstractitemmodeltester.h
@@ -3,9 +3,9 @@
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the test suite of the Qt Toolkit.
+** This file is part of the QtTest module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** $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
@@ -14,13 +14,24 @@
** 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 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** 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-3.0.html.
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/src/testlib/qtestsystem.h b/src/testlib/qtestsystem.h
index 79fe68004e..daa0d7aea0 100644
--- a/src/testlib/qtestsystem.h
+++ b/src/testlib/qtestsystem.h
@@ -112,23 +112,7 @@ namespace QTest
#ifdef QT_GUI_LIB
Q_REQUIRED_RESULT inline static bool qWaitForWindowActive(QWindow *window, int timeout = 5000)
{
- bool becameActive = qWaitFor([&]() { return window->isActive(); }, timeout);
-
- // Try ensuring the platform window receives the real position.
- // (i.e. that window->pos() reflects reality)
- // isActive() ( == FocusIn in case of X) does not guarantee this. It seems some WMs randomly
- // send the final ConfigureNotify (the one with the non-bogus 0,0 position) after the FocusIn.
- // If we just let things go, every mapTo/FromGlobal call the tests perform directly after
- // qWaitForWindowShown() will generate bogus results.
- if (becameActive) {
- int waitNo = 0; // 0, 0 might be a valid position after all, so do not wait for ever
- while (window->position().isNull()) {
- if (waitNo++ > timeout / 10)
- break;
- qWait(10);
- }
- }
- return window->isActive();
+ return qWaitFor([&]() { return window->isActive(); }, timeout);
}
Q_REQUIRED_RESULT inline static bool qWaitForWindowExposed(QWindow *window, int timeout = 5000)
diff --git a/src/testlib/qtesttable.cpp b/src/testlib/qtesttable.cpp
index 953495a18a..8d42668a5b 100644
--- a/src/testlib/qtesttable.cpp
+++ b/src/testlib/qtesttable.cpp
@@ -138,7 +138,7 @@ QTestData *QTestTable::testData(int index) const
return size_t(index) < d->dataList.size() ? d->dataList[index] : nullptr;
}
-class NamePredicate : public std::unary_function<QTestTablePrivate::Element, bool>
+class NamePredicate
{
public:
explicit NamePredicate(const char *needle) : m_needle(needle) {}
diff --git a/src/tools/qlalr/compress.cpp b/src/tools/qlalr/compress.cpp
index a486e68c4a..0ededbd920 100644
--- a/src/tools/qlalr/compress.cpp
+++ b/src/tools/qlalr/compress.cpp
@@ -37,7 +37,7 @@
#define QLALR_NO_CHECK_SORTED_TABLE
-struct _Fit: public std::binary_function<int, int, bool>
+struct _Fit
{
inline bool operator () (int a, int b) const
{
@@ -45,7 +45,7 @@ struct _Fit: public std::binary_function<int, int, bool>
}
};
-struct _PerfectMatch: public std::binary_function<int, int, bool>
+struct _PerfectMatch
{
inline bool operator () (int a, int b) const
{ return a == b; }
@@ -135,7 +135,7 @@ private:
const_iterator _M_endNonZeros;
};
-struct _SortUncompressedRow: public std::binary_function<UncompressedRow, UncompressedRow, bool>
+struct _SortUncompressedRow
{
inline bool operator () (const UncompressedRow &a, const UncompressedRow &b) const
{ return a.count (0) > b.count (0); }
diff --git a/src/tools/qlalr/cppgenerator.cpp b/src/tools/qlalr/cppgenerator.cpp
index ed0f53d43e..b14c73a8fe 100644
--- a/src/tools/qlalr/cppgenerator.cpp
+++ b/src/tools/qlalr/cppgenerator.cpp
@@ -186,7 +186,7 @@ void CppGenerator::operator () ()
else if (u < 0)
{
if (verbose)
- qout << "*** Warning. Found a reduce/reduce conflict in state " << q << " on token ``" << s << "'' between rule "
+ qout() << "*** Warning. Found a reduce/reduce conflict in state " << q << " on token ``" << s << "'' between rule "
<< r << " and " << -u << endl;
++reduce_reduce_conflict_count;
@@ -194,7 +194,7 @@ void CppGenerator::operator () ()
u = qMax (u, -r);
if (verbose)
- qout << "\tresolved using rule " << -u << endl;
+ qout() << "\tresolved using rule " << -u << endl;
}
else if (u > 0)
@@ -227,7 +227,7 @@ void CppGenerator::operator () ()
++shift_reduce_conflict_count;
if (verbose)
- qout << "*** Warning. Found a shift/reduce conflict in state " << q << " on token ``" << s << "'' with rule " << r << endl;
+ qout() << "*** Warning. Found a shift/reduce conflict in state " << q << " on token ``" << s << "'' with rule " << r << endl;
}
}
}
@@ -238,10 +238,10 @@ void CppGenerator::operator () ()
{
if (shift_reduce_conflict_count != grammar.expected_shift_reduce
|| reduce_reduce_conflict_count != grammar.expected_reduce_reduce)
- qerr << "*** Conflicts: " << shift_reduce_conflict_count << " shift/reduce, " << reduce_reduce_conflict_count << " reduce/reduce" << endl;
+ qerr() << "*** Conflicts: " << shift_reduce_conflict_count << " shift/reduce, " << reduce_reduce_conflict_count << " reduce/reduce" << endl;
if (verbose)
- qout << endl << "*** Conflicts: " << shift_reduce_conflict_count << " shift/reduce, " << reduce_reduce_conflict_count << " reduce/reduce" << endl
+ qout() << endl << "*** Conflicts: " << shift_reduce_conflict_count << " shift/reduce, " << reduce_reduce_conflict_count << " reduce/reduce" << endl
<< endl;
}
@@ -266,7 +266,7 @@ void CppGenerator::operator () ()
RulePointer rule = grammar.rules.begin () + i;
if (rule != grammar.goal)
- qerr << "*** Warning: Rule ``" << *rule << "'' is useless!" << endl;
+ qerr() << "*** Warning: Rule ``" << *rule << "'' is useless!" << endl;
}
}
diff --git a/src/tools/qlalr/lalr.cpp b/src/tools/qlalr/lalr.cpp
index 0ccf4c1588..ec960925aa 100644
--- a/src/tools/qlalr/lalr.cpp
+++ b/src/tools/qlalr/lalr.cpp
@@ -40,8 +40,17 @@
#define QLALR_NO_DEBUG_LOOKAHEADS
QT_BEGIN_NAMESPACE
-QTextStream qerr (stderr, QIODevice::WriteOnly);
-QTextStream qout (stdout, QIODevice::WriteOnly);
+QTextStream &qerr()
+{
+ static QTextStream result(stderr, QIODevice::WriteOnly);
+ return result;
+}
+
+QTextStream &qout()
+{
+ static QTextStream result(stdout, QIODevice::WriteOnly);
+ return result;
+}
bool operator < (Name a, Name b)
{
@@ -233,8 +242,9 @@ void Grammar::buildExtendedGrammar ()
non_terminals.insert (accept_symbol);
}
-struct Nullable: public std::unary_function<Name, bool>
+struct Nullable
{
+ typedef Name argument_type;
Automaton *_M_automaton;
Nullable (Automaton *aut):
@@ -303,7 +313,7 @@ void Automaton::buildNullables ()
}
#ifndef QLALR_NO_DEBUG_NULLABLES
- qerr << "nullables = {" << nullables << endl;
+ qerr() << "nullables = {" << nullables << endl;
#endif
}
@@ -446,7 +456,7 @@ void Automaton::buildLookbackSets ()
lookbacks.insert (item, Lookback (p, A));
#ifndef QLALR_NO_DEBUG_LOOKBACKS
- qerr << "*** (" << id (q) << ", " << *rule << ") lookback (" << id (p) << ", " << *A << ")" << endl;
+ qerr() << "*** (" << id (q) << ", " << *rule << ") lookback (" << id (p) << ", " << *A << ")" << endl;
#endif
}
}
@@ -477,7 +487,7 @@ void Automaton::buildDirectReads ()
#ifndef QLALR_NO_DEBUG_DIRECT_READS
for (QMap<Name, NameSet>::iterator dr = q->reads.begin (); dr != q->reads.end (); ++dr)
- qerr << "*** DR(" << id (q) << ", " << dr.key () << ") = " << dr.value () << endl;
+ qerr() << "*** DR(" << id (q) << ", " << dr.key () << ") = " << dr.value () << endl;
#endif
}
}
@@ -506,11 +516,11 @@ void Automaton::buildReadsDigraph ()
source->insertEdge (target);
#ifndef QLALR_NO_DEBUG_READS
- qerr << "*** ";
- dump (qerr, source);
- qerr << " reads ";
- dump (qerr, target);
- qerr << endl;
+ qerr() << "*** ";
+ dump (qerr(), source);
+ qerr() << " reads ";
+ dump (qerr(), target);
+ qerr() << endl;
#endif
}
}
@@ -545,7 +555,7 @@ void Automaton::visitReadNode (ReadNode node)
_M_reads_stack.push (node);
#ifndef QLALR_NO_DEBUG_INCLUDES
- // qerr << "*** Debug. visit node (" << id (node->data.state) << ", " << node->data.nt << ") N = " << N << endl;
+ // qerr() << "*** Debug. visit node (" << id (node->data.state) << ", " << node->data.nt << ") N = " << N << endl;
#endif
for (ReadsGraph::edge_iterator edge = node->begin (); edge != node->end (); ++edge)
@@ -625,7 +635,7 @@ void Automaton::buildIncludesDigraph ()
source->insertEdge (target);
#ifndef QLALR_NO_DEBUG_INCLUDES
- qerr << "*** (" << id (p) << ", " << *A << ") includes (" << id (pp) << ", " << *name << ")" << endl;
+ qerr() << "*** (" << id (p) << ", " << *A << ") includes (" << id (pp) << ", " << *name << ")" << endl;
#endif // QLALR_NO_DEBUG_INCLUDES
continue;
@@ -647,7 +657,7 @@ void Automaton::buildIncludesDigraph ()
source->insertEdge (target);
#ifndef QLALR_NO_DEBUG_INCLUDES
- qerr << "*** (" << id (p) << ", " << *A << ") includes (" << id (pp) << ", " << *name << ")" << endl;
+ qerr() << "*** (" << id (p) << ", " << *A << ") includes (" << id (pp) << ", " << *name << ")" << endl;
#endif // QLALR_NO_DEBUG_INCLUDES
}
}
@@ -664,7 +674,7 @@ void Automaton::visitIncludeNode (IncludeNode node)
_M_includes_stack.push (node);
#ifndef QLALR_NO_DEBUG_INCLUDES
- // qerr << "*** Debug. visit node (" << id (node->data.state) << ", " << node->data.nt << ") N = " << N << endl;
+ // qerr() << "*** Debug. visit node (" << id (node->data.state) << ", " << node->data.nt << ") N = " << N << endl;
#endif
for (IncludesGraph::edge_iterator edge = node->begin (); edge != node->end (); ++edge)
@@ -676,11 +686,11 @@ void Automaton::visitIncludeNode (IncludeNode node)
node->dfn = qMin (N, r->dfn);
#ifndef QLALR_NO_DEBUG_INCLUDES
- qerr << "*** Merge. follows";
- dump (qerr, node);
- qerr << " += follows";
- dump (qerr, r);
- qerr << endl;
+ qerr() << "*** Merge. follows";
+ dump (qerr(), node);
+ qerr() << " += follows";
+ dump (qerr(), r);
+ qerr() << endl;
#endif
NameSet &dst = node->data.state->follows [node->data.nt];
@@ -714,9 +724,9 @@ void Automaton::buildLookaheads ()
StatePointer q = lookback.state;
#ifndef QLALR_NO_DEBUG_LOOKAHEADS
- qerr << "(" << id (p) << ", " << *item->rule << ") lookbacks ";
- dump (qerr, lookback);
- qerr << " with follows (" << id (q) << ", " << lookback.nt << ") = " << q->follows [lookback.nt] << endl;
+ qerr() << "(" << id (p) << ", " << *item->rule << ") lookbacks ";
+ dump (qerr(), lookback);
+ qerr() << " with follows (" << id (q) << ", " << lookback.nt << ") = " << q->follows [lookback.nt] << endl;
#endif
lookaheads [item].insert (q->follows [lookback.nt].begin (), q->follows [lookback.nt].end ());
diff --git a/src/tools/qlalr/lalr.g b/src/tools/qlalr/lalr.g
index 5e335c5a3b..05d30c21fd 100644
--- a/src/tools/qlalr/lalr.g
+++ b/src/tools/qlalr/lalr.g
@@ -261,7 +261,7 @@ int Recognizer::nextToken()
if (ch == QLatin1Char ('"'))
inp ();
else
- qerr << _M_input_file << ":" << _M_line << ": Warning. Expected `\"'" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": Warning. Expected `\"'" << endl;
_M_current_value = text;
return (token = STRING_LITERAL);
@@ -314,7 +314,7 @@ int Recognizer::nextToken()
return (token = PREC);
else
{
- qerr << _M_input_file << ":" << _M_line << ": Unknown keyword `" << text << "'" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": Unknown keyword `" << text << "'" << endl;
exit (EXIT_FAILURE);
return (token = ERROR);
}
@@ -439,7 +439,7 @@ bool Recognizer::parse (const QString &input_file)
QFile file(_M_input_file);
if (! file.open(QFile::ReadOnly))
{
- qerr << "qlalr: no input file\n";
+ qerr() << "qlalr: no input file\n";
return false;
}
@@ -659,7 +659,7 @@ case $rule_number: {
if (_M_grammar->terminals.find (_M_current_rule->lhs) != _M_grammar->terminals.end ())
{
- qerr << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
return false;
}
@@ -683,7 +683,7 @@ case $rule_number: {
if (_M_grammar->terminals.find (_M_current_rule->lhs) != _M_grammar->terminals.end ())
{
- qerr << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
return false;
}
@@ -712,7 +712,7 @@ case $rule_number: {
Name tok = _M_grammar->intern (sym(2));
if (! _M_grammar->isTerminal (tok))
{
- qerr << _M_input_file << ":" << _M_line << ": `" << *tok << " is not a terminal symbol" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": `" << *tok << " is not a terminal symbol" << endl;
_M_current_rule->prec = _M_grammar->names.end ();
}
else
@@ -758,7 +758,7 @@ case $rule_number: {
}
}
- qerr << _M_input_file << ":" << _M_line << ": Syntax error" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": Syntax error" << endl;
return false;
}
diff --git a/src/tools/qlalr/lalr.h b/src/tools/qlalr/lalr.h
index b303b897d4..6a2baaa462 100644
--- a/src/tools/qlalr/lalr.h
+++ b/src/tools/qlalr/lalr.h
@@ -501,9 +501,8 @@ QTextStream &operator << (QTextStream &out, const Item &item);
QTextStream &operator << (QTextStream &out, const NameSet &ns);
QT_BEGIN_NAMESPACE
-// ... hmm
-extern QTextStream qerr;
-extern QTextStream qout;
+QTextStream &qerr();
+QTextStream &qout();
QT_END_NAMESPACE
#endif // LALR_H
diff --git a/src/tools/qlalr/main.cpp b/src/tools/qlalr/main.cpp
index c16bdcdf17..5971eb201d 100644
--- a/src/tools/qlalr/main.cpp
+++ b/src/tools/qlalr/main.cpp
@@ -44,7 +44,7 @@
static void help_me ()
{
- qerr << "Usage: qlalr [options] [input file name]" << endl
+ qerr() << "Usage: qlalr [options] [input file name]" << endl
<< endl
<< " --help, -h\t\tdisplay this help and exit" << endl
<< " --verbose, -v\t\tverbose output" << endl
@@ -91,7 +91,7 @@ int main (int argc, char *argv[])
file_name = arg;
else
- qerr << "*** Warning. Ignore argument `" << arg << "'" << endl;
+ qerr() << "*** Warning. Ignore argument `" << arg << "'" << endl;
}
if (file_name.isEmpty ())
@@ -108,13 +108,13 @@ int main (int argc, char *argv[])
if (grammar.rules.isEmpty ())
{
- qerr << "*** Fatal. No rules!" << endl;
+ qerr() << "*** Fatal. No rules!" << endl;
exit (EXIT_FAILURE);
}
else if (grammar.start == grammar.names.end ())
{
- qerr << "*** Fatal. No start symbol!" << endl;
+ qerr() << "*** Fatal. No start symbol!" << endl;
exit (EXIT_FAILURE);
}
@@ -131,13 +131,13 @@ int main (int argc, char *argv[])
if (generate_dot)
{
- DotGraph genDotFile (qout);
+ DotGraph genDotFile (qout());
genDotFile (&aut);
}
else if (generate_report)
{
- ParseTable genParseTable (qout);
+ ParseTable genParseTable (qout());
genParseTable(&aut);
}
diff --git a/src/tools/qlalr/recognizer.cpp b/src/tools/qlalr/recognizer.cpp
index 8c7665f1b9..ab797c85d0 100644
--- a/src/tools/qlalr/recognizer.cpp
+++ b/src/tools/qlalr/recognizer.cpp
@@ -97,7 +97,7 @@ int Recognizer::nextToken()
if (ch == QLatin1Char ('"'))
inp ();
else
- qerr << _M_input_file << ":" << _M_line << ": Warning. Expected `\"'" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": Warning. Expected `\"'" << endl;
_M_current_value = text;
return (token = STRING_LITERAL);
@@ -150,7 +150,7 @@ int Recognizer::nextToken()
return (token = PREC);
else
{
- qerr << _M_input_file << ":" << _M_line << ": Unknown keyword `" << text << "'" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": Unknown keyword `" << text << "'" << endl;
exit (EXIT_FAILURE);
return (token = ERROR);
}
@@ -275,7 +275,7 @@ bool Recognizer::parse (const QString &input_file)
QFile file(_M_input_file);
if (! file.open(QFile::ReadOnly))
{
- qerr << "qlalr: no input file\n";
+ qerr() << "qlalr: no input file\n";
return false;
}
@@ -405,7 +405,7 @@ case 34: {
if (_M_grammar->terminals.find (_M_current_rule->lhs) != _M_grammar->terminals.end ())
{
- qerr << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
return false;
}
@@ -420,7 +420,7 @@ case 38: {
if (_M_grammar->terminals.find (_M_current_rule->lhs) != _M_grammar->terminals.end ())
{
- qerr << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
return false;
}
@@ -443,7 +443,7 @@ case 40: {
Name tok = _M_grammar->intern (sym(2));
if (! _M_grammar->isTerminal (tok))
{
- qerr << _M_input_file << ":" << _M_line << ": `" << *tok << " is not a terminal symbol" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": `" << *tok << " is not a terminal symbol" << endl;
_M_current_rule->prec = _M_grammar->names.end ();
}
else
@@ -474,7 +474,7 @@ case 43: {
}
}
- qerr << _M_input_file << ":" << _M_line << ": Syntax error" << endl;
+ qerr() << _M_input_file << ":" << _M_line << ": Syntax error" << endl;
return false;
}
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index cf1119254b..99946d341d 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -45,7 +45,9 @@
#include "qdrawutil.h"
#include "qevent.h"
#include "qimage.h"
-#include "qdrag.h"
+#if QT_CONFIG(draganddrop)
+#include <qdrag.h>
+#endif
#include "qlabel.h"
#include "qlayout.h"
#include "qlineedit.h"
@@ -592,7 +594,7 @@ protected:
void mousePressEvent(QMouseEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void dragEnterEvent(QDragEnterEvent *e) override;
void dragLeaveEvent(QDragLeaveEvent *e) override;
void dragMoveEvent(QDragMoveEvent *e) override;
@@ -624,7 +626,7 @@ void QColorWell::mousePressEvent(QMouseEvent *e)
void QColorWell::mouseMoveEvent(QMouseEvent *e)
{
QWellArray::mouseMoveEvent(e);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (!mousePressed)
return;
if ((pressPos - e->pos()).manhattanLength() > QApplication::startDragDistance()) {
@@ -647,7 +649,7 @@ void QColorWell::mouseMoveEvent(QMouseEvent *e)
#endif
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void QColorWell::dragEnterEvent(QDragEnterEvent *e)
{
if (qvariant_cast<QColor>(e->mimeData()->colorData()).isValid())
@@ -684,7 +686,7 @@ void QColorWell::dropEvent(QDropEvent *e)
}
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
void QColorWell::mouseReleaseEvent(QMouseEvent *e)
{
@@ -1072,7 +1074,7 @@ protected:
void mousePressEvent(QMouseEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void dragEnterEvent(QDragEnterEvent *e) override;
void dragLeaveEvent(QDragLeaveEvent *e) override;
void dropEvent(QDropEvent *e) override;
@@ -1110,7 +1112,7 @@ void QColorShowLabel::mousePressEvent(QMouseEvent *e)
void QColorShowLabel::mouseMoveEvent(QMouseEvent *e)
{
-#ifdef QT_NO_DRAGANDDROP
+#if !QT_CONFIG(draganddrop)
Q_UNUSED(e);
#else
if (!mousePressed)
@@ -1132,7 +1134,7 @@ void QColorShowLabel::mouseMoveEvent(QMouseEvent *e)
#endif
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void QColorShowLabel::dragEnterEvent(QDragEnterEvent *e)
{
if (qvariant_cast<QColor>(e->mimeData()->colorData()).isValid())
@@ -1157,7 +1159,7 @@ void QColorShowLabel::dropEvent(QDropEvent *e)
e->ignore();
}
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
void QColorShowLabel::mouseReleaseEvent(QMouseEvent *)
{
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index b49a76cbda..e59666ea43 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -3945,7 +3945,7 @@ void QFileDialogListView::setFileDialogPrivate(QFileDialogPrivate *d_pointer)
setResizeMode(QListView::Adjust);
setEditTriggers(QAbstractItemView::EditKeyPressed);
setContextMenuPolicy(Qt::CustomContextMenu);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
setDragDropMode(QAbstractItemView::InternalMove);
#endif
}
@@ -3986,7 +3986,7 @@ void QFileDialogTreeView::setFileDialogPrivate(QFileDialogPrivate *d_pointer)
setTextElideMode(Qt::ElideMiddle);
setEditTriggers(QAbstractItemView::EditKeyPressed);
setContextMenuPolicy(Qt::CustomContextMenu);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
setDragDropMode(QAbstractItemView::InternalMove);
#endif
}
diff --git a/src/widgets/dialogs/qsidebar.cpp b/src/widgets/dialogs/qsidebar.cpp
index f77b10ecbc..d52f18b406 100644
--- a/src/widgets/dialogs/qsidebar.cpp
+++ b/src/widgets/dialogs/qsidebar.cpp
@@ -118,7 +118,7 @@ QMimeData *QUrlModel::mimeData(const QModelIndexList &indexes) const
return data;
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
Decide based upon the data if it should be accepted or not
@@ -154,7 +154,7 @@ bool QUrlModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
return true;
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*!
\reimp
@@ -391,7 +391,7 @@ void QSidebar::setModelAndUrls(QFileSystemModel *model, const QList<QUrl> &newUr
connect(selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
this, SLOT(clicked(QModelIndex)));
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
setDragDropMode(QAbstractItemView::DragDrop);
#endif
setContextMenuPolicy(Qt::CustomContextMenu);
@@ -405,13 +405,13 @@ QSidebar::~QSidebar()
{
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void QSidebar::dragEnterEvent(QDragEnterEvent *event)
{
if (urlModel->canDrop(event))
QListView::dragEnterEvent(event);
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
QSize QSidebar::sizeHint() const
{
diff --git a/src/widgets/dialogs/qsidebar_p.h b/src/widgets/dialogs/qsidebar_p.h
index 07aaa5abd2..4a82f88878 100644
--- a/src/widgets/dialogs/qsidebar_p.h
+++ b/src/widgets/dialogs/qsidebar_p.h
@@ -86,7 +86,7 @@ public:
QStringList mimeTypes() const override;
QMimeData *mimeData(const QModelIndexList &indexes) const override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
bool canDrop(QDragEnterEvent *event);
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
#endif
@@ -142,7 +142,7 @@ public:
protected:
bool event(QEvent * e) override;
void focusInEvent(QFocusEvent *event) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void dragEnterEvent(QDragEnterEvent *event) override;
#endif
diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp
index 6f0e436ae0..5ef304c9f1 100644
--- a/src/widgets/dialogs/qwizard_win.cpp
+++ b/src/widgets/dialogs/qwizard_win.cpp
@@ -79,7 +79,9 @@ QVistaBackButton::QVistaBackButton(QWidget *widget)
{
setFocusPolicy(Qt::NoFocus);
// Native dialogs use ALT-Left even in RTL mode, so do the same, even if it might be counter-intuitive.
+#if QT_CONFIG(shortcut)
setShortcut(QKeySequence(Qt::ALT | Qt::Key_Left));
+#endif
}
QSize QVistaBackButton::sizeHint() const
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
index 442f08325d..177dbc4871 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
@@ -1050,13 +1050,13 @@ void QGraphicsProxyWidget::contextMenuEvent(QGraphicsSceneContextMenuEvent *even
}
#endif // QT_NO_CONTEXTMENU
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
\reimp
*/
void QGraphicsProxyWidget::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
{
-#ifdef QT_NO_DRAGANDDROP
+#if !QT_CONFIG(draganddrop)
Q_UNUSED(event);
#else
Q_D(QGraphicsProxyWidget);
@@ -1077,7 +1077,7 @@ void QGraphicsProxyWidget::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
void QGraphicsProxyWidget::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
{
Q_UNUSED(event);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
Q_D(QGraphicsProxyWidget);
if (!d->widget || !d->dragDropWidget)
return;
@@ -1092,7 +1092,7 @@ void QGraphicsProxyWidget::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
*/
void QGraphicsProxyWidget::dragMoveEvent(QGraphicsSceneDragDropEvent *event)
{
-#ifdef QT_NO_DRAGANDDROP
+#if !QT_CONFIG(draganddrop)
Q_UNUSED(event);
#else
Q_D(QGraphicsProxyWidget);
@@ -1158,7 +1158,7 @@ void QGraphicsProxyWidget::dragMoveEvent(QGraphicsSceneDragDropEvent *event)
*/
void QGraphicsProxyWidget::dropEvent(QGraphicsSceneDragDropEvent *event)
{
-#ifdef QT_NO_DRAGANDDROP
+#if !QT_CONFIG(draganddrop)
Q_UNUSED(event);
#else
Q_D(QGraphicsProxyWidget);
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.h b/src/widgets/graphicsview/qgraphicsproxywidget.h
index 76fdf8aeba..aa51500ecb 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.h
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.h
@@ -85,7 +85,7 @@ protected:
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void dragEnterEvent(QGraphicsSceneDragDropEvent *event) override;
void dragLeaveEvent(QGraphicsSceneDragDropEvent *event) override;
void dragMoveEvent(QGraphicsSceneDragDropEvent *event) override;
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index 0c847b899e..f79ee41e10 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -850,7 +850,7 @@ void QGraphicsViewPrivate::storeDragDropEvent(const QGraphicsSceneDragDropEvent
void QGraphicsViewPrivate::populateSceneDragDropEvent(QGraphicsSceneDragDropEvent *dest,
QDropEvent *source)
{
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
Q_Q(QGraphicsView);
dest->setScenePos(q->mapToScene(source->pos()));
dest->setScreenPos(q->mapToGlobal(source->pos()));
diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp
index 117de8edf9..c9f321c3f6 100644
--- a/src/widgets/itemviews/qabstractitemdelegate.cpp
+++ b/src/widgets/itemviews/qabstractitemdelegate.cpp
@@ -63,9 +63,11 @@
#include <private/qabstractitemdelegate_p.h>
#include <qpa/qplatformintegration.h>
+#if QT_CONFIG(draganddrop)
#include <qpa/qplatformdrag.h>
-#include <private/qguiapplication_p.h>
#include <private/qdnd_p.h>
+#endif
+#include <private/qguiapplication_p.h>
QT_BEGIN_NAMESPACE
@@ -515,7 +517,7 @@ bool QAbstractItemDelegatePrivate::editorEventFilter(QObject *object, QEvent *ev
return false;
w = w->parentWidget();
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
// The window may lose focus during an drag operation.
// i.e when dragging involves the taskbar on Windows.
QPlatformDrag *platformDrag = QGuiApplicationPrivate::instance()->platformIntegration()->drag();
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index a07297863d..02eae33a12 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -44,7 +44,9 @@
#include <qclipboard.h>
#include <qpainter.h>
#include <qstyle.h>
+#if QT_CONFIG(draganddrop)
#include <qdrag.h>
+#endif
#include <qevent.h>
#include <qscrollbar.h>
#include <qtooltip.h>
@@ -90,7 +92,7 @@ QAbstractItemViewPrivate::QAbstractItemViewPrivate()
editTriggers(QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed),
lastTrigger(QAbstractItemView::NoEditTriggers),
tabKeyNavigation(false),
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
showDropIndicator(true),
dragEnabled(false),
dragDropMode(QAbstractItemView::NoDragDrop),
@@ -1325,7 +1327,7 @@ void QAbstractItemView::resetHorizontalScrollMode()
d_func()->horizontalScrollModeSet = false;
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
\since 4.2
\property QAbstractItemView::dragDropOverwriteMode
@@ -1432,7 +1434,7 @@ QSize QAbstractItemView::viewportSizeHint() const
return QAbstractScrollArea::viewportSizeHint();
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
\property QAbstractItemView::showDropIndicator
\brief whether the drop indicator is shown when dragging items and dropping.
@@ -1551,7 +1553,7 @@ Qt::DropAction QAbstractItemView::defaultDropAction() const
return d->defaultDropAction;
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*!
\property QAbstractItemView::alternatingRowColors
@@ -1828,7 +1830,7 @@ void QAbstractItemView::mouseMoveEvent(QMouseEvent *event)
if (state() == ExpandingState || state() == CollapsingState)
return;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (state() == DraggingState) {
topLeft = d->pressedPosition - d->offset();
if ((topLeft - bottomRight).manhattanLength() > QApplication::startDragDistance()) {
@@ -1839,7 +1841,7 @@ void QAbstractItemView::mouseMoveEvent(QMouseEvent *event)
}
return;
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
QPersistentModelIndex index = indexAt(bottomRight);
QModelIndex buddy = d->model->buddy(d->pressedIndex);
@@ -1854,7 +1856,7 @@ void QAbstractItemView::mouseMoveEvent(QMouseEvent *event)
d->checkMouseMove(index);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (d->pressedIndex.isValid()
&& d->dragEnabled
&& (state() != DragSelectingState)
@@ -1962,7 +1964,7 @@ void QAbstractItemView::mouseDoubleClickEvent(QMouseEvent *event)
emit activated(persistent);
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
This function is called with the given \a event when a drag and drop operation enters
@@ -2216,7 +2218,7 @@ QAbstractItemViewPrivate::position(const QPoint &pos, const QRect &rect, const Q
return r;
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*!
This function is called with the given \a event when the widget obtains the focus.
@@ -2567,7 +2569,7 @@ void QAbstractItemView::inputMethodEvent(QInputMethodEvent *event)
}
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
\enum QAbstractItemView::DropIndicatorPosition
@@ -3667,7 +3669,7 @@ void QAbstractItemView::currentChanged(const QModelIndex &current, const QModelI
setAttribute(Qt::WA_InputMethodEnabled, (current.isValid() && (current.flags() & Qt::ItemIsEditable)));
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
Starts a drag by calling drag->exec() using the given \a supportedActions.
*/
@@ -3698,7 +3700,7 @@ void QAbstractItemView::startDrag(Qt::DropActions supportedActions)
d->dropIndicatorPosition = OnItem;
}
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*!
Returns a QStyleOptionViewItem structure populated with the view's
@@ -3911,7 +3913,7 @@ void QAbstractItemView::doAutoScroll()
if (verticalUnchanged && horizontalUnchanged) {
stopAutoScroll();
} else {
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
d->dropIndicatorRect = QRect();
d->dropIndicatorPosition = QAbstractItemView::OnViewport;
#endif
@@ -4286,7 +4288,7 @@ void QAbstractItemViewPrivate::updateEditorData(const QModelIndex &tl, const QMo
*/
void QAbstractItemViewPrivate::clearOrRemove()
{
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
const QItemSelection selection = selectionModel->selection();
QList<QItemSelectionRange>::const_iterator it = selection.constBegin();
diff --git a/src/widgets/itemviews/qabstractitemview.h b/src/widgets/itemviews/qabstractitemview.h
index 8a138bdb67..981582c166 100644
--- a/src/widgets/itemviews/qabstractitemview.h
+++ b/src/widgets/itemviews/qabstractitemview.h
@@ -65,7 +65,7 @@ class Q_WIDGETS_EXPORT QAbstractItemView : public QAbstractScrollArea
Q_PROPERTY(int autoScrollMargin READ autoScrollMargin WRITE setAutoScrollMargin)
Q_PROPERTY(EditTriggers editTriggers READ editTriggers WRITE setEditTriggers)
Q_PROPERTY(bool tabKeyNavigation READ tabKeyNavigation WRITE setTabKeyNavigation)
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
Q_PROPERTY(bool showDropIndicator READ showDropIndicator WRITE setDropIndicatorShown)
Q_PROPERTY(bool dragEnabled READ dragEnabled WRITE setDragEnabled)
Q_PROPERTY(bool dragDropOverwriteMode READ dragDropOverwriteMode WRITE setDragDropOverwriteMode)
@@ -165,7 +165,7 @@ public:
void setTabKeyNavigation(bool enable);
bool tabKeyNavigation() const;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void setDropIndicatorShown(bool enable);
bool showDropIndicator() const;
@@ -297,7 +297,7 @@ protected:
virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex &index,
const QEvent *event = nullptr) const;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
virtual void startDrag(Qt::DropActions supportedActions);
#endif
@@ -334,7 +334,7 @@ protected:
void mouseMoveEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
void mouseDoubleClickEvent(QMouseEvent *event) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void dragEnterEvent(QDragEnterEvent *event) override;
void dragMoveEvent(QDragMoveEvent *event) override;
void dragLeaveEvent(QDragLeaveEvent *event) override;
@@ -348,7 +348,7 @@ protected:
void inputMethodEvent(QInputMethodEvent *event) override;
bool eventFilter(QObject *object, QEvent *event) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
enum DropIndicatorPosition { OnItem, AboveItem, BelowItem, OnViewport };
DropIndicatorPosition dropIndicatorPosition() const;
#endif
diff --git a/src/widgets/itemviews/qabstractitemview_p.h b/src/widgets/itemviews/qabstractitemview_p.h
index d8af96af55..fe1c00248f 100644
--- a/src/widgets/itemviews/qabstractitemview_p.h
+++ b/src/widgets/itemviews/qabstractitemview_p.h
@@ -130,7 +130,7 @@ public:
}
void stopAutoScroll() { autoScrollTimer.stop(); autoScrollCount = 0;}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
virtual bool dropOn(QDropEvent *event, int *row, int *col, QModelIndex *index);
#endif
bool droppingOnItself(QDropEvent *event, const QModelIndex &index);
@@ -162,7 +162,7 @@ public:
}
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
virtual QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const;
inline bool canDrop(QDropEvent *event) {
@@ -400,7 +400,7 @@ public:
bool tabKeyNavigation;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
bool showDropIndicator;
QRect dropIndicatorRect;
bool dragEnabled;
diff --git a/src/widgets/itemviews/qcolumnview.cpp b/src/widgets/itemviews/qcolumnview.cpp
index d94f25de78..5100d2a427 100644
--- a/src/widgets/itemviews/qcolumnview.cpp
+++ b/src/widgets/itemviews/qcolumnview.cpp
@@ -772,7 +772,7 @@ void QColumnView::initializeColumn(QAbstractItemView *column) const
column->setMinimumWidth(100);
column->setAttribute(Qt::WA_MacShowFocusRect, false);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
column->setDragDropMode(dragDropMode());
column->setDragDropOverwriteMode(dragDropOverwriteMode());
column->setDropIndicatorShown(showDropIndicator());
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index 6777b09043..a7174a92e8 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -44,7 +44,9 @@
#include <qapplication.h>
#include <qpainter.h>
#include <qbitmap.h>
+#if QT_CONFIG(draganddrop)
#include <qdrag.h>
+#endif
#include <qvector.h>
#include <qstyle.h>
#include <qevent.h>
@@ -230,7 +232,7 @@ void QListView::setMovement(Movement movement)
d->modeProperties |= uint(QListViewPrivate::Movement);
d->movement = movement;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
bool movable = (movement != Static);
setDragEnabled(movable);
d->viewport->setAcceptDrops(movable);
@@ -494,7 +496,7 @@ void QListView::setViewMode(ViewMode mode)
d->showElasticBand = true;
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
bool movable = (d->movement != Static);
setDragEnabled(movable);
setAcceptDrops(movable);
@@ -875,7 +877,7 @@ void QListView::resizeEvent(QResizeEvent *e)
}
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
\reimp
@@ -919,7 +921,7 @@ void QListView::startDrag(Qt::DropActions supportedActions)
QAbstractItemView::startDrag(supportedActions);
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*!
\reimp
@@ -1048,7 +1050,7 @@ void QListView::paintEvent(QPaintEvent *e)
d->delegateForIndex(*it)->paint(&painter, option, *it);
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
d->commonListView->paintDragDrop(&painter);
#endif
@@ -1829,7 +1831,7 @@ QItemSelection QListViewPrivate::selection(const QRect &rect) const
return selection;
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QAbstractItemView::DropIndicatorPosition QListViewPrivate::position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const
{
if (viewMode == QListView::ListMode && flow == QListView::LeftToRight)
@@ -1871,7 +1873,7 @@ void QCommonListViewBase::removeHiddenRow(int row)
dd->hiddenRows.remove(dd->model->index(row, 0, qq->rootIndex()));
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void QCommonListViewBase::paintDragDrop(QPainter *painter)
{
// FIXME: Until the we can provide a proper drop indicator
@@ -2006,7 +2008,7 @@ QListModeViewBase::QListModeViewBase(QListView *q, QListViewPrivate *d)
#endif
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QAbstractItemView::DropIndicatorPosition QListModeViewBase::position(const QPoint &pos, const QRect &rect, const QModelIndex &index) const
{
QAbstractItemView::DropIndicatorPosition r = QAbstractItemView::OnViewport;
@@ -2165,7 +2167,7 @@ bool QListModeViewBase::dropOn(QDropEvent *event, int *dropRow, int *dropCol, QM
return false;
}
-#endif //QT_NO_DRAGANDDROP
+#endif //QT_CONFIG(draganddrop)
void QListModeViewBase::updateVerticalScrollBar(const QSize &step)
{
@@ -2740,7 +2742,7 @@ void QIconModeViewBase::removeHiddenRow(int row)
tree.insertLeaf(items.at(row).rect(), row);
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
bool QIconModeViewBase::filterStartDrag(Qt::DropActions supportedActions)
{
// This function does the same thing as in QAbstractItemView::startDrag(),
@@ -2862,7 +2864,7 @@ bool QIconModeViewBase::filterDragMoveEvent(QDragMoveEvent *e)
dd->startAutoScroll();
return true;
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
void QIconModeViewBase::setRowCount(int rowCount)
{
diff --git a/src/widgets/itemviews/qlistview.h b/src/widgets/itemviews/qlistview.h
index 2da510facf..9fc4035999 100644
--- a/src/widgets/itemviews/qlistview.h
+++ b/src/widgets/itemviews/qlistview.h
@@ -158,12 +158,12 @@ protected:
void timerEvent(QTimerEvent *e) override;
void resizeEvent(QResizeEvent *e) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void dragMoveEvent(QDragMoveEvent *e) override;
void dragLeaveEvent(QDragLeaveEvent *e) override;
void dropEvent(QDropEvent *e) override;
void startDrag(Qt::DropActions supportedActions) override;
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
QStyleOptionViewItem viewOptions() const override;
void paintEvent(QPaintEvent *e) override;
diff --git a/src/widgets/itemviews/qlistview_p.h b/src/widgets/itemviews/qlistview_p.h
index 8d29767951..ca947292e3 100644
--- a/src/widgets/itemviews/qlistview_p.h
+++ b/src/widgets/itemviews/qlistview_p.h
@@ -143,7 +143,7 @@ public:
virtual void removeHiddenRow(int row);
virtual void setPositionForIndex(const QPoint &, const QModelIndex &) { }
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
virtual void paintDragDrop(QPainter *painter);
virtual bool filterDragMoveEvent(QDragMoveEvent *) { return false; }
virtual bool filterDragLeaveEvent(QDragLeaveEvent *) { return false; }
@@ -228,7 +228,7 @@ public:
void updateHorizontalScrollBar(const QSize &step) override;
void updateVerticalScrollBar(const QSize &step) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
// The next two methods are to be used on LefToRight flow only.
// WARNING: Plenty of duplicated code from QAbstractItemView{,Private}.
QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const;
@@ -274,7 +274,7 @@ public:
void removeHiddenRow(int row) override;
void setPositionForIndex(const QPoint &position, const QModelIndex &index) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
bool filterDragMoveEvent(QDragMoveEvent *) override;
bool filterDragLeaveEvent(QDragLeaveEvent *) override;
bool filterDropEvent(QDropEvent *e) override;
@@ -358,7 +358,7 @@ public:
QItemSelection selection(const QRect &rect) const;
void selectAll(QItemSelectionModel::SelectionFlags command) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const override;
bool dropOn(QDropEvent *event, int *row, int *col, QModelIndex *index) override;
#endif
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp
index 1fedad80aa..4f1c7fe80a 100644
--- a/src/widgets/itemviews/qlistwidget.cpp
+++ b/src/widgets/itemviews/qlistwidget.cpp
@@ -444,7 +444,7 @@ QMimeData *QListModel::mimeData(const QModelIndexList &indexes) const
return mimeData;
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
bool QListModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &index)
{
@@ -463,7 +463,7 @@ Qt::DropActions QListModel::supportedDropActions() const
const QListWidget *view = qobject_cast<const QListWidget*>(QObject::parent());
return view->supportedDropActions();
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*!
\class QListWidgetItem
@@ -1859,7 +1859,7 @@ QMimeData *QListWidget::mimeData(const QList<QListWidgetItem*> items) const
return d->listModel()->internalMimeData();
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
Handles \a data supplied by an external drag and drop operation that ended
with the given \a action in the given \a index. Returns \c true if \a data and
@@ -1934,7 +1934,7 @@ Qt::DropActions QListWidget::supportedDropActions() const
Q_D(const QListWidget);
return d->listModel()->QAbstractListModel::supportedDropActions() | Qt::MoveAction;
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*!
Returns a list of pointers to the items contained in the \a data object. If
diff --git a/src/widgets/itemviews/qlistwidget.h b/src/widgets/itemviews/qlistwidget.h
index 8a31411429..947fdb1a2f 100644
--- a/src/widgets/itemviews/qlistwidget.h
+++ b/src/widgets/itemviews/qlistwidget.h
@@ -286,7 +286,7 @@ protected:
#else
virtual QMimeData *mimeData(const QList<QListWidgetItem*> items) const;
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
virtual bool dropMimeData(int index, const QMimeData *data, Qt::DropAction action);
virtual Qt::DropActions supportedDropActions() const;
#endif
diff --git a/src/widgets/itemviews/qlistwidget_p.h b/src/widgets/itemviews/qlistwidget_p.h
index 30b5016db6..9cb3d5966b 100644
--- a/src/widgets/itemviews/qlistwidget_p.h
+++ b/src/widgets/itemviews/qlistwidget_p.h
@@ -124,7 +124,7 @@ public:
// dnd
QStringList mimeTypes() const override;
QMimeData *mimeData(const QModelIndexList &indexes) const override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
bool dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent) override;
Qt::DropActions supportedDropActions() const override;
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index ec25ccdb12..1938fd8e92 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -1512,7 +1512,7 @@ void QTableView::paintEvent(QPaintEvent *event)
}
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
// Paint the dropIndicator
d->paintDropIndicator(&painter);
#endif
diff --git a/src/widgets/itemviews/qtableview_p.h b/src/widgets/itemviews/qtableview_p.h
index 1a0fef9017..805787597c 100644
--- a/src/widgets/itemviews/qtableview_p.h
+++ b/src/widgets/itemviews/qtableview_p.h
@@ -142,7 +142,7 @@ public:
visualCursor(QPoint())
{
wrapItemText = true;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
overwrite = true;
#endif
}
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index 301d5dbe4d..9d5a2aa1bd 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -2618,7 +2618,7 @@ QMimeData *QTableWidget::mimeData(const QList<QTableWidgetItem*> items) const
bool QTableWidget::dropMimeData(int row, int column, const QMimeData *data, Qt::DropAction action)
{
QModelIndex idx;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (dropIndicatorPosition() == QAbstractItemView::OnItem) {
// QAbstractTableModel::dropMimeData will overwrite on the index if row == -1 and column == -1
idx = model()->index(row, column);
@@ -2701,7 +2701,7 @@ bool QTableWidget::event(QEvent *e)
return QTableView::event(e);
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*! \reimp */
void QTableWidget::dropEvent(QDropEvent *event) {
Q_D(QTableWidget);
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index ebeefad682..fbfbe56246 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -1287,7 +1287,7 @@ void QTreeView::timerEvent(QTimerEvent *event)
/*!
\reimp
*/
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void QTreeView::dragMoveEvent(QDragMoveEvent *event)
{
Q_D(QTreeView);
@@ -1342,7 +1342,7 @@ void QTreeView::paintEvent(QPaintEvent *event)
#endif //QT_NO_ANIMATION
{
drawTree(&painter, event->region());
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
d->paintDropIndicator(&painter);
#endif
}
diff --git a/src/widgets/itemviews/qtreeview.h b/src/widgets/itemviews/qtreeview.h
index e7ee55aa2a..09ce0e3fff 100644
--- a/src/widgets/itemviews/qtreeview.h
+++ b/src/widgets/itemviews/qtreeview.h
@@ -201,7 +201,7 @@ protected:
void mouseDoubleClickEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
void keyPressEvent(QKeyEvent *event) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void dragMoveEvent(QDragMoveEvent *event) override;
#endif
bool viewportEvent(QEvent *event) override;
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index de7f7c0b77..654c241079 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -3394,7 +3394,7 @@ QTreeWidgetItem *QTreeWidget::itemFromIndex(const QModelIndex &index) const
return d->item(index);
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*! \reimp */
void QTreeWidget::dropEvent(QDropEvent *event) {
Q_D(QTreeWidget);
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 0d434c7097..ba315d4338 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -63,7 +63,9 @@
#include "qtranslator.h"
#include "qvariant.h"
#include "qwidget.h"
-#include "private/qdnd_p.h"
+#if QT_CONFIG(draganddrop)
+#include <private/qdnd_p.h>
+#endif
#include "private/qguiapplication_p.h"
#include "qcolormap.h"
#include "qdebug.h"
@@ -130,6 +132,7 @@ QT_BEGIN_NAMESPACE
}
Q_CORE_EXPORT void qt_call_post_routines();
+Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text = QString(), bool autorep = false, ushort count = 1);
QApplicationPrivate *QApplicationPrivate::self = 0;
@@ -831,7 +834,7 @@ QApplication::~QApplication()
delete QApplicationPrivate::app_style;
QApplicationPrivate::app_style = 0;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (qt_is_gui_used)
delete QDragManager::self();
#endif
@@ -3068,8 +3071,19 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
switch (e->type()) {
case QEvent::KeyPress: {
- int key = static_cast<QKeyEvent*>(e)->key();
- qt_in_tab_key_event = (key == Qt::Key_Backtab
+ QKeyEvent* keyEvent = static_cast<QKeyEvent*>(e);
+ const int key = keyEvent->key();
+ // When a key press is received which is not spontaneous then it needs to
+ // be manually sent as a shortcut override event to ensure that any
+ // matching shortcut is triggered first. This enables emulation/playback
+ // of recorded events to still have the same effect.
+ if (!e->spontaneous() && receiver->isWidgetType()) {
+ if (qt_sendShortcutOverrideEvent(qobject_cast<QWidget *>(receiver), keyEvent->timestamp(),
+ key, keyEvent->modifiers(), keyEvent->text(),
+ keyEvent->isAutoRepeat(), keyEvent->count()))
+ return true;
+ }
+ qt_in_tab_key_event = (key == Qt::Key_Backtab
|| key == Qt::Key_Tab
|| key == Qt::Key_Left
|| key == Qt::Key_Up
@@ -3417,7 +3431,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
break;
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
case QEvent::DragEnter: {
QWidget* w = static_cast<QWidget *>(receiver);
QDragEnterEvent *dragEvent = static_cast<QDragEnterEvent *>(e);
@@ -4465,7 +4479,7 @@ void QApplicationPrivate::notifyThemeChanged()
qt_init_tooltip_palette();
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void QApplicationPrivate::notifyDragStarted(const QDrag *drag)
{
QGuiApplicationPrivate::notifyDragStarted(drag);
@@ -4476,7 +4490,7 @@ void QApplicationPrivate::notifyDragStarted(const QDrag *drag)
if (qt_button_down && !qt_button_down->inherits("QQuickWidget"))
qt_button_down = nullptr;
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
#ifndef QT_NO_GESTURES
QGestureManager* QGestureManager::instance()
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index 019fad3fc3..488ca6cbfd 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -177,9 +177,9 @@ public:
protected:
void notifyThemeChanged() override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void notifyDragStarted(const QDrag *) override;
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
public:
static QFont *sys_font;
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp
index 8a5b863bb5..595ff3eb6e 100644
--- a/src/widgets/kernel/qformlayout.cpp
+++ b/src/widgets/kernel/qformlayout.cpp
@@ -1559,8 +1559,6 @@ QFormLayout::TakeRowResult QFormLayout::takeRow(int row)
QFormLayoutItem *label = d->m_matrix(row, 0);
QFormLayoutItem *field = d->m_matrix(row, 1);
- Q_ASSERT(field);
-
d->m_things.removeOne(label);
d->m_things.removeOne(field);
d->m_matrix.removeRow(row);
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index f3db4f4e2d..9ce1c1c2d4 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -44,7 +44,9 @@
#if QT_CONFIG(menubar)
#include "qmenubar.h"
#endif
+#if QT_CONFIG(toolbar)
#include "qtoolbar.h"
+#endif
#if QT_CONFIG(sizegrip)
#include "qsizegrip.h"
#endif
diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp
index 52640daf55..25890e888b 100644
--- a/src/widgets/kernel/qlayoutitem.cpp
+++ b/src/widgets/kernel/qlayoutitem.cpp
@@ -44,7 +44,9 @@
#if QT_CONFIG(menubar)
#include "qmenubar.h"
#endif
+#if QT_CONFIG(toolbar)
#include "qtoolbar.h"
+#endif
#include "qevent.h"
#include "qstyle.h"
#include "qvariant.h"
diff --git a/src/widgets/kernel/qmacgesturerecognizer.cpp b/src/widgets/kernel/qmacgesturerecognizer.cpp
index 6dedd3c2d0..d39b93e320 100644
--- a/src/widgets/kernel/qmacgesturerecognizer.cpp
+++ b/src/widgets/kernel/qmacgesturerecognizer.cpp
@@ -43,6 +43,7 @@
#include "qevent.h"
#include "qwidget.h"
#include "qdebug.h"
+#include <QtCore/qcoreapplication.h>
#ifndef QT_NO_GESTURES
@@ -181,6 +182,16 @@ QGesture *QMacPanGestureRecognizer::create(QObject *target)
return 0;
}
+void QMacPanGestureRecognizer::timerEvent(QTimerEvent *ev)
+{
+ if (ev->timerId() == _panTimer.timerId()) {
+ if (_panTimer.isActive())
+ _panTimer.stop();
+ if (_target)
+ QCoreApplication::sendEvent(_target, ev);
+ }
+}
+
QGestureRecognizer::Result
QMacPanGestureRecognizer::recognize(QGesture *gesture, QObject *target, QEvent *event)
{
@@ -195,7 +206,8 @@ QMacPanGestureRecognizer::recognize(QGesture *gesture, QObject *target, QEvent *
if (ev->touchPoints().size() == 1) {
reset(gesture);
_startPos = QCursor::pos();
- _panTimer.start(panBeginDelay, target);
+ _target = target;
+ _panTimer.start(panBeginDelay, this);
_panCanceled = false;
return QGestureRecognizer::MayBeGesture;
}
@@ -242,7 +254,6 @@ QMacPanGestureRecognizer::recognize(QGesture *gesture, QObject *target, QEvent *
case QEvent::Timer: {
QTimerEvent *ev = static_cast<QTimerEvent *>(event);
if (ev->timerId() == _panTimer.timerId()) {
- _panTimer.stop();
if (_panCanceled)
break;
// Begin new pan session!
diff --git a/src/widgets/kernel/qmacgesturerecognizer_p.h b/src/widgets/kernel/qmacgesturerecognizer_p.h
index be3f3266ac..e381a6cc2f 100644
--- a/src/widgets/kernel/qmacgesturerecognizer_p.h
+++ b/src/widgets/kernel/qmacgesturerecognizer_p.h
@@ -55,6 +55,7 @@
#include "qtimer.h"
#include "qpoint.h"
#include "qgesturerecognizer.h"
+#include <QtCore/qpointer.h>
#ifndef QT_NO_GESTURES
@@ -88,10 +89,13 @@ public:
QGesture *create(QObject *target);
QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event);
void reset(QGesture *gesture);
+protected:
+ void timerEvent(QTimerEvent *ev) override;
private:
QPointF _startPos;
QBasicTimer _panTimer;
bool _panCanceled;
+ QPointer<QObject> _target;
};
QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 41c19375d7..bf4ab25204 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1324,7 +1324,7 @@ void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow)
<< "Alien?" << !testAttribute(Qt::WA_NativeWindow);
#endif
-#if 0 /* Used to be included in Qt4 for Q_WS_WIN */ && !defined(QT_NO_DRAGANDDROP)
+#if 0 /* Used to be included in Qt4 for Q_WS_WIN */ && QT_CONFIG(draganddrop)
// Unregister the dropsite (if already registered) before we
// re-create the widget with a native window.
if (testAttribute(Qt::WA_WState_Created) && !internalWinId() && testAttribute(Qt::WA_NativeWindow)
@@ -1679,6 +1679,7 @@ QWidget::~QWidget()
}
}
+ d->wasDeleted = true;
if (d->declarativeData) {
if (static_cast<QAbstractDeclarativeDataImpl*>(d->declarativeData)->ownedByQml1) {
if (QAbstractDeclarativeData::destroyed_qml1)
@@ -5594,21 +5595,23 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
if (renderToTexture) {
// This widget renders into a texture which is composed later. We just need to
// punch a hole in the backingstore, so the texture will be visible.
- if (!q->testAttribute(Qt::WA_AlwaysStackOnTop)) {
- beginBackingStorePainting();
- if (backingStore) {
- QPainter p(q);
- p.setCompositionMode(QPainter::CompositionMode_Source);
- p.fillRect(q->rect(), Qt::transparent);
- } else {
- QImage img = grabFramebuffer();
- QPainter p(q);
- // We are not drawing to a backingstore: fall back to QImage
- p.drawImage(q->rect(), img);
- skipPaintEvent = true;
- }
- endBackingStorePainting();
+ beginBackingStorePainting();
+ if (!q->testAttribute(Qt::WA_AlwaysStackOnTop) && backingStore) {
+ QPainter p(q);
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ p.fillRect(q->rect(), Qt::transparent);
+ } else if (!backingStore) {
+ // We are not drawing to a backingstore: fall back to QImage
+ QImage img = grabFramebuffer();
+ // grabFramebuffer() always sets the format to RGB32
+ // regardless of whether it is transparent or not.
+ if (img.format() == QImage::Format_RGB32)
+ img.reinterpretAsFormat(QImage::Format_ARGB32_Premultiplied);
+ QPainter p(q);
+ p.drawImage(q->rect(), img);
+ skipPaintEvent = true;
}
+ endBackingStorePainting();
if (renderToTextureReallyDirty)
renderToTextureReallyDirty = 0;
else
@@ -8478,7 +8481,7 @@ bool QWidgetPrivate::close_helper(CloseMode mode)
data.is_closing = 1;
QPointer<QWidget> that = q;
- QPointer<QWidget> parentWidget = q->parentWidget();
+ QPointer<QWidget> parentWidget = (q->parentWidget() && !QObjectPrivate::get(q->parentWidget())->wasDeleted) ? q->parentWidget() : nullptr;
bool quitOnClose = q->testAttribute(Qt::WA_QuitOnClose);
if (mode != CloseNoEvent) {
@@ -9095,7 +9098,7 @@ bool QWidget::event(QEvent *event)
break;
#endif // QT_NO_CONTEXTMENU
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
case QEvent::Drop:
dropEvent((QDropEvent*) event);
break;
@@ -9977,7 +9980,7 @@ void QWidget::setInputMethodHints(Qt::InputMethodHints hints)
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
\fn void QWidget::dragEnterEvent(QDragEnterEvent *event)
@@ -10046,7 +10049,7 @@ void QWidget::dropEvent(QDropEvent *)
{
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*!
\fn void QWidget::showEvent(QShowEvent *event)
@@ -11195,7 +11198,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
switch (attribute) {
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
case Qt::WA_AcceptDrops: {
if (on && !testAttribute(Qt::WA_DropSiteRegistered))
setAttribute(Qt::WA_DropSiteRegistered, true);
diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h
index 5087d330ee..9f9f167002 100644
--- a/src/widgets/kernel/qwidget.h
+++ b/src/widgets/kernel/qwidget.h
@@ -636,7 +636,7 @@ protected:
virtual void actionEvent(QActionEvent *event);
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
virtual void dragEnterEvent(QDragEnterEvent *event);
virtual void dragMoveEvent(QDragMoveEvent *event);
virtual void dragLeaveEvent(QDragLeaveEvent *event);
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index a9c73c6a26..e8b550b1cd 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -268,7 +268,7 @@ struct QWExtra {
// *************************** Platform specific values (bit fields first) **********
#if 0 /* Used to be included in Qt4 for Q_WS_WIN */ // <----------------------------------------------------------- WIN
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QOleDropTarget *dropTarget; // drop target
QList<QPointer<QWidget> > oleDropWidgets;
#endif
@@ -800,7 +800,7 @@ public:
bool shouldShowMaximizeButton();
void winUpdateIsOpaque();
void reparentChildren();
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QOleDropTarget *registerOleDnd(QWidget *widget);
void unregisterOleDnd(QWidget *widget, QOleDropTarget *target);
#endif
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 803a18ba52..efaf63072e 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -237,6 +237,7 @@ bool QWidgetWindow::event(QEvent *event)
switch (event->type()) {
case QEvent::Close:
handleCloseEvent(static_cast<QCloseEvent *>(event));
+ QWindow::event(event);
return true;
case QEvent::Enter:
@@ -308,7 +309,7 @@ bool QWidgetWindow::event(QEvent *event)
return true;
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
case QEvent::DragEnter:
case QEvent::DragMove:
handleDragEnterMoveEvent(static_cast<QDragMoveEvent *>(event));
@@ -845,7 +846,7 @@ void QWidgetWindow::handleWheelEvent(QWheelEvent *event)
#endif // QT_CONFIG(wheelevent)
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void QWidgetWindow::handleDragEnterMoveEvent(QDragMoveEvent *event)
{
@@ -921,7 +922,7 @@ void QWidgetWindow::handleDropEvent(QDropEvent *event)
m_dragTarget = 0;
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
void QWidgetWindow::handleExposeEvent(QExposeEvent *event)
{
diff --git a/src/widgets/kernel/qwidgetwindow_p.h b/src/widgets/kernel/qwidgetwindow_p.h
index d0f1d55c2a..ead099390e 100644
--- a/src/widgets/kernel/qwidgetwindow_p.h
+++ b/src/widgets/kernel/qwidgetwindow_p.h
@@ -95,7 +95,7 @@ protected:
#if QT_CONFIG(wheelevent)
void handleWheelEvent(QWheelEvent *);
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void handleDragEnterMoveEvent(QDragMoveEvent *);
void handleDragLeaveEvent(QDragLeaveEvent *);
void handleDropEvent(QDropEvent *);
@@ -132,7 +132,7 @@ private:
QPointer<QWidget> m_widget;
QPointer<QWidget> m_implicit_mouse_grabber;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QPointer<QWidget> m_dragTarget;
#endif
};
diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp
index d388327687..81916bba90 100644
--- a/src/widgets/kernel/qwindowcontainer.cpp
+++ b/src/widgets/kernel/qwindowcontainer.cpp
@@ -48,6 +48,7 @@
#include <QMdiSubWindow>
#endif
#include <QAbstractScrollArea>
+#include <QPainter>
QT_BEGIN_NAMESPACE
@@ -328,7 +329,7 @@ bool QWindowContainer::event(QEvent *e)
}
}
break;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
case QEvent::Drop:
case QEvent::DragMove:
case QEvent::DragLeave:
diff --git a/src/widgets/statemachine/qguistatemachine.cpp b/src/widgets/statemachine/qguistatemachine.cpp
index b452c63551..42691d6b77 100644
--- a/src/widgets/statemachine/qguistatemachine.cpp
+++ b/src/widgets/statemachine/qguistatemachine.cpp
@@ -136,7 +136,7 @@ static QEvent *cloneEvent(QEvent *e)
return new QEvent(*e);
case QEvent::DeferredDelete:
return new QEvent(*e);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
case QEvent::DragEnter:
return new QDragEnterEvent(*static_cast<QDragEnterEvent*>(e));
case QEvent::DragMove:
@@ -251,10 +251,10 @@ static QEvent *cloneEvent(QEvent *e)
return new QWhatsThisClickedEvent(*static_cast<QWhatsThisClickedEvent*>(e));
#endif // QT_CONFIG(whatsthis)
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case QEvent::ToolBarChange:
return new QToolBarChangeEvent(*static_cast<QToolBarChangeEvent*>(e));
-#endif //QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
case QEvent::ApplicationActivate:
return new QEvent(*e);
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 557277b9e0..7420bfb3f7 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -81,7 +81,9 @@
#if QT_CONFIG(tabwidget)
#include <qtabwidget.h>
#endif
+#if QT_CONFIG(toolbar)
#include <qtoolbar.h>
+#endif
#if QT_CONFIG(toolbutton)
#include <qtoolbutton.h>
#endif
@@ -276,7 +278,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
}
}
break;
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case PE_PanelMenuBar:
if (widget && qobject_cast<QToolBar *>(widget->parentWidget()))
break;
@@ -295,7 +297,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
break;
case PE_PanelToolBar:
break;
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
#if QT_CONFIG(progressbar)
case PE_IndicatorProgressChunk:
{
@@ -477,7 +479,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
}
break;
#endif // QT_CONFIG(dockwidget)
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case PE_IndicatorToolBarHandle:
p->save();
p->translate(opt->rect.x(), opt->rect.y());
@@ -515,7 +517,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
qDrawShadeLine(p, p1, p2, opt->palette, 1, 1, 0);
break;
}
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
#if QT_CONFIG(spinbox)
case PE_IndicatorSpinPlus:
case PE_IndicatorSpinMinus: {
@@ -2153,7 +2155,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
}
break;
#endif // QT_CONFIG(combobox)
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case CE_ToolBar:
if (const QStyleOptionToolBar *toolBar = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) {
// Compatibility with styles that use PE_PanelToolBar
@@ -2169,7 +2171,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
&toolBar->palette.brush(QPalette::Button));
}
break;
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
case CE_ColumnViewGrip: {
// draw background gradients
QLinearGradient g(0, 0, opt->rect.width(), 0);
@@ -3072,7 +3074,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
}
break;
#endif // QT_CONFIG(itemviews)
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case SE_ToolBarHandle:
if (const QStyleOptionToolBar *tbopt = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) {
if (tbopt->features & QStyleOptionToolBar::Movable) {
@@ -3090,7 +3092,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
}
}
break;
-#endif //QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
default:
break;
}
@@ -4570,7 +4572,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
ret = 0;
break;
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case PM_ToolBarFrameWidth:
ret = 1;
break;
@@ -4594,7 +4596,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
case PM_ToolBarExtensionExtent:
ret = int(QStyleHelper::dpiScaled(12.));
break;
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
#if QT_CONFIG(tabbar)
case PM_TabBarTabOverlap:
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 0c6825cb36..7474cd23d6 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -3513,7 +3513,7 @@ QRect QFusionStyle::subControlRect(ComplexControl control, const QStyleOptionCom
int frameWidth = 2;
rect = visualRect(option->direction, option->rect, rect);
rect.setRect(option->rect.left() + frameWidth, option->rect.top() + frameWidth,
- option->rect.width() - 19 - 2 * frameWidth,
+ option->rect.width() - int(QStyleHelper::dpiScaled(19)) - 2 * frameWidth,
option->rect.height() - 2 * frameWidth);
if (const QStyleOptionComboBox *box = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
if (!box->editable) {
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index 3666bce205..e7fa26e2d4 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -1040,7 +1040,7 @@ QStyleOptionButton::QStyleOptionButton(int version)
*/
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
/*!
\class QStyleOptionToolBar
\brief The QStyleOptionToolBar class is used to describe the
diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h
index 2880917510..9fbaf34a86 100644
--- a/src/widgets/styles/qstyleoption.h
+++ b/src/widgets/styles/qstyleoption.h
@@ -296,7 +296,7 @@ typedef Q_DECL_DEPRECATED QStyleOptionTab QStyleOptionTabV3;
#endif // QT_CONFIG(tabbar)
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
class Q_WIDGETS_EXPORT QStyleOptionToolBar : public QStyleOption
{
@@ -321,7 +321,7 @@ protected:
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionToolBar::ToolBarFeatures)
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
class Q_WIDGETS_EXPORT QStyleOptionProgressBar : public QStyleOption
{
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index e12aeb900b..94509f621e 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -111,7 +111,9 @@
#include "qdrawutil.h"
#include <limits.h>
+#if QT_CONFIG(toolbar)
#include <QtWidgets/qtoolbar.h>
+#endif
QT_BEGIN_NAMESPACE
@@ -1979,7 +1981,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption
if (frm->features & QStyleOptionFrame::Flat)
extraClass |= PseudoClass_Flat;
}
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
else if (const QStyleOptionToolBar *tb = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) {
if (tb->toolBarArea == Qt::LeftToolBarArea)
extraClass |= PseudoClass_Left;
@@ -1999,7 +2001,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption
else if (tb->positionWithinLine == QStyleOptionToolBar::OnlyOne)
extraClass |= PseudoClass_OnlyOne;
}
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
#if QT_CONFIG(toolbox)
else if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt)) {
if (tb->position == QStyleOptionToolBox::OnlyOneTab)
@@ -3594,13 +3596,13 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
if (rule.hasBorder()) {
rule.drawBorder(p, rule.borderRect(opt->rect));
} else {
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (const QStyleOptionToolBar *tb = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) {
QStyleOptionToolBar newTb(*tb);
newTb.rect = rule.borderRect(opt->rect);
baseStyle()->drawControl(ce, &newTb, p, w);
}
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
}
return;
@@ -3837,7 +3839,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
if(hasStyleRule(w, PseudoElement_HeaderViewSection)) {
QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection);
if (!subRule.hasNativeBorder() || !subRule.baseStyleCanDraw()
- || subRule.hasBackground() || subRule.hasPalette()) {
+ || subRule.hasBackground() || subRule.hasPalette() || subRule.hasFont) {
ParentStyle::drawControl(ce, opt, p, w);
return;
}
@@ -3874,12 +3876,14 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
QStyleOptionHeader hdr(*header);
QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection);
subRule.configurePalette(&hdr.palette, QPalette::ButtonText, QPalette::Button);
- QFont oldFont = p->font();
- if (subRule.hasFont)
+ if (subRule.hasFont) {
+ QFont oldFont = p->font();
p->setFont(subRule.font.resolve(p->font()));
- baseStyle()->drawControl(ce, &hdr, p, w);
- if (subRule.hasFont)
+ ParentStyle::drawControl(ce, &hdr, p, w);
p->setFont(oldFont);
+ } else {
+ baseStyle()->drawControl(ce, &hdr, p, w);
+ }
return;
}
break;
@@ -4983,11 +4987,13 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
if (!subRule.hasGeometry()) {
QSize nativeContentsSize;
bool nullIcon = hdr->icon.isNull();
+ const int margin = pixelMetric(QStyle::PM_HeaderMargin, hdr, w);
int iconSize = nullIcon ? 0 : pixelMetric(QStyle::PM_SmallIconSize, hdr, w);
const QSize txt = subRule.hasFont ? QFontMetrics(subRule.font).size(0, hdr->text)
: hdr->fontMetrics.size(0, hdr->text);
- nativeContentsSize.setHeight(qMax(iconSize, txt.height()));
- nativeContentsSize.setWidth(iconSize + txt.width());
+ nativeContentsSize.setHeight(margin + qMax(iconSize, txt.height()) + margin);
+ nativeContentsSize.setWidth((nullIcon ? 0 : margin) + iconSize
+ + (hdr->text.isNull() ? 0 : margin) + txt.width() + margin);
sz = sz.expandedTo(nativeContentsSize);
}
return subRule.size(sz);
@@ -5919,12 +5925,12 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
return positionRect(w, subRule, subRule2, pe, opt->rect, opt->direction);
}
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case SE_ToolBarHandle:
if (hasStyleRule(w, PseudoElement_ToolBarHandle))
return ParentStyle::subElementRect(se, opt, w);
break;
-#endif //QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
// On mac we make pixel adjustments to layouts which are not
// desireable when you have custom style sheets on them
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index 89011350ec..7c9d917784 100644
--- a/src/widgets/styles/qwindowsstyle.cpp
+++ b/src/widgets/styles/qwindowsstyle.cpp
@@ -661,7 +661,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
bool doRestore = false;
switch (pe) {
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case PE_IndicatorToolBarSeparator:
{
QRect rect = opt->rect;
@@ -721,7 +721,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
p->restore();
break;
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
case PE_FrameButtonTool:
case PE_PanelButtonTool: {
QPen oldPen = p->pen();
@@ -1572,7 +1572,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
p->fillRect(opt->rect, fill);
}
break; }
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case CE_ToolBar:
if (const QStyleOptionToolBar *toolbar = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) {
// Reserve the beveled appearance only for mainwindow toolbars
@@ -1673,7 +1673,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
break;
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
case CE_ProgressBarContents:
if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) {
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index 917cddce6f..598d173144 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -1065,7 +1065,7 @@ bool QAbstractScrollArea::event(QEvent *e)
case QEvent::MouseButtonDblClick:
case QEvent::MouseMove:
case QEvent::Wheel:
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
case QEvent::Drop:
case QEvent::DragEnter:
case QEvent::DragMove:
@@ -1206,7 +1206,7 @@ bool QAbstractScrollArea::viewportEvent(QEvent *e)
#if QT_CONFIG(wheelevent)
case QEvent::Wheel:
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
case QEvent::Drop:
case QEvent::DragEnter:
case QEvent::DragMove:
@@ -1409,7 +1409,7 @@ void QAbstractScrollArea::keyPressEvent(QKeyEvent * e)
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!
\fn void QAbstractScrollArea::dragEnterEvent(QDragEnterEvent *event)
diff --git a/src/widgets/widgets/qabstractscrollarea.h b/src/widgets/widgets/qabstractscrollarea.h
index 8a17036fb2..6d0d8fa6e6 100644
--- a/src/widgets/widgets/qabstractscrollarea.h
+++ b/src/widgets/widgets/qabstractscrollarea.h
@@ -122,7 +122,7 @@ protected:
#ifndef QT_NO_CONTEXTMENU
void contextMenuEvent(QContextMenuEvent *) override;
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void dragEnterEvent(QDragEnterEvent *) override;
void dragMoveEvent(QDragMoveEvent *) override;
void dragLeaveEvent(QDragLeaveEvent *) override;
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp
index e059f2d52f..77423e85e5 100644
--- a/src/widgets/widgets/qabstractspinbox.cpp
+++ b/src/widgets/widgets/qabstractspinbox.cpp
@@ -1651,7 +1651,7 @@ void QAbstractSpinBox::initStyleOption(QStyleOptionSpinBox *option) const
option->activeSubControls = QStyle::SC_None;
option->buttonSymbols = d->buttonSymbols;
option->subControls = QStyle::SC_SpinBoxEditField;
- if (!style()->styleHint(QStyle::SH_SpinBox_ButtonsInsideFrame, nullptr, this))
+ if (style()->styleHint(QStyle::SH_SpinBox_ButtonsInsideFrame, nullptr, this))
option->subControls |= QStyle::SC_SpinBoxFrame;
if (d->buttonSymbols != QAbstractSpinBox::NoButtons) {
option->subControls |= QStyle::SC_SpinBoxUp | QStyle::SC_SpinBoxDown;
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index e70d096e04..04a44e1f37 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -73,7 +73,9 @@
#include <private/qabstractitemmodel_p.h>
#include <private/qabstractscrollarea_p.h>
#include <private/qlineedit_p.h>
+#if QT_CONFIG(completer)
#include <private/qcompleter_p.h>
+#endif
#include <qdebug.h>
#if QT_CONFIG(effects)
# include <private/qeffects_p.h>
diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp
index 9f5b739230..d93e71e32f 100644
--- a/src/widgets/widgets/qdialogbuttonbox.cpp
+++ b/src/widgets/widgets/qdialogbuttonbox.cpp
@@ -858,7 +858,7 @@ void QDialogButtonBoxPrivate::_q_handleButtonClicked()
if (!guard)
return;
- switch (buttonRole) {
+ switch (QPlatformDialogHelper::ButtonRole(buttonRole)) {
case QPlatformDialogHelper::AcceptRole:
case QPlatformDialogHelper::YesRole:
emit q->accepted();
diff --git a/src/widgets/widgets/qdockarealayout.cpp b/src/widgets/widgets/qdockarealayout.cpp
index 71726eaeee..75289e9d1f 100644
--- a/src/widgets/widgets/qdockarealayout.cpp
+++ b/src/widgets/widgets/qdockarealayout.cpp
@@ -53,6 +53,7 @@
#include "qmainwindow.h"
#include "qwidgetanimator_p.h"
#include "qmainwindowlayout_p.h"
+#include "qmenu_p.h"
#include "qdockwidget_p.h"
#include <private/qlayoutengine_p.h>
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index bdeef7cdf7..ca6aacc16c 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -43,7 +43,9 @@
#include "qaction.h"
#include "qapplication.h"
#include "qclipboard.h"
-#include "qdrag.h"
+#if QT_CONFIG(draganddrop)
+#include <qdrag.h>
+#endif
#include "qdrawutil.h"
#include "qevent.h"
#include "qfontmetrics.h"
@@ -1427,7 +1429,7 @@ bool QLineEdit::event(QEvent * e)
// ### Qt6: move to timerEvent, is here for binary compatibility
int timerId = ((QTimerEvent*)e)->timerId();
if (false) {
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
} else if (timerId == d->dndTimer.timerId()) {
d->drag();
#endif
@@ -1515,7 +1517,7 @@ void QLineEdit::mousePressEvent(QMouseEvent* e)
mark = mark && (d->imHints & Qt::ImhNoPredictiveText);
#endif // Q_OS_ANDROID
int cursor = d->xToPos(e->pos().x());
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (!mark && d->dragEnabled && d->control->echoMode() == Normal &&
e->button() == Qt::LeftButton && d->inSelection(e->pos().x())) {
if (!d->dndTimer.isActive())
@@ -1534,7 +1536,7 @@ void QLineEdit::mouseMoveEvent(QMouseEvent * e)
Q_D(QLineEdit);
if (e->buttons() & Qt::LeftButton) {
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (d->dndTimer.isActive()) {
if ((d->mousePressPos - e->pos()).manhattanLength() > QApplication::startDragDistance())
d->drag();
@@ -1581,7 +1583,7 @@ void QLineEdit::mouseReleaseEvent(QMouseEvent* e)
Q_D(QLineEdit);
if (d->sendMouseEventToInputContext(e))
return;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (e->button() == Qt::LeftButton) {
if (d->dndTimer.isActive()) {
d->dndTimer.stop();
@@ -2031,7 +2033,7 @@ void QLineEdit::paintEvent(QPaintEvent *)
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*!\reimp
*/
void QLineEdit::dragMoveEvent(QDragMoveEvent *e)
@@ -2096,7 +2098,7 @@ void QLineEdit::dropEvent(QDropEvent* e)
}
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
#ifndef QT_NO_CONTEXTMENU
/*!
diff --git a/src/widgets/widgets/qlineedit.h b/src/widgets/widgets/qlineedit.h
index 099bf4bb18..6c70a8f44a 100644
--- a/src/widgets/widgets/qlineedit.h
+++ b/src/widgets/widgets/qlineedit.h
@@ -217,7 +217,7 @@ protected:
void focusInEvent(QFocusEvent *) override;
void focusOutEvent(QFocusEvent *) override;
void paintEvent(QPaintEvent *) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void dragEnterEvent(QDragEnterEvent *) override;
void dragMoveEvent(QDragMoveEvent *e) override;
void dragLeaveEvent(QDragLeaveEvent *e) override;
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index 6a8af53c97..0eeff196a8 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -44,7 +44,9 @@
#if QT_CONFIG(itemviews)
#include "qabstractitemview.h"
#endif
+#if QT_CONFIG(draganddrop)
#include "qdrag.h"
+#endif
#include "qwidgetaction.h"
#include "qclipboard.h"
#ifndef QT_NO_ACCESSIBILITY
@@ -310,7 +312,7 @@ bool QLineEditPrivate::sendMouseEventToInputContext( QMouseEvent *e )
return false;
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void QLineEditPrivate::drag()
{
Q_Q(QLineEdit);
@@ -323,8 +325,7 @@ void QLineEditPrivate::drag()
if (action == Qt::MoveAction && !control->isReadOnly() && drag->target() != q)
control->removeSelection();
}
-
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
#if QT_CONFIG(toolbutton)
diff --git a/src/widgets/widgets/qlineedit_p.h b/src/widgets/widgets/qlineedit_p.h
index 39f670b0b0..71a67e3d10 100644
--- a/src/widgets/widgets/qlineedit_p.h
+++ b/src/widgets/widgets/qlineedit_p.h
@@ -211,7 +211,7 @@ public:
void _q_completionHighlighted(const QString &);
#endif
QPoint mousePressPos;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QBasicTimer dndTimer;
void drag();
#endif
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index bf0a88e7fb..2014bdabf3 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -45,7 +45,9 @@
#if QT_CONFIG(dockwidget)
#include "qdockwidget.h"
#endif
+#if QT_CONFIG(toolbar)
#include "qtoolbar.h"
+#endif
#include <qapplication.h>
#include <qmenu.h>
@@ -61,7 +63,9 @@
#include <qpainter.h>
#include <private/qwidget_p.h>
+#if QT_CONFIG(toolbar)
#include "qtoolbar_p.h"
+#endif
#include "qwidgetanimator_p.h"
#ifdef Q_OS_OSX
#include <qpa/qplatformnativeinterface.h>
@@ -706,7 +710,7 @@ Qt::DockWidgetArea QMainWindow::corner(Qt::Corner corner) const
{ return d_func()->layout->corner(corner); }
#endif
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
static bool checkToolBarArea(Qt::ToolBarArea area, const char *where)
{
@@ -874,7 +878,7 @@ bool QMainWindow::toolBarBreak(QToolBar *toolbar) const
return d_func()->layout->toolBarBreak(toolbar);
}
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
#if QT_CONFIG(dockwidget)
@@ -1312,7 +1316,7 @@ bool QMainWindow::event(QEvent *event)
return true;
switch (event->type()) {
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case QEvent::ToolBarChange: {
d->layout->toggleToolBarsVisible();
return true;
@@ -1344,7 +1348,7 @@ bool QMainWindow::event(QEvent *event)
return QWidget::event(event);
}
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
/*!
\property QMainWindow::unifiedTitleAndToolBarOnMac
@@ -1389,7 +1393,7 @@ bool QMainWindow::unifiedTitleAndToolBarOnMac() const
return false;
}
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
/*!
\internal
@@ -1435,7 +1439,7 @@ void QMainWindow::contextMenuEvent(QContextMenuEvent *event)
break;
}
#endif // QT_CONFIG(dockwidget)
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (QToolBar *tb = qobject_cast<QToolBar *>(child)) {
if (tb->parentWidget() != this)
return;
@@ -1506,7 +1510,7 @@ QMenu *QMainWindow::createPopupMenu()
menu->addSeparator();
}
#endif // QT_CONFIG(dockwidget)
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
QList<QToolBar *> toolbars = findChildren<QToolBar *>();
if (toolbars.size()) {
if (!menu)
diff --git a/src/widgets/widgets/qmainwindow.h b/src/widgets/widgets/qmainwindow.h
index 069683d4ac..8f2a192446 100644
--- a/src/widgets/widgets/qmainwindow.h
+++ b/src/widgets/widgets/qmainwindow.h
@@ -74,7 +74,7 @@ class Q_WIDGETS_EXPORT QMainWindow : public QWidget
Q_PROPERTY(bool dockNestingEnabled READ isDockNestingEnabled WRITE setDockNestingEnabled)
#endif // QT_CONFIG(dockwidget)
Q_PROPERTY(DockOptions dockOptions READ dockOptions WRITE setDockOptions)
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
Q_PROPERTY(bool unifiedTitleAndToolBarOnMac READ unifiedTitleAndToolBarOnMac WRITE setUnifiedTitleAndToolBarOnMac)
#endif
@@ -145,7 +145,7 @@ public:
Qt::DockWidgetArea corner(Qt::Corner corner) const;
#endif
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
void addToolBarBreak(Qt::ToolBarArea area = Qt::TopToolBarArea);
void insertToolBarBreak(QToolBar *before);
@@ -190,7 +190,7 @@ public Q_SLOTS:
void setAnimated(bool enabled);
void setDockNestingEnabled(bool enabled);
#endif
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
void setUnifiedTitleAndToolBarOnMac(bool set);
#endif
diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp
index d4ce0ffa4c..43c22910f9 100644
--- a/src/widgets/widgets/qmainwindowlayout.cpp
+++ b/src/widgets/widgets/qmainwindowlayout.cpp
@@ -45,10 +45,12 @@
#include "qdockwidget.h"
#include "qdockwidget_p.h"
#endif
+#if QT_CONFIG(toolbar)
#include "qtoolbar_p.h"
-#include "qmainwindow.h"
#include "qtoolbar.h"
#include "qtoolbarlayout_p.h"
+#endif
+#include "qmainwindow.h"
#include "qwidgetanimator_p.h"
#if QT_CONFIG(rubberband)
#include "qrubberband.h"
@@ -75,6 +77,7 @@
# include <qtextstream.h>
#endif
+#include <private/qmenu_p.h>
#include <private/qapplication_p.h>
#include <private/qlayoutengine_p.h>
#include <private/qwidgetresizehandler_p.h>
@@ -604,7 +607,7 @@ void QDockWidgetGroupWindow::apply()
QMainWindowLayoutState::QMainWindowLayoutState(QMainWindow *win)
:
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
toolBarAreaLayout(win),
#endif
#if QT_CONFIG(dockwidget)
@@ -629,9 +632,9 @@ QSize QMainWindowLayoutState::sizeHint() const
result = centralWidgetItem->sizeHint();
#endif
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
result = toolBarAreaLayout.sizeHint(result);
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
return result;
}
@@ -647,16 +650,16 @@ QSize QMainWindowLayoutState::minimumSize() const
result = centralWidgetItem->minimumSize();
#endif
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
result = toolBarAreaLayout.minimumSize(result);
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
return result;
}
void QMainWindowLayoutState::apply(bool animated)
{
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
toolBarAreaLayout.apply(animated);
#endif
@@ -675,12 +678,12 @@ void QMainWindowLayoutState::apply(bool animated)
void QMainWindowLayoutState::fitLayout()
{
QRect r;
-#ifdef QT_NO_TOOLBAR
+#if !QT_CONFIG(toolbar)
r = rect;
#else
toolBarAreaLayout.rect = rect;
r = toolBarAreaLayout.fitLayout();
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
#if QT_CONFIG(dockwidget)
dockAreaLayout.rect = r;
@@ -692,7 +695,7 @@ void QMainWindowLayoutState::fitLayout()
void QMainWindowLayoutState::deleteAllLayoutItems()
{
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
toolBarAreaLayout.deleteAllLayoutItems();
#endif
@@ -714,7 +717,7 @@ void QMainWindowLayoutState::deleteCentralWidgetItem()
QLayoutItem *QMainWindowLayoutState::itemAt(int index, int *x) const
{
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (QLayoutItem *ret = toolBarAreaLayout.itemAt(x, index))
return ret;
#endif
@@ -732,7 +735,7 @@ QLayoutItem *QMainWindowLayoutState::itemAt(int index, int *x) const
QLayoutItem *QMainWindowLayoutState::takeAt(int index, int *x)
{
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (QLayoutItem *ret = toolBarAreaLayout.takeAt(x, index))
return ret;
#endif
@@ -755,7 +758,7 @@ QList<int> QMainWindowLayoutState::indexOf(QWidget *widget) const
{
QList<int> result;
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
// is it a toolbar?
if (QToolBar *toolBar = qobject_cast<QToolBar*>(widget)) {
result = toolBarAreaLayout.indexOf(toolBar);
@@ -790,7 +793,7 @@ bool QMainWindowLayoutState::contains(QWidget *widget) const
return true;
#endif
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (!toolBarAreaLayout.indexOf(widget).isEmpty())
return true;
#endif
@@ -833,7 +836,7 @@ QList<int> QMainWindowLayoutState::gapIndex(QWidget *widget,
{
QList<int> result;
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
// is it a toolbar?
if (qobject_cast<QToolBar*>(widget) != 0) {
result = toolBarAreaLayout.gapIndex(pos);
@@ -871,7 +874,7 @@ bool QMainWindowLayoutState::insertGap(const QList<int> &path, QLayoutItem *item
int i = path.first();
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (i == 0) {
Q_ASSERT(qobject_cast<QToolBar*>(item->widget()) != 0);
return toolBarAreaLayout.insertGap(path.mid(1), item);
@@ -892,7 +895,7 @@ void QMainWindowLayoutState::remove(const QList<int> &path)
{
int i = path.first();
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (i == 0)
toolBarAreaLayout.remove(path.mid(1));
#endif
@@ -905,7 +908,7 @@ void QMainWindowLayoutState::remove(const QList<int> &path)
void QMainWindowLayoutState::remove(QLayoutItem *item)
{
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
toolBarAreaLayout.remove(item);
#endif
@@ -921,7 +924,7 @@ void QMainWindowLayoutState::remove(QLayoutItem *item)
void QMainWindowLayoutState::clear()
{
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
toolBarAreaLayout.clear();
#endif
@@ -943,7 +946,7 @@ QLayoutItem *QMainWindowLayoutState::item(const QList<int> &path)
{
int i = path.first();
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (i == 0) {
const QToolBarAreaLayoutItem *tbItem = toolBarAreaLayout.item(path.mid(1));
Q_ASSERT(tbItem);
@@ -963,7 +966,7 @@ QRect QMainWindowLayoutState::itemRect(const QList<int> &path) const
{
int i = path.first();
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (i == 0)
return toolBarAreaLayout.itemRect(path.mid(1));
#endif
@@ -980,7 +983,7 @@ QRect QMainWindowLayoutState::gapRect(const QList<int> &path) const
{
int i = path.first();
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (i == 0)
return toolBarAreaLayout.itemRect(path.mid(1));
#endif
@@ -997,7 +1000,7 @@ QLayoutItem *QMainWindowLayoutState::plug(const QList<int> &path)
{
int i = path.first();
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (i == 0)
return toolBarAreaLayout.plug(path.mid(1));
#endif
@@ -1014,7 +1017,7 @@ QLayoutItem *QMainWindowLayoutState::unplug(const QList<int> &path, QMainWindowL
{
int i = path.first();
-#ifdef QT_NO_TOOLBAR
+#if !QT_CONFIG(toolbar)
Q_UNUSED(other);
#else
if (i == 0)
@@ -1045,7 +1048,7 @@ void QMainWindowLayoutState::saveState(QDataStream &stream) const
}
#endif
#endif
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
toolBarAreaLayout.saveState(stream);
#endif
}
@@ -1092,7 +1095,7 @@ bool QMainWindowLayoutState::checkFormat(QDataStream &stream)
stream >> marker;
switch(marker)
{
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case QToolBarAreaLayout::ToolBarStateMarker:
case QToolBarAreaLayout::ToolBarStateMarkerEx:
{
@@ -1102,7 +1105,7 @@ bool QMainWindowLayoutState::checkFormat(QDataStream &stream)
}
}
break;
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
#if QT_CONFIG(dockwidget)
case QDockAreaLayout::DockWidgetStateMarker:
@@ -1211,7 +1214,7 @@ bool QMainWindowLayoutState::restoreState(QDataStream &_stream,
#endif // QT_CONFIG(tabwidget)
#endif // QT_CONFIG(dockwidget)
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
case QToolBarAreaLayout::ToolBarStateMarker:
case QToolBarAreaLayout::ToolBarStateMarkerEx:
{
@@ -1232,7 +1235,7 @@ bool QMainWindowLayoutState::restoreState(QDataStream &_stream,
}
}
break;
-#endif //QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
default:
return false;
}// switch
@@ -1246,7 +1249,7 @@ bool QMainWindowLayoutState::restoreState(QDataStream &_stream,
** QMainWindowLayoutState - toolbars
*/
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
static inline void validateToolBarArea(Qt::ToolBarArea &area)
{
@@ -1421,7 +1424,7 @@ void QMainWindowLayout::toggleToolBarsVisible()
}
}
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
/******************************************************************************
** QMainWindowLayoutState - dock areas
@@ -1904,7 +1907,7 @@ QLayoutItem *QMainWindowLayout::takeAt(int index)
layoutState.remove(ret);
}
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (!currentGapPos.isEmpty() && currentGapPos.constFirst() == 0) {
currentGapPos = layoutState.toolBarAreaLayout.currentGapIndex();
if (!currentGapPos.isEmpty()) {
@@ -2016,7 +2019,7 @@ void QMainWindowLayout::setCurrentHoveredFloat(QDockWidgetGroupWindow *w)
static void fixToolBarOrientation(QLayoutItem *item, int dockPos)
{
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
QToolBar *toolBar = qobject_cast<QToolBar*>(item->widget());
if (toolBar == 0)
return;
@@ -2143,7 +2146,7 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
{
//this function is called from within the Widget Animator whenever an animation is finished
//on a certain widget
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (QToolBar *tb = qobject_cast<QToolBar*>(widget)) {
QToolBarLayout *tbl = qobject_cast<QToolBarLayout*>(tb->layout());
if (tbl->animating) {
@@ -2214,7 +2217,7 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
dw->d_func()->plug(currentGapRect);
}
#endif
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (QToolBar *tb = qobject_cast<QToolBar*>(widget))
tb->d_func()->plug(currentGapRect);
#endif
@@ -2460,7 +2463,7 @@ QLayoutItem *QMainWindowLayout::unplug(QWidget *widget, bool group)
}
}
#endif // QT_CONFIG(dockwidget)
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (QToolBar *tb = qobject_cast<QToolBar*>(widget)) {
tb->d_func()->unplug(r);
}
@@ -2606,7 +2609,7 @@ void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
if (qobject_cast<QDockWidgetGroupWindow *>(widget))
allowed = true;
#endif
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (QToolBar *tb = qobject_cast<QToolBar*>(widget))
allowed = tb->isAreaAllowed(toToolBarArea(path.at(1)));
#endif
diff --git a/src/widgets/widgets/qmainwindowlayout_p.h b/src/widgets/widgets/qmainwindowlayout_p.h
index 53e045aaae..4ccfb1786e 100644
--- a/src/widgets/widgets/qmainwindowlayout_p.h
+++ b/src/widgets/widgets/qmainwindowlayout_p.h
@@ -69,7 +69,9 @@
#if QT_CONFIG(dockwidget)
#include "qdockarealayout_p.h"
#endif
+#if QT_CONFIG(toolbar)
#include "qtoolbararealayout_p.h"
+#endif
QT_REQUIRE_CONFIG(mainwindow);
@@ -89,13 +91,15 @@ public:
QList<int> hoverSeparator;
QPoint hoverPos;
-#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
+#if QT_CONFIG(dockwidget)
+#if QT_CONFIG(cursor)
QCursor separatorCursor(const QList<int> &path);
void adjustCursor(const QPoint &pos);
QCursor oldCursor;
QCursor adjustedCursor;
bool hasOldCursor = false;
bool cursorAdjusted = false;
+#endif // QT_CONFIG(cursor)
QList<int> movingSeparator;
QPoint movingSeparatorOrigin, movingSeparatorPos;
@@ -105,12 +109,12 @@ public:
bool separatorMove(const QPoint &pos);
bool endSeparatorMove(const QPoint &pos);
-#endif
+#endif // QT_CONFIG(dockwidget)
bool windowEvent(QEvent *e);
};
-#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
+#if QT_CONFIG(dockwidget) && QT_CONFIG(cursor)
template <typename Layout>
QCursor QMainWindowLayoutSeparatorHelper<Layout>::separatorCursor(const QList<int> &path)
{
@@ -183,12 +187,14 @@ void QMainWindowLayoutSeparatorHelper<Layout>::adjustCursor(const QPoint &pos)
}
}
}
+#endif // QT_CONFIG(cursor) && QT_CONFIG(dockwidget)
template <typename Layout>
bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
{
QWidget *w = window();
switch (event->type()) {
+#if QT_CONFIG(dockwidget)
case QEvent::Paint: {
QPainter p(w);
QRegion r = static_cast<QPaintEvent *>(event)->region();
@@ -196,7 +202,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
break;
}
-#ifndef QT_NO_CURSOR
+#if QT_CONFIG(cursor)
case QEvent::HoverMove: {
adjustCursor(static_cast<QHoverEvent *>(event)->pos());
break;
@@ -212,7 +218,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
case QEvent::ShortcutOverride: // when a menu pops up
adjustCursor(QPoint(0, 0));
break;
-#endif // QT_NO_CURSOR
+#endif // QT_CONFIG(cursor)
case QEvent::MouseButtonPress: {
QMouseEvent *e = static_cast<QMouseEvent *>(event);
@@ -227,7 +233,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
case QEvent::MouseMove: {
QMouseEvent *e = static_cast<QMouseEvent *>(event);
-#ifndef QT_NO_CURSOR
+#if QT_CONFIG(cursor)
adjustCursor(e->pos());
#endif
if (e->buttons() & Qt::LeftButton) {
@@ -251,7 +257,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
break;
}
-#if !defined(QT_NO_CURSOR)
+#if QT_CONFIG(cursor)
case QEvent::CursorChange:
// CursorChange events are triggered as mouse moves to new widgets even
// if the cursor doesn't actually change, so do not change oldCursor if
@@ -264,7 +270,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
w->setCursor(adjustedCursor);
}
break;
-#endif
+#endif // QT_CONFIG(cursor)
case QEvent::Timer:
if (static_cast<QTimerEvent *>(event)->timerId() == separatorMoveTimer.timerId()) {
// let's move the separators
@@ -284,12 +290,14 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
return true;
}
break;
+#endif // QT_CONFIG(dockwidget)
default:
break;
}
return false;
}
+#if QT_CONFIG(dockwidget)
template <typename Layout>
bool QMainWindowLayoutSeparatorHelper<Layout>::startSeparatorMove(const QPoint &pos)
{
@@ -321,9 +329,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::endSeparatorMove(const QPoint &)
layout()->savedState.clear();
return true;
}
-#endif
-#if QT_CONFIG(dockwidget)
class QDockWidgetGroupWindow : public QWidget
{
Q_OBJECT
@@ -369,7 +375,7 @@ public:
private:
QLayout *lay() const { return const_cast<QDockWidgetGroupWindowItem *>(this)->widget()->layout(); }
};
-#endif
+#endif // QT_CONFIG(dockwidget)
/* This data structure represents the state of all the tool-bars and dock-widgets. It's value based
so it can be easilly copied into a temporary variable. All operations are performed without moving
@@ -385,7 +391,7 @@ public:
QMainWindowLayoutState(QMainWindow *win);
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
QToolBarAreaLayout toolBarAreaLayout;
#endif
@@ -462,7 +468,7 @@ public:
// toolbars
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
void addToolBarBreak(Qt::ToolBarArea area);
void insertToolBarBreak(QToolBar *before);
void removeToolBarBreak(QToolBar *before);
diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h
index b6afb05e3a..721a35bf90 100644
--- a/src/widgets/widgets/qmenu_p.h
+++ b/src/widgets/widgets/qmenu_p.h
@@ -68,6 +68,33 @@ QT_REQUIRE_CONFIG(menu);
QT_BEGIN_NAMESPACE
+static inline int pick(Qt::Orientation o, const QPoint &pos)
+{ return o == Qt::Horizontal ? pos.x() : pos.y(); }
+
+static inline int pick(Qt::Orientation o, const QSize &size)
+{ return o == Qt::Horizontal ? size.width() : size.height(); }
+
+static inline int &rpick(Qt::Orientation o, QPoint &pos)
+{ return o == Qt::Horizontal ? pos.rx() : pos.ry(); }
+
+static inline int &rpick(Qt::Orientation o, QSize &size)
+{ return o == Qt::Horizontal ? size.rwidth() : size.rheight(); }
+
+static inline QSizePolicy::Policy pick(Qt::Orientation o, const QSizePolicy &policy)
+{ return o == Qt::Horizontal ? policy.horizontalPolicy() : policy.verticalPolicy(); }
+
+static inline int perp(Qt::Orientation o, const QPoint &pos)
+{ return o == Qt::Vertical ? pos.x() : pos.y(); }
+
+static inline int perp(Qt::Orientation o, const QSize &size)
+{ return o == Qt::Vertical ? size.width() : size.height(); }
+
+static inline int &rperp(Qt::Orientation o, QPoint &pos)
+{ return o == Qt::Vertical ? pos.rx() : pos.ry(); }
+
+static inline int &rperp(Qt::Orientation o, QSize &size)
+{ return o == Qt::Vertical ? size.rwidth() : size.rheight(); }
+
class QTornOffMenu;
class QEventLoop;
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index b0a75288e8..4758f64c8c 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -52,7 +52,9 @@
#if QT_CONFIG(mainwindow)
#include <qmainwindow.h>
#endif
+#if QT_CONFIG(toolbar)
#include <qtoolbar.h>
+#endif
#if QT_CONFIG(toolbutton)
#include <qtoolbutton.h>
#endif
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp
index e66b702ffd..903a9349ec 100644
--- a/src/widgets/widgets/qplaintextedit.cpp
+++ b/src/widgets/widgets/qplaintextedit.cpp
@@ -44,7 +44,9 @@
#include <qpainter.h>
#include <qevent.h>
#include <qdebug.h>
+#if QT_CONFIG(draganddrop)
#include <qdrag.h>
+#endif
#include <qclipboard.h>
#if QT_CONFIG(menu)
#include <qmenu.h>
@@ -2139,7 +2141,7 @@ void QPlainTextEdit::contextMenuEvent(QContextMenuEvent *e)
}
#endif // QT_NO_CONTEXTMENU
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*! \reimp
*/
void QPlainTextEdit::dragEnterEvent(QDragEnterEvent *e)
@@ -2180,7 +2182,7 @@ void QPlainTextEdit::dropEvent(QDropEvent *e)
d->sendControlEvent(e);
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*! \reimp
*/
diff --git a/src/widgets/widgets/qplaintextedit.h b/src/widgets/widgets/qplaintextedit.h
index 34ec96715e..e5ac4c82b8 100644
--- a/src/widgets/widgets/qplaintextedit.h
+++ b/src/widgets/widgets/qplaintextedit.h
@@ -247,7 +247,7 @@ protected:
#ifndef QT_NO_CONTEXTMENU
virtual void contextMenuEvent(QContextMenuEvent *e) override;
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
virtual void dragEnterEvent(QDragEnterEvent *e) override;
virtual void dragLeaveEvent(QDragLeaveEvent *e) override;
virtual void dragMoveEvent(QDragMoveEvent *e) override;
diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp
index afb17f533b..8f7271c2dc 100644
--- a/src/widgets/widgets/qpushbutton.cpp
+++ b/src/widgets/widgets/qpushbutton.cpp
@@ -53,7 +53,9 @@
#include "qpushbutton.h"
#include "qstyle.h"
#include "qstyleoption.h"
+#if QT_CONFIG(toolbar)
#include "qtoolbar.h"
+#endif
#include "qdebug.h"
#include "qlayoutitem.h"
#if QT_CONFIG(dialogbuttonbox)
@@ -596,7 +598,7 @@ QPoint QPushButtonPrivate::adjustedMenuPosition()
Q_Q(QPushButton);
bool horizontal = true;
-#if !defined(QT_NO_TOOLBAR)
+#if QT_CONFIG(toolbar)
QToolBar *tb = qobject_cast<QToolBar*>(parent);
if (tb && tb->orientation() == Qt::Vertical)
horizontal = false;
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index 2f2d1bceee..8af70d0f9c 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -1668,7 +1668,7 @@ bool QTabBar::event(QEvent *event)
d->updateMacBorderMetrics();
return QWidget::event(event);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
} else if (event->type() == QEvent::DragEnter) {
if (d->changeCurrentOnDrag)
event->accept();
diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp
index 894053ec19..df847e4894 100644
--- a/src/widgets/widgets/qtabwidget.cpp
+++ b/src/widgets/widgets/qtabwidget.cpp
@@ -376,7 +376,8 @@ QTabWidget::~QTabWidget()
\fn int QTabWidget::addTab(QWidget *page, const QString &label)
Adds a tab with the given \a page and \a label to the tab widget,
- and returns the index of the tab in the tab bar.
+ and returns the index of the tab in the tab bar. Ownership of \a page
+ is passed on to the QTabWidget.
If the tab's \a label contains an ampersand, the letter following
the ampersand is used as a shortcut for the tab, e.g. if the
@@ -403,7 +404,8 @@ int QTabWidget::addTab(QWidget *child, const QString &label)
\overload
Adds a tab with the given \a page, \a icon, and \a label to the tab
- widget, and returns the index of the tab in the tab bar.
+ widget, and returns the index of the tab in the tab bar. Ownership
+ of \a page is passed on to the QTabWidget.
This function is the same as addTab(), but with an additional \a
icon.
@@ -419,7 +421,8 @@ int QTabWidget::addTab(QWidget *child, const QIcon& icon, const QString &label)
Inserts a tab with the given \a label and \a page into the tab
widget at the specified \a index, and returns the index of the
- inserted tab in the tab bar.
+ inserted tab in the tab bar. Ownership of \a page is passed on to the
+ QTabWidget.
The label is displayed in the tab and may vary in appearance depending
on the configuration of the tab widget.
@@ -458,7 +461,8 @@ int QTabWidget::insertTab(int index, QWidget *w, const QString &label)
Inserts a tab with the given \a label, \a page, and \a icon into
the tab widget at the specified \a index, and returns the index of the
- inserted tab in the tab bar.
+ inserted tab in the tab bar. Ownership of \a page is passed on to the
+ QTabWidget.
This function is the same as insertTab(), but with an additional
\a icon.
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index 95c85dc4fe..8a9a0eaf96 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -49,7 +49,9 @@
#include <qpainter.h>
#include <qevent.h>
#include <qdebug.h>
+#if QT_CONFIG(draganddrop)
#include <qdrag.h>
+#endif
#include <qclipboard.h>
#if QT_CONFIG(menu)
#include <qmenu.h>
@@ -1648,7 +1650,7 @@ void QTextEdit::contextMenuEvent(QContextMenuEvent *e)
}
#endif // QT_NO_CONTEXTMENU
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
/*! \reimp
*/
void QTextEdit::dragEnterEvent(QDragEnterEvent *e)
@@ -1689,7 +1691,7 @@ void QTextEdit::dropEvent(QDropEvent *e)
d->sendControlEvent(e);
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
/*! \reimp
*/
diff --git a/src/widgets/widgets/qtextedit.h b/src/widgets/widgets/qtextedit.h
index 9e0913160d..51d6c2ccba 100644
--- a/src/widgets/widgets/qtextedit.h
+++ b/src/widgets/widgets/qtextedit.h
@@ -284,7 +284,7 @@ protected:
#ifndef QT_NO_CONTEXTMENU
virtual void contextMenuEvent(QContextMenuEvent *e) override;
#endif
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
virtual void dragEnterEvent(QDragEnterEvent *e) override;
virtual void dragLeaveEvent(QDragLeaveEvent *e) override;
virtual void dragMoveEvent(QDragMoveEvent *e) override;
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index 7b6a2a329f..4e90bce69d 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -39,8 +39,6 @@
#include "qtoolbar.h"
-#ifndef QT_NO_TOOLBAR
-
#include <qapplication.h>
#if QT_CONFIG(combobox)
#include <qcombobox.h>
@@ -1288,5 +1286,3 @@ void QToolBar::initStyleOption(QStyleOptionToolBar *option) const
QT_END_NAMESPACE
#include "moc_qtoolbar.cpp"
-
-#endif // QT_NO_TOOLBAR
diff --git a/src/widgets/widgets/qtoolbar.h b/src/widgets/widgets/qtoolbar.h
index 0253541a2e..4ae83190d1 100644
--- a/src/widgets/widgets/qtoolbar.h
+++ b/src/widgets/widgets/qtoolbar.h
@@ -44,10 +44,9 @@
#include <QtWidgets/qaction.h>
#include <QtWidgets/qwidget.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(toolbar);
-#ifndef QT_NO_TOOLBAR
+QT_BEGIN_NAMESPACE
class QToolBarPrivate;
@@ -211,8 +210,6 @@ private:
inline QAction *QToolBar::actionAt(int ax, int ay) const
{ return actionAt(QPoint(ax, ay)); }
-#endif // QT_NO_TOOLBAR
-
QT_END_NAMESPACE
#endif // QDYNAMICTOOLBAR_H
diff --git a/src/widgets/widgets/qtoolbar_p.h b/src/widgets/widgets/qtoolbar_p.h
index 616f53f717..4db75762c8 100644
--- a/src/widgets/widgets/qtoolbar_p.h
+++ b/src/widgets/widgets/qtoolbar_p.h
@@ -57,9 +57,9 @@
#include "private/qwidget_p.h"
#include <QtCore/qbasictimer.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(toolbar);
-#ifndef QT_NO_TOOLBAR
+QT_BEGIN_NAMESPACE
class QToolBarLayout;
class QTimer;
@@ -127,8 +127,6 @@ public:
QBasicTimer waitForPopupTimer;
};
-#endif // QT_NO_TOOLBAR
-
QT_END_NAMESPACE
#endif // QDYNAMICTOOLBAR_P_H
diff --git a/src/widgets/widgets/qtoolbararealayout.cpp b/src/widgets/widgets/qtoolbararealayout.cpp
index 0c57d9251d..edf497111b 100644
--- a/src/widgets/widgets/qtoolbararealayout.cpp
+++ b/src/widgets/widgets/qtoolbararealayout.cpp
@@ -53,8 +53,6 @@
** QToolBarAreaLayoutItem
*/
-#ifndef QT_NO_TOOLBAR
-
QT_BEGIN_NAMESPACE
// qmainwindow.cpp
@@ -1391,5 +1389,3 @@ bool QToolBarAreaLayout::isEmpty() const
}
QT_END_NAMESPACE
-
-#endif // QT_NO_TOOLBAR
diff --git a/src/widgets/widgets/qtoolbararealayout_p.h b/src/widgets/widgets/qtoolbararealayout_p.h
index 901f04cf14..dffbab1f21 100644
--- a/src/widgets/widgets/qtoolbararealayout_p.h
+++ b/src/widgets/widgets/qtoolbararealayout_p.h
@@ -52,40 +52,14 @@
//
#include <QtWidgets/private/qtwidgetsglobal_p.h>
+#include "qmenu_p.h"
#include <QList>
#include <QSize>
#include <QRect>
-QT_BEGIN_NAMESPACE
-
-static inline int pick(Qt::Orientation o, const QPoint &pos)
-{ return o == Qt::Horizontal ? pos.x() : pos.y(); }
-
-static inline int pick(Qt::Orientation o, const QSize &size)
-{ return o == Qt::Horizontal ? size.width() : size.height(); }
-
-static inline int &rpick(Qt::Orientation o, QPoint &pos)
-{ return o == Qt::Horizontal ? pos.rx() : pos.ry(); }
-
-static inline int &rpick(Qt::Orientation o, QSize &size)
-{ return o == Qt::Horizontal ? size.rwidth() : size.rheight(); }
-
-static inline QSizePolicy::Policy pick(Qt::Orientation o, const QSizePolicy &policy)
-{ return o == Qt::Horizontal ? policy.horizontalPolicy() : policy.verticalPolicy(); }
-
-static inline int perp(Qt::Orientation o, const QPoint &pos)
-{ return o == Qt::Vertical ? pos.x() : pos.y(); }
+QT_REQUIRE_CONFIG(toolbar);
-static inline int perp(Qt::Orientation o, const QSize &size)
-{ return o == Qt::Vertical ? size.width() : size.height(); }
-
-static inline int &rperp(Qt::Orientation o, QPoint &pos)
-{ return o == Qt::Vertical ? pos.rx() : pos.ry(); }
-
-static inline int &rperp(Qt::Orientation o, QSize &size)
-{ return o == Qt::Vertical ? size.rwidth() : size.rheight(); }
-
-#ifndef QT_NO_TOOLBAR
+QT_BEGIN_NAMESPACE
class QToolBar;
class QLayoutItem;
@@ -244,7 +218,6 @@ public:
bool isEmpty() const;
};
-
QT_END_NAMESPACE
-#endif // QT_NO_TOOLBAR
+
#endif // QTOOLBARAREALAYOUT_P_H
diff --git a/src/widgets/widgets/qtoolbarlayout.cpp b/src/widgets/widgets/qtoolbarlayout.cpp
index 118cb2ae61..f2d329d59d 100644
--- a/src/widgets/widgets/qtoolbarlayout.cpp
+++ b/src/widgets/widgets/qtoolbarlayout.cpp
@@ -59,8 +59,6 @@
#include "qtoolbarlayout_p.h"
#include "qtoolbarseparator_p.h"
-#ifndef QT_NO_TOOLBAR
-
QT_BEGIN_NAMESPACE
// qmainwindow.cpp
@@ -753,5 +751,3 @@ QToolBarItem *QToolBarLayout::createItem(QAction *action)
QT_END_NAMESPACE
#include "moc_qtoolbarlayout_p.cpp"
-
-#endif // QT_NO_TOOLBAR
diff --git a/src/widgets/widgets/qtoolbarlayout_p.h b/src/widgets/widgets/qtoolbarlayout_p.h
index 8c60164439..b813cd5e2c 100644
--- a/src/widgets/widgets/qtoolbarlayout_p.h
+++ b/src/widgets/widgets/qtoolbarlayout_p.h
@@ -56,9 +56,9 @@
#include <private/qlayoutengine_p.h>
#include <QVector>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(toolbar);
-#ifndef QT_NO_TOOLBAR
+QT_BEGIN_NAMESPACE
class QAction;
class QToolBarExtension;
@@ -127,8 +127,6 @@ private:
QMenu *popupMenu;
};
-#endif // QT_NO_TOOLBAR
-
QT_END_NAMESPACE
#endif // QTOOLBARLAYOUT_P_H
diff --git a/src/widgets/widgets/qtoolbarseparator.cpp b/src/widgets/widgets/qtoolbarseparator.cpp
index c99a8bcc4c..92cd08317a 100644
--- a/src/widgets/widgets/qtoolbarseparator.cpp
+++ b/src/widgets/widgets/qtoolbarseparator.cpp
@@ -39,8 +39,6 @@
#include "qtoolbarseparator_p.h"
-#ifndef QT_NO_TOOLBAR
-
#include <qstyle.h>
#include <qstyleoption.h>
#include <qtoolbar.h>
@@ -87,5 +85,3 @@ void QToolBarSeparator::paintEvent(QPaintEvent *)
QT_END_NAMESPACE
#include "moc_qtoolbarseparator_p.cpp"
-
-#endif // QT_NO_TOOLBAR
diff --git a/src/widgets/widgets/qtoolbarseparator_p.h b/src/widgets/widgets/qtoolbarseparator_p.h
index d52b4fa6ae..60b51a28cb 100644
--- a/src/widgets/widgets/qtoolbarseparator_p.h
+++ b/src/widgets/widgets/qtoolbarseparator_p.h
@@ -54,9 +54,9 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include "QtWidgets/qwidget.h"
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(toolbar);
-#ifndef QT_NO_TOOLBAR
+QT_BEGIN_NAMESPACE
class QStyleOption;
class QToolBar;
@@ -80,8 +80,6 @@ public Q_SLOTS:
void setOrientation(Qt::Orientation orientation);
};
-#endif // QT_NO_TOOLBAR
-
QT_END_NAMESPACE
#endif // QDYNAMICTOOLBARSEPARATOR_P_H
diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp
index c2bf13a3e9..c94c10574f 100644
--- a/src/widgets/widgets/qtoolbutton.cpp
+++ b/src/widgets/widgets/qtoolbutton.cpp
@@ -53,7 +53,9 @@
#if QT_CONFIG(mainwindow)
#include <qmainwindow.h>
#endif
+#if QT_CONFIG(toolbar)
#include <qtoolbar.h>
+#endif
#include <qvariant.h>
#include <qstylepainter.h>
#include <private/qabstractbutton_p.h>
@@ -201,7 +203,7 @@ void QToolButtonPrivate::init()
{
Q_Q(QToolButton);
defaultAction = 0;
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (qobject_cast<QToolBar*>(parent))
autoRaise = true;
else
@@ -245,13 +247,13 @@ void QToolButton::initStyleOption(QStyleOptionToolButton *option) const
bool forceNoText = false;
option->iconSize = iconSize(); //default value
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
if (parentWidget()) {
if (QToolBar *toolBar = qobject_cast<QToolBar *>(parentWidget())) {
option->iconSize = toolBar->iconSize();
}
}
-#endif // QT_NO_TOOLBAR
+#endif // QT_CONFIG(toolbar)
if (!forceNoText)
option->text = d->text;
@@ -571,7 +573,7 @@ void QToolButton::timerEvent(QTimerEvent *e)
*/
void QToolButton::changeEvent(QEvent *e)
{
-#ifndef QT_NO_TOOLBAR
+#if QT_CONFIG(toolbar)
Q_D(QToolButton);
if (e->type() == QEvent::ParentChange) {
if (qobject_cast<QToolBar*>(parentWidget()))
@@ -743,7 +745,7 @@ void QToolButtonPrivate::popupTimerDone()
repeat = q->autoRepeat();
q->setAutoRepeat(false);
bool horizontal = true;
-#if !defined(QT_NO_TOOLBAR)
+#if QT_CONFIG(toolbar)
QToolBar *tb = qobject_cast<QToolBar*>(parent);
if (tb && tb->orientation() == Qt::Vertical)
horizontal = false;
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index d3203e180b..e179ea3b40 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -46,7 +46,9 @@
#include <qpainter.h>
#include <qevent.h>
#include <qdebug.h>
+#if QT_CONFIG(draganddrop)
#include <qdrag.h>
+#endif
#include <qclipboard.h>
#if QT_CONFIG(menu)
#include <qmenu.h>
@@ -129,7 +131,7 @@ QWidgetTextControlPrivate::QWidgetTextControlPrivate()
interactionFlags(Qt::TextEditable | Qt::TextSelectableByKeyboard),
#endif
dragEnabled(true),
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
mousePressed(false), mightStartDrag(false),
#endif
lastSelectionPosition(0), lastSelectionAnchor(0),
@@ -514,7 +516,7 @@ void QWidgetTextControlPrivate::setContent(Qt::TextFormat format, const QString
void QWidgetTextControlPrivate::startDrag()
{
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
Q_Q(QWidgetTextControl);
mousePressed = false;
if (!contextWidget)
@@ -1066,7 +1068,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
}
#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
case QEvent::DragEnter: {
QDragEnterEvent *ev = static_cast<QDragEnterEvent *>(e);
if (d->dragEnterEvent(e, ev->mimeData()))
@@ -1545,7 +1547,7 @@ void QWidgetTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton butto
mousePressPos = pos.toPoint();
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
mightStartDrag = false;
#endif
@@ -1615,7 +1617,7 @@ void QWidgetTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton butto
&& cursorPos >= cursor.selectionStart()
&& cursorPos <= cursor.selectionEnd()
&& q->hitTest(pos, Qt::ExactHit) != -1) {
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
mightStartDrag = true;
#endif
return;
@@ -1744,7 +1746,7 @@ void QWidgetTextControlPrivate::mouseReleaseEvent(QEvent *e, Qt::MouseButton but
const int oldCursorPos = cursor.position();
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (mightStartDrag && (button & Qt::LeftButton)) {
mousePressed = false;
setCursorPosition(pos);
@@ -1807,7 +1809,7 @@ void QWidgetTextControlPrivate::mouseDoubleClickEvent(QEvent *e, Qt::MouseButton
if (button == Qt::LeftButton
&& (interactionFlags & Qt::TextSelectableByMouse)) {
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
mightStartDrag = false;
#endif
commitPreedit();
@@ -1977,8 +1979,12 @@ void QWidgetTextControlPrivate::inputMethodEvent(QInputMethodEvent *e)
cursor.removeSelectedText();
}
+ QTextBlock block;
+
// insert commit string
if (!e->commitString().isEmpty() || e->replacementLength()) {
+ if (e->commitString().endsWith(QChar::LineFeed))
+ block = cursor.block(); // Remember the block where the preedit text is
QTextCursor c = cursor;
c.setPosition(c.position() + e->replacementStart());
c.setPosition(c.position() + e->replacementLength(), QTextCursor::KeepAnchor);
@@ -1997,7 +2003,8 @@ void QWidgetTextControlPrivate::inputMethodEvent(QInputMethodEvent *e)
}
}
- QTextBlock block = cursor.block();
+ if (!block.isValid())
+ block = cursor.block();
QTextLayout *layout = block.layout();
if (isGettingInput)
layout->setPreeditArea(cursor.position() - block.position(), e->preeditString());
diff --git a/src/widgets/widgets/widgets.pri b/src/widgets/widgets/widgets.pri
index a197c41b95..55804c5aaf 100644
--- a/src/widgets/widgets/widgets.pri
+++ b/src/widgets/widgets/widgets.pri
@@ -3,25 +3,16 @@
HEADERS += \
widgets/qframe.h \
widgets/qframe_p.h \
- widgets/qtoolbar.h \
- widgets/qtoolbar_p.h \
- widgets/qtoolbarlayout_p.h \
- widgets/qtoolbarseparator_p.h \
widgets/qabstractscrollarea.h \
widgets/qabstractscrollarea_p.h \
widgets/qfocusframe.h \
- widgets/qwidgetanimator_p.h \
- widgets/qtoolbararealayout_p.h
+ widgets/qwidgetanimator_p.h
SOURCES += \
widgets/qframe.cpp \
- widgets/qtoolbar.cpp \
- widgets/qtoolbarlayout.cpp \
- widgets/qtoolbarseparator.cpp \
widgets/qabstractscrollarea.cpp \
widgets/qfocusframe.cpp \
- widgets/qwidgetanimator.cpp \
- widgets/qtoolbararealayout.cpp
+ widgets/qwidgetanimator.cpp
qtConfig(abstractbutton) {
HEADERS += \
@@ -326,6 +317,21 @@ qtConfig(tabwidget) {
SOURCES += widgets/qtabwidget.cpp
}
+qtConfig(toolbar) {
+ HEADERS += \
+ widgets/qtoolbar.h \
+ widgets/qtoolbar_p.h \
+ widgets/qtoolbararealayout_p.h \
+ widgets/qtoolbarlayout_p.h \
+ widgets/qtoolbarseparator_p.h
+
+ SOURCES += \
+ widgets/qtoolbar.cpp \
+ widgets/qtoolbarlayout.cpp \
+ widgets/qtoolbararealayout.cpp \
+ widgets/qtoolbarseparator.cpp
+}
+
qtConfig(toolbox) {
HEADERS += widgets/qtoolbox.h
SOURCES += widgets/qtoolbox.cpp