Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable
This commit is contained in:
commit
241eca33ed
@ -54,7 +54,7 @@ defineReplace(cmakeProcessLibs) {
|
|||||||
variable = $$1
|
variable = $$1
|
||||||
out =
|
out =
|
||||||
for(v, variable) {
|
for(v, variable) {
|
||||||
if(!equals(v, -framework):!equals(v, -L.*)) {
|
if(!equals(v, -framework):!contains(v, -L.*)) {
|
||||||
v ~= s,^-l,,
|
v ~= s,^-l,,
|
||||||
v ~= s,^-lib,,
|
v ~= s,^-lib,,
|
||||||
v ~= s,.lib$,,
|
v ~= s,.lib$,,
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
load(default_post)
|
load(default_post)
|
||||||
!no_objective_c:CONFIG += objective_c
|
!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) {
|
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(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 += ppc
|
||||||
contains(QT_CONFIG, ppc64):!contains(QT_CONFIG, ppc):CONFIG += ppc64
|
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
|
||||||
contains(QT_CONFIG, x86_64):!contains(QT_CONFIG, x86):CONFIG += x86_64
|
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_) {
|
isEmpty(_QMAKE_CACHE_) {
|
||||||
|
@ -74,17 +74,17 @@ defineTest(qtAddModule) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unset(LINKAGE)
|
unset(LINKAGE)
|
||||||
mac {
|
mac:contains(MODULE_CONFIG, lib_bundle) {
|
||||||
contains(MODULE_CONFIG, lib_bundle) {
|
|
||||||
FRAMEWORK_INCLUDE = $${MODULE_LIBS}/$${MODULE_NAME}.framework/Headers
|
FRAMEWORK_INCLUDE = $${MODULE_LIBS}/$${MODULE_NAME}.framework/Headers
|
||||||
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
|
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
|
||||||
INCLUDEPATH *= $$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}
|
LINKAGE += -framework $${MODULE_NAME}$${QT_LIBINFIX}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Re-insert the major version in the library name (cf qtLibraryTarget above)
|
# Re-insert the major version in the library name (cf qtLibraryTarget above)
|
||||||
|
@ -91,14 +91,15 @@ else: \
|
|||||||
mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
|
mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
|
||||||
#QMAKE_FRAMEWORK_VERSION = 4.0
|
#QMAKE_FRAMEWORK_VERSION = 4.0
|
||||||
CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
|
CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
|
||||||
CONFIG(release, debug|release) {
|
CONFIG -= qt_install_headers #no need to install these as well
|
||||||
!debug_and_release|build_pass {
|
!debug_and_release|if(build_all:CONFIG(release, debug|release)) {
|
||||||
CONFIG -= qt_install_headers #no need to install these as well
|
FRAMEWORK_HEADERS.version = Versions
|
||||||
FRAMEWORK_HEADERS.version = Versions
|
FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
|
||||||
FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
|
FRAMEWORK_HEADERS.path = Headers
|
||||||
FRAMEWORK_HEADERS.path = Headers
|
FRAMEWORK_PRIVATE_HEADERS.version = Versions
|
||||||
}
|
FRAMEWORK_PRIVATE_HEADERS.files = $$SYNCQT.PRIVATE_HEADER_FILES
|
||||||
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
|
FRAMEWORK_PRIVATE_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME
|
||||||
|
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS FRAMEWORK_PRIVATE_HEADERS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?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">
|
<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">
|
<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>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
@ -30,9 +30,12 @@ SOURCES += \
|
|||||||
INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
|
INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
|
||||||
|
|
||||||
# configure creates these, not syncqt, so we need to manually inject them
|
# configure creates these, not syncqt, so we need to manually inject them
|
||||||
targ_headers.files += \
|
qconfig_h_files = \
|
||||||
$$OUT_PWD/global/qconfig.h \
|
$$OUT_PWD/global/qconfig.h \
|
||||||
$$QT_BUILD_TREE/include/QtCore/QtConfig
|
$$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
|
# Only used on platforms with CONFIG += precompile_header
|
||||||
PRECOMPILED_HEADER = global/qt_pch.h
|
PRECOMPILED_HEADER = global/qt_pch.h
|
||||||
|
@ -1042,7 +1042,7 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
|||||||
\enum QSysInfo::MacVersion
|
\enum QSysInfo::MacVersion
|
||||||
|
|
||||||
This enum provides symbolic names for the various versions of the
|
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
|
QSysInfo::MacintoshVersion variable gives the version of the
|
||||||
system on which the application is run.
|
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_4 Mac OS X 10.4 (unsupported)
|
||||||
\value MV_10_5 Mac OS X 10.5 (unsupported)
|
\value MV_10_5 Mac OS X 10.5 (unsupported)
|
||||||
\value MV_10_6 Mac OS X 10.6
|
\value MV_10_6 Mac OS X 10.6
|
||||||
\value MV_10_7 Mac OS X 10.7
|
\value MV_10_7 OS X 10.7
|
||||||
\value MV_10_8 Mac OS X 10.8
|
\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_Unknown An unknown and currently unsupported platform
|
||||||
|
|
||||||
\value MV_CHEETAH Apple codename for MV_10_0
|
\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_SNOWLEOPARD Apple codename for MV_10_6
|
||||||
\value MV_LION Apple codename for MV_10_7
|
\value MV_LION Apple codename for MV_10_7
|
||||||
\value MV_MOUNTAINLION Apple codename for MV_10_8
|
\value MV_MOUNTAINLION Apple codename for MV_10_8
|
||||||
|
\value MV_MAVERICKS Apple codename for MV_10_9
|
||||||
|
|
||||||
\sa WinVersion
|
\sa WinVersion
|
||||||
*/
|
*/
|
||||||
|
@ -132,6 +132,7 @@ public:
|
|||||||
MV_10_6 = 0x0008,
|
MV_10_6 = 0x0008,
|
||||||
MV_10_7 = 0x0009,
|
MV_10_7 = 0x0009,
|
||||||
MV_10_8 = 0x000A,
|
MV_10_8 = 0x000A,
|
||||||
|
MV_10_9 = 0x000B,
|
||||||
|
|
||||||
/* codenames */
|
/* codenames */
|
||||||
MV_CHEETAH = MV_10_0,
|
MV_CHEETAH = MV_10_0,
|
||||||
@ -142,7 +143,8 @@ public:
|
|||||||
MV_LEOPARD = MV_10_5,
|
MV_LEOPARD = MV_10_5,
|
||||||
MV_SNOWLEOPARD = MV_10_6,
|
MV_SNOWLEOPARD = MV_10_6,
|
||||||
MV_LION = MV_10_7,
|
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 const MacVersion MacintoshVersion;
|
||||||
static MacVersion macVersion();
|
static MacVersion macVersion();
|
||||||
|
@ -207,12 +207,18 @@
|
|||||||
# if !defined(__MAC_10_8)
|
# if !defined(__MAC_10_8)
|
||||||
# define __MAC_10_8 1080
|
# define __MAC_10_8 1080
|
||||||
# endif
|
# endif
|
||||||
|
# if !defined(__MAC_10_9)
|
||||||
|
# define __MAC_10_9 1090
|
||||||
|
# endif
|
||||||
# if !defined(MAC_OS_X_VERSION_10_7)
|
# if !defined(MAC_OS_X_VERSION_10_7)
|
||||||
# define MAC_OS_X_VERSION_10_7 1070
|
# define MAC_OS_X_VERSION_10_7 1070
|
||||||
# endif
|
# endif
|
||||||
# if !defined(MAC_OS_X_VERSION_10_8)
|
# if !defined(MAC_OS_X_VERSION_10_8)
|
||||||
# define MAC_OS_X_VERSION_10_8 1080
|
# define MAC_OS_X_VERSION_10_8 1080
|
||||||
# endif
|
# endif
|
||||||
|
# if !defined(MAC_OS_X_VERSION_10_9)
|
||||||
|
# define MAC_OS_X_VERSION_10_9 1090
|
||||||
|
# endif
|
||||||
#
|
#
|
||||||
# if !defined(__IPHONE_4_3)
|
# if !defined(__IPHONE_4_3)
|
||||||
# define __IPHONE_4_3 40300
|
# define __IPHONE_4_3 40300
|
||||||
@ -229,9 +235,12 @@
|
|||||||
# if !defined(__IPHONE_6_1)
|
# if !defined(__IPHONE_6_1)
|
||||||
# define __IPHONE_6_1 60100
|
# define __IPHONE_6_1 60100
|
||||||
# endif
|
# endif
|
||||||
|
# if !defined(__IPHONE_7_0)
|
||||||
|
# define __IPHONE_7_0 70000
|
||||||
|
# endif
|
||||||
#
|
#
|
||||||
# if (__MAC_OS_X_VERSION_MAX_ALLOWED > __MAC_10_8)
|
# 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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1034,6 +1034,10 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea
|
|||||||
}
|
}
|
||||||
if (oldslash != -1)
|
if (oldslash != -1)
|
||||||
oldslash = dirName.indexOf(QDir::separator(), oldslash);
|
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) {
|
for (int slash=0; slash != -1; oldslash = slash) {
|
||||||
slash = dirName.indexOf(QDir::separator(), oldslash+1);
|
slash = dirName.indexOf(QDir::separator(), oldslash+1);
|
||||||
|
@ -5,35 +5,34 @@
|
|||||||
**
|
**
|
||||||
** This file is part of the QtGui module of the Qt Toolkit.
|
** This file is part of the QtGui module of the Qt Toolkit.
|
||||||
**
|
**
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
** $QT_BEGIN_LICENSE:BSD$
|
||||||
** Commercial License Usage
|
** You may use this file under the terms of the BSD license as follows:
|
||||||
** 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.
|
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** "Redistribution and use in source and binary forms, with or without
|
||||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
** modification, are permitted provided that the following conditions are
|
||||||
** General Public License version 2.1 as published by the Free Software
|
** met:
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
** * Redistributions of source code must retain the above copyright
|
||||||
** packaging of this file. Please review the following information to
|
** notice, this list of conditions and the following disclaimer.
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
** * Redistributions in binary form must reproduce the above copyright
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
** 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$
|
** $QT_END_LICENSE$
|
||||||
**
|
**
|
||||||
|
@ -5,35 +5,34 @@
|
|||||||
**
|
**
|
||||||
** This file is part of the QtGui module of the Qt Toolkit.
|
** This file is part of the QtGui module of the Qt Toolkit.
|
||||||
**
|
**
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
** $QT_BEGIN_LICENSE:BSD$
|
||||||
** Commercial License Usage
|
** You may use this file under the terms of the BSD license as follows:
|
||||||
** 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.
|
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** "Redistribution and use in source and binary forms, with or without
|
||||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
** modification, are permitted provided that the following conditions are
|
||||||
** General Public License version 2.1 as published by the Free Software
|
** met:
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
** * Redistributions of source code must retain the above copyright
|
||||||
** packaging of this file. Please review the following information to
|
** notice, this list of conditions and the following disclaimer.
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
** * Redistributions in binary form must reproduce the above copyright
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
** 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$
|
** $QT_END_LICENSE$
|
||||||
**
|
**
|
||||||
|
@ -1369,10 +1369,10 @@ void QXcbWindow::requestActivateWindow()
|
|||||||
event.data.data32[4] = 0;
|
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));
|
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();
|
connection()->sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2842,6 +2842,37 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
|||||||
break;
|
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;
|
bool res = false;
|
||||||
if (!receiver->isWidgetType()) {
|
if (!receiver->isWidgetType()) {
|
||||||
res = d->notify_helper(receiver, e);
|
res = d->notify_helper(receiver, e);
|
||||||
@ -2855,25 +2886,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
|||||||
#ifndef QT_NO_GRAPHICSVIEW
|
#ifndef QT_NO_GRAPHICSVIEW
|
||||||
isGraphicsWidget = !isWidget && qobject_cast<QGraphicsWidget *>(receiver);
|
isGraphicsWidget = !isWidget && qobject_cast<QGraphicsWidget *>(receiver);
|
||||||
#endif
|
#endif
|
||||||
if (!isWidget && !isGraphicsWidget) {
|
|
||||||
res = d->notify_helper(receiver, e);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
QKeyEvent* key = static_cast<QKeyEvent*>(e);
|
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();
|
bool def = key->isAccepted();
|
||||||
QPointer<QObject> pr = receiver;
|
QPointer<QObject> pr = receiver;
|
||||||
while (receiver) {
|
while (receiver) {
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#include <private/qapplication_p.h>
|
#include <private/qapplication_p.h>
|
||||||
#include <private/qshortcutmap_p.h>
|
#include <private/qshortcutmap_p.h>
|
||||||
#include <private/qaction_p.h>
|
#include <private/qaction_p.h>
|
||||||
|
#include <private/qwidgetwindow_qpa_p.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -86,6 +87,20 @@ bool qWidgetShortcutContextMatcher(QObject *object, Qt::ShortcutContext context)
|
|||||||
if (QApplication::activePopupWidget())
|
if (QApplication::activePopupWidget())
|
||||||
active_window = 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)
|
if (!active_window)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -106,6 +121,18 @@ bool qWidgetShortcutContextMatcher(QObject *object, Qt::ShortcutContext context)
|
|||||||
w = s->parentWidget();
|
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)
|
if (!w)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
|
|||||||
if (!widget)
|
if (!widget)
|
||||||
widget = m_widget;
|
widget = m_widget;
|
||||||
|
|
||||||
if (event->type() == QEvent::MouseButtonPress && !qt_button_down)
|
if (event->type() == QEvent::MouseButtonPress)
|
||||||
qt_button_down = widget;
|
qt_button_down = widget;
|
||||||
|
|
||||||
QWidget *receiver = QApplicationPrivate::pickMouseReceiver(m_widget, event->windowPos().toPoint(), &mapped, event->type(), event->buttons(),
|
QWidget *receiver = QApplicationPrivate::pickMouseReceiver(m_widget, event->windowPos().toPoint(), &mapped, event->type(), event->buttons(),
|
||||||
|
@ -66,7 +66,7 @@ private slots:
|
|||||||
void constructCopy();
|
void constructCopy();
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FOR_EACH_GUI_METATYPE(F) \
|
#define FOR_EACH_GUI_METATYPE_BASE(F) \
|
||||||
F(QFont, QFont) \
|
F(QFont, QFont) \
|
||||||
F(QPixmap, QPixmap) \
|
F(QPixmap, QPixmap) \
|
||||||
F(QBrush, QBrush) \
|
F(QBrush, QBrush) \
|
||||||
@ -76,7 +76,6 @@ private slots:
|
|||||||
F(QPolygon, QPolygon) \
|
F(QPolygon, QPolygon) \
|
||||||
F(QRegion, QRegion) \
|
F(QRegion, QRegion) \
|
||||||
F(QBitmap, QBitmap) \
|
F(QBitmap, QBitmap) \
|
||||||
F(QCursor, QCursor) \
|
|
||||||
F(QKeySequence, QKeySequence) \
|
F(QKeySequence, QKeySequence) \
|
||||||
F(QPen, QPen) \
|
F(QPen, QPen) \
|
||||||
F(QTextLength, QTextLength) \
|
F(QTextLength, QTextLength) \
|
||||||
@ -89,6 +88,16 @@ private slots:
|
|||||||
F(QVector4D, QVector4D) \
|
F(QVector4D, QVector4D) \
|
||||||
F(QQuaternion, QQuaternion)
|
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 {
|
namespace {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct static_assert_trigger {
|
struct static_assert_trigger {
|
||||||
|
@ -5,35 +5,34 @@
|
|||||||
**
|
**
|
||||||
** This file is part of the QtGui module of the Qt Toolkit.
|
** This file is part of the QtGui module of the Qt Toolkit.
|
||||||
**
|
**
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
** $QT_BEGIN_LICENSE:BSD$
|
||||||
** Commercial License Usage
|
** You may use this file under the terms of the BSD license as follows:
|
||||||
** 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.
|
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** "Redistribution and use in source and binary forms, with or without
|
||||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
** modification, are permitted provided that the following conditions are
|
||||||
** General Public License version 2.1 as published by the Free Software
|
** met:
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
** * Redistributions of source code must retain the above copyright
|
||||||
** packaging of this file. Please review the following information to
|
** notice, this list of conditions and the following disclaimer.
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
** * Redistributions in binary form must reproduce the above copyright
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
** 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$
|
** $QT_END_LICENSE$
|
||||||
**
|
**
|
||||||
|
@ -5,35 +5,34 @@
|
|||||||
**
|
**
|
||||||
** This file is part of the QtGui module of the Qt Toolkit.
|
** This file is part of the QtGui module of the Qt Toolkit.
|
||||||
**
|
**
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
** $QT_BEGIN_LICENSE:BSD$
|
||||||
** Commercial License Usage
|
** You may use this file under the terms of the BSD license as follows:
|
||||||
** 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.
|
|
||||||
**
|
**
|
||||||
** GNU Lesser General Public License Usage
|
** "Redistribution and use in source and binary forms, with or without
|
||||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
** modification, are permitted provided that the following conditions are
|
||||||
** General Public License version 2.1 as published by the Free Software
|
** met:
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
** * Redistributions of source code must retain the above copyright
|
||||||
** packaging of this file. Please review the following information to
|
** notice, this list of conditions and the following disclaimer.
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
** * Redistributions in binary form must reproduce the above copyright
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
** 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$
|
** $QT_END_LICENSE$
|
||||||
**
|
**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user