Merge remote-tracking branch 'origin/5.5.0' into 5.5
Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.h Manually fixed src/testlib/qtestcase.cpp to return the right type. Change-Id: Id1634dbe3d73fefe9431b9f5378846cb187624e4
This commit is contained in:
commit
4dd8a63fc1
2
configure
vendored
2
configure
vendored
@ -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
|
||||
|
619
dist/changes-5.5.0
vendored
Normal file
619
dist/changes-5.5.0
vendored
Normal file
@ -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" \
|
||||
|
@ -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.
|
||||
# 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.
|
||||
if(!contains(target.path, "$$re_escape($$[QT_INSTALL_PREFIX])/.*")|\
|
||||
contains(target.path, "$$re_escape($$[QT_INSTALL_TESTS])/.*")) {
|
||||
QMAKE_RPATHDIR = $$[QT_INSTALL_LIBS]
|
||||
} else {
|
||||
!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]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
|
@ -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)");
|
||||
}
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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 {
|
||||
|
@ -571,6 +571,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]
|
||||
|
@ -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__ >= 6020049
|
||||
# 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
|
||||
@ -616,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) */
|
||||
|
@ -1128,6 +1128,7 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
||||
\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
|
||||
@ -1141,6 +1142,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
|
||||
@ -1151,6 +1153,11 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
||||
\value MV_IOS_7_0 iOS 7.0
|
||||
\value MV_IOS_7_1 iOS 7.1
|
||||
\value MV_IOS_8_0 iOS 8.0
|
||||
\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
|
||||
|
||||
@ -2735,6 +2742,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 = 0x000A,
|
||||
MV_10_9 = 0x000B,
|
||||
MV_10_10 = 0x000C,
|
||||
MV_10_11 = 0x000D,
|
||||
|
||||
/* 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,
|
||||
@ -160,7 +162,12 @@ public:
|
||||
MV_IOS_6_1 = Q_MV_IOS(6, 1),
|
||||
MV_IOS_7_0 = Q_MV_IOS(7, 0),
|
||||
MV_IOS_7_1 = Q_MV_IOS(7, 1),
|
||||
MV_IOS_8_0 = Q_MV_IOS(8, 0)
|
||||
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_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
|
||||
@ -270,6 +276,21 @@
|
||||
# if !defined(__IPHONE_8_0)
|
||||
# define __IPHONE_8_0 80000
|
||||
# endif
|
||||
# if !defined(__IPHONE_8_1)
|
||||
# define __IPHONE_8_1 80100
|
||||
# endif
|
||||
# if !defined(__IPHONE_8_2)
|
||||
# define __IPHONE_8_2 80200
|
||||
# endif
|
||||
# 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__
|
||||
|
@ -2053,7 +2053,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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
|
@ -1005,6 +1005,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()
|
||||
*/
|
||||
|
||||
|
@ -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 "
|
||||
|
@ -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,
|
||||
|
@ -2743,7 +2743,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;
|
||||
}
|
||||
@ -2752,7 +2752,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;
|
||||
}
|
||||
@ -2761,7 +2761,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;
|
||||
}
|
||||
@ -2770,7 +2770,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;
|
||||
}
|
||||
@ -2779,7 +2779,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;
|
||||
}
|
||||
@ -2788,7 +2788,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;
|
||||
}
|
||||
|
@ -636,12 +636,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
|
||||
|
@ -137,12 +137,6 @@ QVariant QPlatformDialogHelper::defaultStyleHint(QPlatformDialogHelper::StyleHi
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
void QPlatformDialogHelper::execModalForWindow(QWindow *parent)
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
exec();
|
||||
}
|
||||
|
||||
// Font dialog
|
||||
|
||||
class QFontDialogOptionsPrivate : public QSharedData
|
||||
|
@ -145,7 +145,6 @@ public:
|
||||
virtual QVariant styleHint(StyleHint hint) const;
|
||||
|
||||
virtual void exec() = 0;
|
||||
virtual void execModalForWindow(QWindow *parent);
|
||||
virtual bool show(Qt::WindowFlags windowFlags,
|
||||
Qt::WindowModality windowModality,
|
||||
QWindow *parent) = 0;
|
||||
|
@ -285,11 +285,23 @@ bool QNativeSocketEngine::connectToHostByName(const QString &name, quint16 port)
|
||||
return false;
|
||||
}
|
||||
d->socketState = QAbstractSocket::ConnectingState;
|
||||
hr = d->connectOp->put_Completed(Callback<IAsyncActionCompletedHandler>(
|
||||
d, &QNativeSocketEnginePrivate::handleConnectToHost).Get());
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
hr = QWinRTFunctions::await(d->connectOp);
|
||||
RETURN_FALSE_IF_FAILED("Connection could not be established");
|
||||
bool connectionErrors = false;
|
||||
d->handleConnectionErrors(d->connectOp.Get(), &connectionErrors);
|
||||
if (connectionErrors)
|
||||
return false;
|
||||
d->connectOp.Reset();
|
||||
|
||||
return d->socketState == QAbstractSocket::ConnectedState;
|
||||
d->socketState = QAbstractSocket::ConnectedState;
|
||||
emit connectionReady();
|
||||
|
||||
// Delay the reader so that the SSL socket can upgrade
|
||||
if (d->sslSocket)
|
||||
connect(d->sslSocket, SIGNAL(encrypted()), SLOT(establishRead()));
|
||||
else
|
||||
establishRead();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QNativeSocketEngine::bind(const QHostAddress &address, quint16 port)
|
||||
@ -1104,47 +1116,34 @@ HRESULT QNativeSocketEnginePrivate::handleClientConnection(IStreamSocketListener
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT QNativeSocketEnginePrivate::handleConnectToHost(IAsyncAction *action, AsyncStatus)
|
||||
void QNativeSocketEnginePrivate::handleConnectionErrors(IAsyncAction *connectAction, bool *errorsOccured)
|
||||
{
|
||||
Q_Q(QNativeSocketEngine);
|
||||
|
||||
HRESULT hr = action->GetResults();
|
||||
if (wasDeleted || !connectOp) // Protect against a late callback
|
||||
return S_OK;
|
||||
|
||||
connectOp.Reset();
|
||||
bool error = true;
|
||||
HRESULT hr = connectAction->GetResults();
|
||||
switch (hr) {
|
||||
case 0x8007274c: // A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
|
||||
setError(QAbstractSocket::NetworkError, ConnectionTimeOutErrorString);
|
||||
socketState = QAbstractSocket::UnconnectedState;
|
||||
return S_OK;
|
||||
break;
|
||||
case 0x80072751: // A socket operation was attempted to an unreachable host.
|
||||
setError(QAbstractSocket::HostNotFoundError, HostUnreachableErrorString);
|
||||
socketState = QAbstractSocket::UnconnectedState;
|
||||
return S_OK;
|
||||
break;
|
||||
case 0x8007274d: // No connection could be made because the target machine actively refused it.
|
||||
setError(QAbstractSocket::ConnectionRefusedError, ConnectionRefusedErrorString);
|
||||
socketState = QAbstractSocket::UnconnectedState;
|
||||
return S_OK;
|
||||
break;
|
||||
default:
|
||||
if (FAILED(hr)) {
|
||||
setError(QAbstractSocket::UnknownSocketError, UnknownSocketErrorString);
|
||||
socketState = QAbstractSocket::UnconnectedState;
|
||||
return S_OK;
|
||||
} else {
|
||||
error = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
socketState = QAbstractSocket::ConnectedState;
|
||||
emit q->connectionReady();
|
||||
|
||||
// Delay the reader so that the SSL socket can upgrade
|
||||
if (sslSocket)
|
||||
q->connect(sslSocket, SIGNAL(encrypted()), SLOT(establishRead()));
|
||||
else
|
||||
q->establishRead();
|
||||
|
||||
return S_OK;
|
||||
if (errorsOccured)
|
||||
*errorsOccured = error;
|
||||
}
|
||||
|
||||
HRESULT QNativeSocketEnginePrivate::handleReadyRead(IAsyncBufferOperation *asyncInfo, AsyncStatus status)
|
||||
|
@ -216,7 +216,7 @@ private:
|
||||
ABI::Windows::Networking::Sockets::IDatagramSocketMessageReceivedEventArgs *args);
|
||||
HRESULT handleClientConnection(ABI::Windows::Networking::Sockets::IStreamSocketListener *tcpListener,
|
||||
ABI::Windows::Networking::Sockets::IStreamSocketListenerConnectionReceivedEventArgs *args);
|
||||
HRESULT handleConnectToHost(ABI::Windows::Foundation::IAsyncAction *, ABI::Windows::Foundation::AsyncStatus);
|
||||
void handleConnectionErrors(ABI::Windows::Foundation::IAsyncAction *connectAction, bool *errorsOccured);
|
||||
HRESULT handleReadyRead(ABI::Windows::Foundation::IAsyncOperationWithProgress<ABI::Windows::Storage::Streams::IBuffer *, UINT32> *asyncInfo, ABI::Windows::Foundation::AsyncStatus);
|
||||
};
|
||||
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include "qsslcipher.h"
|
||||
#include "qsslcipher_p.h"
|
||||
#include "qsslsocket.h"
|
||||
#include "qsslconfiguration.h"
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
#include <QtCore/qdebug.h>
|
||||
@ -81,7 +82,7 @@ QSslCipher::QSslCipher()
|
||||
QSslCipher::QSslCipher(const QString &name)
|
||||
: d(new QSslCipherPrivate)
|
||||
{
|
||||
foreach (const QSslCipher &cipher, QSslSocket::supportedCiphers()) {
|
||||
foreach (const QSslCipher &cipher, QSslConfiguration::supportedCiphers()) {
|
||||
if (cipher.name() == name) {
|
||||
*this = cipher;
|
||||
return;
|
||||
@ -102,7 +103,7 @@ QSslCipher::QSslCipher(const QString &name)
|
||||
QSslCipher::QSslCipher(const QString &name, QSsl::SslProtocol protocol)
|
||||
: d(new QSslCipherPrivate)
|
||||
{
|
||||
foreach (const QSslCipher &cipher, QSslSocket::supportedCiphers()) {
|
||||
foreach (const QSslCipher &cipher, QSslConfiguration::supportedCiphers()) {
|
||||
if (cipher.name() == name && cipher.protocol() == protocol) {
|
||||
*this = cipher;
|
||||
return;
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "qsslconfiguration.h"
|
||||
#include "qsslconfiguration_p.h"
|
||||
#include "qsslsocket.h"
|
||||
#include "qsslsocket_p.h"
|
||||
#include "qmutex.h"
|
||||
#include "qdebug.h"
|
||||
|
||||
@ -589,6 +590,20 @@ void QSslConfiguration::setCiphers(const QList<QSslCipher> &ciphers)
|
||||
d->ciphers = ciphers;
|
||||
}
|
||||
|
||||
/*!
|
||||
\since 5.5
|
||||
|
||||
Returns the list of cryptographic ciphers supported by this
|
||||
system. This list is set by the system's SSL libraries and may
|
||||
vary from system to system.
|
||||
|
||||
\sa ciphers(), setCiphers()
|
||||
*/
|
||||
QList<QSslCipher> QSslConfiguration::supportedCiphers()
|
||||
{
|
||||
return QSslSocketPrivate::supportedCiphers();
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns this connection's CA certificate database. The CA certificate
|
||||
database is used by the socket during the handshake phase to
|
||||
@ -618,6 +633,22 @@ void QSslConfiguration::setCaCertificates(const QList<QSslCertificate> &certific
|
||||
d->allowRootCertOnDemandLoading = false;
|
||||
}
|
||||
|
||||
/*!
|
||||
\since 5.5
|
||||
|
||||
This function provides the CA certificate database
|
||||
provided by the operating system. The CA certificate database
|
||||
returned by this function is used to initialize the database
|
||||
returned by caCertificates() on the default QSslConfiguration.
|
||||
|
||||
\sa caCertificates(), setCaCertificates(), defaultConfiguration()
|
||||
*/
|
||||
QList<QSslCertificate> QSslConfiguration::systemCaCertificates()
|
||||
{
|
||||
// we are calling ensureInitialized() in the method below
|
||||
return QSslSocketPrivate::systemCaCertificates();
|
||||
}
|
||||
|
||||
/*!
|
||||
Enables or disables an SSL compatibility \a option. If \a on
|
||||
is true, the \a option is enabled. If \a on is false, the
|
||||
@ -743,6 +774,20 @@ void QSslConfiguration::setEllipticCurves(const QVector<QSslEllipticCurve> &curv
|
||||
d->ellipticCurves = curves;
|
||||
}
|
||||
|
||||
/*!
|
||||
\since 5.5
|
||||
|
||||
Returns the list of elliptic curves supported by this
|
||||
system. This list is set by the system's SSL libraries and may
|
||||
vary from system to system.
|
||||
|
||||
\sa ellipticCurves(), setEllipticCurves()
|
||||
*/
|
||||
QVector<QSslEllipticCurve> QSslConfiguration::supportedEllipticCurves()
|
||||
{
|
||||
return QSslSocketPrivate::supportedEllipticCurves();
|
||||
}
|
||||
|
||||
/*!
|
||||
\since 5.3
|
||||
|
||||
|
@ -111,10 +111,12 @@ public:
|
||||
// Cipher settings
|
||||
QList<QSslCipher> ciphers() const;
|
||||
void setCiphers(const QList<QSslCipher> &ciphers);
|
||||
static QList<QSslCipher> supportedCiphers();
|
||||
|
||||
// Certificate Authority (CA) settings
|
||||
QList<QSslCertificate> caCertificates() const;
|
||||
void setCaCertificates(const QList<QSslCertificate> &certificates);
|
||||
static QList<QSslCertificate> systemCaCertificates();
|
||||
|
||||
void setSslOption(QSsl::SslOption option, bool on);
|
||||
bool testSslOption(QSsl::SslOption option) const;
|
||||
@ -126,6 +128,7 @@ public:
|
||||
// EC settings
|
||||
QVector<QSslEllipticCurve> ellipticCurves() const;
|
||||
void setEllipticCurves(const QVector<QSslEllipticCurve> &curves);
|
||||
static QVector<QSslEllipticCurve> supportedEllipticCurves();
|
||||
|
||||
static QSslConfiguration defaultConfiguration();
|
||||
static void setDefaultConfiguration(const QSslConfiguration &configuration);
|
||||
|
@ -43,13 +43,13 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QSslPreSharedKeyAuthenticatorPrivate;
|
||||
|
||||
class Q_NETWORK_EXPORT QSslPreSharedKeyAuthenticator
|
||||
class QSslPreSharedKeyAuthenticator
|
||||
{
|
||||
public:
|
||||
QSslPreSharedKeyAuthenticator();
|
||||
~QSslPreSharedKeyAuthenticator();
|
||||
QSslPreSharedKeyAuthenticator(const QSslPreSharedKeyAuthenticator &authenticator);
|
||||
QSslPreSharedKeyAuthenticator &operator=(const QSslPreSharedKeyAuthenticator &authenticator);
|
||||
Q_NETWORK_EXPORT QSslPreSharedKeyAuthenticator();
|
||||
Q_NETWORK_EXPORT ~QSslPreSharedKeyAuthenticator();
|
||||
Q_NETWORK_EXPORT QSslPreSharedKeyAuthenticator(const QSslPreSharedKeyAuthenticator &authenticator);
|
||||
Q_NETWORK_EXPORT QSslPreSharedKeyAuthenticator &operator=(const QSslPreSharedKeyAuthenticator &authenticator);
|
||||
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
inline QSslPreSharedKeyAuthenticator &operator=(QSslPreSharedKeyAuthenticator &&authenticator)
|
||||
@ -61,15 +61,15 @@ public:
|
||||
d.swap(authenticator.d);
|
||||
}
|
||||
|
||||
QByteArray identityHint() const;
|
||||
Q_NETWORK_EXPORT QByteArray identityHint() const;
|
||||
|
||||
void setIdentity(const QByteArray &identity);
|
||||
QByteArray identity() const;
|
||||
int maximumIdentityLength() const;
|
||||
Q_NETWORK_EXPORT void setIdentity(const QByteArray &identity);
|
||||
Q_NETWORK_EXPORT QByteArray identity() const;
|
||||
Q_NETWORK_EXPORT int maximumIdentityLength() const;
|
||||
|
||||
void setPreSharedKey(const QByteArray &preSharedKey);
|
||||
QByteArray preSharedKey() const;
|
||||
int maximumPreSharedKeyLength() const;
|
||||
Q_NETWORK_EXPORT void setPreSharedKey(const QByteArray &preSharedKey);
|
||||
Q_NETWORK_EXPORT QByteArray preSharedKey() const;
|
||||
Q_NETWORK_EXPORT int maximumPreSharedKeyLength() const;
|
||||
|
||||
private:
|
||||
friend Q_NETWORK_EXPORT bool operator==(const QSslPreSharedKeyAuthenticator &lhs, const QSslPreSharedKeyAuthenticator &rhs);
|
||||
|
@ -1166,6 +1166,10 @@ QSslKey QSslSocket::privateKey() const
|
||||
}
|
||||
|
||||
/*!
|
||||
\deprecated
|
||||
|
||||
Use QSslConfiguration::ciphers() instead.
|
||||
|
||||
Returns this socket's current cryptographic cipher suite. This
|
||||
list is used during the socket's handshake phase for choosing a
|
||||
session cipher. The returned list of ciphers is ordered by
|
||||
@ -1197,6 +1201,10 @@ QList<QSslCipher> QSslSocket::ciphers() const
|
||||
}
|
||||
|
||||
/*!
|
||||
\deprecated
|
||||
|
||||
USe QSslConfiguration::setCiphers() instead.
|
||||
|
||||
Sets the cryptographic cipher suite for this socket to \a ciphers,
|
||||
which must contain a subset of the ciphers in the list returned by
|
||||
supportedCiphers().
|
||||
@ -1213,6 +1221,10 @@ void QSslSocket::setCiphers(const QList<QSslCipher> &ciphers)
|
||||
}
|
||||
|
||||
/*!
|
||||
\deprecated
|
||||
|
||||
Use QSslConfiguration::setCiphers() instead.
|
||||
|
||||
Sets the cryptographic cipher suite for this socket to \a ciphers, which
|
||||
is a colon-separated list of cipher suite names. The ciphers are listed in
|
||||
order of preference, starting with the most preferred cipher. For example:
|
||||
@ -1238,6 +1250,10 @@ void QSslSocket::setCiphers(const QString &ciphers)
|
||||
}
|
||||
|
||||
/*!
|
||||
\deprecated
|
||||
|
||||
Use QSslConfiguration::setCiphers() on the default QSslConfiguration instead.
|
||||
|
||||
Sets the default cryptographic cipher suite for all sockets in
|
||||
this application to \a ciphers, which must contain a subset of the
|
||||
ciphers in the list returned by supportedCiphers().
|
||||
@ -1254,6 +1270,10 @@ void QSslSocket::setDefaultCiphers(const QList<QSslCipher> &ciphers)
|
||||
}
|
||||
|
||||
/*!
|
||||
\deprecated
|
||||
|
||||
Use QSslConfiguration::ciphers() on the default QSslConfiguration instead.
|
||||
|
||||
Returns the default cryptographic cipher suite for all sockets in
|
||||
this application. This list is used during the socket's handshake
|
||||
phase when negotiating with the peer to choose a session cipher.
|
||||
@ -1273,6 +1293,10 @@ QList<QSslCipher> QSslSocket::defaultCiphers()
|
||||
}
|
||||
|
||||
/*!
|
||||
\deprecated
|
||||
|
||||
Use QSslConfiguration::supportedCiphers() instead.
|
||||
|
||||
Returns the list of cryptographic ciphers supported by this
|
||||
system. This list is set by the system's SSL libraries and may
|
||||
vary from system to system.
|
||||
@ -1284,120 +1308,6 @@ QList<QSslCipher> QSslSocket::supportedCiphers()
|
||||
return QSslSocketPrivate::supportedCiphers();
|
||||
}
|
||||
|
||||
/*!
|
||||
\since 5.5
|
||||
|
||||
Returns this socket's current list of elliptic curves. This
|
||||
list is used during the socket's handshake phase for choosing an
|
||||
elliptic curve (when using an elliptic curve cipher).
|
||||
The returned list of curves is ordered by descending preference
|
||||
(i.e., the first curve in the list is the most preferred one).
|
||||
|
||||
By default, this list is empty. An empty default list means that the
|
||||
handshake phase can choose any of the curves supported by this system's SSL
|
||||
libraries (which may vary from system to system). The list of curves
|
||||
supported by this system's SSL libraries is returned by
|
||||
supportedEllipticCurves().
|
||||
|
||||
You can restrict the list of curves used for choosing the session cipher
|
||||
for this socket by calling setEllipticCurves() with a subset of the
|
||||
supported ciphers. You can revert to using the entire set by calling
|
||||
setEllipticCurves() with the list returned by supportedEllipticCurves().
|
||||
|
||||
\sa setEllipticCurves(), defaultEllipticCurves(), setDefaultEllipticCurves(), supportedEllipticCurves()
|
||||
*/
|
||||
QVector<QSslEllipticCurve> QSslSocket::ellipticCurves() const
|
||||
{
|
||||
Q_D(const QSslSocket);
|
||||
return d->configuration.ellipticCurves;
|
||||
}
|
||||
|
||||
/*!
|
||||
\since 5.5
|
||||
|
||||
Sets the list of elliptic curves to be used by this socket to \a curves,
|
||||
which must contain a subset of the curves in the list returned by
|
||||
supportedEllipticCurves().
|
||||
|
||||
Restricting the elliptic curves must be done before the handshake
|
||||
phase, where the session cipher is chosen.
|
||||
|
||||
If an empty list is set, then the handshake phase can choose any of the
|
||||
curves supported by this system's SSL libraries (which may vary from system
|
||||
to system). The list of curves supported by this system's SSL libraries is
|
||||
returned by supportedEllipticCurves().
|
||||
|
||||
Use setCipher() in order to disable the usage of elliptic curve ciphers.
|
||||
|
||||
\sa ellipticCurves(), setDefaultEllipticCurves(), supportedEllipticCurves()
|
||||
*/
|
||||
void QSslSocket::setEllipticCurves(const QVector<QSslEllipticCurve> &curves)
|
||||
{
|
||||
Q_D(QSslSocket);
|
||||
d->configuration.ellipticCurves = curves;
|
||||
}
|
||||
|
||||
/*!
|
||||
\since 5.5
|
||||
|
||||
Sets the list of elliptic curves to be used by all sockets in this
|
||||
application to \a curves, which must contain a subset of the curves in the
|
||||
list returned by supportedEllipticCurves().
|
||||
|
||||
Restricting the default elliptic curves only affects SSL sockets
|
||||
that perform their handshake phase after the default list has been changed.
|
||||
|
||||
If an empty list is set, then the handshake phase can choose any of the
|
||||
curves supported by this system's SSL libraries (which may vary from system
|
||||
to system). The list of curves supported by this system's SSL libraries is
|
||||
returned by supportedEllipticCurves().
|
||||
|
||||
Use setDefaultCiphers() in order to disable the usage of elliptic curve ciphers.
|
||||
|
||||
\sa setEllipticCurves(), defaultEllipticCurves(), supportedEllipticCurves()
|
||||
*/
|
||||
void QSslSocket::setDefaultEllipticCurves(const QVector<QSslEllipticCurve> &curves)
|
||||
{
|
||||
QSslSocketPrivate::setDefaultEllipticCurves(curves);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\since 5.5
|
||||
|
||||
Returns the default elliptic curves list for all sockets in
|
||||
this application. This list is used during the socket's handshake
|
||||
phase when negotiating with the peer to choose a session cipher.
|
||||
The list is ordered by preference (i.e., the first curve in the
|
||||
list is the most preferred one).
|
||||
|
||||
By default, this list is empty. An empty default list means that the
|
||||
handshake phase can choose any of the curves supported by this system's SSL
|
||||
libraries (which may vary from system to system). The list of curves
|
||||
supported by this system's SSL libraries is returned by
|
||||
supportedEllipticCurves().
|
||||
|
||||
\sa setDefaultEllipticCurves(), supportedEllipticCurves()
|
||||
*/
|
||||
QVector<QSslEllipticCurve> QSslSocket::defaultEllipticCurves()
|
||||
{
|
||||
return QSslSocketPrivate::defaultEllipticCurves();
|
||||
}
|
||||
|
||||
/*!
|
||||
\since 5.5
|
||||
|
||||
Returns the list of elliptic curves supported by this
|
||||
system. This list is set by the system's SSL libraries and may
|
||||
vary from system to system.
|
||||
|
||||
\sa ellipticCurves(), setEllipticCurves(), defaultEllipticCurves()
|
||||
*/
|
||||
QVector<QSslEllipticCurve> QSslSocket::supportedEllipticCurves()
|
||||
{
|
||||
return QSslSocketPrivate::supportedEllipticCurves();
|
||||
}
|
||||
|
||||
/*!
|
||||
Searches all files in the \a path for certificates encoded in the
|
||||
specified \a format and adds them to this socket's CA certificate
|
||||
@ -1456,6 +1366,10 @@ void QSslSocket::addCaCertificates(const QList<QSslCertificate> &certificates)
|
||||
}
|
||||
|
||||
/*!
|
||||
\deprecated
|
||||
|
||||
Use QSslConfiguration::setCaCertificates() instead.
|
||||
|
||||
Sets this socket's CA certificate database to be \a certificates.
|
||||
The certificate database must be set prior to the SSL handshake.
|
||||
The CA certificate database is used by the socket during the
|
||||
@ -1475,6 +1389,10 @@ void QSslSocket::setCaCertificates(const QList<QSslCertificate> &certificates)
|
||||
}
|
||||
|
||||
/*!
|
||||
\deprecated
|
||||
|
||||
Use QSslConfiguration::caCertificates() instead.
|
||||
|
||||
Returns this socket's CA certificate database. The CA certificate
|
||||
database is used by the socket during the handshake phase to
|
||||
validate the peer's certificate. It can be moodified prior to the
|
||||
@ -1535,6 +1453,10 @@ void QSslSocket::addDefaultCaCertificates(const QList<QSslCertificate> &certific
|
||||
}
|
||||
|
||||
/*!
|
||||
\deprecated
|
||||
|
||||
Use QSslConfiguration::setCaCertificates() on the default QSslConfiguration instead.
|
||||
|
||||
Sets the default CA certificate database to \a certificates. The
|
||||
default CA certificate database is originally set to your system's
|
||||
default CA certificate database. You can override the default CA
|
||||
@ -1552,6 +1474,10 @@ void QSslSocket::setDefaultCaCertificates(const QList<QSslCertificate> &certific
|
||||
}
|
||||
|
||||
/*!
|
||||
\deprecated
|
||||
|
||||
Use QSslConfiguration::caCertificates() on the default QSslConfiguration instead.
|
||||
|
||||
Returns the current default CA certificate database. This database
|
||||
is originally set to your system's default CA certificate database.
|
||||
If no system default database is found, an empty database will be
|
||||
@ -1572,6 +1498,10 @@ QList<QSslCertificate> QSslSocket::defaultCaCertificates()
|
||||
}
|
||||
|
||||
/*!
|
||||
\deprecated
|
||||
|
||||
Use QSslConfiguration::systemDefaultCaCertificates instead.
|
||||
|
||||
This function provides the CA certificate database
|
||||
provided by the operating system. The CA certificate database
|
||||
returned by this function is used to initialize the database
|
||||
@ -2163,16 +2093,6 @@ void QSslSocketPrivate::setDefaultSupportedCiphers(const QList<QSslCipher> &ciph
|
||||
globalData()->supportedCiphers = ciphers;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
QVector<QSslEllipticCurve> QSslSocketPrivate::defaultEllipticCurves()
|
||||
{
|
||||
QSslSocketPrivate::ensureInitialized();
|
||||
const QMutexLocker locker(&globalData()->mutex);
|
||||
return globalData()->config->ellipticCurves;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
@ -2183,16 +2103,6 @@ QVector<QSslEllipticCurve> QSslSocketPrivate::supportedEllipticCurves()
|
||||
return globalData()->supportedEllipticCurves;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
void QSslSocketPrivate::setDefaultEllipticCurves(const QVector<QSslEllipticCurve> &curves)
|
||||
{
|
||||
const QMutexLocker locker(&globalData()->mutex);
|
||||
globalData()->config.detach();
|
||||
globalData()->config->ellipticCurves = curves;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
|
@ -144,34 +144,33 @@ public:
|
||||
QSslKey privateKey() const;
|
||||
|
||||
// Cipher settings.
|
||||
QList<QSslCipher> ciphers() const;
|
||||
void setCiphers(const QList<QSslCipher> &ciphers);
|
||||
void setCiphers(const QString &ciphers);
|
||||
static void setDefaultCiphers(const QList<QSslCipher> &ciphers);
|
||||
static QList<QSslCipher> defaultCiphers();
|
||||
static QList<QSslCipher> supportedCiphers();
|
||||
|
||||
// EC settings.
|
||||
QVector<QSslEllipticCurve> ellipticCurves() const;
|
||||
void setEllipticCurves(const QVector<QSslEllipticCurve> &curves);
|
||||
static void setDefaultEllipticCurves(const QVector<QSslEllipticCurve> &curves);
|
||||
static QVector<QSslEllipticCurve> defaultEllipticCurves();
|
||||
static QVector<QSslEllipticCurve> supportedEllipticCurves();
|
||||
#if QT_DEPRECATED_SINCE(5, 5)
|
||||
QT_DEPRECATED_X("Use QSslConfiguration::ciphers()") QList<QSslCipher> ciphers() const;
|
||||
QT_DEPRECATED_X("Use QSslConfiguration::setCiphers()") void setCiphers(const QList<QSslCipher> &ciphers);
|
||||
QT_DEPRECATED void setCiphers(const QString &ciphers);
|
||||
QT_DEPRECATED static void setDefaultCiphers(const QList<QSslCipher> &ciphers);
|
||||
QT_DEPRECATED static QList<QSslCipher> defaultCiphers();
|
||||
QT_DEPRECATED_X("Use QSslConfiguration::supportedCiphers()") static QList<QSslCipher> supportedCiphers();
|
||||
#endif // QT_DEPRECATED_SINCE(5, 5)
|
||||
|
||||
// CA settings.
|
||||
bool addCaCertificates(const QString &path, QSsl::EncodingFormat format = QSsl::Pem,
|
||||
QRegExp::PatternSyntax syntax = QRegExp::FixedString);
|
||||
void addCaCertificate(const QSslCertificate &certificate);
|
||||
void addCaCertificates(const QList<QSslCertificate> &certificates);
|
||||
void setCaCertificates(const QList<QSslCertificate> &certificates);
|
||||
QList<QSslCertificate> caCertificates() const;
|
||||
#if QT_DEPRECATED_SINCE(5, 5)
|
||||
QT_DEPRECATED_X("Use QSslConfiguration::setCaCertificates()") void setCaCertificates(const QList<QSslCertificate> &certificates);
|
||||
QT_DEPRECATED_X("Use QSslConfiguration::caCertificates()") QList<QSslCertificate> caCertificates() const;
|
||||
#endif // QT_DEPRECATED_SINCE(5, 5)
|
||||
static bool addDefaultCaCertificates(const QString &path, QSsl::EncodingFormat format = QSsl::Pem,
|
||||
QRegExp::PatternSyntax syntax = QRegExp::FixedString);
|
||||
static void addDefaultCaCertificate(const QSslCertificate &certificate);
|
||||
static void addDefaultCaCertificates(const QList<QSslCertificate> &certificates);
|
||||
static void setDefaultCaCertificates(const QList<QSslCertificate> &certificates);
|
||||
static QList<QSslCertificate> defaultCaCertificates();
|
||||
static QList<QSslCertificate> systemCaCertificates();
|
||||
#if QT_DEPRECATED_SINCE(5, 5)
|
||||
QT_DEPRECATED static void setDefaultCaCertificates(const QList<QSslCertificate> &certificates);
|
||||
QT_DEPRECATED static QList<QSslCertificate> defaultCaCertificates();
|
||||
QT_DEPRECATED_X("Use QSslConfiguration::systemCaCertificates()") static QList<QSslCertificate> systemCaCertificates();
|
||||
#endif // QT_DEPRECATED_SINCE(5, 5)
|
||||
|
||||
bool waitForConnected(int msecs = 30000) Q_DECL_OVERRIDE;
|
||||
bool waitForEncrypted(int msecs = 30000);
|
||||
|
@ -1685,7 +1685,7 @@ QList<QSslError> QSslSocketBackendPrivate::verify(const QList<QSslCertificate> &
|
||||
setDefaultCaCertificates(defaultCaCertificates() + systemCaCertificates());
|
||||
}
|
||||
|
||||
foreach (const QSslCertificate &caCertificate, QSslSocket::defaultCaCertificates()) {
|
||||
foreach (const QSslCertificate &caCertificate, QSslConfiguration::defaultConfiguration().caCertificates()) {
|
||||
// From https://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html:
|
||||
//
|
||||
// If several CA certificates matching the name, key identifier, and
|
||||
|
@ -137,9 +137,7 @@ public:
|
||||
static void setDefaultSupportedCiphers(const QList<QSslCipher> &ciphers);
|
||||
static void resetDefaultCiphers();
|
||||
|
||||
static QVector<QSslEllipticCurve> defaultEllipticCurves();
|
||||
static QVector<QSslEllipticCurve> supportedEllipticCurves();
|
||||
static void setDefaultEllipticCurves(const QVector<QSslEllipticCurve> &curves);
|
||||
static void setDefaultSupportedEllipticCurves(const QVector<QSslEllipticCurve> &curves);
|
||||
static void resetDefaultEllipticCurves();
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "QtGui/qaccessible.h"
|
||||
#include <QtCore/qmath.h>
|
||||
#include <QtCore/private/qjnihelpers_p.h>
|
||||
#include <QtCore/private/qjni_p.h>
|
||||
|
||||
#include "qdebug.h"
|
||||
|
||||
@ -65,6 +66,15 @@ namespace QtAndroidAccessibility
|
||||
static jmethodID m_setTextSelectionMethodID = 0;
|
||||
static jmethodID m_setVisibleToUserMethodID = 0;
|
||||
|
||||
void initialize()
|
||||
{
|
||||
// API level > 16 is required.
|
||||
if (QtAndroidPrivate::androidSdkVersion() < 16)
|
||||
return;
|
||||
|
||||
QJNIObjectPrivate::callStaticMethod<void>(QtAndroid::applicationClass(),
|
||||
"initializeAccessibility");
|
||||
}
|
||||
|
||||
static void setActive(JNIEnv */*env*/, jobject /*thiz*/, jboolean active)
|
||||
{
|
||||
|
@ -40,6 +40,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtAndroidAccessibility
|
||||
{
|
||||
void initialize();
|
||||
bool registerNatives(JNIEnv *env);
|
||||
}
|
||||
|
||||
|
@ -33,11 +33,14 @@
|
||||
|
||||
|
||||
#include "qandroidplatformaccessibility.h"
|
||||
#include "androidjniaccessibility.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QAndroidPlatformAccessibility::QAndroidPlatformAccessibility()
|
||||
{}
|
||||
{
|
||||
QtAndroidAccessibility::initialize();
|
||||
}
|
||||
|
||||
QAndroidPlatformAccessibility::~QAndroidPlatformAccessibility()
|
||||
{}
|
||||
|
@ -148,6 +148,10 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶
|
||||
|
||||
m_androidSystemLocale = new QAndroidSystemLocale;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
m_accessibility = new QAndroidPlatformAccessibility();
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
||||
QJNIObjectPrivate javaActivity(QtAndroid::activity());
|
||||
if (javaActivity.isValid()) {
|
||||
QJNIObjectPrivate resources = javaActivity.callObjectMethod("getResources", "()Landroid/content/res/Resources;");
|
||||
@ -348,8 +352,6 @@ void QAndroidPlatformIntegration::setScreenOrientation(Qt::ScreenOrientation cur
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
QPlatformAccessibility *QAndroidPlatformIntegration::accessibility() const
|
||||
{
|
||||
if (!m_accessibility)
|
||||
m_accessibility = new QAndroidPlatformAccessibility();
|
||||
return m_accessibility;
|
||||
}
|
||||
#endif
|
||||
|
@ -51,7 +51,6 @@ public:
|
||||
virtual ~QCocoaFileDialogHelper();
|
||||
|
||||
void exec() Q_DECL_OVERRIDE;
|
||||
void execModalForWindow(QWindow *parent) Q_DECL_OVERRIDE;
|
||||
|
||||
bool defaultNameFilterDisables() const Q_DECL_OVERRIDE;
|
||||
|
||||
|
@ -254,22 +254,17 @@ static QString strippedText(QString s)
|
||||
|| [self panel:nil shouldShowFilename:filepath];
|
||||
|
||||
[self updateProperties];
|
||||
QCocoaMenuBar::redirectKnownMenuItemsToFirstResponder();
|
||||
[mSavePanel setDirectoryURL: [NSURL fileURLWithPath:mCurrentDir]];
|
||||
|
||||
[mSavePanel setNameFieldStringValue:selectable ? QCFString::toNSString(info.fileName()) : @""];
|
||||
NSWindow *nsparent = static_cast<NSWindow *>(qGuiApp->platformNativeInterface()->nativeResourceForWindow("nswindow", parent));
|
||||
|
||||
qApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers);
|
||||
QCocoaMenuBar::redirectKnownMenuItemsToFirstResponder();
|
||||
|
||||
[mSavePanel beginSheetModalForWindow:nsparent completionHandler:^(NSInteger result){
|
||||
[[NSApplication sharedApplication] stopModalWithCode:result];
|
||||
}];
|
||||
|
||||
mReturnCode = [[NSApplication sharedApplication] runModalForWindow:nsparent];
|
||||
QAbstractEventDispatcher::instance()->interrupt();
|
||||
mReturnCode = result;
|
||||
if (mHelper)
|
||||
mHelper->QNSOpenSavePanelDelegate_panelClosed(mReturnCode == NSOKButton);
|
||||
mHelper->QNSOpenSavePanelDelegate_panelClosed(result == NSOKButton);
|
||||
}];
|
||||
}
|
||||
|
||||
- (BOOL)isHiddenFile:(NSString *)filename isDir:(BOOL)isDir
|
||||
@ -711,15 +706,14 @@ void QCocoaFileDialogHelper::createNSOpenSavePanelDelegate()
|
||||
|
||||
bool QCocoaFileDialogHelper::showCocoaFilePanel(Qt::WindowModality windowModality, QWindow *parent)
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
createNSOpenSavePanelDelegate();
|
||||
if (!mDelegate)
|
||||
return false;
|
||||
if (windowModality == Qt::NonModal)
|
||||
[mDelegate showModelessPanel];
|
||||
// no need to show a Qt::ApplicationModal dialog here, since it will be done in exec;
|
||||
// Qt::WindowModal will be done in execModalForWindow.
|
||||
else if (windowModality == Qt::WindowModal && parent)
|
||||
[mDelegate showWindowModalSheet:parent];
|
||||
// no need to show a Qt::ApplicationModal dialog here, since it will be done in _q_platformRunNativeAppModalPanel()
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -751,14 +745,6 @@ void QCocoaFileDialogHelper::exec()
|
||||
|
||||
}
|
||||
|
||||
void QCocoaFileDialogHelper::execModalForWindow(QWindow *parent)
|
||||
{
|
||||
if (!parent)
|
||||
return exec();
|
||||
|
||||
[mDelegate showWindowModalSheet:parent];
|
||||
}
|
||||
|
||||
bool QCocoaFileDialogHelper::defaultNameFilterDisables() const
|
||||
{
|
||||
return true;
|
||||
|
@ -446,6 +446,7 @@ QT_END_NAMESPACE
|
||||
|
||||
-(void)dealloc {
|
||||
[[NSStatusBar systemStatusBar] removeStatusItem:item];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:imageCell];
|
||||
[imageCell release];
|
||||
[item release];
|
||||
[super dealloc];
|
||||
|
@ -749,7 +749,7 @@ void QCocoaWindow::setVisible(bool visible)
|
||||
monitor = nil;
|
||||
}
|
||||
|
||||
if (window()->type() == Qt::Popup)
|
||||
if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip)
|
||||
QCocoaIntegration::instance()->popupWindowStack()->removeAll(this);
|
||||
|
||||
if (parentCocoaWindow && window()->type() == Qt::Popup) {
|
||||
|
@ -1913,8 +1913,9 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
|
||||
QGuiApplicationPrivate::modifier_buttons = [QNSView convertKeyModifiers: [[NSApp currentEvent] modifierFlags]];
|
||||
|
||||
QPlatformDragQtResponse response(false, Qt::IgnoreAction, QRect());
|
||||
if ([sender draggingSource] != nil) {
|
||||
QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
|
||||
if (nativeDrag->currentDrag()) {
|
||||
// The drag was started from within the application
|
||||
response = QWindowSystemInterface::handleDrag(target, nativeDrag->platformDropData(), mapWindowCoordinates(m_window, target, qt_windowPoint), qtAllowed);
|
||||
[self updateCursorFromDragResponse:response drag:nativeDrag];
|
||||
} else {
|
||||
@ -1950,8 +1951,9 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
|
||||
Qt::DropActions qtAllowed = qt_mac_mapNSDragOperations([sender draggingSourceOperationMask]);
|
||||
|
||||
QPlatformDropQtResponse response(false, Qt::IgnoreAction);
|
||||
if ([sender draggingSource] != nil) {
|
||||
QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
|
||||
if (nativeDrag->currentDrag()) {
|
||||
// The drag was started from within the application
|
||||
response = QWindowSystemInterface::handleDrop(target, nativeDrag->platformDropData(), mapWindowCoordinates(m_window, target, qt_windowPoint), qtAllowed);
|
||||
} else {
|
||||
QCocoaDropData mimeData([sender draggingPasteboard]);
|
||||
|
@ -626,7 +626,7 @@ QWindowsOleDropTarget::Drop(LPDATAOBJECT pDataObj, DWORD grfKeyState,
|
||||
const QPlatformDropQtResponse response =
|
||||
QWindowSystemInterface::handleDrop(m_window, windowsDrag->dropData(),
|
||||
m_lastPoint / QWindowsScaling::factor(),
|
||||
translateToQDragDropActions(m_chosenEffect));
|
||||
translateToQDragDropActions(*pdwEffect));
|
||||
|
||||
if (response.isAccepted()) {
|
||||
const Qt::DropAction action = response.acceptedAction();
|
||||
|
@ -373,11 +373,11 @@ QDpi QXcbScreen::logicalDpi() const
|
||||
if (overrideDpi)
|
||||
return QDpi(overrideDpi, overrideDpi);
|
||||
|
||||
if (m_forcedDpi > 0) {
|
||||
int primaryDpr = int(connection()->screens().at(0)->devicePixelRatio());
|
||||
if (m_forcedDpi > 0)
|
||||
return QDpi(m_forcedDpi/primaryDpr, m_forcedDpi/primaryDpr);
|
||||
}
|
||||
return virtualDpi();
|
||||
QDpi vDpi = virtualDpi();
|
||||
return QDpi(vDpi.first/primaryDpr, vDpi.second/primaryDpr);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2812,36 +2812,39 @@ static inline bool isWindowsBuildDirectory(const QString &dirName)
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Extract a directory from resources to disk. The content is extracted
|
||||
recursively to a temporary folder. The extracted content is not removed
|
||||
automatically.
|
||||
Extracts a directory from resources to disk. The content is extracted
|
||||
recursively to a temporary folder. The extracted content is removed
|
||||
automatically once the last reference to the return value goes out of scope.
|
||||
|
||||
\a dirName is the name of the directory to extract from resources.
|
||||
|
||||
Returns the path where the data was extracted or an empty string in case of
|
||||
Returns the temporary directory where the data was extracted or null in case of
|
||||
errors.
|
||||
*/
|
||||
QString QTest::qExtractTestData(const QString &dirName)
|
||||
QSharedPointer<QTemporaryDir> QTest::qExtractTestData(const QString &dirName)
|
||||
{
|
||||
QTemporaryDir temporaryDir;
|
||||
temporaryDir.setAutoRemove(false);
|
||||
QSharedPointer<QTemporaryDir> result; // null until success, then == tempDir
|
||||
|
||||
if (!temporaryDir.isValid())
|
||||
return QString();
|
||||
QSharedPointer<QTemporaryDir> tempDir = QSharedPointer<QTemporaryDir>::create();
|
||||
|
||||
const QString dataPath = temporaryDir.path();
|
||||
tempDir->setAutoRemove(true);
|
||||
|
||||
if (!tempDir->isValid())
|
||||
return result;
|
||||
|
||||
const QString dataPath = tempDir->path();
|
||||
const QString resourcePath = QLatin1Char(':') + dirName;
|
||||
const QFileInfo fileInfo(resourcePath);
|
||||
|
||||
if (!fileInfo.isDir()) {
|
||||
qWarning("Resource path '%s' is not a directory.", qPrintable(resourcePath));
|
||||
return QString();
|
||||
return result;
|
||||
}
|
||||
|
||||
QDirIterator it(resourcePath, QDirIterator::Subdirectories);
|
||||
if (!it.hasNext()) {
|
||||
qWarning("Resource directory '%s' is empty.", qPrintable(resourcePath));
|
||||
return QString();
|
||||
return result;
|
||||
}
|
||||
|
||||
while (it.hasNext()) {
|
||||
@ -2850,21 +2853,23 @@ QString QTest::qExtractTestData(const QString &dirName)
|
||||
QFileInfo fileInfo = it.fileInfo();
|
||||
|
||||
if (!fileInfo.isDir()) {
|
||||
const QString destination = dataPath + QLatin1Char('/') + fileInfo.filePath().mid(resourcePath.length());
|
||||
const QString destination = dataPath + QLatin1Char('/') + fileInfo.filePath().midRef(resourcePath.length());
|
||||
QFileInfo destinationFileInfo(destination);
|
||||
QDir().mkpath(destinationFileInfo.path());
|
||||
if (!QFile::copy(fileInfo.filePath(), destination)) {
|
||||
qWarning("Failed to copy '%s'.", qPrintable(fileInfo.filePath()));
|
||||
return QString();
|
||||
return result;
|
||||
}
|
||||
if (!QFile::setPermissions(destination, QFile::ReadUser | QFile::WriteUser | QFile::ReadGroup)) {
|
||||
qWarning("Failed to set permissions on '%s'.", qPrintable(destination));
|
||||
return QString();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return dataPath;
|
||||
result = qMove(tempDir);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*! \internal
|
||||
|
@ -40,6 +40,8 @@
|
||||
#include <QtCore/qnamespace.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#include <QtCore/qtypetraits.h>
|
||||
#include <QtCore/qsharedpointer.h>
|
||||
#include <QtCore/qtemporarydir.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@ -250,7 +252,7 @@ namespace QTest
|
||||
Q_TESTLIB_EXPORT void ignoreMessage(QtMsgType type, const QRegularExpression &messagePattern);
|
||||
#endif
|
||||
|
||||
Q_TESTLIB_EXPORT QString qExtractTestData(const QString &dirName);
|
||||
Q_TESTLIB_EXPORT QSharedPointer<QTemporaryDir> qExtractTestData(const QString &dirName);
|
||||
Q_TESTLIB_EXPORT QString qFindTestData(const char* basepath, const char* file = 0, int line = 0, const char* builddir = 0);
|
||||
Q_TESTLIB_EXPORT QString qFindTestData(const QString& basepath, const char* file = 0, int line = 0, const char* builddir = 0);
|
||||
|
||||
|
@ -4457,6 +4457,7 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
|
||||
writer.writeAttribute("module", project);
|
||||
writer.writeStartElement(manifest);
|
||||
|
||||
QStringList usedAttributes;
|
||||
i = exampleNodeMap.begin();
|
||||
while (i != exampleNodeMap.end()) {
|
||||
const ExampleNode* en = i.value();
|
||||
@ -4470,6 +4471,10 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
|
||||
++i;
|
||||
continue;
|
||||
}
|
||||
// attributes that are always written for the element
|
||||
usedAttributes.clear();
|
||||
usedAttributes << "name" << "docUrl" << "projectPath";
|
||||
|
||||
writer.writeStartElement(element);
|
||||
writer.writeAttribute("name", en->title());
|
||||
QString docUrl = manifestDir + fileBase(en) + ".html";
|
||||
@ -4503,8 +4508,10 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
|
||||
writer.writeAttribute("projectPath", examplesPath + proFiles[0]);
|
||||
}
|
||||
}
|
||||
if (!en->imageFileName().isEmpty())
|
||||
if (!en->imageFileName().isEmpty()) {
|
||||
writer.writeAttribute("imageUrl", manifestDir + en->imageFileName());
|
||||
usedAttributes << "imageUrl";
|
||||
}
|
||||
|
||||
QString fullName = project + QLatin1Char('/') + en->title();
|
||||
QSet<QString> tags;
|
||||
@ -4530,7 +4537,10 @@ void HtmlGenerator::generateManifestFile(const QString &manifest, const QString
|
||||
if (attrList.count() == 1)
|
||||
attrList.append(QStringLiteral("true"));
|
||||
QString attrName = attrList.takeFirst();
|
||||
if (!usedAttributes.contains(attrName)) {
|
||||
writer.writeAttribute(attrName, attrList.join(div));
|
||||
usedAttributes << attrName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -534,9 +534,6 @@ int QDialog::exec()
|
||||
|
||||
QPointer<QDialog> guard = this;
|
||||
if (d->nativeDialogInUse) {
|
||||
if (windowModality() == Qt::WindowModal)
|
||||
d->platformHelper()->execModalForWindow(d->parentWindow());
|
||||
else
|
||||
d->platformHelper()->exec();
|
||||
} else {
|
||||
QEventLoop eventLoop;
|
||||
|
@ -332,14 +332,11 @@ QSpacerItem * QSpacerItem::spacerItem()
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QSizePolicy QSpacerItem::sizePolicy() const
|
||||
\since 5.5
|
||||
|
||||
Returns the size policy of this item.
|
||||
*/
|
||||
QSizePolicy QSpacerItem::sizePolicy() const
|
||||
{
|
||||
return sizeP;
|
||||
}
|
||||
|
||||
/*!
|
||||
If this item is a QWidget, it is returned as a QWidget; otherwise
|
||||
|
@ -102,7 +102,7 @@ public:
|
||||
void setGeometry(const QRect&);
|
||||
QRect geometry() const;
|
||||
QSpacerItem *spacerItem();
|
||||
QSizePolicy sizePolicy() const;
|
||||
QSizePolicy sizePolicy() const { return sizeP; }
|
||||
|
||||
private:
|
||||
int width;
|
||||
|
@ -263,21 +263,23 @@ private slots:
|
||||
|
||||
private:
|
||||
const QString m_currentDir;
|
||||
QString m_dataPath;
|
||||
QString m_sourceFile;
|
||||
QString m_proFile;
|
||||
QString m_resourcesDir;
|
||||
QTemporaryDir m_dir;
|
||||
QSharedPointer<QTemporaryDir> m_dataDir;
|
||||
};
|
||||
|
||||
void tst_QFileInfo::initTestCase()
|
||||
{
|
||||
m_dataPath = QEXTRACTTESTDATA("/testdata");
|
||||
QVERIFY(!m_dataPath.isEmpty());
|
||||
m_dataDir = QEXTRACTTESTDATA("/testdata");
|
||||
QVERIFY(m_dataDir);
|
||||
const QString dataPath = m_dataDir->path();
|
||||
QVERIFY(!dataPath.isEmpty());
|
||||
|
||||
m_sourceFile = m_dataPath + QStringLiteral("/tst_qfileinfo.cpp");
|
||||
m_resourcesDir = m_dataPath + QStringLiteral("/resources");
|
||||
m_proFile = m_dataPath + QStringLiteral("/tst_qfileinfo.pro");
|
||||
m_sourceFile = dataPath + QLatin1String("/tst_qfileinfo.cpp");
|
||||
m_resourcesDir = dataPath + QLatin1String("/resources");
|
||||
m_proFile = dataPath + QLatin1String("/tst_qfileinfo.pro");
|
||||
|
||||
QVERIFY(m_dir.isValid());
|
||||
QVERIFY(QDir::setCurrent(m_dir.path()));
|
||||
@ -286,7 +288,6 @@ void tst_QFileInfo::initTestCase()
|
||||
void tst_QFileInfo::cleanupTestCase()
|
||||
{
|
||||
QDir::setCurrent(m_currentDir); // Release temporary directory so that it can be deleted on Windows
|
||||
QDir(m_dataPath).removeRecursively();
|
||||
}
|
||||
|
||||
// Testing get/set functions
|
||||
|
@ -61,9 +61,9 @@ void tst_QStorageInfo::defaultValues()
|
||||
QVERIFY(!storage.isRoot());
|
||||
QVERIFY(storage.device().isEmpty());
|
||||
QVERIFY(storage.fileSystemType().isEmpty());
|
||||
QVERIFY(storage.bytesTotal() == 0);
|
||||
QVERIFY(storage.bytesFree() == 0);
|
||||
QVERIFY(storage.bytesAvailable() == 0);
|
||||
QVERIFY(storage.bytesTotal() == -1);
|
||||
QVERIFY(storage.bytesFree() == -1);
|
||||
QVERIFY(storage.bytesAvailable() == -1);
|
||||
}
|
||||
|
||||
void tst_QStorageInfo::operatorEqual()
|
||||
@ -106,9 +106,9 @@ void tst_QStorageInfo::root()
|
||||
QVERIFY(!storage.device().isEmpty());
|
||||
QVERIFY(!storage.fileSystemType().isEmpty());
|
||||
#ifndef Q_OS_HAIKU
|
||||
QVERIFY(storage.bytesTotal() > 0);
|
||||
QVERIFY(storage.bytesFree() > 0);
|
||||
QVERIFY(storage.bytesAvailable() > 0);
|
||||
QVERIFY(storage.bytesTotal() >= 0);
|
||||
QVERIFY(storage.bytesFree() >= 0);
|
||||
QVERIFY(storage.bytesAvailable() >= 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -121,9 +121,9 @@ void tst_QStorageInfo::currentStorage()
|
||||
QVERIFY(appPath.startsWith(storage.rootPath(), Qt::CaseInsensitive));
|
||||
QVERIFY(!storage.device().isEmpty());
|
||||
QVERIFY(!storage.fileSystemType().isEmpty());
|
||||
QVERIFY(storage.bytesTotal() > 0);
|
||||
QVERIFY(storage.bytesFree() > 0);
|
||||
QVERIFY(storage.bytesAvailable() > 0);
|
||||
QVERIFY(storage.bytesTotal() >= 0);
|
||||
QVERIFY(storage.bytesFree() >= 0);
|
||||
QVERIFY(storage.bytesAvailable() >= 0);
|
||||
}
|
||||
|
||||
void tst_QStorageInfo::storageList()
|
||||
|
@ -81,7 +81,7 @@ private slots:
|
||||
void readLineMaxlen_data();
|
||||
void readLineMaxlen();
|
||||
void readLinesFromBufferCRCR();
|
||||
void readLineOverload();
|
||||
void readLineInto();
|
||||
|
||||
// all
|
||||
void readAllFromDevice_data();
|
||||
@ -612,22 +612,22 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
void tst_QTextStream::readLineOverload()
|
||||
void tst_QTextStream::readLineInto()
|
||||
{
|
||||
QByteArray data = "1\n2\n3";
|
||||
|
||||
QTextStream ts(&data);
|
||||
QString line;
|
||||
|
||||
ts.readLine(&line);
|
||||
ts.readLineInto(&line);
|
||||
QCOMPARE(line, QStringLiteral("1"));
|
||||
|
||||
ts.readLine(Q_NULLPTR, 0); // read the second line, but don't store it
|
||||
ts.readLineInto(Q_NULLPTR, 0); // read the second line, but don't store it
|
||||
|
||||
ts.readLine(&line);
|
||||
ts.readLineInto(&line);
|
||||
QCOMPARE(line, QStringLiteral("3"));
|
||||
|
||||
QVERIFY(!ts.readLine(&line));
|
||||
QVERIFY(!ts.readLineInto(&line));
|
||||
QVERIFY(line.isEmpty());
|
||||
|
||||
QFile file(m_rfc3261FilePath);
|
||||
@ -637,7 +637,7 @@ void tst_QTextStream::readLineOverload()
|
||||
line.reserve(1);
|
||||
int maxLineCapacity = line.capacity();
|
||||
|
||||
while (ts.readLine(&line)) {
|
||||
while (ts.readLineInto(&line)) {
|
||||
QVERIFY(line.capacity() >= maxLineCapacity);
|
||||
maxLineCapacity = line.capacity();
|
||||
}
|
||||
@ -647,7 +647,7 @@ void tst_QTextStream::readLineOverload()
|
||||
QVERIFY(errorDevice.open(QIODevice::ReadOnly));
|
||||
ts.setDevice(&errorDevice);
|
||||
|
||||
QVERIFY(!ts.readLine(&line));
|
||||
QVERIFY(!ts.readLineInto(&line));
|
||||
QVERIFY(line.isEmpty());
|
||||
}
|
||||
|
||||
@ -1025,7 +1025,7 @@ void tst_QTextStream::performance()
|
||||
|
||||
QTextStream stream2(&file3);
|
||||
QString line;
|
||||
while (stream2.readLine(&line))
|
||||
while (stream2.readLineInto(&line))
|
||||
++nlines3;
|
||||
|
||||
elapsed[2] = stopWatch.elapsed();
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QSslEllipticCurve>
|
||||
#include <QSslSocket>
|
||||
#include <QSslConfiguration>
|
||||
|
||||
class tst_QSslEllipticCurve : public QObject
|
||||
{
|
||||
@ -84,7 +84,7 @@ void tst_QSslEllipticCurve::fromShortName_data()
|
||||
QTest::newRow("QString()") << QString() << QSslEllipticCurve() << false;
|
||||
QTest::newRow("\"\"") << QString("") << QSslEllipticCurve() << false;
|
||||
QTest::newRow("does-not-exist") << QStringLiteral("does-not-exist") << QSslEllipticCurve() << false;
|
||||
Q_FOREACH (QSslEllipticCurve ec, QSslSocket::supportedEllipticCurves()) {
|
||||
Q_FOREACH (QSslEllipticCurve ec, QSslConfiguration::supportedEllipticCurves()) {
|
||||
const QString sN = ec.shortName();
|
||||
QTest::newRow(qPrintable("supported EC \"" + sN + '"')) << sN << ec << true;
|
||||
// At least in the OpenSSL impl, the short name is case-sensitive. That feels odd.
|
||||
@ -117,7 +117,7 @@ void tst_QSslEllipticCurve::fromLongName_data()
|
||||
QTest::newRow("QString()") << QString() << QSslEllipticCurve() << false;
|
||||
QTest::newRow("\"\"") << QString("") << QSslEllipticCurve() << false;
|
||||
QTest::newRow("does-not-exist") << QStringLiteral("does-not-exist") << QSslEllipticCurve() << false;
|
||||
Q_FOREACH (QSslEllipticCurve ec, QSslSocket::supportedEllipticCurves()) {
|
||||
Q_FOREACH (QSslEllipticCurve ec, QSslConfiguration::supportedEllipticCurves()) {
|
||||
const QString lN = ec.longName();
|
||||
QTest::newRow(qPrintable("supported EC \"" + lN + '"')) << lN << ec << true;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ QDebug operator<<(QDebug dbg, AXErrorTag err)
|
||||
|
||||
- (AXUIElementRef) ref { return reference; }
|
||||
- (void) print {
|
||||
NSLog(@"Accessible Object role: '%@', title: '%@', description: '%@', value: '%@', rect: '%@'", self.role, self.title, self.description, self.value, NSStringFromRect(self.rect));
|
||||
NSLog(@"Accessible Object role: '%@', title: '%@', description: '%@', value: '%@', rect: '%@'", self.role, self.title, self.description, self.value, NSStringFromRect(NSRectFromCGRect(self.rect)));
|
||||
NSLog(@" Children: %ld", [[self childList] count]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user