mirror of https://github.com/qt/qtbase.git
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
This commit is contained in:
commit
0aa2d318b1
|
@ -40,7 +40,7 @@
|
|||
#include <utility>
|
||||
#if defined(__clang__)
|
||||
# if __has_feature(cxx_generalized_initializers)
|
||||
// On Mac OS X, the libstdc++ headers don't include <initializer_list>
|
||||
// On OS X, the libstdc++ headers don't include <initializer_list>
|
||||
// This #include here forces a failure unless we're using libc++
|
||||
# include <initializer_list>
|
||||
# endif
|
||||
|
|
|
@ -2697,6 +2697,8 @@ MacOS/iOS options:
|
|||
link tools against those frameworks.
|
||||
-no-framework ...... Do not build Qt as a series of frameworks.
|
||||
|
||||
-secure-transport .. Use SecureTransport instead of OpenSSL (requires -no-openssl)
|
||||
|
||||
-sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. The argument should be
|
||||
one of the available SDKs as listed by 'xcodebuild -showsdks'.
|
||||
Note that the argument applies only to Qt libraries and applications built
|
||||
|
@ -2963,11 +2965,21 @@ if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ];
|
|||
EditionString="Technology Preview"
|
||||
elif [ $COMMERCIAL_USER = "yes" ]; then
|
||||
if [ $UNAME_SYSTEM = "Linux" ]; then
|
||||
if file -L /bin/sh | grep -q "64-bit" ; then
|
||||
Licheck=licheck64
|
||||
else
|
||||
case "$PLATFORM" in
|
||||
*-32)
|
||||
Licheck=licheck32
|
||||
fi
|
||||
;;
|
||||
*-64)
|
||||
Licheck=licheck64
|
||||
;;
|
||||
*)
|
||||
if file -L /bin/sh | grep -q "64-bit" ; then
|
||||
Licheck=licheck64
|
||||
else
|
||||
Licheck=licheck32
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
elif [ $UNAME_SYSTEM = "Darwin" ]; then
|
||||
Licheck=licheck_mac
|
||||
else
|
||||
|
|
|
@ -0,0 +1,619 @@
|
|||
Qt 5.5 introduces many new features and improvements as well as bugfixes
|
||||
over the 5.4.x series. For more details, refer to the online documentation
|
||||
included in this distribution. The documentation is also available online:
|
||||
|
||||
http://doc.qt.io/qt-5.5
|
||||
|
||||
The Qt version 5.5 series is binary compatible with the 5.4.x series.
|
||||
Applications compiled for 5.4 will continue to run with 5.5.
|
||||
|
||||
Some of the changes listed in this file include issue tracking numbers
|
||||
corresponding to tasks in the Qt Bug Tracker:
|
||||
|
||||
http://bugreports.qt.io/
|
||||
|
||||
Each of these identifiers can be entered in the bug tracker to obtain more
|
||||
information about a particular change.
|
||||
|
||||
****************************************************************************
|
||||
* Deprecation Notice *
|
||||
****************************************************************************
|
||||
|
||||
- Support for the following platforms or toolchains is deprecated in Qt
|
||||
5.5 and will be removed as of Qt 5.6:
|
||||
* Apple OS X builds using GNU libstdc++
|
||||
* BlackBerry 10
|
||||
* QNX 6.5
|
||||
|
||||
The following platforms or toolchains are deprecated and will be
|
||||
removed as of Qt 5.7:
|
||||
* Apple OS X 10.7 (Lion)
|
||||
* GNU Compiler Collection (GCC) versions 4.6 and earlier
|
||||
* Microsoft Visual Studio compiler versions 2008 and 2010
|
||||
* Microsoft Windows XP, Windows Vista
|
||||
* Microsoft Windows Embedded Compact 7
|
||||
|
||||
Deprecated platforms and toolchains continue to work until removed.
|
||||
|
||||
- The QtWebKit and QtQuick1 modules and support for the QML 1 language
|
||||
are deprecated and Qt 5.5 will be the last release to include
|
||||
them. Starting with Qt 5.6, the source code for those modules will
|
||||
not be included in Qt's packaging. Compiling the 5.5 release of
|
||||
QtWebKit modules along with Qt 5.6 or future versions should
|
||||
work. QtQuick1 is not guaranteed to work in future versions after
|
||||
Qt 5.6.
|
||||
|
||||
- The QtScript module is deprecated and will be removed from Qt's
|
||||
packaging starting with version 5.7. The 5.5 and 5.6 releases of
|
||||
QtScript should continue to work along with Qt 5.7 and future
|
||||
versions.
|
||||
|
||||
- [QTBUG-25121] The usage of the QStyleOptionProgressBar::orientation
|
||||
member has been deprecated.
|
||||
|
||||
- QLibraryInfo::buildDate() was deprecated and will return a constant
|
||||
date now.
|
||||
|
||||
****************************************************************************
|
||||
* Future Direction Notice *
|
||||
****************************************************************************
|
||||
|
||||
- In Qt 6, QCoreApplication::notify() will not be called for events being
|
||||
delivered to objects outside the main thread. The reason for that is
|
||||
that the main application object may begin destruction while those
|
||||
threads are still delivering events, which is undefined behavior.
|
||||
Applications that currently override notify() and use that function
|
||||
outside the main thread are advised to find other solutions in the mean
|
||||
time.
|
||||
|
||||
- Qt 5.7 will begin requiring certain C++11 features in order to
|
||||
compile. The minimum compiler versions for that release will be:
|
||||
* Clang 3.2 (included in XCode 5.0)
|
||||
* GCC 4.7
|
||||
* Intel C++ Composer XE 2013 SP1 (compiler version 14.0)
|
||||
* Microsoft Visual Studio 2012 (compiler version 17.0)
|
||||
|
||||
****************************************************************************
|
||||
* Important Behavior Changes *
|
||||
****************************************************************************
|
||||
|
||||
- Q_ASSERT will now expand the condition even in release mode when asserts
|
||||
are disabled, albeit in an unreachable code path. This solves compiler
|
||||
warnings about variables and functions that were unused in release mode
|
||||
because they were only used in assertions. Unfortunately, codebases that
|
||||
hid those functions and variables via #ifndef will need to remove the
|
||||
conditionals to compile with Qt 5.5.
|
||||
- QDBusConnection::sender() (deprecated since Qt 4.3) has changed to
|
||||
always return an invalid QDBusConnection. To know what connection the
|
||||
incoming call was received from, use QDBusContext.
|
||||
- QHostAddress will no longer convert IPv6 addresses of type "v4-mapped"
|
||||
to IPv4. To perform this conversion manually, construct another
|
||||
QHostAddress with the result of toIPv4Address().
|
||||
- (DY)LD_LIBRARY_PATH will no longer "stick" in the process environment
|
||||
when starting a QProcess. This means that if a QProcess is started with
|
||||
a clear environment, it will not specially inherit (DY)LD_LIBRARY_PATH
|
||||
from the parent process. This should not affect most applications, but
|
||||
if the old behavior is desired, one can simply pass a clear
|
||||
QProcessEnvironment with the (DY)LD_LIBRARY_PATH values added, to the
|
||||
QProcess.
|
||||
- QAbstractTableModel and QAbstractListModel now reimplement sibling()
|
||||
to avoid calling parent() (which returns a constant). Subclasses of
|
||||
these models that override parent(), will likely also need to
|
||||
override sibling() now.
|
||||
- Qt 5.5 received some header #include cleanups. Code that relied on indirect
|
||||
includes from Qt headers may need to include some headers explicitly now.
|
||||
For example, qstringlist.h no longer includes QDataStream and QObject.
|
||||
|
||||
- QCoreApplication:
|
||||
* [QTBUG-30330][QTSOLBUG-184] On Windows, QCoreApplication::arguments()
|
||||
now returns a list built from argv on Windows as well if a modified
|
||||
argv was passed to the class' constructor.
|
||||
|
||||
- QIODevice:
|
||||
* Opening Android assets with QIODevice::ReadWrite now returns false to
|
||||
correctly indicate that the files are not writable.
|
||||
|
||||
- QItemDelegate:
|
||||
* [QTBUG-3305] QItemDelegate will now not close a
|
||||
QTextEdit/QPlainTextEdit editor when the tab key is pressed; instead,
|
||||
the key will reach the editor.
|
||||
|
||||
- QProgressDialog:
|
||||
* [QTBUG-17427][QTBUG-25316] The timer for estimating the duration of
|
||||
the progress dialog is now started in the constructor and in
|
||||
setValue(minimum()), as well as when calling setValue(0), as
|
||||
previously documented.
|
||||
|
||||
- QSaveFile:
|
||||
* [QTBUG-44086] Files created by QSaveFile do now have the same
|
||||
rights as files created by QFile. This also fixes a regression in
|
||||
QSettings: In the Qt 5.4 series, new files created by QSettings
|
||||
were only readable by the current user.
|
||||
|
||||
- QVariant:
|
||||
* [QTBUG-42722] QVariant now obeys the C++ type promotion rules when
|
||||
comparing numeric types (integrals, float and double), including the
|
||||
fact that unsigned comparisons are preferred for types of the same
|
||||
rank (that is, now QVariant(-1) > QVariant(0U)).
|
||||
|
||||
- QWindow:
|
||||
* QWindows will no longer be re-shown automatically when moved from a
|
||||
destroyed QScreen, unless that QScreen was a virtual sibling of the
|
||||
primary screen.
|
||||
|
||||
- qmake:
|
||||
* For commercial builds, qmake now checks for a valid Qt license. This
|
||||
requires setting up a Qt Account (or .qt-license file) on the
|
||||
development machine.
|
||||
* Qt configure and qmake used with a MinGW spec will no longer emulate
|
||||
MSVC by picking up the INCLUDE and LIB environment variables. Use the
|
||||
-I/-L configure options to pass additional paths, as you would under
|
||||
Unix.
|
||||
* A lot of quoting issues have been fixed. As a side effect, qmake
|
||||
has become more sensitive to over-quoted file names in project
|
||||
files.
|
||||
* qmake is now stricter about syntax errors in project files.
|
||||
|
||||
****************************************************************************
|
||||
* Library *
|
||||
****************************************************************************
|
||||
|
||||
QtCore
|
||||
------
|
||||
|
||||
- Added qEnvironmentVariableIntValue().
|
||||
- Added Q_DECL_RELAXED_CONSTEXPR for the corresponding C++14 feature
|
||||
- Added qHashRange() and qHashRangeCommutative() functions to aid
|
||||
implementing qHash() overloads for custom types.
|
||||
- Q_ENUMS and Q_FLAGS have been deprecated, and replaced by Q_ENUM and
|
||||
Q_FLAG macros. These two new macros automatically register the enum with
|
||||
the Qt metatype system, allowing automatic conversion to or from string
|
||||
in QVariant, or to show the strings by QDebug operators. They also
|
||||
enable the new QMetaEnum::fromType function.
|
||||
- QPersistentModel index becomes an built-in meta-type, including QVariant
|
||||
support.
|
||||
- Updated Unicode data to v.7.0
|
||||
- Updated QLocale data to CLDR v.27
|
||||
- Updated QTimeZone data to CLDR v.27
|
||||
|
||||
- Item Models:
|
||||
* QItemSelectionModel can now be created without a model and have one
|
||||
set later.
|
||||
|
||||
- Logging:
|
||||
* QtInfoMsg got added as a new QtMsgType. Use the new qInfo(), qCInfo()
|
||||
macros to log to it.
|
||||
|
||||
- Logging framework:
|
||||
* %{threadid} now prints the real thread ID. On Linux, OS X, iOS,
|
||||
FreeBSD and Windows, the value is unique system-wide. On other
|
||||
systems, it will print something that may be process-specific (the
|
||||
value of pthread_self(3)). To print the pointer to QThread::current(),
|
||||
use %{qthreadptr}.
|
||||
|
||||
- moc
|
||||
* Classes annotated with Q_GADGET can now have Q_PROPERTY and Q_INVOKABLE
|
||||
functions. QMetaProperty::{read,write}OnGadget and
|
||||
QMetaMethod::invokeOnGadget can be used with those.
|
||||
|
||||
- Objective-C:
|
||||
* [QTBUG-37116] Added NSDate/CDateRef converters for QDateTime
|
||||
|
||||
- QAssociativeIterable:
|
||||
* Added find().
|
||||
|
||||
- QCommandLineParser:
|
||||
* Message boxes are used to display errors and usage if no console
|
||||
window can be obtained on Windows.
|
||||
|
||||
- QDebug:
|
||||
* Printing of QStrings and QStringRefs whenever "noquote" is not active
|
||||
now prints the strings in a format that can be copied back to C++
|
||||
code. All characters that aren't printable in US-ASCII are escaped
|
||||
(this includes printable Unicode characters outside of US-ASCII).
|
||||
Pretty-printing will not respect QTextFormat padding or field widths.
|
||||
* Similarly, printing of QByteArrays whenever "noquote" is not active now
|
||||
prints the arrays in a format consumable in C++, with all non-printable
|
||||
characters printed in hex escape sequences.
|
||||
|
||||
- QJsonObject:
|
||||
* Added conversion to and from QVariantHash
|
||||
|
||||
- QLibrary:
|
||||
* Added DeepBindHint which maps to RTLD_DEEPBIND on Linux making it
|
||||
possible to load libraries with external symbols that clash with
|
||||
already loaded ones, such as plugins linked to Qt4.
|
||||
|
||||
- QLockFile:
|
||||
* [QTBUG-45497] Detection of stale lock files got more robust and takes
|
||||
the name of the process that belongs to the stored PID into account.
|
||||
|
||||
- QRegularExpression:
|
||||
* Support for matching using QStringRef as the subject's string type has
|
||||
been added.
|
||||
|
||||
- QSet:
|
||||
* Can now be used as the key in QSet and QHash.
|
||||
|
||||
- QSortFilterProxyModel:
|
||||
* [QTBUG-35440] QSortFilterProxyModel now properly forwards the roles
|
||||
that have been changed when the source model emits dataChanged().
|
||||
|
||||
- QStandardPaths:
|
||||
* [QTBUG-38872][QTBUG-38845] Added QStandardPaths::AppConfigLocation,
|
||||
for application-specific configuration directory. ConfigLocation was
|
||||
inconsistent.
|
||||
|
||||
- QString:
|
||||
* Added support for retrieving the QRegularExpressionMatch to indexOf
|
||||
and lastIndexOf.
|
||||
* Added QT_RESTRICTED_CAST_FROM_ASCII macro as less intrusive
|
||||
alternative to QT_NO_CAST_FROM_ASCII.
|
||||
* Added methods for convenient conversion to and from std::u16string and
|
||||
std::u32string.
|
||||
* Added asprintf(), vasprintf().
|
||||
|
||||
- QThreadPool:
|
||||
* Added QThreadPool::cancel() which allows removing from the job queue a
|
||||
job that hasn't been started yet.
|
||||
|
||||
- QTimeZone:
|
||||
* Added methods systemTimeZone() and utc() that return QTimeZone objects
|
||||
for the system time zone and for UTC, respectively.
|
||||
|
||||
- QVector:
|
||||
* Added QVector::append(const QVector &) overload
|
||||
|
||||
- QVector3D:
|
||||
* Added convenience project and unproject methods to use like gluProject
|
||||
and gluUnproject
|
||||
|
||||
- QtMath:
|
||||
* qmath.h no longer includes math.h, so any sources depending on that
|
||||
indirect inclusion may fail to build.
|
||||
|
||||
- State Machine:
|
||||
* Added support for internal transitions.
|
||||
* [QTBUG-40293] Added an addTransition() overload that takes a
|
||||
pointer-to-member for the signal triggering the transition.
|
||||
* [QTBUG-44963] Fixed an issue where a history state restore would
|
||||
activate too many states, possibly putting the state machine in an
|
||||
invalid state.
|
||||
* QTBUG-44783] Fixed an issue where the state machine could end up in
|
||||
an invalid state when transitions from a parallel state were not
|
||||
checked for conflicts.
|
||||
* Fixed a case where a parallel state was not exited and re-entered
|
||||
when one of its substates was exited and subsequently re-entered.
|
||||
* Fixed the non-deterministic behavior of picking a transition from a
|
||||
set of conflicting transitions.
|
||||
|
||||
QtDBus
|
||||
------
|
||||
|
||||
- Added annotation org.qtproject.QtDBus.MethodName to allow
|
||||
autogenerating C++ methods with different names to the original DBus
|
||||
method
|
||||
|
||||
QtGui
|
||||
-----
|
||||
|
||||
- Added support for device-specific backend plugins in eglfs.
|
||||
- eglfs is now using fullscreen mode also when running on X11.
|
||||
- Added a plugin to get mouse, keyboard and touch events via libinput.
|
||||
- The linuxfb platform plugin's input device handling is now compatible
|
||||
with eglfs. The evdev keyboard, mouse and touch code is compiled in by
|
||||
default.
|
||||
- The mouse cursor on Embedded Linux is now handling hotplugging correctly
|
||||
with eglfs and linuxfb regardless of how the input handling code is
|
||||
loaded (via a generic plugin or built in to the platform plugin).
|
||||
- QOffscreenSurface is now relying on EGL_KHR_surfaceless_context when
|
||||
available, and avoids creating a pbuffer surface when the extension is
|
||||
present.
|
||||
- initializeOpenGLFunctions() no longer needs to be called when querying a
|
||||
versioned function wrapper object via QOpenGLContext::versionFunctions().
|
||||
- Added version function classes for OpenGL 4.4 and 4.5 and deprecate some
|
||||
erroneously classified functions.
|
||||
- Exposed TabFocusBehavior in QStyleHints
|
||||
- [QTBUG-42240][QTBUG-43263] Qt now contains a built-in GPU driver
|
||||
blacklist for Windows that disables the usage of desktop OpenGL with
|
||||
some older cards that are known to be unstable with opengl32.dll.
|
||||
- [QTBUG-44937] Support for QScreen::grabWindow() is now available on
|
||||
embedded platforms (eglfs, linuxfb).
|
||||
- Added QStyleHints::singleClickActivation to access whether the platform
|
||||
expects item activation to occur on single clicks rather than double
|
||||
clicks.
|
||||
- [QTBUG-40034] QOpenGLWidget and QQuickWidget are now supported on iOS.
|
||||
|
||||
- Accessibility:
|
||||
* [QTBUG-44479] Qt now reports text attributes correctly on Linux, so
|
||||
ORCA+F now works properly in QTextEdit and other text controls.
|
||||
|
||||
- Accessibility / OS X:
|
||||
* QTextEdit now properly reports to accessibility visual lines
|
||||
(softlines) as lines, instead of whole paragraphs. This allows better
|
||||
VoiceOver user experience when reading text line by line using arrows
|
||||
up/down.
|
||||
* Visual bounds returned by QTextEdit were singificantly improved; this
|
||||
enables VoiceOver to draw properly positioned VoiceOver cursor.
|
||||
|
||||
- Image plugins:
|
||||
* [QTBUG-37946][QTBUG-43563][QTBUG-45552][QTBUG-45865] An option has
|
||||
been added to QImageReader to enable automatic application of EXIF
|
||||
orientation. This behavior was default in Qt 5.4.1, but reverted in Qt
|
||||
5.4.2.
|
||||
|
||||
- QFontDatabase:
|
||||
* Added QFontDatabase::isPrivateFamily()
|
||||
|
||||
- QImage:
|
||||
* Added support for grayscale and alpha 8-bit formats which can also be
|
||||
rendered to.
|
||||
|
||||
- QPainter:
|
||||
* [QTBUG-35830] QPainter will no longer try to replace IntersectClip
|
||||
with ReplaceClip if the paint engine is a QPicture.
|
||||
|
||||
- QPlatformSurfaceEvent:
|
||||
* [QTBUG-42476][QTBUG-42483] Added event class QPlatformSurfaceEvent,
|
||||
which is sent to QWindow and QOffscreenSurface when native surface is
|
||||
created or about to be destroyed.
|
||||
|
||||
- QQuaternion:
|
||||
* Added methods to convert a quaternion to/from Euler angles and to/from
|
||||
rotation matrix.
|
||||
|
||||
- QScreen:
|
||||
* Added devicePixelRatio property.
|
||||
|
||||
- QTextDocument:
|
||||
* Support for searching with a QRegularExpression in a document has been
|
||||
added.
|
||||
|
||||
- QWheelEvent:
|
||||
* On OSX, trackpad wheel event phase transitions now occur in the order
|
||||
ScrollBegin, ScrollUpdate, ..., ScrollEnd, ScrollUpdate, ...,
|
||||
ScrollEnd, where the second batch of updates represents momentum
|
||||
events (inertial scrolling).
|
||||
|
||||
- QWindow:
|
||||
* [QTBUG-32956] lastWindowClosed will now be emitted even if
|
||||
quitOnLastWindowClosed is not set.
|
||||
|
||||
- Windows:
|
||||
* [QTBUG-43263] Introduced experimental feature allowing the user to
|
||||
specify a GPU driver buglist with some additional keywords to chooose
|
||||
the GL renderer backend depending on GPU.
|
||||
|
||||
- i18n:
|
||||
* [QTBUG-43447] Fixed bug where layout direction did not switch
|
||||
according to the instruction in the translation file.
|
||||
|
||||
- Text:
|
||||
* [QTBUG-39286] Fixed position of underline on centered text when the
|
||||
text layout's width is an even number.
|
||||
|
||||
QtNetwork
|
||||
---------
|
||||
|
||||
- [QTBUG-26295] Introduced libproxy backend for Unix platforms, enabled
|
||||
automatically if the required dev package is present
|
||||
- As some legacy ifdefs for OpenSSL 0.9.7 and 0.9.8f were removed, Qt
|
||||
will no longer build with these versions. In addition, there is no
|
||||
longer support for an OpenSSL library built with NO_TLSEXT.
|
||||
- [QTBUG-26538] Fixed a bug that caused both QTcpSocket and QUdpSocket to
|
||||
close the socket and lose any bound ports before connecting. Now
|
||||
bind()/setSocketDescriptor() followed by connect() will retain the
|
||||
original file descriptor.
|
||||
|
||||
- QLocalSocket:
|
||||
* [QTBUG-16688] On Windows, waitForReadyRead now always waits for more
|
||||
data, even if bytes are still in the buffer.
|
||||
|
||||
- QNetworkAccessManager:
|
||||
* It is now possible to use TLS PSK ciphersuites when using HTTPS (or
|
||||
similar protocols working over SSL).
|
||||
|
||||
- QSslSocket:
|
||||
* [QTBUG-39077] It is now possible to use TLS PSK ciphersuites in client
|
||||
sockets.
|
||||
* A new SSL backend for iOS and OS X, implemented with Apple's Secure
|
||||
Transport (Security Framework).
|
||||
|
||||
- SSL/TLS support:
|
||||
* [QTBUG-18972] It is now possible to parse elliptic curve certificates.
|
||||
* It is now possible to choose which elliptic curves should be used by
|
||||
an elliptic curve cipher.
|
||||
|
||||
QtTest
|
||||
------
|
||||
|
||||
- QCOMPARE now pretty-prints QSizePolicy{,::Policy,::ControlType{,s}}.
|
||||
- QtTest now prints an escaped version of QByteArrays that failed to
|
||||
compare with QCOMPARE, instead of the hex dump.
|
||||
- QTest::toString() can now be overloaded (instead of just specialized)
|
||||
for custom types, and is now reliably found through argument-dependent
|
||||
lookup (ADL).
|
||||
|
||||
QtWidgets
|
||||
---------
|
||||
|
||||
- Added QPlainTextEdit::createStandardContextMenu(QPoint) overload that
|
||||
takes the position in document coordinates. This method enables the
|
||||
actions that are sensitive to the given position eg. where the user
|
||||
clicked.
|
||||
|
||||
- Accessibility / OS X:
|
||||
* VoiceOver users of QTextEdit can now use mouse and touch exploration
|
||||
on trackpad to point at text to have spoken to them.
|
||||
|
||||
- Layouts:
|
||||
* [QTBUG-43099] Fixed a bug where spans sometimes didn't distribute
|
||||
themselves to the last cells they covered.
|
||||
|
||||
- QAbstractItemView:
|
||||
* Added iconSizeChanged signal.
|
||||
|
||||
- QAbstractScrollArea:
|
||||
* [QTBUG-8315] A getter for the viewport margins has been added.
|
||||
|
||||
- QComboBox:
|
||||
* A QComboBox does not reset itself any more when setting the same model
|
||||
more than once.
|
||||
* [QTBUG-43350] QComboBox will now reset its root model index when a new
|
||||
model is set on it.
|
||||
|
||||
- QHeaderView:
|
||||
* [QTBUG-21201] Auto-scroll the view when making extended row/column
|
||||
selections.
|
||||
* Default section size is now style-dependent by default.
|
||||
* Added resetDefaultSectionSize().
|
||||
|
||||
- QMenu:
|
||||
* [QTBUG-20094] QMenu now pick up how "sloppy" submenus behave from the
|
||||
style.
|
||||
|
||||
- QOpenGLWidget:
|
||||
* [QTBUG-40717] Added an UpdateBehavior flag to QOpenGLWidget and
|
||||
enabled support for NoParitalUpdate for QOpenGLWidget. NoPartialUpdate
|
||||
is the default update behavior for QOpenGLWidget.
|
||||
|
||||
- QSizePolicy:
|
||||
* QSizePolicy::ControlTypes is now introspectable through QSizePolicy's
|
||||
meta object.
|
||||
|
||||
- QToolButton:
|
||||
* [QTBUG-23396] Fixed the double removal of ampersands.
|
||||
|
||||
- QTreeWidget:
|
||||
* [QTBUG-40060] Restored Qt 5.1 behavior of QTreeWidgetItems with
|
||||
ItemIsTristate to enable automatic management of the check state.
|
||||
User-editable tristate checkboxes are now enabled by setting the new
|
||||
flag ItemIsUserTristate.
|
||||
|
||||
****************************************************************************
|
||||
* Platform Specific Changes *
|
||||
****************************************************************************
|
||||
|
||||
- Removed BlackBerry PlayBook support.
|
||||
|
||||
Android
|
||||
-------
|
||||
|
||||
- [QTBUG-43705] Fixed canonical path for nonexistent paths on some
|
||||
devices.
|
||||
- [QTBUG-38700] On devices with translucent system UI, Qt's windows are now
|
||||
positioned to avoid overlapping it. This behavior can be
|
||||
overridden in the application's AndroidManifest.xml.
|
||||
- [QTBUG-45430] Fixed a bug that caused applications not to be resumable
|
||||
after user changed language in system settings.
|
||||
|
||||
- QtCore / QTimeZone:
|
||||
* [QTBUG-35908] Android timezones are now available in QTimeZone.
|
||||
|
||||
- QtWidgets:
|
||||
* Enable QDockWidget window decorations.
|
||||
|
||||
- The QtDBus module is now disabled by default.
|
||||
|
||||
- Added support for arm64-v8a, x86_64, and mips64 with gcc 4.9.
|
||||
|
||||
OS X
|
||||
----
|
||||
|
||||
- [QTBUG-43999] QApplication::setWindowIcon now changes the icon for the
|
||||
application in the dock.
|
||||
|
||||
- Text:
|
||||
* [QTBUG-44708] Fixed appending text with a different writing system and
|
||||
formatting to a latin ligature.
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
- QMimeData:
|
||||
* [QTBUG-17373] Added support for handling dropping of multiple mail
|
||||
attachments, adding ;index=N to the mimetype string
|
||||
application/x-qt-windows-mime;value="FileContents"
|
||||
|
||||
- Text:
|
||||
* [QTBUG-44501] Fixed design metrics for text
|
||||
|
||||
X11/XCB
|
||||
-------
|
||||
|
||||
- GLX and EGL code paths are now dynamically resolved, making it possible
|
||||
for one build of a plugin to use both code paths. The default is to use
|
||||
the GLX code path if available. This can be overridden by specifying
|
||||
QT_XCB_GL_INTEGRATION=xcb_egl as an environment variable. Enable the
|
||||
logging category qt.xcb.glintegration.debug to get debug log output of
|
||||
what integration is used.
|
||||
- [QTBUG-31762] QSystemTrayIcon now uses StatusNotifier D-Bus protocol
|
||||
when the desktop environment supports it
|
||||
- [QTBUG-40174][QTBUG-42985] If all QScreens (xcb outputs) are
|
||||
disconnected while an application is running,
|
||||
QGuiApplication::primaryScreen() will now return null until a screen is
|
||||
connected again.
|
||||
|
||||
****************************************************************************
|
||||
* Compiler Specific Changes *
|
||||
****************************************************************************
|
||||
|
||||
- Qt 5.5 now unconditionally uses the "using" keyword. Compilers that do
|
||||
not support this keyword are deprecated and will not be able to build
|
||||
Qt. Previous versions of Qt may or may not compile, as no testing was
|
||||
done to ensure it worked.
|
||||
- Visual Studio: -Zm200 (an option to specify the precompiled header
|
||||
memory allocation limit) is not added anymore by qmake to the compiler
|
||||
calls. If you encounter an C1076 compiler error you might need to re-add
|
||||
it in your .pro file.
|
||||
|
||||
****************************************************************************
|
||||
* Tools *
|
||||
****************************************************************************
|
||||
|
||||
configure & build system
|
||||
------------------------
|
||||
|
||||
- Added support for VS2015.
|
||||
- [QTBUG-31814][OS X/iOS] Qt is now built with a relative RPATH.
|
||||
- [VS2012+] Qt is now always built with C++11 with these compilers.
|
||||
- [Windows] Added -static-runtime option.
|
||||
- Added support for GCC/Clang -fsanitize= options.
|
||||
- Enabled tslib autodetection by default.
|
||||
- Added configure-time check for IPC support.
|
||||
- [QTBUG-44690][QNX] Fixed NEON detection when cross-compiling on Windows.
|
||||
- On-device compilation should work better on RaspPi and some other
|
||||
devices now (use linux-g++ mkspec).
|
||||
- configure -redo and config.status support spaces in arguments now.
|
||||
- Qt can be now built in and installed to directories with spaces.
|
||||
Note that source directories with spaces are still not supported.
|
||||
|
||||
qmake
|
||||
-----
|
||||
|
||||
- [QTBUG-3069][Linux] Building with -rpath will now create DT_RUNPATH tags
|
||||
instead of DT_RPATH, allowing LD_LIBRARY_PATH to override the rpath.
|
||||
- [QTBUG-41917][VS] Fixed project generation when PRECOMPILED_SOURCE is
|
||||
in a different directory than PRECOMPILED_HEADER.
|
||||
- [QTBUG-42454][MinGW] Added handling of QMAKE_MANIFEST.
|
||||
- [QTBUG-13496][MSVC] CONFIG+=no_batch is now automatically added when
|
||||
multiple sources with the same base name exist.
|
||||
- Added $$[QT_INSTALL_PREFIX/dev], etc. properties which reflect the
|
||||
on-device locations of Qt (the -prefix, etc. passed to configure).
|
||||
- Building under MSys is less problematic now.
|
||||
- [QTBUG-37269] Fixed cross-compilation for Unix on Windows/MinGW.
|
||||
- [QTBUG-8202][QTBUG-20566][QTBUG-44685] Fixed distclean targets.
|
||||
- [QTBUG-43162][VS] Added DISTFILES support for Visual Studio projects.
|
||||
- [QTBUG-41753][VS][WinPhone] Fixed MdilXapCompile deployment step.
|
||||
- [QTBUG-44960][VS] Reworked .dll deployment. Added $$QMAKE_DLL_PATHS.
|
||||
- [QTBUG-44823][MSVC] Fixed unreasonable values being passed in /VERSION.
|
||||
Added $$VERSION_PE_HEADER to override the value.
|
||||
- [WinRT] The icon handling was reworked/extended.
|
||||
- [QTBUG-12711] Fixed infinite recursion on malformed .prl files.
|
||||
|
||||
****************************************************************************
|
||||
* Third-party libraries *
|
||||
****************************************************************************
|
||||
|
||||
- [QTBUG-44815][QTBUG-37660][QTBUG-44694][QTBUG-42443] ANGLE was updated
|
||||
to Chromium branch 2356 (2.1~99f075dade7c).
|
|
@ -42,15 +42,16 @@ manifestmeta.highlighted.names = "QtQuick/Qt Quick Demo - Same Game" \
|
|||
"QtQuick/Qt Quick Demo - StocQt" \
|
||||
"QtQuick/Qt Quick Demo - Clocks" \
|
||||
"QtQuick/Qt Quick Examples - Shader Effects" \
|
||||
"QtQuick/Qt Quick Examples - Text" \
|
||||
"QtQuick/Qt Quick Examples - Window and Screen" \
|
||||
"QtQuickExtras/Qt Quick Extras - Dashboard" \
|
||||
"QtQuickExtras/Qt Quick Extras - Gallery" \
|
||||
"QtQuickControls/Qt Quick Controls - Gallery" \
|
||||
"QtQuickControls/Qt Quick Controls - Text Editor Example" \
|
||||
"QtQuickControls/Qt Quick Controls - Table View Example" \
|
||||
"QtQuickControls/Qt Quick Controls - Calendar Example" \
|
||||
"QtQuickDialogs/Qt Quick System Dialog Examples" \
|
||||
"QtWidgets/Application Example" \
|
||||
"QtWinExtras/Quick Player"
|
||||
"QtWinExtras/Quick Player" \
|
||||
"QtMultimedia/QML Video Shader Effects Example" \
|
||||
"QtCanvas3D/Planets Example"
|
||||
|
||||
manifestmeta.highlighted.attributes = isHighlighted:true
|
||||
|
||||
|
@ -269,12 +270,9 @@ manifestmeta.thumbnail.names = "QtCore/Contiguous Cache Example" \
|
|||
"QtWidgets/Event Transitions Example" \
|
||||
"QtWidgets/Two-way Button Example" \
|
||||
"QtWidgets/Validators Example" \
|
||||
"ActiveQt/*" \
|
||||
"QtDbus/*" \
|
||||
"QtHelp/*" \
|
||||
"QtMultimedia/AudioEngine Example" \
|
||||
"QtMultimedia/Declarative Radio Example" \
|
||||
"QtMultimediaWidgets/Media Player Example" \
|
||||
"QtQml/Extending QML*" \
|
||||
"QtQuick/Qt Quick Examples - Accessibility" \
|
||||
"QtSensors/Qt Sensors - SensorGesture QML Type example" \
|
||||
|
|
|
@ -3,4 +3,4 @@ requires(qtHaveModule(widgets))
|
|||
TEMPLATE = subdirs
|
||||
# no QSharedMemory
|
||||
!vxworks:SUBDIRS = sharedmemory
|
||||
!wince*:qtHaveModule(network): SUBDIRS += localfortuneserver localfortuneclient
|
||||
!wince:qtHaveModule(network): SUBDIRS += localfortuneserver localfortuneclient
|
||||
|
|
|
@ -12,8 +12,8 @@ FORMS = bearermonitor_240_320.ui \
|
|||
bearermonitor_640_480.ui \
|
||||
sessionwidget.ui
|
||||
|
||||
win32:!wince*:LIBS += -lws2_32
|
||||
wince*:LIBS += -lws2
|
||||
win32:!wince: LIBS += -lws2_32
|
||||
wince: LIBS += -lws2
|
||||
|
||||
CONFIG += console
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ qtHaveModule(widgets) {
|
|||
2dpainting \
|
||||
hellogl2
|
||||
|
||||
!wince*: SUBDIRS += qopenglwidget \
|
||||
cube \
|
||||
textures
|
||||
!wince: SUBDIRS += \
|
||||
qopenglwidget \
|
||||
cube \
|
||||
textures
|
||||
}
|
||||
|
|
|
@ -6,4 +6,4 @@ HEADERS += imagescaling.h
|
|||
target.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/imagescaling
|
||||
INSTALLS += target
|
||||
|
||||
wince*: DEPLOYMENT_PLUGIN += qgif qjpeg
|
||||
wince: DEPLOYMENT_PLUGIN += qgif qjpeg
|
||||
|
|
|
@ -12,7 +12,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/sql/books
|
|||
INSTALLS += target
|
||||
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
CONFIG(debug, debug|release):sqlPlugins.files = $$QT_BUILD_TREE/plugins/sqldrivers/*d4.dll
|
||||
CONFIG(release, debug|release):sqlPlugins.files = $$QT_BUILD_TREE/plugins/sqldrivers/*[^d]4.dll
|
||||
sqlPlugins.path = sqldrivers
|
||||
|
|
|
@ -8,9 +8,9 @@ SUBDIRS = books \
|
|||
relationaltablemodel \
|
||||
sqlwidgetmapper
|
||||
|
||||
!wince*: SUBDIRS += masterdetail
|
||||
!wince: SUBDIRS += masterdetail
|
||||
|
||||
!wince*: SUBDIRS += \
|
||||
!wince: SUBDIRS += \
|
||||
querymodel \
|
||||
tablemodel
|
||||
|
||||
|
|
|
@ -17,6 +17,6 @@ target.path = $$[QT_INSTALL_EXAMPLES]/sql/sqlbrowser
|
|||
INSTALLS += target
|
||||
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
DEPLOYMENT_PLUGIN += qsqlite
|
||||
}
|
||||
|
|
|
@ -7,6 +7,6 @@ QT += sql widgets
|
|||
target.path = $$[QT_INSTALL_EXAMPLES]/sql/sqlwidgetmapper
|
||||
INSTALLS += target
|
||||
|
||||
wince*: DEPLOYMENT_PLUGIN += qsqlite
|
||||
wince: DEPLOYMENT_PLUGIN += qsqlite
|
||||
|
||||
|
||||
|
|
|
@ -5,10 +5,13 @@ SUBDIRS = classwizard \
|
|||
tabdialog \
|
||||
trivialwizard
|
||||
|
||||
!wince*: SUBDIRS += licensewizard \
|
||||
extension \
|
||||
findfiles
|
||||
!wince {
|
||||
SUBDIRS += \
|
||||
licensewizard \
|
||||
extension \
|
||||
findfiles
|
||||
}
|
||||
|
||||
!qtHaveModule(printsupport): SUBDIRS -= licensewizard
|
||||
contains(DEFINES, QT_NO_WIZARD): SUBDIRS -= trivialwizard licensewizard classwizard
|
||||
wince*: SUBDIRS += sipdialog
|
||||
wince: SUBDIRS += sipdialog
|
||||
|
|
|
@ -232,7 +232,7 @@
|
|||
|
||||
Just before we create the \uicontrol{Help} menu, we call
|
||||
QMenuBar::addSeparator(). This has no effect for most widget
|
||||
styles (e.g., Windows and Mac OS X styles), but for some
|
||||
styles (e.g., Windows and OS X styles), but for some
|
||||
styles this makes sure that \uicontrol{Help} is pushed to the right
|
||||
side of the menu bar.
|
||||
|
||||
|
@ -258,7 +258,7 @@
|
|||
load the user's preferences and other application settings. The
|
||||
QSettings class provides a high-level interface for storing
|
||||
settings permanently on disk. On Windows, it uses the (in)famous
|
||||
Windows registry; on Mac OS X, it uses the native XML-based
|
||||
Windows registry; on OS X, it uses the native XML-based
|
||||
CFPreferences API; on Unix/X11, it uses text files.
|
||||
|
||||
The QSettings constructor takes arguments that identify your
|
||||
|
@ -310,7 +310,7 @@
|
|||
|
||||
We start by opening the file in read-only mode. The QFile::Text
|
||||
flag indicates that the file is a text file, not a binary file.
|
||||
On Unix and Mac OS X, this makes no difference, but on Windows,
|
||||
On Unix and OS X, this makes no difference, but on Windows,
|
||||
it ensures that the "\\r\\n" end-of-line sequence is converted to
|
||||
"\\n" when reading.
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
\endlist
|
||||
|
||||
Although the program is just an example, if you press \uicontrol Finish
|
||||
(\uicontrol Done on Mac OS X), actual C++ source files will actually be
|
||||
(\uicontrol Done on OS X), actual C++ source files will actually be
|
||||
generated.
|
||||
|
||||
\section1 The ClassWizard Class
|
||||
|
@ -158,7 +158,7 @@
|
|||
layouts. The \c className field is created with an asterisk (\c
|
||||
*) next to its name. This makes it a \l{mandatory fields}{mandatory field}, that
|
||||
is, a field that must be filled before the user can press the
|
||||
\uicontrol Next button (\uicontrol Continue on Mac OS X). The fields' values
|
||||
\uicontrol Next button (\uicontrol Continue on OS X). The fields' values
|
||||
can be accessed from any other page using QWizardPage::field(),
|
||||
or from the wizard code using QWizard::field().
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
\snippet dialogs/licensewizard/licensewizard.cpp 4
|
||||
|
||||
We set the style to \l{QWizard::}{ModernStyle} on all platforms
|
||||
except Mac OS X,
|
||||
except OS X,
|
||||
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 5
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 6
|
||||
|
@ -160,7 +160,7 @@
|
|||
layouts. The fields are created with an asterisk (\c
|
||||
*) next to their name. This makes them \l{mandatory fields}, that
|
||||
is, fields that must be filled before the user can press the
|
||||
\uicontrol Next button (\uicontrol Continue on Mac OS X). The fields' values
|
||||
\uicontrol Next button (\uicontrol Continue on OS X). The fields' values
|
||||
can be accessed from any other page using QWizardPage::field().
|
||||
|
||||
Resetting the page amounts to clearing the two text fields.
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
subdirectory of the Plug & Paint example. On Unix, this is just a
|
||||
matter of initializing the QDir variable with
|
||||
QApplication::applicationDirPath(), the path of the executable
|
||||
file, and to do a \l{QDir::cd()}{cd()}. On Windows and Mac OS X,
|
||||
file, and to do a \l{QDir::cd()}{cd()}. On Windows and OS X,
|
||||
this file is usually located in a subdirectory, so we need to
|
||||
take this into account.
|
||||
|
||||
|
|
|
@ -5,4 +5,4 @@ SUBDIRS = draggableicons \
|
|||
fridgemagnets \
|
||||
puzzle
|
||||
|
||||
wince*: SUBDIRS -= dropsite
|
||||
wince: SUBDIRS -= dropsite
|
||||
|
|
|
@ -15,7 +15,7 @@ QMAKE_PROJECT_NAME = dndpuzzle
|
|||
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/draganddrop/puzzle
|
||||
INSTALLS += target
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
addFile.files = example.jpg
|
||||
addFile.path = .
|
||||
INSTALLS += addFile
|
||||
|
|
|
@ -25,6 +25,6 @@ RESOURCES += boxes.qrc
|
|||
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/boxes
|
||||
INSTALLS += target
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
DEPLOYMENT_PLUGIN += qjpeg
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ static const char * const message =
|
|||
"(right-click) menu.</p>"
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
"<p>On Mac OS X, the \"Black\" dock widget has been created as a "
|
||||
"<p>On OS X, the \"Black\" dock widget has been created as a "
|
||||
"<em>Drawer</em>, which is a special kind of QDockWidget.</p>"
|
||||
#endif
|
||||
;
|
||||
|
|
|
@ -17,6 +17,6 @@ RESOURCES += affine.qrc
|
|||
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/painting/affine
|
||||
INSTALLS += target
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
DEPLOYMENT_PLUGIN += qjpeg
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/widgets/richtext/syntaxhighlighter
|
|||
INSTALLS += target
|
||||
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
addFiles.files = main.cpp mainwindow.cpp
|
||||
addFiles.path = .
|
||||
INSTALLS += addFiles
|
||||
|
|
|
@ -46,7 +46,8 @@ int main(int argc, char *argv[])
|
|||
QApplication app(argc, argv);
|
||||
QWidget window;
|
||||
window.resize(320, 240);
|
||||
window.setWindowTitle(QApplication::translate("childwidget", "Child widget"));
|
||||
window.setWindowTitle
|
||||
(QApplication::translate("childwidget", "Child widget"));
|
||||
window.show();
|
||||
|
||||
//! [create, position and show]
|
||||
|
|
|
@ -17,7 +17,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/icons
|
|||
INSTALLS += target
|
||||
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
imageFiles.files = images/*
|
||||
wincewm*: {
|
||||
imageFiles.path = "/My Documents/My Pictures"
|
||||
|
|
|
@ -10,6 +10,6 @@ target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/imageviewer
|
|||
INSTALLS += target
|
||||
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
DEPLOYMENT_PLUGIN += qjpeg qgif
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/movie
|
|||
INSTALLS += target
|
||||
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
addFiles.files += *.gif
|
||||
addFiles.path = .
|
||||
INSTALLS += addFiles
|
||||
|
|
|
@ -11,7 +11,7 @@ EXAMPLE_FILES = frank.xbel jennifer.xbel
|
|||
target.path = $$[QT_INSTALL_EXAMPLES]/xml/dombookmarks
|
||||
INSTALLS += target
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
addFiles.files = frank.xbel jennifer.xbel
|
||||
addFiles.path = "\\My Documents"
|
||||
INSTALLS += addFiles
|
||||
|
|
|
@ -6,7 +6,7 @@ RESOURCES = resources.qrc
|
|||
|
||||
win32: CONFIG += console
|
||||
|
||||
wince*:{
|
||||
wince {
|
||||
htmlfiles.files = *.html
|
||||
htmlfiles.path = .
|
||||
INSTALLS += htmlfiles
|
||||
|
|
|
@ -13,7 +13,7 @@ EXAMPLE_FILES = frank.xbel jennifer.xbel
|
|||
target.path = $$[QT_INSTALL_EXAMPLES]/xml/saxbookmarks
|
||||
INSTALLS += target
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
addFiles.files = frank.xbel jennifer.xbel
|
||||
addFiles.path = "\\My Documents"
|
||||
INSTALLS += addFiles
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
QMAKE_IOS_CFLAGS += -fvisibility=hidden -fpascal-strings -fmessage-length=0
|
||||
QMAKE_IOS_CFLAGS += -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion
|
||||
QMAKE_IOS_CXXFLAGS += -fvisibility-inlines-hidden
|
||||
QMAKE_IOS_OBJ_CFLAGS += -Wno-arc-abi
|
||||
|
||||
# Based on the following information, http://clang.llvm.org/doxygen/ObjCRuntime_8h_source.html,
|
||||
# we can conclude that it's safe to always pass the following flags
|
||||
|
|
|
@ -62,8 +62,11 @@ debug {
|
|||
QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE
|
||||
}
|
||||
|
||||
use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
|
||||
enable_new_dtags: QMAKE_LFLAGS += $$QMAKE_LFLAGS_NEW_DTAGS
|
||||
# disable special linker flags for host builds (no proper test for host support yet)
|
||||
!host_build {
|
||||
use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
|
||||
enable_new_dtags: QMAKE_LFLAGS += $$QMAKE_LFLAGS_NEW_DTAGS
|
||||
}
|
||||
|
||||
dll:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_DLL
|
||||
static:mac: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB
|
||||
|
|
|
@ -40,15 +40,13 @@ qt:!isEmpty(QT_CONFIG) {
|
|||
# libraries. This applies only to apps, since all loaded libraries inherit
|
||||
# rpaths from current process executable.
|
||||
else:!if(host_build:force_bootstrap):equals(TEMPLATE, app):!defined(QMAKE_RPATHDIR, var):contains(QT_CONFIG, rpath) {
|
||||
# If app is outside of Qt SDK prefix use absolute path to Qt libraries,
|
||||
# otherwise make it relative, so all SDK tools and examples work when
|
||||
# relocated.
|
||||
# Tests are an exception, since they are launched in their build not
|
||||
# install location by CI, so we cannot use relative rpaths there.
|
||||
if(!contains(target.path, "$$re_escape($$[QT_INSTALL_PREFIX])/.*")|\
|
||||
contains(target.path, "$$re_escape($$[QT_INSTALL_TESTS])/.*")) {
|
||||
QMAKE_RPATHDIR = $$[QT_INSTALL_LIBS]
|
||||
} else {
|
||||
# If app is expected to be installed into the Qt prefix build, use
|
||||
# relative path, so all SDK tools and examples work when relocated.
|
||||
prefix_build:defined(target.path, var):\
|
||||
contains(target.path, "$$re_escape($$[QT_INSTALL_PREFIX])/.*"):\
|
||||
# Tests are an exception, since they are launched in their build not
|
||||
# install location by CI, so we cannot use relative rpaths there.
|
||||
!contains(target.path, "$$re_escape($$[QT_INSTALL_TESTS])/.*") {
|
||||
app_bundle {
|
||||
ios: binpath = $$target.path/$${TARGET}.app
|
||||
else: binpath = $$target.path/$${TARGET}.app/Contents/MacOS
|
||||
|
@ -57,6 +55,9 @@ qt:!isEmpty(QT_CONFIG) {
|
|||
}
|
||||
QMAKE_RPATHDIR = @loader_path/$$relative_path($$[QT_INSTALL_LIBS], $$binpath)
|
||||
unset(binpath)
|
||||
} else {
|
||||
# Otherwise, use absolute path to Qt libraries
|
||||
QMAKE_RPATHDIR = $$[QT_INSTALL_LIBS]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,12 @@ if(win32|mac):!macx-xcode {
|
|||
}
|
||||
isEmpty(TARGETPATH): TARGETPATH = $$eval(QT.$${CXX_MODULE}.name)
|
||||
|
||||
!no_cxx_module:win32:CONFIG(shared, static|shared) {
|
||||
# Embed a VERSIONINFO resource into the plugin's DLL.
|
||||
isEmpty(VERSION): VERSION = $$MODULE_VERSION
|
||||
CONFIG += skip_target_version_ext
|
||||
}
|
||||
|
||||
# Insert the plugins URI into its meta data to enable usage
|
||||
# of static plugins in QtDeclarative:
|
||||
URI = $$replace(TARGETPATH, "/", ".")
|
||||
|
|
|
@ -67,7 +67,7 @@ qtAddModules(QT_PRIVATE, LIBS_PRIVATE)
|
|||
}
|
||||
qtAddRpathLink($$QT $$QT_PRIVATE)
|
||||
|
||||
wince*:static:gui {
|
||||
wince:static:gui {
|
||||
QTLIB += qmenu_wce.res
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ header_module {
|
|||
TEMPLATE = lib
|
||||
}
|
||||
DESTDIR = $$MODULE_BASE_OUTDIR/lib
|
||||
win32:!wince*:!prefix_build: DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
|
||||
win32:!wince:!prefix_build: DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
|
||||
|
||||
CONFIG += qmake_cache target_qt
|
||||
|
||||
|
|
|
@ -89,5 +89,5 @@ CONFIG += create_cmake
|
|||
load(qt_targets)
|
||||
load(qt_common)
|
||||
|
||||
wince*:LIBS += $$QMAKE_LIBS_GUI
|
||||
wince: LIBS += $$QMAKE_LIBS_GUI
|
||||
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
|
||||
|
|
|
@ -1408,6 +1408,10 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||
|
||||
QMap<QString, QString> settings;
|
||||
settings.insert("COPY_PHASE_STRIP", (as_release ? "YES" : "NO"));
|
||||
// Bitcode is only supported with a deployment target >= iOS 6.0.
|
||||
// Disable it for now, and consider switching it on when later
|
||||
// bumping the deployment target.
|
||||
settings.insert("ENABLE_BITCODE", "NO");
|
||||
settings.insert("GCC_GENERATE_DEBUGGING_SYMBOLS", as_release ? "NO" : "YES");
|
||||
if(!as_release)
|
||||
settings.insert("GCC_OPTIMIZATION_LEVEL", "0");
|
||||
|
|
|
@ -231,6 +231,9 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
|||
<< kitDir + QStringLiteral("/include/shared")
|
||||
<< kitDir + QStringLiteral("/include/winrt");
|
||||
}
|
||||
|
||||
binDirs << vcInstallDir + QStringLiteral("/bin");
|
||||
|
||||
// Inherit PATH
|
||||
binDirs << QString::fromLocal8Bit(qgetenv("PATH")).split(QLatin1Char(';'));
|
||||
|
||||
|
|
|
@ -2238,6 +2238,8 @@ void VCFilter::modifyPCHstage(QString str)
|
|||
CompilerTool.UsePrecompiledHeader = (isCFile ? pchNone : pchCreateUsingSpecific);
|
||||
if (isCFile)
|
||||
CompilerTool.PrecompiledHeaderThrough = QLatin1String("$(NOINHERIT)");
|
||||
else if (autogenSourceFile)
|
||||
CompilerTool.PrecompiledHeaderThrough = Project->precompHFilename;
|
||||
CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)");
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ static int idealThreadCount()
|
|||
// we don't need them all here
|
||||
int cores = 1;
|
||||
# if defined(Q_OS_BSD4)
|
||||
// FreeBSD, OpenBSD, NetBSD, BSD/OS, Mac OS X
|
||||
// FreeBSD, OpenBSD, NetBSD, BSD/OS, OS X
|
||||
size_t len = sizeof(cores);
|
||||
int mib[2];
|
||||
mib[0] = CTL_HW;
|
||||
|
|
|
@ -49,7 +49,7 @@ INSTALLS += qmake
|
|||
#licheck
|
||||
licheck.path = $$[QT_HOST_BINS]
|
||||
licheck.files = $$PWD/bin/$$QT_LICHECK
|
||||
exists($$licheck.files): INSTALLS += licheck
|
||||
!isEmpty(QT_LICHECK): INSTALLS += licheck
|
||||
|
||||
#syncqt
|
||||
syncqt.path = $$[QT_HOST_BINS]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
wince*: {
|
||||
wince {
|
||||
DEFINES += NO_GETENV
|
||||
contains(CE_ARCH,x86):CONFIG -= stl exceptions
|
||||
contains(CE_ARCH,x86):CONFIG += exceptions_off
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
From 121e4d1ad09bdbfeb8a871d4f2c3ffe1acb8e2d6 Mon Sep 17 00:00:00 2001
|
||||
From: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
||||
Date: Tue, 30 Jun 2015 09:41:39 +0200
|
||||
Subject: [PATCH] Re-fix X86 Wince builds.
|
||||
|
||||
eebb8de21ce4845866f15e444a4c78fc2cbb7f3f fixed the PCRE
|
||||
build, but was accidentally overwritten by a subsequent
|
||||
import of the PCRE tarball.
|
||||
|
||||
Now put the same patch also into patches/ so that we don't
|
||||
forget it needs to be manually applied.
|
||||
|
||||
Change-Id: I93c2ee9c2e2dd1c48d391ce7e16d33208fb2cbbb
|
||||
---
|
||||
src/3rdparty/pcre/sljit/sljitNativeX86_common.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/3rdparty/pcre/sljit/sljitNativeX86_common.c b/src/3rdparty/pcre/sljit/sljitNativeX86_common.c
|
||||
index 22a163f..21b276f 100644
|
||||
--- a/src/3rdparty/pcre/sljit/sljitNativeX86_common.c
|
||||
+++ b/src/3rdparty/pcre/sljit/sljitNativeX86_common.c
|
||||
@@ -273,7 +273,9 @@ static sljit_si cpu_has_sse2 = -1;
|
||||
#endif
|
||||
static sljit_si cpu_has_cmov = -1;
|
||||
|
||||
-#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
+#ifdef _WIN32_WCE
|
||||
+#include <cmnintrin.h>
|
||||
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
|
@ -273,7 +273,9 @@ static sljit_si cpu_has_sse2 = -1;
|
|||
#endif
|
||||
static sljit_si cpu_has_cmov = -1;
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
#ifdef _WIN32_WCE
|
||||
#include <cmnintrin.h>
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
wince*: DEFINES += NO_ERRNO_H
|
||||
wince: DEFINES += NO_ERRNO_H
|
||||
INCLUDEPATH = $$PWD/zlib $$INCLUDEPATH
|
||||
SOURCES+= \
|
||||
$$PWD/zlib/adler32.c \
|
||||
|
|
|
@ -107,10 +107,6 @@ public class QtAccessibilityDelegate extends View.AccessibilityDelegate
|
|||
if (m_manager.isEnabled())
|
||||
accServiceListener.onAccessibilityStateChanged(true);
|
||||
}
|
||||
|
||||
|
||||
// Enable Qt Accessibility so that notifications are enabled
|
||||
QtNativeAccessibility.setActive(true);
|
||||
}
|
||||
|
||||
private class AccessibilityManagerListener implements AccessibilityManager.AccessibilityStateChangeListener
|
||||
|
@ -119,8 +115,6 @@ public class QtAccessibilityDelegate extends View.AccessibilityDelegate
|
|||
public void onAccessibilityStateChanged(boolean enabled)
|
||||
{
|
||||
if (enabled) {
|
||||
// The accessibility code depends on android API level 16, so dynamically resolve it
|
||||
if (android.os.Build.VERSION.SDK_INT >= 16) {
|
||||
try {
|
||||
View view = m_view;
|
||||
if (view == null) {
|
||||
|
@ -147,13 +141,14 @@ public class QtAccessibilityDelegate extends View.AccessibilityDelegate
|
|||
// Unknown exception means something went wrong.
|
||||
Log.w("Qt A11y", "Unknown exception: " + e.toString());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (m_view != null) {
|
||||
m_layout.removeView(m_view);
|
||||
m_view = null;
|
||||
}
|
||||
}
|
||||
|
||||
QtNativeAccessibility.setActive(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -794,23 +794,6 @@ public class QtActivityDelegate
|
|||
m_surfaces = new HashMap<Integer, QtSurface>();
|
||||
m_nativeViews = new HashMap<Integer, View>();
|
||||
m_activity.registerForContextMenu(m_layout);
|
||||
|
||||
// Initialize accessibility
|
||||
try {
|
||||
final String a11yDelegateClassName = "org.qtproject.qt5.android.accessibility.QtAccessibilityDelegate";
|
||||
Class<?> qtDelegateClass = Class.forName(a11yDelegateClassName);
|
||||
Constructor constructor = qtDelegateClass.getConstructor(android.app.Activity.class,
|
||||
android.view.ViewGroup.class,
|
||||
this.getClass());
|
||||
Object accessibilityDelegate = constructor.newInstance(m_activity, m_layout, this);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// Class not found is fine since we are compatible with Android API < 16, but the function will
|
||||
// only be available with that API level.
|
||||
} catch (Exception e) {
|
||||
// Unknown exception means something went wrong.
|
||||
Log.w("Qt A11y", "Unknown exception: " + e.toString());
|
||||
}
|
||||
|
||||
m_activity.setContentView(m_layout,
|
||||
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
|
@ -828,6 +811,25 @@ public class QtActivityDelegate
|
|||
m_currentRotation = rotation;
|
||||
}
|
||||
|
||||
public void initializeAccessibility()
|
||||
{
|
||||
// Initialize accessibility
|
||||
try {
|
||||
final String a11yDelegateClassName = "org.qtproject.qt5.android.accessibility.QtAccessibilityDelegate";
|
||||
Class<?> qtDelegateClass = Class.forName(a11yDelegateClassName);
|
||||
Constructor constructor = qtDelegateClass.getConstructor(android.app.Activity.class,
|
||||
android.view.ViewGroup.class,
|
||||
this.getClass());
|
||||
Object accessibilityDelegate = constructor.newInstance(m_activity, m_layout, this);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// Class not found is fine since we are compatible with Android API < 16, but the function will
|
||||
// only be available with that API level.
|
||||
} catch (Exception e) {
|
||||
// Unknown exception means something went wrong.
|
||||
Log.w("Qt A11y", "Unknown exception: " + e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void onConfigurationChanged(Configuration configuration)
|
||||
{
|
||||
try {
|
||||
|
|
|
@ -589,6 +589,16 @@ public class QtNative
|
|||
});
|
||||
}
|
||||
|
||||
private static void initializeAccessibility()
|
||||
{
|
||||
runAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
m_activityDelegate.initializeAccessibility();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// screen methods
|
||||
public static native void setDisplayMetrics(int screenWidthPixels,
|
||||
int screenHeightPixels,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<manifest package="org.qtproject.example" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
|
||||
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation"
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation"
|
||||
android:name="org.qtproject.qt5.android.bindings.QtActivity"
|
||||
android:label="-- %%INSERT_APP_NAME%% --"
|
||||
android:screenOrientation="unspecified"
|
||||
|
|
|
@ -51,7 +51,7 @@ if (data.open(QFile::WriteOnly | QFile::Truncate)) {
|
|||
//! [1]
|
||||
QTextStream stream(stdin);
|
||||
QString line;
|
||||
while (stream.readLine(&line)) {
|
||||
while (stream.readLineInto(&line)) {
|
||||
...
|
||||
}
|
||||
//! [1]
|
||||
|
|
|
@ -44,10 +44,11 @@ int main(int argc, char *argv[])
|
|||
QApplication app(argc, argv);
|
||||
|
||||
QTranslator translator;
|
||||
translator.load("hellotr_la");
|
||||
app.installTranslator(&translator);
|
||||
// look up e.g. :/translations/myapp_de.qm
|
||||
if (translator.load(QLocale(), QLatin1String("myapp"), QLatin1String("_"), QLatin1String(":/translations")))
|
||||
app.installTranslator(&translator);
|
||||
|
||||
QPushButton hello(QPushButton::tr("Hello world!"));
|
||||
QPushButton hello(QCoreApplication::translate("main", "Hello world!"));
|
||||
hello.resize(100, 30);
|
||||
|
||||
hello.show();
|
||||
|
|
|
@ -261,6 +261,19 @@ void Widget::argFunction()
|
|||
str.arg("%1f").arg("Hello"); // returns "Hellof %2"
|
||||
//! [13]
|
||||
|
||||
//! [97]
|
||||
str = "%1%3%2";
|
||||
str.arg("Hello").arg(20).arg(50); // returns "Hello500"
|
||||
|
||||
str = "%1%2%3";
|
||||
str.arg("Hello").arg(50).arg(20); // returns "Hello5020"
|
||||
//! [97]
|
||||
|
||||
//! [98]
|
||||
str = "%1%2%3";
|
||||
str.arg("Hello", QString::number(20), QString::number(50)); // returns "Hello5020"
|
||||
//! [98]
|
||||
|
||||
//! [14]
|
||||
str = QString("Decimal 63 is %1 in hexadecimal")
|
||||
.arg(63, 0, 16);
|
||||
|
|
|
@ -155,7 +155,9 @@
|
|||
/* Clang also masquerades as GCC */
|
||||
# if defined(__apple_build_version__)
|
||||
# /* http://en.wikipedia.org/wiki/Xcode#Toolchain_Versions */
|
||||
# if __apple_build_version__ >= 6000051
|
||||
# if __apple_build_version__ >= 7000053
|
||||
# define Q_CC_CLANG 306
|
||||
# elif __apple_build_version__ >= 6000051
|
||||
# define Q_CC_CLANG 305
|
||||
# elif __apple_build_version__ >= 5030038
|
||||
# define Q_CC_CLANG 304
|
||||
|
@ -556,7 +558,10 @@
|
|||
# define Q_COMPILER_ALIGNAS
|
||||
# define Q_COMPILER_ALIGNOF
|
||||
# define Q_COMPILER_INHERITING_CONSTRUCTORS
|
||||
# define Q_COMPILER_THREAD_LOCAL
|
||||
# ifndef Q_OS_OSX
|
||||
// C++11 thread_local is broken on OS X (Clang doesn't support it either)
|
||||
# define Q_COMPILER_THREAD_LOCAL
|
||||
# endif
|
||||
# define Q_COMPILER_UDL
|
||||
# endif
|
||||
# endif
|
||||
|
@ -613,7 +618,7 @@
|
|||
# if __has_feature(cxx_strong_enums)
|
||||
# define Q_COMPILER_CLASS_ENUM
|
||||
# endif
|
||||
# if __has_feature(cxx_constexpr)
|
||||
# if __has_feature(cxx_constexpr) && Q_CC_CLANG > 302 /* CLANG 3.2 has bad/partial support */
|
||||
# define Q_COMPILER_CONSTEXPR
|
||||
# endif
|
||||
# if __has_feature(cxx_decltype) /* && __has_feature(cxx_decltype_incomplete_return_types) */
|
||||
|
|
|
@ -1125,10 +1125,11 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
|||
\value MV_10_4 Mac OS X 10.4 (unsupported)
|
||||
\value MV_10_5 Mac OS X 10.5 (unsupported)
|
||||
\value MV_10_6 Mac OS X 10.6
|
||||
\value MV_10_7 OS X 10.7
|
||||
\value MV_10_7 Mac OS X 10.7
|
||||
\value MV_10_8 OS X 10.8
|
||||
\value MV_10_9 OS X 10.9
|
||||
\value MV_10_10 OS X 10.10
|
||||
\value MV_10_11 OS X 10.11
|
||||
\value MV_Unknown An unknown and currently unsupported platform
|
||||
|
||||
\value MV_CHEETAH Apple codename for MV_10_0
|
||||
|
@ -1142,6 +1143,7 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
|||
\value MV_MOUNTAINLION Apple codename for MV_10_8
|
||||
\value MV_MAVERICKS Apple codename for MV_10_9
|
||||
\value MV_YOSEMITE Apple codename for MV_10_10
|
||||
\value MV_ELCAPITAN Apple codename for MV_10_11
|
||||
|
||||
\value MV_IOS iOS (any)
|
||||
\value MV_IOS_4_3 iOS 4.3
|
||||
|
@ -1155,6 +1157,8 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
|||
\value MV_IOS_8_1 iOS 8.1
|
||||
\value MV_IOS_8_2 iOS 8.2
|
||||
\value MV_IOS_8_3 iOS 8.3
|
||||
\value MV_IOS_8_4 iOS 8.4
|
||||
\value MV_IOS_9_0 iOS 9.0
|
||||
|
||||
\value MV_None Not a Darwin operating system
|
||||
|
||||
|
@ -2050,32 +2054,27 @@ QSysInfo::WinVersion QSysInfo::windowsVersion()
|
|||
|
||||
#ifdef QT_DEBUG
|
||||
{
|
||||
QByteArray override = qgetenv("QT_WINVER_OVERRIDE");
|
||||
if (override.isEmpty())
|
||||
return winver;
|
||||
|
||||
if (override == "Me")
|
||||
winver = QSysInfo::WV_Me;
|
||||
if (override == "95")
|
||||
winver = QSysInfo::WV_95;
|
||||
else if (override == "98")
|
||||
winver = QSysInfo::WV_98;
|
||||
else if (override == "NT")
|
||||
winver = QSysInfo::WV_NT;
|
||||
else if (override == "2000")
|
||||
winver = QSysInfo::WV_2000;
|
||||
else if (override == "2003")
|
||||
winver = QSysInfo::WV_2003;
|
||||
else if (override == "XP")
|
||||
winver = QSysInfo::WV_XP;
|
||||
else if (override == "VISTA")
|
||||
winver = QSysInfo::WV_VISTA;
|
||||
else if (override == "WINDOWS7")
|
||||
winver = QSysInfo::WV_WINDOWS7;
|
||||
else if (override == "WINDOWS8")
|
||||
winver = QSysInfo::WV_WINDOWS8;
|
||||
else if (override == "WINDOWS8_1")
|
||||
winver = QSysInfo::WV_WINDOWS8_1;
|
||||
if (Q_UNLIKELY(qEnvironmentVariableIsSet("QT_WINVER_OVERRIDE"))) {
|
||||
const QByteArray winVerOverride = qgetenv("QT_WINVER_OVERRIDE");
|
||||
if (winVerOverride == "NT")
|
||||
winver = QSysInfo::WV_NT;
|
||||
else if (winVerOverride == "2000")
|
||||
winver = QSysInfo::WV_2000;
|
||||
else if (winVerOverride == "2003")
|
||||
winver = QSysInfo::WV_2003;
|
||||
else if (winVerOverride == "XP")
|
||||
winver = QSysInfo::WV_XP;
|
||||
else if (winVerOverride == "VISTA")
|
||||
winver = QSysInfo::WV_VISTA;
|
||||
else if (winVerOverride == "WINDOWS7")
|
||||
winver = QSysInfo::WV_WINDOWS7;
|
||||
else if (winVerOverride == "WINDOWS8")
|
||||
winver = QSysInfo::WV_WINDOWS8;
|
||||
else if (winVerOverride == "WINDOWS8_1")
|
||||
winver = QSysInfo::WV_WINDOWS8_1;
|
||||
else if (winVerOverride == "WINDOWS10")
|
||||
winver = QSysInfo::WV_WINDOWS10;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // !Q_OS_WINRT
|
||||
|
@ -2102,6 +2101,8 @@ static const char *winVer_helper()
|
|||
return "8";
|
||||
case QSysInfo::WV_WINDOWS8_1:
|
||||
return "8.1";
|
||||
case QSysInfo::WV_WINDOWS10:
|
||||
return "10";
|
||||
|
||||
case QSysInfo::WV_CE:
|
||||
return "CE";
|
||||
|
@ -2731,7 +2732,7 @@ QString QSysInfo::prettyProductName()
|
|||
basename = "Mac OS X Snow Leopard (";
|
||||
break;
|
||||
case MV_LION:
|
||||
basename = "Mac OS X Lion (";
|
||||
basename = "OS X Lion (";
|
||||
break;
|
||||
case MV_MOUNTAINLION:
|
||||
basename = "OS X Mountain Lion (";
|
||||
|
@ -2742,6 +2743,9 @@ QString QSysInfo::prettyProductName()
|
|||
case MV_YOSEMITE:
|
||||
basename = "OS X Yosemite (";
|
||||
break;
|
||||
case MV_ELCAPITAN:
|
||||
basename = "OS X El Capitan (";
|
||||
break;
|
||||
}
|
||||
if (basename)
|
||||
return QLatin1String(basename) + productVersion() + QLatin1Char(')');
|
||||
|
|
|
@ -137,6 +137,7 @@ public:
|
|||
MV_10_8 = Q_MV_OSX(10, 8),
|
||||
MV_10_9 = Q_MV_OSX(10, 9),
|
||||
MV_10_10 = Q_MV_OSX(10, 10),
|
||||
MV_10_11 = Q_MV_OSX(10, 11),
|
||||
|
||||
/* codenames */
|
||||
MV_CHEETAH = MV_10_0,
|
||||
|
@ -150,6 +151,7 @@ public:
|
|||
MV_MOUNTAINLION = MV_10_8,
|
||||
MV_MAVERICKS = MV_10_9,
|
||||
MV_YOSEMITE = MV_10_10,
|
||||
MV_ELCAPITAN = MV_10_11,
|
||||
|
||||
/* iOS */
|
||||
MV_IOS = 1 << 8,
|
||||
|
@ -163,7 +165,9 @@ public:
|
|||
MV_IOS_8_0 = Q_MV_IOS(8, 0),
|
||||
MV_IOS_8_1 = Q_MV_IOS(8, 1),
|
||||
MV_IOS_8_2 = Q_MV_IOS(8, 2),
|
||||
MV_IOS_8_3 = Q_MV_IOS(8, 3)
|
||||
MV_IOS_8_3 = Q_MV_IOS(8, 3),
|
||||
MV_IOS_8_4 = Q_MV_IOS(8, 4),
|
||||
MV_IOS_9_0 = Q_MV_IOS(9, 0)
|
||||
};
|
||||
#if defined(Q_OS_MAC)
|
||||
static const MacVersion MacintoshVersion;
|
||||
|
|
|
@ -233,6 +233,9 @@
|
|||
# if !defined(__MAC_10_10)
|
||||
# define __MAC_10_10 101000
|
||||
# endif
|
||||
# if !defined(__MAC_10_11)
|
||||
# define __MAC_10_11 101100
|
||||
# endif
|
||||
# if !defined(MAC_OS_X_VERSION_10_7)
|
||||
# define MAC_OS_X_VERSION_10_7 1070
|
||||
# endif
|
||||
|
@ -245,6 +248,9 @@
|
|||
# if !defined(MAC_OS_X_VERSION_10_10)
|
||||
# define MAC_OS_X_VERSION_10_10 101000
|
||||
# endif
|
||||
# if !defined(MAC_OS_X_VERSION_10_11)
|
||||
# define MAC_OS_X_VERSION_10_11 101100
|
||||
# endif
|
||||
#
|
||||
# if !defined(__IPHONE_4_3)
|
||||
# define __IPHONE_4_3 40300
|
||||
|
@ -279,6 +285,12 @@
|
|||
# if !defined(__IPHONE_8_3)
|
||||
# define __IPHONE_8_3 80300
|
||||
# endif
|
||||
# if !defined(__IPHONE_8_4)
|
||||
# define __IPHONE_8_4 80400
|
||||
# endif
|
||||
# if !defined(__IPHONE_9_0)
|
||||
# define __IPHONE_9_0 90000
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __LSB_VERSION__
|
||||
|
|
|
@ -777,6 +777,8 @@ QString QDir::relativeFilePath(const QString &fileName) const
|
|||
result += QLatin1Char('/');
|
||||
}
|
||||
|
||||
if (result.isEmpty())
|
||||
return QLatin1String(".");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ QFileSelectorPrivate::QFileSelectorPrivate()
|
|||
QString defaultsBasePath = "data/";
|
||||
QString defaultsPath = defaultsBasePath + "defaults.conf";
|
||||
QString localizedPath = defaultsBasePath
|
||||
+ QString("%1/defaults.conf").arg(QLocale::system().name());
|
||||
+ QString("%1/defaults.conf").arg(QLocale().name());
|
||||
if (QFile::exists(localizedPath))
|
||||
defaultsPath = localizedPath;
|
||||
QFile defaults(defaultsPath);
|
||||
|
@ -148,7 +148,7 @@ QFileSelectorPrivate::QFileSelectorPrivate()
|
|||
on (list not exhaustive): android, blackberry, ios, osx, darwin, mac, linux, wince, unix,
|
||||
windows. On Linux, if it can be determined, the name of the distribution too, like debian,
|
||||
fedora or opensuse.
|
||||
\li locale, same as QLocale::system().name().
|
||||
\li locale, same as QLocale().name().
|
||||
\endlist
|
||||
|
||||
Further selectors will be added from the \c QT_FILE_SELECTORS environment variable, which
|
||||
|
@ -347,7 +347,7 @@ void QFileSelectorPrivate::updateSelectors()
|
|||
sharedData->staticSelectors << sharedData->preloadedStatics; //Potential for static selectors from other modules
|
||||
|
||||
// TODO: Update on locale changed?
|
||||
sharedData->staticSelectors << QLocale::system().name();
|
||||
sharedData->staticSelectors << QLocale().name();
|
||||
|
||||
sharedData->staticSelectors << platformSelectors();
|
||||
}
|
||||
|
|
|
@ -662,17 +662,11 @@ bool QFileSystemEngine::removeFile(const QFileSystemEntry &entry, QSystemError &
|
|||
bool QFileSystemEngine::setPermissions(const QFileSystemEntry &entry, QFile::Permissions permissions, QSystemError &error, QFileSystemMetaData *data)
|
||||
{
|
||||
mode_t mode = 0;
|
||||
if (permissions & QFile::ReadOwner)
|
||||
if (permissions & (QFile::ReadOwner | QFile::ReadUser))
|
||||
mode |= S_IRUSR;
|
||||
if (permissions & QFile::WriteOwner)
|
||||
if (permissions & (QFile::WriteOwner | QFile::WriteUser))
|
||||
mode |= S_IWUSR;
|
||||
if (permissions & QFile::ExeOwner)
|
||||
mode |= S_IXUSR;
|
||||
if (permissions & QFile::ReadUser)
|
||||
mode |= S_IRUSR;
|
||||
if (permissions & QFile::WriteUser)
|
||||
mode |= S_IWUSR;
|
||||
if (permissions & QFile::ExeUser)
|
||||
if (permissions & (QFile::ExeOwner | QFile::ExeUser))
|
||||
mode |= S_IXUSR;
|
||||
if (permissions & QFile::ReadGroup)
|
||||
mode |= S_IRGRP;
|
||||
|
|
|
@ -1437,11 +1437,9 @@ bool QFileSystemEngine::setPermissions(const QFileSystemEntry &entry, QFile::Per
|
|||
Q_UNUSED(data);
|
||||
int mode = 0;
|
||||
|
||||
if (permissions & QFile::ReadOwner || permissions & QFile::ReadUser
|
||||
|| permissions & QFile::ReadGroup || permissions & QFile::ReadOther)
|
||||
if (permissions & (QFile::ReadOwner | QFile::ReadUser | QFile::ReadGroup | QFile::ReadOther))
|
||||
mode |= _S_IREAD;
|
||||
if (permissions & QFile::WriteOwner || permissions & QFile::WriteUser
|
||||
|| permissions & QFile::WriteGroup || permissions & QFile::WriteOther)
|
||||
if (permissions & (QFile::WriteOwner | QFile::WriteUser | QFile::WriteGroup | QFile::WriteOther))
|
||||
mode |= _S_IWRITE;
|
||||
|
||||
if (mode == 0) // not supported
|
||||
|
|
|
@ -185,7 +185,7 @@ void QFileSystemWatcherPrivate::_q_directoryChanged(const QString &path, bool re
|
|||
the file system monitor. Also note that your process may have
|
||||
other file descriptors open in addition to the ones for files
|
||||
being monitored, and these other open descriptors also count in
|
||||
the total. OS X 10.5 and up use a different backend and do not
|
||||
the total. Mac OS X 10.5 and up use a different backend and do not
|
||||
suffer from this issue.
|
||||
|
||||
|
||||
|
|
|
@ -248,6 +248,7 @@ QStringList QWindowsFileSystemWatcherEngine::removePaths(const QStringList &path
|
|||
// ###
|
||||
files->removeAll(path);
|
||||
directories->removeAll(path);
|
||||
it.remove();
|
||||
|
||||
if (h.isEmpty()) {
|
||||
DEBUG() << "Closing handle" << handle.handle;
|
||||
|
@ -260,8 +261,6 @@ QStringList QWindowsFileSystemWatcherEngine::removePaths(const QStringList &path
|
|||
thread->handleForDir.remove(QFileSystemWatcherPathKey(absolutePath));
|
||||
// h is now invalid
|
||||
|
||||
it.remove();
|
||||
|
||||
if (thread->handleForDir.isEmpty()) {
|
||||
DEBUG() << "Stopping thread " << thread;
|
||||
locker.unlock();
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
# include <cstdio>
|
||||
#elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS)
|
||||
# include <sys/user.h>
|
||||
# include <libutil.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -218,24 +219,25 @@ QString QLockFilePrivate::processNameByPid(qint64 pid)
|
|||
#if defined(Q_OS_OSX)
|
||||
char name[1024];
|
||||
proc_name(pid, name, sizeof(name) / sizeof(char));
|
||||
return QString::fromUtf8(name);
|
||||
return QFile::decodeName(name);
|
||||
#elif defined(Q_OS_LINUX)
|
||||
if (!QFile::exists(QStringLiteral("/proc/version")))
|
||||
return QString();
|
||||
char exePath[64];
|
||||
char buf[PATH_MAX];
|
||||
memset(buf, 0, sizeof(buf));
|
||||
char buf[PATH_MAX + 1];
|
||||
sprintf(exePath, "/proc/%lld/exe", pid);
|
||||
if (readlink(exePath, buf, sizeof(buf)) < 0) {
|
||||
size_t len = (size_t)readlink(exePath, buf, sizeof(buf));
|
||||
if (len >= sizeof(buf)) {
|
||||
// The pid is gone. Return some invalid process name to fail the test.
|
||||
return QStringLiteral("/ERROR/");
|
||||
}
|
||||
return QFileInfo(QString::fromUtf8(buf)).fileName();
|
||||
buf[len] = 0;
|
||||
return QFileInfo(QFile::decodeName(buf)).fileName();
|
||||
#elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS)
|
||||
kinfo_proc *proc = kinfo_getproc(pid);
|
||||
if (!proc)
|
||||
return QString();
|
||||
QString name = QString::fromUtf8(proc->ki_comm);
|
||||
QString name = QFile::decodeName(proc->ki_comm);
|
||||
free(proc);
|
||||
return name;
|
||||
#else
|
||||
|
|
|
@ -2086,7 +2086,7 @@ QByteArray QProcess::readAllStandardError()
|
|||
printed at the console, and the existing process will continue running
|
||||
unaffected.
|
||||
|
||||
\sa pid(), started(), waitForStarted(), setNativeArguments()
|
||||
\sa processId(), started(), waitForStarted(), setNativeArguments()
|
||||
*/
|
||||
void QProcess::start(const QString &program, const QStringList &arguments, OpenMode mode)
|
||||
{
|
||||
|
|
|
@ -1085,6 +1085,9 @@ bool QProcessPrivate::waitForDeadChild()
|
|||
exitCode = info.si_status;
|
||||
crashed = info.si_code != CLD_EXITED;
|
||||
|
||||
delete deathNotifier;
|
||||
deathNotifier = 0;
|
||||
|
||||
qt_safe_close(forkfd);
|
||||
forkfd = -1; // Child is dead, don't try to kill it anymore
|
||||
|
||||
|
|
|
@ -186,6 +186,8 @@ QString QStorageInfo::rootPath() const
|
|||
This size can be less than or equal to the free size returned by
|
||||
bytesFree() function.
|
||||
|
||||
Returns -1 if QStorageInfo object is not valid.
|
||||
|
||||
\sa bytesTotal(), bytesFree()
|
||||
*/
|
||||
qint64 QStorageInfo::bytesAvailable() const
|
||||
|
@ -198,6 +200,8 @@ qint64 QStorageInfo::bytesAvailable() const
|
|||
quotas on the filesystem, this value can be larger than the value
|
||||
returned by bytesAvailable().
|
||||
|
||||
Returns -1 if QStorageInfo object is not valid.
|
||||
|
||||
\sa bytesTotal(), bytesAvailable()
|
||||
*/
|
||||
qint64 QStorageInfo::bytesFree() const
|
||||
|
@ -208,6 +212,8 @@ qint64 QStorageInfo::bytesFree() const
|
|||
/*!
|
||||
Returns the total volume size in bytes.
|
||||
|
||||
Returns -1 if QStorageInfo object is not valid.
|
||||
|
||||
\sa bytesFree(), bytesAvailable()
|
||||
*/
|
||||
qint64 QStorageInfo::bytesTotal() const
|
||||
|
|
|
@ -53,7 +53,7 @@ class QStorageInfoPrivate : public QSharedData
|
|||
{
|
||||
public:
|
||||
inline QStorageInfoPrivate() : QSharedData(),
|
||||
bytesTotal(0), bytesFree(0), bytesAvailable(0),
|
||||
bytesTotal(-1), bytesFree(-1), bytesAvailable(-1),
|
||||
readOnly(false), ready(false), valid(false)
|
||||
{}
|
||||
|
||||
|
|
|
@ -1591,7 +1591,7 @@ QString QTextStream::readLine(qint64 maxlen)
|
|||
{
|
||||
QString line;
|
||||
|
||||
readLine(&line, maxlen);
|
||||
readLineInto(&line, maxlen);
|
||||
return line;
|
||||
}
|
||||
|
||||
|
@ -1612,7 +1612,7 @@ QString QTextStream::readLine(qint64 maxlen)
|
|||
|
||||
If \a line has sufficient capacity for the data that is about to be
|
||||
read, this function may not need to allocate new memory. Because of
|
||||
this, it can be faster than the other readLine() overload.
|
||||
this, it can be faster than readLine().
|
||||
|
||||
Returns \c false if the stream has read to the end of the file or
|
||||
an error has occurred; otherwise returns \c true. The contents in
|
||||
|
@ -1620,7 +1620,7 @@ QString QTextStream::readLine(qint64 maxlen)
|
|||
|
||||
\sa readAll(), QIODevice::readLine()
|
||||
*/
|
||||
bool QTextStream::readLine(QString *line, qint64 maxlen)
|
||||
bool QTextStream::readLineInto(QString *line, qint64 maxlen)
|
||||
{
|
||||
Q_D(QTextStream);
|
||||
// keep in sync with CHECK_VALID_STREAM
|
||||
|
|
|
@ -124,7 +124,7 @@ public:
|
|||
void skipWhiteSpace();
|
||||
|
||||
QString readLine(qint64 maxlen = 0);
|
||||
bool readLine(QString *line, qint64 maxlen = 0);
|
||||
bool readLineInto(QString *line, qint64 maxlen = 0);
|
||||
QString readAll();
|
||||
QString read(qint64 maxlen);
|
||||
|
||||
|
|
|
@ -2646,9 +2646,12 @@ bool QSortFilterProxyModel::lessThan(const QModelIndex &source_left, const QMode
|
|||
Q_D(const QSortFilterProxyModel);
|
||||
QVariant l = (source_left.model() ? source_left.model()->data(source_left, d->sort_role) : QVariant());
|
||||
QVariant r = (source_right.model() ? source_right.model()->data(source_right, d->sort_role) : QVariant());
|
||||
// Duplicated in QStandardItem::operator<()
|
||||
if (l.userType() == QVariant::Invalid)
|
||||
return false;
|
||||
if (r.userType() == QVariant::Invalid)
|
||||
return true;
|
||||
switch (l.userType()) {
|
||||
case QVariant::Invalid:
|
||||
return (r.type() != QVariant::Invalid);
|
||||
case QVariant::Int:
|
||||
return l.toInt() < r.toInt();
|
||||
case QVariant::UInt:
|
||||
|
|
|
@ -84,7 +84,7 @@ win32 {
|
|||
}
|
||||
}
|
||||
|
||||
wince*: {
|
||||
wince {
|
||||
SOURCES += \
|
||||
kernel/qfunctions_wince.cpp
|
||||
HEADERS += \
|
||||
|
|
|
@ -1004,6 +1004,17 @@ bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event)
|
|||
do not change the focus widget.
|
||||
\endlist
|
||||
|
||||
\b{Future direction:} This function will not be called for objects that live
|
||||
outside the main thread in Qt 6. Applications that need that functionality
|
||||
should find other solutions for their event inspection needs in the meantime.
|
||||
The change may be extended to the main thread, causing this function to be
|
||||
deprecated.
|
||||
|
||||
\warning If you override this function, you must ensure all threads that
|
||||
process events stop doing so before your application object begins
|
||||
destruction. This includes threads started by other libraries that you may be
|
||||
using, but does not apply to Qt's own threads.
|
||||
|
||||
\sa QObject::event(), installNativeEventFilter()
|
||||
*/
|
||||
|
||||
|
@ -2053,11 +2064,13 @@ QString QCoreApplication::applicationFilePath()
|
|||
|
||||
QCoreApplicationPrivate *d = self->d_func();
|
||||
|
||||
static char *procName = d->argv[0];
|
||||
if (qstrcmp(procName, d->argv[0]) != 0) {
|
||||
// clear the cache if the procname changes, so we reprocess it.
|
||||
QCoreApplicationPrivate::clearApplicationFilePath();
|
||||
procName = d->argv[0];
|
||||
if (d->argc) {
|
||||
static const char *procName = d->argv[0];
|
||||
if (qstrcmp(procName, d->argv[0]) != 0) {
|
||||
// clear the cache if the procname changes, so we reprocess it.
|
||||
QCoreApplicationPrivate::clearApplicationFilePath();
|
||||
procName = d->argv[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (QCoreApplicationPrivate::cachedApplicationFilePath)
|
||||
|
|
|
@ -144,7 +144,10 @@ private:
|
|||
IID_PPV_ARGS(&application));
|
||||
RETURN_VOID_IF_FAILED("Failed to get the application factory");
|
||||
|
||||
ComPtr<ICoreApplicationView> view;
|
||||
static ComPtr<ICoreApplicationView> view;
|
||||
if (view)
|
||||
return;
|
||||
|
||||
hr = application->get_MainView(&view);
|
||||
RETURN_VOID_IF_FAILED("Failed to get the main view");
|
||||
|
||||
|
@ -166,13 +169,6 @@ QEventDispatcherWinRT::QEventDispatcherWinRT(QObject *parent)
|
|||
{
|
||||
Q_D(QEventDispatcherWinRT);
|
||||
|
||||
// Special treatment for the WinMain thread, as it is created before the UI
|
||||
static bool firstThread = true;
|
||||
if (firstThread) {
|
||||
firstThread = false;
|
||||
return;
|
||||
}
|
||||
|
||||
d->fetchCoreDispatcher();
|
||||
}
|
||||
|
||||
|
@ -212,6 +208,7 @@ bool QEventDispatcherWinRT::processEvents(QEventLoop::ProcessEventsFlags flags)
|
|||
DWORD waitResult = WaitForMultipleObjectsEx(timerHandles.count(), timerHandles.constData(), FALSE, 1, TRUE);
|
||||
if (waitResult >= WAIT_OBJECT_0 && waitResult < WAIT_OBJECT_0 + timerHandles.count()) {
|
||||
const HANDLE handle = timerHandles.value(waitResult - WAIT_OBJECT_0);
|
||||
ResetEvent(handle);
|
||||
const int timerId = d->timerHandleToId.value(handle);
|
||||
if (timerId == INTERRUPT_HANDLE)
|
||||
break;
|
||||
|
@ -288,8 +285,8 @@ void QEventDispatcherWinRT::registerTimer(int timerId, int interval, Qt::TimerTy
|
|||
TimeSpan period;
|
||||
period.Duration = interval ? (interval * 10000) : 1; // TimeSpan is based on 100-nanosecond units
|
||||
IThreadPoolTimer *timer;
|
||||
const HANDLE handle = CreateEventEx(NULL, NULL, NULL, SYNCHRONIZE|EVENT_MODIFY_STATE);
|
||||
const HANDLE cancelHandle = CreateEventEx(NULL, NULL, NULL, SYNCHRONIZE|EVENT_MODIFY_STATE);
|
||||
const HANDLE handle = CreateEventEx(NULL, NULL, CREATE_EVENT_MANUAL_RESET, SYNCHRONIZE | EVENT_MODIFY_STATE);
|
||||
const HANDLE cancelHandle = CreateEventEx(NULL, NULL, CREATE_EVENT_MANUAL_RESET, SYNCHRONIZE|EVENT_MODIFY_STATE);
|
||||
HRESULT hr = d->timerFactory->CreatePeriodicTimerWithCompletion(
|
||||
Callback<ITimerElapsedHandler>([handle, cancelHandle](IThreadPoolTimer *timer) {
|
||||
DWORD cancelResult = WaitForSingleObjectEx(cancelHandle, 0, TRUE);
|
||||
|
@ -376,7 +373,7 @@ QList<QAbstractEventDispatcher::TimerInfo> QEventDispatcherWinRT::registeredTime
|
|||
Q_D(const QEventDispatcherWinRT);
|
||||
QList<TimerInfo> timerInfos;
|
||||
foreach (const WinRTTimerInfo &info, d->timerInfos) {
|
||||
if (info.object == object)
|
||||
if (info.object == object && info.timerId != INVALID_TIMER_ID)
|
||||
timerInfos.append(info);
|
||||
}
|
||||
return timerInfos;
|
||||
|
@ -486,7 +483,9 @@ bool QEventDispatcherWinRT::event(QEvent *e)
|
|||
|
||||
QEventDispatcherWinRTPrivate::QEventDispatcherWinRTPrivate()
|
||||
{
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
const bool isGuiThread = QCoreApplication::instance() &&
|
||||
QThread::currentThread() == QCoreApplication::instance()->thread();
|
||||
CoInitializeEx(NULL, isGuiThread ? COINIT_APARTMENTTHREADED : COINIT_MULTITHREADED);
|
||||
HRESULT hr;
|
||||
hr = GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_System_Threading_ThreadPoolTimer).Get(), &timerFactory);
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
|
|
|
@ -303,7 +303,7 @@ struct DefinedTypesFilter {
|
|||
\omitvalue WeakPointerToQObject
|
||||
\omitvalue TrackingPointerToQObject
|
||||
\omitvalue WasDeclaredAsMetaType
|
||||
\value IsGadget This type is a Q_GADGET and it's corresponding QMetaObject can be accessed with QMetaType::metaObject Since 5.5.
|
||||
\omitvalue IsGadget This type is a Q_GADGET and it's corresponding QMetaObject can be accessed with QMetaType::metaObject Since 5.5.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@ -1046,6 +1046,16 @@ int QMetaType::registerNormalizedType(const NS(QByteArray) &normalizedTypeName,
|
|||
if (idx >= User) {
|
||||
previousSize = ct->at(idx - User).size;
|
||||
previousFlags = ct->at(idx - User).flags;
|
||||
|
||||
// Set new/additional flags in case of old library/app.
|
||||
// Ensures that older code works in conjunction with new Qt releases
|
||||
// requiring the new flags.
|
||||
if (flags != previousFlags) {
|
||||
QCustomTypeInfo &inf = ct->data()[idx - User];
|
||||
inf.flags |= flags;
|
||||
if (metaObject)
|
||||
inf.metaObject = metaObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1061,11 +1071,11 @@ int QMetaType::registerNormalizedType(const NS(QByteArray) &normalizedTypeName,
|
|||
normalizedTypeName.constData(), idx, previousSize, size);
|
||||
}
|
||||
|
||||
// Do not compare types higher than 0x100:
|
||||
// Ignore WasDeclaredAsMetaType inconsitency, to many users were hitting the problem
|
||||
previousFlags |= WasDeclaredAsMetaType;
|
||||
flags |= WasDeclaredAsMetaType;
|
||||
|
||||
if (previousFlags != flags) {
|
||||
// Ignore IsGadget as it was added in Qt 5.5
|
||||
// Ignore all the future flags as well
|
||||
if ((previousFlags ^ flags) & 0xff) {
|
||||
const int maskForTypeInfo = NeedsConstruction | NeedsDestruction | MovableType;
|
||||
const char *msg = "QMetaType::registerType: Binary compatibility break. "
|
||||
"\nType flags for type '%s' [%i] don't match. Previously "
|
||||
|
|
|
@ -4922,6 +4922,16 @@ QMetaObject::Connection::~Connection()
|
|||
static_cast<QObjectPrivate::Connection *>(d_ptr)->deref();
|
||||
}
|
||||
|
||||
/*! \internal Returns true if the object is still connected */
|
||||
bool QMetaObject::Connection::isConnected_helper() const
|
||||
{
|
||||
Q_ASSERT(d_ptr); // we're only called from operator RestrictedBool() const
|
||||
QObjectPrivate::Connection *c = static_cast<QObjectPrivate::Connection *>(d_ptr);
|
||||
|
||||
return c->receiver;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\fn QMetaObject::Connection::operator bool() const
|
||||
|
||||
|
|
|
@ -476,6 +476,7 @@ class Q_CORE_EXPORT QMetaObject::Connection {
|
|||
friend class QObject;
|
||||
friend class QObjectPrivate;
|
||||
friend struct QMetaObject;
|
||||
bool isConnected_helper() const;
|
||||
public:
|
||||
~Connection();
|
||||
Connection();
|
||||
|
@ -485,7 +486,7 @@ public:
|
|||
operator bool() const;
|
||||
#else
|
||||
typedef void *Connection::*RestrictedBool;
|
||||
operator RestrictedBool() const { return d_ptr ? &Connection::d_ptr : Q_NULLPTR; }
|
||||
operator RestrictedBool() const { return d_ptr && isConnected_helper() ? &Connection::d_ptr : Q_NULLPTR; }
|
||||
#endif
|
||||
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
|
|
|
@ -59,7 +59,7 @@ class Q_CORE_EXPORT QAbstractTransition : public QObject
|
|||
Q_PROPERTY(QState* sourceState READ sourceState)
|
||||
Q_PROPERTY(QAbstractState* targetState READ targetState WRITE setTargetState NOTIFY targetStateChanged)
|
||||
Q_PROPERTY(QList<QAbstractState*> targetStates READ targetStates WRITE setTargetStates NOTIFY targetStatesChanged)
|
||||
Q_PROPERTY(TransitionType transitionType READ transitionType WRITE setTransitionType)
|
||||
Q_PROPERTY(TransitionType transitionType READ transitionType WRITE setTransitionType REVISION 1)
|
||||
public:
|
||||
enum TransitionType {
|
||||
ExternalTransition,
|
||||
|
|
|
@ -171,19 +171,10 @@ public:
|
|||
#endif // Q_OS_UNIX
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
# ifndef Q_OS_WINRT
|
||||
static unsigned int __stdcall start(void *);
|
||||
static void finish(void *, bool lockAnyway=true);
|
||||
# else
|
||||
HRESULT start(ABI::Windows::Foundation::IAsyncAction *);
|
||||
void finish(bool lockAnyway = true);
|
||||
# endif
|
||||
|
||||
# ifndef Q_OS_WINRT
|
||||
Qt::HANDLE handle;
|
||||
# else
|
||||
ABI::Windows::Foundation::IAsyncAction *handle;
|
||||
# endif
|
||||
unsigned int id;
|
||||
int waiters;
|
||||
bool terminationEnabled, terminatePending;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
//#define WINVER 0x0500
|
||||
#if (_WIN32_WINNT < 0x0400)
|
||||
#if !defined Q_OS_WINRT && (_WIN32_WINNT < 0x0400)
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#endif
|
||||
|
||||
|
@ -46,18 +46,25 @@
|
|||
#include <qpointer.h>
|
||||
|
||||
#include <private/qcoreapplication_p.h>
|
||||
#ifndef Q_OS_WINRT
|
||||
#include <private/qeventdispatcher_win_p.h>
|
||||
#else
|
||||
#include <private/qeventdispatcher_winrt_p.h>
|
||||
#endif
|
||||
|
||||
#include <qt_windows.h>
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
#ifndef Q_OS_WINCE
|
||||
#ifndef _MT
|
||||
#define _MT
|
||||
#endif
|
||||
#endif // _MT
|
||||
#include <process.h>
|
||||
#else
|
||||
#else // !Q_OS_WINCE
|
||||
#include "qfunctions_wince.h"
|
||||
#endif
|
||||
#endif // Q_OS_WINCE
|
||||
#else // !Q_OS_WINRT
|
||||
#endif // Q_OS_WINRT
|
||||
|
||||
#ifndef QT_NO_THREAD
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -171,7 +178,11 @@ void qt_watch_adopted_thread(const HANDLE adoptedThreadHandle, QThread *qthread)
|
|||
// Start watcher thread if it is not already running.
|
||||
if (qt_adopted_thread_watcher_id == 0) {
|
||||
if (qt_adopted_thread_wakeup == 0) {
|
||||
#ifndef Q_OS_WINRT
|
||||
qt_adopted_thread_wakeup = CreateEvent(0, false, false, 0);
|
||||
#else
|
||||
qt_adopted_thread_wakeup = CreateEventEx(0, NULL, 0, EVENT_ALL_ACCESS);
|
||||
#endif
|
||||
qt_adopted_thread_handles.prepend(qt_adopted_thread_wakeup);
|
||||
}
|
||||
|
||||
|
@ -210,13 +221,21 @@ DWORD WINAPI qt_adopted_thread_watcher_function(LPVOID)
|
|||
// no need to loop, no timeout
|
||||
offset = 0;
|
||||
count = handlesCopy.count();
|
||||
#ifndef Q_OS_WINRT
|
||||
ret = WaitForMultipleObjects(handlesCopy.count(), handlesCopy.constData(), false, INFINITE);
|
||||
#else
|
||||
ret = WaitForMultipleObjectsEx(handlesCopy.count(), handlesCopy.constData(), false, INFINITE, false);
|
||||
#endif
|
||||
} else {
|
||||
int loop = 0;
|
||||
do {
|
||||
offset = loop * MAXIMUM_WAIT_OBJECTS;
|
||||
count = qMin(handlesCopy.count() - offset, MAXIMUM_WAIT_OBJECTS);
|
||||
#ifndef Q_OS_WINRT
|
||||
ret = WaitForMultipleObjects(count, handlesCopy.constData() + offset, false, 100);
|
||||
#else
|
||||
ret = WaitForMultipleObjectsEx(count, handlesCopy.constData() + offset, false, 100, false);
|
||||
#endif
|
||||
loop = (loop + 1) % loops;
|
||||
} while (ret == WAIT_TIMEOUT);
|
||||
}
|
||||
|
@ -263,7 +282,7 @@ DWORD WINAPI qt_adopted_thread_watcher_function(LPVOID)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC) && !defined(Q_OS_WINCE)
|
||||
#if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
|
||||
|
||||
#ifndef Q_OS_WIN64
|
||||
# define ULONG_PTR DWORD
|
||||
|
@ -293,7 +312,7 @@ void qt_set_thread_name(HANDLE threadId, LPCSTR threadName)
|
|||
{
|
||||
}
|
||||
}
|
||||
#endif // !QT_NO_DEBUG && Q_CC_MSVC && !Q_OS_WINCE
|
||||
#endif // !QT_NO_DEBUG && Q_CC_MSVC && !Q_OS_WINCE && !Q_OS_WINRT
|
||||
|
||||
/**************************************************************************
|
||||
** QThreadPrivate
|
||||
|
@ -303,7 +322,11 @@ void qt_set_thread_name(HANDLE threadId, LPCSTR threadName)
|
|||
|
||||
void QThreadPrivate::createEventDispatcher(QThreadData *data)
|
||||
{
|
||||
#ifndef Q_OS_WINRT
|
||||
QEventDispatcherWin32 *theEventDispatcher = new QEventDispatcherWin32;
|
||||
#else
|
||||
QEventDispatcherWinRT *theEventDispatcher = new QEventDispatcherWinRT;
|
||||
#endif
|
||||
data->eventDispatcher.storeRelease(theEventDispatcher);
|
||||
theEventDispatcher->startingUp();
|
||||
}
|
||||
|
@ -331,7 +354,7 @@ unsigned int __stdcall QT_ENSURE_STACK_ALIGNED_FOR_SSE QThreadPrivate::start(voi
|
|||
else
|
||||
createEventDispatcher(data);
|
||||
|
||||
#if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC) && !defined(Q_OS_WINCE)
|
||||
#if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
|
||||
// sets the name of the current thread.
|
||||
QByteArray objectName = thr->objectName().toLocal8Bit();
|
||||
qt_set_thread_name((HANDLE)-1,
|
||||
|
@ -396,13 +419,17 @@ Qt::HANDLE QThread::currentThreadId() Q_DECL_NOTHROW
|
|||
int QThread::idealThreadCount() Q_DECL_NOTHROW
|
||||
{
|
||||
SYSTEM_INFO sysinfo;
|
||||
#ifndef Q_OS_WINRT
|
||||
GetSystemInfo(&sysinfo);
|
||||
#else
|
||||
GetNativeSystemInfo(&sysinfo);
|
||||
#endif
|
||||
return sysinfo.dwNumberOfProcessors;
|
||||
}
|
||||
|
||||
void QThread::yieldCurrentThread()
|
||||
{
|
||||
#ifndef Q_OS_WINCE
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
|
||||
SwitchToThread();
|
||||
#else
|
||||
::Sleep(0);
|
||||
|
@ -444,6 +471,7 @@ void QThread::start(Priority priority)
|
|||
d->returnCode = 0;
|
||||
d->interruptionRequested = false;
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
/*
|
||||
NOTE: we create the thread in the suspended state, set the
|
||||
priority and then resume the thread.
|
||||
|
@ -456,6 +484,10 @@ void QThread::start(Priority priority)
|
|||
*/
|
||||
d->handle = (Qt::HANDLE) _beginthreadex(NULL, d->stackSize, QThreadPrivate::start,
|
||||
this, CREATE_SUSPENDED, &(d->id));
|
||||
#else // !Q_OS_WINRT
|
||||
d->handle = (Qt::HANDLE) CreateThread(NULL, d->stackSize, (LPTHREAD_START_ROUTINE)QThreadPrivate::start,
|
||||
this, CREATE_SUSPENDED, reinterpret_cast<LPDWORD>(&d->id));
|
||||
#endif // Q_OS_WINRT
|
||||
|
||||
if (!d->handle) {
|
||||
qErrnoWarning(errno, "QThread::start: Failed to create thread");
|
||||
|
@ -521,7 +553,10 @@ void QThread::terminate()
|
|||
return;
|
||||
}
|
||||
|
||||
// Calling ExitThread() in setTerminationEnabled is all we can do on WinRT
|
||||
#ifndef Q_OS_WINRT
|
||||
TerminateThread(d->handle, 0);
|
||||
#endif
|
||||
QThreadPrivate::finish(this, false);
|
||||
}
|
||||
|
||||
|
@ -541,7 +576,11 @@ bool QThread::wait(unsigned long time)
|
|||
locker.mutex()->unlock();
|
||||
|
||||
bool ret = false;
|
||||
#ifndef Q_OS_WINRT
|
||||
switch (WaitForSingleObject(d->handle, time)) {
|
||||
#else
|
||||
switch (WaitForSingleObjectEx(d->handle, time, false)) {
|
||||
#endif
|
||||
case WAIT_OBJECT_0:
|
||||
ret = true;
|
||||
break;
|
||||
|
@ -582,7 +621,11 @@ void QThread::setTerminationEnabled(bool enabled)
|
|||
if (enabled && d->terminatePending) {
|
||||
QThreadPrivate::finish(thr, false);
|
||||
locker.unlock(); // don't leave the mutex locked!
|
||||
#ifndef Q_OS_WINRT
|
||||
_endthreadex(0);
|
||||
#else
|
||||
ExitThread(0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,450 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module 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$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qthread.h"
|
||||
#include "qthread_p.h"
|
||||
#include "qthreadstorage.h"
|
||||
|
||||
#include <QtCore/QElapsedTimer>
|
||||
#include <QtCore/QUuid>
|
||||
#include <QtCore/qt_windows.h>
|
||||
#include <QtCore/qfunctions_winrt.h>
|
||||
#include <QtCore/private/qcoreapplication_p.h>
|
||||
#include <QtCore/private/qeventdispatcher_winrt_p.h>
|
||||
|
||||
#include <wrl.h>
|
||||
#include <windows.system.threading.h>
|
||||
#include <windows.system.threading.core.h>
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Microsoft::WRL::Wrappers;
|
||||
using namespace ABI::Windows::Foundation;
|
||||
using namespace ABI::Windows::System::Threading;
|
||||
using namespace ABI::Windows::System::Threading::Core;
|
||||
|
||||
#ifndef QT_NO_THREAD
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
static WorkItemPriority nativePriority(QThread::Priority priority)
|
||||
{
|
||||
switch (priority) {
|
||||
default:
|
||||
case QThread::NormalPriority:
|
||||
return WorkItemPriority_Normal;
|
||||
case QThread::IdlePriority:
|
||||
case QThread::LowestPriority:
|
||||
case QThread::LowPriority:
|
||||
return WorkItemPriority_Low;
|
||||
case QThread::HighPriority:
|
||||
case QThread::HighestPriority:
|
||||
case QThread::TimeCriticalPriority:
|
||||
return WorkItemPriority_High;
|
||||
}
|
||||
}
|
||||
|
||||
class QWinRTThreadGlobal
|
||||
{
|
||||
public:
|
||||
QWinRTThreadGlobal()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
hr = RoGetActivationFactory(
|
||||
HString::MakeReference(RuntimeClass_Windows_System_Threading_Core_PreallocatedWorkItem).Get(),
|
||||
IID_PPV_ARGS(&workItemFactory));
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
|
||||
hr = RoGetActivationFactory(
|
||||
HString::MakeReference(RuntimeClass_Windows_System_Threading_Core_SignalNotifier).Get(),
|
||||
IID_PPV_ARGS(¬ifierFactory));
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
|
||||
QString eventName = QUuid::createUuid().toString();
|
||||
dispatchEvent = CreateEventEx(NULL, reinterpret_cast<LPCWSTR>(eventName.utf16()), 0, EVENT_ALL_ACCESS);
|
||||
|
||||
hr = notifierFactory->AttachToEvent(
|
||||
HStringReference(reinterpret_cast<LPCWSTR>(eventName.utf16())).Get(),
|
||||
Callback<ISignalHandler>(this, &QWinRTThreadGlobal::dispatch).Get(), ¬ifier);
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
hr = notifier->Enable();
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
}
|
||||
|
||||
~QWinRTThreadGlobal()
|
||||
{
|
||||
CloseHandle(dispatchEvent);
|
||||
}
|
||||
|
||||
void dispatch()
|
||||
{
|
||||
SetEvent(dispatchEvent);
|
||||
}
|
||||
|
||||
void push(QThreadPrivate *d)
|
||||
{
|
||||
threads.append(d);
|
||||
}
|
||||
|
||||
private:
|
||||
HRESULT dispatch(ISignalNotifier *notifier, boolean timedOut)
|
||||
{
|
||||
Q_UNUSED(timedOut);
|
||||
notifier->Enable();
|
||||
if (threads.isEmpty())
|
||||
return S_OK;
|
||||
|
||||
QThreadPrivate *thread = threads.takeFirst();
|
||||
ComPtr<IPreallocatedWorkItem> workItem;
|
||||
HRESULT hr = workItemFactory->CreateWorkItemWithPriority(
|
||||
Callback<IWorkItemHandler>(thread, &QThreadPrivate::start).Get(),
|
||||
nativePriority(thread->priority), &workItem);
|
||||
if (FAILED(hr)) {
|
||||
qErrnoWarning(hr, "Failed to create thread work item");
|
||||
thread->finish();
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = workItem->RunAsync(&thread->handle);
|
||||
if (FAILED(hr)) {
|
||||
qErrnoWarning(hr, "Failed to run work item");
|
||||
thread->finish();
|
||||
return hr;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HANDLE dispatchEvent;
|
||||
ComPtr<ISignalNotifier> notifier;
|
||||
ComPtr<ISignalNotifierStatics> notifierFactory;
|
||||
ComPtr<IPreallocatedWorkItemFactory> workItemFactory;
|
||||
|
||||
QList<QThreadPrivate *> threads;
|
||||
};
|
||||
Q_GLOBAL_STATIC(QWinRTThreadGlobal, g)
|
||||
|
||||
/**************************************************************************
|
||||
** QThreadData
|
||||
*************************************************************************/
|
||||
|
||||
__declspec(thread) static QThreadData *qt_current_thread_data = 0;
|
||||
|
||||
void QThreadData::clearCurrentThreadData()
|
||||
{
|
||||
qt_current_thread_data = 0;
|
||||
}
|
||||
|
||||
QThreadData *QThreadData::current(bool createIfNecessary)
|
||||
{
|
||||
static bool winmainThread = true;
|
||||
QThreadData *threadData = qt_current_thread_data;
|
||||
if (!threadData && createIfNecessary) {
|
||||
threadData = new QThreadData;
|
||||
// This needs to be called prior to new AdoptedThread() to
|
||||
// avoid recursion.
|
||||
qt_current_thread_data = threadData;
|
||||
QT_TRY {
|
||||
threadData->thread = new QAdoptedThread(threadData);
|
||||
} QT_CATCH(...) {
|
||||
qt_current_thread_data = 0;
|
||||
threadData->deref();
|
||||
threadData = 0;
|
||||
QT_RETHROW;
|
||||
}
|
||||
threadData->deref();
|
||||
threadData->isAdopted = true;
|
||||
threadData->threadId = reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId());
|
||||
|
||||
if (!QCoreApplicationPrivate::theMainThread && !winmainThread)
|
||||
QCoreApplicationPrivate::theMainThread = threadData->thread;
|
||||
|
||||
if (winmainThread) {
|
||||
g->dispatch();
|
||||
threadData->thread->d_func()->createEventDispatcher(threadData);
|
||||
winmainThread = false;
|
||||
}
|
||||
}
|
||||
|
||||
return threadData;
|
||||
}
|
||||
|
||||
void QAdoptedThread::init()
|
||||
{
|
||||
Q_D(QThread);
|
||||
|
||||
d->handle = Q_NULLPTR;
|
||||
d->id = 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
** QThreadPrivate
|
||||
*************************************************************************/
|
||||
|
||||
#endif // QT_NO_THREAD
|
||||
|
||||
void QThreadPrivate::createEventDispatcher(QThreadData *data)
|
||||
{
|
||||
QEventDispatcherWinRT *eventDispatcher = new QEventDispatcherWinRT;
|
||||
data->eventDispatcher.storeRelease(eventDispatcher);
|
||||
eventDispatcher->startingUp();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_THREAD
|
||||
|
||||
HRESULT QThreadPrivate::start(IAsyncAction *)
|
||||
{
|
||||
Q_Q(QThread);
|
||||
|
||||
qt_current_thread_data = data;
|
||||
id = GetCurrentThreadId();
|
||||
data->threadId = reinterpret_cast<Qt::HANDLE>(id);
|
||||
QThread::setTerminationEnabled(false);
|
||||
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
data->quitNow = exited;
|
||||
}
|
||||
|
||||
if (data->eventDispatcher.load())
|
||||
data->eventDispatcher.load()->startingUp();
|
||||
else
|
||||
createEventDispatcher(data);
|
||||
|
||||
running = true;
|
||||
emit q->started(QThread::QPrivateSignal());
|
||||
|
||||
QThread::setTerminationEnabled(true);
|
||||
|
||||
q->run();
|
||||
|
||||
finish();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void QThreadPrivate::finish(bool lockAnyway)
|
||||
{
|
||||
Q_Q(QThread);
|
||||
|
||||
QMutexLocker locker(lockAnyway ? &mutex : 0);
|
||||
isInFinish = true;
|
||||
priority = QThread::InheritPriority;
|
||||
void **tls_data = reinterpret_cast<void **>(&data->tls);
|
||||
locker.unlock();
|
||||
emit q->finished(QThread::QPrivateSignal());
|
||||
QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
|
||||
QThreadStorageData::finish(tls_data);
|
||||
locker.relock();
|
||||
|
||||
QAbstractEventDispatcher *eventDispatcher = data->eventDispatcher.load();
|
||||
if (eventDispatcher) {
|
||||
data->eventDispatcher = 0;
|
||||
locker.unlock();
|
||||
eventDispatcher->closingDown();
|
||||
delete eventDispatcher;
|
||||
locker.relock();
|
||||
}
|
||||
|
||||
running = false;
|
||||
finished = true;
|
||||
isInFinish = false;
|
||||
interruptionRequested = false;
|
||||
|
||||
if (!waiters) {
|
||||
if (handle)
|
||||
handle->Release();
|
||||
handle = Q_NULLPTR;
|
||||
}
|
||||
|
||||
id = 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
** QThread
|
||||
*************************************************************************/
|
||||
|
||||
Qt::HANDLE QThread::currentThreadId() Q_DECL_NOTHROW
|
||||
{
|
||||
return reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId());
|
||||
}
|
||||
|
||||
int QThread::idealThreadCount() Q_DECL_NOTHROW
|
||||
{
|
||||
SYSTEM_INFO sysinfo;
|
||||
GetNativeSystemInfo(&sysinfo);
|
||||
return sysinfo.dwNumberOfProcessors;
|
||||
}
|
||||
|
||||
void QThread::yieldCurrentThread()
|
||||
{
|
||||
msleep(1);
|
||||
}
|
||||
|
||||
void QThread::sleep(unsigned long secs)
|
||||
{
|
||||
msleep(secs * 1000);
|
||||
}
|
||||
|
||||
void QThread::msleep(unsigned long msecs)
|
||||
{
|
||||
WaitForSingleObjectEx(GetCurrentThread(), msecs, FALSE);
|
||||
}
|
||||
|
||||
void QThread::usleep(unsigned long usecs)
|
||||
{
|
||||
msleep((usecs / 1000) + 1);
|
||||
}
|
||||
|
||||
void QThread::start(Priority priority)
|
||||
{
|
||||
Q_D(QThread);
|
||||
QMutexLocker locker(&d->mutex);
|
||||
|
||||
if (d->isInFinish) {
|
||||
locker.unlock();
|
||||
wait();
|
||||
locker.relock();
|
||||
}
|
||||
|
||||
if (d->running)
|
||||
return;
|
||||
|
||||
d->finished = false;
|
||||
d->exited = false;
|
||||
d->returnCode = 0;
|
||||
d->interruptionRequested = false;
|
||||
d->priority = priority == QThread::InheritPriority ? currentThread()->priority() : priority;
|
||||
g->push(d);
|
||||
g->dispatch();
|
||||
|
||||
locker.unlock();
|
||||
while (!d->running && !d->finished) {
|
||||
QAbstractEventDispatcher *eventDispatcher = QThread::currentThread()->eventDispatcher();
|
||||
if (eventDispatcher)
|
||||
eventDispatcher->processEvents(QEventLoop::AllEvents);
|
||||
else
|
||||
yieldCurrentThread();
|
||||
}
|
||||
}
|
||||
|
||||
void QThread::terminate()
|
||||
{
|
||||
Q_D(QThread);
|
||||
QMutexLocker locker(&d->mutex);
|
||||
if (!d->running)
|
||||
return;
|
||||
if (!d->terminationEnabled) {
|
||||
d->terminatePending = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (d->handle) {
|
||||
ComPtr<IAsyncInfo> info;
|
||||
HRESULT hr = d->handle->QueryInterface(IID_PPV_ARGS(&info));
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
hr = info->Cancel();
|
||||
if (FAILED(hr))
|
||||
qErrnoWarning(hr, "Failed to cancel thread action");
|
||||
}
|
||||
|
||||
d->finish(false);
|
||||
}
|
||||
|
||||
bool QThread::wait(unsigned long time)
|
||||
{
|
||||
Q_D(QThread);
|
||||
QMutexLocker locker(&d->mutex);
|
||||
|
||||
if (d->id == GetCurrentThreadId()) {
|
||||
qWarning("QThread::wait: Thread tried to wait on itself");
|
||||
return false;
|
||||
}
|
||||
if (d->finished || !d->running)
|
||||
return true;
|
||||
|
||||
++d->waiters;
|
||||
locker.mutex()->unlock();
|
||||
|
||||
// Alternatively, we could check the handle
|
||||
bool ret = false;
|
||||
if (!d->finished) {
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
while (timer.elapsed() < time && !d->finished)
|
||||
yieldCurrentThread();
|
||||
|
||||
ret = d->finished;
|
||||
}
|
||||
|
||||
locker.mutex()->lock();
|
||||
--d->waiters;
|
||||
|
||||
if (ret && !d->finished) {
|
||||
// thread was terminated by someone else
|
||||
|
||||
d->finish(false);
|
||||
}
|
||||
|
||||
if (d->finished && !d->waiters) {
|
||||
if (d->handle)
|
||||
d->handle->Release();
|
||||
d->handle = Q_NULLPTR;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void QThread::setTerminationEnabled(bool enabled)
|
||||
{
|
||||
QThread *thr = currentThread();
|
||||
Q_ASSERT_X(thr != 0, "QThread::setTerminationEnabled()",
|
||||
"Current thread was not started with QThread.");
|
||||
QThreadPrivate *d = thr->d_func();
|
||||
QMutexLocker locker(&d->mutex);
|
||||
d->terminationEnabled = enabled;
|
||||
if (enabled && d->terminatePending) {
|
||||
d->finish(false);
|
||||
locker.unlock(); // don't leave the mutex locked!
|
||||
}
|
||||
}
|
||||
|
||||
// Caller must hold the mutex
|
||||
void QThreadPrivate::setPriority(QThread::Priority threadPriority)
|
||||
{
|
||||
if (running)
|
||||
qWarning("WinRT threads can't change priority while running.");
|
||||
|
||||
priority = threadPriority;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif // QT_NO_THREAD
|
|
@ -50,11 +50,6 @@ win32:SOURCES += thread/qmutex_win.cpp \
|
|||
thread/qthread_win.cpp \
|
||||
thread/qwaitcondition_win.cpp
|
||||
|
||||
winrt {
|
||||
SOURCES -= thread/qthread_win.cpp
|
||||
SOURCES += thread/qthread_winrt.cpp
|
||||
}
|
||||
|
||||
integrity:SOURCES += thread/qmutex_unix.cpp \
|
||||
thread/qthread_unix.cpp \
|
||||
thread/qwaitcondition_unix.cpp
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
StandaloneFormat
|
||||
};
|
||||
private:
|
||||
Q_DECL_CONSTEXPR QDate(qint64 julianDay) : jd(julianDay) {}
|
||||
explicit Q_DECL_CONSTEXPR QDate(qint64 julianDay) : jd(julianDay) {}
|
||||
public:
|
||||
Q_DECL_CONSTEXPR QDate() : jd(nullJd()) {}
|
||||
QDate(int y, int m, int d);
|
||||
|
@ -138,7 +138,7 @@ Q_DECLARE_TYPEINFO(QDate, Q_MOVABLE_TYPE);
|
|||
|
||||
class Q_CORE_EXPORT QTime
|
||||
{
|
||||
Q_DECL_CONSTEXPR QTime(int ms) : mds(ms)
|
||||
explicit Q_DECL_CONSTEXPR QTime(int ms) : mds(ms)
|
||||
#if defined(Q_OS_WINCE)
|
||||
, startTick(NullTime)
|
||||
#endif
|
||||
|
|
|
@ -3522,7 +3522,7 @@ QString QLocale::toCurrencyString(double value, const QString &symbol) const
|
|||
\since 4.8
|
||||
|
||||
Returns an ordered list of locale names for translation purposes in
|
||||
preference order (like "en", "en-US", "en-Latn-US").
|
||||
preference order (like "en-Latn-US", "en-US", "en").
|
||||
|
||||
The return value represents locale names that the user expects to see the
|
||||
UI translation in.
|
||||
|
|
|
@ -7264,6 +7264,25 @@ QString QString::arg(const QString &a, int fieldWidth, QChar fillChar) const
|
|||
difference if \a a1 contains e.g. \c{%1}:
|
||||
|
||||
\snippet qstring/main.cpp 13
|
||||
|
||||
A similar problem occurs when the numbered place markers are not
|
||||
white space separated:
|
||||
|
||||
\snippet qstring/main.cpp 12
|
||||
\snippet qstring/main.cpp 97
|
||||
|
||||
Let's look at the substitutions:
|
||||
\list
|
||||
\li First, \c Hello replaces \c {%1} so the string becomes \c {"Hello%3%2"}.
|
||||
\li Then, \c 20 replaces \c {%2} so the string becomes \c {"Hello%320"}.
|
||||
\li Since the maximum numbered place marker value is 99, \c 50 replaces \c {%32}.
|
||||
\endlist
|
||||
Thus the string finally becomes \c {"Hello500"}.
|
||||
|
||||
In such cases, the following yields the expected results:
|
||||
|
||||
\snippet qstring/main.cpp 12
|
||||
\snippet qstring/main.cpp 98
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
|
|
@ -16,7 +16,7 @@ contains(QT_CONFIG, dbus-linked) {
|
|||
}
|
||||
|
||||
win32 {
|
||||
wince*:LIBS_PRIVATE += -lws2
|
||||
wince: LIBS_PRIVATE += -lws2
|
||||
else:LIBS_PRIVATE += -lws2_32 \
|
||||
-ladvapi32 \
|
||||
-lnetapi32 \
|
||||
|
|
|
@ -216,6 +216,7 @@ void QDBusAbstractInterfacePrivate::_q_serviceOwnerChanged(const QString &name,
|
|||
const QString &newOwner)
|
||||
{
|
||||
Q_UNUSED(oldOwner);
|
||||
Q_UNUSED(name);
|
||||
//qDebug() << "QDBusAbstractInterfacePrivate serviceOwnerChanged" << name << oldOwner << newOwner;
|
||||
if (name == service) {
|
||||
currentOwner = newOwner;
|
||||
|
|
|
@ -85,7 +85,7 @@ QT_BEGIN_NAMESPACE
|
|||
to replace or extend the default behavior of the static functions
|
||||
in QAccessible.
|
||||
|
||||
Qt supports Microsoft Active Accessibility (MSAA), Mac OS X
|
||||
Qt supports Microsoft Active Accessibility (MSAA), OS X
|
||||
Accessibility, and the Unix/X11 AT-SPI standard. Other backends
|
||||
can be supported using QAccessibleBridge.
|
||||
|
||||
|
@ -2833,7 +2833,7 @@ const QString &QAccessibleActionInterface::toggleAction()
|
|||
Returns the name of the scroll left default action.
|
||||
\sa actionNames(), localizedActionName()
|
||||
*/
|
||||
const QString &QAccessibleActionInterface::scrollLeftAction()
|
||||
QString QAccessibleActionInterface::scrollLeftAction()
|
||||
{
|
||||
return accessibleActionStrings()->scrollLeftAction;
|
||||
}
|
||||
|
@ -2842,7 +2842,7 @@ const QString &QAccessibleActionInterface::scrollLeftAction()
|
|||
Returns the name of the scroll right default action.
|
||||
\sa actionNames(), localizedActionName()
|
||||
*/
|
||||
const QString &QAccessibleActionInterface::scrollRightAction()
|
||||
QString QAccessibleActionInterface::scrollRightAction()
|
||||
{
|
||||
return accessibleActionStrings()->scrollRightAction;
|
||||
}
|
||||
|
@ -2851,7 +2851,7 @@ const QString &QAccessibleActionInterface::scrollRightAction()
|
|||
Returns the name of the scroll up default action.
|
||||
\sa actionNames(), localizedActionName()
|
||||
*/
|
||||
const QString &QAccessibleActionInterface::scrollUpAction()
|
||||
QString QAccessibleActionInterface::scrollUpAction()
|
||||
{
|
||||
return accessibleActionStrings()->scrollUpAction;
|
||||
}
|
||||
|
@ -2860,7 +2860,7 @@ const QString &QAccessibleActionInterface::scrollUpAction()
|
|||
Returns the name of the scroll down default action.
|
||||
\sa actionNames(), localizedActionName()
|
||||
*/
|
||||
const QString &QAccessibleActionInterface::scrollDownAction()
|
||||
QString QAccessibleActionInterface::scrollDownAction()
|
||||
{
|
||||
return accessibleActionStrings()->scrollDownAction;
|
||||
}
|
||||
|
@ -2869,7 +2869,7 @@ const QString &QAccessibleActionInterface::scrollDownAction()
|
|||
Returns the name of the previous page default action.
|
||||
\sa actionNames(), localizedActionName()
|
||||
*/
|
||||
const QString &QAccessibleActionInterface::previousPageAction()
|
||||
QString QAccessibleActionInterface::previousPageAction()
|
||||
{
|
||||
return accessibleActionStrings()->previousPageAction;
|
||||
}
|
||||
|
@ -2878,7 +2878,7 @@ const QString &QAccessibleActionInterface::previousPageAction()
|
|||
Returns the name of the next page default action.
|
||||
\sa actionNames(), localizedActionName()
|
||||
*/
|
||||
const QString &QAccessibleActionInterface::nextPageAction()
|
||||
QString QAccessibleActionInterface::nextPageAction()
|
||||
{
|
||||
return accessibleActionStrings()->nextPageAction;
|
||||
}
|
||||
|
|
|
@ -635,12 +635,12 @@ public:
|
|||
static const QString &showMenuAction();
|
||||
static const QString &setFocusAction();
|
||||
static const QString &toggleAction();
|
||||
static const QString &scrollLeftAction();
|
||||
static const QString &scrollRightAction();
|
||||
static const QString &scrollUpAction();
|
||||
static const QString &scrollDownAction();
|
||||
static const QString &nextPageAction();
|
||||
static const QString &previousPageAction();
|
||||
static QString scrollLeftAction();
|
||||
static QString scrollRightAction();
|
||||
static QString scrollUpAction();
|
||||
static QString scrollDownAction();
|
||||
static QString nextPageAction();
|
||||
static QString previousPageAction();
|
||||
};
|
||||
|
||||
class Q_GUI_EXPORT QAccessibleImageInterface
|
||||
|
|
|
@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
|
|||
\ingroup accessibility
|
||||
\inmodule QtWidgets
|
||||
|
||||
Qt supports Microsoft Active Accessibility (MSAA), Mac OS X
|
||||
Qt supports Microsoft Active Accessibility (MSAA), OS X
|
||||
Accessibility, and the Unix/X11 AT-SPI standard. By subclassing
|
||||
QAccessibleBridge, you can support other backends than the
|
||||
predefined ones.
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -257,3 +257,23 @@ glDisable(GL_SCISSOR_TEST);
|
|||
|
||||
painter.endNativePainting();
|
||||
//! [21]
|
||||
|
||||
//! [drawText]
|
||||
QPainter painter(this);
|
||||
QFont font = painter.font();
|
||||
font.setPixelSize(48);
|
||||
painter.setFont(font);
|
||||
|
||||
const QRect rectangle = QRect(0, 0, 100, 50);
|
||||
QRect boundingRect;
|
||||
painter.drawText(rectangle, 0, tr("Hello"), &boundingRect);
|
||||
|
||||
QPen pen = painter.pen();
|
||||
pen.setStyle(Qt::DotLine);
|
||||
painter.setPen(pen);
|
||||
painter.drawRect(boundingRect.adjusted(0, 0, -pen.width(), -pen.width()));
|
||||
|
||||
pen.setStyle(Qt::DashLine);
|
||||
painter.setPen(pen);
|
||||
painter.drawRect(rectangle.adjusted(0, 0, -pen.width(), -pen.width()));
|
||||
//! [drawText]
|
||||
|
|
|
@ -874,7 +874,7 @@
|
|||
The following table lists the HTML tags supported by Qt's
|
||||
\l{Rich Text Processing}{rich text} engine:
|
||||
|
||||
\table
|
||||
\table 70%
|
||||
\header \li Tag
|
||||
\li Description
|
||||
\li Comment
|
||||
|
|
|
@ -1170,7 +1170,8 @@ QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback)
|
|||
icon = *qtIconCache()->object(name);
|
||||
} else {
|
||||
QPlatformTheme * const platformTheme = QGuiApplicationPrivate::platformTheme();
|
||||
QIconEngine * const engine = platformTheme ? platformTheme->createIconEngine(name)
|
||||
bool hasUserTheme = QIconLoader::instance()->hasUserTheme();
|
||||
QIconEngine * const engine = (platformTheme && !hasUserTheme) ? platformTheme->createIconEngine(name)
|
||||
: new QIconLoaderEngine(name);
|
||||
QIcon *cachedIcon = new QIcon(engine);
|
||||
icon = *cachedIcon;
|
||||
|
|
|
@ -173,6 +173,7 @@ public:
|
|||
void updateSystemTheme();
|
||||
void invalidateKey() { m_themeKey++; }
|
||||
void ensureInitialized();
|
||||
bool hasUserTheme() const { return !m_userTheme.isEmpty(); }
|
||||
|
||||
private:
|
||||
QThemeIconInfo findIconHelper(const QString &themeName,
|
||||
|
|
|
@ -116,7 +116,7 @@ void qInitImageConversions();
|
|||
const uchar *qt_get_bitflip_array();
|
||||
Q_GUI_EXPORT void qGamma_correct_back_to_linear_cs(QImage *image);
|
||||
|
||||
#if defined(Q_OS_WINRT) && defined(_M_ARM) // QTBUG-42038
|
||||
#if defined(_M_ARM) // QTBUG-42038
|
||||
#pragma optimize("", off)
|
||||
#endif
|
||||
inline int qt_depthForFormat(QImage::Format format)
|
||||
|
@ -163,7 +163,7 @@ inline int qt_depthForFormat(QImage::Format format)
|
|||
}
|
||||
return depth;
|
||||
}
|
||||
#if defined(Q_OS_WINRT) && defined(_M_ARM)
|
||||
#if defined(_M_ARM)
|
||||
#pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -929,8 +929,6 @@ bool QJpegHandlerPrivate::readJpegHeader(QIODevice *device)
|
|||
if (!exifData.isEmpty()) {
|
||||
// Exif data present
|
||||
int exifOrientation = getExifOrientation(exifData);
|
||||
if (exifOrientation == -1)
|
||||
return false;
|
||||
if (exifOrientation > 0)
|
||||
transformation = exif2Qt(exifOrientation);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue