summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/features/cmake_functions.prf2
-rw-r--r--mkspecs/features/mac/default_post.prf13
-rw-r--r--mkspecs/features/qt_functions.prf12
-rw-r--r--mkspecs/features/qt_module.prf17
-rw-r--r--src/android/java/AndroidManifest.xml2
-rw-r--r--src/corelib/global/global.pri5
-rw-r--r--src/corelib/global/qglobal.cpp8
-rw-r--r--src/corelib/global/qsysinfo.h4
-rw-r--r--src/corelib/global/qsystemdetection.h11
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp4
-rw-r--r--src/openglextensions/qopenglextensions.cpp51
-rw-r--r--src/openglextensions/qopenglextensions.h51
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp4
-rw-r--r--src/widgets/kernel/qapplication.cpp49
-rw-r--r--src/widgets/kernel/qshortcut.cpp27
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp2
-rw-r--r--tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp13
-rw-r--r--util/glgen/qopenglextensions.cpp.header51
-rw-r--r--util/glgen/qopenglextensions.h.header51
19 files changed, 223 insertions, 154 deletions
diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf
index a67fd9af9b..2dc72a7a2f 100644
--- a/mkspecs/features/cmake_functions.prf
+++ b/mkspecs/features/cmake_functions.prf
@@ -54,7 +54,7 @@ defineReplace(cmakeProcessLibs) {
variable = $$1
out =
for(v, variable) {
- if(!equals(v, -framework):!equals(v, -L.*)) {
+ if(!equals(v, -framework):!contains(v, -L.*)) {
v ~= s,^-l,,
v ~= s,^-lib,,
v ~= s,.lib$,,
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 0538a81771..b183814e63 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -1,12 +1,12 @@
load(default_post)
!no_objective_c:CONFIG += objective_c
-# Pick a suitable default architecture for qmake-based applications.
-# If the Qt package contains one of x86 and x86_64, pick that one. If it
-# contains both then use the compiler default. Make a similiar decision for
-# PowerPC-based systems. Note that this logic assumes that Qt has been
-# configured with an architecture that is usable on the system.
qt:!isEmpty(QT_CONFIG) {
+ # Pick a suitable default architecture for qmake-based applications.
+ # If the Qt package contains one of x86 and x86_64, pick that one. If it
+ # contains both then use the compiler default. Make a similar decision for
+ # PowerPC-based systems. Note that this logic assumes that Qt has been
+ # configured with an architecture that is usable on the system.
contains(QMAKE_HOST.arch, ppc)|contains(QMAKE_HOST.arch, "Power Macintosh") {
!contains(QT_CONFIG, ppc64):contains(QT_CONFIG, ppc):CONFIG += ppc
contains(QT_CONFIG, ppc64):!contains(QT_CONFIG, ppc):CONFIG += ppc64
@@ -14,6 +14,9 @@ qt:!isEmpty(QT_CONFIG) {
!contains(QT_CONFIG, x86_64):contains(QT_CONFIG, x86):CONFIG += x86
contains(QT_CONFIG, x86_64):!contains(QT_CONFIG, x86):CONFIG += x86_64
}
+
+ # Ensure that C++11 is always used when linking against a static Qt build
+ contains(QT_CONFIG, static):contains(QT_CONFIG, c++11): CONFIG += c++11
}
isEmpty(_QMAKE_CACHE_) {
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 2f5deb8e43..cd74c1d7cf 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -74,17 +74,17 @@ defineTest(qtAddModule) {
}
unset(LINKAGE)
- mac {
- contains(MODULE_CONFIG, lib_bundle) {
+ mac:contains(MODULE_CONFIG, lib_bundle) {
FRAMEWORK_INCLUDE = $${MODULE_LIBS}/$${MODULE_NAME}.framework/Headers
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
INCLUDEPATH *= $$FRAMEWORK_INCLUDE
- LINKAGE = -F$${MODULE_LIBS}
- } else {
- QMAKE_FRAMEWORKPATH *= $${MODULE_LIBS}
}
+ auto_use_privates|isEqual(2, UsePrivate): \
+ INCLUDEPATH += \
+ $$FRAMEWORK_INCLUDE/$$eval(QT.$${1}.VERSION) \
+ $$FRAMEWORK_INCLUDE/$$eval(QT.$${1}.VERSION)/$$MODULE_NAME
+ QMAKE_FRAMEWORKPATH *= $${MODULE_LIBS}
LINKAGE += -framework $${MODULE_NAME}$${QT_LIBINFIX}
- }
}
# Re-insert the major version in the library name (cf qtLibraryTarget above)
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 429e00bed9..46f8e56ad5 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -91,14 +91,15 @@ else: \
mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
#QMAKE_FRAMEWORK_VERSION = 4.0
CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
- CONFIG(release, debug|release) {
- !debug_and_release|build_pass {
- CONFIG -= qt_install_headers #no need to install these as well
- FRAMEWORK_HEADERS.version = Versions
- FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
- FRAMEWORK_HEADERS.path = Headers
- }
- QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
+ CONFIG -= qt_install_headers #no need to install these as well
+ !debug_and_release|if(build_all:CONFIG(release, debug|release)) {
+ FRAMEWORK_HEADERS.version = Versions
+ FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
+ FRAMEWORK_HEADERS.path = Headers
+ FRAMEWORK_PRIVATE_HEADERS.version = Versions
+ FRAMEWORK_PRIVATE_HEADERS.files = $$SYNCQT.PRIVATE_HEADER_FILES
+ FRAMEWORK_PRIVATE_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME
+ QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS FRAMEWORK_PRIVATE_HEADERS
}
}
diff --git a/src/android/java/AndroidManifest.xml b/src/android/java/AndroidManifest.xml
index 48fb23ab28..2a6f52b315 100644
--- a/src/android/java/AndroidManifest.xml
+++ b/src/android/java/AndroidManifest.xml
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="org.qtproject.example">
<application android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="@string/app_name">
- <activity android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="@string/app_name" android:configChanges="orientation|locale|fontScale|keyboard|keyboardHidden" >
+ <activity android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="@string/app_name" android:configChanges="orientation|locale|fontScale|keyboard|keyboardHidden|navigation" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index 4084d4f2ad..a0842a946d 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -30,9 +30,12 @@ SOURCES += \
INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
# configure creates these, not syncqt, so we need to manually inject them
-targ_headers.files += \
+qconfig_h_files = \
$$OUT_PWD/global/qconfig.h \
$$QT_BUILD_TREE/include/QtCore/QtConfig
+targ_headers.files += $$qconfig_h_files
+contains(QMAKE_BUNDLE_DATA, FRAMEWORK_HEADERS): \
+ FRAMEWORK_HEADERS.files += $$qconfig_h_files
# Only used on platforms with CONFIG += precompile_header
PRECOMPILED_HEADER = global/qt_pch.h
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index eb0455c31e..c085dbaa4d 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1042,7 +1042,7 @@ bool qSharedBuild() Q_DECL_NOTHROW
\enum QSysInfo::MacVersion
This enum provides symbolic names for the various versions of the
- Macintosh operating system. On Mac, the
+ OS X operating system. On OS X, the
QSysInfo::MacintoshVersion variable gives the version of the
system on which the application is run.
@@ -1054,8 +1054,9 @@ bool qSharedBuild() Q_DECL_NOTHROW
\value MV_10_4 Mac OS X 10.4 (unsupported)
\value MV_10_5 Mac OS X 10.5 (unsupported)
\value MV_10_6 Mac OS X 10.6
- \value MV_10_7 Mac OS X 10.7
- \value MV_10_8 Mac OS X 10.8
+ \value MV_10_7 OS X 10.7
+ \value MV_10_8 OS X 10.8
+ \value MV_10_9 OS X 10.9
\value MV_Unknown An unknown and currently unsupported platform
\value MV_CHEETAH Apple codename for MV_10_0
@@ -1067,6 +1068,7 @@ bool qSharedBuild() Q_DECL_NOTHROW
\value MV_SNOWLEOPARD Apple codename for MV_10_6
\value MV_LION Apple codename for MV_10_7
\value MV_MOUNTAINLION Apple codename for MV_10_8
+ \value MV_MAVERICKS Apple codename for MV_10_9
\sa WinVersion
*/
diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h
index 58939cc013..a6accdfebc 100644
--- a/src/corelib/global/qsysinfo.h
+++ b/src/corelib/global/qsysinfo.h
@@ -132,6 +132,7 @@ public:
MV_10_6 = 0x0008,
MV_10_7 = 0x0009,
MV_10_8 = 0x000A,
+ MV_10_9 = 0x000B,
/* codenames */
MV_CHEETAH = MV_10_0,
@@ -142,7 +143,8 @@ public:
MV_LEOPARD = MV_10_5,
MV_SNOWLEOPARD = MV_10_6,
MV_LION = MV_10_7,
- MV_MOUNTAINLION = MV_10_8
+ MV_MOUNTAINLION = MV_10_8,
+ MV_MAVERICKS = MV_10_9
};
static const MacVersion MacintoshVersion;
static MacVersion macVersion();
diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h
index 690442d066..cb55fa808b 100644
--- a/src/corelib/global/qsystemdetection.h
+++ b/src/corelib/global/qsystemdetection.h
@@ -207,12 +207,18 @@
# if !defined(__MAC_10_8)
# define __MAC_10_8 1080
# endif
+# if !defined(__MAC_10_9)
+# define __MAC_10_9 1090
+# endif
# if !defined(MAC_OS_X_VERSION_10_7)
# define MAC_OS_X_VERSION_10_7 1070
# endif
# if !defined(MAC_OS_X_VERSION_10_8)
# define MAC_OS_X_VERSION_10_8 1080
# endif
+# if !defined(MAC_OS_X_VERSION_10_9)
+# define MAC_OS_X_VERSION_10_9 1090
+# endif
#
# if !defined(__IPHONE_4_3)
# define __IPHONE_4_3 40300
@@ -229,9 +235,12 @@
# if !defined(__IPHONE_6_1)
# define __IPHONE_6_1 60100
# endif
+# if !defined(__IPHONE_7_0)
+# define __IPHONE_7_0 70000
+# endif
#
# if (__MAC_OS_X_VERSION_MAX_ALLOWED > __MAC_10_8)
-# warning "This version of Mac OS X is unsupported"
+# warning "This version of OS X is unsupported"
# endif
#endif
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index fdbd6e01e4..2c9ed9da3d 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -1034,6 +1034,10 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea
}
if (oldslash != -1)
oldslash = dirName.indexOf(QDir::separator(), oldslash);
+ } else if (dirName.size() > 2
+ && dirName.at(1) == QLatin1Char(':')) {
+ // Don't try to call mkdir with just a drive letter
+ oldslash = 2;
}
for (int slash=0; slash != -1; oldslash = slash) {
slash = dirName.indexOf(QDir::separator(), oldslash+1);
diff --git a/src/openglextensions/qopenglextensions.cpp b/src/openglextensions/qopenglextensions.cpp
index 2119a86ccf..58bd31a339 100644
--- a/src/openglextensions/qopenglextensions.cpp
+++ b/src/openglextensions/qopenglextensions.cpp
@@ -5,35 +5,34 @@
**
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
diff --git a/src/openglextensions/qopenglextensions.h b/src/openglextensions/qopenglextensions.h
index 7d6c21e4e5..78bbf4b0cb 100644
--- a/src/openglextensions/qopenglextensions.h
+++ b/src/openglextensions/qopenglextensions.h
@@ -5,35 +5,34 @@
**
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 065989735c..b9a2b0d37b 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -1369,10 +1369,10 @@ void QXcbWindow::requestActivateWindow()
event.data.data32[4] = 0;
Q_XCB_CALL(xcb_send_event(xcb_connection(), 0, m_screen->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event));
- } else {
- Q_XCB_CALL(xcb_set_input_focus(xcb_connection(), XCB_INPUT_FOCUS_PARENT, m_window, connection()->time()));
}
+ Q_XCB_CALL(xcb_set_input_focus(xcb_connection(), XCB_INPUT_FOCUS_PARENT, m_window, connection()->time()));
+
connection()->sync();
}
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 080f4358f2..61f3b6b8eb 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -2842,6 +2842,37 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
break;
}
+ switch (e->type()) {
+ case QEvent::KeyPress:
+ {
+ bool isWidget = receiver->isWidgetType();
+ bool isWindow = receiver->isWindowType();
+ bool isGraphicsWidget = false;
+#ifndef QT_NO_GRAPHICSVIEW
+ isGraphicsWidget = !isWidget && !isWindow && qobject_cast<QGraphicsWidget *>(receiver);
+#endif
+ if (!isWidget && !isGraphicsWidget && !isWindow) {
+ return d->notify_helper(receiver, e);
+ }
+
+ QKeyEvent* key = static_cast<QKeyEvent*>(e);
+#ifndef QT_NO_SHORTCUT
+ // Try looking for a Shortcut before sending key events
+ if (qApp->d_func()->shortcutMap.tryShortcutEvent(receiver, key))
+ return true;
+#endif
+ qt_in_tab_key_event = (key->key() == Qt::Key_Backtab
+ || key->key() == Qt::Key_Tab
+ || key->key() == Qt::Key_Left
+ || key->key() == Qt::Key_Up
+ || key->key() == Qt::Key_Right
+ || key->key() == Qt::Key_Down);
+
+ }
+ default:
+ break;
+ }
+
bool res = false;
if (!receiver->isWidgetType()) {
res = d->notify_helper(receiver, e);
@@ -2855,25 +2886,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
#ifndef QT_NO_GRAPHICSVIEW
isGraphicsWidget = !isWidget && qobject_cast<QGraphicsWidget *>(receiver);
#endif
- if (!isWidget && !isGraphicsWidget) {
- res = d->notify_helper(receiver, e);
- break;
- }
-
QKeyEvent* key = static_cast<QKeyEvent*>(e);
- if (key->type()==QEvent::KeyPress) {
-#ifndef QT_NO_SHORTCUT
- // Try looking for a Shortcut before sending key events
- if ((res = qApp->d_func()->shortcutMap.tryShortcutEvent(receiver, key)))
- return res;
-#endif
- qt_in_tab_key_event = (key->key() == Qt::Key_Backtab
- || key->key() == Qt::Key_Tab
- || key->key() == Qt::Key_Left
- || key->key() == Qt::Key_Up
- || key->key() == Qt::Key_Right
- || key->key() == Qt::Key_Down);
- }
bool def = key->isAccepted();
QPointer<QObject> pr = receiver;
while (receiver) {
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index c5cdce3d60..471b054a99 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -51,6 +51,7 @@
#include <private/qapplication_p.h>
#include <private/qshortcutmap_p.h>
#include <private/qaction_p.h>
+#include <private/qwidgetwindow_qpa_p.h>
QT_BEGIN_NAMESPACE
@@ -86,6 +87,20 @@ bool qWidgetShortcutContextMatcher(QObject *object, Qt::ShortcutContext context)
if (QApplication::activePopupWidget())
active_window = QApplication::activePopupWidget();
+ if (!active_window) {
+ QWindow *qwindow = QGuiApplication::focusWindow();
+ if (qwindow && qwindow->isActive()) {
+ while (qwindow) {
+ QWidgetWindow *widgetWindow = qobject_cast<QWidgetWindow *>(qwindow);
+ if (widgetWindow) {
+ active_window = widgetWindow->widget();
+ break;
+ }
+ qwindow = qwindow->parent();
+ }
+ }
+ }
+
if (!active_window)
return false;
@@ -106,6 +121,18 @@ bool qWidgetShortcutContextMatcher(QObject *object, Qt::ShortcutContext context)
w = s->parentWidget();
}
+ if (!w) {
+ QWindow *qwindow = qobject_cast<QWindow *>(object);
+ while (qwindow) {
+ QWidgetWindow *widget_window = qobject_cast<QWidgetWindow *>(qwindow);
+ if (widget_window) {
+ w = widget_window->widget();
+ break;
+ }
+ qwindow = qwindow->parent();
+ }
+ }
+
if (!w)
return false;
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index c19b617091..18dd3156c6 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -446,7 +446,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
if (!widget)
widget = m_widget;
- if (event->type() == QEvent::MouseButtonPress && !qt_button_down)
+ if (event->type() == QEvent::MouseButtonPress)
qt_button_down = widget;
QWidget *receiver = QApplicationPrivate::pickMouseReceiver(m_widget, event->windowPos().toPoint(), &mapped, event->type(), event->buttons(),
diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index da2c961558..1839b0670c 100644
--- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -66,7 +66,7 @@ private slots:
void constructCopy();
};
-#define FOR_EACH_GUI_METATYPE(F) \
+#define FOR_EACH_GUI_METATYPE_BASE(F) \
F(QFont, QFont) \
F(QPixmap, QPixmap) \
F(QBrush, QBrush) \
@@ -76,7 +76,6 @@ private slots:
F(QPolygon, QPolygon) \
F(QRegion, QRegion) \
F(QBitmap, QBitmap) \
- F(QCursor, QCursor) \
F(QKeySequence, QKeySequence) \
F(QPen, QPen) \
F(QTextLength, QTextLength) \
@@ -89,6 +88,16 @@ private slots:
F(QVector4D, QVector4D) \
F(QQuaternion, QQuaternion)
+#ifndef QTEST_NO_CURSOR
+# define FOR_EACH_GUI_METATYPE(F) \
+ FOR_EACH_GUI_METATYPE_BASE(F) \
+ F(QCursor, QCursor)
+#else // !QTEST_NO_CURSOR
+# define FOR_EACH_GUI_METATYPE(F) \
+ FOR_EACH_GUI_METATYPE_BASE(F)
+#endif // !QTEST_NO_CURSOR
+
+
namespace {
template <typename T>
struct static_assert_trigger {
diff --git a/util/glgen/qopenglextensions.cpp.header b/util/glgen/qopenglextensions.cpp.header
index 6a9f639d5d..a3a9a9fa73 100644
--- a/util/glgen/qopenglextensions.cpp.header
+++ b/util/glgen/qopenglextensions.cpp.header
@@ -5,35 +5,34 @@
**
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
diff --git a/util/glgen/qopenglextensions.h.header b/util/glgen/qopenglextensions.h.header
index b83b081166..c13ba37b39 100644
--- a/util/glgen/qopenglextensions.h.header
+++ b/util/glgen/qopenglextensions.h.header
@@ -5,35 +5,34 @@
**
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**