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>
#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"
#endif

View File

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

View File

@ -58,7 +58,6 @@
#include <tchar.h>
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#ifdef QT_LARGEFILE_SUPPORT
#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++1z: cxxstd = CXX1Z
else: c++14: cxxstd = CXX14
else: cxxstd = CXX11
# Disable special compiler flags for host builds
!host_build|!cross_compile {
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
!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
}
} 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}
contains(ver, "(4\\.[6789]|5\\..)") {
contains(ver, "(4\\.[6789]|[5-9]\\..)") {
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

View File

@ -42,8 +42,11 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
module_libs = "\$\$QT_MODULE_HOST_LIB_BASE"
else: \
module_libs = "\$\$QT_MODULE_LIB_BASE"
!isEmpty(QT_PRIVATE): \
module_rundep = "QT.$${MODULE_ID}.run_depends = $$replace(QT_PRIVATE, -private$, _private)"
# In addition to the library's private deps, the private module's deps
# 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: \
module_rundep =
module_build_type = v2

View File

@ -6,13 +6,16 @@ have_target {
# qt_build_config tells us to re-enable exceptions here.
testcase_exceptions: CONFIG += exceptions
check.files =
check.path = .
benchmark: type = benchmark
else: type = check
$${type}.files =
$${type}.path = .
# Add environment for non-installed builds. Do this first, so the
# 'make' variable expansions don't end up in a batch file/script.
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.
TESTRUN_CWD = $$DESTDIR
@ -27,44 +30,44 @@ debug_and_release:debug_and_release_target {
}
# Allow for a custom test runner script
check.commands += $(TESTRUNNER)
$${type}.commands += $(TESTRUNNER)
unix {
isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = .
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: \
check.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET)
$${type}.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET)
} else {
# Windows
!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
check.commands += $(TESTARGS)
$${type}.commands += $(TESTARGS)
!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
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 {
check.depends = first
$${type}.depends = first
} else {
# For exclusive builds, only run the test once.
check.CONFIG = recursive
check.target = check_all
check.recurse_target = check
check.commands =
$${type}.CONFIG = recursive
$${type}.target = $${type}_all
$${type}.recurse_target = $${type}
$${type}.commands =
check_first.depends = $$eval($$first(BUILDS).target)-check
check_first.target = check
QMAKE_EXTRA_TARGETS += check_first
$${type}_first.depends = $$eval($$first(BUILDS).target)-$${type}
$${type}_first.target = $${type}
QMAKE_EXTRA_TARGETS += $${type}_first
}
!no_testcase_installs:!contains(INSTALLS, target) {

View File

@ -7,3 +7,13 @@
check.depends = first # `make check' implies build
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)));
if(!ret.isEmpty())
ret += "\n\t";
ret += "-$(INSTALL_FILE) " + escapeFilePath(src) + ' ' + dst;
ret += "-$(INSTALL_FILE) " + escapeFilePath(Option::fixPathToTargetOS(src, false)) + ' ' + dst;
if(!uninst.isEmpty())
uninst.append("\n\t");
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 >> 16);
*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;
}

View File

@ -7,8 +7,12 @@ CONFIG += \
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_OT HB_NO_UNICODE_FUNCS HB_DISABLE_DEPRECATED
DEFINES += HB_NO_UNICODE_FUNCS HB_DISABLE_DEPRECATED
# platform/compiler specific definitions
DEFINES += HAVE_ATEXIT
@ -78,57 +82,59 @@ HEADERS += \
$$PWD/src/hb-unicode.h \
$$PWD/src/hb-version.h
# Open Type
SOURCES += \
$$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
contains(SHAPERS, opentype) {
DEFINES += HAVE_OT
HEADERS += \
$$PWD/src/hb-ot-layout-common-private.hh \
$$PWD/src/hb-ot-layout-gdef-table.hh \
$$PWD/src/hb-ot-layout-gpos-table.hh \
$$PWD/src/hb-ot-layout-gsubgpos-private.hh \
$$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
SOURCES += \
$$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 += \
$$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
HEADERS += \
$$PWD/src/hb-ot-layout-common-private.hh \
$$PWD/src/hb-ot-layout-gdef-table.hh \
$$PWD/src/hb-ot-layout-gpos-table.hh \
$$PWD/src/hb-ot-layout-gsubgpos-private.hh \
$$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 {
# Apple Advanced Typography
HEADERS += \
$$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
SOURCES += \

View File

@ -7,8 +7,6 @@ win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000
QMAKE_DOCS = $$PWD/doc/qtconcurrent.qdocconf
load(qt_module)
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
SOURCES += \
@ -41,3 +39,5 @@ HEADERS += \
contains(QT_CONFIG, clock-gettime) {
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
CONFIG += $$MODULE_CONFIG
DEFINES += $$MODULE_DEFINES
DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x67000000
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
freebsd: QMAKE_LFLAGS_NOUNDEF =
load(qt_module)
load(qfeatures)
include(animation/animation.pri)
@ -58,8 +58,6 @@ mac|darwin {
LIBS_PRIVATE += -framework CoreFoundation
LIBS_PRIVATE += -framework Foundation
}
win32:DEFINES-=QT_NO_CAST_TO_ASCII
DEFINES += $$MODULE_DEFINES
QMAKE_LIBS += $$QMAKE_LIBS_CORE
@ -76,6 +74,11 @@ qt_conf.variable = QT_CONFIG
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.output = $$DESTDIR/cmake/Qt5Core/Qt5CTestMacros.cmake
ctest_macros_file.CONFIG = verbatim

View File

@ -251,7 +251,8 @@
This example illustrates that objects can work together without needing to
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
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

View File

@ -1191,7 +1191,7 @@ static void slog2_default_handler(QtMsgType msgType, const char *message)
buffer_config.buffer_set_name = __progname;
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].num_pages = 8;

View File

@ -131,6 +131,9 @@
# if defined(WINCE) || defined(_WIN32_WCE)
# define Q_OS_WINCE
# 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
# define Q_OS_WINPHONE
# define Q_OS_WINRT

View File

@ -45,22 +45,14 @@
#pragma qt_sync_stop_processing
#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)
// mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation
#ifndef WINVER
# define WINVER 0x501
#endif
# ifndef WINVER
# define WINVER 0x501
# endif
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0501
# endif
#endif
#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 "qfilesystemengine_p.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, QProcess::ExitStatus exitStatus);
#if QT_DEPRECATED_SINCE(5,6)
QT_MOC_COMPAT void error(QProcess::ProcessError error);
void error(QProcess::ProcessError error);
#endif
void errorOccurred(QProcess::ProcessError error);
void stateChanged(QProcess::ProcessState state, QPrivateSignal);

View File

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

View File

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

View File

@ -151,6 +151,13 @@ public:
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<unsigned short> qle_ushort;
@ -402,7 +409,7 @@ public:
// pack with itself, we'll discard the high part anyway
chunk = _mm_packus_epi16(chunk, chunk);
// unaligned 64-bit store
*(quint64*)&l[i] = _mm_cvtsi128_si64(chunk);
qUnalignedStore(l + i, _mm_cvtsi128_si64(chunk));
i += 8;
}
# endif

View File

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

View File

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

View File

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

View File

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

View File

@ -325,6 +325,11 @@ private:
friend class QGraphicsView;
friend class QGraphicsScene;
friend class QGraphicsScenePrivate;
// from QtTest:
friend class QSpontaneKeyEvent;
// needs this:
Q_ALWAYS_INLINE
void setSpontaneous() { spont = true; }
};
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
#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 */
#define Q_OBJECT \
public: \
@ -169,10 +175,11 @@ public: \
virtual const QMetaObject *metaObject() const; \
virtual void *qt_metacast(const char *); \
virtual int qt_metacall(QMetaObject::Call, int, void **); \
QT_WARNING_POP \
QT_TR_FUNCTIONS \
private: \
Q_OBJECT_NO_ATTRIBUTES_WARNING \
Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
QT_WARNING_POP \
struct QPrivateSignal {};
/* qmake ignore Q_OBJECT */
@ -186,7 +193,11 @@ public: \
void qt_check_for_QGADGET_macro(); \
typedef void QtGadgetHelper; \
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
#else // Q_MOC_RUN

View File

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

View File

@ -597,9 +597,8 @@ void QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data)
const QStringRef name = xml.attributes().value(QLatin1String("type"));
if (name.isEmpty())
continue;
if (name != data.name) {
if (name.compare(data.name, Qt::CaseInsensitive))
qWarning() << "Got name" << name << "in file" << file << "expected" << data.name;
}
while (xml.readNextStartElement()) {
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_p.h"
#include "qthreadstorage.h"

View File

@ -43,24 +43,20 @@ SOURCES += thread/qatomic.cpp \
thread/qthreadpool.cpp \
thread/qthreadstorage.cpp
unix:SOURCES += thread/qthread_unix.cpp \
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.
win32 {
SOURCES += \
thread/qmutex_linux.cpp \
thread/qmutex_mac.cpp \
thread/qmutex_unix.cpp \
thread/qmutex_win.cpp
thread/qmutex_win.cpp \
thread/qthread_win.cpp \
thread/qwaitcondition_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;
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;
p -= 8;
len = e - p;
if (len & 4) {
h = _mm_crc32_u32(h, *reinterpret_cast<const uint *>(p));
h = _mm_crc32_u32(h, qUnalignedLoad<uint>(p));
p += 4;
}
# else
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;
len = e - p;
# endif
if (len & 2) {
h = _mm_crc32_u16(h, *reinterpret_cast<const ushort *>(p));
h = _mm_crc32_u16(h, qUnalignedLoad<ushort>(p));
p += 2;
}
if (sizeof(Char) == 1 && len & 1)

View File

@ -747,4 +747,26 @@ void qDumpCPUFeatures()
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

View File

@ -521,6 +521,32 @@ unsigned _bit_scan_forward(unsigned val)
#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)
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
#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)
if (uc + offset + 7 < e) {
// 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 ucdata = _mm_loadu_si128((const __m128i*)(uc + offset));
@ -6177,11 +6177,7 @@ QString QString::vasprintf(const char *cformat, va_list ap)
}
case 'p': {
void *arg = va_arg(ap, void*);
#ifdef Q_OS_WIN64
quint64 i = reinterpret_cast<quint64>(arg);
#else
quint64 i = reinterpret_cast<unsigned long>(arg);
#endif
const quint64 i = reinterpret_cast<quintptr>(arg);
flags |= QLocaleData::Alternate;
subst = QLocaleData::c()->unsLongLongToString(i, precision, 16, width, flags);
++c;

View File

@ -25,8 +25,6 @@ win32 {
QMAKE_DOCS = $$PWD/doc/qtdbus.qdocconf
load(qt_module)
PUB_HEADERS = qdbusargument.h \
qdbusconnectioninterface.h \
qdbusmacros.h \
@ -91,3 +89,5 @@ SOURCES += qdbusconnection.cpp \
qdbusservicewatcher.cpp \
qdbusunixfiledescriptor.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
}
load(qt_module)
# Code coverage with TestCocoon
# 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
@ -50,6 +48,7 @@ include(itemmodels/itemmodels.pri)
QMAKE_LIBS += $$QMAKE_LIBS_GUI
load(qt_module)
load(cmake_functions)
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 = qSmoothScaleImage(src, w, h);
copyMetadata(src.d, d);
if (!src.isNull())
copyMetadata(src.d, d);
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),
ph(Qt::NoScrollPhase), src(Qt::MouseEventNotSynthesized), invertedScrolling(false)
{
if (!QGuiApplicationPrivate::scrollNoPhaseAllowed)
ph = Qt::ScrollUpdate;
g = QCursor::pos();
if (orient == Qt::Vertical)
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),
ph(Qt::NoScrollPhase), src(Qt::MouseEventNotSynthesized), invertedScrolling(false)
{
if (!QGuiApplicationPrivate::scrollNoPhaseAllowed)
ph = Qt::ScrollUpdate;
if (orient == Qt::Vertical)
angleD = QPoint(0, delta);
else
@ -832,7 +836,10 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
: QInputEvent(Wheel, modifiers), p(pos), g(globalPos), pixelD(pixelDelta),
angleD(angleDelta), qt4D(qt4Delta), qt4O(qt4Orientation), mouseState(buttons), ph(Qt::NoScrollPhase),
src(Qt::MouseEventNotSynthesized), invertedScrolling(false)
{}
{
if (!QGuiApplicationPrivate::scrollNoPhaseAllowed)
ph = Qt::ScrollUpdate;
}
/*!
Constructs a wheel event object.

View File

@ -199,6 +199,9 @@ bool QGuiApplicationPrivate::obey_desktop_settings = true;
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;
extern void qRegisterGuiVariant();
@ -587,7 +590,7 @@ QGuiApplication::QGuiApplication(int &argc, char **argv, int flags)
QGuiApplication::QGuiApplication(QGuiApplicationPrivate &p)
: QCoreApplication(p)
{
d_func()->init(); }
}
/*!
Destructs the application.
@ -1300,6 +1303,8 @@ void QGuiApplicationPrivate::eventDispatcherReady()
void QGuiApplicationPrivate::init()
{
QCoreApplicationPrivate::init();
QCoreApplicationPrivate::is_app_running = false; // Starting up.
bool loadTestability = false;
@ -1453,6 +1458,8 @@ void QGuiApplicationPrivate::init()
if (layout_direction == Qt::LayoutDirectionAuto || force_reverse)
QGuiApplication::setLayoutDirection(qt_detectRTLLanguage() ? Qt::RightToLeft : Qt::LeftToRight);
scrollNoPhaseAllowed = qEnvironmentVariableIsSet("QT_ENABLE_MOUSE_WHEEL_TRACKING");
}
extern void qt_cleanupFontDatabase();

View File

@ -81,6 +81,8 @@ public:
QGuiApplicationPrivate(int &argc, char **argv, int flags);
~QGuiApplicationPrivate();
void init();
void createPlatformIntegration();
void createEventDispatcher() Q_DECL_OVERRIDE;
void eventDispatcherReady() Q_DECL_OVERRIDE;
@ -300,6 +302,9 @@ public:
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:
virtual void notifyThemeChanged();
bool tryCloseRemainingWindows(QWindowList processedWindows);
@ -310,8 +315,6 @@ protected:
private:
friend class QDragManager;
void init();
static QGuiApplicationPrivate *self;
static QTouchDevice *m_fakeTouchDevice;
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,
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
// 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.
@ -865,7 +868,9 @@ Q_GUI_EXPORT void qt_handleMouseEvent(QWindow *w, const QPointF &local, const QP
{
bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowSystemEvents;
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);
}
@ -914,36 +919,14 @@ Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int
#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,
const QList<QTouchEvent::TouchPoint> &points,
Qt::KeyboardModifiers mods = Qt::NoModifier)
{
bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowSystemEvents;
QWindowSystemInterface::setSynchronousWindowSystemEvents(true);
QWindowSystemInterface::handleTouchEvent(w, device, touchPointList(points), mods);
QWindowSystemInterface::handleTouchEvent(w, device,
QWindowSystemInterfacePrivate::toNativeTouchPoints(points, w), mods);
QWindowSystemInterface::setSynchronousWindowSystemEvents(wasSynchronous);
}
@ -958,5 +941,13 @@ bool QWindowSystemEventHandler::sendEvent(QWindowSystemInterfacePrivate::WindowS
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

View File

@ -242,8 +242,7 @@ public:
class WheelEvent : public InputEvent {
public:
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)
: InputEvent(w, time, Wheel, mods), pixelDelta(pixelD), angleDelta(angleD), qt4Delta(qt4D), qt4Orientation(qt4O), localPos(local), globalPos(global), phase(phase), source(src), inverted(inverted) { }
Qt::KeyboardModifiers mods, Qt::ScrollPhase phase = Qt::NoScrollPhase, Qt::MouseEventSource src = Qt::MouseEventNotSynthesized, bool inverted = false);
QPoint pixelDelta;
QPoint angleDelta;
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())
return;
int lastx = stroker->spans[stroker->current_span-1].x + stroker->spans[stroker->current_span-1].len ;
int lasty = stroker->spans[stroker->current_span-1].y;
if (stroker->current_span > 0) {
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)) {
stroker->blend(stroker->current_span, stroker->spans, &stroker->state->penData);
stroker->current_span = 0;
if (stroker->current_span == QCosmeticStroker::NSPANS || y < lasty || (y == lasty && x < lastx)) {
stroker->blend(stroker->current_span, stroker->spans, &stroker->state->penData);
stroker->current_span = 0;
}
}
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,
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);
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,
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);
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,
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);
return buffer;
}

View File

@ -949,40 +949,37 @@ QRect QPageLayout::paintRectPixels(int resolution) const
QDebug operator<<(QDebug dbg, const QPageLayout &layout)
{
QDebugStateSaver saver(dbg);
dbg.nospace();
dbg.noquote();
dbg << "QPageLayout(";
if (layout.isValid()) {
QString output = QStringLiteral("QPageLayout(%1, %2, l:%3 r:%4 t:%5 b:%6 %7)");
QString units;
const QMarginsF margins = layout.margins();
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()) {
case QPageLayout::Millimeter:
units = QStringLiteral("mm");
dbg << "mm";
break;
case QPageLayout::Point:
units = QStringLiteral("pt");
dbg << "pt";
break;
case QPageLayout::Inch:
units = QStringLiteral("in");
dbg << "in";
break;
case QPageLayout::Pica:
units = QStringLiteral("pc");
dbg << "pc";
break;
case QPageLayout::Didot:
units = QStringLiteral("DD");
dbg << "DD";
break;
case QPageLayout::Cicero:
units = QStringLiteral("CC");
dbg << "CC";
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;
}
#endif

View File

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

View File

@ -258,8 +258,6 @@ class SegmentTree
public:
SegmentTree(QPathSegments &segments);
QRectF boundingRect() const;
void produceIntersections(int segment);
private:
@ -310,12 +308,6 @@ SegmentTree::SegmentTree(QPathSegments &segments)
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)
{
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) {
glyph_buffer_size = pitch * info.height;
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) {
FT_Bitmap bitmap;

View File

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

View File

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

View File

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

View File

@ -11,13 +11,8 @@ DEFINES += QT_NO_USING_NAMESPACE
#DEFINES += QUDPSOCKET_DEBUG QUDPSERVER_DEBUG
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x64000000
MODULE_PLUGIN_TYPES = \
bearer
QMAKE_DOCS = $$PWD/doc/qtnetwork.qdocconf
load(qt_module)
include(access/access.pri)
include(bearer/bearer.pri)
include(kernel/kernel.pri)
@ -36,3 +31,7 @@ MODULE_PLUGIN_TYPES = \
bearer
ANDROID_PERMISSIONS += \
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;
}
Q_ASSERT(d->socketEngine);
do {
if (state() != ConnectedState)
return false;
bool readyToRead = false;
bool readyToWrite = false;
if (!d->socketEngine->waitForReadOrWrite(&readyToRead, &readyToWrite, true, !d->writeBuffer.isEmpty(),
@ -2203,9 +2205,6 @@ bool QAbstractSocket::waitForReadyRead(int msecs)
if (readyToWrite)
d->canWriteNotification();
if (state() != ConnectedState)
return false;
} while (msecs == -1 || qt_subtract_from_timeout(msecs, stopWatch.elapsed()) > 0);
return false;
}

View File

@ -8,8 +8,6 @@ irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
QMAKE_DOCS = $$PWD/doc/qtopengl.qdocconf
load(qt_module)
contains(QT_CONFIG, opengl):CONFIG += opengl
contains(QT_CONFIG, opengles2):CONFIG += opengles2
@ -53,3 +51,5 @@ SOURCES += qglshaderprogram.cpp \
gl2paintengineex/qpaintengineex_opengl2.cpp \
gl2paintengineex/qglcustomshaderstage.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, opengles2):CONFIG += opengles2
load(qt_module)
DEFINES += QT_NO_CAST_FROM_ASCII
PRECOMPILED_HEADER =
HEADERS = qopenglextensions.h
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 += \
$$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();
bool useXftConf = (services && (services->desktopEnvironment() == "GNOME" || services->desktopEnvironment() == "UNITY"));
if (useXftConf) {
if (useXftConf && !forcedAntialiasSetting) {
void *antialiasResource =
QGuiApplication::platformNativeInterface()->nativeResourceForScreen("antialiasingEnabled",
QGuiApplication::primaryScreen());

View File

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

View File

@ -538,9 +538,16 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
it.next();
Contact &contact(it.value());
int key = m_typeB ? it.key() : contact.trackingId;
if (!m_contacts.contains(key)) {
contact.state = Qt::TouchPointReleased;
addTouchPoint(contact, &combinedStates);
if (m_typeB) {
if (contact.trackingId != m_contacts[key].trackingId && contact.state) {
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
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QAndroidBearerEnginePlugin
load(qt_plugin)
QT = core-private network-private
HEADERS += qandroidbearerengine.h \
@ -15,3 +9,9 @@ HEADERS += qandroidbearerengine.h \
SOURCES += main.cpp \
qandroidbearerengine.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
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QConnmanEnginePlugin
load(qt_plugin)
QT = core network-private dbus
CONFIG += link_pkgconfig
@ -21,3 +17,6 @@ SOURCES += main.cpp \
OTHER_FILES += connman.json
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QConnmanEnginePlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
TARGET = qcorewlanbearer
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QCoreWlanEnginePlugin
load(qt_plugin)
QT = core-private network-private
LIBS += -framework Foundation -framework SystemConfiguration
@ -21,3 +17,7 @@ SOURCES += main.cpp \
OBJECTIVE_SOURCES += qcorewlanengine.mm
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();
CWInterface *currentInterface = [CWInterface interfaceWithName: QCFString::toNSString(interfaceName)];
mutex.unlock();
const bool currentInterfaceServiceActive = currentInterface.serviceActive;
if (currentInterface.powerOn) {
NSError *err = nil;
@ -178,7 +179,7 @@ void QScanThread::run()
QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
bool known = isKnownSsid(networkSsid);
if (currentInterface.serviceActive) {
if (currentInterfaceServiceActive) {
if( networkSsid == QCFString::toQString( [currentInterface ssid])) {
state = QNetworkConfiguration::Active;
}
@ -221,7 +222,7 @@ void QScanThread::run()
interfaceName = ij.value();
}
if (currentInterface.serviceActive) {
if (currentInterfaceServiceActive) {
if( networkSsid == QCFString::toQString([currentInterface ssid])) {
state = QNetworkConfiguration::Active;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,5 @@
TARGET = composeplatforminputcontextplugin
PLUGIN_TYPE = platforminputcontexts
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QComposePlatformInputContextPlugin
load(qt_plugin)
QT += core-private gui-private
DEFINES += X11_PREFIX='\\"$$QMAKE_X11_PREFIX\\"'
@ -27,3 +22,8 @@ contains(QT_CONFIG, xkbcommon-qt): {
}
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
PLUGIN_TYPE = platforminputcontexts
PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QIbusPlatformInputContextPlugin
load(qt_plugin)
QT += dbus gui-private
SOURCES += $$PWD/qibusplatforminputcontext.cpp \
$$PWD/qibusproxy.cpp \
@ -18,3 +13,8 @@ HEADERS += $$PWD/qibusplatforminputcontext.h \
$$PWD/qibustypes.h
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
PLUGIN_TYPE = platforms
# STATICPLUGIN needed because there's a Q_IMPORT_PLUGIN in androidjnimain.cpp
# Yes, the plugin imports itself statically
DEFINES += QT_STATICPLUGIN
load(qt_plugin)
LIBS += -ljnigraphics -landroid
QT += core-private gui-private platformsupport-private
@ -79,6 +75,9 @@ HEADERS += $$PWD/qandroidplatformintegration.h \
android-style-assets: SOURCES += $$PWD/extract.cpp
else: SOURCES += $$PWD/extract-dummy.cpp
PLUGIN_TYPE = platforms
load(qt_plugin)
#Non-standard install directory, QTBUG-29859
DESTDIR = $$DESTDIR/android
target.path = $${target.path}/android

View File

@ -1,10 +1,5 @@
TARGET = qcocoa
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QCocoaIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
load(qt_plugin)
OBJECTIVE_SOURCES += main.mm \
qcocoaintegration.mm \
qcocoatheme.mm \
@ -112,3 +107,8 @@ OTHER_FILES += cocoa.json
# Window debug support
#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::GroupBoxPalette, kThemeTextColorPlacardActive, kThemeTextColorPlacardInactive),
QMacPaletteMap(QPlatformTheme::MenuPalette, kThemeTextColorMenuItemActive, kThemeTextColorMenuItemDisabled),
QMacPaletteMap(QPlatformTheme::MenuBarPalette, kThemeTextColorMenuItemActive, kThemeTextColorMenuItemDisabled),
//### TODO: The zeros below gives white-on-black text.
QMacPaletteMap(QPlatformTheme::TextEditPalette, 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::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));
qc = qt_mac_colorForThemeTextColor(kThemeTextColorMenuItemActive);
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())
return;
const bool isResize = geometry.size() != m_platformWindow->geometry().size();
// It can happen that self.window is nil (if we are changing
// styleMask from/to borderless and content view is being re-parented)
// - this results in an invalid coordinates.
@ -390,7 +392,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
// calles, which Qt and Qt applications do not excpect.
if (!m_platformWindow->m_inSetGeometry)
QWindowSystemInterface::flushWindowSystemEvents();
else
else if (isResize)
m_backingStore = 0;
}
}
@ -1412,6 +1414,8 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
m_scrolling = false;
} else if (phase == NSEventPhaseNone && momentumPhase == NSEventPhaseNone) {
ph = Qt::NoScrollPhase;
if (!QGuiApplicationPrivate::scrollNoPhaseAllowed)
ph = Qt::ScrollUpdate;
}
// "isInverted": natural OS X scrolling, inverted from the Qt/other platform/Jens perspective.
bool isInverted = [theEvent isDirectionInvertedFromDevice];

View File

@ -1,10 +1,5 @@
TARGET = qdirect2d
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QWindowsDirect2DIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
load(qt_plugin)
QT *= core-private
QT *= gui-private
QT *= platformsupport-private
@ -40,3 +35,8 @@ HEADERS += \
qwindowsdirect2dwindow.h
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
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
LIBS += $$QMAKE_LIBS_DIRECTFB
@ -51,3 +46,8 @@ contains(QT_CONFIG, directfb_egl) {
CONFIG += qpa/genericunixfontdatabase
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
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSBrcmIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../..
@ -21,3 +17,7 @@ SOURCES += $$PWD/qeglfsbrcmmain.cpp \
HEADERS += $$PWD/qeglfsbrcmintegration.h
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
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSKmsIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../..
@ -29,3 +25,7 @@ HEADERS += $$PWD/qeglfskmsintegration.h \
$$PWD/qeglfskmscursor.h
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
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSKmsEglDeviceIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../..
@ -21,3 +17,7 @@ HEADERS += $$PWD/qeglfskmsegldeviceintegration.h
OTHER_FILES += $$PWD/eglfs_kms_egldevice.json
LIBS += -ldrm
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSKmsEglDeviceIntegrationPlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
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
# Avoid X11 header collision
@ -19,3 +15,7 @@ SOURCES += $$PWD/qeglfsmalimain.cpp \
HEADERS += $$PWD/qeglfsmaliintegration.h
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
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSVivIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../..
@ -18,3 +14,7 @@ SOURCES += $$PWD/qeglfsvivmain.cpp \
HEADERS += $$PWD/qeglfsvivintegration.h
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
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSVivWaylandIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../..
@ -21,3 +17,7 @@ OTHER_FILES += $$PWD/eglfs_viv_wl.json
CONFIG += link_pkgconfig
PKGCONFIG_PRIVATE += wayland-server
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSVivWaylandIntegrationPlugin
load(qt_plugin)

View File

@ -1,9 +1,5 @@
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
# Avoid X11 header collision
@ -21,3 +17,7 @@ SOURCES += $$PWD/qeglfsx11main.cpp \
HEADERS += $$PWD/qeglfsx11integration.h
OTHER_FILES += $$PWD/eglfs_x11.json
PLUGIN_TYPE = egldeviceintegrations
PLUGIN_CLASS_NAME = QEglFSX11IntegrationPlugin
load(qt_plugin)

View File

@ -1,12 +1,12 @@
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
SOURCES += $$PWD/qeglfsmain.cpp
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
CONFIG += no_module_headers internal_module
load(qt_module)
QT += core-private gui-private platformsupport-private
LIBS += $$QMAKE_LIBS_DYNLOAD
@ -52,3 +50,5 @@ INCLUDEPATH += $$PWD
CONFIG += egl qpa/genericunixfontdatabase
!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