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

Conflicts:
	configure
	mkspecs/common/wince/qplatformdefs.h
	src/plugins/platforms/directfb/qdirectfbbackingstore.cpp
	src/plugins/platforms/xcb/qxcbbackingstore.cpp

Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
This commit is contained in:
Liang Qi 2016-03-22 07:24:57 +01:00
commit a02863234d
666 changed files with 31438 additions and 38009 deletions

View File

@ -189,6 +189,7 @@ sub shouldMasterInclude {
if (open(F, "<$iheader")) {
while (<F>) {
chomp;
chop if /\r$/;
return 0 if (/^\#pragma qt_no_master_include$/);
}
close(F);

View File

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

22
configure vendored
View File

@ -756,6 +756,7 @@ XPLATFORM_ANDROID=no
XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
XPLATFORM_QNX=no
XPLATFORM_HAIKU=no
XPLATFORM_INTEGRITY=no
PLATFORM=$QMAKESPEC
QT_CROSS_COMPILE=no
OPT_CONFIRM_LICENSE=no
@ -2990,6 +2991,9 @@ case "$XPLATFORM" in
*macx*)
XPLATFORM_MAC=yes
;;
*integrity*)
XPLATFORM_INTEGRITY=yes
;;
# XPLATFORM_ANDROID should not be set for unsupported/android-g++
*unsupported*)
;;
@ -4659,6 +4663,11 @@ if [ "$XPLATFORM_QNX" = "yes" ]; then
fi
fi
if [ "$XPLATFORM_INTEGRITY" = "yes" ]; then
CFG_SHARED=no
CFG_LARGEFILE=no
fi
# detect zlib
if [ "$CFG_SYSTEM_ZLIB" = "auto" ]; then
if compileTest unix/zlib "zlib"; then
@ -5889,7 +5898,7 @@ if [ "$CFG_MIRCLIENT" = "yes" ]; then
QT_CONFIG="$QT_CONFIG mirclient"
fi
if [ "$XPLATFORM_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ] && [ "$XPLATFORM_ANDROID" = "no" ] && [ "$XPLATFORM_HAIKU" = "no" ]; then
if [ "$XPLATFORM_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ] && [ "$XPLATFORM_ANDROID" = "no" ] && [ "$XPLATFORM_HAIKU" = "no" ] && [ "$XPLATFORM_INTEGRITY" = "no" ]; then
if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ] && [ "$CFG_LINUXFB" = "no" ] && [ "$CFG_MIRCLIENT" = "no" ]; then
if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] || [ "$ORIG_CFG_LINUXFB" = "auto" ] || [ "$ORIG_CFG_MIRCLIENT" = "auto" ] ); then
@ -6447,9 +6456,9 @@ fi
[ "$CFG_SYSTEM_PROXIES" = "yes" ] && QT_CONFIG="$QT_CONFIG system-proxies"
[ "$CFG_DIRECTWRITE" = "yes" ] && QT_CONFIG="$QT_CONFIG directwrite"
[ '!' -z "$DEFINES" ] && QMakeVar add DEFINES "$DEFINES"
[ '!' -z "$INCLUDES" ] && QMakeVar add INCLUDEPATH "$INCLUDES"
[ '!' -z "$L_FLAGS" ] && QMakeVar add LIBS "$L_FLAGS"
[ '!' -z "$DEFINES" ] && QMakeVar add EXTRA_DEFINES "$DEFINES"
[ '!' -z "$INCLUDES" ] && QMakeVar add EXTRA_INCLUDEPATH "$INCLUDES"
[ '!' -z "$L_FLAGS" ] && QMakeVar add EXTRA_LIBS "$L_FLAGS"
if [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
if [ -n "$RPATH_FLAGS" ]; then
@ -6465,7 +6474,7 @@ if [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
else
if [ -n "$RPATH_FLAGS" ]; then
# add the user defined rpaths
QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
QMakeVar add EXTRA_RPATHS "$RPATH_FLAGS"
fi
fi
if [ "$CFG_RPATH" = "yes" ]; then
@ -6923,9 +6932,6 @@ if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then
echo "}"
echo
fi
if [ -n "$RPATH_FLAGS" ]; then
echo "QMAKE_RPATHDIR += $RPATH_FLAGS"
fi
if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION"
echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION"

519
dist/changes-5.6.0 vendored Normal file
View File

@ -0,0 +1,519 @@
Qt 5.6 introduces many new features and improvements along with bug fixes
over the 5.5.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.6
The Qt version 5.6 series is binary compatible with the 5.5.x series.
Applications compiled for 5.5 will continue to run with 5.6.
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 *
****************************************************************************
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, 2010 and 2012
* Microsoft Windows XP, Windows Vista
* Microsoft Windows Embedded Compact 7
* Microsoft Windows Embedded Compact 2013
Deprecated platforms and toolchains continue to work until removed.
- The QtScript module is deprecated and will be removed from Qt's binary
packages starting with version 5.7. The 5.6 releases of QtScript
should continue to work along with Qt 5.7 and future versions.
****************************************************************************
* 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.4 (included in XCode 5.1)
* GCC 4.7
* Intel C++ Composer XE 2013 SP1 (compiler version 14.0)
* Microsoft Visual Studio 2013 (compiler version 19.0)
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- SecureTransport is the default SSL backend on OS X. Use the
-no-securetransport configure option to use OpenSSL.
- [QTBUG-34611] Arrow indicator is now consistent with platform styles
- QtDBus now uses threads to implement processing of incoming and outgoing
messages. This solves a number of thread safety issues and fixes an
architectural problem that would cause all processing to stop if a
particular thread (usually the main thread) is blocked in any
operation. On the flip side, application developers need to know that
modifications to a QDBusConnection may be visible immediately on the
connection, so they should be done in an order that won't allow for
incomplete states to be observed (for example, register all objects
before acquiring service names).
configure & build system
------------------------
- [Unix] Qt's .prl files do not expose private dependencies any more.
Projects must explicitly name their dependencies.
- [Windows] Enabling link-time code generation in Qt does not enable
it in user applications as well any more.
- [FreeBSD] The "freebsd-clang" mkspec is no longer in the unsupported/
subdir. If you use scripts to build Qt, you'll need to update them to
include "-platform freebsd-clang" or remove the -platform argument.
qmake
-----
- qmake now enables C++11 support by default if the compiler supports
it (unless the compiler defaults to C++14 or a later edition).
To disable this (not possible with Microsoft Visual Studio), add
"CONFIG -= c++11" to your .pro file. Note that Qt 5.7 requires C++11
support, so it is a good idea to ensure your code works with that
compiler setting.
- [Windows] The .prl files written by earlier versions of Qt cannot
be used any more. This will affect you if you depend on 3rd party
libraries which come with .prl files. Patch up QMAKE_PRL_TARGET to
contain the complete file name of the library, and replace any
/LIBPATH: in QMAKE_PRL_LIBS with -L.
- [Windows] QMake is now a lot stricter about what may appear in LIBS.
Use -L instead of the Windows-specific /LIBPATH. Put flags other
than -l and -L into QMAKE_LFLAGS.
- The library lookup has been simplified. This includes the removal of
support for the QMAKE_<lib>_SUFFIX variables, and the removal of
attempts to locate libraries under slightly different names than
specified.
- [Unix] QMAKE_POST_LINK steps of static libraries are now required
to operate on $(TARGET) in $(DESTDIR) instead of $$OUT_PWD.
This matches the Windows backends.
- Makespecs must now define QMAKE_{PREFIX,EXTENSION}_{SH,STATIC}LIB.
Accessibility
-------------
- [QTBUG-44479] We now report text attributes correctly on Linux, so
ORCA+F now works properly in QTextEdit and other text controls.
Widgets
-------
- [QTBUG-1049][QTBUG-2295][QTBUG-4532][QTBUG-18883][QTBUG-35148] The
tabs for the tabified docks can be moved by the user.
QtTest
------
- [QTBUG-47370] Crash/exception information is now logged to standard
output on Windows.
****************************************************************************
* Library *
****************************************************************************
QtCore
------
- Types in the Q_PROPERTY macro can now contain commas (for example,
QMap<Foo, Bar>)
- Added QVersionNumber.
- All generic containers (with the exception of QVarLengthArray, but
including QSharedPointer) destroy the previous state as part of a
move-assignment. Previously, they would dump it into the
right-hand-side object. Note that this is only true for the generic
containers. Other implicitly-shared types, as well as the non-generic
containers such as QString, QByteArray, etc. still swap the contents with
the right-hand-side object when move-assigned into, and for performance
reasons, this does not change in the foreseeable future.
- All containers (with the exception of QVarLengthArray, but including
QSharedPointer) are now nothrow_default_constructible,
nothrow_move_constructible, nothrow_move_assignable, and
nothrow-swappable.
- [QTBUG-25919] Added rbegin(), crbegin(), rend(), crend(), and
reverse_iterator and const_reverse_iterator typedefs to
QByteArray, QString, QList, QLinkedList, QVector, QVarLengthArray,
and QSet.
- [QTBUG-46026] Added the convenience constFirst() and constLast()
functions to QList and QVector.
- Added relational operators <, <=, >, >= to QList, QVector, and
QVarLengthArray if the element type supports operator<.
- Added qHash() overloads for QList, QVector, QLocale, QMatrix, QTransform,
QMimeType, QRegExp, QRegularExpression, and QUrlQuery.
- Unicode data updated to v8.0
- Logging:
* QT_LOGGING_RULES now supports multiple rules separated by semicolons
* Systems with syslog may now pass -syslog to configure to send logging
output to syslog.
- QCommandLineParser:
* [QTBUG-44298] Added support for hiding options from the --help output,
with QCommandLineOption::setHidden(true).
* Added parsing mode for options after arguments, to allow treating them
as more arguments.
- QDebug:
* How verbose a single debug output should be can now be fine-tuned by
setting a verbosity on the debug stream.
* When streaming QWindow, QScreen, QWidget instances to a debug stream
that has increased verbosity set, detailed information about
geometries, states etc. is printed.
- QDir:
* Added listSeparator().
- QHash/QMap:
* Added key iterators, accessible through keyBegin() and keyEnd().
- QLatin1String:
* Added default constructor.
- QLocale:
* [QTBUG-4044][QTBUG-3068] The C locale does not use group separators
to format numbers any more.
* [QTBUG-49031] Fixed a bug that caused QLocale::textDirection() to
always return Qt::LeftToRight and QLocale::script() to return
QLocale::AnyScript for the Windows system locale.
- QMap:
* Added const equal_range() overload.
- QMetaProperty:
* write() now resets the property if an empty QVariant is given, or set
a default constructed object if the property is not resettable.
- QPluginLoader:
* Fixed the search order of Qt plugins so that paths specified by the
QT_PLUGIN_PATH environment variable are searched before built-in
paths.
- QProcess:
* [QTBUG-47271] Fixed a bug that caused QProcess to launch a child
process on Unix even if the directory specified with
setWorkingDirectory did not exist.
* Deprecated QProcess::error() signal in favor of the new
QProcess::errorOccurred() signal.
- QProcessEnvironment:
* Fixed a bug in operator== involving different empty states.
- QSet:
* Added intersects().
- QSharedPointer:
* [QTBUG-49748] Fixed a problem that causes a compilation error
when constructing a QSharedPointer of a const type that derives
from QEnableSharedFromThis.
- QStorageInfo:
* Added QStorageInfo::blockSize(), which returns the optimal block size
for transferring data to and from the storage.
- QString:
* fromLatin1(), fromAscii(), fromUtf8() and fromLocal8Bit() now return a
null QString when called with a null QByteArray.
* Added insert(int, QStringRef), insert(int, const char*), and
insert(int, QByteArray) overloads.
* Added prepend(QStringRef) and prepend(const QChar *, int) overloads.
* resize() no longer shrinks the capacity. That means resize(0) now
reliably preserves capacity().
- QStringRef:
* Added truncate(int).
- QTemporaryDir:
* Added errorString() method that returns the string explaining why
creating the temporary directory failed.
- QTextStream:
* Can now stream QStringRef without converting to a QString first.
- QThread:
* [QTBUG-49870] Fixed a bug that would cause debug-mode applications to
live-lock on exit if they had a global static containing a QThread
that wasn't exited properly.
- QVariant:
* [QTBUG-40644] Fixed crash when setting a QVariant of a different type to
a property of a custom type by attempting to do a conversion instead.
* [QTBUG-37851] QVariant(QColor)::toString() now uses QColor::HexArgb format
when the alpha component is different from 1.
- QVector:
* [QTBUG-39293] resize() will no longer shrink the capacity. That means
resize(0) now reliably preserves capacity().
- QtAlgorithms:
* Added qFindFirstSetBit() and qFindLastSetBit().
QtDBus
------
- [QTBUG-14131] The QtDBus library now links directly to the libdbus-1
system library if it was detected at configure time. To force linking to
the library, pass option -dbus-linked to configure; to force dynamic
loading at runtime, use -dbus-runtime.
QtGui
-----
- [QTBUG-43674] Linux accessibility (using XCB) works for
applications launched as root.
- Added ReturnKeyType enum that emulates the native return key press on
different mobile platforms, to indicate actions such as search, move to
next field, and so on.
- Painting:
* Internal precision of solids and gradients is up to 16bit per color.
- QFont:
* [QTBUG-15214] QFont now serializes the capitalization setting.
- QGuiApplication:
* [QTBUG-47690] Fixed a regression where both sessionId and sessionKey were
empty on Windows.
- QIcon:
* [QTBUG-42109] Added the ability for QIcons to be marked as template images.
This allows end users to create QSystemTrayIcons that are properly
displayed as monochrome images on OS X, which is especially important
on Yosemite and above when Dark Mode is turned on.
- QKeySequence:
* Added qHash(QKeySequence).
- QTextLayout:
* Added QVector-based alternatives setFormat(), format(), and
clearFormat() to setAdditionalFormats(), additionalFormats(), and
clearAdditionalFormats(), resp.
* [QTBUG-41197] Fixed an uncommon rendering error with fonts containing
overlapping contours.
* [QTBUG-47547] Fixed some instances of missing glyphs when drawing large
fonts.
* [QTBUG-47547] Fixed problem where fallback fonts for text with certain
styles would be reported as unscalable.
* Freetype:
* [QTBUG-45963] Fixed a divide-by-zero exception when accessing bitmap
fonts.
* [QTBUG-50715] QTextLayout::glyphRuns() now returns united bounding
rects for glyph runs that are merged.
- OpenGL:
* [QTBUG-46161] Added QOpenGLExtraFunctions providing OpenGL ES 3.0 and
3.1 function wrappers in a cross-platform manner.
* [QTBUG-39235] Added support for multiple render targets in
QOpenGLFramebufferObject.
* [QTBUG-42444] Made QInputMethod's visible more accurate.
QtNetwork
---------
- QSslServer:
* In an SSL connection, the client socket now uses the server's cipher
preferences by default. This can be disabled using the QSslConfiguration.
- QUdpSocket:
* [QTBUG-47011] Fixed a bug that caused the QAbstractSocket::ShareAddress
option not to work on Linux.
QtPlatformSupport
-----------------
- QKdeTheme:
* Added support for KDE Plasma 5, which is also the default theme now.
QtSql
-----
- [QTBUG-3500] SSL support for MySQL database connections has been added.
Option CLIENT_SSL replaced by SSL_KEY, SSL_CERT, SSL_CA, SSL_CAPATH and
SSL_CIPHER, so that the keys, certificates and cipher can be specified.
- Improved performance when reading integer values from MySQL databases via
prepared statements.
QtTest
------
- [QTBUG-47370] A stack trace is output on standard error if a test
crashes.
- Added macros QTRY_VERIFY2_WITH_TIMEOUT() and QTRY_VERIFY2(), making it
possible to output a message after the timeout has expired.
QtWidgets
---------
- QComboBox:
* QComboBox::setView() no longer deletes the old view directly. It now
checks the ownership first.
- QListView:
* [QTBUG-37007] Horizontal scrolling with a vertical mouse wheel
is now possible.
- QMainWindow:
* Added GroupedDragging as a DockOption which allow users to drag all
the tabs together when dragging the title of a QDockWidget which is
tabbed with others.
- QSizePolicy:
* Added qHash(QSizePolicy).
- QTabBar:
* [QTBUG-45173][QTBUG-15128] Fixed moving tab when a stylesheet is
applied.
- QFontDialog:
* Added supportedSchemes property.
****************************************************************************
* Platform-specific Changes *
****************************************************************************
Android
-------
- [QTBUG-38379] Stylus devices such as S Pen will generate QTabletEvents now.
- [QTBUG-40731] Implemented QInputMethod::keyboardRectangle.
- [QTBUG-45585] Fixed the opening of a local file using
QDesktopServices::openUrl().
Windows
-------
- [QTBUG-41309][QTBUG-41883][QTBUG-42410] Add a function to
QWindowsWindowFunctions to enable working around a limitation with
showing other top level windows while showing a fullscreen OpenGL-based
window.
- DirectWrite support is now the default if available.
- DirectWrite:
* [QTBUG-48546] Added differentiation between vertical hinting and no
hinting in DirectWrite font engine.
* [QTBUG-49562] Fixed clipping bug when rendering unhinted text with
grayscale antialiasing.
* [QTBUG-49562] Added transformation support to DirectWrite engine when
using grayscale antialiasing.
* [QTBUG-50009] Fixed transformed text when using the DirectWrite font
engine.
- Text:
* [QTBUG-47141] Made it possible to disable antialiasing for text when
drawing into images.
* [QTBUG-48546] Fixed uneven kerning for some fonts.
X11/XCB
-------
- [QTBUG-42985] In case there are no physical screens attached,
QGuiApplication::screens() and QGuiApplication::primaryScreen() will
now return a placeholder QScreen object.
- [QTBUG-49071] Fixed focusIn event on hide/show being not delivered.
- Harmonized input context selection. QT_IM_MODULE environment variable
is taken into account now.
QPA
---
- EGLFS/KMS:
* It is now possible to set the DPMS mode and get the current value for
each screen.
- WinRT:
* Windows Store apps are now composited inside a XAML container,
allowing for tighter integration with the native UI layer.
* Application status bar is visible by default now.
****************************************************************************
* Tools *
****************************************************************************
configure & build system
------------------------
- Qt's build system now detects whether the compiler supports C++14 and
experimental support for C++1z. If the compiler supports it, Qt is
compiled using that. This does not apply to user applications built
using qmake: those are still built with C++11 support only. To build
your application with C++14 support, add "CONFIG += c++14"
(similarly for C++1z) to your .pro file.
- [GCC][ELF] The Qt libraries now contain ELF versions.
- [QTBUG-48958][OS X] Configure with -no-rpath now yields dynamic Qt
libraries and frameworks with an absolute install name (based in
-libdir). This restores Qt 4 behavior.
- [MinGW] Fixed detection of DirectWrite.
- [iOS] The build process was significantly changed in several ways.
This doesn't matter unless you're doing Something Very Special.
- [Unix] -force-pkg-config is now just an alias for -pkg-config.
- [QTBUG-47840] Fixed pointer size detection when cross-building.
- [QTBUG-47920] GStreamer 1.0 is now preferred over 0.10.
- [QTBUG-48041][WinRT] Fixed -no-opengl not bailing out despite the
configuration causing a build error later on.
- [Linux] Qt is now built with relative rpaths, as was already the
case on OS X.
- [Windows] Configure now supports the -verbose option, like on Unix.
- [Unix] Added configure option to enable link-time code generation.
- Introduced the -optimized-tools option; supersedes -optimized-qmake.
Tools are by default not optimized in debug builds any more.
- Non-prefix builds don't have install targets any more.
qmake
-----
- By default, GNU extensions are now enabled with Clang, GCC, and ICC
even in C++11 and C++14 modes. To disable the GNU extensions, add
CONFIG+=strict_c++ to your .pro file.
- In addition to .qrc files, it is now possible to list standalone files
and directories, and collections of files in RESOURCES.
- [QTBUG-17533] Fixed dependency scan being confused by directly adjacent
string literals without intermediate whitespace. The parser also got more
C++ compliant and now understands C++11 raw strings.
- [QTBUG-21854] Deprecated DEPLOYMENT in favor of INSTALLS.
- [QTBUG-30813] Makefile output no longer contains implicit suffix rules,
as all sources are built using explicit rules.
- [QTBUG-36575] Fixed handling of QMAKE_OBJECTIVE_CFLAGS for Objective-C
(as opposed to Objective-C++). OBJECTIVE_SOURCES was obsoleted; use just
SOURCES. This behavior matches Xcode.
- [QTBUG-44184][Windows] Added RC_DEFINES to allow overriding DEFINES.
This is a workaround for incompatible quoting requirements of rc.exe
compared to cl.exe.
- [QTBUG-46910][Unix] Fixed infinite recursion with link_prl (the default)
and .la files in a .libs/ subdirectory.
- [QTBUG-47951] Fixed QMAKE_CXX/CROSS_COMPILE verification with ccache.
- [QTBUG-48287][Unix] Fixed race in debug_and_release builds of static libs.
- [QTBUG-48648][VS2013] Fixed creation of empty (and thus invalid)
<Dependencies> sections in manifest files.
- [QTBUG-49665][VS] Fixed shadow builds of subdirs projects.
- [QTBUG-50442][VS] Added support for precompiled headers without (or with
an uncommon) file extension.
- 'make check' targets will now extend QT_PLUGIN_PATH instead of
overwriting it.
- Fixed support for certain versions of (f)lex and yacc.
- [Darwin] Info.plist is now correctly placed also in plugin bundles.
- [Darwin] CONFIG+=plugin_bundle now actually creates Mach-O bundles.
- [Unix] Added support for paths relative to the target in QMAKE_RPATHDIR.
- [Unix] Support for CONFIG+=compile_libtool was removed. Use
CONFIG+=create_libtool and/or custom compilers instead.
- [Windows] Libraries coming with .prl files can now have non-standard file
extensions and a major version of zero.
- [WEC2013][VS] Fixed support for VS2013 SDKs.
- [MSys] Added workaround for MinGW-make's magic handling of paths.
Prepend @msyshack@ to INSTALL_ROOT to prevent MSys root prefixing.

View File

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

View File

@ -1,11 +1,11 @@
body {
font-size: 14px;
font-size: 10.5pt;
}
pre {
background-color: #f0f0f0;
font-family: Courier, monospace;
font-size: 15px;
font-size: 11pt;
font-weight: 600;
vertical-align: top;
margin: 15px 85px 15px 35px;
@ -41,7 +41,7 @@ a[href|="http://"], a[href|="https://"] {
h1.title {
margin-top: 30px;
margin-left: 6px;
font-size: 32px;
font-size: 24pt;
padding: 6px;
}
@ -52,7 +52,7 @@ h2, p.h2 {
}
h3 {
font-size: 16px;
font-size: 12pt;
margin: 30px 0px 30px 6px;
}
@ -82,7 +82,7 @@ h3.fn, span.fn {
padding: 5px;
text-decoration: none;
font-weight: 400;
font-size: 16px;
font-size: 12pt;
margin: 45px 0px 0px 6px;
}
@ -107,7 +107,7 @@ table tr.odd {
table.qmlname td {
padding: 0px;
margin-left: 6px;
font-size: 16px;
font-size: 12pt;
}
table.qmlname p .name,
@ -125,12 +125,12 @@ h3.fn .name, h3.fn .type {
}
tr > td > pre {
font-size: 14px;
font-size: 10.5pt;
}
code {
font-family: Courier, monospace;
font-size: 16px;
font-size: 12pt;
font-weight: 400;
}
@ -167,7 +167,7 @@ td#buildversion {
.footer, .footer p {
padding: 5px 0px 5px 0px;
margin: 45px 15px 5px 15px;
font-size: 10px;
font-size: 7.5pt;
background-color: #cccccc;
}

View File

@ -702,7 +702,7 @@ void TorrentView::dragMoveEvent(QDragMoveEvent *event)
{
// Accept file actions with a '.torrent' extension.
QUrl url(event->mimeData()->text());
if (url.isValid() && url.scheme().toLower() == "file"
if (url.isValid() && url.scheme() == "file"
&& url.path().toLower().endsWith(".torrent"))
event->acceptProposedAction();
}

View File

@ -59,6 +59,10 @@ MainWindow::MainWindow()
connect(textEdit->document(), &QTextDocument::contentsChanged,
this, &MainWindow::documentWasModified);
QGuiApplication::setFallbackSessionManagementEnabled(false);
connect(qApp, &QGuiApplication::commitDataRequest,
this, &MainWindow::commitData);
setCurrentFile(QString());
setUnifiedTitleAndToolBarOnMac(true);
}
@ -383,3 +387,15 @@ QString MainWindow::strippedName(const QString &fullFileName)
return QFileInfo(fullFileName).fileName();
}
//! [49]
void MainWindow::commitData(QSessionManager &manager)
{
if (manager.allowsInteraction()) {
if (!maybeSave())
manager.cancel();
} else {
// Non-interactive: save without asking
if (textEdit->document()->isModified())
save();
}
}

View File

@ -47,6 +47,7 @@ QT_BEGIN_NAMESPACE
class QAction;
class QMenu;
class QPlainTextEdit;
class QSessionManager;
QT_END_NAMESPACE
//! [0]
@ -69,6 +70,7 @@ private slots:
bool saveAs();
void about();
void documentWasModified();
void commitData(QSessionManager &);
private:
void createActions();

View File

@ -0,0 +1,39 @@
#
# This file is used as a basis for the following compilers:
#
# - The Green Hills Software compiler
#
QMAKE_COMPILER = ghs
QMAKE_CFLAGS += --signed_fields --no_commons --diag_suppress=1,82,228,236,381,611,961,997,1795,1974
QMAKE_CFLAGS_DEPS += -MD
QMAKE_CFLAGS_RELEASE += -Ospeed -Olink -Omax -uvfd
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE -g
QMAKE_CFLAGS_DEBUG += -g -Omaxdebug
QMAKE_CFLAGS_SHLIB +=
QMAKE_CFLAGS_STATIC_LIB +=
QMAKE_CFLAGS_APP +=
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS +=
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_implicit_include --link_once_templates -non_shared --exceptions --new_outside_of_constructor
QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP
QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS
QMAKE_CXXFLAGS_CXX11 += --c++11
QMAKE_LFLAGS += --no_commons -non_shared --link_once_templates --exceptions --stdle
QMAKE_LFLAGS_RELEASE += -Ospeed -Olink -uvfd
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_LFLAGS_RELEASE -g
QMAKE_LIBS_CORE = -lposix -livfs -lsocket -lnet -ldl
QMAKE_LIBS_GUI = -lfbdev -lhiddev

View File

@ -0,0 +1,17 @@
#
# Base qmake configuration for GHS on INTEGRITY
#
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = integrity
include(unix.conf)
include(ghs-base.conf)
QMAKE_CC = cxintarm -bsp $$(INTEGRITY_BSP) -os_dir $$(INTEGRITY_DIR) -non_shared
QMAKE_CXX = cxintarm -bsp $$(INTEGRITY_BSP) -os_dir $$(INTEGRITY_DIR) -non_shared
QMAKE_LINK = $$QMAKE_CXX
QMAKE_AR = $$QMAKE_CXX -archive -o
load(qt_config)

View File

@ -0,0 +1,17 @@
#
# Base qmake configuration for GHS on INTEGRITY
#
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = integrity
include(unix.conf)
include(ghs-base.conf)
QMAKE_CC = cxint86 -bsp $$(INTEGRITY_BSP) -os_dir $$(INTEGRITY_DIR) -non_shared
QMAKE_CXX = cxint86 -bsp $$(INTEGRITY_BSP) -os_dir $$(INTEGRITY_DIR) -non_shared
QMAKE_LINK = $$QMAKE_CXX
QMAKE_AR = $$QMAKE_CXX -archive -o
load(qt_config)

View File

@ -0,0 +1,100 @@
/****************************************************************************
**
** Copyright (C) 2015 Green Hills Software. All rights reserved.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef Q_INTEGRITY_PLATFORMDEFS_H
#define Q_INTEGRITY_PLATFORMDEFS_H
// Get Qt defines/settings
#include "qglobal.h"
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
#define __STDC_CONSTANT_MACROS
#include <pthread.h>
#include <dirent.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/select.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/time.h>
// INTEGRITY doesn't have the System V <sys/shm.h> header. This is not a standard
// POSIX header, it's only documented in the Single UNIX Specification.
// The preferred POSIX compliant way to share memory is to use the functions
// in <sys/mman.h> that comply with the POSIX Real Time Interface (1003.1b).
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif
// for htonl
#include <arpa/inet.h>
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
// INTEGRITY doesn't have getpagesize()
inline int getpagesize()
{
return ::sysconf(_SC_PAGESIZE);
}
// geteuid() is only available with multi-process posix, but we do not want
// to rely on it
inline uid_t geteuid(void)
{
return 0;
}
// getuid() is only available with multi-process posix, but we do not want
// to rely on it
inline uid_t getuid(void)
{
return 0;
}
#include "../posix/qplatformdefs.h"
#undef QT_OPEN_LARGEFILE
#define QT_OPEN_LARGEFILE 0
#define PATH_MAX 1024
#endif // Q_QNX_PLATFORMDEFS_H

View File

@ -0,0 +1,31 @@
#
# qmake configuration for the Jetson TK1 boards
#
# A typical configure line might look like:
# configure \
# -device linux-jetson-tk1-g++ \
# -device-option CROSS_COMPILE=/opt/nvidia/toolchains/tegra-4.8.1-nv/usr/bin/arm-cortex_a15-linux-gnueabi/arm-cortex_a15-linux-gnueabi- \
# -sysroot /opt/nvidia/l4t/targetfs
include(../common/linux_device_pre.conf)
QMAKE_INCDIR += \
$$[QT_SYSROOT]/usr/include
QMAKE_LIBDIR += \
$$[QT_SYSROOT]/usr/lib \
$$[QT_SYSROOT]/lib/arm-linux-gnueabihf \
$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf
QMAKE_LFLAGS += \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \
-Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabihf
DISTRO_OPTS += hard-float
COMPILER_FLAGS += -mtune=cortex-a15 -march=armv7-a -mfpu=neon-vfpv4
EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice
include(../common/linux_arm_device_post.conf)
load(qt_config)

View File

@ -0,0 +1,40 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "../../linux-g++/qplatformdefs.h"

View File

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

View File

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

View File

@ -2,7 +2,7 @@ TEMPLATE = lib
android {
API_VERSION_TO_USE = $$(ANDROID_API_VERSION)
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = $$API_VERSION
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-10
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-16
ANDROID_JAR_FILE = $$ANDROID_SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar
!exists($$ANDROID_JAR_FILE) {

View File

@ -160,21 +160,8 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.")
contains(qt_module_deps, core) {
relative_qt_rpath:!isEmpty(QMAKE_REL_RPATH_BASE):contains(INSTALLS, target):\
isEmpty(target.files):isEmpty(target.commands):isEmpty(target.extra) {
mac {
if(equals(TEMPLATE, app):app_bundle)|\
if(equals(TEMPLATE, lib):plugin:plugin_bundle) {
ios: binpath = $$target.path/$${TARGET}.app
else: binpath = $$target.path/$${TARGET}.app/Contents/MacOS
} else: equals(TEMPLATE, lib):!plugin:lib_bundle {
binpath = $$target.path/$${TARGET}.framework/Versions/Current
} else {
binpath = $$target.path
}
} else {
binpath = $$target.path
}
# NOT the /dev property, as INSTALLS use host paths
QMAKE_RPATHDIR += $$relative_path($$[QT_INSTALL_LIBS], $$binpath)
QMAKE_RPATHDIR += $$relative_path($$[QT_INSTALL_LIBS], $$qtRelativeRPathBase())
} else {
QMAKE_RPATHDIR += $$[QT_INSTALL_LIBS/dev]
}

View File

@ -52,6 +52,9 @@ QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR
unset(modpath)
}
# Apply extra compiler flags passed via configure last.
CONFIG = qt_build_extra $$CONFIG
# Don't actually try to install anything in non-prefix builds.
# This is much easier and safer than making every single INSTALLS
# assignment conditional.
@ -72,6 +75,10 @@ CONFIG += \
# However, testcases should be still built with exceptions.
exceptions_off testcase_exceptions
# Under Windows, this is neither necessary (transitive deps are automatically
# resolved), nor functional (.res files end up in .prl files and break things).
unix: CONFIG += explicitlib
defineTest(qtBuildPart) {
bp = $$eval($$upper($$section(_QMAKE_CONF_, /, -2, -2))_BUILD_PARTS)

View File

@ -0,0 +1,40 @@
#
# W A R N I N G
# -------------
#
# This file is not part of the Qt API. It exists purely as an
# implementation detail. It may change from version to version
# without notice, or even be removed.
#
# We mean it.
#
equals(TEMPLATE, subdirs): return()
# It's likely that these extra flags will be wrong for host builds,
# and the bootstrapped tools usually don't need them anyway.
host_build:force_bootstrap: return()
# The headersclean check needs defines and includes even for
# header-only modules.
DEFINES += $$EXTRA_DEFINES
INCLUDEPATH += $$EXTRA_INCLUDEPATH
# The other flags are relevant only for actual libraries.
equals(TEMPLATE, aux): return()
LIBS += $$EXTRA_LIBS
# Static libs need no rpaths
static: return()
for (rp, EXTRA_RPATHS) {
absrp = $$absolute_path($$rp, $$[QT_INSTALL_LIBS])
!isEqual(absrp, $$rp) {
isEmpty(QMAKE_REL_RPATH_BASE)|!contains(INSTALLS, target): \
rp = $$absrp
else: \
rp = $$relative_path($$absrp, $$qtRelativeRPathBase())
}
QMAKE_RPATHDIR += $$rp
}

View File

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

View File

@ -33,6 +33,19 @@ defineReplace(qt5LibraryTarget) {
return($$LIBRARY_NAME)
}
defineReplace(qtRelativeRPathBase) {
darwin {
if(equals(TEMPLATE, app):app_bundle)|\
if(equals(TEMPLATE, lib):plugin:plugin_bundle) {
ios: return($$target.path/$${TARGET}.app)
return($$target.path/$${TARGET}.app/Contents/MacOS)
}
equals(TEMPLATE, lib):!plugin:lib_bundle: \
return($$target.path/$${TARGET}.framework/Versions/Current)
}
return($$target.path)
}
defineTest(qtAddLibrary) {
warning("qtAddLibrary() is deprecated. Use QT+= instead.")

View File

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

View File

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

View File

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

View File

@ -0,0 +1,8 @@
#
# qmake configuration for INTEGRITY armv7 targets
#
include(../common/ghs-integrity-armv7.conf)
DEFINES += QT_NO_CLIPBOARD
DEFINES += QT_STATICPLUGIN

View File

@ -0,0 +1,39 @@
/****************************************************************************
**
** Copyright (C) 2015 Green Hills Software. All rights reserved.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
#include "../common/integrity/qplatformdefs.h"
#endif // QPLATFORMDEFS_H

View File

@ -0,0 +1,9 @@
#
# qmake configuration for INTEGRITY x86 32-bit targets
#
include(../common/ghs-integrity-x86.conf)
QMAKE_CFLAGS += -cpu=Corei
DEFINES += QT_NO_CLIPBOARD
DEFINES += QT_STATICPLUGIN

View File

@ -0,0 +1,39 @@
/****************************************************************************
**
** Copyright (C) 2015 Green Hills Software. All rights reserved.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
#include "../common/integrity/qplatformdefs.h"
#endif // QPLATFORMDEFS_H

View File

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

View File

@ -226,12 +226,9 @@ void NmakeMakefileGenerator::writeSubMakeCall(QTextStream &t, const QString &cal
QString NmakeMakefileGenerator::defaultInstall(const QString &t)
{
if((t != "target" && t != "dlltarget") ||
(t == "dlltarget" && (project->first("TEMPLATE") != "lib" || !project->isActiveConfig("shared"))) ||
project->first("TEMPLATE") == "subdirs")
return QString();
QString ret = Win32MakefileGenerator::defaultInstall(t);
if (ret.isEmpty())
return ret;
const QString root = installRoot();
ProStringList &uninst = project->values(ProKey(t + ".uninstall"));

View File

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

View File

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

View File

@ -1,4 +1,4 @@
Libpng 1.6.19 - November 12, 2015
Libpng 1.6.20 - December 3, 2015
This is a public release of libpng, intended for use in production codes.
@ -7,104 +7,41 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
libpng-1.6.19.tar.xz (LZMA-compressed, recommended)
libpng-1.6.19.tar.gz
libpng-1.6.20.tar.xz (LZMA-compressed, recommended)
libpng-1.6.20.tar.gz
Source files with CRLF line endings (for Windows), without the
"configure" script
lpng1619.7z (LZMA-compressed, recommended)
lpng1619.zip
/scratch/glennrp/Libpng16/lpng1620.7z (LZMA-compressed, recommended)
/scratch/glennrp/Libpng16/lpng1620.zip
Other information:
libpng-1.6.19-README.txt
libpng-1.6.19-LICENSE.txt
libpng-1.6.19-*.asc (armored detached GPG signatures)
libpng-1.6.20-README.txt
libpng-1.6.20-LICENSE.txt
libpng-1.6.20-*.asc (armored detached GPG signatures)
Changes since the last public release (1.6.18):
Updated obsolete information about the simplified API macros in the
manual pages (Bug report by Arc Riley).
Avoid potentially dereferencing NULL info_ptr in png_info_init_3().
Rearranged png.h to put the major sections in the same order as
in libpng17.
Eliminated unused PNG_COST_SHIFT, PNG_WEIGHT_SHIFT, PNG_COST_FACTOR, and
PNG_WEIGHT_FACTOR macros.
Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
(Bug report by Viktor Szakats). Several warnings remain and are
unavoidable, where we test for overflow.
Fixed potential leak of png_pixels in contrib/pngminus/pnm2png.c
Fixed uninitialized variable in contrib/gregbook/rpng2-x.c
Moved config.h.in~ from the "libpng_autotools_files" list to the
"libpng_autotools_extra" list in autogen.sh because it was causing a
false positive for missing files (bug report by Robert C. Seacord).
Removed unreachable "break" statements in png.c, pngread.c, and pngrtran.c
to suppress clang warnings (Bug report by Viktor Szakats).
Fixed some bad links in the man page.
Changed "n bit" to "n-bit" in comments.
Added signed/unsigned 16-bit safety net. This removes the dubious
0x8000 flag definitions on 16-bit systems. They aren't supported
yet the defs *probably* work, however it seems much safer to do this
and be advised if anyone, contrary to advice, is building libpng 1.6
on a 16-bit system. It also adds back various switch default clauses
for GCC; GCC errors out if they are not present (with an appropriately
high level of warnings).
Safely convert num_bytes to a png_byte in png_set_sig_bytes() (Robert
Seacord).
Fixed the recently reported 1's complement security issue by replacing
the value that is illegal in the PNG spec, in both signed and unsigned
values, with 0. Illegal unsigned values (anything greater than or equal
to 0x80000000) can still pass through, but since these are not illegal
in ANSI-C (unlike 0x80000000 in the signed case) the checking that
occurs later can catch them (John Bowler).
Fixed png_save_int_32 when int is not 2's complement (John Bowler).
Updated libpng16 with all the recent test changes from libpng17,
including changes to pngvalid.c to ensure that the original,
distributed, version of contrib/visupng/cexcept.h can be used
(John Bowler).
pngvalid contains the correction to the use of SAVE/STORE_
UNKNOWN_CHUNKS; a bug revealed by changes in libpng 1.7. More
tests contain the --strict option to detect warnings and the
pngvalid-standard test has been corrected so that it does not
turn on progressive-read. There is a separate test which does
that. (John Bowler)
Also made some signed/unsigned fixes.
Make pngstest error limits version specific. Splitting the machine
generated error structs out to a file allows the values to be updated
without changing pngstest.c itself. Since libpng 1.6 and 1.7 have
slightly different error limits this simplifies maintenance. The
makepngs.sh script has also been updated to more accurately reflect
current problems in libpng 1.7 (John Bowler).
Incorporated new test PNG files into make check. tests/pngstest-*
are changed so that the new test files are divided into 8 groups by
gamma and alpha channel. These tests have considerably better code
and pixel-value coverage than contrib/pngsuite; however,coverage is
still incomplete (John Bowler).
Removed the '--strict' in 1.6 because of the double-gamma-correction
warning, updated pngstest-errors.h for the errors detected with the
new contrib/testspngs PNG test files (John Bowler).
Worked around rgb-to-gray issues in libpng 1.6. The previous
attempts to ignore the errors in the code aren't quite enough to
deal with the 'channel selection' encoding added to libpng 1.7; abort.
Fixed 'pow' macros in pngvalid.c. It is legal for 'pow' to be a
macro, therefore the argument list cannot contain preprocessing
directives. Make sure pow is a function where this happens. This is
a minimal safe fix, the issue only arises in non-performance-critical
code (bug report by Curtis Leach, fix by John Bowler).
Added sPLT support to pngtest.c
Prevent setting or writing over-length PLTE chunk (Cosmin Truta).
Silently truncate over-length PLTE chunk while reading.
Libpng incorrectly calculated the output rowbytes when the application
decreased either the number of channels or the bit depth (or both) in
a user transform. This was safe; libpng overallocated buffer space
(potentially by quite a lot; up to 4 times the amount required) but,
from 1.5.4 on, resulted in a png_error (John Bowler).
Fixed some inconsequential cut-and-paste typos in png_set_cHRM_XYZ_fixed().
Clarified COPYRIGHT information to state explicitly that versions
are derived from previous versions.
Removed much of the long list of previous versions from png.h and
libpng.3.
Changes since the last public release (1.6.19):
Avoid potential pointer overflow/underflow in png_handle_sPLT() and
png_handle_pCAL() (Bug report by John Regehr).
Fixed incorrect implementation of png_set_PLTE() that uses png_ptr
not info_ptr, that left png_set_PLTE() open to the CVE-2015-8126
vulnerability.
Backported tests from libpng-1.7.0beta69.
Fixed an error in handling of bad zlib CMINFO field in pngfix, found by
American Fuzzy Lop, reported by Brian Carpenter. inflate() doesn't
immediately fault a bad CMINFO field; instead a 'too far back' error
happens later (at least some times). pngfix failed to limit CMINFO to
the allowed values but then assumed that window_bits was in range,
triggering an assert. The bug is mostly harmless; the PNG file cannot
be fixed.
In libpng 1.6 zlib initialization was changed to use the window size
in the zlib stream, not a fixed value. This causes some invalid images,
where CINFO is too large, to display 'correctly' if the rest of the
data is valid. This provides a workaround for zlib versions where the
error arises (ones that support the API change to use the window size
in the stream).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -5409,11 +5409,43 @@ Version 1.6.19rc03 [November 3, 2015]
Version 1.6.19rc04 [November 5, 2015]
Fixed new bug with CRC error after reading an over-length palette
(bug report by Cosmin Truta).
(bug report by Cosmin Truta) (CVE-2015-8126).
Version 1.6.19 [November 12, 2015]
Cleaned up coding style in png_handle_PLTE().
Version 1.6.20beta01 [November 20, 2015]
Avoid potential pointer overflow/underflow in png_handle_sPLT() and
png_handle_pCAL() (Bug report by John Regehr).
Version 1.6.20beta02 [November 23, 2015]
Fixed incorrect implementation of png_set_PLTE() that uses png_ptr
not info_ptr, that left png_set_PLTE() open to the CVE-2015-8126
vulnerability.
Version 1.6.20beta03 [November 24, 2015]
Backported tests from libpng-1.7.0beta69.
Version 1.6.20rc01 [November 26, 2015]
Fixed an error in handling of bad zlib CMINFO field in pngfix, found by
American Fuzzy Lop, reported by Brian Carpenter. inflate() doesn't
immediately fault a bad CMINFO field; instead a 'too far back' error
happens later (at least some times). pngfix failed to limit CMINFO to
the allowed values but then assumed that window_bits was in range,
triggering an assert. The bug is mostly harmless; the PNG file cannot
be fixed.
Version 1.6.20rc02 [November 29, 2015]
In libpng 1.6 zlib initialization was changed to use the window size
in the zlib stream, not a fixed value. This causes some invalid images,
where CINFO is too large, to display 'correctly' if the rest of the
data is valid. This provides a workaround for zlib versions where the
error arises (ones that support the API change to use the window size
in the stream).
Version 1.6.20 [December 3, 2015]
No changes.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

View File

@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000, through 1.6.19, November 12, 2015, are
libpng versions 1.0.7, July 1, 2000, through 1.6.20, December 3, 2015, are
Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
@ -109,4 +109,4 @@ the additional disclaimers inserted at version 1.0.7.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
November 12, 2015
December 3, 2015

View File

@ -1,4 +1,4 @@
README for libpng version 1.6.19 - November 12, 2015 (shared library 16.0)
README for libpng version 1.6.20 - December 3, 2015 (shared library 16.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.19 - November 12, 2015
libpng version 1.6.20 - December 3, 2015
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2015 Glenn Randers-Pehrson
@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.6.19 - November 12, 2015
libpng versions 0.97, January 1998, through 1.6.20 - December 3, 2015
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2015 Glenn Randers-Pehrson
@ -2960,6 +2960,7 @@ width, height, bit_depth, and color_type must be the same in each call.
(array of png_color)
num_palette - number of entries in the palette
png_set_gAMA(png_ptr, info_ptr, file_gamma);
png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma);
@ -4897,7 +4898,7 @@ a set of "safe" limits is applied in pngpriv.h. These can be overridden by
application calls to png_set_user_limits(), png_set_user_chunk_cache_max(),
and/or png_set_user_malloc_max() that increase or decrease the limits. Also,
in libpng-1.5.10 the default width and height limits were increased
from 1,000,000 to 0x7ffffff (i.e., made unlimited). Therefore, the
from 1,000,000 to 0x7fffffff (i.e., made unlimited). Therefore, the
limits are now
default safe
png_user_width_max 0x7fffffff 1,000,000
@ -5323,7 +5324,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.6.19 are Y2K compliant. It is my belief that earlier
upward through 1.6.20 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer

View File

@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_19 Your_png_h_is_not_version_1_6_19;
typedef png_libpng_version_1_6_20 Your_png_h_is_not_version_1_6_20;
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@ -775,13 +775,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.6.19 - November 12, 2015" PNG_STRING_NEWLINE \
"libpng version 1.6.20 - December 3, 2015" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2015 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.6.19 - November 12, 2015\
return "libpng version 1.6.20 - December 3, 2015\
Copyright (c) 1998-2015 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@ -2343,7 +2343,7 @@ png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr,
* Fall through to "no match".
*/
png_chunk_report(png_ptr,
"Not recognizing known sRGB profile that has been edited",
"Not recognizing known sRGB profile that has been edited",
PNG_CHUNK_WARNING);
break;
# endif

View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.6.19, November 12, 2015
* libpng version 1.6.20, December 3, 2015
*
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -12,7 +12,8 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.19, November 12, 2015: Glenn
* libpng versions 0.97, January 1998, through 1.6.20, December 3, 2015:
* Glenn Randers-Pehrson.
* See also "Contributing Authors", below.
*/
@ -24,7 +25,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.0.7, July 1, 2000, through 1.6.19, November 12, 2015, are
* libpng versions 1.0.7, July 1, 2000, through 1.6.20, December 3, 2015, are
* Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are
* derived from libpng-1.0.6, and are distributed according to the same
* disclaimer and license as libpng-1.0.6 with the following individuals
@ -185,7 +186,7 @@
* ...
* 1.5.23 15 10523 15.so.15.23[.0]
* ...
* 1.6.19 16 10619 16.so.16.19[.0]
* 1.6.20 16 10620 16.so.16.20[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@ -213,13 +214,13 @@
* Y2K compliance in libpng:
* =========================
*
* November 12, 2015
* December 3, 2015
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.6.19 are Y2K compliant. It is my belief that
* upward through 1.6.20 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant.
*
* Libpng only has two year fields. One is a 2-byte unsigned integer
@ -281,9 +282,9 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.19"
#define PNG_LIBPNG_VER_STRING "1.6.20"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.6.19 - November 12, 2015\n"
" libpng version 1.6.20 - December 3, 2015\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@ -291,7 +292,7 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
#define PNG_LIBPNG_VER_RELEASE 19
#define PNG_LIBPNG_VER_RELEASE 20
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
@ -322,7 +323,7 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
#define PNG_LIBPNG_VER 10619 /* 1.6.19 */
#define PNG_LIBPNG_VER 10620 /* 1.6.20 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@ -432,7 +433,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
typedef char* png_libpng_version_1_6_19;
typedef char* png_libpng_version_1_6_20;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.6.19, July 23, 2015
* libpng version 1.6.20, December 3, 2015
*
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -768,7 +768,7 @@ png_longjmp,(png_const_structrp png_ptr, int val),PNG_NORETURN)
/* If control reaches this point, png_longjmp() must not return. The only
* choice is to terminate the whole process (or maybe the thread); to do
* this the ANSI-C abort() function is used unless a different method is
* this the ANSI-C abort() function is used unless a different method is
* implemented by overriding the default configuration setting for
* PNG_ABORT().
*/

View File

@ -223,7 +223,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
/* Storage for unknown chunks that the library doesn't recognize. */
png_unknown_chunkp unknown_chunks;
/* The type of this field is limited by the type of
/* The type of this field is limited by the type of
* png_struct::user_chunk_cache_max, else overflow can occur.
*/
int unknown_chunks_num;

View File

@ -1,6 +1,6 @@
/* pnglibconf.h - library build configuration */
/* libpng version 1.6.19, July 23, 2015 */
/* libpng version 1.6.20 - December 3, 2015 */
/* Copyright (c) 1998-2014 Glenn Randers-Pehrson */

View File

@ -133,7 +133,7 @@ png_process_some_data(png_structrp png_ptr, png_inforp info_ptr)
void /* PRIVATE */
png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr)
{
png_size_t num_checked = png_ptr->sig_bytes, /* SAFE, does not exceed 8 */
png_size_t num_checked = png_ptr->sig_bytes, /* SAFE, does not exceed 8 */
num_to_check = 8 - num_checked;
if (png_ptr->buffer_size < num_to_check)
@ -662,7 +662,7 @@ png_process_IDAT_data(png_structrp png_ptr, png_bytep buffer,
* change the current behavior (see comments in inflate.c
* for why this doesn't happen at present with zlib 1.2.5).
*/
ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH);
ret = PNG_INFLATE(png_ptr, Z_SYNC_FLUSH);
/* Check for any failure before proceeding. */
if (ret != Z_OK && ret != Z_STREAM_END)

View File

@ -1229,6 +1229,14 @@ PNG_INTERNAL_FUNCTION(void,png_read_finish_row,(png_structrp png_ptr),
/* Initialize the row buffers, etc. */
PNG_INTERNAL_FUNCTION(void,png_read_start_row,(png_structrp png_ptr),PNG_EMPTY);
#if PNG_ZLIB_VERNUM >= 0x1240
PNG_INTERNAL_FUNCTION(int,png_zlib_inflate,(png_structrp png_ptr, int flush),
PNG_EMPTY);
# define PNG_INFLATE(pp, flush) png_zlib_inflate(pp, flush)
#else /* Zlib < 1.2.4 */
# define PNG_INFLATE(pp, flush) inflate(&(pp)->zstream, flush)
#endif /* Zlib < 1.2.4 */
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
/* Optional call to update the users info structure */
PNG_INTERNAL_FUNCTION(void,png_read_transform_info,(png_structrp png_ptr,

View File

@ -2838,7 +2838,6 @@ png_image_read_colormap(png_voidp argument)
default:
png_error(png_ptr, "invalid PNG color type");
/*NOT REACHED*/
break;
}
/* Now deal with the output processing */

View File

@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
* Last changed in libpng 1.6.19 [November 12, 2015]
* Last changed in libpng 1.6.20 [December 3, 2015]
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -377,10 +377,16 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
if (((png_ptr->options >> PNG_MAXIMUM_INFLATE_WINDOW) & 3) ==
PNG_OPTION_ON)
{
window_bits = 15;
png_ptr->zstream_start = 0; /* fixed window size */
}
else
{
window_bits = 0;
png_ptr->zstream_start = 1;
}
# else
# define window_bits 0
# endif
@ -429,6 +435,31 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
#endif
}
#if PNG_ZLIB_VERNUM >= 0x1240
/* Handle the start of the inflate stream if we called inflateInit2(strm,0);
* in this case some zlib versions skip validation of the CINFO field and, in
* certain circumstances, libpng may end up displaying an invalid image, in
* contrast to implementations that call zlib in the normal way (e.g. libpng
* 1.5).
*/
int /* PRIVATE */
png_zlib_inflate(png_structrp png_ptr, int flush)
{
if (png_ptr->zstream_start && png_ptr->zstream.avail_in > 0)
{
if ((*png_ptr->zstream.next_in >> 4) > 7)
{
png_ptr->zstream.msg = "invalid window size (libpng)";
return Z_DATA_ERROR;
}
png_ptr->zstream_start = 0;
}
return inflate(&png_ptr->zstream, flush);
}
#endif /* Zlib >= 1.2.4 */
#ifdef PNG_READ_COMPRESSED_TEXT_SUPPORTED
/* png_inflate now returns zlib error codes including Z_OK and Z_STREAM_END to
* allow the caller to do multiple calls if required. If the 'finish' flag is
@ -522,7 +553,7 @@ png_inflate(png_structrp png_ptr, png_uint_32 owner, int finish,
* the previous chunk of input data. Tell zlib if we have reached the
* end of the output buffer.
*/
ret = inflate(&png_ptr->zstream, avail_out > 0 ? Z_NO_FLUSH :
ret = PNG_INFLATE(png_ptr, avail_out > 0 ? Z_NO_FLUSH :
(finish ? Z_FINISH : Z_SYNC_FLUSH));
} while (ret == Z_OK);
@ -771,7 +802,7 @@ png_inflate_read(png_structrp png_ptr, png_bytep read_buffer, uInt read_size,
* the available output is produced; this allows reading of truncated
* streams.
*/
ret = inflate(&png_ptr->zstream,
ret = PNG_INFLATE(png_ptr,
*chunk_bytes > 0 ? Z_NO_FLUSH : (finish ? Z_FINISH : Z_SYNC_FLUSH));
}
while (ret == Z_OK && (*out_size > 0 || png_ptr->zstream.avail_out > 0));
@ -1670,7 +1701,7 @@ png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
++entry_start;
/* A sample depth should follow the separator, and we should be on it */
if (entry_start > buffer + length - 2)
if (length < 2U || entry_start > buffer + (length - 2U))
{
png_warning(png_ptr, "malformed sPLT chunk");
return;
@ -2174,7 +2205,7 @@ png_handle_pCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
/* We need to have at least 12 bytes after the purpose string
* in order to get the parameter information.
*/
if (endptr <= buf + 12)
if (endptr - buf <= 12)
{
png_chunk_benign_error(png_ptr, "invalid");
return;
@ -4039,7 +4070,7 @@ png_read_IDAT_data(png_structrp png_ptr, png_bytep output,
*
* TODO: deal more elegantly with truncated IDAT lists.
*/
ret = inflate(&png_ptr->zstream, Z_NO_FLUSH);
ret = PNG_INFLATE(png_ptr, Z_NO_FLUSH);
/* Take the unconsumed output back. */
if (output != NULL)

View File

@ -520,8 +520,8 @@ png_set_PLTE(png_structrp png_ptr, png_inforp info_ptr,
if (png_ptr == NULL || info_ptr == NULL)
return;
max_palette_length = (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ?
(1 << png_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH;
max_palette_length = (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ?
(1 << info_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH;
if (num_palette < 0 || num_palette > (int) max_palette_length)
{
@ -1573,7 +1573,7 @@ png_set_user_limits (png_structrp png_ptr, png_uint_32 user_width_max,
{
/* Images with dimensions larger than these limits will be
* rejected by png_set_IHDR(). To accept any PNG datastream
* regardless of dimensions, set both limits to 0x7ffffff.
* regardless of dimensions, set both limits to 0x7fffffff.
*/
if (png_ptr == NULL)
return;

View File

@ -263,6 +263,9 @@ struct png_struct_def
/* pixel depth used for the row buffers */
png_byte transformed_pixel_depth;
/* pixel depth after read/write transforms */
#if PNG_ZLIB_VERNUM >= 0x1240
png_byte zstream_start; /* at start of an input zlib stream */
#endif /* Zlib >= 1.2.4 */
#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
png_uint_16 filler; /* filler bytes for pixel expansion */
#endif

View File

@ -2563,7 +2563,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
if (filter_to_do == PNG_FILTER_SUB)
/* It's the only filter so no testing is needed */
{
(void) png_setup_sub_row(png_ptr, bpp, row_bytes, mins);
(void) png_setup_sub_row(png_ptr, bpp, row_bytes, mins);
best_row = png_ptr->try_row;
}
@ -2572,7 +2572,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
png_size_t sum;
png_size_t lmins = mins;
sum = png_setup_sub_row(png_ptr, bpp, row_bytes, lmins);
sum = png_setup_sub_row(png_ptr, bpp, row_bytes, lmins);
if (sum < mins)
{
@ -2598,7 +2598,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
png_size_t sum;
png_size_t lmins = mins;
sum = png_setup_up_row(png_ptr, row_bytes, lmins);
sum = png_setup_up_row(png_ptr, row_bytes, lmins);
if (sum < mins)
{

View File

@ -289,7 +289,7 @@ static void get_cpu_features(void)
__cpuid(CPUInfo, 1);
features = (sljit_ui)CPUInfo[3];
#elif defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_C)
#elif defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_C) || defined(__ghs)
/* AT&T syntax. */
__asm__ (

View File

@ -1,31 +0,0 @@
From 448df48c1610745cad734df210aa2f21f26c9ae4 Mon Sep 17 00:00:00 2001
From: Gunnar Roth <gunnar.roth@gmx.net>
Date: Fri, 22 Jan 2016 22:38:17 +0100
Subject: [PATCH] Fixing the SQLite3 build for WEC2013 again.
The new version broke the build again
-> fix it again.
Change-Id: I75761d134d97a2784f1de5076412aa814fdf9bcd
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
index c0ab233..b397726 100644
--- a/src/3rdparty/sqlite/sqlite3.c
+++ b/src/3rdparty/sqlite/sqlite3.c
@@ -16867,6 +16867,13 @@ static void clearYMD_HMS_TZ(DateTime *p){
#define HAVE_LOCALTIME_S 1
#endif
+#if defined(_WIN32_WCE) && _WIN32_WCE < 0x800
+#undef HAVE_LOCALTIME_S
+struct tm *__cdecl localtime(const time_t *t);
+#elif defined(_WIN32_WCE) && _WIN32_WCE >= 0x800
+#define SQLITE_MSVC_LOCALTIME_API 1
+#endif
+
#ifndef SQLITE_OMIT_LOCALTIME
/*
** The following routine implements the rough equivalent of localtime_r()
--
2.5.0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -111,9 +111,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION "3.10.2"
#define SQLITE_VERSION_NUMBER 3010002
#define SQLITE_SOURCE_ID "2016-01-20 15:27:19 17efb4209f97fb4971656086b138599a91a75ff9"
#define SQLITE_VERSION "3.11.1"
#define SQLITE_VERSION_NUMBER 3011001
#define SQLITE_SOURCE_ID "2016-03-03 16:17:53 f047920ce16971e573bc6ec9a48b118c9de2b3a7"
/*
** CAPI3REF: Run-Time Library Version Numbers
@ -347,7 +347,7 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**);
** from [sqlite3_malloc()] and passed back through the 5th parameter.
** To avoid memory leaks, the application should invoke [sqlite3_free()]
** on error message strings returned through the 5th parameter of
** of sqlite3_exec() after the error message string is no longer needed.
** sqlite3_exec() after the error message string is no longer needed.
** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors
** occur, then sqlite3_exec() sets the pointer in its 5th parameter to
** NULL before returning.
@ -5697,7 +5697,7 @@ struct sqlite3_index_info {
/* Inputs */
int nConstraint; /* Number of entries in aConstraint */
struct sqlite3_index_constraint {
int iColumn; /* Column on left-hand side of constraint */
int iColumn; /* Column constrained. -1 for ROWID */
unsigned char op; /* Constraint operator */
unsigned char usable; /* True if this constraint is usable */
int iTermOffset; /* Used internally - xBestIndex should ignore */
@ -8193,6 +8193,9 @@ struct Fts5PhraseIter {
** an OOM condition or IO error), an appropriate SQLite error code is
** returned.
**
** This function may be quite inefficient if used with an FTS5 table
** created with the "columnsize=0" option.
**
** xColumnText:
** This function attempts to retrieve the text of column iCol of the
** current document. If successful, (*pz) is set to point to a buffer
@ -8213,15 +8216,29 @@ struct Fts5PhraseIter {
** the query within the current row. Return SQLITE_OK if successful, or
** an error code (i.e. SQLITE_NOMEM) if an error occurs.
**
** This API can be quite slow if used with an FTS5 table created with the
** "detail=none" or "detail=column" option. If the FTS5 table is created
** with either "detail=none" or "detail=column" and "content=" option
** (i.e. if it is a contentless table), then this API always returns 0.
**
** xInst:
** Query for the details of phrase match iIdx within the current row.
** Phrase matches are numbered starting from zero, so the iIdx argument
** should be greater than or equal to zero and smaller than the value
** output by xInstCount().
**
** Usually, output parameter *piPhrase is set to the phrase number, *piCol
** to the column in which it occurs and *piOff the token offset of the
** first token of the phrase. The exception is if the table was created
** with the offsets=0 option specified. In this case *piOff is always
** set to -1.
**
** Returns SQLITE_OK if successful, or an error code (i.e. SQLITE_NOMEM)
** if an error occurs.
**
** This API can be quite slow if used with an FTS5 table created with the
** "detail=none" or "detail=column" option.
**
** xRowid:
** Returns the rowid of the current row.
**
@ -8305,7 +8322,7 @@ struct Fts5PhraseIter {
** Fts5PhraseIter iter;
** int iCol, iOff;
** for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff);
** iOff>=0;
** iCol>=0;
** pApi->xPhraseNext(pFts, &iter, &iCol, &iOff)
** ){
** // An instance of phrase iPhrase at offset iOff of column iCol
@ -8313,13 +8330,51 @@ struct Fts5PhraseIter {
**
** The Fts5PhraseIter structure is defined above. Applications should not
** modify this structure directly - it should only be used as shown above
** with the xPhraseFirst() and xPhraseNext() API methods.
** with the xPhraseFirst() and xPhraseNext() API methods (and by
** xPhraseFirstColumn() and xPhraseNextColumn() as illustrated below).
**
** This API can be quite slow if used with an FTS5 table created with the
** "detail=none" or "detail=column" option. If the FTS5 table is created
** with either "detail=none" or "detail=column" and "content=" option
** (i.e. if it is a contentless table), then this API always iterates
** through an empty set (all calls to xPhraseFirst() set iCol to -1).
**
** xPhraseNext()
** See xPhraseFirst above.
**
** xPhraseFirstColumn()
** This function and xPhraseNextColumn() are similar to the xPhraseFirst()
** and xPhraseNext() APIs described above. The difference is that instead
** of iterating through all instances of a phrase in the current row, these
** APIs are used to iterate through the set of columns in the current row
** that contain one or more instances of a specified phrase. For example:
**
** Fts5PhraseIter iter;
** int iCol;
** for(pApi->xPhraseFirstColumn(pFts, iPhrase, &iter, &iCol);
** iCol>=0;
** pApi->xPhraseNextColumn(pFts, &iter, &iCol)
** ){
** // Column iCol contains at least one instance of phrase iPhrase
** }
**
** This API can be quite slow if used with an FTS5 table created with the
** "detail=none" option. If the FTS5 table is created with either
** "detail=none" "content=" option (i.e. if it is a contentless table),
** then this API always iterates through an empty set (all calls to
** xPhraseFirstColumn() set iCol to -1).
**
** The information accessed using this API and its companion
** xPhraseFirstColumn() may also be obtained using xPhraseFirst/xPhraseNext
** (or xInst/xInstCount). The chief advantage of this API is that it is
** significantly more efficient than those alternatives when used with
** "detail=column" tables.
**
** xPhraseNextColumn()
** See xPhraseFirstColumn above.
*/
struct Fts5ExtensionApi {
int iVersion; /* Currently always set to 1 */
int iVersion; /* Currently always set to 3 */
void *(*xUserData)(Fts5Context*);
@ -8349,8 +8404,11 @@ struct Fts5ExtensionApi {
int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*));
void *(*xGetAuxdata)(Fts5Context*, int bClear);
void (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);
int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);
void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff);
int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*);
void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol);
};
/*

View File

@ -102,7 +102,7 @@ public class QtService extends Service
{
QtApplication.InvokeResult res = QtApplication.invokeDelegate(intent, flags, startId);
if (res.invoked)
return (int) res.methodReturns;
return (Integer) res.methodReturns;
else
return super.onStartCommand(intent, flags, startId);
}
@ -141,7 +141,7 @@ public class QtService extends Service
{
QtApplication.InvokeResult res = QtApplication.invokeDelegate(intent);
if (res.invoked)
return (boolean) res.methodReturns;
return (Boolean) res.methodReturns;
else
return super.onUnbind(intent);
}

View File

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

View File

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

View File

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

View File

@ -318,14 +318,14 @@
and PGI C++ 5.2-4 */
#elif !defined(Q_OS_HPUX) && (defined(__EDG) || defined(__EDG__))
# define Q_CC_EDG
/* From the EDG documentation (does not seem to apply to Compaq C++):
/* From the EDG documentation (does not seem to apply to Compaq C++ or GHS C):
_BOOL
Defined in C++ mode when bool is a keyword. The name of this
predefined macro is specified by a configuration flag. _BOOL
is the default.
__BOOL_DEFINED
Defined in Microsoft C++ mode when bool is a keyword. */
# if !defined(_BOOL) && !defined(__BOOL_DEFINED)
# if !defined(_BOOL) && !defined(__BOOL_DEFINED) && !defined(__ghs)
# error "Compiler not supported"
# endif
@ -347,6 +347,52 @@
/* Uses CFront, make sure to read the manual how to tweak templates. */
# elif defined(__ghs)
# define Q_CC_GHS
# define Q_DECL_DEPRECATED __attribute__ ((__deprecated__))
# define Q_FUNC_INFO __PRETTY_FUNCTION__
# define Q_TYPEOF(expr) __typeof__(expr)
# define Q_ALIGNOF(type) __alignof__(type)
# define Q_UNREACHABLE_IMPL()
# if defined(__cplusplus)
# define Q_COMPILER_AUTO_TYPE
# define Q_COMPILER_STATIC_ASSERT
# define Q_COMPILER_RANGE_FOR
# if __GHS_VERSION_NUMBER >= 201505
# define Q_COMPILER_ALIGNAS
# define Q_COMPILER_ALIGNOF
# define Q_COMPILER_ATOMICS
# define Q_COMPILER_ATTRIBUTES
# define Q_COMPILER_AUTO_FUNCTION
# define Q_COMPILER_CLASS_ENUM
# define Q_COMPILER_CONSTEXPR
# define Q_COMPILER_DECLTYPE
# define Q_COMPILER_DEFAULT_MEMBERS
# define Q_COMPILER_DELETE_MEMBERS
# define Q_COMPILER_DELEGATING_CONSTRUCTORS
# define Q_COMPILER_EXPLICIT_CONVERSIONS
# define Q_COMPILER_EXPLICIT_OVERRIDES
# define Q_COMPILER_EXTERN_TEMPLATES
# define Q_COMPILER_INHERITING_CONSTRUCTORS
# define Q_COMPILER_INITIALIZER_LISTS
# define Q_COMPILER_LAMBDA
# define Q_COMPILER_NONSTATIC_MEMBER_INIT
# define Q_COMPILER_NOEXCEPT
# define Q_COMPILER_NULLPTR
# define Q_COMPILER_RANGE_FOR
# define Q_COMPILER_RAW_STRINGS
# define Q_COMPILER_REF_QUALIFIERS
# define Q_COMPILER_RVALUE_REFS
# define Q_COMPILER_STATIC_ASSERT
# define Q_COMPILER_TEMPLATE_ALIAS
# define Q_COMPILER_THREAD_LOCAL
# define Q_COMPILER_THREADSAFE_STATICS
# define Q_COMPILER_UDL
# define Q_COMPILER_UNICODE_STRINGS
# define Q_COMPILER_UNIFORM_INIT
# define Q_COMPILER_UNRESTRICTED_UNIONS
# define Q_COMPILER_VARIADIC_MACROS
# define Q_COMPILER_VARIADIC_TEMPLATES
# endif
# endif //__cplusplus
# elif defined(__DCC__)
# define Q_CC_DIAB

View File

@ -426,7 +426,7 @@ Q_STATIC_ASSERT_X(QT_POINTER_SIZE == sizeof(void *), "QT_POINTER_SIZE defined in
*/
/*!
\fn QFlags QFlags::setFlag(Enum flag, bool on) const
\fn QFlags QFlags::setFlag(Enum flag, bool on)
\since 5.7
Sets the indicated \a flag if \a on is \c true or unsets it if

View File

@ -627,6 +627,13 @@ class QDataStream;
# define QT_NO_PROCESS
#endif
#if defined(Q_OS_INTEGRITY)
# define QT_NO_CRASHHANDLER // no popen
# define QT_NO_PROCESS // no exec*, no fork
# define QT_NO_SYSTEMSEMAPHORE // not needed at all in a single AddressSpace
# define QT_NO_MULTIPROCESS // no system
#endif
inline void qt_noop(void) {}
/* These wrap try/catch so we can switch off exceptions later.

View File

@ -305,6 +305,8 @@ QLibraryInfo::buildDate()
# else
# define COMPILER_STRING "Clang " __clang_version__
# endif
#elif defined(Q_CC_GHS)
# define COMPILER_STRING "GHS " QT_STRINGIFY(__GHS_VERSION_NUMBER)
#elif defined(Q_CC_GNU)
# define COMPILER_STRING "GCC " __VERSION__
#elif defined(Q_CC_MSVC)

View File

@ -98,6 +98,11 @@ extern char *__progname;
#if defined(Q_OS_LINUX) && (defined(__GLIBC__) || QT_HAS_INCLUDE(<sys/syscall.h>))
# include <sys/syscall.h>
# if defined(Q_OS_ANDROID) && !defined(SYS_gettid)
# define SYS_gettid __NR_gettid
# endif
static long qt_gettid()
{
// no error handling
@ -1191,7 +1196,7 @@ static void slog2_default_handler(QtMsgType msgType, const char *message)
buffer_config.buffer_set_name = __progname;
buffer_config.num_buffers = 1;
buffer_config.verbosity_level = SLOG2_INFO;
buffer_config.verbosity_level = SLOG2_DEBUG1;
buffer_config.buffer_config[0].buffer_name = "default";
buffer_config.buffer_config[0].num_pages = 8;

View File

@ -1635,7 +1635,7 @@ public:
};
enum ScrollPhase {
NoScrollPhase = 0, // Make public in 5.7 or asap
NoScrollPhase = 0,
ScrollBegin,
ScrollUpdate,
ScrollEnd

View File

@ -3089,7 +3089,8 @@
This enum describes the phase of scrolling.
\omitvalue NoScrollPhase The input device doesn't support scroll phase.
\value NoScrollPhase The input device doesn't support scroll phase.
This value was introduced in Qt 5.7.
\value ScrollBegin Scrolling is about to begin, but the scrolling
distance did not yet change.

View File

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

View File

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

View File

@ -118,14 +118,14 @@ public:
*/
// apply defaults for a generic QTypeInfo<T> that didn't provide the new values
template <typename T, typename = void>
struct QTypeInfoQuery : QTypeInfo<T>
struct QTypeInfoQuery : public QTypeInfo<T>
{
enum { isRelocatable = !QTypeInfo<T>::isStatic };
};
// if QTypeInfo<T>::isRelocatable exists, use it
template <typename T>
struct QTypeInfoQuery<T, typename QtPrivate::QEnableIf<QTypeInfo<T>::isRelocatable || true>::Type> : QTypeInfo<T>
struct QTypeInfoQuery<T, typename QtPrivate::QEnableIf<QTypeInfo<T>::isRelocatable || true>::Type> : public QTypeInfo<T>
{};
/*!

View File

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

View File

@ -317,11 +317,11 @@ QStringList QFileSystemWatcher::addPaths(const QStringList &paths)
// Autotest override case - use the explicitly selected engine only
const QStringRef forceName = on.midRef(26);
if(forceName == QLatin1String("poller")) {
qDebug() << "QFileSystemWatcher: skipping native engine, using only polling engine";
qDebug("QFileSystemWatcher: skipping native engine, using only polling engine");
d_func()->initPollerEngine();
engine = d->poller;
} else if(forceName == QLatin1String("native")) {
qDebug() << "QFileSystemWatcher: skipping polling engine, using only native engine";
qDebug("QFileSystemWatcher: skipping polling engine, using only native engine");
engine = d->native;
}
}

View File

@ -344,7 +344,7 @@ QStringList QInotifyFileSystemWatcherEngine::removePaths(const QStringList &path
void QInotifyFileSystemWatcherEngine::readFromInotify()
{
// qDebug() << "QInotifyFileSystemWatcherEngine::readFromInotify";
// qDebug("QInotifyFileSystemWatcherEngine::readFromInotify");
int buffSize = 0;
ioctl(inotifyFd, FIONREAD, (char *) &buffSize);

View File

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

View File

@ -665,7 +665,8 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
return false;
if (WaitForSingleObjectEx(pid->hProcess, 0, false) == WAIT_OBJECT_0) {
bool readyReadEmitted = drainOutputPipes();
_q_processDied();
if (pid)
_q_processDied();
return readyReadEmitted;
}
@ -683,10 +684,7 @@ bool QProcessPrivate::waitForBytesWritten(int msecs)
QIncrementalSleepTimer timer(msecs);
forever {
// Check if we have any data pending: the pipe writer has
// bytes waiting to written, or it has written data since the
// last time we called stdinChannel.writer->waitForWrite().
bool pendingDataInPipe = stdinChannel.writer && (stdinChannel.writer->bytesToWrite() || stdinChannel.writer->hadWritten());
bool pendingDataInPipe = stdinChannel.writer && stdinChannel.writer->bytesToWrite();
// If we don't have pending data, and our write buffer is
// empty, we fail.
@ -770,7 +768,8 @@ bool QProcessPrivate::waitForFinished(int msecs)
if (WaitForSingleObject(pid->hProcess, timer.nextSleepTime()) == WAIT_OBJECT_0) {
drainOutputPipes();
_q_processDied();
if (pid)
_q_processDied();
return true;
}
@ -813,7 +812,6 @@ qint64 QProcessPrivate::writeToStdin(const char *data, qint64 maxlen)
stdinChannel.writer = new QWindowsPipeWriter(stdinChannel.pipe[1], q);
QObjectPrivate::connect(stdinChannel.writer, &QWindowsPipeWriter::canWrite,
this, &QProcessPrivate::_q_canWrite);
stdinChannel.writer->start();
}
return stdinChannel.writer->write(data, maxlen);

View File

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

View File

@ -117,6 +117,7 @@ static inline void appendTestMode(QString &path)
// Map QStandardPaths::StandardLocation to CLSID of SHGetSpecialFolderPath()
static int writableSpecialFolderClsid(QStandardPaths::StandardLocation type)
{
#ifndef Q_OS_WINCE
static const int clsids[] = {
CSIDL_DESKTOPDIRECTORY, // DesktopLocation
CSIDL_PERSONAL, // DocumentsLocation
@ -136,6 +137,27 @@ static int writableSpecialFolderClsid(QStandardPaths::StandardLocation type)
CSIDL_APPDATA, // AppDataLocation ("Roaming" path)
CSIDL_LOCAL_APPDATA, // AppConfigLocation ("Local" path)
};
#else // !Q_OS_WINCE
static const int clsids[] = {
CSIDL_DESKTOPDIRECTORY, // DesktopLocation
CSIDL_PERSONAL, // DocumentsLocation
CSIDL_FONTS, // FontsLocation
CSIDL_PROGRAMS, // ApplicationsLocation
CSIDL_MYMUSIC, // MusicLocation
CSIDL_MYVIDEO, // MoviesLocation
CSIDL_MYPICTURES, // PicturesLocation
-1, -1, // TempLocation/HomeLocation
CSIDL_APPDATA, // AppLocalDataLocation, AppLocalDataLocation = DataLocation
-1, // CacheLocation
CSIDL_APPDATA, // GenericDataLocation
-1, // RuntimeLocation
CSIDL_APPDATA, // ConfigLocation
-1, -1, // DownloadLocation/GenericCacheLocation
CSIDL_APPDATA, // GenericConfigLocation
CSIDL_APPDATA, // AppDataLocation
CSIDL_APPDATA, // AppConfigLocation
};
#endif // Q_OS_WINCE
Q_STATIC_ASSERT(sizeof(clsids) / sizeof(clsids[0]) == size_t(QStandardPaths::AppConfigLocation + 1));
return size_t(type) < sizeof(clsids) / sizeof(clsids[0]) ? clsids[type] : -1;

View File

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

View File

@ -38,28 +38,40 @@
****************************************************************************/
#include "qwindowspipereader_p.h"
#include "qwinoverlappedionotifier_p.h"
#include <qdebug.h>
#include "qiodevice_p.h"
#include <qelapsedtimer.h>
#include <qeventloop.h>
QT_BEGIN_NAMESPACE
QWindowsPipeReader::Overlapped::Overlapped(QWindowsPipeReader *reader)
: pipeReader(reader)
{
}
void QWindowsPipeReader::Overlapped::clear()
{
ZeroMemory(this, sizeof(OVERLAPPED));
}
QWindowsPipeReader::QWindowsPipeReader(QObject *parent)
: QObject(parent),
handle(INVALID_HANDLE_VALUE),
overlapped(this),
readBufferMaxSize(0),
actualReadBufferSize(0),
stopped(true),
readSequenceStarted(false),
notifiedCalled(false),
pipeBroken(false),
readyReadEmitted(false)
readyReadPending(false),
inReadyRead(false)
{
dataReadNotifier = new QWinOverlappedIoNotifier(this);
connect(dataReadNotifier, &QWinOverlappedIoNotifier::notified, this, &QWindowsPipeReader::notified);
connect(this, &QWindowsPipeReader::_q_queueReadyRead,
this, &QWindowsPipeReader::emitPendingReadyRead, Qt::QueuedConnection);
}
static bool qt_cancelIo(HANDLE handle, OVERLAPPED *overlapped)
bool qt_cancelIo(HANDLE handle, OVERLAPPED *overlapped)
{
typedef BOOL (WINAPI *PtrCancelIoEx)(HANDLE, LPOVERLAPPED);
static PtrCancelIoEx ptrCancelIoEx = 0;
@ -88,12 +100,6 @@ void QWindowsPipeReader::setHandle(HANDLE hPipeReadEnd)
actualReadBufferSize = 0;
handle = hPipeReadEnd;
pipeBroken = false;
readyReadEmitted = false;
stopped = false;
if (hPipeReadEnd != INVALID_HANDLE_VALUE) {
dataReadNotifier->setHandle(hPipeReadEnd);
dataReadNotifier->setEnabled(true);
}
}
/*!
@ -104,19 +110,15 @@ void QWindowsPipeReader::stop()
{
stopped = true;
if (readSequenceStarted) {
if (qt_cancelIo(handle, &overlapped)) {
dataReadNotifier->waitForNotified(-1, &overlapped);
} else {
if (!qt_cancelIo(handle, &overlapped)) {
const DWORD dwError = GetLastError();
if (dwError != ERROR_NOT_FOUND) {
qErrnoWarning(dwError, "QWindowsPipeReader: qt_cancelIo on handle %x failed.",
handle);
}
}
waitForNotification(-1);
}
readSequenceStarted = false;
dataReadNotifier->setEnabled(false);
handle = INVALID_HANDLE_VALUE;
}
/*!
@ -174,11 +176,10 @@ bool QWindowsPipeReader::canReadLine() const
\internal
Will be called whenever the read operation completes.
*/
void QWindowsPipeReader::notified(quint32 numberOfBytesRead, quint32 errorCode,
OVERLAPPED *notifiedOverlapped)
void QWindowsPipeReader::notified(DWORD errorCode, DWORD numberOfBytesRead)
{
if (&overlapped != notifiedOverlapped)
return;
notifiedCalled = true;
readSequenceStarted = false;
switch (errorCode) {
case ERROR_SUCCESS:
@ -202,8 +203,6 @@ void QWindowsPipeReader::notified(quint32 numberOfBytesRead, quint32 errorCode,
break;
}
readSequenceStarted = false;
// After the reader was stopped, the only reason why this function can be called is the
// completion of a cancellation. No signals should be emitted, and no new read sequence should
// be started in this case.
@ -218,13 +217,15 @@ void QWindowsPipeReader::notified(quint32 numberOfBytesRead, quint32 errorCode,
actualReadBufferSize += numberOfBytesRead;
readBuffer.truncate(actualReadBufferSize);
startAsyncRead();
readyReadEmitted = true;
emit readyRead();
if (!readyReadPending) {
readyReadPending = true;
emit _q_queueReadyRead(QWindowsPipeReader::QPrivateSignal());
}
}
/*!
\internal
Reads data from the socket into the readbuffer
Reads data from the pipe into the readbuffer.
*/
void QWindowsPipeReader::startAsyncRead()
{
@ -244,41 +245,39 @@ void QWindowsPipeReader::startAsyncRead()
char *ptr = readBuffer.reserve(bytesToRead);
stopped = false;
readSequenceStarted = true;
ZeroMemory(&overlapped, sizeof(overlapped));
if (ReadFile(handle, ptr, bytesToRead, NULL, &overlapped)) {
// We get notified by the QWinOverlappedIoNotifier - even in the synchronous case.
return;
} else {
overlapped.clear();
if (!ReadFileEx(handle, ptr, bytesToRead, &overlapped, &readFileCompleted)) {
readSequenceStarted = false;
const DWORD dwError = GetLastError();
switch (dwError) {
case ERROR_IO_PENDING:
// This is not an error. We're getting notified, when data arrives.
return;
case ERROR_MORE_DATA:
// This is not an error. The synchronous read succeeded.
// We're connected to a message mode pipe and the message
// didn't fit into the pipe's system buffer.
// We're getting notified by the QWinOverlappedIoNotifier.
break;
case ERROR_BROKEN_PIPE:
case ERROR_PIPE_NOT_CONNECTED:
{
// It may happen, that the other side closes the connection directly
// after writing data. Then we must set the appropriate socket state.
readSequenceStarted = false;
pipeBroken = true;
emit pipeClosed();
return;
}
// It may happen, that the other side closes the connection directly
// after writing data. Then we must set the appropriate socket state.
pipeBroken = true;
emit pipeClosed();
break;
default:
readSequenceStarted = false;
emit winError(dwError, QLatin1String("QWindowsPipeReader::startAsyncRead"));
return;
break;
}
}
}
/*!
\internal
Called when ReadFileEx finished the read operation.
*/
void QWindowsPipeReader::readFileCompleted(DWORD errorCode, DWORD numberOfBytesTransfered,
OVERLAPPED *overlappedBase)
{
Overlapped *overlapped = static_cast<Overlapped *>(overlappedBase);
overlapped->pipeReader->notified(errorCode, numberOfBytesTransfered);
}
/*!
\internal
Returns the number of available bytes in the pipe.
@ -298,17 +297,60 @@ DWORD QWindowsPipeReader::checkPipeState()
return 0;
}
bool QWindowsPipeReader::waitForNotification(int timeout)
{
QElapsedTimer t;
t.start();
notifiedCalled = false;
int msecs = timeout;
while (SleepEx(msecs == -1 ? INFINITE : msecs, TRUE) == WAIT_IO_COMPLETION) {
if (notifiedCalled)
return true;
// Some other I/O completion routine was called. Wait some more.
msecs = qt_subtract_from_timeout(timeout, t.elapsed());
if (!msecs)
break;
}
return notifiedCalled;
}
void QWindowsPipeReader::emitPendingReadyRead()
{
if (readyReadPending) {
readyReadPending = false;
inReadyRead = true;
emit readyRead();
inReadyRead = false;
}
}
/*!
Waits for the completion of the asynchronous read operation.
Returns \c true, if we've emitted the readyRead signal.
Returns \c true, if we've emitted the readyRead signal (non-recursive case)
or readyRead will be emitted by the event loop (recursive case).
*/
bool QWindowsPipeReader::waitForReadyRead(int msecs)
{
if (!readSequenceStarted)
return false;
readyReadEmitted = false;
dataReadNotifier->waitForNotified(msecs, &overlapped);
return readyReadEmitted;
if (readyReadPending) {
if (!inReadyRead)
emitPendingReadyRead();
return true;
}
if (!waitForNotification(msecs))
return false;
if (readyReadPending) {
if (!inReadyRead)
emitPendingReadyRead();
return true;
}
return false;
}
/*!

View File

@ -51,7 +51,6 @@
// We mean it.
//
#include <qbytearray.h>
#include <qobject.h>
#include <private/qringbuffer_p.h>
@ -59,9 +58,6 @@
QT_BEGIN_NAMESPACE
class QWinOverlappedIoNotifier;
class Q_CORE_EXPORT QWindowsPipeReader : public QObject
{
Q_OBJECT
@ -70,6 +66,7 @@ public:
~QWindowsPipeReader();
void setHandle(HANDLE hPipeReadEnd);
void startAsyncRead();
void stop();
void setMaxReadBufferSize(qint64 size) { readBufferMaxSize = size; }
@ -82,31 +79,42 @@ public:
bool waitForReadyRead(int msecs);
bool waitForPipeClosed(int msecs);
void startAsyncRead();
bool isReadOperationActive() const { return readSequenceStarted; }
Q_SIGNALS:
void winError(ulong, const QString &);
void readyRead();
void pipeClosed();
private Q_SLOTS:
void notified(quint32 numberOfBytesRead, quint32 errorCode, OVERLAPPED *notifiedOverlapped);
void _q_queueReadyRead(QPrivateSignal);
private:
static void CALLBACK readFileCompleted(DWORD errorCode, DWORD numberOfBytesTransfered,
OVERLAPPED *overlappedBase);
void notified(DWORD errorCode, DWORD numberOfBytesRead);
DWORD checkPipeState();
bool waitForNotification(int timeout);
void emitPendingReadyRead();
class Overlapped : public OVERLAPPED
{
Q_DISABLE_COPY(Overlapped)
public:
explicit Overlapped(QWindowsPipeReader *reader);
void clear();
QWindowsPipeReader *pipeReader;
};
private:
HANDLE handle;
OVERLAPPED overlapped;
QWinOverlappedIoNotifier *dataReadNotifier;
Overlapped overlapped;
qint64 readBufferMaxSize;
QRingBuffer readBuffer;
qint64 actualReadBufferSize;
bool stopped;
bool readSequenceStarted;
bool notifiedCalled;
bool pipeBroken;
bool readyReadEmitted;
bool readyReadPending;
bool inReadyRead;
};
QT_END_NAMESPACE

View File

@ -38,144 +38,177 @@
****************************************************************************/
#include "qwindowspipewriter_p.h"
#include "qiodevice_p.h"
QT_BEGIN_NAMESPACE
#ifndef QT_NO_THREAD
extern bool qt_cancelIo(HANDLE handle, OVERLAPPED *overlapped); // from qwindowspipereader.cpp
QWindowsPipeWriter::QWindowsPipeWriter(HANDLE pipe, QObject * parent)
: QThread(parent),
writePipe(INVALID_HANDLE_VALUE),
quitNow(false),
hasWritten(false)
QWindowsPipeWriter::Overlapped::Overlapped(QWindowsPipeWriter *pipeWriter)
: pipeWriter(pipeWriter)
{
DuplicateHandle(GetCurrentProcess(), pipe, GetCurrentProcess(),
&writePipe, 0, FALSE, DUPLICATE_SAME_ACCESS);
}
void QWindowsPipeWriter::Overlapped::clear()
{
ZeroMemory(this, sizeof(OVERLAPPED));
}
QWindowsPipeWriter::QWindowsPipeWriter(HANDLE pipeWriteEnd, QObject *parent)
: QObject(parent),
handle(pipeWriteEnd),
overlapped(this),
numberOfBytesToWrite(0),
pendingBytesWrittenValue(0),
stopped(true),
writeSequenceStarted(false),
notifiedCalled(false),
bytesWrittenPending(false),
inBytesWritten(false)
{
connect(this, &QWindowsPipeWriter::_q_queueBytesWritten,
this, &QWindowsPipeWriter::emitPendingBytesWrittenValue, Qt::QueuedConnection);
}
QWindowsPipeWriter::~QWindowsPipeWriter()
{
lock.lock();
quitNow = true;
waitCondition.wakeOne();
lock.unlock();
if (!wait(30000))
terminate();
CloseHandle(writePipe);
stop();
}
bool QWindowsPipeWriter::waitForWrite(int msecs)
{
QMutexLocker locker(&lock);
bool hadWritten = hasWritten;
hasWritten = false;
if (hadWritten)
return true;
if (!waitCondition.wait(&lock, msecs))
if (!writeSequenceStarted)
return false;
hadWritten = hasWritten;
hasWritten = false;
return hadWritten;
if (bytesWrittenPending) {
if (!inBytesWritten)
emitPendingBytesWrittenValue();
return true;
}
if (!waitForNotification(msecs))
return false;
if (bytesWrittenPending) {
if (!inBytesWritten)
emitPendingBytesWrittenValue();
return true;
}
return false;
}
qint64 QWindowsPipeWriter::write(const char *ptr, qint64 maxlen)
qint64 QWindowsPipeWriter::bytesToWrite() const
{
if (!isRunning())
return -1;
QMutexLocker locker(&lock);
data.append(ptr, maxlen);
waitCondition.wakeOne();
return maxlen;
return numberOfBytesToWrite;
}
class QPipeWriterOverlapped
void QWindowsPipeWriter::emitPendingBytesWrittenValue()
{
public:
QPipeWriterOverlapped()
{
overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
}
if (bytesWrittenPending) {
bytesWrittenPending = false;
const qint64 bytes = pendingBytesWrittenValue;
pendingBytesWrittenValue = 0;
~QPipeWriterOverlapped()
{
CloseHandle(overlapped.hEvent);
}
void prepare()
{
const HANDLE hEvent = overlapped.hEvent;
ZeroMemory(&overlapped, sizeof overlapped);
overlapped.hEvent = hEvent;
}
OVERLAPPED *operator&()
{
return &overlapped;
}
private:
OVERLAPPED overlapped;
};
void QWindowsPipeWriter::run()
{
QPipeWriterOverlapped overl;
forever {
lock.lock();
while(data.isEmpty() && (!quitNow)) {
waitCondition.wakeOne();
waitCondition.wait(&lock);
}
if (quitNow) {
lock.unlock();
quitNow = false;
break;
}
QByteArray copy = data;
lock.unlock();
const char *ptrData = copy.data();
qint64 maxlen = copy.size();
qint64 totalWritten = 0;
overl.prepare();
while ((!quitNow) && totalWritten < maxlen) {
DWORD written = 0;
if (!WriteFile(writePipe, ptrData + totalWritten,
maxlen - totalWritten, &written, &overl)) {
const DWORD writeError = GetLastError();
if (writeError == 0xE8/*NT_STATUS_INVALID_USER_BUFFER*/) {
// give the os a rest
msleep(100);
continue;
}
if (writeError != ERROR_IO_PENDING) {
qErrnoWarning(writeError, "QWindowsPipeWriter: async WriteFile failed.");
return;
}
if (!GetOverlappedResult(writePipe, &overl, &written, TRUE)) {
qErrnoWarning(GetLastError(), "QWindowsPipeWriter: GetOverlappedResult failed.");
return;
}
}
totalWritten += written;
#if defined QPIPEWRITER_DEBUG
qDebug("QWindowsPipeWriter::run() wrote %d %d/%d bytes",
written, int(totalWritten), int(maxlen));
#endif
lock.lock();
data.remove(0, written);
hasWritten = true;
lock.unlock();
}
emit bytesWritten(totalWritten);
inBytesWritten = true;
emit bytesWritten(bytes);
inBytesWritten = false;
emit canWrite();
}
}
#endif //QT_NO_THREAD
void QWindowsPipeWriter::writeFileCompleted(DWORD errorCode, DWORD numberOfBytesTransfered,
OVERLAPPED *overlappedBase)
{
Overlapped *overlapped = static_cast<Overlapped *>(overlappedBase);
overlapped->pipeWriter->notified(errorCode, numberOfBytesTransfered);
}
/*!
\internal
Will be called whenever the write operation completes.
*/
void QWindowsPipeWriter::notified(DWORD errorCode, DWORD numberOfBytesWritten)
{
notifiedCalled = true;
writeSequenceStarted = false;
numberOfBytesToWrite = 0;
switch (errorCode) {
case ERROR_SUCCESS:
break;
case ERROR_OPERATION_ABORTED:
if (stopped)
break;
// fall through
default:
qErrnoWarning(errorCode, "QWindowsPipeWriter: asynchronous write failed.");
break;
}
// After the writer was stopped, the only reason why this function can be called is the
// completion of a cancellation. No signals should be emitted, and no new write sequence should
// be started in this case.
if (stopped)
return;
pendingBytesWrittenValue += qint64(numberOfBytesWritten);
if (!bytesWrittenPending) {
bytesWrittenPending = true;
emit _q_queueBytesWritten(QWindowsPipeWriter::QPrivateSignal());
}
}
bool QWindowsPipeWriter::waitForNotification(int timeout)
{
QElapsedTimer t;
t.start();
notifiedCalled = false;
int msecs = timeout;
while (SleepEx(msecs == -1 ? INFINITE : msecs, TRUE) == WAIT_IO_COMPLETION) {
if (notifiedCalled)
return true;
// Some other I/O completion routine was called. Wait some more.
msecs = qt_subtract_from_timeout(timeout, t.elapsed());
if (!msecs)
break;
}
return notifiedCalled;
}
qint64 QWindowsPipeWriter::write(const char *ptr, qint64 maxlen)
{
if (writeSequenceStarted)
return 0;
overlapped.clear();
numberOfBytesToWrite = maxlen;
stopped = false;
writeSequenceStarted = true;
if (!WriteFileEx(handle, ptr, maxlen, &overlapped, &writeFileCompleted)) {
writeSequenceStarted = false;
qErrnoWarning("QWindowsPipeWriter::write failed.");
}
return maxlen;
}
void QWindowsPipeWriter::stop()
{
stopped = true;
if (writeSequenceStarted) {
if (!qt_cancelIo(handle, &overlapped)) {
const DWORD dwError = GetLastError();
if (dwError != ERROR_NOT_FOUND) {
qErrnoWarning(dwError, "QWindowsPipeWriter: qt_cancelIo on handle %x failed.",
handle);
}
}
waitForNotification(-1);
}
}
QT_END_NAMESPACE

View File

@ -52,16 +52,11 @@
//
#include <qelapsedtimer.h>
#include <qthread.h>
#include <qmutex.h>
#include <qwaitcondition.h>
#include <qobject.h>
#include <qt_windows.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_THREAD
#define SLEEPMIN 10
#define SLEEPMAX 500
@ -110,45 +105,50 @@ private:
int nextSleep;
};
class Q_CORE_EXPORT QWindowsPipeWriter : public QThread
class Q_CORE_EXPORT QWindowsPipeWriter : public QObject
{
Q_OBJECT
public:
explicit QWindowsPipeWriter(HANDLE pipeWriteEnd, QObject *parent = 0);
~QWindowsPipeWriter();
qint64 write(const char *data, qint64 maxlen);
void stop();
bool waitForWrite(int msecs);
qint64 bytesToWrite() const;
Q_SIGNALS:
void canWrite();
void bytesWritten(qint64 bytes);
public:
explicit QWindowsPipeWriter(HANDLE writePipe, QObject * parent = 0);
~QWindowsPipeWriter();
bool waitForWrite(int msecs);
qint64 write(const char *data, qint64 maxlen);
qint64 bytesToWrite() const
{
QMutexLocker locker(&lock);
return data.size();
}
bool hadWritten() const
{
return hasWritten;
}
protected:
void run();
void _q_queueBytesWritten(QPrivateSignal);
private:
QByteArray data;
QWaitCondition waitCondition;
mutable QMutex lock;
HANDLE writePipe;
volatile bool quitNow;
bool hasWritten;
};
static void CALLBACK writeFileCompleted(DWORD errorCode, DWORD numberOfBytesTransfered,
OVERLAPPED *overlappedBase);
void notified(DWORD errorCode, DWORD numberOfBytesWritten);
bool waitForNotification(int timeout);
void emitPendingBytesWrittenValue();
#endif //QT_NO_THREAD
class Overlapped : public OVERLAPPED
{
Q_DISABLE_COPY(Overlapped)
public:
explicit Overlapped(QWindowsPipeWriter *pipeWriter);
void clear();
QWindowsPipeWriter *pipeWriter;
};
HANDLE handle;
Overlapped overlapped;
qint64 numberOfBytesToWrite;
qint64 pendingBytesWrittenValue;
bool stopped;
bool writeSequenceStarted;
bool notifiedCalled;
bool bytesWrittenPending;
bool inBytesWritten;
};
QT_END_NAMESPACE

View File

@ -327,6 +327,15 @@ static void indexesFromRange(const QItemSelectionRange &range, ModelIndexContain
}
}
template<typename ModelIndexContainer>
static ModelIndexContainer qSelectionIndexes(const QItemSelection &selection)
{
ModelIndexContainer result;
for (const auto &range : selection)
indexesFromRange(range, result);
return result;
}
/*!
Returns \c true if the selection range contains no selectable item
\since 4.7
@ -469,20 +478,7 @@ bool QItemSelection::contains(const QModelIndex &index) const
QModelIndexList QItemSelection::indexes() const
{
QModelIndexList result;
QList<QItemSelectionRange>::const_iterator it = begin();
for (; it != end(); ++it)
indexesFromRange(*it, result);
return result;
}
static QVector<QPersistentModelIndex> qSelectionPersistentindexes(const QItemSelection &sel)
{
QVector<QPersistentModelIndex> result;
QList<QItemSelectionRange>::const_iterator it = sel.constBegin();
for (; it != sel.constEnd(); ++it)
indexesFromRange(*it, result);
return result;
return qSelectionIndexes<QModelIndexList>(*this);
}
static QVector<QPair<QPersistentModelIndex, uint> > qSelectionPersistentRowLengths(const QItemSelection &sel)
@ -892,8 +888,8 @@ void QItemSelectionModelPrivate::_q_layoutAboutToBeChanged(const QList<QPersiste
savedPersistentRowLengths = qSelectionPersistentRowLengths(ranges);
savedPersistentCurrentRowLengths = qSelectionPersistentRowLengths(currentSelection);
} else {
savedPersistentIndexes = qSelectionPersistentindexes(ranges);
savedPersistentCurrentIndexes = qSelectionPersistentindexes(currentSelection);
savedPersistentIndexes = qSelectionIndexes<QVector<QPersistentModelIndex>>(ranges);
savedPersistentCurrentIndexes = qSelectionIndexes<QVector<QPersistentModelIndex>>(currentSelection);
}
}
/*!

View File

@ -376,7 +376,7 @@ QModelIndex QSortFilterProxyModelPrivate::proxy_to_source(const QModelIndex &pro
if (!proxy_index.isValid())
return QModelIndex(); // for now; we may want to be able to set a root index later
if (proxy_index.model() != q_func()) {
qWarning() << "QSortFilterProxyModel: index from wrong model passed to mapToSource";
qWarning("QSortFilterProxyModel: index from wrong model passed to mapToSource");
Q_ASSERT(!"QSortFilterProxyModel: index from wrong model passed to mapToSource");
return QModelIndex();
}
@ -394,7 +394,7 @@ QModelIndex QSortFilterProxyModelPrivate::source_to_proxy(const QModelIndex &sou
if (!source_index.isValid())
return QModelIndex(); // for now; we may want to be able to set a root index later
if (source_index.model() != model) {
qWarning() << "QSortFilterProxyModel: index from wrong model passed to mapFromSource";
qWarning("QSortFilterProxyModel: index from wrong model passed to mapFromSource");
Q_ASSERT(!"QSortFilterProxyModel: index from wrong model passed to mapFromSource");
return QModelIndex();
}

View File

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

View File

@ -184,7 +184,7 @@ QJsonDocument &QJsonDocument::operator =(const QJsonDocument &other)
QJsonDocument QJsonDocument::fromRawData(const char *data, int size, DataValidation validation)
{
if (quintptr(data) & 3) {
qWarning() <<"QJsonDocument::fromRawData: data has to have 4 byte alignment";
qWarning("QJsonDocument::fromRawData: data has to have 4 byte alignment");
return QJsonDocument();
}

View File

@ -300,7 +300,7 @@ QJsonDocument Parser::parse(QJsonParseError *error)
{
#ifdef PARSER_DEBUG
indent = 0;
qDebug() << ">>>>> parser begin";
qDebug(">>>>> parser begin");
#endif
// allocate some space
dataLength = qMax(end - json, (ptrdiff_t) 256);
@ -346,7 +346,7 @@ QJsonDocument Parser::parse(QJsonParseError *error)
error:
#ifdef PARSER_DEBUG
qDebug() << ">>>>> parser error";
qDebug(">>>>> parser error");
#endif
if (error) {
error->offset = json - head;
@ -738,7 +738,7 @@ bool Parser::parseNumber(QJsonPrivate::Value *val, int baseOffset)
}
int pos = reserveSpace(sizeof(double));
*(quint64 *)(data + pos) = qToLittleEndian(ui);
qToLittleEndian(ui, reinterpret_cast<uchar *>(data + pos));
if (current - baseOffset >= Value::MaxSize) {
lastError = QJsonParseError::DocumentTooLarge;
return false;

View File

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

View File

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

View File

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

View File

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

View File

@ -216,8 +216,10 @@ bool QEventDispatcherWinRT::processEvents(QEventLoop::ProcessEventsFlags flags)
const QVector<HANDLE> timerHandles = d->timerIdToHandle.values().toVector();
if (waitTime)
emit aboutToBlock();
bool timerEventsSent = false;
DWORD waitResult = WaitForMultipleObjectsEx(timerHandles.count(), timerHandles.constData(), FALSE, waitTime, TRUE);
if (waitResult >= WAIT_OBJECT_0 && waitResult < WAIT_OBJECT_0 + timerHandles.count()) {
while (waitResult >= WAIT_OBJECT_0 && waitResult < WAIT_OBJECT_0 + timerHandles.count()) {
timerEventsSent = true;
const HANDLE handle = timerHandles.value(waitResult - WAIT_OBJECT_0);
ResetEvent(handle);
const int timerId = d->timerHandleToId.value(handle);
@ -232,12 +234,10 @@ bool QEventDispatcherWinRT::processEvents(QEventLoop::ProcessEventsFlags flags)
// Update timer's targetTime
const quint64 targetTime = qt_msectime() + info.interval;
info.targetTime = targetTime;
emit awake();
return true;
waitResult = WaitForMultipleObjectsEx(timerHandles.count(), timerHandles.constData(), FALSE, 0, TRUE);
}
emit awake();
if (userEventsSent)
if (timerEventsSent || userEventsSent)
return true;
// We cannot wait infinitely like on other platforms, as

View File

@ -325,6 +325,24 @@ const char *QMetaObject::className() const
\sa className()
*/
/*
Returns \c true if the class described by this QMetaObject inherits
the type described by \a metaObject; otherwise returns false.
A type is considered to inherit itself.
\since 5.7
*/
bool QMetaObject::inherits(const QMetaObject *metaObject) const Q_DECL_NOEXCEPT
{
const QMetaObject *m = this;
do {
if (metaObject == m)
return true;
} while ((m = m->d.superdata));
return false;
}
/*!
\internal
@ -345,14 +363,7 @@ QObject *QMetaObject::cast(QObject *obj) const
*/
const QObject *QMetaObject::cast(const QObject *obj) const
{
if (obj) {
const QMetaObject *m = obj->metaObject();
do {
if (m == this)
return obj;
} while ((m = m->d.superdata));
}
return 0;
return (obj && obj->metaObject()->inherits(this)) ? obj : nullptr;
}
#ifndef QT_NO_TRANSLATION

View File

@ -119,8 +119,8 @@ public:
Q_INVOKABLE explicit QObject(QObject *parent=Q_NULLPTR);
virtual ~QObject();
virtual bool event(QEvent *);
virtual bool eventFilter(QObject *, QEvent *);
virtual bool event(QEvent *event);
virtual bool eventFilter(QObject *watched, QEvent *event);
#ifdef Q_QDOC
static QString tr(const char *sourceText, const char *comment = Q_NULLPTR, int n = -1);
@ -195,9 +195,9 @@ public:
inline const QObjectList &children() const { return d_ptr->children; }
void setParent(QObject *);
void installEventFilter(QObject *);
void removeEventFilter(QObject *);
void setParent(QObject *parent);
void installEventFilter(QObject *filterObj);
void removeEventFilter(QObject *obj);
static QMetaObject::Connection connect(const QObject *sender, const char *signal,
const QObject *receiver, const char *member, Qt::ConnectionType = Qt::AutoConnection);
@ -428,9 +428,9 @@ protected:
int receivers(const char* signal) const;
bool isSignalConnected(const QMetaMethod &signal) const;
virtual void timerEvent(QTimerEvent *);
virtual void childEvent(QChildEvent *);
virtual void customEvent(QEvent *);
virtual void timerEvent(QTimerEvent *event);
virtual void childEvent(QChildEvent *event);
virtual void customEvent(QEvent *event);
virtual void connectNotify(const QMetaMethod &signal);
virtual void disconnectNotify(const QMetaMethod &signal);

View File

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

View File

@ -72,7 +72,7 @@ public:
{
int fd = qt_safe_open("/pps/.all", O_RDONLY);
if (fd == -1) {
qWarning() << "qppsobject.cpp: qt_safe_open failed";
qWarning("qppsobject.cpp: qt_safe_open failed");
value = -1;
}
@ -114,7 +114,7 @@ QPpsAttributeMap QPpsObjectPrivate::decode(const QByteArray &rawData, bool *ok)
// no need to check ok in this case
attributeMap = decodeObject(&decoder, ok);
} else {
qWarning() << "QPpsObjectPrivate::decode: pps_decoder_initialize failed";
qWarning("QPpsObjectPrivate::decode: pps_decoder_initialize failed");
*ok = false;
}
@ -162,7 +162,7 @@ QPpsAttribute QPpsObjectPrivate::decodeString(pps_decoder_t *decoder)
pps_decoder_error_t error = pps_decoder_get_string(decoder, 0, &value);
if (error != PPS_DECODER_OK) {
qWarning() << "QPpsObjectPrivate::decodeString: PPS_DECODER_GET_STRING failed";
qWarning("QPpsObjectPrivate::decodeString: PPS_DECODER_GET_STRING failed");
return QPpsAttribute();
}
@ -189,19 +189,19 @@ QPpsAttribute QPpsObjectPrivate::decodeNumber(pps_decoder_t *decoder)
case PPS_DECODER_CONVERSION_FAILED:
error = pps_decoder_get_int64(decoder, 0, &llValue);
if (error != PPS_DECODER_OK) {
qWarning() << "QPpsObjectPrivate::decodeNumber: failed to decode integer";
qWarning("QPpsObjectPrivate::decodeNumber: failed to decode integer");
return QPpsAttribute();
}
flags = readFlags(decoder);
return QPpsAttributePrivate::createPpsAttribute(llValue, flags);
default:
qWarning() << "QPpsObjectPrivate::decodeNumber: pps_decoder_get_int failed";
qWarning("QPpsObjectPrivate::decodeNumber: pps_decoder_get_int failed");
return QPpsAttribute();
}
} else {
pps_decoder_error_t error = pps_decoder_get_double(decoder, 0, &dValue);
if (error != PPS_DECODER_OK) {
qWarning() << "QPpsObjectPrivate::decodeNumber: pps_decoder_get_double failed";
qWarning("QPpsObjectPrivate::decodeNumber: pps_decoder_get_double failed");
return QPpsAttribute();
}
flags = readFlags(decoder);
@ -215,7 +215,7 @@ QPpsAttribute QPpsObjectPrivate::decodeBool(pps_decoder_t *decoder)
pps_decoder_error_t error = pps_decoder_get_bool(decoder, 0, &value);
if (error != PPS_DECODER_OK) {
qWarning() << "QPpsObjectPrivate::decodeBool: pps_decoder_get_bool failed";
qWarning("QPpsObjectPrivate::decodeBool: pps_decoder_get_bool failed");
return QPpsAttribute();
}
@ -278,7 +278,7 @@ QPpsAttribute QPpsObjectPrivate::decodeData(pps_decoder_t *decoder)
case PPS_TYPE_NONE:
case PPS_TYPE_UNKNOWN:
default:
qWarning() << "QPpsObjectPrivate::decodeData: invalid pps_node_type";
qWarning("QPpsObjectPrivate::decodeData: invalid pps_node_type");
return QPpsAttribute();
}
}
@ -292,7 +292,7 @@ QPpsAttributeList QPpsObjectPrivate::decodeArray(pps_decoder_t *decoder, bool *o
// Force movement to a specific index.
pps_decoder_error_t error = pps_decoder_goto_index(decoder, i);
if (error != PPS_DECODER_OK) {
qWarning() << "QPpsObjectPrivate::decodeArray: pps_decoder_goto_index failed";
qWarning("QPpsObjectPrivate::decodeArray: pps_decoder_goto_index failed");
*ok = false;
return QPpsAttributeList();
}
@ -319,7 +319,7 @@ QPpsAttributeMap QPpsObjectPrivate::decodeObject(pps_decoder_t *decoder, bool *o
// Force movement to a specific index.
pps_decoder_error_t error = pps_decoder_goto_index(decoder, i);
if (error != PPS_DECODER_OK) {
qWarning() << "QPpsObjectPrivate::decodeObject: pps_decoder_goto_index failed";
qWarning("QPpsObjectPrivate::decodeObject: pps_decoder_goto_index failed");
*ok = false;
return QPpsAttributeMap();
}
@ -368,7 +368,7 @@ QVariant QPpsObjectPrivate::variantFromPpsAttribute(const QPpsAttribute &attribu
return variantMapFromPpsAttributeMap(attribute.toMap());
case QPpsAttribute::None:
default:
qWarning() << "QPpsObjectPrivate::variantFromPpsAttribute: invalid attribute parameter";
qWarning("QPpsObjectPrivate::variantFromPpsAttribute: invalid attribute parameter");
return QVariant();
}
}
@ -385,7 +385,7 @@ QByteArray QPpsObjectPrivate::encode(const QVariantMap &ppsData, bool *ok)
// The memory will be freed when pps_encoder_cleanup is called.
rawData = pps_encoder_buffer(&encoder);
if (!rawData) {
qWarning() << "QPpsObjectPrivate::encode: pps_encoder_buffer failed";
qWarning("QPpsObjectPrivate::encode: pps_encoder_buffer failed");
*ok = false;
}
}
@ -448,7 +448,7 @@ void QPpsObjectPrivate::encodeData(pps_encoder_t *encoder, const char *name, con
errorFunction = QStringLiteral("pps_encoder_add_null");
break;
default:
qWarning() << "QPpsObjectPrivate::encodeData: the type of the parameter data is invalid";
qWarning("QPpsObjectPrivate::encodeData: the type of the parameter data is invalid");
*ok = false;
return;
}
@ -685,7 +685,7 @@ QByteArray QPpsObject::read(bool *ok)
const int maxSize = ppsMaxSize->value;
if (maxSize == -1) {
qWarning() << "QPpsObject::read: maxSize is equal to -1";
qWarning("QPpsObject::read: maxSize is equal to -1");
safeAssign(ok, false);
return QByteArray();
}

View File

@ -105,7 +105,7 @@ inline bool QPpsObjectPrivate::decoderPush(pps_decoder_t *decoder, const char *n
{
pps_decoder_error_t error = pps_decoder_push(decoder, name);
if (error != PPS_DECODER_OK) {
qWarning() << "QPpsObjectPrivate::decodeData: pps_decoder_push failed";
qWarning("QPpsObjectPrivate::decodeData: pps_decoder_push failed");
return false;
}
return true;
@ -115,7 +115,7 @@ inline bool QPpsObjectPrivate::decoderPop(pps_decoder_t *decoder)
{
pps_decoder_error_t error = pps_decoder_pop(decoder);
if (error != PPS_DECODER_OK) {
qWarning() << "QPpsObjectPrivate::decodeData: pps_decoder_pop failed";
qWarning("QPpsObjectPrivate::decodeData: pps_decoder_pop failed");
return false;
}
return true;

View File

@ -119,7 +119,7 @@ void QSystemSemaphorePrivate::cleanHandle()
if (::sem_close(semaphore) == -1) {
setErrorString(QLatin1String("QSystemSemaphore::cleanHandle (sem_close)"));
#if defined QSYSTEMSEMAPHORE_DEBUG
qDebug() << QLatin1String("QSystemSemaphore::cleanHandle sem_close failed.");
qDebug("QSystemSemaphore::cleanHandle sem_close failed.");
#endif
}
semaphore = SEM_FAILED;
@ -129,7 +129,7 @@ void QSystemSemaphorePrivate::cleanHandle()
if (::sem_unlink(QFile::encodeName(fileName).constData()) == -1 && errno != ENOENT) {
setErrorString(QLatin1String("QSystemSemaphore::cleanHandle (sem_unlink)"));
#if defined QSYSTEMSEMAPHORE_DEBUG
qDebug() << QLatin1String("QSystemSemaphore::cleanHandle sem_unlink failed.");
qDebug("QSystemSemaphore::cleanHandle sem_unlink failed.");
#endif
}
createdSemaphore = false;

View File

@ -153,7 +153,7 @@ void QSystemSemaphorePrivate::cleanHandle()
if (-1 == semctl(semaphore, 0, IPC_RMID, 0)) {
setErrorString(QLatin1String("QSystemSemaphore::cleanHandle"));
#if defined QSYSTEMSEMAPHORE_DEBUG
qDebug() << QLatin1String("QSystemSemaphore::cleanHandle semctl failed.");
qDebug("QSystemSemaphore::cleanHandle semctl failed.");
#endif
}
semaphore = -1;

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