Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
This commit is contained in:
commit
c2b224a758
23
configure
vendored
23
configure
vendored
@ -234,7 +234,7 @@ macSDKify()
|
||||
|
||||
sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1")
|
||||
if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi
|
||||
sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)
|
||||
sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)
|
||||
if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
|
||||
|
||||
case "$sdk" in
|
||||
@ -322,18 +322,23 @@ fi
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
if ! /usr/bin/xcode-select --print-path >/dev/null 2>&1; then
|
||||
echo >&2
|
||||
echo " No Xcode is selected. Use xcode-select -switch to choose an Xcode" >&2
|
||||
echo " version. See the xcode-select man page for more information." >&2
|
||||
echo " No Xcode selected. Please install Xcode via the App Store, " >&2
|
||||
echo " or the command line developer tools via xcode-select --install, " >&2
|
||||
echo " and use xcode-select --switch to choose the right installation. " >&2
|
||||
echo " See the xcode-select man page for more information." >&2
|
||||
echo >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
|
||||
echo >&2
|
||||
echo " Xcode not set up properly. You may need to confirm the license" >&2
|
||||
echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
|
||||
echo >&2
|
||||
exit 2
|
||||
# In the else case we are probably using a Command Line Tools installation
|
||||
if /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
|
||||
if ! /usr/bin/xcrun xcodebuild -license check 2>/dev/null; then
|
||||
echo >&2
|
||||
echo " Xcode setup not complete. You need to confirm the license" >&2
|
||||
echo " agreement by running 'sudo xcrun xcodebuild -license accept'." >&2
|
||||
echo >&2
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
131
dist/changes-5.9.1
vendored
Normal file
131
dist/changes-5.9.1
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
Qt 5.9.1 is a bug-fix release. It maintains both forward and backward
|
||||
compatibility (source and binary) with Qt 5.9.0.
|
||||
|
||||
For more details, refer to the online documentation included in this
|
||||
distribution. The documentation is also available online:
|
||||
|
||||
http://doc.qt.io/qt-5/index.html
|
||||
|
||||
The Qt version 5.9 series is binary compatible with the 5.8.x series.
|
||||
Applications compiled for 5.8 will continue to run with 5.9.
|
||||
|
||||
Some of the changes listed in this file include issue tracking numbers
|
||||
corresponding to tasks in the Qt Bug Tracker:
|
||||
|
||||
https://bugreports.qt.io/
|
||||
|
||||
Each of these identifiers can be entered in the bug tracker to obtain more
|
||||
information about a particular change.
|
||||
|
||||
****************************************************************************
|
||||
* Qt 5.9.1 Changes *
|
||||
****************************************************************************
|
||||
|
||||
Deprecation Notice
|
||||
------------------
|
||||
|
||||
- The following platforms or toolchains are deprecated and will be
|
||||
removed as of Qt 5.11:
|
||||
* Microsoft Visual Studio 2013
|
||||
|
||||
Important Behavior Changes
|
||||
--------------------------
|
||||
|
||||
- The Q_REQUIRED_RESULT macro now expands to the C++17 attribute
|
||||
[[nodiscard]] if the compiler supports it. Code using this macro needs
|
||||
to pay attention to its placement, as C++ function attributes must come
|
||||
before the declaration, unlike the GCC extension that this macro
|
||||
previously expanded to.
|
||||
|
||||
Binary Compatibility Note
|
||||
-------------------------
|
||||
|
||||
- The variable QOperatingSystemVersion::MacOSHighSierra was added in this
|
||||
release. Code that uses this variable will not run under Qt 5.9.0. If
|
||||
backwards compatibility is desired, use instead
|
||||
QOperatingSystemVersion(QOperatingSystemVersion::MacOS, 10, 13)
|
||||
|
||||
Third-Party Code
|
||||
----------------
|
||||
|
||||
- Sqlite was updated to version 3.16.2.
|
||||
- Deleted the src/3rdparty/atspi2 directory.
|
||||
|
||||
QtCore
|
||||
------
|
||||
|
||||
- [QTBUG-60558] Fixed a bug that caused QInternal::unregisterCallback to
|
||||
crash on exit.
|
||||
- [QTBUG-61034] QT_NO_EXCEPTIONS is now reliably set when using Clang, even
|
||||
in Objective C++ mode.
|
||||
|
||||
- QHash/QMultiHash:
|
||||
* [QTBUG-60395] Fixed operator== so that two containers compare equal when
|
||||
there are multiple values with the same key.
|
||||
|
||||
- QStorageInfo
|
||||
* [QTBUG-61096] Fixed a hang on certain systems when retrieving
|
||||
information from unresponsive filesystems.
|
||||
|
||||
- QTimeZone:
|
||||
* [QTBUG-60595] Fixed sending IANA standard UTC-offset QTimeZones
|
||||
through QDataStream, which previously came out invalid after
|
||||
deserialization.
|
||||
|
||||
moc
|
||||
---
|
||||
|
||||
- [QTBUG-61204] moc no longer errors out if a C++ keyword is #define'ed
|
||||
|
||||
Platform Specific Changes
|
||||
-------------------------
|
||||
|
||||
- macOS / iOS:
|
||||
* [QTBUG-41978] QCollator now respects the ignorePunctuation property on
|
||||
Apple based platforms correctly.
|
||||
* [QTBUG-61205] Fixed the architecture information in QSysInfo.
|
||||
* QSysInfo and QOperatingSystemVersion now support the newest versions of
|
||||
Apple's operating systems.
|
||||
* [QTBUG-61053] Fixed SSL certificate verification on iOS with Secure
|
||||
Transport back-end.
|
||||
|
||||
- Windows:
|
||||
* [QTBUG-61315] Fixed invalid sorting of custom environment variables set
|
||||
via QProcessEnvironment when starting subprocesses.
|
||||
|
||||
****************************************************************************
|
||||
* Tools *
|
||||
****************************************************************************
|
||||
|
||||
configure & build system
|
||||
------------------------
|
||||
|
||||
- [QTBUG-58372] The SQL driver plugins can be built separately again.
|
||||
Note that it is necessary to configure the whole sqldrivers directory.
|
||||
- [QTBUG-60925][Unix] Fixed library retrieval from pkg-config. Again.
|
||||
- [QTBUG-60936] Fixed module version number in Qt modules' cmake config files.
|
||||
- [QTBUG-61017] Fixed configure hanging upon selecting commercial license.
|
||||
- [QTBUG-61044] Fixed license checker invocation on 32 bit systems.
|
||||
- [MinGW] The gold linker is no longer used.
|
||||
|
||||
qmake
|
||||
-----
|
||||
|
||||
- [QTBUG-42830][Android] INSTALL targets are no longer created for static
|
||||
libraries.
|
||||
- [QTBUG-40825][QTBUG-59457][Unix] Fixed various makespecs to append shared
|
||||
include and library locations only at the end of the search lists.
|
||||
- [QTBUG-52383][Windows] midl and rc are now invoked with /NOLOGO.
|
||||
- [QTBUG-58391][MSVC] MSVC extensions are not disabled any more when
|
||||
querying the compiler for the predefined macros to pass to moc.
|
||||
- [QTBUG-59431][VS] Fixed parsing of /utf-8 option. Again.
|
||||
- [QTBUG-60895][VS] Fixed .vcxproj generation for ActiveQt server projects.
|
||||
- [QTBUG-60059] qmake will now be more verbose when it fails to run the
|
||||
compiler while querying the toolchain's properties.
|
||||
- Various QT_<compiler>_VERSION variables were reverted to refer to the
|
||||
toolchain Qt was built with. The current toolchain's versions can be
|
||||
found in the QMAKE_<compiler>_VERSION variables.
|
||||
- QMAKE_DEFAULT_{INC,LIB}DIRS is now populated also when using clang.
|
||||
- [MinGW] Re-builds of static library projects will now create a new library
|
||||
instead of updating the previously built one.
|
||||
- [VS] Unknown /Zc:XXX options are no longer complained about.
|
@ -171,7 +171,7 @@ void MandelbrotWidget::keyPressEvent(QKeyEvent *event)
|
||||
}
|
||||
//! [11]
|
||||
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
//! [12]
|
||||
void MandelbrotWidget::wheelEvent(QWheelEvent *event)
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
#endif
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
|
@ -1,3 +1,5 @@
|
||||
QT_FOR_CONFIG += widgets
|
||||
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = classwizard \
|
||||
configdialog \
|
||||
@ -13,5 +15,7 @@ SUBDIRS = classwizard \
|
||||
}
|
||||
|
||||
!qtHaveModule(printsupport): SUBDIRS -= licensewizard
|
||||
contains(DEFINES, QT_NO_WIZARD): SUBDIRS -= trivialwizard licensewizard classwizard
|
||||
!qtConfig(wizard) {
|
||||
SUBDIRS -= trivialwizard licensewizard classwizard
|
||||
}
|
||||
wince: SUBDIRS += sipdialog
|
||||
|
@ -64,7 +64,7 @@
|
||||
#endif
|
||||
#include <qmath.h>
|
||||
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
void GraphicsView::wheelEvent(QWheelEvent *e)
|
||||
{
|
||||
if (e->modifiers() & Qt::ControlModifier) {
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
GraphicsView(View *v) : QGraphicsView(), view(v) { }
|
||||
|
||||
protected:
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
void wheelEvent(QWheelEvent *) override;
|
||||
#endif
|
||||
|
||||
|
@ -184,7 +184,7 @@ void GraphWidget::timerEvent(QTimerEvent *event)
|
||||
}
|
||||
//! [4]
|
||||
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
//! [5]
|
||||
void GraphWidget::wheelEvent(QWheelEvent *event)
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ public slots:
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
void timerEvent(QTimerEvent *event) override;
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
#endif
|
||||
void drawBackground(QPainter *painter, const QRectF &rect) override;
|
||||
|
@ -260,7 +260,7 @@ void XFormView::timerEvent(QTimerEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
void XFormView::wheelEvent(QWheelEvent *e)
|
||||
{
|
||||
m_scale += e->delta() / qreal(600);
|
||||
|
@ -125,7 +125,7 @@ signals:
|
||||
|
||||
protected:
|
||||
void timerEvent(QTimerEvent *e) override;
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
void wheelEvent(QWheelEvent *) override;
|
||||
#endif
|
||||
|
||||
|
@ -89,7 +89,7 @@ void ButtonTester::mouseDoubleClickEvent(QMouseEvent *e)
|
||||
this->setText(result);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
void ButtonTester::wheelEvent (QWheelEvent *e)
|
||||
{
|
||||
QString result;
|
||||
|
@ -64,7 +64,7 @@ protected:
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
void wheelEvent(QWheelEvent * event) override;
|
||||
#endif
|
||||
int buttonByNumber(const Qt::MouseButton button);
|
||||
|
@ -195,7 +195,7 @@ void TabletCanvas::paintPixmap(QPainter &painter, QTabletEvent *event)
|
||||
case QTabletEvent::FourDMouse:
|
||||
{
|
||||
const QString error(tr("This input device is not supported by the example."));
|
||||
#ifndef QT_NO_STATUSTIP
|
||||
#if QT_CONFIG(statustip)
|
||||
QStatusTipEvent status(error);
|
||||
QApplication::sendEvent(this, &status);
|
||||
#else
|
||||
@ -206,7 +206,7 @@ void TabletCanvas::paintPixmap(QPainter &painter, QTabletEvent *event)
|
||||
default:
|
||||
{
|
||||
const QString error(tr("Unknown tablet device - treating as stylus"));
|
||||
#ifndef QT_NO_STATUSTIP
|
||||
#if QT_CONFIG(statustip)
|
||||
QStatusTipEvent status(error);
|
||||
QApplication::sendEvent(this, &status);
|
||||
#else
|
||||
|
@ -1,6 +1,3 @@
|
||||
android_install:contains(INSTALLS, target):!isEmpty(target.path): \
|
||||
CONFIG -= android_install
|
||||
|
||||
contains(TEMPLATE, ".*app") {
|
||||
!android_app {
|
||||
!contains(TARGET, ".so"): TARGET = lib$${TARGET}.so
|
||||
@ -11,7 +8,7 @@ contains(TEMPLATE, ".*app") {
|
||||
INSTALLS *= target
|
||||
}
|
||||
}
|
||||
} else: contains(TEMPLATE, "lib"):!static:android_install {
|
||||
} else: contains(TEMPLATE, "lib"):!static:!QTDIR_build:android_install {
|
||||
target.path = /libs/$$ANDROID_TARGET_ARCH/
|
||||
INSTALLS *= target
|
||||
}
|
||||
|
@ -183,6 +183,7 @@ macx-xcode {
|
||||
}
|
||||
|
||||
cache(QMAKE_XCODE_DEVELOPER_PATH, stash)
|
||||
cache(QMAKE_XCODE_VERSION, stash)
|
||||
!isEmpty(QMAKE_XCODE_VERSION): \
|
||||
cache(QMAKE_XCODE_VERSION, stash)
|
||||
|
||||
QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
|
||||
|
@ -10,18 +10,23 @@ isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
|
||||
# Make sure Xcode path is valid
|
||||
!exists($$QMAKE_XCODE_DEVELOPER_PATH): \
|
||||
error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
|
||||
|
||||
# Make sure Xcode is set up properly
|
||||
isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
|
||||
error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")
|
||||
}
|
||||
|
||||
isEmpty(QMAKE_XCODE_VERSION) {
|
||||
# Extract Xcode version using xcodebuild
|
||||
xcode_version = $$system("/usr/bin/xcodebuild -version")
|
||||
QMAKE_XCODE_VERSION = $$member(xcode_version, 1)
|
||||
isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.")
|
||||
unset(xcode_version)
|
||||
isEmpty(QMAKE_XCODEBUILD_PATH): \
|
||||
QMAKE_XCODEBUILD_PATH = $$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")
|
||||
|
||||
!isEmpty(QMAKE_XCODEBUILD_PATH) {
|
||||
# Make sure Xcode is set up properly
|
||||
!system("/usr/bin/xcrun xcodebuild -license check 2>/dev/null"): \
|
||||
error("Xcode not set up properly. You need to confirm the license agreement by running 'sudo xcrun xcodebuild -license accept'.")
|
||||
|
||||
isEmpty(QMAKE_XCODE_VERSION) {
|
||||
# Extract Xcode version using xcodebuild
|
||||
xcode_version = $$system("/usr/bin/xcrun xcodebuild -version")
|
||||
QMAKE_XCODE_VERSION = $$member(xcode_version, 1)
|
||||
isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.")
|
||||
unset(xcode_version)
|
||||
}
|
||||
}
|
||||
|
||||
isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) {
|
||||
|
@ -7,13 +7,22 @@ contains(QMAKE_MAC_SDK, .*/.*): \
|
||||
|
||||
defineReplace(xcodeSDKInfo) {
|
||||
info = $$1
|
||||
equals(info, "Path"): \
|
||||
info = --show-sdk-path
|
||||
equals(info, "PlatformPath"): \
|
||||
info = --show-sdk-platform-path
|
||||
equals(info, "SDKVersion"): \
|
||||
info = --show-sdk-version
|
||||
sdk = $$2
|
||||
isEmpty(sdk): \
|
||||
sdk = $$QMAKE_MAC_SDK
|
||||
|
||||
isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) {
|
||||
QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcodebuild -sdk $$sdk -version $$info 2>/dev/null")
|
||||
isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}): error("Could not resolve SDK $$info for \'$$sdk\'")
|
||||
QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$info 2>/dev/null")
|
||||
# --show-sdk-platform-path won't work for Command Line Tools; this is fine
|
||||
# only used by the XCTest backend to testlib
|
||||
isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(info, "--show-sdk-platform-path")): \
|
||||
error("Could not resolve SDK $$info for \'$$sdk\'")
|
||||
cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info})
|
||||
}
|
||||
|
||||
|
@ -25,9 +25,11 @@ isEmpty($${target_prefix}.INCDIRS) {
|
||||
!equals(QMAKE_HOST.os, Windows) {
|
||||
cmd_prefix = "LC_ALL=C"
|
||||
cmd_suffix = "</dev/null >/dev/null"
|
||||
null_file = /dev/null
|
||||
} else {
|
||||
cmd_prefix = "set LC_ALL=C&"
|
||||
cmd_suffix = "<NUL >NUL"
|
||||
null_file = NUL
|
||||
}
|
||||
|
||||
cxx_flags = $$QMAKE_CXXFLAGS
|
||||
@ -38,9 +40,17 @@ isEmpty($${target_prefix}.INCDIRS) {
|
||||
# While technically incorrect but without any likely practical effect,
|
||||
# UIKit simulator platforms will see the device SDK's sysroot in
|
||||
# QMAKE_DEFAULT_*DIRS, because they're handled in a single build pass.
|
||||
darwin: cxx_flags += -isysroot $$QMAKE_MAC_SDK_PATH
|
||||
darwin {
|
||||
uikit:macx-xcode: \
|
||||
cxx_flags += -isysroot $$sdk_path_device.value
|
||||
else: \
|
||||
cxx_flags += -isysroot $$QMAKE_MAC_SDK_PATH
|
||||
}
|
||||
|
||||
clang: \
|
||||
rim_qcc: \
|
||||
# Need the cc1plus and ld command lines to pick up the paths
|
||||
cxx_flags += $$QMAKE_LFLAGS_SHLIB -o $$null_file -v
|
||||
else: clang: \
|
||||
# Need to link to pick up library paths
|
||||
cxx_flags += $$QMAKE_LFLAGS_SHLIB -o /dev/null -v -Wl,-v
|
||||
else: \
|
||||
@ -50,33 +60,60 @@ isEmpty($${target_prefix}.INCDIRS) {
|
||||
output = $$system("$$cmd_prefix $$QMAKE_CXX $$qtMakeExpand($$cxx_flags) -xc++ - 2>&1 $$cmd_suffix", lines, ec)
|
||||
!equals(ec, 0): \
|
||||
error("Cannot run compiler '$$QMAKE_CXX'. Maybe you forgot to setup the environment?")
|
||||
add_includes = false
|
||||
add_libraries = false
|
||||
for (line, output) {
|
||||
line ~= s/^[ \\t]*// # remove leading spaces
|
||||
contains(line, "LIBRARY_PATH=.*") {
|
||||
line ~= s/^LIBRARY_PATH=// # remove leading LIBRARY_PATH=
|
||||
paths = $$split(line, $$QMAKE_DIRLIST_SEP)
|
||||
for (path, paths): \
|
||||
QMAKE_DEFAULT_LIBDIRS += $$clean_path($$path)
|
||||
} else: contains(line, "Library search paths:") {
|
||||
add_libraries = true
|
||||
} else: contains(line, "$${LITERAL_HASH}include <.*") { # #include <...> search starts here:
|
||||
add_includes = true
|
||||
} else: contains(line, "End of search.*") {
|
||||
add_includes = false
|
||||
} else: $$add_libraries {
|
||||
# We assume all library search paths are absolute
|
||||
!contains(line, "^/.*") {
|
||||
add_libraries = false
|
||||
next()
|
||||
|
||||
rim_qcc {
|
||||
for (line, output) {
|
||||
contains(line, "^[^ ]*cc1plus .*") {
|
||||
take_next = false
|
||||
for (parameter, $$list($$line)) {
|
||||
$$take_next {
|
||||
QMAKE_DEFAULT_INCDIRS += $$clean_path($$parameter)
|
||||
take_next = false
|
||||
} else: equals(parameter, "-isystem") {
|
||||
take_next = true
|
||||
}
|
||||
}
|
||||
} else: contains(line, "^[^ ]*-ld .*") {
|
||||
for (parameter, $$list($$line)) {
|
||||
contains(parameter, "^-L.*") {
|
||||
parameter ~= s/^-L//
|
||||
QMAKE_DEFAULT_LIBDIRS += $$clean_path($$parameter)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
add_includes = false
|
||||
add_libraries = false
|
||||
for (line, output) {
|
||||
line ~= s/^[ \\t]*// # remove leading spaces
|
||||
contains(line, "LIBRARY_PATH=.*") {
|
||||
line ~= s/^LIBRARY_PATH=// # remove leading LIBRARY_PATH=
|
||||
paths = $$split(line, $$QMAKE_DIRLIST_SEP)
|
||||
for (path, paths): \
|
||||
QMAKE_DEFAULT_LIBDIRS += $$clean_path($$path)
|
||||
} else: contains(line, "Library search paths:") {
|
||||
add_libraries = true
|
||||
} else: contains(line, "$${LITERAL_HASH}include <.*") { # #include <...> search starts here:
|
||||
add_includes = true
|
||||
} else: contains(line, "End of search.*") {
|
||||
add_includes = false
|
||||
} else: $$add_libraries {
|
||||
# We assume all library search paths are absolute
|
||||
!contains(line, "^/.*") {
|
||||
add_libraries = false
|
||||
next()
|
||||
}
|
||||
QMAKE_DEFAULT_LIBDIRS += $$clean_path($$line)
|
||||
} else: $$add_includes {
|
||||
!contains(line, ".* \\(framework directory\\)"): \
|
||||
QMAKE_DEFAULT_INCDIRS += $$clean_path($$line)
|
||||
}
|
||||
QMAKE_DEFAULT_LIBDIRS += $$clean_path($$line)
|
||||
} else: $$add_includes {
|
||||
!contains(line, ".* \\(framework directory\\)"): \
|
||||
QMAKE_DEFAULT_INCDIRS += $$clean_path($$line)
|
||||
}
|
||||
}
|
||||
isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \
|
||||
!integrity: \
|
||||
error("failed to parse default search paths from compiler output")
|
||||
QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS)
|
||||
} else: msvc {
|
||||
# This doesn't differentiate between host and target,
|
||||
|
@ -19,7 +19,7 @@ equals(TEMPLATE, app):qt {
|
||||
load(default_post)
|
||||
|
||||
macx-xcode {
|
||||
ios:isEmpty(QMAKE_APPLE_TARGETED_DEVICE_FAMILY):!isEmpty(QMAKE_IOS_TARGETED_DEVICE_FAMILY) {
|
||||
ios:!isEmpty(QMAKE_IOS_TARGETED_DEVICE_FAMILY) {
|
||||
warning("QMAKE_IOS_TARGETED_DEVICE_FAMILY is deprecated; use QMAKE_APPLE_TARGETED_DEVICE_FAMILY")
|
||||
QMAKE_APPLE_TARGETED_DEVICE_FAMILY = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY
|
||||
}
|
||||
|
@ -2,5 +2,6 @@ equals(TEMPLATE, app) {
|
||||
load(sdk)
|
||||
# Make the XCTest framework available. This is normally handled automatically
|
||||
# by Xcode based on heuristics, but we need to explicitly link to XCTest.
|
||||
QMAKE_LFLAGS += -F$${QMAKE_MAC_SDK_PLATFORM_PATH}/Developer/Library/Frameworks -weak_framework XCTest
|
||||
!isEmpty(QMAKE_MAC_SDK_PLATFORM_PATH): \
|
||||
QMAKE_LFLAGS += -F$${QMAKE_MAC_SDK_PLATFORM_PATH}/Developer/Library/Frameworks -weak_framework XCTest
|
||||
}
|
||||
|
@ -118,14 +118,15 @@ ProjectGenerator::init()
|
||||
dir = regex.left(s+1);
|
||||
regex = regex.right(regex.length() - (s+1));
|
||||
}
|
||||
const QDir d(dir);
|
||||
if (Option::recursive) {
|
||||
QStringList entries = QDir(dir).entryList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
QStringList entries = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
for (int i = 0; i < entries.count(); i++)
|
||||
dirs.append(dir + entries[i] + QDir::separator() + regex);
|
||||
}
|
||||
QStringList files = QDir(dir).entryList(QDir::nameFiltersFromString(regex));
|
||||
QStringList files = d.entryList(QDir::nameFiltersFromString(regex));
|
||||
for(int i = 0; i < (int)files.count(); i++) {
|
||||
QString file = dir + files[i];
|
||||
QString file = d.absoluteFilePath(files[i]);
|
||||
if (addFile(file)) {
|
||||
add_depend = true;
|
||||
file_count++;
|
||||
|
13
src/3rdparty/icu_dependency.pri
vendored
13
src/3rdparty/icu_dependency.pri
vendored
@ -1,13 +0,0 @@
|
||||
win32 {
|
||||
CONFIG(static, static|shared) {
|
||||
CONFIG(debug, debug|release) {
|
||||
LIBS_PRIVATE += -lsicuind -lsicuucd -lsicudtd
|
||||
} else {
|
||||
LIBS_PRIVATE += -lsicuin -lsicuuc -lsicudt
|
||||
}
|
||||
} else {
|
||||
LIBS_PRIVATE += -licuin -licuuc -licudt
|
||||
}
|
||||
} else {
|
||||
LIBS_PRIVATE += -licui18n -licuuc -licudata
|
||||
}
|
2
src/3rdparty/wintab/qt_attribution.json
vendored
2
src/3rdparty/wintab/qt_attribution.json
vendored
@ -2,7 +2,7 @@
|
||||
"Id": "wintab",
|
||||
"Name": "Wintab API",
|
||||
"QDocModule": "qtgui",
|
||||
"QtUsage": "Used in the Qt platform plugin for Windows. Configure with -DQT_NO_TABLETEVENT to avoid.",
|
||||
"QtUsage": "Used in the Qt platform plugin for Windows. Configure with -no-feature-tabletevent to avoid.",
|
||||
|
||||
"Description": "Wintab is a de facto API for pointing devices on Windows.",
|
||||
"Homepage": "http://www.pointing.com/Wintab.html",
|
||||
|
@ -317,7 +317,7 @@ QList<QByteArray> QGbkCodec::_aliases()
|
||||
|
||||
QString QGbkCodec::convertToUnicode(const char* chars, int len, ConverterState *state) const
|
||||
{
|
||||
uchar buf[2];
|
||||
uchar buf[2] = {0, 0};
|
||||
int nbuf = 0;
|
||||
ushort replacement = QChar::ReplacementCharacter;
|
||||
if (state) {
|
||||
@ -467,7 +467,7 @@ QByteArray QGb2312Codec::_name()
|
||||
|
||||
QString QGb2312Codec::convertToUnicode(const char* chars, int len, ConverterState *state) const
|
||||
{
|
||||
uchar buf[2];
|
||||
uchar buf[2] = {0, 0};
|
||||
int nbuf = 0;
|
||||
ushort replacement = QChar::ReplacementCharacter;
|
||||
if (state) {
|
||||
|
@ -44,7 +44,6 @@
|
||||
},
|
||||
"icu": {
|
||||
"label": "ICU",
|
||||
"export": "",
|
||||
"test": "unix/icu",
|
||||
"sources": [
|
||||
{
|
||||
|
@ -175,7 +175,10 @@ QOperatingSystemVersion QOperatingSystemVersion::current()
|
||||
version.m_major = -1;
|
||||
version.m_minor = -1;
|
||||
|
||||
static const int versions[][2] = {
|
||||
static const struct {
|
||||
uint major : 4;
|
||||
uint minor : 4;
|
||||
} versions[] = {
|
||||
{ 1, 0 }, // API level 1
|
||||
{ 1, 1 }, // API level 2
|
||||
{ 1, 5 }, // API level 3
|
||||
@ -207,8 +210,8 @@ QOperatingSystemVersion QOperatingSystemVersion::current()
|
||||
const size_t versionIdx = size_t(QJNIObjectPrivate::getStaticField<jint>(
|
||||
"android/os/Build$VERSION", "SDK_INT")) - 1;
|
||||
if (versionIdx < sizeof(versions) / sizeof(versions[0])) {
|
||||
version.m_major = versions[versionIdx][0];
|
||||
version.m_minor = versions[versionIdx][1];
|
||||
version.m_major = versions[versionIdx].major;
|
||||
version.m_minor = versions[versionIdx].minor;
|
||||
}
|
||||
|
||||
// API level 6 was exactly version 2.0.1
|
||||
@ -333,6 +336,7 @@ QString QOperatingSystemVersion::name() const
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Q_COMPILER_INITIALIZER_LISTS
|
||||
/*!
|
||||
\fn bool QOperatingSystemVersion::isAnyOfType(std::initializer_list<OSType> types) const
|
||||
|
||||
@ -347,6 +351,7 @@ bool QOperatingSystemVersion::isAnyOfType(std::initializer_list<OSType> types) c
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\variable QOperatingSystemVersion::Windows7
|
||||
|
@ -81,7 +81,6 @@ public:
|
||||
static const QOperatingSystemVersion AndroidNougat;
|
||||
static const QOperatingSystemVersion AndroidNougat_MR1;
|
||||
|
||||
QOperatingSystemVersion(const QOperatingSystemVersion &other) = default;
|
||||
Q_DECL_CONSTEXPR QOperatingSystemVersion(OSType osType,
|
||||
int vmajor, int vminor = -1, int vmicro = -1)
|
||||
: m_os(osType),
|
||||
@ -99,7 +98,9 @@ public:
|
||||
Q_DECL_CONSTEXPR int segmentCount() const
|
||||
{ return m_micro >= 0 ? 3 : m_minor >= 0 ? 2 : m_major >= 0 ? 1 : 0; }
|
||||
|
||||
#ifdef Q_COMPILER_INITIALIZER_LISTS
|
||||
bool isAnyOfType(std::initializer_list<OSType> types) const;
|
||||
#endif
|
||||
Q_DECL_CONSTEXPR OSType type() const { return m_os; }
|
||||
QString name() const;
|
||||
|
||||
@ -124,6 +125,7 @@ private:
|
||||
|
||||
static int compare(const QOperatingSystemVersion &v1, const QOperatingSystemVersion &v2);
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QOperatingSystemVersion, QT_VERSION < QT_VERSION_CHECK(6, 0, 0) ? Q_RELOCATABLE_TYPE : Q_PRIMITIVE_TYPE);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -147,10 +147,6 @@ QProcessEnvironment QProcessEnvironment::systemEnvironment()
|
||||
|
||||
#if QT_CONFIG(process)
|
||||
|
||||
// POSIX requires PIPE_BUF to be 512 or larger
|
||||
// so we will use 512
|
||||
static const int errorBufferMax = 512;
|
||||
|
||||
namespace {
|
||||
struct QProcessPoller
|
||||
{
|
||||
@ -530,11 +526,18 @@ void QProcessPrivate::startProcess()
|
||||
}
|
||||
}
|
||||
|
||||
struct ChildError
|
||||
{
|
||||
int code;
|
||||
char function[8];
|
||||
};
|
||||
|
||||
void QProcessPrivate::execChild(const char *workingDir, char **argv, char **envp)
|
||||
{
|
||||
::signal(SIGPIPE, SIG_DFL); // reset the signal that we ignored
|
||||
|
||||
Q_Q(QProcess);
|
||||
ChildError error = { 0, {} }; // force zeroing of function[8]
|
||||
|
||||
// copy the stdin socket if asked to (without closing on exec)
|
||||
if (inputChannelMode != QProcess::ForwardedInputChannel)
|
||||
@ -557,9 +560,9 @@ void QProcessPrivate::execChild(const char *workingDir, char **argv, char **envp
|
||||
qt_safe_close(childStartedPipe[0]);
|
||||
|
||||
// enter the working directory
|
||||
const char *callthatfailed = "chdir: ";
|
||||
if (workingDir && QT_CHDIR(workingDir) == -1) {
|
||||
// failed, stop the process
|
||||
strcpy(error.function, "chdir");
|
||||
goto report_errno;
|
||||
}
|
||||
|
||||
@ -569,39 +572,28 @@ void QProcessPrivate::execChild(const char *workingDir, char **argv, char **envp
|
||||
// execute the process
|
||||
if (!envp) {
|
||||
qt_safe_execv(argv[0], argv);
|
||||
callthatfailed = "execv: ";
|
||||
strcpy(error.function, "execvp");
|
||||
} else {
|
||||
#if defined (QPROCESS_DEBUG)
|
||||
fprintf(stderr, "QProcessPrivate::execChild() starting %s\n", argv[0]);
|
||||
#endif
|
||||
qt_safe_execve(argv[0], argv, envp);
|
||||
callthatfailed = "execve: ";
|
||||
strcpy(error.function, "execve");
|
||||
}
|
||||
|
||||
// notify failure
|
||||
// we're running in the child process, so we don't need to be thread-safe;
|
||||
// we can use strerror
|
||||
// don't use strerror or any other routines that may allocate memory, since
|
||||
// some buggy libc versions can deadlock on locked mutexes.
|
||||
report_errno:
|
||||
const char *msg = strerror(errno);
|
||||
#if defined (QPROCESS_DEBUG)
|
||||
fprintf(stderr, "QProcessPrivate::execChild() failed (%s), notifying parent process\n", msg);
|
||||
#endif
|
||||
qt_safe_write(childStartedPipe[1], callthatfailed, strlen(callthatfailed));
|
||||
qt_safe_write(childStartedPipe[1], msg, strlen(msg));
|
||||
qt_safe_close(childStartedPipe[1]);
|
||||
error.code = errno;
|
||||
qt_safe_write(childStartedPipe[1], &error, sizeof(error));
|
||||
childStartedPipe[1] = -1;
|
||||
}
|
||||
|
||||
bool QProcessPrivate::processStarted(QString *errorMessage)
|
||||
{
|
||||
char buf[errorBufferMax];
|
||||
int i = 0;
|
||||
int ret;
|
||||
do {
|
||||
ret = qt_safe_read(childStartedPipe[0], buf + i, sizeof buf - i);
|
||||
if (ret > 0)
|
||||
i += ret;
|
||||
} while (ret > 0 && i < int(sizeof buf));
|
||||
ChildError buf;
|
||||
int ret = qt_safe_read(childStartedPipe[0], &buf, sizeof(buf));
|
||||
|
||||
if (startupSocketNotifier) {
|
||||
startupSocketNotifier->setEnabled(false);
|
||||
@ -616,10 +608,10 @@ bool QProcessPrivate::processStarted(QString *errorMessage)
|
||||
#endif
|
||||
|
||||
// did we read an error message?
|
||||
if ((i > 0) && errorMessage)
|
||||
*errorMessage = QString::fromLocal8Bit(buf, i);
|
||||
if (ret > 0 && errorMessage)
|
||||
*errorMessage = QLatin1String(buf.function) + QLatin1String(": ") + qt_error_string(buf.code);
|
||||
|
||||
return i <= 0;
|
||||
return ret <= 0;
|
||||
}
|
||||
|
||||
qint64 QProcessPrivate::bytesAvailableInChannel(const Channel *channel) const
|
||||
|
@ -3440,6 +3440,10 @@ QUrl QUrl::fromEncoded(const QByteArray &input, ParsingMode mode)
|
||||
/*!
|
||||
Returns a decoded copy of \a input. \a input is first decoded from
|
||||
percent encoding, then converted from UTF-8 to unicode.
|
||||
|
||||
\note Given invalid input (such as a string containing the sequence "%G5",
|
||||
which is not a valid hexadecimal number) the output will be invalid as
|
||||
well. As an example: the sequence "%G5" could be decoded to 'W'.
|
||||
*/
|
||||
QString QUrl::fromPercentEncoding(const QByteArray &input)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QT_NO_THREAD
|
||||
#include "qmutex.h"
|
||||
#include "qwaitcondition.h"
|
||||
#include "qelapsedtimer.h"
|
||||
#include "qdeadlinetimer.h"
|
||||
#include "qdatetime.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -217,20 +217,19 @@ bool QSemaphore::tryAcquire(int n)
|
||||
bool QSemaphore::tryAcquire(int n, int timeout)
|
||||
{
|
||||
Q_ASSERT_X(n >= 0, "QSemaphore::tryAcquire", "parameter 'n' must be non-negative");
|
||||
if (timeout < 0)
|
||||
return tryAcquire(n);
|
||||
|
||||
QDeadlineTimer timer(timeout);
|
||||
QMutexLocker locker(&d->mutex);
|
||||
if (timeout < 0) {
|
||||
while (n > d->avail)
|
||||
d->cond.wait(locker.mutex());
|
||||
} else {
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
while (n > d->avail) {
|
||||
const qint64 elapsed = timer.elapsed();
|
||||
if (timeout - elapsed <= 0
|
||||
|| !d->cond.wait(locker.mutex(), timeout - elapsed))
|
||||
return false;
|
||||
}
|
||||
qint64 remainingTime = timer.remainingTime();
|
||||
while (n > d->avail && remainingTime > 0) {
|
||||
if (!d->cond.wait(locker.mutex(), remainingTime))
|
||||
return false;
|
||||
remainingTime = timer.remainingTime();
|
||||
}
|
||||
if (n > d->avail)
|
||||
return false;
|
||||
d->avail -= n;
|
||||
return true;
|
||||
|
||||
|
@ -4563,6 +4563,10 @@ void q_fromPercentEncoding(QByteArray *ba)
|
||||
text.data(); // returns "Qt is great!"
|
||||
\endcode
|
||||
|
||||
\note Given invalid input (such as a string containing the sequence "%G5",
|
||||
which is not a valid hexadecimal number) the output will be invalid as
|
||||
well. As an example: the sequence "%G5" could be decoded to 'W'.
|
||||
|
||||
\sa toPercentEncoding(), QUrl::fromPercentEncoding()
|
||||
*/
|
||||
QByteArray QByteArray::fromPercentEncoding(const QByteArray &input, char percent)
|
||||
|
@ -141,7 +141,7 @@ qtConfig(system-zlib) {
|
||||
}
|
||||
|
||||
qtConfig(icu) {
|
||||
include($$PWD/../../3rdparty/icu_dependency.pri)
|
||||
QMAKE_USE_PRIVATE += icu
|
||||
|
||||
SOURCES += tools/qlocale_icu.cpp \
|
||||
tools/qcollator_icu.cpp
|
||||
|
@ -847,7 +847,7 @@
|
||||
"xinput2": {
|
||||
"label": "Xinput2",
|
||||
"emitIf": "features.xcb",
|
||||
"condition": "libs.xinput2",
|
||||
"condition": "features.xcb-xlib && libs.xinput2",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"xkbcommon-evdev": {
|
||||
@ -1068,6 +1068,12 @@
|
||||
"section": "Utilities",
|
||||
"condition": "!config.integrity",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"whatsthis": {
|
||||
"label": "QWhatsThis",
|
||||
"purpose": "Supports displaying \"What's this\" help.",
|
||||
"section": "Widget Support",
|
||||
"output": [ "publicFeature", "feature" ]
|
||||
}
|
||||
},
|
||||
|
||||
@ -1089,7 +1095,7 @@ XKB configuration data. This is required for keyboard input support."
|
||||
{
|
||||
"type": "note",
|
||||
"condition": "features.accessibility && features.xcb && !features.accessibility-atspi-bridge",
|
||||
"message": "Disabling Linux Accessibility Bridge: D-Bus is missing."
|
||||
"message": "Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing."
|
||||
},
|
||||
{
|
||||
"type": "warning",
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
inline void setStatusTip(const QString &statusTip);
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_WHATSTHIS
|
||||
#if QT_CONFIG(whatsthis)
|
||||
inline QString whatsThis() const {
|
||||
return qvariant_cast<QString>(data(Qt::WhatsThisRole));
|
||||
}
|
||||
@ -272,7 +272,7 @@ inline void QStandardItem::setStatusTip(const QString &astatusTip)
|
||||
{ setData(astatusTip, Qt::StatusTipRole); }
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_WHATSTHIS
|
||||
#if QT_CONFIG(whatsthis)
|
||||
inline void QStandardItem::setWhatsThis(const QString &awhatsThis)
|
||||
{ setData(awhatsThis, Qt::WhatsThisRole); }
|
||||
#endif
|
||||
|
@ -767,7 +767,7 @@ QHoverEvent::~QHoverEvent()
|
||||
|
||||
\sa pos(), pixelDelta(), angleDelta()
|
||||
*/
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
QWheelEvent::QWheelEvent(const QPointF &pos, int delta,
|
||||
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers,
|
||||
Qt::Orientation orient)
|
||||
@ -952,7 +952,7 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
|
||||
invertedScrolling(inverted)
|
||||
{}
|
||||
|
||||
#endif // QT_NO_WHEELEVENT
|
||||
#endif // QT_CONFIG(wheelevent)
|
||||
|
||||
/*!
|
||||
\fn QPoint QWheelEvent::pixelDelta() const
|
||||
@ -2264,7 +2264,7 @@ QVariant QInputMethodQueryEvent::value(Qt::InputMethodQuery query) const
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
|
||||
/*!
|
||||
\class QTabletEvent
|
||||
@ -2706,7 +2706,7 @@ Qt::MouseButtons QTabletEvent::buttons() const
|
||||
\sa posF()
|
||||
*/
|
||||
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#ifndef QT_NO_GESTURES
|
||||
/*!
|
||||
@ -3325,7 +3325,7 @@ QStatusTipEvent::~QStatusTipEvent()
|
||||
|
||||
#endif // QT_NO_STATUSTIP
|
||||
|
||||
#ifndef QT_NO_WHATSTHIS
|
||||
#if QT_CONFIG(whatsthis)
|
||||
|
||||
/*!
|
||||
\class QWhatsThisClickedEvent
|
||||
@ -3362,7 +3362,7 @@ QWhatsThisClickedEvent::~QWhatsThisClickedEvent()
|
||||
This?" text.
|
||||
*/
|
||||
|
||||
#endif // QT_NO_WHATSTHIS
|
||||
#endif // QT_CONFIG(whatsthis)
|
||||
|
||||
#ifndef QT_NO_ACTION
|
||||
|
||||
@ -3856,7 +3856,7 @@ static void formatDropEvent(QDebug d, const QDropEvent *e)
|
||||
|
||||
# endif // !QT_NO_DRAGANDDROP
|
||||
|
||||
# ifndef QT_NO_TABLETEVENT
|
||||
# if QT_CONFIG(tabletevent)
|
||||
|
||||
static void formatTabletEvent(QDebug d, const QTabletEvent *e)
|
||||
{
|
||||
@ -3883,7 +3883,7 @@ static void formatTabletEvent(QDebug d, const QTabletEvent *e)
|
||||
d << ", tangentialPressure=" << e->tangentialPressure();
|
||||
}
|
||||
|
||||
# endif // !QT_NO_TABLETEVENT
|
||||
# endif // QT_CONFIG(tabletevent)
|
||||
|
||||
QDebug operator<<(QDebug dbg, const QTouchEvent::TouchPoint &tp)
|
||||
{
|
||||
@ -3956,13 +3956,13 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
|
||||
dbg << ')';
|
||||
}
|
||||
break;
|
||||
# ifndef QT_NO_WHEELEVENT
|
||||
# if QT_CONFIG(wheelevent)
|
||||
case QEvent::Wheel: {
|
||||
const QWheelEvent *we = static_cast<const QWheelEvent *>(e);
|
||||
dbg << "QWheelEvent(" << "pixelDelta=" << we->pixelDelta() << ", angleDelta=" << we->angleDelta() << ')';
|
||||
}
|
||||
break;
|
||||
# endif // !QT_NO_WHEELEVENT
|
||||
# endif // QT_CONFIG(wheelevent)
|
||||
case QEvent::KeyPress:
|
||||
case QEvent::KeyRelease:
|
||||
case QEvent::ShortcutOverride:
|
||||
@ -4063,7 +4063,7 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
|
||||
dbg << "QContextMenuEvent(" << static_cast<const QContextMenuEvent *>(e)->pos() << ')';
|
||||
break;
|
||||
# endif // !QT_NO_CONTEXTMENU
|
||||
# ifndef QT_NO_TABLETEVENT
|
||||
# if QT_CONFIG(tabletevent)
|
||||
case QEvent::TabletEnterProximity:
|
||||
case QEvent::TabletLeaveProximity:
|
||||
case QEvent::TabletPress:
|
||||
@ -4071,7 +4071,7 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
|
||||
case QEvent::TabletRelease:
|
||||
formatTabletEvent(dbg, static_cast<const QTabletEvent *>(e));
|
||||
break;
|
||||
# endif // !QT_NO_TABLETEVENT
|
||||
# endif // QT_CONFIG(tabletevent)
|
||||
case QEvent::Enter:
|
||||
dbg << "QEnterEvent(" << static_cast<const QEnterEvent *>(e)->pos() << ')';
|
||||
break;
|
||||
|
@ -169,7 +169,7 @@ protected:
|
||||
QPointF p, op;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
class Q_GUI_EXPORT QWheelEvent : public QInputEvent
|
||||
{
|
||||
public:
|
||||
@ -237,7 +237,7 @@ protected:
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
class Q_GUI_EXPORT QTabletEvent : public QInputEvent
|
||||
{
|
||||
Q_GADGET
|
||||
@ -295,7 +295,7 @@ protected:
|
||||
// ### Qt 6: QPointingEvent will have Buttons, QTabletEvent will inherit
|
||||
void *mExtra;
|
||||
};
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#ifndef QT_NO_GESTURES
|
||||
class Q_GUI_EXPORT QNativeGestureEvent : public QInputEvent
|
||||
@ -699,7 +699,7 @@ private:
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_WHATSTHIS
|
||||
#if QT_CONFIG(whatsthis)
|
||||
class Q_GUI_EXPORT QWhatsThisClickedEvent : public QEvent
|
||||
{
|
||||
public:
|
||||
|
@ -94,7 +94,7 @@ public:
|
||||
QVector<QPointF> rawScreenPositions;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
class QTabletEventPrivate
|
||||
{
|
||||
public:
|
||||
@ -106,7 +106,7 @@ public:
|
||||
Qt::MouseButton b;
|
||||
Qt::MouseButtons buttonState;
|
||||
};
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -2004,7 +2004,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
|
||||
|
||||
void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent *e)
|
||||
{
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
QWindow *window = e->window.data();
|
||||
QPointF globalPoint = e->globalPos;
|
||||
QPointF localPoint = e->localPos;
|
||||
@ -2034,7 +2034,7 @@ void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::Wh
|
||||
QGuiApplication::sendSpontaneousEvent(window, &ev);
|
||||
#else
|
||||
Q_UNUSED(e);
|
||||
#endif /* ifndef QT_NO_WHEELEVENT */
|
||||
#endif // QT_CONFIG(wheelevent)
|
||||
}
|
||||
|
||||
// Remember, Qt convention is: keyboard state is state *before*
|
||||
@ -2309,7 +2309,7 @@ QGuiApplicationPrivate::TabletPointData &QGuiApplicationPrivate::tabletDevicePoi
|
||||
|
||||
void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::TabletEvent *e)
|
||||
{
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
TabletPointData &pointData = tabletDevicePoint(e->uid);
|
||||
|
||||
QEvent::Type type = QEvent::TabletMove;
|
||||
@ -2376,7 +2376,7 @@ void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::T
|
||||
|
||||
void QGuiApplicationPrivate::processTabletEnterProximityEvent(QWindowSystemInterfacePrivate::TabletEnterProximityEvent *e)
|
||||
{
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
QTabletEvent ev(QEvent::TabletEnterProximity, QPointF(), QPointF(),
|
||||
e->device, e->pointerType, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
@ -2390,7 +2390,7 @@ void QGuiApplicationPrivate::processTabletEnterProximityEvent(QWindowSystemInter
|
||||
|
||||
void QGuiApplicationPrivate::processTabletLeaveProximityEvent(QWindowSystemInterfacePrivate::TabletLeaveProximityEvent *e)
|
||||
{
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
QTabletEvent ev(QEvent::TabletLeaveProximity, QPointF(), QPointF(),
|
||||
e->device, e->pointerType, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
|
@ -2268,7 +2268,7 @@ bool QWindow::event(QEvent *ev)
|
||||
#endif
|
||||
break; }
|
||||
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
case QEvent::Wheel:
|
||||
wheelEvent(static_cast<QWheelEvent*>(ev));
|
||||
break;
|
||||
@ -2302,7 +2302,7 @@ bool QWindow::event(QEvent *ev)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
case QEvent::TabletPress:
|
||||
case QEvent::TabletMove:
|
||||
case QEvent::TabletRelease:
|
||||
@ -2466,7 +2466,7 @@ void QWindow::mouseMoveEvent(QMouseEvent *ev)
|
||||
ev->ignore();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
/*!
|
||||
Override this to handle mouse wheel or other wheel events (\a ev).
|
||||
*/
|
||||
@ -2474,7 +2474,7 @@ void QWindow::wheelEvent(QWheelEvent *ev)
|
||||
{
|
||||
ev->ignore();
|
||||
}
|
||||
#endif //QT_NO_WHEELEVENT
|
||||
#endif // QT_CONFIG(wheelevent)
|
||||
|
||||
/*!
|
||||
Override this to handle touch events (\a ev).
|
||||
@ -2484,7 +2484,7 @@ void QWindow::touchEvent(QTouchEvent *ev)
|
||||
ev->ignore();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
/*!
|
||||
Override this to handle tablet press, move, and release events (\a ev).
|
||||
|
||||
|
@ -71,11 +71,11 @@ class QShowEvent;
|
||||
class QHideEvent;
|
||||
class QKeyEvent;
|
||||
class QMouseEvent;
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
class QWheelEvent;
|
||||
#endif
|
||||
class QTouchEvent;
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
class QTabletEvent;
|
||||
#endif
|
||||
|
||||
@ -354,11 +354,11 @@ protected:
|
||||
virtual void mouseReleaseEvent(QMouseEvent *);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
virtual void wheelEvent(QWheelEvent *);
|
||||
#endif
|
||||
virtual void touchEvent(QTouchEvent *);
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
virtual void tabletEvent(QTabletEvent *);
|
||||
#endif
|
||||
virtual bool nativeEvent(const QByteArray &eventType, void *message, long *result);
|
||||
|
@ -867,7 +867,7 @@ void QWindowSystemInterface::handleContextMenuEvent(QWindow *window, bool mouseT
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_WHATSTHIS
|
||||
#if QT_CONFIG(whatsthis)
|
||||
void QWindowSystemInterface::handleEnterWhatsThisEvent()
|
||||
{
|
||||
QWindowSystemInterfacePrivate::WindowSystemEvent *e =
|
||||
|
@ -239,7 +239,7 @@ public:
|
||||
const QPoint &pos, const QPoint &globalPos,
|
||||
Qt::KeyboardModifiers modifiers);
|
||||
#endif
|
||||
#ifndef QT_NO_WHATSTHIS
|
||||
#if QT_CONFIG(whatsthis)
|
||||
static void handleEnterWhatsThisEvent();
|
||||
#endif
|
||||
|
||||
|
@ -1362,7 +1362,7 @@ static inline void qConvertARGB64PMToA2RGB30PM_sse2(uint *dest, const QRgba64 *b
|
||||
const __m128i cmask = _mm_set1_epi32(0x000003ff);
|
||||
int i = 0;
|
||||
__m128i vr, vg, vb, va;
|
||||
for (; i < count && (const uintptr_t)buffer & 0xF; ++i) {
|
||||
for (; i < count && uintptr_t(buffer) & 0xF; ++i) {
|
||||
*dest++ = qConvertRgb64ToRgb30<PixelOrder>(*buffer++);
|
||||
}
|
||||
|
||||
|
@ -395,7 +395,7 @@ bool QNativeSocketEnginePrivate::checkProxy(const QHostAddress &address)
|
||||
// QNetworkProxyQuery).
|
||||
QNetworkProxyQuery query;
|
||||
query.setQueryType(queryType);
|
||||
proxy = QNetworkProxyFactory::systemProxyForQuery(query).constFirst();
|
||||
proxy = QNetworkProxyFactory::proxyForQuery(query).constFirst();
|
||||
}
|
||||
|
||||
if (proxy.type() != QNetworkProxy::DefaultProxy &&
|
||||
|
@ -886,6 +886,7 @@ int QNativeSocketEnginePrivate::nativeAccept()
|
||||
break;
|
||||
case WSAENETDOWN:
|
||||
setError(QAbstractSocket::NetworkError, NetworkUnreachableErrorString);
|
||||
break;
|
||||
case WSAENOTSOCK:
|
||||
setError(QAbstractSocket::SocketResourceError, NotSocketErrorString);
|
||||
break;
|
||||
|
@ -251,17 +251,16 @@ public:
|
||||
{
|
||||
HRESULT hr = action->GetResults();
|
||||
if (FAILED(hr)) {
|
||||
switch (hr) {
|
||||
case HRESULT_FROM_WIN32(WSAETIMEDOUT):
|
||||
if (hr == HRESULT_FROM_WIN32(WSAETIMEDOUT)) {
|
||||
emit connectOpFinished(false, QAbstractSocket::NetworkError, WinRTSocketEngine::ConnectionTimeOutErrorString);
|
||||
return S_OK;
|
||||
case HRESULT_FROM_WIN32(WSAEHOSTUNREACH):
|
||||
} else if (hr == HRESULT_FROM_WIN32(WSAEHOSTUNREACH)) {
|
||||
emit connectOpFinished(false, QAbstractSocket::HostNotFoundError, WinRTSocketEngine::HostUnreachableErrorString);
|
||||
return S_OK;
|
||||
case HRESULT_FROM_WIN32(WSAECONNREFUSED):
|
||||
} else if (hr == HRESULT_FROM_WIN32(WSAECONNREFUSED)) {
|
||||
emit connectOpFinished(false, QAbstractSocket::ConnectionRefusedError, WinRTSocketEngine::ConnectionRefusedErrorString);
|
||||
return S_OK;
|
||||
default:
|
||||
} else {
|
||||
emit connectOpFinished(false, QAbstractSocket::UnknownSocketError, WinRTSocketEngine::UnknownSocketErrorString);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ bool QGLBuffer::read(int offset, void *data, int count)
|
||||
{
|
||||
#if !defined(QT_OPENGL_ES)
|
||||
Q_D(QGLBuffer);
|
||||
if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id())
|
||||
if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id() || !d->funcs->d()->GetBufferSubData)
|
||||
return false;
|
||||
while (d->funcs->glGetError() != GL_NO_ERROR) ; // Clear error state.
|
||||
d->funcs->glGetBufferSubData(d->type, offset, count, data);
|
||||
|
@ -395,8 +395,8 @@ void QIBusPlatformInputContext::filterEventFinished(QDBusPendingCallWatcher *cal
|
||||
|
||||
Qt::KeyboardModifiers modifiers = watcher->modifiers();
|
||||
QVariantList args = watcher->arguments();
|
||||
const ulong time = static_cast<const ulong>(args.at(0).toUInt());
|
||||
const QEvent::Type type = static_cast<const QEvent::Type>(args.at(1).toUInt());
|
||||
const ulong time = static_cast<ulong>(args.at(0).toUInt());
|
||||
const QEvent::Type type = static_cast<QEvent::Type>(args.at(1).toUInt());
|
||||
const int qtcode = args.at(2).toInt();
|
||||
const quint32 code = args.at(3).toUInt();
|
||||
const quint32 sym = args.at(4).toUInt();
|
||||
|
@ -38,6 +38,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#include "androidjniinput.h"
|
||||
#include "androidjnimain.h"
|
||||
#include "qandroidplatformintegration.h"
|
||||
@ -292,17 +294,17 @@ namespace QtAndroidInput
|
||||
|
||||
static bool isTabletEventSupported(JNIEnv */*env*/, jobject /*thiz*/)
|
||||
{
|
||||
#ifdef QT_NO_TABLETEVENT
|
||||
return false;
|
||||
#else
|
||||
#if QT_CONFIG(tabletevent)
|
||||
return true;
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#else
|
||||
return false;
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
}
|
||||
|
||||
static void tabletEvent(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint deviceId, jlong time, jint action,
|
||||
jint pointerType, jint buttonState, jfloat x, jfloat y, jfloat pressure)
|
||||
{
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
QPointF globalPosF(x, y);
|
||||
QPoint globalPos((int)x, (int)y);
|
||||
QWindow *tlw = topLevelWindowAt(globalPos);
|
||||
@ -344,7 +346,7 @@ namespace QtAndroidInput
|
||||
QWindowSystemInterface::handleTabletEvent(tlw, ulong(time),
|
||||
localPos, globalPosF, QTabletEvent::Stylus, pointerType,
|
||||
buttons, pressure, 0, 0, 0., 0., 0, deviceId, Qt::NoModifier);
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
}
|
||||
|
||||
static int mapAndroidKey(int key)
|
||||
|
@ -21,8 +21,6 @@ OBJECTIVE_SOURCES += main.mm \
|
||||
qmultitouch_mac.mm \
|
||||
qcocoaaccessibilityelement.mm \
|
||||
qcocoaaccessibility.mm \
|
||||
qcocoacolordialoghelper.mm \
|
||||
qcocoafiledialoghelper.mm \
|
||||
qcocoafontdialoghelper.mm \
|
||||
qcocoacursor.mm \
|
||||
qcocoaclipboard.mm \
|
||||
@ -57,8 +55,6 @@ HEADERS += qcocoaintegration.h \
|
||||
qmultitouch_mac_p.h \
|
||||
qcocoaaccessibilityelement.h \
|
||||
qcocoaaccessibility.h \
|
||||
qcocoacolordialoghelper.h \
|
||||
qcocoafiledialoghelper.h \
|
||||
qcocoafontdialoghelper.h \
|
||||
qcocoacursor.h \
|
||||
qcocoaclipboard.h \
|
||||
@ -91,6 +87,8 @@ QT += \
|
||||
CONFIG += no_app_extension_api_only
|
||||
|
||||
qtHaveModule(widgets) {
|
||||
QT_FOR_CONFIG += widgets
|
||||
|
||||
OBJECTIVE_SOURCES += \
|
||||
qpaintengine_mac.mm \
|
||||
qprintengine_mac.mm \
|
||||
@ -103,6 +101,16 @@ qtHaveModule(widgets) {
|
||||
qcocoaprintersupport.h \
|
||||
qcocoaprintdevice.h \
|
||||
|
||||
qtConfig(colordialog) {
|
||||
SOURCES += qcocoacolordialoghelper.mm
|
||||
HEADERS += qcocoacolordialoghelper.h
|
||||
}
|
||||
|
||||
qtConfig(filedialog) {
|
||||
SOURCES += qcocoafiledialoghelper.mm
|
||||
HEADERS += qcocoafiledialoghelper.h
|
||||
}
|
||||
|
||||
QT += widgets-private printsupport-private
|
||||
}
|
||||
|
||||
|
@ -40,9 +40,13 @@
|
||||
#ifndef QCOCOACOLORDIALOGHELPER_H
|
||||
#define QCOCOACOLORDIALOGHELPER_H
|
||||
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <qpa/qplatformdialoghelper.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(colordialog);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QCocoaColorDialogHelper : public QPlatformColorDialogHelper
|
||||
|
@ -37,8 +37,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QT_NO_COLORDIALOG
|
||||
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtCore/qtimer.h>
|
||||
#include <qpa/qplatformtheme.h>
|
||||
@ -424,5 +422,3 @@ QColor QCocoaColorDialogHelper::currentColor() const
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_COLORDIALOG
|
||||
|
@ -41,8 +41,11 @@
|
||||
#define QCOCOAFILEDIALOGHELPER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <qpa/qplatformdialoghelper.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(filedialog);
|
||||
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate));
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -41,8 +41,6 @@
|
||||
|
||||
#include "qcocoafiledialoghelper.h"
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
|
||||
/*****************************************************************************
|
||||
QFileDialog debug facilities
|
||||
*****************************************************************************/
|
||||
@ -775,5 +773,3 @@ bool QCocoaFileDialogHelper::defaultNameFilterDisables() const
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_FILEDIALOG
|
||||
|
@ -47,7 +47,6 @@
|
||||
#include "qcocoahelpers.h"
|
||||
#include "qcocoaapplication.h"
|
||||
#include "qcocoaapplicationdelegate.h"
|
||||
#include "qcocoafiledialoghelper.h"
|
||||
#include "qcocoatheme.h"
|
||||
#include "qcocoainputcontext.h"
|
||||
#include "qcocoamimetypes.h"
|
||||
@ -60,6 +59,13 @@
|
||||
|
||||
#include <QtGui/private/qcoregraphics_p.h>
|
||||
|
||||
#ifdef QT_WIDGETS_LIB
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#if QT_CONFIG(filedialog)
|
||||
#include "qcocoafiledialoghelper.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <IOKit/graphics/IOGraphicsLib.h>
|
||||
|
||||
static void initResources()
|
||||
|
@ -45,7 +45,6 @@
|
||||
#include <QtCore/QVariant>
|
||||
|
||||
#include "qcocoacolordialoghelper.h"
|
||||
#include "qcocoafiledialoghelper.h"
|
||||
#include "qcocoafontdialoghelper.h"
|
||||
#include "qcocoasystemsettings.h"
|
||||
#include "qcocoasystemtrayicon.h"
|
||||
@ -63,6 +62,13 @@
|
||||
#include <qpa/qplatformintegration.h>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
|
||||
#ifdef QT_WIDGETS_LIB
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#if QT_CONFIG(filedialog)
|
||||
#include "qcocoafiledialoghelper.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
@interface QT_MANGLE_NAMESPACE(QCocoaThemeNotificationReceiver) : NSObject {
|
||||
@ -124,7 +130,7 @@ bool QCocoaTheme::usePlatformNativeDialog(DialogType dialogType) const
|
||||
{
|
||||
if (dialogType == QPlatformTheme::FileDialog)
|
||||
return true;
|
||||
#ifndef QT_NO_COLORDIALOG
|
||||
#if QT_CONFIG(colordialog)
|
||||
if (dialogType == QPlatformTheme::ColorDialog)
|
||||
return true;
|
||||
#endif
|
||||
@ -138,11 +144,11 @@ bool QCocoaTheme::usePlatformNativeDialog(DialogType dialogType) const
|
||||
QPlatformDialogHelper * QCocoaTheme::createPlatformDialogHelper(DialogType dialogType) const
|
||||
{
|
||||
switch (dialogType) {
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
#if defined(QT_WIDGETS_LIB) && QT_CONFIG(filedialog)
|
||||
case QPlatformTheme::FileDialog:
|
||||
return new QCocoaFileDialogHelper();
|
||||
#endif
|
||||
#ifndef QT_NO_COLORDIALOG
|
||||
#if QT_CONFIG(colordialog)
|
||||
case QPlatformTheme::ColorDialog:
|
||||
return new QCocoaColorDialogHelper();
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#include "qnsview.h"
|
||||
#include "qcocoawindow.h"
|
||||
@ -363,6 +363,14 @@ static QTouchDevice *touchDevice = 0;
|
||||
|
||||
m_backingStore = backingStore;
|
||||
m_backingStoreOffset = offset * m_backingStore->paintDevice()->devicePixelRatio();
|
||||
|
||||
// Prevent buildup of NSDisplayCycle objects during setNeedsDisplayInRect, which
|
||||
// would normally be released as part of the root runloop's autorelease pool, but
|
||||
// can be kept alive during repeated painting which starve the root runloop.
|
||||
// FIXME: Move this to the event dispatcher, to cover more cases of starvation.
|
||||
// FIXME: Figure out if there's a way to detect and/or prevent runloop starvation.
|
||||
QMacAutoReleasePool pool;
|
||||
|
||||
for (const QRect &rect : region)
|
||||
[self setNeedsDisplayInRect:NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height())];
|
||||
}
|
||||
@ -1356,7 +1364,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
}
|
||||
#endif // QT_NO_GESTURES
|
||||
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
#if QT_CONFIG(wheelevent)
|
||||
- (void)scrollWheel:(NSEvent *)theEvent
|
||||
{
|
||||
if (!m_platformWindow)
|
||||
@ -1437,7 +1445,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
|
||||
QWindowSystemInterface::handleWheelEvent(m_platformWindow->window(), qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers, ph, source, isInverted);
|
||||
}
|
||||
#endif //QT_NO_WHEELEVENT
|
||||
#endif // QT_CONFIG(wheelevent)
|
||||
|
||||
- (int) convertKeyCode : (QChar)keyChar
|
||||
{
|
||||
@ -1512,7 +1520,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, [nsevent isARepeat], 1);
|
||||
}
|
||||
|
||||
QObject *fo = QGuiApplication::focusObject();
|
||||
QObject *fo = m_platformWindow->window()->focusObject();
|
||||
if (m_sendKeyEvent && fo) {
|
||||
QInputMethodQueryEvent queryEvent(Qt::ImEnabled | Qt::ImHints);
|
||||
if (QCoreApplication::sendEvent(fo, &queryEvent)) {
|
||||
@ -1662,8 +1670,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
commitString = QString::fromCFString(reinterpret_cast<CFStringRef>(aString));
|
||||
};
|
||||
}
|
||||
QObject *fo = QGuiApplication::focusObject();
|
||||
if (fo) {
|
||||
if (QObject *fo = m_platformWindow->window()->focusObject()) {
|
||||
QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
|
||||
if (QCoreApplication::sendEvent(fo, &queryEvent)) {
|
||||
if (queryEvent.value(Qt::ImEnabled).toBool()) {
|
||||
@ -1730,8 +1737,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
|
||||
m_composingText = preeditString;
|
||||
|
||||
QObject *fo = QGuiApplication::focusObject();
|
||||
if (fo) {
|
||||
if (QObject *fo = m_platformWindow->window()->focusObject()) {
|
||||
QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
|
||||
if (QCoreApplication::sendEvent(fo, &queryEvent)) {
|
||||
if (queryEvent.value(Qt::ImEnabled).toBool()) {
|
||||
@ -1747,8 +1753,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
- (void) unmarkText
|
||||
{
|
||||
if (!m_composingText.isEmpty()) {
|
||||
QObject *fo = QGuiApplication::focusObject();
|
||||
if (fo) {
|
||||
if (QObject *fo = m_platformWindow->window()->focusObject()) {
|
||||
QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
|
||||
if (QCoreApplication::sendEvent(fo, &queryEvent)) {
|
||||
if (queryEvent.value(Qt::ImEnabled).toBool()) {
|
||||
@ -1770,7 +1775,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
- (NSAttributedString *) attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
|
||||
{
|
||||
Q_UNUSED(actualRange)
|
||||
QObject *fo = QGuiApplication::focusObject();
|
||||
QObject *fo = m_platformWindow->window()->focusObject();
|
||||
if (!fo)
|
||||
return nil;
|
||||
QInputMethodQueryEvent queryEvent(Qt::ImEnabled | Qt::ImCurrentSelection);
|
||||
@ -1805,7 +1810,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
{
|
||||
NSRange selectedRange = {0, 0};
|
||||
|
||||
QObject *fo = QGuiApplication::focusObject();
|
||||
QObject *fo = m_platformWindow->window()->focusObject();
|
||||
if (!fo)
|
||||
return selectedRange;
|
||||
QInputMethodQueryEvent queryEvent(Qt::ImEnabled | Qt::ImCurrentSelection);
|
||||
@ -1827,7 +1832,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
{
|
||||
Q_UNUSED(aRange)
|
||||
Q_UNUSED(actualRange)
|
||||
QObject *fo = QGuiApplication::focusObject();
|
||||
QObject *fo = m_platformWindow->window()->focusObject();
|
||||
if (!fo)
|
||||
return NSZeroRect;
|
||||
|
||||
@ -1867,7 +1872,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
if (m_platformWindow->window() != QGuiApplication::focusWindow())
|
||||
return nil;
|
||||
|
||||
QObject *fo = QGuiApplication::focusObject();
|
||||
QObject *fo = m_platformWindow->window()->focusObject();
|
||||
if (!fo)
|
||||
return nil;
|
||||
|
||||
|
@ -60,6 +60,7 @@
|
||||
#include "qwindowsscreen.h"
|
||||
#include "qwindowstheme.h"
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtGui/QWindow>
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
@ -940,9 +941,9 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
||||
return false;
|
||||
#endif
|
||||
case QtWindows::DisplayChangedEvent:
|
||||
return d->m_screenManager.handleDisplayChange(wParam, lParam);
|
||||
if (QWindowsTheme *t = QWindowsTheme::instance())
|
||||
t->displayChanged();
|
||||
return d->m_screenManager.handleDisplayChange(wParam, lParam);
|
||||
case QtWindows::SettingChangedEvent:
|
||||
return d->m_screenManager.handleScreenChanges();
|
||||
default:
|
||||
@ -1089,10 +1090,10 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
||||
*result = LRESULT(MA_NOACTIVATE);
|
||||
return true;
|
||||
}
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
if (!d->m_tabletSupport.isNull())
|
||||
d->m_tabletSupport->notifyActivate();
|
||||
#endif // !QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
if (platformWindow->testFlag(QWindowsWindow::BlockedByModal))
|
||||
if (const QWindow *modalWindow = QGuiApplication::modalWindow()) {
|
||||
QWindowsWindow *platformWindow = QWindowsWindow::windowsWindowOf(modalWindow);
|
||||
|
@ -1014,6 +1014,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms
|
||||
state |= ((msg.wParam >= '0' && msg.wParam <= '9')
|
||||
|| (msg.wParam >= VK_OEM_PLUS && msg.wParam <= VK_OEM_3))
|
||||
? 0 : int(Qt::KeypadModifier);
|
||||
Q_FALLTHROUGH();
|
||||
default:
|
||||
if (uint(msg.lParam) == 0x004c0001 || uint(msg.lParam) == 0xc04c0001)
|
||||
state |= Qt::KeypadModifier;
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include "qwindowstabletsupport.h"
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
|
||||
#include "qwindowscontext.h"
|
||||
#include "qwindowskeymapper.h"
|
||||
#include "qwindowswindow.h"
|
||||
@ -498,5 +496,3 @@ bool QWindowsTabletSupport::translateTabletPacketEvent()
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
|
@ -41,14 +41,15 @@
|
||||
#define QWINDOWSTABLETSUPPORT_H
|
||||
|
||||
#include "qtwindowsglobal.h"
|
||||
|
||||
#if !defined(QT_NO_TABLETEVENT)
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QPointF>
|
||||
|
||||
#include <wintab.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(tabletevent);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QDebug;
|
||||
@ -140,5 +141,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // !QT_NO_TABLETEVENT
|
||||
#endif // QWINDOWSTABLETSUPPORT_H
|
||||
|
@ -5,14 +5,6 @@ INCLUDEPATH += $$PWD/../
|
||||
|
||||
load(qt_build_paths)
|
||||
|
||||
# needed by Xcursor ...
|
||||
qtConfig(xcb-xlib) {
|
||||
DEFINES += XCB_USE_XLIB
|
||||
qtConfig(xinput2) {
|
||||
DEFINES += XCB_USE_XINPUT2
|
||||
}
|
||||
}
|
||||
|
||||
# build with session management support
|
||||
qtConfig(xcb-sm) {
|
||||
DEFINES += XCB_USE_SM
|
||||
|
@ -115,7 +115,7 @@ QPlatformOffscreenSurface *QXcbEglIntegration::createPlatformOffscreenSurface(QO
|
||||
|
||||
void *QXcbEglIntegration::xlib_display() const
|
||||
{
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
return m_connection->xlib_display();
|
||||
#else
|
||||
return EGL_DEFAULT_DISPLAY;
|
||||
|
@ -65,7 +65,7 @@ void QXcbEglWindow::resolveFormat(const QSurfaceFormat &format)
|
||||
m_format = q_glFormatFromConfig(m_glIntegration->eglDisplay(), m_config, format);
|
||||
}
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
const xcb_visualtype_t *QXcbEglWindow::createVisual()
|
||||
{
|
||||
QXcbScreen *scr = xcbScreen();
|
||||
|
@ -62,7 +62,7 @@ protected:
|
||||
void create() override;
|
||||
void resolveFormat(const QSurfaceFormat &format) override;
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
const xcb_visualtype_t *createVisual() override;
|
||||
#endif
|
||||
|
||||
|
@ -5,8 +5,6 @@ QT += egl_support-private
|
||||
|
||||
CONFIG += egl
|
||||
|
||||
qtConfig(xcb-xlib): DEFINES += XCB_USE_XLIB
|
||||
|
||||
DEFINES += QT_NO_FOREACH
|
||||
|
||||
HEADERS += \
|
||||
|
@ -75,7 +75,7 @@ typedef struct xcb_glx_buffer_swap_complete_event_t {
|
||||
} xcb_glx_buffer_swap_complete_event_t;
|
||||
#endif
|
||||
|
||||
#if defined(XCB_USE_XLIB) && defined(XCB_USE_GLX)
|
||||
#if defined(XCB_USE_GLX)
|
||||
typedef struct {
|
||||
int type;
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
@ -197,10 +197,9 @@ QPlatformOffscreenSurface *QXcbGlxIntegration::createPlatformOffscreenSurface(QO
|
||||
if (!vendorChecked) {
|
||||
vendorChecked = true;
|
||||
Display *display = glXGetCurrentDisplay();
|
||||
#ifdef XCB_USE_XLIB
|
||||
if (!display)
|
||||
display = static_cast<Display *>(m_connection->xlib_display());
|
||||
#endif
|
||||
|
||||
const char *glxvendor = glXGetClientString(display, GLX_VENDOR);
|
||||
if (glxvendor) {
|
||||
if (!strcmp(glxvendor, "ATI") || !strcmp(glxvendor, "Chromium"))
|
||||
@ -226,10 +225,9 @@ bool QXcbGlxIntegration::supportsSwitchableWidgetComposition() const
|
||||
if (!vendorChecked) {
|
||||
vendorChecked = true;
|
||||
Display *display = glXGetCurrentDisplay();
|
||||
#ifdef XCB_USE_XLIB
|
||||
if (!display)
|
||||
display = static_cast<Display *>(m_connection->xlib_display());
|
||||
#endif
|
||||
|
||||
const char *glxvendor = glXGetClientString(display, GLX_VENDOR);
|
||||
if (glxvendor) {
|
||||
if (!strcmp(glxvendor, "Parallels Inc"))
|
||||
|
@ -4,7 +4,7 @@ include(../gl_integrations_plugin_base.pri)
|
||||
QT += glx_support-private
|
||||
|
||||
#should be removed from the sources
|
||||
DEFINES += XCB_USE_GLX XCB_USE_XLIB
|
||||
DEFINES += XCB_USE_GLX
|
||||
DEFINES += QT_NO_FOREACH
|
||||
|
||||
qtConfig(xcb-glx) {
|
||||
|
@ -553,7 +553,7 @@ void QXcbBackingStore::endPaint()
|
||||
return;
|
||||
QPainter p(m_image->image());
|
||||
while (it != end) {
|
||||
const QRect rect = *it;
|
||||
const QRect rect = *(it++);
|
||||
p.drawImage(rect.topLeft(), m_rgbImage.copy(rect).rgbSwapped());
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class QXcbShmImage;
|
||||
class QXcbBackingStore : public QXcbObject, public QPlatformBackingStore
|
||||
{
|
||||
public:
|
||||
QXcbBackingStore(QWindow *widget);
|
||||
QXcbBackingStore(QWindow *window);
|
||||
~QXcbBackingStore();
|
||||
|
||||
QPaintDevice *paintDevice() override;
|
||||
|
@ -69,14 +69,14 @@
|
||||
#include <xcb/xfixes.h>
|
||||
#include <xcb/xinerama.h>
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xlib-xcb.h>
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/Xutil.h>
|
||||
#endif
|
||||
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
#if QT_CONFIG(xinput2)
|
||||
#include <X11/extensions/XI2proto.h>
|
||||
#endif
|
||||
|
||||
@ -116,7 +116,7 @@ Q_LOGGING_CATEGORY(lcQpaScreen, "qt.qpa.screen")
|
||||
#define XCB_GE_GENERIC 35
|
||||
#endif
|
||||
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
#if QT_CONFIG(xinput2)
|
||||
// Starting from the xcb version 1.9.3 struct xcb_ge_event_t has changed:
|
||||
// - "pad0" became "extension"
|
||||
// - "pad1" and "pad" became "pad0"
|
||||
@ -134,9 +134,9 @@ static inline bool isXIEvent(xcb_generic_event_t *event, int opCode)
|
||||
qt_xcb_ge_event_t *e = reinterpret_cast<qt_xcb_ge_event_t *>(event);
|
||||
return e->extension == opCode;
|
||||
}
|
||||
#endif // XCB_USE_XINPUT2
|
||||
#endif // QT_CONFIG(xinput2)
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
static const char * const xcbConnectionErrors[] = {
|
||||
"No error", /* Error 0 */
|
||||
"I/O error", /* XCB_CONN_ERROR */
|
||||
@ -540,7 +540,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
|
||||
, m_nativeInterface(nativeInterface)
|
||||
, has_render_extension(false)
|
||||
{
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
Display *dpy = XOpenDisplay(m_displayName.constData());
|
||||
if (dpy) {
|
||||
m_primaryScreenNumber = DefaultScreen(dpy);
|
||||
@ -552,7 +552,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
|
||||
}
|
||||
#else
|
||||
m_connection = xcb_connect(m_displayName.constData(), &m_primaryScreenNumber);
|
||||
#endif //XCB_USE_XLIB
|
||||
#endif // QT_CONFIG(xcb_xlib)
|
||||
|
||||
if (Q_UNLIKELY(!m_connection || xcb_connection_has_error(m_connection)))
|
||||
qFatal("QXcbConnection: Could not connect to display %s", m_displayName.constData());
|
||||
@ -587,7 +587,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
|
||||
initializeScreens();
|
||||
|
||||
initializeXRender();
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
#if QT_CONFIG(xinput2)
|
||||
if (!qEnvironmentVariableIsSet("QT_XCB_NO_XI2"))
|
||||
initializeXInput2();
|
||||
#endif
|
||||
@ -647,7 +647,7 @@ QXcbConnection::~QXcbConnection()
|
||||
delete m_drag;
|
||||
#endif
|
||||
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
#if QT_CONFIG(xinput2)
|
||||
finalizeXInput2();
|
||||
#endif
|
||||
|
||||
@ -668,7 +668,7 @@ QXcbConnection::~QXcbConnection()
|
||||
|
||||
delete m_glIntegration;
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
XCloseDisplay(static_cast<Display *>(m_xlib_display));
|
||||
#else
|
||||
xcb_disconnect(xcb_connection());
|
||||
@ -1141,7 +1141,7 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
|
||||
}
|
||||
break;
|
||||
}
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
#if QT_CONFIG(xinput2)
|
||||
case XCB_GE_GENERIC:
|
||||
// Here the windowEventListener is invoked from xi2HandleEvent()
|
||||
if (m_xi2Enabled && isXIEvent(event, m_xiOpCode))
|
||||
@ -1485,7 +1485,7 @@ xcb_window_t QXcbConnection::clientLeader()
|
||||
return m_clientLeader;
|
||||
}
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
void *QXcbConnection::xlib_display() const
|
||||
{
|
||||
return m_xlib_display;
|
||||
@ -1508,7 +1508,7 @@ void *QXcbConnection::createVisualInfoForDefaultVisualId() const
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
#if QT_CONFIG(xinput2)
|
||||
// it is safe to cast XI_* events here as long as we are only touching the first 32 bytes,
|
||||
// after that position event needs memmove, see xi2PrepareXIGenericDeviceEvent
|
||||
static inline bool isXIType(xcb_generic_event_t *event, int opCode, uint16_t type)
|
||||
@ -1553,7 +1553,7 @@ bool QXcbConnection::compressEvent(xcb_generic_event_t *event, int currentIndex,
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
#if QT_CONFIG(xinput2)
|
||||
// compress XI_* events
|
||||
if (responseType == XCB_GE_GENERIC) {
|
||||
if (!m_xi2Enabled)
|
||||
@ -1561,12 +1561,12 @@ bool QXcbConnection::compressEvent(xcb_generic_event_t *event, int currentIndex,
|
||||
|
||||
// compress XI_Motion, but not from tablet devices
|
||||
if (isXIType(event, m_xiOpCode, XI_Motion)) {
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
xXIDeviceEvent *xdev = reinterpret_cast<xXIDeviceEvent *>(event);
|
||||
if (!QCoreApplication::testAttribute(Qt::AA_CompressTabletEvents) &&
|
||||
const_cast<QXcbConnection *>(this)->tabletDataForDevice(xdev->sourceid))
|
||||
return false;
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
for (int j = nextIndex; j < eventqueue->size(); ++j) {
|
||||
xcb_generic_event_t *next = eventqueue->at(j);
|
||||
if (!isValid(next))
|
||||
|
@ -67,11 +67,11 @@
|
||||
#undef explicit
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
#include <QTabletEvent>
|
||||
#endif
|
||||
|
||||
#if XCB_USE_XINPUT2
|
||||
#if QT_CONFIG(xinput2)
|
||||
#include <X11/extensions/XI2.h>
|
||||
#ifdef XIScrollClass
|
||||
#define XCB_USE_XINPUT21 // XI 2.1 adds smooth scrolling support
|
||||
@ -80,7 +80,7 @@
|
||||
#endif
|
||||
#endif
|
||||
struct XInput2TouchDeviceData;
|
||||
#endif // XCB_USE_XINPUT2
|
||||
#endif // QT_CONFIG(xinput2)
|
||||
|
||||
struct xcb_randr_get_output_info_reply_t;
|
||||
|
||||
@ -422,12 +422,12 @@ public:
|
||||
bool hasDefaultVisualId() const { return m_defaultVisualId != UINT_MAX; }
|
||||
xcb_visualid_t defaultVisualId() const { return m_defaultVisualId; }
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
void *xlib_display() const;
|
||||
void *createVisualInfoForDefaultVisualId() const;
|
||||
#endif
|
||||
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
#if QT_CONFIG(xinput2)
|
||||
void xi2Select(xcb_window_t window);
|
||||
#endif
|
||||
#ifdef XCB_USE_XINPUT21
|
||||
@ -552,7 +552,7 @@ private:
|
||||
void destroyScreen(QXcbScreen *screen);
|
||||
void initializeScreens();
|
||||
bool compressEvent(xcb_generic_event_t *event, int currentIndex, QXcbEventArray *eventqueue) const;
|
||||
#ifdef XCB_USE_XINPUT2
|
||||
#if QT_CONFIG(xinput2)
|
||||
bool m_xi2Enabled = false;
|
||||
int m_xi2Minor = 2;
|
||||
void initializeXInput2();
|
||||
@ -566,7 +566,7 @@ private:
|
||||
#ifdef XCB_USE_XINPUT22
|
||||
void xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindow);
|
||||
#endif // XCB_USE_XINPUT22
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
struct TabletData {
|
||||
int deviceId = 0;
|
||||
QTabletEvent::PointerType pointerType = QTabletEvent::UnknownPointer;
|
||||
@ -588,7 +588,7 @@ private:
|
||||
void xi2ReportTabletEvent(const void *event, TabletData *tabletData);
|
||||
QVector<TabletData> m_tabletData;
|
||||
TabletData *tabletDataForDevice(int id);
|
||||
#endif // !QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
struct ScrollingDevice {
|
||||
int deviceId = 0;
|
||||
int verticalIndex = 0;
|
||||
@ -633,11 +633,11 @@ private:
|
||||
QScopedPointer<QXcbWMSupport> m_wmSupport;
|
||||
QXcbNativeInterface *m_nativeInterface = nullptr;
|
||||
|
||||
#if defined(XCB_USE_XLIB)
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
void *m_xlib_display = nullptr;
|
||||
#endif
|
||||
QXcbEventReader *m_reader = nullptr;
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
#if QT_CONFIG(xinput2)
|
||||
QHash<int, XInput2TouchDeviceData*> m_touchDevices;
|
||||
#ifdef XCB_USE_XINPUT22
|
||||
struct StartSystemResizeInfo {
|
||||
@ -679,8 +679,8 @@ private:
|
||||
|
||||
friend class QXcbEventReader;
|
||||
};
|
||||
#ifdef XCB_USE_XINPUT2
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(xinput2)
|
||||
#if QT_CONFIG(tabletevent)
|
||||
Q_DECLARE_TYPEINFO(QXcbConnection::TabletData::ValuatorClassInfo, Q_PRIMITIVE_TYPE);
|
||||
Q_DECLARE_TYPEINFO(QXcbConnection::TabletData, Q_MOVABLE_TYPE);
|
||||
#endif
|
||||
|
@ -47,8 +47,6 @@
|
||||
#include <QDebug>
|
||||
#include <cmath>
|
||||
|
||||
#ifdef XCB_USE_XINPUT2
|
||||
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/extensions/XI2proto.h>
|
||||
|
||||
@ -100,7 +98,7 @@ void QXcbConnection::initializeXInput2()
|
||||
|
||||
void QXcbConnection::xi2SetupDevices()
|
||||
{
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
m_tabletData.clear();
|
||||
#endif
|
||||
m_scrollingDevices.clear();
|
||||
@ -116,7 +114,7 @@ void QXcbConnection::xi2SetupDevices()
|
||||
if (devices[i].use != XISlavePointer)
|
||||
continue;
|
||||
qCDebug(lcQpaXInputDevices) << "input device " << devices[i].name << "ID" << devices[i].deviceid;
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
TabletData tabletData;
|
||||
#endif
|
||||
ScrollingDevice scrollingDevice;
|
||||
@ -126,7 +124,7 @@ void QXcbConnection::xi2SetupDevices()
|
||||
XIValuatorClassInfo *vci = reinterpret_cast<XIValuatorClassInfo *>(devices[i].classes[c]);
|
||||
const int valuatorAtom = qatom(vci->label);
|
||||
qCDebug(lcQpaXInputDevices) << " has valuator" << atomName(vci->label) << "recognized?" << (valuatorAtom < QXcbAtom::NAtoms);
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
if (valuatorAtom < QXcbAtom::NAtoms) {
|
||||
TabletData::ValuatorClassInfo info;
|
||||
info.minVal = vci->min;
|
||||
@ -134,7 +132,7 @@ void QXcbConnection::xi2SetupDevices()
|
||||
info.number = vci->number;
|
||||
tabletData.valuatorInfo[valuatorAtom] = info;
|
||||
}
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
if (valuatorAtom == QXcbAtom::RelHorizScroll || valuatorAtom == QXcbAtom::RelHorizWheel)
|
||||
scrollingDevice.lastScrollPosition.setX(vci->value);
|
||||
else if (valuatorAtom == QXcbAtom::RelVertScroll || valuatorAtom == QXcbAtom::RelVertWheel)
|
||||
@ -191,7 +189,7 @@ void QXcbConnection::xi2SetupDevices()
|
||||
}
|
||||
}
|
||||
bool isTablet = false;
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
// If we have found the valuators which we expect a tablet to have, it might be a tablet.
|
||||
if (tabletData.valuatorInfo.contains(QXcbAtom::AbsX) &&
|
||||
tabletData.valuatorInfo.contains(QXcbAtom::AbsY) &&
|
||||
@ -241,7 +239,7 @@ void QXcbConnection::xi2SetupDevices()
|
||||
m_tabletData.append(tabletData);
|
||||
qCDebug(lcQpaXInputDevices) << " it's a tablet with pointer type" << dbgType;
|
||||
}
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#ifdef XCB_USE_XINPUT21
|
||||
if (scrollingDevice.orientations || scrollingDevice.legacyOrientations) {
|
||||
@ -330,7 +328,7 @@ void QXcbConnection::xi2Select(xcb_window_t window)
|
||||
#endif // XCB_USE_XINPUT22
|
||||
|
||||
QSet<int> tabletDevices;
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
if (!m_tabletData.isEmpty()) {
|
||||
unsigned int tabletBitMask;
|
||||
unsigned char *xiTabletBitMask = reinterpret_cast<unsigned char *>(&tabletBitMask);
|
||||
@ -347,7 +345,7 @@ void QXcbConnection::xi2Select(xcb_window_t window)
|
||||
}
|
||||
XISelectEvents(xDisplay, window, xiEventMask.data(), m_tabletData.count());
|
||||
}
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#ifdef XCB_USE_XINPUT21
|
||||
// Enable each scroll device
|
||||
@ -482,12 +480,12 @@ XInput2TouchDeviceData *QXcbConnection::touchDeviceForId(int id)
|
||||
return dev;
|
||||
}
|
||||
|
||||
#if defined(XCB_USE_XINPUT21) || !defined(QT_NO_TABLETEVENT)
|
||||
#if defined(XCB_USE_XINPUT21) || QT_CONFIG(tabletevent)
|
||||
static inline qreal fixed1616ToReal(FP1616 val)
|
||||
{
|
||||
return qreal(val) / 0x10000;
|
||||
}
|
||||
#endif // defined(XCB_USE_XINPUT21) || !defined(QT_NO_TABLETEVENT)
|
||||
#endif // defined(XCB_USE_XINPUT21) || QT_CONFIG(tabletevent)
|
||||
|
||||
void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
|
||||
{
|
||||
@ -536,13 +534,13 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
if (!xiEnterEvent) {
|
||||
QXcbConnection::TabletData *tablet = tabletDataForDevice(sourceDeviceId);
|
||||
if (tablet && xi2HandleTabletEvent(xiEvent, tablet))
|
||||
return;
|
||||
}
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#ifdef XCB_USE_XINPUT21
|
||||
QHash<int, ScrollingDevice>::iterator device = m_scrollingDevices.find(sourceDeviceId);
|
||||
@ -698,10 +696,8 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
|
||||
if (m_xiGrab) {
|
||||
// XIAllowTouchEvents deadlocks with libXi < 1.7.4 (this has nothing to do with the XI2 versions like 2.2)
|
||||
// http://lists.x.org/archives/xorg-devel/2014-July/043059.html
|
||||
#ifdef XCB_USE_XINPUT2
|
||||
XIAllowTouchEvents(static_cast<Display *>(m_xlib_display), xiDeviceEvent->deviceid,
|
||||
xiDeviceEvent->detail, xiDeviceEvent->event, XIAcceptTouch);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case XI_TouchUpdate:
|
||||
@ -1284,6 +1280,4 @@ QXcbConnection::TabletData *QXcbConnection::tabletDataForDevice(int id)
|
||||
return Q_NULLPTR;
|
||||
}
|
||||
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
|
||||
#endif // XCB_USE_XINPUT2
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
@ -60,7 +60,7 @@ typedef char *(*PtrXcursorLibraryGetTheme)(void *);
|
||||
typedef int (*PtrXcursorLibrarySetTheme)(void *, const char *);
|
||||
typedef int (*PtrXcursorLibraryGetDefaultSize)(void *);
|
||||
|
||||
#if defined(XCB_USE_XLIB) && QT_CONFIG(library)
|
||||
#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
|
||||
#include <X11/Xlib.h>
|
||||
enum {
|
||||
XCursorShape = CursorShape
|
||||
@ -308,7 +308,7 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)
|
||||
const char *cursorStr = "cursor";
|
||||
xcb_open_font(xcb_connection(), cursorFont, strlen(cursorStr), cursorStr);
|
||||
|
||||
#if defined(XCB_USE_XLIB) && QT_CONFIG(library)
|
||||
#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
|
||||
static bool function_ptrs_not_initialized = true;
|
||||
if (function_ptrs_not_initialized) {
|
||||
QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
|
||||
@ -509,7 +509,7 @@ xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
|
||||
return cursor;
|
||||
}
|
||||
|
||||
#if defined(XCB_USE_XLIB) && QT_CONFIG(library)
|
||||
#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
|
||||
bool updateCursorTheme(void *dpy, const QByteArray &theme) {
|
||||
if (!ptrXcursorLibraryGetTheme
|
||||
|| !ptrXcursorLibrarySetTheme)
|
||||
@ -553,7 +553,7 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape)
|
||||
}
|
||||
return cursor;
|
||||
}
|
||||
#endif // XCB_USE_XLIB / QT_CONFIG(library)
|
||||
#endif // QT_CONFIG(xcb_xlib) / QT_CONFIG(library)
|
||||
|
||||
xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
|
||||
{
|
||||
@ -562,7 +562,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
|
||||
xcb_cursor_t cursor = XCB_NONE;
|
||||
|
||||
// Try Xcursor first
|
||||
#if defined(XCB_USE_XLIB) && QT_CONFIG(library)
|
||||
#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
|
||||
if (cshape >= 0 && cshape <= Qt::LastCursor) {
|
||||
void *dpy = connection()->xlib_display();
|
||||
// special case for non-standard dnd-* cursors
|
||||
|
@ -101,7 +101,7 @@ private:
|
||||
#ifndef QT_NO_CURSOR
|
||||
CursorHash m_cursorHash;
|
||||
#endif
|
||||
#if defined(XCB_USE_XLIB) && QT_CONFIG(library)
|
||||
#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
|
||||
static void cursorThemePropertyChanged(QXcbVirtualDesktop *screen,
|
||||
const QByteArray &name,
|
||||
const QVariant &property,
|
||||
|
@ -63,7 +63,7 @@
|
||||
|
||||
#include <QtGui/private/qguiapplication_p.h>
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
#include <X11/Xlib.h>
|
||||
#if QT_CONFIG(xcb_native_painting)
|
||||
#include "qxcbnativepainting.h"
|
||||
@ -133,7 +133,7 @@ QXcbIntegration::QXcbIntegration(const QStringList ¶meters, int &argc, char
|
||||
qApp->setAttribute(Qt::AA_CompressHighFrequencyEvents, true);
|
||||
|
||||
qRegisterMetaType<QXcbWindow*>();
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
XInitThreads();
|
||||
#endif
|
||||
m_nativeInterface.reset(new QXcbNativeInterface);
|
||||
|
@ -57,11 +57,7 @@
|
||||
#include <QtPlatformHeaders/qxcbintegrationfunctions.h>
|
||||
#include <QtPlatformHeaders/qxcbscreenfunctions.h>
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
# include <X11/Xlib.h>
|
||||
#else
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@ -206,7 +202,7 @@ void *QXcbNativeInterface::nativeResourceForScreen(const QByteArray &resourceStr
|
||||
const QXcbScreen *xcbScreen = static_cast<QXcbScreen *>(screen->handle());
|
||||
switch (resourceType(lowerCaseResource)) {
|
||||
case Display:
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
result = xcbScreen->connection()->xlib_display();
|
||||
#endif
|
||||
break;
|
||||
@ -440,7 +436,7 @@ void *QXcbNativeInterface::rootWindow()
|
||||
|
||||
void *QXcbNativeInterface::display()
|
||||
{
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
QXcbIntegration *integration = QXcbIntegration::instance();
|
||||
QXcbConnection *defaultConnection = integration->defaultConnection();
|
||||
if (defaultConnection)
|
||||
@ -510,7 +506,7 @@ QXcbScreen *QXcbNativeInterface::qPlatformScreenForWindow(QWindow *window)
|
||||
|
||||
void *QXcbNativeInterface::displayForWindow(QWindow *window)
|
||||
{
|
||||
#if defined(XCB_USE_XLIB)
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
QXcbScreen *screen = qPlatformScreenForWindow(window);
|
||||
return screen ? screen->connection()->xlib_display() : Q_NULLPTR;
|
||||
#else
|
||||
|
@ -99,12 +99,12 @@
|
||||
#include <QTextCodec>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#endif
|
||||
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
#if QT_CONFIG(xinput2)
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/extensions/XI2proto.h>
|
||||
#endif
|
||||
@ -257,7 +257,7 @@ static inline bool positionIncludesFrame(QWindow *w)
|
||||
return qt_window_private(w)->positionPolicy == QWindowPrivate::WindowFrameInclusive;
|
||||
}
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
static inline XTextProperty* qstringToXTP(Display *dpy, const QString& s)
|
||||
{
|
||||
#include <X11/Xatom.h>
|
||||
@ -303,7 +303,7 @@ static inline XTextProperty* qstringToXTP(Display *dpy, const QString& s)
|
||||
#endif
|
||||
return &tp;
|
||||
}
|
||||
#endif // XCB_USE_XLIB
|
||||
#endif // QT_CONFIG(xcb_xlib)
|
||||
|
||||
// TODO move this into a utility function in QWindow or QGuiApplication
|
||||
static QWindow *childWindowAt(QWindow *win, const QPoint &p)
|
||||
@ -577,7 +577,7 @@ void QXcbWindow::create()
|
||||
32, 2, (void *)data);
|
||||
|
||||
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
#if QT_CONFIG(xinput2)
|
||||
connection()->xi2Select(m_window);
|
||||
#endif
|
||||
|
||||
@ -588,7 +588,7 @@ void QXcbWindow::create()
|
||||
if (window()->flags() & Qt::WindowTransparentForInput)
|
||||
setTransparentForMouseEvents(true);
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
// force sync to read outstanding requests - see QTBUG-29106
|
||||
XSync(static_cast<Display*>(platformScreen->connection()->xlib_display()), false);
|
||||
#endif
|
||||
@ -1504,7 +1504,7 @@ void QXcbWindow::setWindowTitle(const QString &title)
|
||||
ba.length(),
|
||||
ba.constData());
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
Display *dpy = static_cast<Display *>(connection()->xlib_display());
|
||||
XTextProperty *text = qstringToXTP(dpy, title);
|
||||
if (text)
|
||||
|
@ -51,13 +51,11 @@ HEADERS = \
|
||||
load(qt_build_paths)
|
||||
|
||||
DEFINES += QT_BUILD_XCB_PLUGIN
|
||||
# needed by Xcursor ...
|
||||
|
||||
qtConfig(xcb-xlib) {
|
||||
DEFINES += XCB_USE_XLIB
|
||||
QMAKE_USE += xcb_xlib
|
||||
|
||||
qtConfig(xinput2) {
|
||||
DEFINES += XCB_USE_XINPUT2
|
||||
SOURCES += qxcbconnection_xi2.cpp
|
||||
QMAKE_USE += xinput2
|
||||
}
|
||||
|
@ -90,7 +90,9 @@
|
||||
#include <qtreeview.h>
|
||||
#include <qtableview.h>
|
||||
#include <qoperatingsystemversion.h>
|
||||
#if QT_CONFIG(wizard)
|
||||
#include <qwizard.h>
|
||||
#endif
|
||||
#include <qdebug.h>
|
||||
#include <qlibrary.h>
|
||||
#include <qdatetimeedit.h>
|
||||
@ -3090,7 +3092,7 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
|
||||
case SH_FocusFrame_AboveWidget:
|
||||
ret = true;
|
||||
break;
|
||||
#ifndef QT_NO_WIZARD
|
||||
#if QT_CONFIG(wizard)
|
||||
case SH_WizardStyle:
|
||||
ret = QWizard::MacStyle;
|
||||
break;
|
||||
@ -4264,6 +4266,12 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
// outside world, unless they read the source, in which case, it's
|
||||
// their own fault).
|
||||
bool nonDefaultFont = p->font() != qt_app_fonts_hash()->value("QComboMenuItem");
|
||||
|
||||
if (!myTab.documentMode && (myTab.state & State_Selected) && (myTab.state & State_Active))
|
||||
if (const auto *tabBar = qobject_cast<const QTabBar *>(w))
|
||||
if (!tabBar->tabTextColor(tabBar->currentIndex()).isValid())
|
||||
myTab.palette.setColor(QPalette::WindowText, Qt::white);
|
||||
|
||||
if (verticalTabs || nonDefaultFont || !tab->icon.isNull()
|
||||
|| !myTab.leftButtonSize.isEmpty() || !myTab.rightButtonSize.isEmpty()) {
|
||||
int heightOffset = 0;
|
||||
|
@ -93,7 +93,6 @@
|
||||
#include <qtoolbutton.h>
|
||||
#include <qtreeview.h>
|
||||
#include <qtableview.h>
|
||||
#include <qwizard.h>
|
||||
#include <qdebug.h>
|
||||
#include <qdatetimeedit.h>
|
||||
#include <qmath.h>
|
||||
|
@ -778,10 +778,10 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
|
||||
|
||||
if (qobject_cast<const QMessageBox *> (widget))
|
||||
buttonBox = widget->findChild<const QDialogButtonBox *>(QLatin1String("qt_msgbox_buttonbox"));
|
||||
#ifndef QT_NO_INPUTDIALOG
|
||||
#if QT_CONFIG(inputdialog)
|
||||
else if (qobject_cast<const QInputDialog *> (widget))
|
||||
buttonBox = widget->findChild<const QDialogButtonBox *>(QLatin1String("qt_inputdlg_buttonbox"));
|
||||
#endif // QT_NO_INPUTDIALOG
|
||||
#endif // QT_CONFIG(inputdialog)
|
||||
|
||||
if (buttonBox) {
|
||||
//draw white panel part
|
||||
@ -2151,6 +2151,7 @@ QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOpt
|
||||
rect = visualRect(cb->direction, cb->rect, rect);
|
||||
return rect;
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_COMBOBOX
|
||||
case CC_TitleBar:
|
||||
if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(option)) {
|
||||
@ -2321,7 +2322,7 @@ void QWindowsVistaStyle::polish(QWidget *widget)
|
||||
buttonBox->setContentsMargins(0, 9, 0, 0);
|
||||
#endif
|
||||
}
|
||||
#ifndef QT_NO_INPUTDIALOG
|
||||
#if QT_CONFIG(inputdialog)
|
||||
else if (qobject_cast<QInputDialog *> (widget)) {
|
||||
widget->setAttribute(Qt::WA_StyledBackground);
|
||||
#if QT_CONFIG(dialogbuttonbox)
|
||||
@ -2330,7 +2331,7 @@ void QWindowsVistaStyle::polish(QWidget *widget)
|
||||
buttonBox->setContentsMargins(0, 9, 0, 0);
|
||||
#endif
|
||||
}
|
||||
#endif // QT_NO_INPUTDIALOG
|
||||
#endif // QT_CONFIG(inputdialog)
|
||||
else if (QTreeView *tree = qobject_cast<QTreeView *> (widget)) {
|
||||
tree->viewport()->setAttribute(Qt::WA_Hover);
|
||||
}
|
||||
@ -2365,7 +2366,7 @@ void QWindowsVistaStyle::unpolish(QWidget *widget)
|
||||
buttonBox->setContentsMargins(0, 0, 0, 0);
|
||||
#endif
|
||||
}
|
||||
#ifndef QT_NO_INPUTDIALOG
|
||||
#if QT_CONFIG(inputdialog)
|
||||
else if (qobject_cast<QInputDialog *> (widget)) {
|
||||
widget->setAttribute(Qt::WA_StyledBackground, false);
|
||||
#if QT_CONFIG(dialogbuttonbox)
|
||||
@ -2374,7 +2375,7 @@ void QWindowsVistaStyle::unpolish(QWidget *widget)
|
||||
buttonBox->setContentsMargins(0, 0, 0, 0);
|
||||
#endif
|
||||
}
|
||||
#endif // QT_NO_INPUTDIALOG
|
||||
#endif // QT_CONFIG(inputdialog)
|
||||
else if (QTreeView *tree = qobject_cast<QTreeView *> (widget)) {
|
||||
tree->viewport()->setAttribute(Qt::WA_Hover, false);
|
||||
} else if (qobject_cast<QCommandLinkButton*>(widget)) {
|
||||
|
@ -1515,10 +1515,9 @@ case PE_Frame:
|
||||
return;
|
||||
} else if (fillType == BT_NONE) {
|
||||
return;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PE_FrameLineEdit: {
|
||||
// we try to check if this lineedit is a delegate on a QAbstractItemView-derived class.
|
||||
@ -2434,6 +2433,7 @@ void QWindowsXPStyle::drawControl(ControlElement element, const QStyleOption *op
|
||||
p->restore();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_RUBBERBAND
|
||||
case CE_HeaderEmptyArea:
|
||||
if (option->state & State_Horizontal)
|
||||
@ -3760,10 +3760,9 @@ int QWindowsXPStyle::styleHint(StyleHint hint, const QStyleOption *option, const
|
||||
break;
|
||||
#ifndef QT_NO_RUBBERBAND
|
||||
case SH_RubberBand_Mask:
|
||||
if (qstyleoption_cast<const QStyleOptionRubberBand *>(option)) {
|
||||
if (qstyleoption_cast<const QStyleOptionRubberBand *>(option))
|
||||
res = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_RUBBERBAND
|
||||
|
||||
case SH_ItemView_DrawDelegateFrame:
|
||||
|
@ -40,7 +40,8 @@
|
||||
"features.combobox",
|
||||
"features.cups",
|
||||
"features.datetimeedit",
|
||||
"features.groupbox"
|
||||
"features.groupbox",
|
||||
"features.tablewidget"
|
||||
],
|
||||
"output": [ "privateFeature", "feature" ]
|
||||
},
|
||||
|
@ -94,9 +94,9 @@ private:
|
||||
#if defined (Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_togglePageSetCombo(bool))
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_collapseOrExpandDialog())
|
||||
# if !defined(QT_NO_MESSAGEBOX)
|
||||
#if QT_CONFIG(messagebox)
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_checkFields())
|
||||
# endif // QT_NO_MESSAGEBOX
|
||||
#endif // QT_CONFIG(messagebox)
|
||||
friend class QUnixPrintWidget;
|
||||
# endif // Q_OS_UNIX
|
||||
};
|
||||
|
@ -41,12 +41,18 @@
|
||||
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
|
||||
|
||||
#include "private/qabstractprintdialog_p.h"
|
||||
#if QT_CONFIG(messagebox)
|
||||
#include <QtWidgets/qmessagebox.h>
|
||||
#endif
|
||||
#include "qprintdialog.h"
|
||||
#if QT_CONFIG(filedialog)
|
||||
#include "qfiledialog.h"
|
||||
#endif
|
||||
#include <QtCore/qdir.h>
|
||||
#include <QtGui/qevent.h>
|
||||
#if QT_CONFIG(filesystemmodel)
|
||||
#include <QtWidgets/qfilesystemmodel.h>
|
||||
#endif
|
||||
#include <QtWidgets/qstyleditemdelegate.h>
|
||||
#include <QtPrintSupport/qprinter.h>
|
||||
|
||||
@ -57,7 +63,7 @@
|
||||
|
||||
#include <QtWidgets/qdialogbuttonbox.h>
|
||||
|
||||
#include "private/qfscompleter_p.h"
|
||||
#include <private/qcompleter_p.h>
|
||||
#include "ui_qprintpropertieswidget.h"
|
||||
#include "ui_qprintsettingsoutput.h"
|
||||
#include "ui_qprintwidget.h"
|
||||
@ -201,7 +207,7 @@ public:
|
||||
void selectPrinter(const QPrinter::OutputFormat outputFormat);
|
||||
|
||||
void _q_togglePageSetCombo(bool);
|
||||
#ifndef QT_NO_MESSAGEBOX
|
||||
#if QT_CONFIG(messagebox)
|
||||
void _q_checkFields();
|
||||
#endif
|
||||
void _q_collapseOrExpandDialog();
|
||||
@ -335,7 +341,7 @@ void QPrintDialogPrivate::init()
|
||||
lay->addWidget(bottom);
|
||||
lay->addWidget(buttons);
|
||||
|
||||
#ifdef QT_NO_MESSAGEBOX
|
||||
#if !QT_CONFIG(messagebox)
|
||||
QObject::connect(buttons, SIGNAL(accepted()), q, SLOT(accept()));
|
||||
#else
|
||||
QObject::connect(buttons, SIGNAL(accepted()), q, SLOT(_q_checkFields()));
|
||||
@ -494,14 +500,14 @@ void QPrintDialogPrivate::_q_collapseOrExpandDialog()
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef QT_NO_MESSAGEBOX
|
||||
#if QT_CONFIG(messagebox)
|
||||
void QPrintDialogPrivate::_q_checkFields()
|
||||
{
|
||||
Q_Q(QPrintDialog);
|
||||
if (top->d->checkFields())
|
||||
q->accept();
|
||||
}
|
||||
#endif // QT_NO_MESSAGEBOX
|
||||
#endif // QT_CONFIG(messagebox)
|
||||
|
||||
|
||||
void QPrintDialogPrivate::updateWidgets()
|
||||
@ -673,7 +679,7 @@ QUnixPrintWidgetPrivate::QUnixPrintWidgetPrivate(QUnixPrintWidget *p, QPrinter *
|
||||
}
|
||||
widget.properties->setEnabled(true);
|
||||
|
||||
#if !defined(QT_NO_FILESYSTEMMODEL) && !defined(QT_NO_COMPLETER)
|
||||
#if QT_CONFIG(filesystemmodel) && !defined(QT_NO_COMPLETER)
|
||||
QFileSystemModel *fsm = new QFileSystemModel(widget.filename);
|
||||
fsm->setRootPath(QDir::homePath());
|
||||
widget.filename->setCompleter(new QCompleter(fsm, widget.filename));
|
||||
@ -780,7 +786,7 @@ void QUnixPrintWidgetPrivate::setOptionsPane(QPrintDialogPrivate *pane)
|
||||
void QUnixPrintWidgetPrivate::_q_btnBrowseClicked()
|
||||
{
|
||||
QString filename = widget.filename->text();
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
#if QT_CONFIG(filedialog)
|
||||
filename = QFileDialog::getSaveFileName(parent, QPrintDialog::tr("Print To File ..."), filename,
|
||||
QString(), 0, QFileDialog::DontConfirmOverwrite);
|
||||
#else
|
||||
@ -834,7 +840,7 @@ void QUnixPrintWidgetPrivate::applyPrinterProperties()
|
||||
propertiesDialog->applyPrinterProperties(printer);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_MESSAGEBOX
|
||||
#if QT_CONFIG(messagebox)
|
||||
bool QUnixPrintWidgetPrivate::checkFields()
|
||||
{
|
||||
if (widget.filename->isEnabled()) {
|
||||
@ -885,7 +891,7 @@ bool QUnixPrintWidgetPrivate::checkFields()
|
||||
// Every test passed. Accept the dialog.
|
||||
return true;
|
||||
}
|
||||
#endif // QT_NO_MESSAGEBOX
|
||||
#endif // QT_CONFIG(messagebox)
|
||||
|
||||
void QUnixPrintWidgetPrivate::setupPrinterProperties()
|
||||
{
|
||||
|
@ -51,7 +51,9 @@
|
||||
#include <QtWidgets/qstyle.h>
|
||||
#include <QtWidgets/qtoolbutton.h>
|
||||
#include <QtGui/qvalidator.h>
|
||||
#if QT_CONFIG(filedialog)
|
||||
#include <QtWidgets/qfiledialog.h>
|
||||
#endif
|
||||
#include <QtWidgets/qmainwindow.h>
|
||||
#include <QtWidgets/qtoolbar.h>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
@ -88,14 +88,16 @@ mac {
|
||||
LIBS += -framework Foundation
|
||||
|
||||
load(sdk)
|
||||
platform_dev_frameworks_path = $${QMAKE_MAC_SDK_PLATFORM_PATH}/Developer/Library/Frameworks
|
||||
!isEmpty(QMAKE_MAC_SDK_PLATFORM_PATH) {
|
||||
platform_dev_frameworks_path = $${QMAKE_MAC_SDK_PLATFORM_PATH}/Developer/Library/Frameworks
|
||||
|
||||
# We can't put this path into LIBS (so that it propagates to the prl file), as we
|
||||
# don't know yet if the target that links to testlib will build under Xcode or not.
|
||||
# The corresponding flags for the target lives in xctest.prf, where we do know.
|
||||
QMAKE_LFLAGS += -F$${platform_dev_frameworks_path} -weak_framework XCTest
|
||||
QMAKE_CXXFLAGS += -F$${platform_dev_frameworks_path}
|
||||
MODULE_CONFIG += xctest
|
||||
# We can't put this path into LIBS (so that it propagates to the prl file), as we
|
||||
# don't know yet if the target that links to testlib will build under Xcode or not.
|
||||
# The corresponding flags for the target lives in xctest.prf, where we do know.
|
||||
QMAKE_LFLAGS += -F$${platform_dev_frameworks_path} -weak_framework XCTest
|
||||
QMAKE_CXXFLAGS += -F$${platform_dev_frameworks_path}
|
||||
MODULE_CONFIG += xctest
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -559,6 +559,9 @@ void Moc::parse()
|
||||
if (test(EQ)) {
|
||||
// namespace Foo = Bar::Baz;
|
||||
until(SEMIC);
|
||||
} else if (test(LPAREN)) {
|
||||
// Ignore invalid code such as: 'namespace __identifier("x")' (QTBUG-56634)
|
||||
until(RPAREN);
|
||||
} else if (!test(SEMIC)) {
|
||||
NamespaceDef def;
|
||||
def.classname = nsName;
|
||||
|
@ -51,7 +51,9 @@
|
||||
#include <qstyle.h>
|
||||
#include <qstyleoption.h>
|
||||
#include <qtooltip.h>
|
||||
#if QT_CONFIG(whatsthis)
|
||||
#include <qwhatsthis.h>
|
||||
#endif
|
||||
#include <qtreeview.h>
|
||||
#include <private/qtabbar_p.h>
|
||||
#include <QAbstractScrollArea>
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <qtableview.h>
|
||||
#include <qlistview.h>
|
||||
#include <qtreeview.h>
|
||||
#include <private/qtreewidget_p.h>
|
||||
#include <private/qtreeview_p.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
|
||||
|
@ -48,7 +48,9 @@
|
||||
#include "qlabel.h"
|
||||
#endif
|
||||
#include "qtooltip.h"
|
||||
#if QT_CONFIG(whatsthis)
|
||||
#include "qwhatsthis.h"
|
||||
#endif
|
||||
#include "qwidget.h"
|
||||
#include "qdebug.h"
|
||||
#include <qmath.h>
|
||||
@ -436,7 +438,7 @@ QString QAccessibleWidget::text(QAccessible::Text t) const
|
||||
#endif
|
||||
break;
|
||||
case QAccessible::Help:
|
||||
#ifndef QT_NO_WHATSTHIS
|
||||
#if QT_CONFIG(whatsthis)
|
||||
str = widget()->whatsThis();
|
||||
#endif
|
||||
break;
|
||||
|
@ -426,13 +426,6 @@
|
||||
"section": "Widgets",
|
||||
"output": [ "publicFeature", "feature" ]
|
||||
},
|
||||
"whatsthis": {
|
||||
"label": "QWhatsThis",
|
||||
"purpose": "Supports displaying \"What's this\" help.",
|
||||
"section": "Widgets",
|
||||
"condition": "features.toolbutton",
|
||||
"output": [ "publicFeature", "feature" ]
|
||||
},
|
||||
"sizegrip": {
|
||||
"label": "QSizeGrip",
|
||||
"purpose": "Provides corner-grips for resizing top-level windows.",
|
||||
|
@ -1,42 +1,17 @@
|
||||
# Qt dialogs module
|
||||
|
||||
HEADERS += \
|
||||
dialogs/qcolordialog.h \
|
||||
dialogs/qfscompleter_p.h \
|
||||
dialogs/qerrormessage.h \
|
||||
dialogs/qfiledialog.h \
|
||||
dialogs/qfiledialog_p.h \
|
||||
dialogs/qfontdialog.h \
|
||||
dialogs/qfontdialog_p.h \
|
||||
dialogs/qinputdialog.h \
|
||||
dialogs/qmessagebox.h \
|
||||
dialogs/qprogressdialog.h \
|
||||
dialogs/qsidebar_p.h \
|
||||
dialogs/qfilesystemmodel.h \
|
||||
dialogs/qfilesystemmodel_p.h \
|
||||
dialogs/qfileinfogatherer_p.h \
|
||||
dialogs/qwizard.h
|
||||
|
||||
win32 {
|
||||
HEADERS += dialogs/qwizard_win_p.h
|
||||
SOURCES += dialogs/qwizard_win.cpp
|
||||
}
|
||||
|
||||
FORMS += dialogs/qfiledialog.ui
|
||||
dialogs/qfontdialog_p.h
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
SOURCES += \
|
||||
dialogs/qcolordialog.cpp \
|
||||
dialogs/qerrormessage.cpp \
|
||||
dialogs/qfiledialog.cpp \
|
||||
dialogs/qfontdialog.cpp \
|
||||
dialogs/qinputdialog.cpp \
|
||||
dialogs/qmessagebox.cpp \
|
||||
dialogs/qprogressdialog.cpp \
|
||||
dialogs/qsidebar.cpp \
|
||||
dialogs/qfilesystemmodel.cpp \
|
||||
dialogs/qfileinfogatherer.cpp \
|
||||
dialogs/qwizard.cpp \
|
||||
dialogs/qfontdialog.cpp
|
||||
|
||||
qtConfig(colordialog) {
|
||||
HEADERS += dialogs/qcolordialog.h
|
||||
SOURCES += dialogs/qcolordialog.cpp
|
||||
}
|
||||
|
||||
qtConfig(dialog) {
|
||||
HEADERS += \
|
||||
@ -47,4 +22,61 @@ qtConfig(dialog) {
|
||||
dialogs/qdialog.cpp
|
||||
}
|
||||
|
||||
RESOURCES += dialogs/qmessagebox.qrc
|
||||
qtConfig(errormessage) {
|
||||
HEADERS += dialogs/qerrormessage.h
|
||||
SOURCES += dialogs/qerrormessage.cpp
|
||||
}
|
||||
|
||||
qtConfig(filedialog) {
|
||||
HEADERS += \
|
||||
dialogs/qfiledialog.h \
|
||||
dialogs/qfiledialog_p.h \
|
||||
dialogs/qsidebar_p.h
|
||||
|
||||
SOURCES += \
|
||||
dialogs/qfiledialog.cpp \
|
||||
dialogs/qsidebar.cpp
|
||||
|
||||
FORMS += dialogs/qfiledialog.ui
|
||||
}
|
||||
|
||||
qtConfig(filesystemmodel) {
|
||||
HEADERS += \
|
||||
dialogs/qfilesystemmodel.h \
|
||||
dialogs/qfilesystemmodel_p.h \
|
||||
dialogs/qfileinfogatherer_p.h
|
||||
|
||||
SOURCES += \
|
||||
dialogs/qfilesystemmodel.cpp \
|
||||
dialogs/qfileinfogatherer.cpp
|
||||
}
|
||||
|
||||
qtConfig(fscompleter) {
|
||||
HEADERS += dialogs/qfscompleter_p.h
|
||||
}
|
||||
|
||||
qtConfig(inputdialog) {
|
||||
HEADERS += dialogs/qinputdialog.h
|
||||
SOURCES += dialogs/qinputdialog.cpp
|
||||
}
|
||||
|
||||
qtConfig(messagebox) {
|
||||
HEADERS += dialogs/qmessagebox.h
|
||||
SOURCES += dialogs/qmessagebox.cpp
|
||||
RESOURCES += dialogs/qmessagebox.qrc
|
||||
}
|
||||
|
||||
qtConfig(progressdialog) {
|
||||
HEADERS += dialogs/qprogressdialog.h
|
||||
SOURCES += dialogs/qprogressdialog.cpp
|
||||
}
|
||||
|
||||
qtConfig(wizard) {
|
||||
HEADERS += dialogs/qwizard.h
|
||||
SOURCES += dialogs/qwizard.cpp
|
||||
|
||||
win32 {
|
||||
HEADERS += dialogs/qwizard_win_p.h
|
||||
SOURCES += dialogs/qwizard_win.cpp
|
||||
}
|
||||
}
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include "qcolordialog.h"
|
||||
|
||||
#ifndef QT_NO_COLORDIALOG
|
||||
|
||||
#include "qapplication.h"
|
||||
#include "qdesktopwidget.h"
|
||||
#include "qdrawutil.h"
|
||||
@ -2289,6 +2287,3 @@ QT_END_NAMESPACE
|
||||
|
||||
#include "qcolordialog.moc"
|
||||
#include "moc_qcolordialog.cpp"
|
||||
|
||||
#endif // QT_NO_COLORDIALOG
|
||||
|
||||
|
@ -42,12 +42,11 @@
|
||||
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
|
||||
#ifndef QT_NO_COLORDIALOG
|
||||
|
||||
#include <QtWidgets/qdialog.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(colordialog);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QColorDialogPrivate;
|
||||
|
||||
@ -127,6 +126,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QColorDialog::ColorDialogOptions)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_COLORDIALOG
|
||||
|
||||
#endif // QCOLORDIALOG_H
|
||||
|
@ -37,20 +37,31 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#if QT_CONFIG(colordialog)
|
||||
#include "qcolordialog.h"
|
||||
#endif
|
||||
#include "qfontdialog.h"
|
||||
#if QT_CONFIG(filedialog)
|
||||
#include "qfiledialog.h"
|
||||
#endif
|
||||
|
||||
#include "qevent.h"
|
||||
#include "qdesktopwidget.h"
|
||||
#include "qapplication.h"
|
||||
#include "qlayout.h"
|
||||
#include "qsizegrip.h"
|
||||
#if QT_CONFIG(whatsthis)
|
||||
#include "qwhatsthis.h"
|
||||
#endif
|
||||
#include "qmenu.h"
|
||||
#include "qcursor.h"
|
||||
#if QT_CONFIG(messagebox)
|
||||
#include "qmessagebox.h"
|
||||
#endif
|
||||
#if QT_CONFIG(errormessage)
|
||||
#include "qerrormessage.h"
|
||||
#endif
|
||||
#include <qpa/qplatformtheme.h>
|
||||
#include "private/qdialog_p.h"
|
||||
#include "private/qguiapplication_p.h"
|
||||
@ -62,11 +73,11 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
static inline int themeDialogType(const QDialog *dialog)
|
||||
{
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
#if QT_CONFIG(filedialog)
|
||||
if (qobject_cast<const QFileDialog *>(dialog))
|
||||
return QPlatformTheme::FileDialog;
|
||||
#endif
|
||||
#ifndef QT_NO_COLORDIALOG
|
||||
#if QT_CONFIG(colordialog)
|
||||
if (qobject_cast<const QColorDialog *>(dialog))
|
||||
return QPlatformTheme::ColorDialog;
|
||||
#endif
|
||||
@ -74,11 +85,11 @@ static inline int themeDialogType(const QDialog *dialog)
|
||||
if (qobject_cast<const QFontDialog *>(dialog))
|
||||
return QPlatformTheme::FontDialog;
|
||||
#endif
|
||||
#ifndef QT_NO_MESSAGEBOX
|
||||
#if QT_CONFIG(messagebox)
|
||||
if (qobject_cast<const QMessageBox *>(dialog))
|
||||
return QPlatformTheme::MessageDialog;
|
||||
#endif
|
||||
#ifndef QT_NO_ERRORMESSAGE
|
||||
#if QT_CONFIG(errormessage)
|
||||
if (qobject_cast<const QErrorMessage *>(dialog))
|
||||
return QPlatformTheme::MessageDialog;
|
||||
#endif
|
||||
@ -607,7 +618,7 @@ bool QDialog::eventFilter(QObject *o, QEvent *e)
|
||||
/*! \reimp */
|
||||
void QDialog::contextMenuEvent(QContextMenuEvent *e)
|
||||
{
|
||||
#if defined(QT_NO_WHATSTHIS) || defined(QT_NO_MENU)
|
||||
#if !QT_CONFIG(whatsthis) || defined(QT_NO_MENU)
|
||||
Q_UNUSED(e);
|
||||
#else
|
||||
QWidget *w = childAt(e->pos());
|
||||
@ -672,7 +683,7 @@ void QDialog::keyPressEvent(QKeyEvent *e)
|
||||
/*! \reimp */
|
||||
void QDialog::closeEvent(QCloseEvent *e)
|
||||
{
|
||||
#ifndef QT_NO_WHATSTHIS
|
||||
#if QT_CONFIG(whatsthis)
|
||||
if (isModal() && QWhatsThis::inWhatsThisMode())
|
||||
QWhatsThis::leaveWhatsThisMode();
|
||||
#endif
|
||||
|
@ -39,13 +39,13 @@
|
||||
|
||||
#include "qerrormessage.h"
|
||||
|
||||
#ifndef QT_NO_ERRORMESSAGE
|
||||
|
||||
#include "qapplication.h"
|
||||
#include "qcheckbox.h"
|
||||
#include "qlabel.h"
|
||||
#include "qlayout.h"
|
||||
#if QT_CONFIG(messagebox)
|
||||
#include "qmessagebox.h"
|
||||
#endif
|
||||
#include "qpushbutton.h"
|
||||
#include "qstringlist.h"
|
||||
#include "qtextedit.h"
|
||||
@ -234,7 +234,7 @@ QErrorMessage::QErrorMessage(QWidget * parent)
|
||||
grid->setColumnStretch(1, 42);
|
||||
grid->setRowStretch(0, 42);
|
||||
|
||||
#ifndef QT_NO_MESSAGEBOX
|
||||
#if QT_CONFIG(messagebox)
|
||||
d->icon->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
|
||||
d->icon->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
|
||||
#endif
|
||||
@ -390,5 +390,3 @@ void QErrorMessagePrivate::retranslateStrings()
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qerrormessage.cpp"
|
||||
|
||||
#endif // QT_NO_ERRORMESSAGE
|
||||
|
@ -42,12 +42,11 @@
|
||||
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
|
||||
#ifndef QT_NO_ERRORMESSAGE
|
||||
|
||||
#include <QtWidgets/qdialog.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(errormessage);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QErrorMessagePrivate;
|
||||
|
||||
@ -75,6 +74,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ERRORMESSAGE
|
||||
|
||||
#endif // QERRORMESSAGE_H
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user