Merge remote-tracking branch 'origin/5.6' into 5.7

This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define
and undef in src/corelib/tools/qsimd_p.h.

This change is also squashed with "Fall back to c++11 standard
compiler flag for host builds" which is done by Peter Seiderer.

Conflicts:
	mkspecs/features/default_post.prf
	src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch
	src/3rdparty/sqlite/sqlite3.c
	src/corelib/tools/qsimd_p.h
	src/gui/kernel/qevent.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/gui/kernel/qwindowsysteminterface_p.h
	src/plugins/bearer/blackberry/blackberry.pro
	src/plugins/platforms/cocoa/qcocoasystemsettings.mm
	src/plugins/platformthemes/gtk2/gtk2.pro
	src/plugins/styles/bb10style/bb10style.pro
	src/sql/drivers/sqlite2/qsql_sqlite2.cpp
	tools/configure/configureapp.cpp

Task-number: QTBUG-51644
Done-with: Peter Seiderer <ps.report@gmx.net>
Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
This commit is contained in:
Liang Qi 2016-03-10 16:39:05 +01:00
commit 50d0f57b77
179 changed files with 1442 additions and 933 deletions

View File

@ -38,7 +38,7 @@
****************************************************************************/ ****************************************************************************/
#include <alsa/asoundlib.h> #include <alsa/asoundlib.h>
#if(!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10)) #if SND_LIB_VERSION < 0x1000a // 1.0.10
#error "Alsa version found too old, require >= 1.0.10" #error "Alsa version found too old, require >= 1.0.10"
#endif #endif

View File

@ -55,9 +55,7 @@ manifestmeta.highlighted.names = "QtQuick/Qt Quick Demo - Same Game" \
"QtMultimedia/QML Video Shader Effects Example" \ "QtMultimedia/QML Video Shader Effects Example" \
"QtCanvas3D/Planets Example" \ "QtCanvas3D/Planets Example" \
"QtCanvas3D/Interactive Mobile Phone Example" \ "QtCanvas3D/Interactive Mobile Phone Example" \
"QtLocation/Map Viewer (QML)" \ "QtLocation/Map Viewer (QML)"
"QtWebEngine/WebEngine Quick Nano Browser" \
"QtWebEngine/Markdown Editor Example"
manifestmeta.highlighted.attributes = isHighlighted:true manifestmeta.highlighted.attributes = isHighlighted:true

View File

@ -58,7 +58,6 @@
#include <tchar.h> #include <tchar.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <windows.h>
#ifdef QT_LARGEFILE_SUPPORT #ifdef QT_LARGEFILE_SUPPORT
#define QT_STATBUF struct _stati64 // non-ANSI defs #define QT_STATBUF struct _stati64 // non-ANSI defs

View File

@ -0,0 +1 @@
load(testcase)

View File

@ -96,9 +96,16 @@ breakpad {
} }
c++11|c++14|c++1z { c++11|c++14|c++1z {
c++1z: cxxstd = CXX1Z # Disable special compiler flags for host builds
else: c++14: cxxstd = CXX14 !host_build|!cross_compile {
else: cxxstd = CXX11 c++1z: cxxstd = CXX1Z
else: c++14: cxxstd = CXX14
else: cxxstd = CXX11
} else {
# Fall back to c++11, because since 5.7 c++11 is required everywhere,
# including host builds
cxxstd = CXX11
}
# Check if we should disable the GNU extensions or not # Check if we should disable the GNU extensions or not
!strict_c++:!isEmpty(QMAKE_CXXFLAGS_GNU$$cxxstd): cxxstd = GNU$$cxxstd !strict_c++:!isEmpty(QMAKE_CXXFLAGS_GNU$$cxxstd): cxxstd = GNU$$cxxstd

View File

@ -84,9 +84,9 @@ warnings_are_errors:warning_clean {
QMAKE_CXXFLAGS_WARN_ON += -Werror -ww177,1224,1478,1881 $$WERROR QMAKE_CXXFLAGS_WARN_ON += -Werror -ww177,1224,1478,1881 $$WERROR
} }
} else:gcc:!clang:!intel_icc { } else:gcc:!clang:!intel_icc {
# GCC 4.6-4.9, 5.x # GCC 4.6-4.9, 5.x, ...
ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION} ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION}
contains(ver, "(4\\.[6789]|5\\..)") { contains(ver, "(4\\.[6789]|[5-9]\\..)") {
QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=cpp -Wno-error=deprecated-declarations $$WERROR QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=cpp -Wno-error=deprecated-declarations $$WERROR
# GCC prints this bogus warning, after it has inlined a lot of code # GCC prints this bogus warning, after it has inlined a lot of code

View File

@ -42,8 +42,11 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
module_libs = "\$\$QT_MODULE_HOST_LIB_BASE" module_libs = "\$\$QT_MODULE_HOST_LIB_BASE"
else: \ else: \
module_libs = "\$\$QT_MODULE_LIB_BASE" module_libs = "\$\$QT_MODULE_LIB_BASE"
!isEmpty(QT_PRIVATE): \ # In addition to the library's private deps, the private module's deps
module_rundep = "QT.$${MODULE_ID}.run_depends = $$replace(QT_PRIVATE, -private$, _private)" # are logically runtime deps of the public module.
runtime_deps = $$QT_PRIVATE $$QT_FOR_PRIVATE
!isEmpty(runtime_deps): \
module_rundep = "QT.$${MODULE_ID}.run_depends = $$replace(runtime_deps, -private$, _private)"
else: \ else: \
module_rundep = module_rundep =
module_build_type = v2 module_build_type = v2

View File

@ -6,13 +6,16 @@ have_target {
# qt_build_config tells us to re-enable exceptions here. # qt_build_config tells us to re-enable exceptions here.
testcase_exceptions: CONFIG += exceptions testcase_exceptions: CONFIG += exceptions
check.files = benchmark: type = benchmark
check.path = . else: type = check
$${type}.files =
$${type}.path = .
# Add environment for non-installed builds. Do this first, so the # Add environment for non-installed builds. Do this first, so the
# 'make' variable expansions don't end up in a batch file/script. # 'make' variable expansions don't end up in a batch file/script.
QT_TOOL_NAME = target QT_TOOL_NAME = target
qtAddTargetEnv(check.commands, QT) qtAddTargetEnv($${type}.commands, QT)
# If the test ends up in a different directory, we should cd to that directory. # If the test ends up in a different directory, we should cd to that directory.
TESTRUN_CWD = $$DESTDIR TESTRUN_CWD = $$DESTDIR
@ -27,44 +30,44 @@ debug_and_release:debug_and_release_target {
} }
# Allow for a custom test runner script # Allow for a custom test runner script
check.commands += $(TESTRUNNER) $${type}.commands += $(TESTRUNNER)
unix { unix {
isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = . isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = .
app_bundle: \ app_bundle: \
check.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET) $${type}.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
else: \ else: \
check.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET) $${type}.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET)
} else { } else {
# Windows # Windows
!isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = $${TEST_TARGET_DIR}$${QMAKE_DIR_SEP} !isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = $${TEST_TARGET_DIR}$${QMAKE_DIR_SEP}
check.commands += $${TEST_TARGET_DIR}$(TARGET) $${type}.commands += $${TEST_TARGET_DIR}$(TARGET)
} }
# Allow for custom arguments to tests # Allow for custom arguments to tests
check.commands += $(TESTARGS) $${type}.commands += $(TESTARGS)
!isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \ !isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \
check.commands = cd $$shell_path($$TESTRUN_CWD) && $$check.commands $${type}.commands = cd $$shell_path($$TESTRUN_CWD) && $$eval($${type}.commands)
# If the test is marked as insignificant, discard the exit code # If the test is marked as insignificant, discard the exit code
insignificant_test:check.commands = -$${check.commands} insignificant_test: $${type}.commands = -$$eval($${type}.commands)
QMAKE_EXTRA_TARGETS *= check QMAKE_EXTRA_TARGETS *= $${type}
isEmpty(BUILDS)|build_pass { isEmpty(BUILDS)|build_pass {
check.depends = first $${type}.depends = first
} else { } else {
# For exclusive builds, only run the test once. # For exclusive builds, only run the test once.
check.CONFIG = recursive $${type}.CONFIG = recursive
check.target = check_all $${type}.target = $${type}_all
check.recurse_target = check $${type}.recurse_target = $${type}
check.commands = $${type}.commands =
check_first.depends = $$eval($$first(BUILDS).target)-check $${type}_first.depends = $$eval($$first(BUILDS).target)-$${type}
check_first.target = check $${type}_first.target = $${type}
QMAKE_EXTRA_TARGETS += check_first QMAKE_EXTRA_TARGETS += $${type}_first
} }
!no_testcase_installs:!contains(INSTALLS, target) { !no_testcase_installs:!contains(INSTALLS, target) {

View File

@ -7,3 +7,13 @@
check.depends = first # `make check' implies build check.depends = first # `make check' implies build
QMAKE_EXTRA_TARGETS += check QMAKE_EXTRA_TARGETS += check
} }
# ... and the same for benchmarks, too.
!contains(QMAKE_EXTRA_TARGETS, benchmark) {
contains(TEMPLATE, subdirs): \
prepareRecursiveTarget(benchmark)
else: \
benchmark.depends = first # `make benchmark' implies build
QMAKE_EXTRA_TARGETS += benchmark
}

View File

@ -564,7 +564,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
dst = escapeFilePath(filePrefixRoot(root, targetdir + src.section('/', -1))); dst = escapeFilePath(filePrefixRoot(root, targetdir + src.section('/', -1)));
if(!ret.isEmpty()) if(!ret.isEmpty())
ret += "\n\t"; ret += "\n\t";
ret += "-$(INSTALL_FILE) " + escapeFilePath(src) + ' ' + dst; ret += "-$(INSTALL_FILE) " + escapeFilePath(Option::fixPathToTargetOS(src, false)) + ' ' + dst;
if(!uninst.isEmpty()) if(!uninst.isEmpty())
uninst.append("\n\t"); uninst.append("\n\t");
uninst.append("-$(DEL_FILE) " + dst); uninst.append("-$(DEL_FILE) " + dst);

View File

@ -275,7 +275,8 @@ void QMakeParser::putHashStr(ushort *&pTokPtr, const ushort *buf, uint len)
*tokPtr++ = (ushort)hash; *tokPtr++ = (ushort)hash;
*tokPtr++ = (ushort)(hash >> 16); *tokPtr++ = (ushort)(hash >> 16);
*tokPtr++ = (ushort)len; *tokPtr++ = (ushort)len;
memcpy(tokPtr, buf, len * 2); if (len) // buf may be nullptr; don't pass that to memcpy (-> undefined behavior)
memcpy(tokPtr, buf, len * 2);
pTokPtr = tokPtr + len; pTokPtr = tokPtr + len;
} }

View File

@ -7,8 +7,12 @@ CONFIG += \
load(qt_helper_lib) load(qt_helper_lib)
# built-in shapers list configuration:
SHAPERS += opentype # HB's main shaper; enabling it should be enough most of the time
mac: SHAPERS += coretext # native shaper on OSX/iOS; could be used alone to handle both OT and AAT fonts
DEFINES += HAVE_CONFIG_H DEFINES += HAVE_CONFIG_H
DEFINES += HAVE_OT HB_NO_UNICODE_FUNCS HB_DISABLE_DEPRECATED DEFINES += HB_NO_UNICODE_FUNCS HB_DISABLE_DEPRECATED
# platform/compiler specific definitions # platform/compiler specific definitions
DEFINES += HAVE_ATEXIT DEFINES += HAVE_ATEXIT
@ -78,57 +82,59 @@ HEADERS += \
$$PWD/src/hb-unicode.h \ $$PWD/src/hb-unicode.h \
$$PWD/src/hb-version.h $$PWD/src/hb-version.h
# Open Type contains(SHAPERS, opentype) {
SOURCES += \ DEFINES += HAVE_OT
$$PWD/src/hb-ot-font.cc \
$$PWD/src/hb-ot-layout.cc \
$$PWD/src/hb-ot-map.cc \
$$PWD/src/hb-ot-shape.cc \
$$PWD/src/hb-ot-shape-complex-arabic.cc \
$$PWD/src/hb-ot-shape-complex-default.cc \
$$PWD/src/hb-ot-shape-complex-hangul.cc \
$$PWD/src/hb-ot-shape-complex-hebrew.cc \
$$PWD/src/hb-ot-shape-complex-indic.cc \
$$PWD/src/hb-ot-shape-complex-indic-table.cc \
$$PWD/src/hb-ot-shape-complex-myanmar.cc \
$$PWD/src/hb-ot-shape-complex-thai.cc \
$$PWD/src/hb-ot-shape-complex-tibetan.cc \
$$PWD/src/hb-ot-shape-complex-use.cc \
$$PWD/src/hb-ot-shape-complex-use-table.cc \
$$PWD/src/hb-ot-shape-fallback.cc \
$$PWD/src/hb-ot-shape-normalize.cc
HEADERS += \ SOURCES += \
$$PWD/src/hb-ot-layout-common-private.hh \ $$PWD/src/hb-ot-font.cc \
$$PWD/src/hb-ot-layout-gdef-table.hh \ $$PWD/src/hb-ot-layout.cc \
$$PWD/src/hb-ot-layout-gpos-table.hh \ $$PWD/src/hb-ot-map.cc \
$$PWD/src/hb-ot-layout-gsubgpos-private.hh \ $$PWD/src/hb-ot-shape.cc \
$$PWD/src/hb-ot-layout-gsub-table.hh \ $$PWD/src/hb-ot-shape-complex-arabic.cc \
$$PWD/src/hb-ot-layout-jstf-table.hh \ $$PWD/src/hb-ot-shape-complex-default.cc \
$$PWD/src/hb-ot-layout-private.hh \ $$PWD/src/hb-ot-shape-complex-hangul.cc \
$$PWD/src/hb-ot-map-private.hh \ $$PWD/src/hb-ot-shape-complex-hebrew.cc \
$$PWD/src/hb-ot-shape-complex-arabic-fallback.hh \ $$PWD/src/hb-ot-shape-complex-indic.cc \
$$PWD/src/hb-ot-shape-complex-arabic-private.hh \ $$PWD/src/hb-ot-shape-complex-indic-table.cc \
$$PWD/src/hb-ot-shape-complex-arabic-table.hh \ $$PWD/src/hb-ot-shape-complex-myanmar.cc \
$$PWD/src/hb-ot-shape-complex-indic-machine.hh \ $$PWD/src/hb-ot-shape-complex-thai.cc \
$$PWD/src/hb-ot-shape-complex-indic-private.hh \ $$PWD/src/hb-ot-shape-complex-tibetan.cc \
$$PWD/src/hb-ot-shape-complex-myanmar-machine.hh \ $$PWD/src/hb-ot-shape-complex-use.cc \
$$PWD/src/hb-ot-shape-complex-private.hh \ $$PWD/src/hb-ot-shape-complex-use-table.cc \
$$PWD/src/hb-ot-shape-complex-use-machine.hh \ $$PWD/src/hb-ot-shape-fallback.cc \
$$PWD/src/hb-ot-shape-complex-use-private.hh \ $$PWD/src/hb-ot-shape-normalize.cc
$$PWD/src/hb-ot-shape-fallback-private.hh \
$$PWD/src/hb-ot-shape-normalize-private.hh \
$$PWD/src/hb-ot-shape-private.hh
HEADERS += \ HEADERS += \
$$PWD/src/hb-ot.h \ $$PWD/src/hb-ot-layout-common-private.hh \
$$PWD/src/hb-ot-font.h \ $$PWD/src/hb-ot-layout-gdef-table.hh \
$$PWD/src/hb-ot-layout.h \ $$PWD/src/hb-ot-layout-gpos-table.hh \
$$PWD/src/hb-ot-shape.h \ $$PWD/src/hb-ot-layout-gsubgpos-private.hh \
$$PWD/src/hb-ot-tag.h $$PWD/src/hb-ot-layout-gsub-table.hh \
$$PWD/src/hb-ot-layout-jstf-table.hh \
$$PWD/src/hb-ot-layout-private.hh \
$$PWD/src/hb-ot-map-private.hh \
$$PWD/src/hb-ot-shape-complex-arabic-fallback.hh \
$$PWD/src/hb-ot-shape-complex-arabic-private.hh \
$$PWD/src/hb-ot-shape-complex-arabic-table.hh \
$$PWD/src/hb-ot-shape-complex-indic-machine.hh \
$$PWD/src/hb-ot-shape-complex-indic-private.hh \
$$PWD/src/hb-ot-shape-complex-myanmar-machine.hh \
$$PWD/src/hb-ot-shape-complex-private.hh \
$$PWD/src/hb-ot-shape-complex-use-machine.hh \
$$PWD/src/hb-ot-shape-complex-use-private.hh \
$$PWD/src/hb-ot-shape-fallback-private.hh \
$$PWD/src/hb-ot-shape-normalize-private.hh \
$$PWD/src/hb-ot-shape-private.hh
mac { HEADERS += \
# Apple Advanced Typography $$PWD/src/hb-ot.h \
$$PWD/src/hb-ot-font.h \
$$PWD/src/hb-ot-layout.h \
$$PWD/src/hb-ot-shape.h \
$$PWD/src/hb-ot-tag.h
}
contains(SHAPERS, coretext) {
DEFINES += HAVE_CORETEXT DEFINES += HAVE_CORETEXT
SOURCES += \ SOURCES += \

View File

@ -7,8 +7,6 @@ win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000
QMAKE_DOCS = $$PWD/doc/qtconcurrent.qdocconf QMAKE_DOCS = $$PWD/doc/qtconcurrent.qdocconf
load(qt_module)
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
SOURCES += \ SOURCES += \
@ -41,3 +39,5 @@ HEADERS += \
contains(QT_CONFIG, clock-gettime) { contains(QT_CONFIG, clock-gettime) {
linux-*|hpux-*|solaris-*: LIBS_PRIVATE *= -lrt linux-*|hpux-*|solaris-*: LIBS_PRIVATE *= -lrt
} }
load(qt_module)

View File

@ -7,6 +7,7 @@ MODULE_CONFIG = moc resources
!isEmpty(QT_NAMESPACE): MODULE_DEFINES = QT_NAMESPACE=$$QT_NAMESPACE !isEmpty(QT_NAMESPACE): MODULE_DEFINES = QT_NAMESPACE=$$QT_NAMESPACE
CONFIG += $$MODULE_CONFIG CONFIG += $$MODULE_CONFIG
DEFINES += $$MODULE_DEFINES
DEFINES += QT_NO_USING_NAMESPACE DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x67000000 win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x67000000
irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
@ -29,7 +30,6 @@ ANDROID_PERMISSIONS = \
# variable and on FreeBSD, this variable is in the final executable itself # variable and on FreeBSD, this variable is in the final executable itself
freebsd: QMAKE_LFLAGS_NOUNDEF = freebsd: QMAKE_LFLAGS_NOUNDEF =
load(qt_module)
load(qfeatures) load(qfeatures)
include(animation/animation.pri) include(animation/animation.pri)
@ -58,8 +58,6 @@ mac|darwin {
LIBS_PRIVATE += -framework CoreFoundation LIBS_PRIVATE += -framework CoreFoundation
LIBS_PRIVATE += -framework Foundation LIBS_PRIVATE += -framework Foundation
} }
win32:DEFINES-=QT_NO_CAST_TO_ASCII
DEFINES += $$MODULE_DEFINES
QMAKE_LIBS += $$QMAKE_LIBS_CORE QMAKE_LIBS += $$QMAKE_LIBS_CORE
@ -76,6 +74,11 @@ qt_conf.variable = QT_CONFIG
QMAKE_PKGCONFIG_VARIABLES += host_bins qt_conf QMAKE_PKGCONFIG_VARIABLES += host_bins qt_conf
load(qt_module)
# Override qt_module, so the symbols are actually included into the library.
win32: DEFINES -= QT_NO_CAST_TO_ASCII
ctest_macros_file.input = $$PWD/Qt5CTestMacros.cmake ctest_macros_file.input = $$PWD/Qt5CTestMacros.cmake
ctest_macros_file.output = $$DESTDIR/cmake/Qt5Core/Qt5CTestMacros.cmake ctest_macros_file.output = $$DESTDIR/cmake/Qt5Core/Qt5CTestMacros.cmake
ctest_macros_file.CONFIG = verbatim ctest_macros_file.CONFIG = verbatim

View File

@ -251,7 +251,8 @@
This example illustrates that objects can work together without needing to This example illustrates that objects can work together without needing to
know any information about each other. To enable this, the objects only know any information about each other. To enable this, the objects only
need to be connected together, and this can be achieved with some simple need to be connected together, and this can be achieved with some simple
QObject::connect() function calls, or with \c{uic}'s {automatic connections} feature. QObject::connect() function calls, or with \c{uic}'s
\l{Automatic Connections}{automatic connections} feature.
\section1 A Real Example \section1 A Real Example

View File

@ -1191,7 +1191,7 @@ static void slog2_default_handler(QtMsgType msgType, const char *message)
buffer_config.buffer_set_name = __progname; buffer_config.buffer_set_name = __progname;
buffer_config.num_buffers = 1; buffer_config.num_buffers = 1;
buffer_config.verbosity_level = SLOG2_INFO; buffer_config.verbosity_level = SLOG2_DEBUG1;
buffer_config.buffer_config[0].buffer_name = "default"; buffer_config.buffer_config[0].buffer_name = "default";
buffer_config.buffer_config[0].num_pages = 8; buffer_config.buffer_config[0].num_pages = 8;

View File

@ -131,6 +131,9 @@
# if defined(WINCE) || defined(_WIN32_WCE) # if defined(WINCE) || defined(_WIN32_WCE)
# define Q_OS_WINCE # define Q_OS_WINCE
# elif defined(WINAPI_FAMILY) # elif defined(WINAPI_FAMILY)
# ifndef WINAPI_FAMILY_PC_APP
# define WINAPI_FAMILY_PC_APP WINAPI_FAMILY_APP
# endif
# if defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP # if defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP
# define Q_OS_WINPHONE # define Q_OS_WINPHONE
# define Q_OS_WINRT # define Q_OS_WINRT

View File

@ -45,22 +45,14 @@
#pragma qt_sync_stop_processing #pragma qt_sync_stop_processing
#endif #endif
#if defined(Q_CC_BOR)
// Borland's windows.h does not set these correctly, resulting in
// unusable WinSDK standard dialogs
#ifndef WINVER
# define WINVER 0x0501
#endif
#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0501
#endif
#endif
#if defined(Q_CC_MINGW) #if defined(Q_CC_MINGW)
// mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation // mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation
#ifndef WINVER # ifndef WINVER
# define WINVER 0x501 # define WINVER 0x501
#endif # endif
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0501
# endif
#endif #endif
#ifndef NOMINMAX #ifndef NOMINMAX

View File

@ -37,13 +37,6 @@
** **
****************************************************************************/ ****************************************************************************/
#if !defined(WINAPI_FAMILY)
# if _WIN32_WINNT < 0x0500
# undef _WIN32_WINNT
# define _WIN32_WINNT 0x0500
# endif // _WIN32_WINNT < 0x500
#endif // !WINAPI_FAMILY
#include "qfilesystemiterator_p.h" #include "qfilesystemiterator_p.h"
#include "qfilesystemengine_p.h" #include "qfilesystemengine_p.h"
#include "qplatformdefs.h" #include "qplatformdefs.h"

View File

@ -269,7 +269,7 @@ Q_SIGNALS:
void finished(int exitCode); // ### Qt 6: merge the two signals with a default value void finished(int exitCode); // ### Qt 6: merge the two signals with a default value
void finished(int exitCode, QProcess::ExitStatus exitStatus); void finished(int exitCode, QProcess::ExitStatus exitStatus);
#if QT_DEPRECATED_SINCE(5,6) #if QT_DEPRECATED_SINCE(5,6)
QT_MOC_COMPAT void error(QProcess::ProcessError error); void error(QProcess::ProcessError error);
#endif #endif
void errorOccurred(QProcess::ProcessError error); void errorOccurred(QProcess::ProcessError error);
void stateChanged(QProcess::ProcessState state, QPrivateSignal); void stateChanged(QProcess::ProcessState state, QPrivateSignal);

View File

@ -665,7 +665,8 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
return false; return false;
if (WaitForSingleObjectEx(pid->hProcess, 0, false) == WAIT_OBJECT_0) { if (WaitForSingleObjectEx(pid->hProcess, 0, false) == WAIT_OBJECT_0) {
bool readyReadEmitted = drainOutputPipes(); bool readyReadEmitted = drainOutputPipes();
_q_processDied(); if (pid)
_q_processDied();
return readyReadEmitted; return readyReadEmitted;
} }
@ -770,7 +771,8 @@ bool QProcessPrivate::waitForFinished(int msecs)
if (WaitForSingleObject(pid->hProcess, timer.nextSleepTime()) == WAIT_OBJECT_0) { if (WaitForSingleObject(pid->hProcess, timer.nextSleepTime()) == WAIT_OBJECT_0) {
drainOutputPipes(); drainOutputPipes();
_q_processDied(); if (pid)
_q_processDied();
return true; return true;
} }

View File

@ -510,6 +510,12 @@ bool QWinSettingsPrivate::readKey(HKEY parentHandle, const QString &rSubKey, QVa
return false; return false;
} }
// workaround for rare cases where trailing '\0' are missing in registry
if (dataType == REG_SZ || dataType == REG_EXPAND_SZ)
dataSize += 2;
else if (dataType == REG_MULTI_SZ)
dataSize += 4;
// get the value // get the value
QByteArray data(dataSize, 0); QByteArray data(dataSize, 0);
res = RegQueryValueEx(handle, reinterpret_cast<const wchar_t *>(rSubkeyName.utf16()), 0, 0, res = RegQueryValueEx(handle, reinterpret_cast<const wchar_t *>(rSubkeyName.utf16()), 0, 0,

View File

@ -456,6 +456,10 @@ bool QTextStreamPrivate::fillReadBuffer(qint64 maxBytes)
bytesRead = device->read(buf, sizeof(buf)); bytesRead = device->read(buf, sizeof(buf));
} }
// reset the Text flag.
if (textModeEnabled)
device->setTextModeEnabled(true);
if (bytesRead <= 0) if (bytesRead <= 0)
return false; return false;
@ -491,10 +495,6 @@ bool QTextStreamPrivate::fillReadBuffer(qint64 maxBytes)
readBuffer += QString::fromLatin1(buf, bytesRead); readBuffer += QString::fromLatin1(buf, bytesRead);
#endif #endif
// reset the Text flag.
if (textModeEnabled)
device->setTextModeEnabled(true);
// remove all '\r\n' in the string. // remove all '\r\n' in the string.
if (readBuffer.size() > oldReadBufferSize && textModeEnabled) { if (readBuffer.size() > oldReadBufferSize && textModeEnabled) {
QChar CR = QLatin1Char('\r'); QChar CR = QLatin1Char('\r');
@ -593,17 +593,18 @@ void QTextStreamPrivate::flushWriteBuffer()
qDebug("QTextStreamPrivate::flushWriteBuffer(), device->write(\"%s\") == %d", qDebug("QTextStreamPrivate::flushWriteBuffer(), device->write(\"%s\") == %d",
qt_prettyDebug(data.constData(), qMin(data.size(),32), data.size()).constData(), int(bytesWritten)); qt_prettyDebug(data.constData(), qMin(data.size(),32), data.size()).constData(), int(bytesWritten));
#endif #endif
#if defined (Q_OS_WIN)
// reset the text flag
if (textModeEnabled)
device->setTextModeEnabled(true);
#endif
if (bytesWritten <= 0) { if (bytesWritten <= 0) {
status = QTextStream::WriteFailed; status = QTextStream::WriteFailed;
return; return;
} }
#if defined (Q_OS_WIN)
// replace the text flag
if (textModeEnabled)
device->setTextModeEnabled(true);
#endif
// flush the file // flush the file
#ifndef QT_NO_QOBJECT #ifndef QT_NO_QOBJECT
QFileDevice *file = qobject_cast<QFileDevice *>(device); QFileDevice *file = qobject_cast<QFileDevice *>(device);

View File

@ -151,6 +151,13 @@ public:
return *this; return *this;
} }
}; };
} // namespace QJsonPrivate
template <typename T>
class QTypeInfo<QJsonPrivate::q_littleendian<T> >
: public QTypeInfoMerger<QJsonPrivate::q_littleendian<T>, T> {};
namespace QJsonPrivate {
typedef q_littleendian<short> qle_short; typedef q_littleendian<short> qle_short;
typedef q_littleendian<unsigned short> qle_ushort; typedef q_littleendian<unsigned short> qle_ushort;
@ -402,7 +409,7 @@ public:
// pack with itself, we'll discard the high part anyway // pack with itself, we'll discard the high part anyway
chunk = _mm_packus_epi16(chunk, chunk); chunk = _mm_packus_epi16(chunk, chunk);
// unaligned 64-bit store // unaligned 64-bit store
*(quint64*)&l[i] = _mm_cvtsi128_si64(chunk); qUnalignedStore(l + i, _mm_cvtsi128_si64(chunk));
i += 8; i += 8;
} }
# endif # endif

View File

@ -738,7 +738,7 @@ bool Parser::parseNumber(QJsonPrivate::Value *val, int baseOffset)
} }
int pos = reserveSpace(sizeof(double)); int pos = reserveSpace(sizeof(double));
*(quint64 *)(data + pos) = qToLittleEndian(ui); qToLittleEndian(ui, reinterpret_cast<uchar *>(data + pos));
if (current - baseOffset >= Value::MaxSize) { if (current - baseOffset >= Value::MaxSize) {
lastError = QJsonParseError::DocumentTooLarge; lastError = QJsonParseError::DocumentTooLarge;
return false; return false;

View File

@ -674,7 +674,7 @@ QCoreApplication::QCoreApplication(QCoreApplicationPrivate &p)
: QObject(p, 0) : QObject(p, 0)
#endif #endif
{ {
init(); d_func()->q_ptr = this;
// note: it is the subclasses' job to call // note: it is the subclasses' job to call
// QCoreApplicationPrivate::eventDispatcher->startingUp(); // QCoreApplicationPrivate::eventDispatcher->startingUp();
} }
@ -723,27 +723,26 @@ QCoreApplication::QCoreApplication(int &argc, char **argv
: QObject(*new QCoreApplicationPrivate(argc, argv, _internal)) : QObject(*new QCoreApplicationPrivate(argc, argv, _internal))
#endif #endif
{ {
init(); d_func()->q_ptr = this;
d_func()->init();
#ifndef QT_NO_QOBJECT #ifndef QT_NO_QOBJECT
QCoreApplicationPrivate::eventDispatcher->startingUp(); QCoreApplicationPrivate::eventDispatcher->startingUp();
#endif #endif
} }
// ### move to QCoreApplicationPrivate constructor? void QCoreApplicationPrivate::init()
void QCoreApplication::init()
{ {
d_ptr->q_ptr = this; Q_Q(QCoreApplication);
Q_D(QCoreApplication);
QCoreApplicationPrivate::initLocale(); initLocale();
Q_ASSERT_X(!self, "QCoreApplication", "there should be only one application object"); Q_ASSERT_X(!QCoreApplication::self, "QCoreApplication", "there should be only one application object");
QCoreApplication::self = this; QCoreApplication::self = q;
// Store app name (so it's still available after QCoreApplication is destroyed) // Store app name (so it's still available after QCoreApplication is destroyed)
if (!coreappdata()->applicationNameSet) if (!coreappdata()->applicationNameSet)
coreappdata()->application = d_func()->appName(); coreappdata()->application = appName();
QLoggingRegistry::instance()->init(); QLoggingRegistry::instance()->init();
@ -759,7 +758,7 @@ void QCoreApplication::init()
// anywhere in the list, we can just linearly scan the lists and find the items that // anywhere in the list, we can just linearly scan the lists and find the items that
// have been removed. Once the original list is exhausted we know all the remaining // have been removed. Once the original list is exhausted we know all the remaining
// items have been added. // items have been added.
QStringList newPaths(libraryPaths()); QStringList newPaths(q->libraryPaths());
for (int i = manualPaths->length(), j = appPaths->length(); i > 0 || j > 0; qt_noop()) { for (int i = manualPaths->length(), j = appPaths->length(); i > 0 || j > 0; qt_noop()) {
if (--j < 0) { if (--j < 0) {
newPaths.prepend((*manualPaths)[--i]); newPaths.prepend((*manualPaths)[--i]);
@ -779,28 +778,28 @@ void QCoreApplication::init()
#ifndef QT_NO_QOBJECT #ifndef QT_NO_QOBJECT
// use the event dispatcher created by the app programmer (if any) // use the event dispatcher created by the app programmer (if any)
if (!QCoreApplicationPrivate::eventDispatcher) if (!eventDispatcher)
QCoreApplicationPrivate::eventDispatcher = d->threadData->eventDispatcher.load(); eventDispatcher = threadData->eventDispatcher.load();
// otherwise we create one // otherwise we create one
if (!QCoreApplicationPrivate::eventDispatcher) if (!eventDispatcher)
d->createEventDispatcher(); createEventDispatcher();
Q_ASSERT(QCoreApplicationPrivate::eventDispatcher != 0); Q_ASSERT(eventDispatcher);
if (!QCoreApplicationPrivate::eventDispatcher->parent()) { if (!eventDispatcher->parent()) {
QCoreApplicationPrivate::eventDispatcher->moveToThread(d->threadData->thread); eventDispatcher->moveToThread(threadData->thread);
QCoreApplicationPrivate::eventDispatcher->setParent(this); eventDispatcher->setParent(q);
} }
d->threadData->eventDispatcher = QCoreApplicationPrivate::eventDispatcher; threadData->eventDispatcher = eventDispatcher;
d->eventDispatcherReady(); eventDispatcherReady();
#endif #endif
#ifdef QT_EVAL #ifdef QT_EVAL
extern void qt_core_eval_init(QCoreApplicationPrivate::Type); extern void qt_core_eval_init(QCoreApplicationPrivate::Type);
qt_core_eval_init(d->application_type); qt_core_eval_init(application_type);
#endif #endif
d->processCommandLineArguments(); processCommandLineArguments();
qt_call_pre_routines(); qt_call_pre_routines();
qt_startup_hook(); qt_startup_hook();
@ -810,7 +809,7 @@ void QCoreApplication::init()
#endif #endif
#ifndef QT_NO_QOBJECT #ifndef QT_NO_QOBJECT
QCoreApplicationPrivate::is_app_running = true; // No longer starting up. is_app_running = true; // No longer starting up.
#endif #endif
} }

View File

@ -206,8 +206,6 @@ private:
static bool notifyInternal2(QObject *receiver, QEvent *); static bool notifyInternal2(QObject *receiver, QEvent *);
#endif #endif
void init();
static QCoreApplication *self; static QCoreApplication *self;
Q_DISABLE_COPY(QCoreApplication) Q_DISABLE_COPY(QCoreApplication)

View File

@ -80,6 +80,8 @@ public:
QCoreApplicationPrivate(int &aargc, char **aargv, uint flags); QCoreApplicationPrivate(int &aargc, char **aargv, uint flags);
~QCoreApplicationPrivate(); ~QCoreApplicationPrivate();
void init();
QString appName() const; QString appName() const;
#ifdef Q_OS_MAC #ifdef Q_OS_MAC

View File

@ -325,6 +325,11 @@ private:
friend class QGraphicsView; friend class QGraphicsView;
friend class QGraphicsScene; friend class QGraphicsScene;
friend class QGraphicsScenePrivate; friend class QGraphicsScenePrivate;
// from QtTest:
friend class QSpontaneKeyEvent;
// needs this:
Q_ALWAYS_INLINE
void setSpontaneous() { spont = true; }
}; };
class Q_CORE_EXPORT QTimerEvent : public QEvent class Q_CORE_EXPORT QTimerEvent : public QEvent

View File

@ -159,6 +159,12 @@ inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {}
# define Q_OBJECT_NO_OVERRIDE_WARNING # define Q_OBJECT_NO_OVERRIDE_WARNING
#endif #endif
#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && Q_CC_GNU >= 600
# define Q_OBJECT_NO_ATTRIBUTES_WARNING QT_WARNING_DISABLE_GCC("-Wattributes")
#else
# define Q_OBJECT_NO_ATTRIBUTES_WARNING
#endif
/* qmake ignore Q_OBJECT */ /* qmake ignore Q_OBJECT */
#define Q_OBJECT \ #define Q_OBJECT \
public: \ public: \
@ -169,10 +175,11 @@ public: \
virtual const QMetaObject *metaObject() const; \ virtual const QMetaObject *metaObject() const; \
virtual void *qt_metacast(const char *); \ virtual void *qt_metacast(const char *); \
virtual int qt_metacall(QMetaObject::Call, int, void **); \ virtual int qt_metacall(QMetaObject::Call, int, void **); \
QT_WARNING_POP \
QT_TR_FUNCTIONS \ QT_TR_FUNCTIONS \
private: \ private: \
Q_OBJECT_NO_ATTRIBUTES_WARNING \
Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \ Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
QT_WARNING_POP \
struct QPrivateSignal {}; struct QPrivateSignal {};
/* qmake ignore Q_OBJECT */ /* qmake ignore Q_OBJECT */
@ -186,7 +193,11 @@ public: \
void qt_check_for_QGADGET_macro(); \ void qt_check_for_QGADGET_macro(); \
typedef void QtGadgetHelper; \ typedef void QtGadgetHelper; \
private: \ private: \
Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); QT_WARNING_PUSH \
Q_OBJECT_NO_ATTRIBUTES_WARNING \
Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
QT_WARNING_POP \
/*end*/
#endif // QT_NO_META_MACROS #endif // QT_NO_META_MACROS
#else // Q_MOC_RUN #else // Q_MOC_RUN

View File

@ -48,6 +48,7 @@
#include <QtCore/QList> #include <QtCore/QList>
#include <QtCore/QDebug> #include <QtCore/QDebug>
#include <qendian.h> #include <qendian.h>
#include <private/qsimd_p.h> // for qUnalignedLoad
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -163,7 +164,7 @@ bool QMimeMagicRule::matchNumber(const QByteArray &data) const
const char *p = data.constData() + m_startPos; const char *p = data.constData() + m_startPos;
const char *e = data.constData() + qMin(data.size() - int(sizeof(T)), m_endPos + 1); const char *e = data.constData() + qMin(data.size() - int(sizeof(T)), m_endPos + 1);
for ( ; p <= e; ++p) { for ( ; p <= e; ++p) {
if ((*reinterpret_cast<const T*>(p) & mask) == (value & mask)) if ((qUnalignedLoad<T>(p) & mask) == (value & mask))
return true; return true;
} }

View File

@ -597,9 +597,8 @@ void QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data)
const QStringRef name = xml.attributes().value(QLatin1String("type")); const QStringRef name = xml.attributes().value(QLatin1String("type"));
if (name.isEmpty()) if (name.isEmpty())
continue; continue;
if (name != data.name) { if (name.compare(data.name, Qt::CaseInsensitive))
qWarning() << "Got name" << name << "in file" << file << "expected" << data.name; qWarning() << "Got name" << name << "in file" << file << "expected" << data.name;
}
while (xml.readNextStartElement()) { while (xml.readNextStartElement()) {
const QStringRef tag = xml.name(); const QStringRef tag = xml.name();

View File

@ -37,12 +37,6 @@
** **
****************************************************************************/ ****************************************************************************/
//#define WINVER 0x0500
#if !defined(WINAPI_FAMILY) && (_WIN32_WINNT < 0x0400)
#define _WIN32_WINNT 0x0400
#endif
#include "qthread.h" #include "qthread.h"
#include "qthread_p.h" #include "qthread_p.h"
#include "qthreadstorage.h" #include "qthreadstorage.h"

View File

@ -43,24 +43,20 @@ SOURCES += thread/qatomic.cpp \
thread/qthreadpool.cpp \ thread/qthreadpool.cpp \
thread/qthreadstorage.cpp thread/qthreadstorage.cpp
unix:SOURCES += thread/qthread_unix.cpp \ win32 {
thread/qwaitcondition_unix.cpp
win32:SOURCES += thread/qthread_win.cpp \
thread/qwaitcondition_win.cpp
integrity:SOURCES += thread/qthread_unix.cpp \
thread/qwaitcondition_unix.cpp
false {
# files #included by others, but listed here so IDEs parsing this file know
# they are part of QtCore. Usually, qmake can find out that certain files
# are #included by others and thus remove from SOURCES, but it gets lost
# with qmutex.cpp.
SOURCES += \ SOURCES += \
thread/qmutex_linux.cpp \ thread/qmutex_win.cpp \
thread/qmutex_mac.cpp \ thread/qthread_win.cpp \
thread/qmutex_unix.cpp \ thread/qwaitcondition_win.cpp
thread/qmutex_win.cpp } else {
darwin {
SOURCES += thread/qmutex_mac.cpp
} else: linux {
SOURCES += thread/qmutex_linux.cpp
} else {
SOURCES += thread/qmutex_unix.cpp
}
SOURCES += \
thread/qthread_unix.cpp \
thread/qwaitcondition_unix.cpp
} }

View File

@ -113,24 +113,24 @@ static uint crc32(const Char *ptr, size_t len, uint h)
p += 8; p += 8;
for ( ; p <= e; p += 8) for ( ; p <= e; p += 8)
h2 = _mm_crc32_u64(h2, *reinterpret_cast<const qlonglong *>(p - 8)); h2 = _mm_crc32_u64(h2, qUnalignedLoad<qlonglong>(p - 8));
h = h2; h = h2;
p -= 8; p -= 8;
len = e - p; len = e - p;
if (len & 4) { if (len & 4) {
h = _mm_crc32_u32(h, *reinterpret_cast<const uint *>(p)); h = _mm_crc32_u32(h, qUnalignedLoad<uint>(p));
p += 4; p += 4;
} }
# else # else
p += 4; p += 4;
for ( ; p <= e; p += 4) for ( ; p <= e; p += 4)
h = _mm_crc32_u32(h, *reinterpret_cast<const uint *>(p - 4)); h = _mm_crc32_u32(h, qUnalignedLoad<uint>(p - 4));
p -= 4; p -= 4;
len = e - p; len = e - p;
# endif # endif
if (len & 2) { if (len & 2) {
h = _mm_crc32_u16(h, *reinterpret_cast<const ushort *>(p)); h = _mm_crc32_u16(h, qUnalignedLoad<ushort>(p));
p += 2; p += 2;
} }
if (sizeof(Char) == 1 && len & 1) if (sizeof(Char) == 1 && len & 1)

View File

@ -747,4 +747,26 @@ void qDumpCPUFeatures()
puts(""); puts("");
} }
/*!
\internal
\fn T qUnalignedLoad(const void *ptr)
\since 5.6.1
Loads a \c{T} from address \a ptr, which may be misaligned.
Use of this function avoid the undefined behavior that the C++ standard
otherwise attributes to unaligned loads.
*/
/*!
\internal
\fn void qUnalignedStore(void *ptr, T t)
\since 5.6.1
Stores \a t to address \a ptr, which may be misaligned.
Use of this function avoid the undefined behavior that the C++ standard
otherwise attributes to unaligned stores.
*/
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -521,6 +521,32 @@ unsigned _bit_scan_forward(unsigned val)
#define ALIGNMENT_PROLOGUE_16BYTES(ptr, i, length) \ #define ALIGNMENT_PROLOGUE_16BYTES(ptr, i, length) \
for (; i < static_cast<int>(qMin(static_cast<quintptr>(length), ((4 - ((reinterpret_cast<quintptr>(ptr) >> 2) & 0x3)) & 0x3))); ++i) for (; i < static_cast<int>(qMin(static_cast<quintptr>(length), ((4 - ((reinterpret_cast<quintptr>(ptr) >> 2) & 0x3)) & 0x3))); ++i)
template <typename T>
Q_ALWAYS_INLINE
T qUnalignedLoad(const void *ptr) Q_DECL_NOTHROW
{
T result;
#if QT_HAS_BUILTIN(__builtin_memcpy)
__builtin_memcpy
#else
memcpy
#endif
/*memcpy*/(&result, ptr, sizeof result);
return result;
}
template <typename T>
Q_ALWAYS_INLINE
void qUnalignedStore(void *ptr, T t) Q_DECL_NOTHROW
{
#if QT_HAS_BUILTIN(__builtin_memcpy)
__builtin_memcpy
#else
memcpy
#endif
/*memcpy*/(ptr, &t, sizeof t);
}
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QSIMD_P_H #endif // QSIMD_P_H

View File

@ -584,7 +584,7 @@ static int ucstrncmp(const QChar *a, const uchar *c, int l)
// we'll read uc[offset..offset+7] (16 bytes) and c[offset..offset+7] (8 bytes) // we'll read uc[offset..offset+7] (16 bytes) and c[offset..offset+7] (8 bytes)
if (uc + offset + 7 < e) { if (uc + offset + 7 < e) {
// same, but we're using an 8-byte load // same, but we're using an 8-byte load
__m128i chunk = _mm_cvtsi64_si128(*(const long long *)(c + offset)); __m128i chunk = _mm_cvtsi64_si128(qUnalignedLoad<long long>(c + offset));
__m128i secondHalf = _mm_unpacklo_epi8(chunk, nullmask); __m128i secondHalf = _mm_unpacklo_epi8(chunk, nullmask);
__m128i ucdata = _mm_loadu_si128((const __m128i*)(uc + offset)); __m128i ucdata = _mm_loadu_si128((const __m128i*)(uc + offset));
@ -6177,11 +6177,7 @@ QString QString::vasprintf(const char *cformat, va_list ap)
} }
case 'p': { case 'p': {
void *arg = va_arg(ap, void*); void *arg = va_arg(ap, void*);
#ifdef Q_OS_WIN64 const quint64 i = reinterpret_cast<quintptr>(arg);
quint64 i = reinterpret_cast<quint64>(arg);
#else
quint64 i = reinterpret_cast<unsigned long>(arg);
#endif
flags |= QLocaleData::Alternate; flags |= QLocaleData::Alternate;
subst = QLocaleData::c()->unsLongLongToString(i, precision, 16, width, flags); subst = QLocaleData::c()->unsLongLongToString(i, precision, 16, width, flags);
++c; ++c;

View File

@ -25,8 +25,6 @@ win32 {
QMAKE_DOCS = $$PWD/doc/qtdbus.qdocconf QMAKE_DOCS = $$PWD/doc/qtdbus.qdocconf
load(qt_module)
PUB_HEADERS = qdbusargument.h \ PUB_HEADERS = qdbusargument.h \
qdbusconnectioninterface.h \ qdbusconnectioninterface.h \
qdbusmacros.h \ qdbusmacros.h \
@ -91,3 +89,5 @@ SOURCES += qdbusconnection.cpp \
qdbusservicewatcher.cpp \ qdbusservicewatcher.cpp \
qdbusunixfiledescriptor.cpp \ qdbusunixfiledescriptor.cpp \
qdbusvirtualobject.cpp qdbusvirtualobject.cpp
load(qt_module)

View File

@ -23,8 +23,6 @@ win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) {
\$\$QT_MODULE_INCLUDE_BASE/QtANGLE \$\$QT_MODULE_INCLUDE_BASE/QtANGLE
} }
load(qt_module)
# Code coverage with TestCocoon # Code coverage with TestCocoon
# The following is required as extra compilers use $$QMAKE_CXX instead of $(CXX). # The following is required as extra compilers use $$QMAKE_CXX instead of $(CXX).
# Without this, testcocoon.prf is read only after $$QMAKE_CXX is used by the # Without this, testcocoon.prf is read only after $$QMAKE_CXX is used by the
@ -50,6 +48,7 @@ include(itemmodels/itemmodels.pri)
QMAKE_LIBS += $$QMAKE_LIBS_GUI QMAKE_LIBS += $$QMAKE_LIBS_GUI
load(qt_module)
load(cmake_functions) load(cmake_functions)
win32: CMAKE_WINDOWS_BUILD = True win32: CMAKE_WINDOWS_BUILD = True

View File

@ -4416,7 +4416,8 @@ QImage QImage::smoothScaled(int w, int h) const {
src = src.convertToFormat(QImage::Format_RGB32); src = src.convertToFormat(QImage::Format_RGB32);
} }
src = qSmoothScaleImage(src, w, h); src = qSmoothScaleImage(src, w, h);
copyMetadata(src.d, d); if (!src.isNull())
copyMetadata(src.d, d);
return src; return src;
} }

View File

@ -761,6 +761,8 @@ QWheelEvent::QWheelEvent(const QPointF &pos, int delta,
: QInputEvent(Wheel, modifiers), p(pos), qt4D(delta), qt4O(orient), mouseState(buttons), : QInputEvent(Wheel, modifiers), p(pos), qt4D(delta), qt4O(orient), mouseState(buttons),
ph(Qt::NoScrollPhase), src(Qt::MouseEventNotSynthesized), invertedScrolling(false) ph(Qt::NoScrollPhase), src(Qt::MouseEventNotSynthesized), invertedScrolling(false)
{ {
if (!QGuiApplicationPrivate::scrollNoPhaseAllowed)
ph = Qt::ScrollUpdate;
g = QCursor::pos(); g = QCursor::pos();
if (orient == Qt::Vertical) if (orient == Qt::Vertical)
angleD = QPoint(0, delta); angleD = QPoint(0, delta);
@ -796,6 +798,8 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, int delta
: QInputEvent(Wheel, modifiers), p(pos), g(globalPos), qt4D(delta), qt4O(orient), mouseState(buttons), : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), qt4D(delta), qt4O(orient), mouseState(buttons),
ph(Qt::NoScrollPhase), src(Qt::MouseEventNotSynthesized), invertedScrolling(false) ph(Qt::NoScrollPhase), src(Qt::MouseEventNotSynthesized), invertedScrolling(false)
{ {
if (!QGuiApplicationPrivate::scrollNoPhaseAllowed)
ph = Qt::ScrollUpdate;
if (orient == Qt::Vertical) if (orient == Qt::Vertical)
angleD = QPoint(0, delta); angleD = QPoint(0, delta);
else else
@ -832,7 +836,10 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
: QInputEvent(Wheel, modifiers), p(pos), g(globalPos), pixelD(pixelDelta), : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), pixelD(pixelDelta),
angleD(angleDelta), qt4D(qt4Delta), qt4O(qt4Orientation), mouseState(buttons), ph(Qt::NoScrollPhase), angleD(angleDelta), qt4D(qt4Delta), qt4O(qt4Orientation), mouseState(buttons), ph(Qt::NoScrollPhase),
src(Qt::MouseEventNotSynthesized), invertedScrolling(false) src(Qt::MouseEventNotSynthesized), invertedScrolling(false)
{} {
if (!QGuiApplicationPrivate::scrollNoPhaseAllowed)
ph = Qt::ScrollUpdate;
}
/*! /*!
Constructs a wheel event object. Constructs a wheel event object.

View File

@ -199,6 +199,9 @@ bool QGuiApplicationPrivate::obey_desktop_settings = true;
QInputDeviceManager *QGuiApplicationPrivate::m_inputDeviceManager = 0; QInputDeviceManager *QGuiApplicationPrivate::m_inputDeviceManager = 0;
// enable the fix for QTBUG-50199; TODO remove this check in 5.7
bool QGuiApplicationPrivate::scrollNoPhaseAllowed = false;
static qreal fontSmoothingGamma = 1.7; static qreal fontSmoothingGamma = 1.7;
extern void qRegisterGuiVariant(); extern void qRegisterGuiVariant();
@ -587,7 +590,7 @@ QGuiApplication::QGuiApplication(int &argc, char **argv, int flags)
QGuiApplication::QGuiApplication(QGuiApplicationPrivate &p) QGuiApplication::QGuiApplication(QGuiApplicationPrivate &p)
: QCoreApplication(p) : QCoreApplication(p)
{ {
d_func()->init(); } }
/*! /*!
Destructs the application. Destructs the application.
@ -1300,6 +1303,8 @@ void QGuiApplicationPrivate::eventDispatcherReady()
void QGuiApplicationPrivate::init() void QGuiApplicationPrivate::init()
{ {
QCoreApplicationPrivate::init();
QCoreApplicationPrivate::is_app_running = false; // Starting up. QCoreApplicationPrivate::is_app_running = false; // Starting up.
bool loadTestability = false; bool loadTestability = false;
@ -1453,6 +1458,8 @@ void QGuiApplicationPrivate::init()
if (layout_direction == Qt::LayoutDirectionAuto || force_reverse) if (layout_direction == Qt::LayoutDirectionAuto || force_reverse)
QGuiApplication::setLayoutDirection(qt_detectRTLLanguage() ? Qt::RightToLeft : Qt::LeftToRight); QGuiApplication::setLayoutDirection(qt_detectRTLLanguage() ? Qt::RightToLeft : Qt::LeftToRight);
scrollNoPhaseAllowed = qEnvironmentVariableIsSet("QT_ENABLE_MOUSE_WHEEL_TRACKING");
} }
extern void qt_cleanupFontDatabase(); extern void qt_cleanupFontDatabase();

View File

@ -81,6 +81,8 @@ public:
QGuiApplicationPrivate(int &argc, char **argv, int flags); QGuiApplicationPrivate(int &argc, char **argv, int flags);
~QGuiApplicationPrivate(); ~QGuiApplicationPrivate();
void init();
void createPlatformIntegration(); void createPlatformIntegration();
void createEventDispatcher() Q_DECL_OVERRIDE; void createEventDispatcher() Q_DECL_OVERRIDE;
void eventDispatcherReady() Q_DECL_OVERRIDE; void eventDispatcherReady() Q_DECL_OVERRIDE;
@ -300,6 +302,9 @@ public:
static void setApplicationState(Qt::ApplicationState state, bool forcePropagate = false); static void setApplicationState(Qt::ApplicationState state, bool forcePropagate = false);
// enable the fix for QTBUG-50199; TODO remove this check in 5.7
static bool scrollNoPhaseAllowed;
protected: protected:
virtual void notifyThemeChanged(); virtual void notifyThemeChanged();
bool tryCloseRemainingWindows(QWindowList processedWindows); bool tryCloseRemainingWindows(QWindowList processedWindows);
@ -310,8 +315,6 @@ protected:
private: private:
friend class QDragManager; friend class QDragManager;
void init();
static QGuiApplicationPrivate *self; static QGuiApplicationPrivate *self;
static QTouchDevice *m_fakeTouchDevice; static QTouchDevice *m_fakeTouchDevice;
static int m_fakeMouseSourcePointId; static int m_fakeMouseSourcePointId;

View File

@ -318,6 +318,9 @@ void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local,
void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase, void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase,
Qt::MouseEventSource source, bool invertedScrolling) Qt::MouseEventSource source, bool invertedScrolling)
{ {
if (!QGuiApplicationPrivate::scrollNoPhaseAllowed && phase == Qt::NoScrollPhase)
phase = Qt::ScrollUpdate;
// Qt 4 sends two separate wheel events for horizontal and vertical // Qt 4 sends two separate wheel events for horizontal and vertical
// deltas. For Qt 5 we want to send the deltas in one event, but at the // deltas. For Qt 5 we want to send the deltas in one event, but at the
// same time preserve source and behavior compatibility with Qt 4. // same time preserve source and behavior compatibility with Qt 4.
@ -865,7 +868,9 @@ Q_GUI_EXPORT void qt_handleMouseEvent(QWindow *w, const QPointF &local, const QP
{ {
bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowSystemEvents; bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowSystemEvents;
QWindowSystemInterface::setSynchronousWindowSystemEvents(true); QWindowSystemInterface::setSynchronousWindowSystemEvents(true);
QWindowSystemInterface::handleMouseEvent(w, timestamp, local, global, b, mods); const qreal factor = QHighDpiScaling::factor(w);
QWindowSystemInterface::handleMouseEvent(w, timestamp, local * factor,
global * factor, b, mods);
QWindowSystemInterface::setSynchronousWindowSystemEvents(wasSynchronous); QWindowSystemInterface::setSynchronousWindowSystemEvents(wasSynchronous);
} }
@ -914,36 +919,14 @@ Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int
#endif #endif
} }
static QWindowSystemInterface::TouchPoint touchPoint(const QTouchEvent::TouchPoint& pt)
{
QWindowSystemInterface::TouchPoint p;
p.id = pt.id();
p.flags = pt.flags();
p.normalPosition = pt.normalizedPos();
p.area = pt.screenRect();
p.pressure = pt.pressure();
p.state = pt.state();
p.velocity = pt.velocity();
p.rawPositions = pt.rawScreenPositions();
return p;
}
static QList<struct QWindowSystemInterface::TouchPoint> touchPointList(const QList<QTouchEvent::TouchPoint>& pointList)
{
QList<struct QWindowSystemInterface::TouchPoint> newList;
newList.reserve(pointList.size());
for (const QTouchEvent::TouchPoint &p : pointList)
newList.append(touchPoint(p));
return newList;
}
Q_GUI_EXPORT void qt_handleTouchEvent(QWindow *w, QTouchDevice *device, Q_GUI_EXPORT void qt_handleTouchEvent(QWindow *w, QTouchDevice *device,
const QList<QTouchEvent::TouchPoint> &points, const QList<QTouchEvent::TouchPoint> &points,
Qt::KeyboardModifiers mods = Qt::NoModifier) Qt::KeyboardModifiers mods = Qt::NoModifier)
{ {
bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowSystemEvents; bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowSystemEvents;
QWindowSystemInterface::setSynchronousWindowSystemEvents(true); QWindowSystemInterface::setSynchronousWindowSystemEvents(true);
QWindowSystemInterface::handleTouchEvent(w, device, touchPointList(points), mods); QWindowSystemInterface::handleTouchEvent(w, device,
QWindowSystemInterfacePrivate::toNativeTouchPoints(points, w), mods);
QWindowSystemInterface::setSynchronousWindowSystemEvents(wasSynchronous); QWindowSystemInterface::setSynchronousWindowSystemEvents(wasSynchronous);
} }
@ -958,5 +941,13 @@ bool QWindowSystemEventHandler::sendEvent(QWindowSystemInterfacePrivate::WindowS
return true; return true;
} }
QWindowSystemInterfacePrivate::WheelEvent::WheelEvent(QWindow *w, ulong time, const QPointF &local, const QPointF &global, QPoint pixelD,
QPoint angleD, int qt4D, Qt::Orientation qt4O, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase, Qt::MouseEventSource src, bool inverted)
: InputEvent(w, time, Wheel, mods), pixelDelta(pixelD), angleDelta(angleD), qt4Delta(qt4D),
qt4Orientation(qt4O), localPos(local), globalPos(global),
phase(!QGuiApplicationPrivate::scrollNoPhaseAllowed && phase == Qt::NoScrollPhase ? Qt::ScrollUpdate : phase),
source(src), inverted(inverted)
{
}
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -242,8 +242,7 @@ public:
class WheelEvent : public InputEvent { class WheelEvent : public InputEvent {
public: public:
WheelEvent(QWindow *w, ulong time, const QPointF & local, const QPointF & global, QPoint pixelD, QPoint angleD, int qt4D, Qt::Orientation qt4O, WheelEvent(QWindow *w, ulong time, const QPointF & local, const QPointF & global, QPoint pixelD, QPoint angleD, int qt4D, Qt::Orientation qt4O,
Qt::KeyboardModifiers mods, Qt::ScrollPhase phase = Qt::NoScrollPhase, Qt::MouseEventSource src = Qt::MouseEventNotSynthesized, bool inverted = false) Qt::KeyboardModifiers mods, Qt::ScrollPhase phase = Qt::NoScrollPhase, Qt::MouseEventSource src = Qt::MouseEventNotSynthesized, bool inverted = false);
: InputEvent(w, time, Wheel, mods), pixelDelta(pixelD), angleDelta(angleD), qt4Delta(qt4D), qt4Orientation(qt4O), localPos(local), globalPos(global), phase(phase), source(src), inverted(inverted) { }
QPoint pixelDelta; QPoint pixelDelta;
QPoint angleDelta; QPoint angleDelta;
int qt4Delta; int qt4Delta;

View File

@ -147,12 +147,14 @@ inline void drawPixel(QCosmeticStroker *stroker, int x, int y, int coverage)
if (x < cl.x() || x > cl.right() || y < cl.y() || y > cl.bottom()) if (x < cl.x() || x > cl.right() || y < cl.y() || y > cl.bottom())
return; return;
int lastx = stroker->spans[stroker->current_span-1].x + stroker->spans[stroker->current_span-1].len ; if (stroker->current_span > 0) {
int lasty = stroker->spans[stroker->current_span-1].y; const int lastx = stroker->spans[stroker->current_span-1].x + stroker->spans[stroker->current_span-1].len ;
const int lasty = stroker->spans[stroker->current_span-1].y;
if (stroker->current_span == QCosmeticStroker::NSPANS || y < lasty || (y == lasty && x < lastx)) { if (stroker->current_span == QCosmeticStroker::NSPANS || y < lasty || (y == lasty && x < lastx)) {
stroker->blend(stroker->current_span, stroker->spans, &stroker->state->penData); stroker->blend(stroker->current_span, stroker->spans, &stroker->state->penData);
stroker->current_span = 0; stroker->current_span = 0;
}
} }
stroker->spans[stroker->current_span].x = ushort(x); stroker->spans[stroker->current_span].x = ushort(x);

View File

@ -495,7 +495,7 @@ void QT_FASTCALL comp_func_SourceOut_mips_dsp(uint *dest, const uint *src, int l
const uint * QT_FASTCALL qt_fetchUntransformed_888_mips_dsp (uint *buffer, const Operator *, const QSpanData *data, const uint * QT_FASTCALL qt_fetchUntransformed_888_mips_dsp (uint *buffer, const Operator *, const QSpanData *data,
int y, int x, int length) int y, int x, int length)
{ {
uchar *line = (uchar *)data->texture.scanLine(y) + x; const uchar *line = data->texture.scanLine(y) + x * 3;
fetchUntransformed_888_asm_mips_dsp(buffer, line, length); fetchUntransformed_888_asm_mips_dsp(buffer, line, length);
return buffer; return buffer;
} }
@ -503,7 +503,7 @@ const uint * QT_FASTCALL qt_fetchUntransformed_888_mips_dsp (uint *buffer, const
const uint * QT_FASTCALL qt_fetchUntransformed_444_mips_dsp (uint *buffer, const Operator *, const QSpanData *data, const uint * QT_FASTCALL qt_fetchUntransformed_444_mips_dsp (uint *buffer, const Operator *, const QSpanData *data,
int y, int x, int length) int y, int x, int length)
{ {
uchar *line = (uchar *)data->texture.scanLine(y) + x; const uchar *line = data->texture.scanLine(y) + x * 2;
fetchUntransformed_444_asm_mips_dsp(buffer, line, length); fetchUntransformed_444_asm_mips_dsp(buffer, line, length);
return buffer; return buffer;
} }
@ -511,7 +511,7 @@ const uint * QT_FASTCALL qt_fetchUntransformed_444_mips_dsp (uint *buffer, const
const uint * QT_FASTCALL qt_fetchUntransformed_argb8565_premultiplied_mips_dsp (uint *buffer, const Operator *, const QSpanData *data, const uint * QT_FASTCALL qt_fetchUntransformed_argb8565_premultiplied_mips_dsp (uint *buffer, const Operator *, const QSpanData *data,
int y, int x, int length) int y, int x, int length)
{ {
uchar *line = (uchar *)data->texture.scanLine(y) + x; const uchar *line = data->texture.scanLine(y) + x * 3;
fetchUntransformed_argb8565_premultiplied_asm_mips_dsp(buffer, line, length); fetchUntransformed_argb8565_premultiplied_asm_mips_dsp(buffer, line, length);
return buffer; return buffer;
} }

View File

@ -949,40 +949,37 @@ QRect QPageLayout::paintRectPixels(int resolution) const
QDebug operator<<(QDebug dbg, const QPageLayout &layout) QDebug operator<<(QDebug dbg, const QPageLayout &layout)
{ {
QDebugStateSaver saver(dbg); QDebugStateSaver saver(dbg);
dbg.nospace();
dbg.noquote();
dbg << "QPageLayout(";
if (layout.isValid()) { if (layout.isValid()) {
QString output = QStringLiteral("QPageLayout(%1, %2, l:%3 r:%4 t:%5 b:%6 %7)"); const QMarginsF margins = layout.margins();
QString units; dbg << '"' << layout.pageSize().name() << "\", "
<< (layout.orientation() == QPageLayout::Portrait ? "Portrait" : "Landscape")
<< ", l:" << margins.left() << " r:" << margins.right() << " t:"
<< margins.top() << " b:" << margins.bottom() << ' ';
switch (layout.units()) { switch (layout.units()) {
case QPageLayout::Millimeter: case QPageLayout::Millimeter:
units = QStringLiteral("mm"); dbg << "mm";
break; break;
case QPageLayout::Point: case QPageLayout::Point:
units = QStringLiteral("pt"); dbg << "pt";
break; break;
case QPageLayout::Inch: case QPageLayout::Inch:
units = QStringLiteral("in"); dbg << "in";
break; break;
case QPageLayout::Pica: case QPageLayout::Pica:
units = QStringLiteral("pc"); dbg << "pc";
break; break;
case QPageLayout::Didot: case QPageLayout::Didot:
units = QStringLiteral("DD"); dbg << "DD";
break; break;
case QPageLayout::Cicero: case QPageLayout::Cicero:
units = QStringLiteral("CC"); dbg << "CC";
break; break;
} }
output = output.arg(layout.pageSize().name())
.arg(layout.orientation() == QPageLayout::Portrait ? QStringLiteral("Portrait") : QStringLiteral("Landscape"))
.arg(layout.margins().left())
.arg(layout.margins().right())
.arg(layout.margins().top())
.arg(layout.margins().bottom())
.arg(units);
dbg.nospace() << output;
} else {
dbg.nospace() << "QPageLayout()";
} }
dbg << ')';
return dbg; return dbg;
} }
#endif #endif

View File

@ -1861,17 +1861,17 @@ QSize QPageSize::sizePixels(PageSizeId pageSizeId, int resolution)
QDebug operator<<(QDebug dbg, const QPageSize &pageSize) QDebug operator<<(QDebug dbg, const QPageSize &pageSize)
{ {
QDebugStateSaver saver(dbg); QDebugStateSaver saver(dbg);
dbg.nospace();
dbg.noquote();
dbg << "QPageSize(";
if (pageSize.isValid()) { if (pageSize.isValid()) {
QString output = QStringLiteral("QPageSize(\"%1\", \"%2\", %3x%4pt, %5)"); dbg << '"' << pageSize.name() << "\", key=\"" << pageSize.key()
output = output.arg(pageSize.name()) << "\", " << pageSize.sizePoints().width() << 'x'
.arg(pageSize.key()) << pageSize.sizePoints().height() << "pt, id=" << pageSize.id();
.arg(pageSize.sizePoints().width())
.arg(pageSize.sizePoints().height())
.arg(pageSize.id());
dbg.nospace() << output;
} else { } else {
dbg.nospace() << "QPageSize()"; dbg.nospace() << "QPageSize()";
} }
dbg << ')';
return dbg; return dbg;
} }
#endif #endif

View File

@ -258,8 +258,6 @@ class SegmentTree
public: public:
SegmentTree(QPathSegments &segments); SegmentTree(QPathSegments &segments);
QRectF boundingRect() const;
void produceIntersections(int segment); void produceIntersections(int segment);
private: private:
@ -310,12 +308,6 @@ SegmentTree::SegmentTree(QPathSegments &segments)
m_tree[0] = root; m_tree[0] = root;
} }
QRectF SegmentTree::boundingRect() const
{
return QRectF(QPointF(m_bounds.x1, m_bounds.y1),
QPointF(m_bounds.x2, m_bounds.y2));
}
static inline qreal coordinate(const QPointF &pos, int axis) static inline qreal coordinate(const QPointF &pos, int axis)
{ {
return axis == 0 ? pos.x() : pos.y(); return axis == 0 ? pos.x() : pos.y();

View File

@ -1075,8 +1075,8 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
if (glyph_buffer_size < pitch * info.height) { if (glyph_buffer_size < pitch * info.height) {
glyph_buffer_size = pitch * info.height; glyph_buffer_size = pitch * info.height;
glyph_buffer.reset(new uchar[glyph_buffer_size]); glyph_buffer.reset(new uchar[glyph_buffer_size]);
memset(glyph_buffer.data(), 0, glyph_buffer_size);
} }
memset(glyph_buffer.data(), 0, glyph_buffer_size);
if (slot->format == FT_GLYPH_FORMAT_OUTLINE) { if (slot->format == FT_GLYPH_FORMAT_OUTLINE) {
FT_Bitmap bitmap; FT_Bitmap bitmap;

View File

@ -2753,8 +2753,7 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int
QFixed ellipsisWidth; QFixed ellipsisWidth;
QString ellipsisText; QString ellipsisText;
{ {
QFontEngine *fe = fnt.d->engineForScript(QChar::Script_Common); QFontEngine *engine = fnt.d->engineForScript(QChar::Script_Common);
QFontEngine *engine = fe->type() == QFontEngine::Multi ? static_cast<QFontEngineMulti *>(fe)->engine(0) : fe;
QChar ellipsisChar(0x2026); QChar ellipsisChar(0x2026);

View File

@ -558,9 +558,8 @@ qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket)
if (c == '\n') { if (c == '\n') {
// check for possible header endings. As per HTTP rfc, // check for possible header endings. As per HTTP rfc,
// the header endings will be marked by CRLFCRLF. But // the header endings will be marked by CRLFCRLF. But
// we will allow CRLFCRLF, CRLFLF, LFLF // we will allow CRLFCRLF, CRLFLF, LFCRLF, LFLF
if (fragment.endsWith("\r\n\r\n") if (fragment.endsWith("\n\r\n")
|| fragment.endsWith("\r\n\n")
|| fragment.endsWith("\n\n")) || fragment.endsWith("\n\n"))
allHeaders = true; allHeaders = true;

View File

@ -181,7 +181,7 @@ private:
}; };
class QHttpNetworkReplyPrivate : public QObjectPrivate, public QHttpNetworkHeaderPrivate class Q_AUTOTEST_EXPORT QHttpNetworkReplyPrivate : public QObjectPrivate, public QHttpNetworkHeaderPrivate
{ {
public: public:
QHttpNetworkReplyPrivate(const QUrl &newUrl = QUrl()); QHttpNetworkReplyPrivate(const QUrl &newUrl = QUrl());

View File

@ -682,18 +682,19 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
if (newHttpRequest.attribute(QNetworkRequest::FollowRedirectsAttribute).toBool()) if (newHttpRequest.attribute(QNetworkRequest::FollowRedirectsAttribute).toBool())
httpRequest.setFollowRedirects(true); httpRequest.setFollowRedirects(true);
bool loadedFromCache = false;
httpRequest.setPriority(convert(newHttpRequest.priority())); httpRequest.setPriority(convert(newHttpRequest.priority()));
switch (operation) { switch (operation) {
case QNetworkAccessManager::GetOperation: case QNetworkAccessManager::GetOperation:
httpRequest.setOperation(QHttpNetworkRequest::Get); httpRequest.setOperation(QHttpNetworkRequest::Get);
loadedFromCache = loadFromCacheIfAllowed(httpRequest); if (loadFromCacheIfAllowed(httpRequest))
return; // no need to send the request! :)
break; break;
case QNetworkAccessManager::HeadOperation: case QNetworkAccessManager::HeadOperation:
httpRequest.setOperation(QHttpNetworkRequest::Head); httpRequest.setOperation(QHttpNetworkRequest::Head);
loadedFromCache = loadFromCacheIfAllowed(httpRequest); if (loadFromCacheIfAllowed(httpRequest))
return; // no need to send the request! :)
break; break;
case QNetworkAccessManager::PostOperation: case QNetworkAccessManager::PostOperation:
@ -725,10 +726,6 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
break; // can't happen break; // can't happen
} }
if (loadedFromCache) {
return; // no need to send the request! :)
}
QList<QByteArray> headers = newHttpRequest.rawHeaderList(); QList<QByteArray> headers = newHttpRequest.rawHeaderList();
if (resumeOffset != 0) { if (resumeOffset != 0) {
const int rangeIndex = headers.indexOf("Range"); const int rangeIndex = headers.indexOf("Range");
@ -757,10 +754,10 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
foreach (const QByteArray &header, headers) foreach (const QByteArray &header, headers)
httpRequest.setHeaderField(header, newHttpRequest.rawHeader(header)); httpRequest.setHeaderField(header, newHttpRequest.rawHeader(header));
if (newHttpRequest.attribute(QNetworkRequest::HttpPipeliningAllowedAttribute).toBool() == true) if (newHttpRequest.attribute(QNetworkRequest::HttpPipeliningAllowedAttribute).toBool())
httpRequest.setPipeliningAllowed(true); httpRequest.setPipeliningAllowed(true);
if (request.attribute(QNetworkRequest::SpdyAllowedAttribute).toBool() == true) if (request.attribute(QNetworkRequest::SpdyAllowedAttribute).toBool())
httpRequest.setSPDYAllowed(true); httpRequest.setSPDYAllowed(true);
if (static_cast<QNetworkRequest::LoadControl> if (static_cast<QNetworkRequest::LoadControl>
@ -768,7 +765,7 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
QNetworkRequest::Automatic).toInt()) == QNetworkRequest::Manual) QNetworkRequest::Automatic).toInt()) == QNetworkRequest::Manual)
httpRequest.setWithCredentials(false); httpRequest.setWithCredentials(false);
if (request.attribute(QNetworkRequest::EmitAllUploadProgressSignalsAttribute).toBool() == true) if (request.attribute(QNetworkRequest::EmitAllUploadProgressSignalsAttribute).toBool())
emitAllUploadProgressSignals = true; emitAllUploadProgressSignals = true;
@ -1755,10 +1752,8 @@ void QNetworkReplyHttpImplPrivate::_q_startOperation()
QMetaObject::invokeMethod(q, "_q_finished", synchronous ? Qt::DirectConnection : Qt::QueuedConnection); QMetaObject::invokeMethod(q, "_q_finished", synchronous ? Qt::DirectConnection : Qt::QueuedConnection);
return; return;
} }
#endif
if (!start(request)) { if (!start(request)) {
#ifndef QT_NO_BEARERMANAGEMENT
// backend failed to start because the session state is not Connected. // backend failed to start because the session state is not Connected.
// QNetworkAccessManager will call reply->backend->start() again for us when the session // QNetworkAccessManager will call reply->backend->start() again for us when the session
// state changes. // state changes.
@ -1780,29 +1775,25 @@ void QNetworkReplyHttpImplPrivate::_q_startOperation()
QMetaObject::invokeMethod(q, "_q_finished", synchronous ? Qt::DirectConnection : Qt::QueuedConnection); QMetaObject::invokeMethod(q, "_q_finished", synchronous ? Qt::DirectConnection : Qt::QueuedConnection);
return; return;
} }
} else if (session) {
QObject::connect(session.data(), SIGNAL(stateChanged(QNetworkSession::State)),
q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State)),
Qt::QueuedConnection);
}
#else #else
if (!start(request)) {
qWarning("Backend start failed"); qWarning("Backend start failed");
QMetaObject::invokeMethod(q, "_q_error", synchronous ? Qt::DirectConnection : Qt::QueuedConnection, QMetaObject::invokeMethod(q, "_q_error", synchronous ? Qt::DirectConnection : Qt::QueuedConnection,
Q_ARG(QNetworkReply::NetworkError, QNetworkReply::UnknownNetworkError), Q_ARG(QNetworkReply::NetworkError, QNetworkReply::UnknownNetworkError),
Q_ARG(QString, QCoreApplication::translate("QNetworkReply", "backend start error."))); Q_ARG(QString, QCoreApplication::translate("QNetworkReply", "backend start error.")));
QMetaObject::invokeMethod(q, "_q_finished", synchronous ? Qt::DirectConnection : Qt::QueuedConnection); QMetaObject::invokeMethod(q, "_q_finished", synchronous ? Qt::DirectConnection : Qt::QueuedConnection);
return; return;
#endif
} else {
#ifndef QT_NO_BEARERMANAGEMENT
if (session)
QObject::connect(session.data(), SIGNAL(stateChanged(QNetworkSession::State)),
q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State)), Qt::QueuedConnection);
#endif
} }
#endif // QT_NO_BEARERMANAGEMENT
if (synchronous) { if (synchronous) {
state = Finished; state = Finished;
q_func()->setFinished(true); q_func()->setFinished(true);
} else {
if (state != Finished) {
}
} }
} }

View File

@ -11,13 +11,8 @@ DEFINES += QT_NO_USING_NAMESPACE
#DEFINES += QUDPSOCKET_DEBUG QUDPSERVER_DEBUG #DEFINES += QUDPSOCKET_DEBUG QUDPSERVER_DEBUG
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x64000000 win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x64000000
MODULE_PLUGIN_TYPES = \
bearer
QMAKE_DOCS = $$PWD/doc/qtnetwork.qdocconf QMAKE_DOCS = $$PWD/doc/qtnetwork.qdocconf
load(qt_module)
include(access/access.pri) include(access/access.pri)
include(bearer/bearer.pri) include(bearer/bearer.pri)
include(kernel/kernel.pri) include(kernel/kernel.pri)
@ -36,3 +31,7 @@ MODULE_PLUGIN_TYPES = \
bearer bearer
ANDROID_PERMISSIONS += \ ANDROID_PERMISSIONS += \
android.permission.ACCESS_NETWORK_STATE android.permission.ACCESS_NETWORK_STATE
MODULE_PLUGIN_TYPES = \
bearer
load(qt_module)

View File

@ -2180,8 +2180,10 @@ bool QAbstractSocket::waitForReadyRead(int msecs)
return false; return false;
} }
Q_ASSERT(d->socketEngine);
do { do {
if (state() != ConnectedState)
return false;
bool readyToRead = false; bool readyToRead = false;
bool readyToWrite = false; bool readyToWrite = false;
if (!d->socketEngine->waitForReadOrWrite(&readyToRead, &readyToWrite, true, !d->writeBuffer.isEmpty(), if (!d->socketEngine->waitForReadOrWrite(&readyToRead, &readyToWrite, true, !d->writeBuffer.isEmpty(),
@ -2203,9 +2205,6 @@ bool QAbstractSocket::waitForReadyRead(int msecs)
if (readyToWrite) if (readyToWrite)
d->canWriteNotification(); d->canWriteNotification();
if (state() != ConnectedState)
return false;
} while (msecs == -1 || qt_subtract_from_timeout(msecs, stopWatch.elapsed()) > 0); } while (msecs == -1 || qt_subtract_from_timeout(msecs, stopWatch.elapsed()) > 0);
return false; return false;
} }

View File

@ -8,8 +8,6 @@ irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
QMAKE_DOCS = $$PWD/doc/qtopengl.qdocconf QMAKE_DOCS = $$PWD/doc/qtopengl.qdocconf
load(qt_module)
contains(QT_CONFIG, opengl):CONFIG += opengl contains(QT_CONFIG, opengl):CONFIG += opengl
contains(QT_CONFIG, opengles2):CONFIG += opengles2 contains(QT_CONFIG, opengles2):CONFIG += opengles2
@ -53,3 +51,5 @@ SOURCES += qglshaderprogram.cpp \
gl2paintengineex/qpaintengineex_opengl2.cpp \ gl2paintengineex/qpaintengineex_opengl2.cpp \
gl2paintengineex/qglcustomshaderstage.cpp \ gl2paintengineex/qglcustomshaderstage.cpp \
gl2paintengineex/qtextureglyphcache_gl.cpp gl2paintengineex/qtextureglyphcache_gl.cpp
load(qt_module)

View File

@ -4,11 +4,11 @@ CONFIG += static
contains(QT_CONFIG, opengl):CONFIG += opengl contains(QT_CONFIG, opengl):CONFIG += opengl
contains(QT_CONFIG, opengles2):CONFIG += opengles2 contains(QT_CONFIG, opengles2):CONFIG += opengles2
load(qt_module)
DEFINES += QT_NO_CAST_FROM_ASCII DEFINES += QT_NO_CAST_FROM_ASCII
PRECOMPILED_HEADER = PRECOMPILED_HEADER =
HEADERS = qopenglextensions.h HEADERS = qopenglextensions.h
SOURCES = qopenglextensions.cpp SOURCES = qopenglextensions.cpp
load(qt_module)

View File

@ -0,0 +1,56 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QXCBSCREENFUNCTIONS_H
#define QXCBSCREENFUNCTIONS_H
#include <QtPlatformHeaders/QPlatformHeaderHelper>
QT_BEGIN_NAMESPACE
class QScreen;
class QXcbScreenFunctions
{
public:
typedef bool (*VirtualDesktopNumber)(const QScreen *screen);
static const QByteArray virtualDesktopNumberIdentifier() { return QByteArrayLiteral("XcbVirtualDesktopNumber"); }
static int virtualDesktopNumber(const QScreen *screen)
{
return QPlatformHeaderHelper::callPlatformFunction<int, VirtualDesktopNumber, const QScreen *>(virtualDesktopNumberIdentifier(), screen);
}
};
QT_END_NAMESPACE
#endif /*QXCBSCREENFUNCTIONS_H*/

View File

@ -1,3 +1,4 @@
HEADERS += \ HEADERS += \
$$PWD/qxcbwindowfunctions.h \ $$PWD/qxcbwindowfunctions.h \
$$PWD/qxcbintegrationfunctions.h $$PWD/qxcbintegrationfunctions.h \
$$PWD/qxcbscreenfunctions.h

View File

@ -868,7 +868,7 @@ void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef
const QPlatformServices *services = QGuiApplicationPrivate::platformIntegration()->services(); const QPlatformServices *services = QGuiApplicationPrivate::platformIntegration()->services();
bool useXftConf = (services && (services->desktopEnvironment() == "GNOME" || services->desktopEnvironment() == "UNITY")); bool useXftConf = (services && (services->desktopEnvironment() == "GNOME" || services->desktopEnvironment() == "UNITY"));
if (useXftConf) { if (useXftConf && !forcedAntialiasSetting) {
void *antialiasResource = void *antialiasResource =
QGuiApplication::platformNativeInterface()->nativeResourceForScreen("antialiasingEnabled", QGuiApplication::platformNativeInterface()->nativeResourceForScreen("antialiasingEnabled",
QGuiApplication::primaryScreen()); QGuiApplication::primaryScreen());

View File

@ -524,9 +524,6 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
if (&CTFontCopyDefaultCascadeListForLanguages) if (&CTFontCopyDefaultCascadeListForLanguages)
#endif #endif
{ {
if (fallbackLists.contains(family))
return fallbackLists.value(family);
QCFType<CFMutableDictionaryRef> attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); QCFType<CFMutableDictionaryRef> attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, QCFString(family)); CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, QCFString(family));
if (QCFType<CTFontDescriptorRef> fontDescriptor = CTFontDescriptorCreateWithAttributes(attributes)) { if (QCFType<CTFontDescriptorRef> fontDescriptor = CTFontDescriptorCreateWithAttributes(attributes)) {
@ -554,12 +551,9 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
fallbackList.append(QStringLiteral("Arial Unicode MS")); fallbackList.append(QStringLiteral("Arial Unicode MS"));
#endif #endif
fallbackLists[family] = fallbackList; return fallbackList;
} }
} }
if (fallbackLists.contains(family))
return fallbackLists.value(family);
} }
} }
#endif #endif

View File

@ -538,9 +538,16 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
it.next(); it.next();
Contact &contact(it.value()); Contact &contact(it.value());
int key = m_typeB ? it.key() : contact.trackingId; int key = m_typeB ? it.key() : contact.trackingId;
if (!m_contacts.contains(key)) { if (m_typeB) {
contact.state = Qt::TouchPointReleased; if (contact.trackingId != m_contacts[key].trackingId && contact.state) {
addTouchPoint(contact, &combinedStates); contact.state = Qt::TouchPointReleased;
addTouchPoint(contact, &combinedStates);
}
} else {
if (!m_contacts.contains(key)) {
contact.state = Qt::TouchPointReleased;
addTouchPoint(contact, &combinedStates);
}
} }
} }

View File

@ -1,11 +1,5 @@
include(wrappers/wrappers.pri)
TARGET = qandroidbearer TARGET = qandroidbearer
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QAndroidBearerEnginePlugin
load(qt_plugin)
QT = core-private network-private QT = core-private network-private
HEADERS += qandroidbearerengine.h \ HEADERS += qandroidbearerengine.h \
@ -15,3 +9,9 @@ HEADERS += qandroidbearerengine.h \
SOURCES += main.cpp \ SOURCES += main.cpp \
qandroidbearerengine.cpp \ qandroidbearerengine.cpp \
../../qnetworksession_impl.cpp ../../qnetworksession_impl.cpp
include(wrappers/wrappers.pri)
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QAndroidBearerEnginePlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qconnmanbearer TARGET = qconnmanbearer
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QConnmanEnginePlugin
load(qt_plugin)
QT = core network-private dbus QT = core network-private dbus
CONFIG += link_pkgconfig CONFIG += link_pkgconfig
@ -21,3 +17,6 @@ SOURCES += main.cpp \
OTHER_FILES += connman.json OTHER_FILES += connman.json
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QConnmanEnginePlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qcorewlanbearer TARGET = qcorewlanbearer
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QCoreWlanEnginePlugin
load(qt_plugin)
QT = core-private network-private QT = core-private network-private
LIBS += -framework Foundation -framework SystemConfiguration LIBS += -framework Foundation -framework SystemConfiguration
@ -21,3 +17,7 @@ SOURCES += main.cpp \
OBJECTIVE_SOURCES += qcorewlanengine.mm OBJECTIVE_SOURCES += qcorewlanengine.mm
OTHER_FILES += corewlan.json OTHER_FILES += corewlan.json
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QCoreWlanEnginePlugin
load(qt_plugin)

View File

@ -164,6 +164,7 @@ void QScanThread::run()
mutex.lock(); mutex.lock();
CWInterface *currentInterface = [CWInterface interfaceWithName: QCFString::toNSString(interfaceName)]; CWInterface *currentInterface = [CWInterface interfaceWithName: QCFString::toNSString(interfaceName)];
mutex.unlock(); mutex.unlock();
const bool currentInterfaceServiceActive = currentInterface.serviceActive;
if (currentInterface.powerOn) { if (currentInterface.powerOn) {
NSError *err = nil; NSError *err = nil;
@ -178,7 +179,7 @@ void QScanThread::run()
QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined; QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
bool known = isKnownSsid(networkSsid); bool known = isKnownSsid(networkSsid);
if (currentInterface.serviceActive) { if (currentInterfaceServiceActive) {
if( networkSsid == QCFString::toQString( [currentInterface ssid])) { if( networkSsid == QCFString::toQString( [currentInterface ssid])) {
state = QNetworkConfiguration::Active; state = QNetworkConfiguration::Active;
} }
@ -221,7 +222,7 @@ void QScanThread::run()
interfaceName = ij.value(); interfaceName = ij.value();
} }
if (currentInterface.serviceActive) { if (currentInterfaceServiceActive) {
if( networkSsid == QCFString::toQString([currentInterface ssid])) { if( networkSsid == QCFString::toQString([currentInterface ssid])) {
state = QNetworkConfiguration::Active; state = QNetworkConfiguration::Active;
} }

View File

@ -1,9 +1,5 @@
TARGET = qgenericbearer TARGET = qgenericbearer
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QGenericEnginePlugin
load(qt_plugin)
QT = core-private network-private QT = core-private network-private
HEADERS += qgenericengine.h \ HEADERS += qgenericengine.h \
@ -15,3 +11,7 @@ SOURCES += qgenericengine.cpp \
main.cpp main.cpp
OTHER_FILES += generic.json OTHER_FILES += generic.json
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QGenericEnginePlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qnativewifibearer TARGET = qnativewifibearer
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QNativeWifiEnginePlugin
load(qt_plugin)
QT = core-private network-private QT = core-private network-private
HEADERS += qnativewifiengine.h \ HEADERS += qnativewifiengine.h \
@ -16,3 +12,7 @@ SOURCES += main.cpp \
../qnetworksession_impl.cpp ../qnetworksession_impl.cpp
OTHER_FILES += nativewifi.json OTHER_FILES += nativewifi.json
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QNativeWifiEnginePlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qnmbearer TARGET = qnmbearer
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QNetworkManagerEnginePlugin
load(qt_plugin)
QT = core network-private dbus QT = core network-private dbus
HEADERS += qnetworkmanagerservice.h \ HEADERS += qnetworkmanagerservice.h \
@ -19,3 +15,7 @@ SOURCES += main.cpp \
../qnetworksession_impl.cpp ../qnetworksession_impl.cpp
OTHER_FILES += networkmanager.json OTHER_FILES += networkmanager.json
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QNetworkManagerEnginePlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qnlabearer TARGET = qnlabearer
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QNlaEnginePlugin
load(qt_plugin)
QT = core core-private network network-private QT = core core-private network network-private
!wince* { !wince* {
@ -22,3 +18,7 @@ SOURCES += main.cpp \
../qnetworksession_impl.cpp ../qnetworksession_impl.cpp
OTHER_FILES += nla.json OTHER_FILES += nla.json
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QNlaEnginePlugin
load(qt_plugin)

View File

@ -1,10 +1,5 @@
TARGET = qevdevkeyboardplugin TARGET = qevdevkeyboardplugin
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QEvdevKeyboardPlugin
load(qt_plugin)
QT += core-private platformsupport-private gui-private QT += core-private platformsupport-private gui-private
SOURCES = main.cpp SOURCES = main.cpp
@ -12,3 +7,7 @@ SOURCES = main.cpp
OTHER_FILES += \ OTHER_FILES += \
evdevkeyboard.json evdevkeyboard.json
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QEvdevKeyboardPlugin
load(qt_plugin)

View File

@ -1,10 +1,5 @@
TARGET = qevdevmouseplugin TARGET = qevdevmouseplugin
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QEvdevMousePlugin
load(qt_plugin)
QT += core-private platformsupport-private gui-private QT += core-private platformsupport-private gui-private
SOURCES = main.cpp SOURCES = main.cpp
@ -12,3 +7,7 @@ SOURCES = main.cpp
OTHER_FILES += \ OTHER_FILES += \
evdevmouse.json evdevmouse.json
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QEvdevMousePlugin
load(qt_plugin)

View File

@ -1,13 +1,13 @@
TARGET = qevdevtabletplugin TARGET = qevdevtabletplugin
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QEvdevTabletPlugin
load(qt_plugin)
SOURCES = main.cpp SOURCES = main.cpp
QT += core-private platformsupport-private gui-private QT += core-private platformsupport-private gui-private
OTHER_FILES += \ OTHER_FILES += \
evdevtablet.json evdevtablet.json
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QEvdevTabletPlugin
load(qt_plugin)

View File

@ -1,10 +1,5 @@
TARGET = qevdevtouchplugin TARGET = qevdevtouchplugin
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QEvdevTouchScreenPlugin
load(qt_plugin)
SOURCES = main.cpp SOURCES = main.cpp
QT += core-private platformsupport-private gui-private QT += core-private platformsupport-private gui-private
@ -12,3 +7,7 @@ QT += core-private platformsupport-private gui-private
OTHER_FILES += \ OTHER_FILES += \
evdevtouch.json evdevtouch.json
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QEvdevTouchScreenPlugin
load(qt_plugin)

View File

@ -1,12 +1,12 @@
TARGET = qlibinputplugin TARGET = qlibinputplugin
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QLibInputPlugin
load(qt_plugin)
QT += core-private platformsupport-private gui-private QT += core-private platformsupport-private gui-private
SOURCES = main.cpp SOURCES = main.cpp
OTHER_FILES = libinput.json OTHER_FILES = libinput.json
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QLibInputPlugin
load(qt_plugin)

View File

@ -1,10 +1,5 @@
TARGET = qtslibplugin TARGET = qtslibplugin
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QTsLibPlugin
load(qt_plugin)
SOURCES = main.cpp SOURCES = main.cpp
QT += gui-private platformsupport-private QT += gui-private platformsupport-private
@ -12,3 +7,8 @@ QT += gui-private platformsupport-private
LIBS += -lts LIBS += -lts
OTHER_FILES += tslib.json OTHER_FILES += tslib.json
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QTsLibPlugin
load(qt_plugin)

View File

@ -1,10 +1,5 @@
TARGET = qtuiotouchplugin TARGET = qtuiotouchplugin
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QTuioTouchPlugin
load(qt_plugin)
QT += \ QT += \
core-private \ core-private \
gui-private \ gui-private \
@ -24,3 +19,8 @@ HEADERS += \
OTHER_FILES += \ OTHER_FILES += \
tuiotouch.json tuiotouch.json
PLUGIN_TYPE = generic
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QTuioTouchPlugin
load(qt_plugin)

View File

@ -1,11 +1,11 @@
TARGET = qgif TARGET = qgif
PLUGIN_TYPE = imageformats
PLUGIN_CLASS_NAME = QGifPlugin
load(qt_plugin)
include(../../../gui/image/qgifhandler.pri) include(../../../gui/image/qgifhandler.pri)
INCLUDEPATH += ../../../gui/image INCLUDEPATH += ../../../gui/image
SOURCES += $$PWD/main.cpp SOURCES += $$PWD/main.cpp
HEADERS += $$PWD/main.h HEADERS += $$PWD/main.h
OTHER_FILES += gif.json OTHER_FILES += gif.json
PLUGIN_TYPE = imageformats
PLUGIN_CLASS_NAME = QGifPlugin
load(qt_plugin)

View File

@ -1,12 +1,12 @@
TARGET = qico TARGET = qico
PLUGIN_TYPE = imageformats
PLUGIN_CLASS_NAME = QICOPlugin
load(qt_plugin)
QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-ico)" QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-ico)"
HEADERS += qicohandler.h main.h HEADERS += qicohandler.h main.h
SOURCES += main.cpp \ SOURCES += main.cpp \
qicohandler.cpp qicohandler.cpp
OTHER_FILES += ico.json OTHER_FILES += ico.json
PLUGIN_TYPE = imageformats
PLUGIN_CLASS_NAME = QICOPlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qjpeg TARGET = qjpeg
PLUGIN_TYPE = imageformats
PLUGIN_CLASS_NAME = QJpegPlugin
load(qt_plugin)
QT += core-private QT += core-private
QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)" QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)"
@ -13,3 +9,7 @@ INCLUDEPATH += ../../../gui/image
SOURCES += main.cpp SOURCES += main.cpp
HEADERS += main.h HEADERS += main.h
OTHER_FILES += jpeg.json OTHER_FILES += jpeg.json
PLUGIN_TYPE = imageformats
PLUGIN_CLASS_NAME = QJpegPlugin
load(qt_plugin)

View File

@ -1,10 +1,5 @@
TARGET = composeplatforminputcontextplugin TARGET = composeplatforminputcontextplugin
PLUGIN_TYPE = platforminputcontexts
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QComposePlatformInputContextPlugin
load(qt_plugin)
QT += core-private gui-private QT += core-private gui-private
DEFINES += X11_PREFIX='\\"$$QMAKE_X11_PREFIX\\"' DEFINES += X11_PREFIX='\\"$$QMAKE_X11_PREFIX\\"'
@ -27,3 +22,8 @@ contains(QT_CONFIG, xkbcommon-qt): {
} }
OTHER_FILES += $$PWD/compose.json OTHER_FILES += $$PWD/compose.json
PLUGIN_TYPE = platforminputcontexts
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QComposePlatformInputContextPlugin
load(qt_plugin)

View File

@ -1,10 +1,5 @@
TARGET = ibusplatforminputcontextplugin TARGET = ibusplatforminputcontextplugin
PLUGIN_TYPE = platforminputcontexts
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QIbusPlatformInputContextPlugin
load(qt_plugin)
QT += dbus gui-private QT += dbus gui-private
SOURCES += $$PWD/qibusplatforminputcontext.cpp \ SOURCES += $$PWD/qibusplatforminputcontext.cpp \
$$PWD/qibusproxy.cpp \ $$PWD/qibusproxy.cpp \
@ -18,3 +13,8 @@ HEADERS += $$PWD/qibusplatforminputcontext.h \
$$PWD/qibustypes.h $$PWD/qibustypes.h
OTHER_FILES += $$PWD/ibus.json OTHER_FILES += $$PWD/ibus.json
PLUGIN_TYPE = platforminputcontexts
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QIbusPlatformInputContextPlugin
load(qt_plugin)

View File

@ -1,13 +1,9 @@
TARGET = qtforandroid TARGET = qtforandroid
PLUGIN_TYPE = platforms
# STATICPLUGIN needed because there's a Q_IMPORT_PLUGIN in androidjnimain.cpp # STATICPLUGIN needed because there's a Q_IMPORT_PLUGIN in androidjnimain.cpp
# Yes, the plugin imports itself statically # Yes, the plugin imports itself statically
DEFINES += QT_STATICPLUGIN DEFINES += QT_STATICPLUGIN
load(qt_plugin)
LIBS += -ljnigraphics -landroid LIBS += -ljnigraphics -landroid
QT += core-private gui-private platformsupport-private QT += core-private gui-private platformsupport-private
@ -79,6 +75,9 @@ HEADERS += $$PWD/qandroidplatformintegration.h \
android-style-assets: SOURCES += $$PWD/extract.cpp android-style-assets: SOURCES += $$PWD/extract.cpp
else: SOURCES += $$PWD/extract-dummy.cpp else: SOURCES += $$PWD/extract-dummy.cpp
PLUGIN_TYPE = platforms
load(qt_plugin)
#Non-standard install directory, QTBUG-29859 #Non-standard install directory, QTBUG-29859
DESTDIR = $$DESTDIR/android DESTDIR = $$DESTDIR/android
target.path = $${target.path}/android target.path = $${target.path}/android

View File

@ -1,10 +1,5 @@
TARGET = qcocoa TARGET = qcocoa
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QCocoaIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
load(qt_plugin)
OBJECTIVE_SOURCES += main.mm \ OBJECTIVE_SOURCES += main.mm \
qcocoaintegration.mm \ qcocoaintegration.mm \
qcocoatheme.mm \ qcocoatheme.mm \
@ -112,3 +107,8 @@ OTHER_FILES += cocoa.json
# Window debug support # Window debug support
#DEFINES += QT_COCOA_ENABLE_WINDOW_DEBUG #DEFINES += QT_COCOA_ENABLE_WINDOW_DEBUG
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QCocoaIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
load(qt_plugin)

View File

@ -153,6 +153,7 @@ static QMacPaletteMap mac_widget_colors[] = {
QMacPaletteMap(QPlatformTheme::LabelPalette, kThemeTextColorPlacardActive, kThemeTextColorPlacardInactive), QMacPaletteMap(QPlatformTheme::LabelPalette, kThemeTextColorPlacardActive, kThemeTextColorPlacardInactive),
QMacPaletteMap(QPlatformTheme::GroupBoxPalette, kThemeTextColorPlacardActive, kThemeTextColorPlacardInactive), QMacPaletteMap(QPlatformTheme::GroupBoxPalette, kThemeTextColorPlacardActive, kThemeTextColorPlacardInactive),
QMacPaletteMap(QPlatformTheme::MenuPalette, kThemeTextColorMenuItemActive, kThemeTextColorMenuItemDisabled), QMacPaletteMap(QPlatformTheme::MenuPalette, kThemeTextColorMenuItemActive, kThemeTextColorMenuItemDisabled),
QMacPaletteMap(QPlatformTheme::MenuBarPalette, kThemeTextColorMenuItemActive, kThemeTextColorMenuItemDisabled),
//### TODO: The zeros below gives white-on-black text. //### TODO: The zeros below gives white-on-black text.
QMacPaletteMap(QPlatformTheme::TextEditPalette, 0, 0), QMacPaletteMap(QPlatformTheme::TextEditPalette, 0, 0),
QMacPaletteMap(QPlatformTheme::TextLineEditPalette, 0, 0), QMacPaletteMap(QPlatformTheme::TextLineEditPalette, 0, 0),
@ -177,7 +178,8 @@ QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes()
pal.setColor(QPalette::Disabled, QPalette::WindowText, qc); pal.setColor(QPalette::Disabled, QPalette::WindowText, qc);
pal.setColor(QPalette::Disabled, QPalette::HighlightedText, qc); pal.setColor(QPalette::Disabled, QPalette::HighlightedText, qc);
} }
if (mac_widget_colors[i].paletteRole == QPlatformTheme::MenuPalette) { if (mac_widget_colors[i].paletteRole == QPlatformTheme::MenuPalette
|| mac_widget_colors[i].paletteRole == QPlatformTheme::MenuBarPalette) {
pal.setBrush(QPalette::Background, qt_mac_brushForTheme(kThemeBrushMenuBackground)); pal.setBrush(QPalette::Background, qt_mac_brushForTheme(kThemeBrushMenuBackground));
qc = qt_mac_colorForThemeTextColor(kThemeTextColorMenuItemActive); qc = qt_mac_colorForThemeTextColor(kThemeTextColorMenuItemActive);
pal.setBrush(QPalette::ButtonText, qc); pal.setBrush(QPalette::ButtonText, qc);

View File

@ -361,6 +361,8 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
if (m_platformWindow->m_nsWindow && geometry == m_platformWindow->geometry()) if (m_platformWindow->m_nsWindow && geometry == m_platformWindow->geometry())
return; return;
const bool isResize = geometry.size() != m_platformWindow->geometry().size();
// It can happen that self.window is nil (if we are changing // It can happen that self.window is nil (if we are changing
// styleMask from/to borderless and content view is being re-parented) // styleMask from/to borderless and content view is being re-parented)
// - this results in an invalid coordinates. // - this results in an invalid coordinates.
@ -390,7 +392,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
// calles, which Qt and Qt applications do not excpect. // calles, which Qt and Qt applications do not excpect.
if (!m_platformWindow->m_inSetGeometry) if (!m_platformWindow->m_inSetGeometry)
QWindowSystemInterface::flushWindowSystemEvents(); QWindowSystemInterface::flushWindowSystemEvents();
else else if (isResize)
m_backingStore = 0; m_backingStore = 0;
} }
} }
@ -1412,6 +1414,8 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
m_scrolling = false; m_scrolling = false;
} else if (phase == NSEventPhaseNone && momentumPhase == NSEventPhaseNone) { } else if (phase == NSEventPhaseNone && momentumPhase == NSEventPhaseNone) {
ph = Qt::NoScrollPhase; ph = Qt::NoScrollPhase;
if (!QGuiApplicationPrivate::scrollNoPhaseAllowed)
ph = Qt::ScrollUpdate;
} }
// "isInverted": natural OS X scrolling, inverted from the Qt/other platform/Jens perspective. // "isInverted": natural OS X scrolling, inverted from the Qt/other platform/Jens perspective.
bool isInverted = [theEvent isDirectionInvertedFromDevice]; bool isInverted = [theEvent isDirectionInvertedFromDevice];

View File

@ -1,10 +1,5 @@
TARGET = qdirect2d TARGET = qdirect2d
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QWindowsDirect2DIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
load(qt_plugin)
QT *= core-private QT *= core-private
QT *= gui-private QT *= gui-private
QT *= platformsupport-private QT *= platformsupport-private
@ -40,3 +35,8 @@ HEADERS += \
qwindowsdirect2dwindow.h qwindowsdirect2dwindow.h
OTHER_FILES += direct2d.json OTHER_FILES += direct2d.json
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QWindowsDirect2DIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
load(qt_plugin)

View File

@ -1,10 +1,5 @@
TARGET = qdirectfb TARGET = qdirectfb
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QDirectFbIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
load(qt_plugin)
QT += core-private gui-private platformsupport-private QT += core-private gui-private platformsupport-private
LIBS += $$QMAKE_LIBS_DIRECTFB LIBS += $$QMAKE_LIBS_DIRECTFB
@ -51,3 +46,8 @@ contains(QT_CONFIG, directfb_egl) {
CONFIG += qpa/genericunixfontdatabase CONFIG += qpa/genericunixfontdatabase
OTHER_FILES += directfb.json OTHER_FILES += directfb.json
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QDirectFbIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qeglfs-brcm-integration TARGET = qeglfs-brcm-integration
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSBrcmIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../.. INCLUDEPATH += $$PWD/../..
@ -21,3 +17,7 @@ SOURCES += $$PWD/qeglfsbrcmmain.cpp \
HEADERS += $$PWD/qeglfsbrcmintegration.h HEADERS += $$PWD/qeglfsbrcmintegration.h
OTHER_FILES += $$PWD/eglfs_brcm.json OTHER_FILES += $$PWD/eglfs_brcm.json
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSBrcmIntegrationPlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qeglfs-kms-integration TARGET = qeglfs-kms-integration
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSKmsIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../.. INCLUDEPATH += $$PWD/../..
@ -29,3 +25,7 @@ HEADERS += $$PWD/qeglfskmsintegration.h \
$$PWD/qeglfskmscursor.h $$PWD/qeglfskmscursor.h
OTHER_FILES += $$PWD/eglfs_kms.json OTHER_FILES += $$PWD/eglfs_kms.json
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSKmsIntegrationPlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qeglfs-kms-egldevice-integration TARGET = qeglfs-kms-egldevice-integration
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSKmsEglDeviceIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../.. INCLUDEPATH += $$PWD/../..
@ -21,3 +17,7 @@ HEADERS += $$PWD/qeglfskmsegldeviceintegration.h
OTHER_FILES += $$PWD/eglfs_kms_egldevice.json OTHER_FILES += $$PWD/eglfs_kms_egldevice.json
LIBS += -ldrm LIBS += -ldrm
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSKmsEglDeviceIntegrationPlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qeglfs-mali-integration TARGET = qeglfs-mali-integration
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSMaliIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private QT += core-private gui-private platformsupport-private eglfs_device_lib-private
# Avoid X11 header collision # Avoid X11 header collision
@ -19,3 +15,7 @@ SOURCES += $$PWD/qeglfsmalimain.cpp \
HEADERS += $$PWD/qeglfsmaliintegration.h HEADERS += $$PWD/qeglfsmaliintegration.h
OTHER_FILES += $$PWD/eglfs_mali.json OTHER_FILES += $$PWD/eglfs_mali.json
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSMaliIntegrationPlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qeglfs-viv-integration TARGET = qeglfs-viv-integration
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSVivIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../.. INCLUDEPATH += $$PWD/../..
@ -18,3 +14,7 @@ SOURCES += $$PWD/qeglfsvivmain.cpp \
HEADERS += $$PWD/qeglfsvivintegration.h HEADERS += $$PWD/qeglfsvivintegration.h
OTHER_FILES += $$PWD/eglfs_viv.json OTHER_FILES += $$PWD/eglfs_viv.json
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSVivIntegrationPlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qeglfs-viv-wl-integration TARGET = qeglfs-viv-wl-integration
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSVivWaylandIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../.. INCLUDEPATH += $$PWD/../..
@ -21,3 +17,7 @@ OTHER_FILES += $$PWD/eglfs_viv_wl.json
CONFIG += link_pkgconfig CONFIG += link_pkgconfig
PKGCONFIG_PRIVATE += wayland-server PKGCONFIG_PRIVATE += wayland-server
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSVivWaylandIntegrationPlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qeglfs-x11-integration TARGET = qeglfs-x11-integration
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSX11IntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private QT += core-private gui-private platformsupport-private eglfs_device_lib-private
# Avoid X11 header collision # Avoid X11 header collision
@ -21,3 +17,7 @@ SOURCES += $$PWD/qeglfsx11main.cpp \
HEADERS += $$PWD/qeglfsx11integration.h HEADERS += $$PWD/qeglfsx11integration.h
OTHER_FILES += $$PWD/eglfs_x11.json OTHER_FILES += $$PWD/eglfs_x11.json
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSX11IntegrationPlugin
load(qt_plugin)

View File

@ -1,12 +1,12 @@
TARGET = qeglfs TARGET = qeglfs
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QEglFSIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
load(qt_plugin)
QT += platformsupport-private eglfs_device_lib-private QT += platformsupport-private eglfs_device_lib-private
SOURCES += $$PWD/qeglfsmain.cpp SOURCES += $$PWD/qeglfsmain.cpp
OTHER_FILES += $$PWD/eglfs.json OTHER_FILES += $$PWD/eglfs.json
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QEglFSIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
load(qt_plugin)

View File

@ -6,8 +6,6 @@
TARGET = QtEglDeviceIntegration TARGET = QtEglDeviceIntegration
CONFIG += no_module_headers internal_module CONFIG += no_module_headers internal_module
load(qt_module)
QT += core-private gui-private platformsupport-private QT += core-private gui-private platformsupport-private
LIBS += $$QMAKE_LIBS_DYNLOAD LIBS += $$QMAKE_LIBS_DYNLOAD
@ -52,3 +50,5 @@ INCLUDEPATH += $$PWD
CONFIG += egl qpa/genericunixfontdatabase CONFIG += egl qpa/genericunixfontdatabase
!contains(DEFINES, QT_NO_CURSOR): RESOURCES += $$PWD/cursor.qrc !contains(DEFINES, QT_NO_CURSOR): RESOURCES += $$PWD/cursor.qrc
load(qt_module)

Some files were not shown because too many files have changed in this diff Show More