Source

Target

Commits (55)
Showing with 298 additions and 66 deletions
......@@ -35,5 +35,6 @@
int main(int, char **)
{
mysql_get_client_version();
return 0;
}
......@@ -37,6 +37,12 @@
# error "OpenSSL >= 0.9.7 is required"
#endif
#include <openssl/ssl.h>
#if OPENSSL_VERSION_NUMBER-0 >= 0x10002000L && !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)
# error "OpenSSL was reported as >= 1.0.2 but is missing required features, possibly it's libressl which is unsupported"
#endif
int main()
{
}
......@@ -2859,10 +2859,17 @@ if [ -z "$PLATFORM" ]; then
PLATFORM=ultrix-g++
;;
FreeBSD:*)
PLATFORM=freebsd-clang
PLATFORM_NOTES="
- Also available for FreeBSD: freebsd-g++
"
if [ "$(uname -r | cut -d. -f1)" -ge 10 ]; then
PLATFORM=freebsd-clang
PLATFORM_NOTES="
- Also available for FreeBSD: freebsd-g++
"
else
PLATFORM=freebsd-g++
PLATFORM_NOTES="
- Also available for FreeBSD: freebsd-clang
"
fi
;;
OpenBSD:*)
PLATFORM=openbsd-g++
......@@ -3209,6 +3216,9 @@ if [ "$XPLATFORM_ANDROID" = "yes" ]; then
if [ "$CFG_DBUS" = "auto" ]; then
CFG_DBUS="no"
fi
if [ "$CFG_EGLFS" = "auto" ]; then
CFG_EGLFS="no"
fi
if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
case $PLATFORM in
linux-*)
......
Qt 5.6.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.6.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/
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:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- Support for DirectFB is disabled by default, due to lack of
development in upstream. To enable the platform plugin, pass the
-directfb option to configure.
- [QTBUG-44964] The new X event compression feature that was added in 5.6.0
no longer applies to motion events from drawing tablets.
configure & build system
------------------------
- The configure -D/-I/-L/-l/-R options do not affect the build of Qt's
host tools any more when cross-building. While this usually improves
the chances of a build succeeding, it may also require adjustments.
qmake
-----
- [Unix] Paths passed to configure -R are not automatically used by 3rd
party projects any more. Use QMAKE_RPATHDIR if your project explicitly
depends on external libraries. Note that this is not needed for Qt or
its transitive dependencies.
- Expansions of ${QMAKE_FILE_IN_BASE} and ${QMAKE_FILE_OUT_BASE} in extra
compilers are now automatically quoted.
****************************************************************************
* Library *
****************************************************************************
QtCore
------
- QObject:
* [QTBUG-52542] If the compiler supports variadic templates, functors
connected to signals will no longer be copied each time the signal is
emitted.
- QRect:
* Fixed integer overflow in center(). This fixes the result for some
corner-cases such as a 1x1 rectangle at (INT_MIN, INT_MIN), for which the
previous implementation could return anything (due to invoking undefined
behavior), but commonly returned (0, 0).
- QStringRef:
* Fixed relational operators against (const char*) to return the correct
result.
QtGui
-----
- [QTBUG-50199] QWheelEvent::phase() now returns zero rather than
Qt::ScrollUpdate when the wheel event comes from an actual non-emulated
mouse wheel, and the QT_ENABLE_MOUSE_WHEEL_TRACKING environment variable
is set.
- Image:
* [QTBUG-50745] Fixed possible crash in QImage::pixel() for mono or indexed
images.
QtWidgets
---------
- Dialogs:
* [QTBUG-51148] Fixed font dialog support for fonts with a non-existent
family name and/or pixel size.
- QHeaderView:
* [QTBUG-50171] Fixed a repainting issue when items had been reordered.
- QListWidget:
* [QTBUG-15741] Fixed a bug that caused the default drop action to be
ignored when using icon mode.
****************************************************************************
* Platform-specific Changes *
****************************************************************************
Android
-------
- The navigation bar is now hidden only on Android API level 19 and above.
OS X
----
- [QTBUG-50262] QStandardPaths now returns the correct display name for the
download folder.
- [QTBUG-7000] QMacPrintEngine now really sets the printer resolution.
- [QTBUG-48138] QPinchGesture on OS X now behaves like on other platforms:
totalScaleFactor is the magnitude of the pinch and scaleFactor is the delta
for the current event.
Windows
-------
- Text:
* [QTBUG-18711] Fixed disabling hints for application fonts.
For example, when automatic scaling by device pixel ratio is in effect.
* [QTBUG-47141] Made it possible to disable antialiasing for text when
drawing into images.
X11/XCB
-------
- [QTBUG-49071] Fixed failure to deliver focusIn events on hide/show.
****************************************************************************
* Tools *
****************************************************************************
configure & build system
------------------------
- [QTBUG-11545][Windows] Added missing -pch/-no-pch options to configure.exe.
- [QTBUG-37952][Apple] configure -separate-debug-info is now supported.
- [QTBUG-47313][QTBUG-47639] Fixed builds with "debug" and/or "release" in
the build path's name.
- [QTBUG-51621][Unix] Fixed transitive dependencies on non-Qt libraries.
- [QTBUG-51644][QTBUG-53017] Fixed cross-builds which use a host compiler
which is significantly different from the target compiler.
- [QTBUG-52578][QNX] Unified some defaults between the Unix and Windows
configures.
- [Unix] configure -R now supports paths relative to -libdir.
- [Android@Windows] Added missing -android-ndk-host option to configure.exe.
- [MinGW] Fixed -release -force-debug-info builds actually being neither.
- [WinCE] Fixed (Open)SSL detection.
- Fixed builds with static libc.
qmake
-----
- [QTBUG-34182] Fixed UTF-8 BOM breaking dependency calculation.
- [QTBUG-38802][WinRT] Capabilities needed by Qt are now automatically
added to the manifest.
- [QTBUG-50924][WEC7][VS] Fixed deployment of Qt.
- [QTBUG-51775][Unix@Windows] Fixed installation of target.targets when
cross-building.
- [QTBUG-51782] Fixed simultaneous use of the separate_debug_info and
no_plugin_name_prefix CONFIG flags.
- [QTBUG-52008] qmake-generated Visual Studio projects now automatically
invoke windeployqt by default.
- [QTBUG-52998] Restored use of -P option when invoking lex.
- The expansions ${QMAKE_FILE_IN_EXT}, ${QMAKE_FILE_IN_NAME}, and
${QMAKE_FILE_OUT_PATH} are now understood in extra compilers.
......@@ -44,7 +44,8 @@
#include <QObject>
#include <QColor>
class QOpenGLFunctions_1_1;
QT_FORWARD_DECLARE_CLASS(QOpenGLFunctions_1_1)
class Patch;
struct Geometry;
......
......@@ -5,3 +5,6 @@ LIBS += -framework Cocoa
QT += widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/mac/qmaccocoaviewcontainer
INSTALLS += target
......@@ -5,3 +5,7 @@ LIBS += -framework Cocoa
QT += widgets
#QT += widgets-private gui-private core-private
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/mac/qmacnativewidget
INSTALLS += target
......@@ -168,13 +168,6 @@ QMAKE_STRIP =
QMAKE_RANLIB = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-ranlib
QMAKE_INCDIR = $$ANDROID_SOURCES_CXX_STL_INCDIR $$QMAKE_ANDROID_PLATFORM_INCDIR
QMAKE_LIBDIR = $$ANDROID_SOURCES_CXX_STL_LIBDIR $$QMAKE_ANDROID_PLATFORM_LIBDIR $$LIBGCC_PATH
QMAKE_INCDIR_X11 =
QMAKE_LIBDIR_X11 =
QMAKE_INCDIR_OPENGL = $$QMAKE_ANDROID_PLATFORM_INCDIR
QMAKE_LIBDIR_OPENGL = $$QMAKE_ANDROID_PLATFORM_LIBDIR
equals(ANDROID_TARGET_ARCH, armeabi)|equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
LIBGCC_PATH_FULL = $$system("$$QMAKE_CC -mthumb-interwork -print-libgcc-file-name")
else: \
......@@ -182,20 +175,19 @@ else: \
LIBGCC_PATH = $$dirname(LIBGCC_PATH_FULL)
QMAKE_INCDIR = $$ANDROID_SOURCES_CXX_STL_INCDIR $$QMAKE_ANDROID_PLATFORM_INCDIR
QMAKE_LIBDIR = $$ANDROID_SOURCES_CXX_STL_LIBDIR $$QMAKE_ANDROID_PLATFORM_LIBDIR $$LIBGCC_PATH
QMAKE_INCDIR_X11 =
QMAKE_LIBDIR_X11 =
QMAKE_INCDIR_OPENGL = $$QMAKE_ANDROID_PLATFORM_INCDIR
QMAKE_LIBDIR_OPENGL = $$QMAKE_ANDROID_PLATFORM_LIBDIR
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
QMAKE_LFLAGS = --sysroot=$$ANDROID_PLATFORM_ROOT_PATH
QMAKE_RPATHLINK = $$QMAKE_ANDROID_PLATFORM_LIBDIR
QMAKE_LFLAGS_APP = -Wl,--no-undefined -Wl,-z,noexecstack -shared
QMAKE_LFLAGS_SHLIB = -Wl,--no-undefined -Wl,-z,noexecstack -shared
contains(NDK_ROOT, ".*r6")|contains(NDK_ROOT, ".*r5.*") {
!equals(ANDROID_PLATFORM, android-4):!equals(ANDROID_PLATFORM, android-5):!equals(ANDROID_PLATFORM, android-8) {
warning("Your NDK version is outdated. A workaround is enabled. Consider updating your NDK (workarounds are required until r6(a))")
QMAKE_LFLAGS_SHLIB += $$QMAKE_ANDROID_PLATFORM_LIBDIR/crtbegin_so.o $$QMAKE_ANDROID_PLATFORM_LIBDIR/crtend_so.o
}
}
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
QMAKE_LFLAGS_RPATH = -Wl,-rpath=
......
......@@ -1616,6 +1616,13 @@
\note Platform-specific variables that change the extension override
the contents of this variable.
\target QMAKE_EXTENSION_STATICLIB
\section1 QMAKE_EXTENSION_STATICLIB
Contains the extension for shared static libraries. The value of
this variable is typically handled by qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_EXT_MOC
Contains the extension used on included moc files.
......
......@@ -30,6 +30,9 @@
#include "forkfd.h"
#include <sys/types.h>
#if defined(__OpenBSD__) || defined(__NetBSD__)
# include <sys/param.h>
#endif
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
......@@ -65,7 +68,9 @@
# undef HAVE_WAITID
#endif
#if defined(__FreeBSD__) && defined(__FreeBSD_version) && __FreeBSD_version >= 1000032
#if (defined(__FreeBSD__) && defined(__FreeBSD_version) && __FreeBSD_version >= 1000032) || \
(defined(__OpenBSD__) && OpenBSD >= 201505) || \
(defined(__NetBSD__) && __NetBSD_Version__ >= 600000000)
# define HAVE_PIPE2 1
#endif
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) || \
......
......@@ -699,7 +699,9 @@
# define Q_COMPILER_TEMPLATE_ALIAS
# endif
# if __has_feature(cxx_thread_local)
# define Q_COMPILER_THREAD_LOCAL
# if !defined(__FreeBSD__) /* FreeBSD clang fails on __cxa_thread_atexit */
# define Q_COMPILER_THREAD_LOCAL
# endif
# endif
# if __has_feature(cxx_user_literals)
# define Q_COMPILER_UDL
......@@ -1051,7 +1053,8 @@
# define Q_DECL_NOTHROW Q_DECL_NOEXCEPT
#endif
#if defined(Q_COMPILER_ALIGNOF) && !defined(Q_ALIGNOF)
#if defined(Q_COMPILER_ALIGNOF)
# undef Q_ALIGNOF
# define Q_ALIGNOF(x) alignof(x)
#endif
......
......@@ -42,6 +42,11 @@
QT_BEGIN_NAMESPACE
#ifdef __has_builtin
# define QT_HAS_BUILTIN(x) __has_builtin(x)
#else
# define QT_HAS_BUILTIN(x) 0
#endif
/*
* ENDIAN FUNCTIONS
......@@ -64,18 +69,29 @@ template <typename T> inline void qbswap(const T src, uchar *dest)
// Used to implement a type-safe and alignment-safe copy operation
// If you want to avoid the memcpy, you must write specializations for these functions
template <typename T> inline void qToUnaligned(const T src, uchar *dest)
template <typename T> Q_ALWAYS_INLINE void qToUnaligned(const T src, uchar *dest)
{
// Using sizeof(T) inside memcpy function produces internal compiler error with
// MSVC2008/ARM in tst_endian -> use extra indirection to resolve size of T.
const size_t size = sizeof(T);
memcpy(dest, &src, size);
#if QT_HAS_BUILTIN(__builtin_memcpy)
__builtin_memcpy
#else
memcpy
#endif
(dest, &src, size);
}
template <typename T> inline T qFromUnaligned(const uchar *src)
template <typename T> Q_ALWAYS_INLINE T qFromUnaligned(const uchar *src)
{
T dest;
const size_t size = sizeof(T);
memcpy(&dest, src, size);
#if QT_HAS_BUILTIN(__builtin_memcpy)
__builtin_memcpy
#else
memcpy
#endif
(&dest, src, size);
return dest;
}
......@@ -87,12 +103,6 @@ template <typename T> inline T qFromUnaligned(const uchar *src)
*/
template <typename T> T qbswap(T source);
#ifdef __has_builtin
# define QT_HAS_BUILTIN(x) __has_builtin(x)
#else
# define QT_HAS_BUILTIN(x) 0
#endif
// GCC 4.3 implemented all the intrinsics, but the 16-bit one only got implemented in 4.8;
// Clang 2.6 implemented the 32- and 64-bit but waited until 3.2 to implement the 16-bit one
#if (defined(Q_CC_GNU) && Q_CC_GNU >= 403) || QT_HAS_BUILTIN(__builtin_bswap32)
......
......@@ -33,6 +33,29 @@
little and big endian representations of numbers.
*/
/*!
\internal
\fn T qFromUnaligned(const uchar *ptr)
\since 5.5
Loads a \c{T} from address \a ptr, which may be misaligned.
Use of this function avoids the undefined behavior that the C++ standard
otherwise attributes to unaligned loads.
*/
/*!
\internal
\fn void qToUnaligned(T t, uchar *ptr)
\since 4.5
Stores \a t to address \a ptr, which may be misaligned.
Use of this function avoids the undefined behavior that the C++ standard
otherwise attributes to unaligned stores.
*/
/*!
\fn T qFromBigEndian(const uchar *src)
\since 4.3
......
......@@ -60,6 +60,7 @@
NETBSD - NetBSD
OPENBSD - OpenBSD
BSDI - BSD/OS
INTERIX - Interix
IRIX - SGI Irix
OSF - HP Tru64 UNIX
SCO - SCO OpenServer 5
......@@ -147,6 +148,9 @@
#elif defined(__bsdi__)
# define Q_OS_BSDI
# define Q_OS_BSD4
#elif defined(__INTERIX)
# define Q_OS_INTERIX
# define Q_OS_BSD4
#elif defined(__sgi)
# define Q_OS_IRIX
#elif defined(__osf__)
......
......@@ -147,7 +147,6 @@ win32 {
SOURCES += io/qsettings_mac.cpp
OBJECTIVE_SOURCES += io/qurl_mac.mm
}
freebsd: LIBS_PRIVATE += -lutil # qlockfile_unix.cpp requires this
mac {
osx {
OBJECTIVE_SOURCES += io/qfilesystemwatcher_fsevents.mm
......
......@@ -59,14 +59,12 @@
# include <unistd.h>
# include <cstdio>
#elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS)
# if !defined(Q_OS_NETBSD)
# include <sys/user.h>
# if defined(__GLIBC__) && defined(__FreeBSD_kernel__)
# endif
# include <sys/cdefs.h>
# include <sys/param.h>
# include <sys/sysctl.h>
# else
# include <libutil.h>
# endif
#endif
QT_BEGIN_NAMESPACE
......@@ -269,30 +267,33 @@ QString QLockFilePrivate::processNameByPid(qint64 pid)
buf[len] = 0;
return QFileInfo(QFile::decodeName(buf)).fileName();
#elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS)
# if defined(__GLIBC__) && defined(__FreeBSD_kernel__)
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid };
size_t len = 0;
if (sysctl(mib, 4, NULL, &len, NULL, 0) < 0)
return QString();
kinfo_proc *proc = static_cast<kinfo_proc *>(malloc(len));
# if defined(Q_OS_NETBSD)
struct kinfo_proc2 kp;
int mib[6] = { CTL_KERN, KERN_PROC2, KERN_PROC_PID, (int)pid, sizeof(struct kinfo_proc2), 1 };
# elif defined(Q_OS_OPENBSD)
struct kinfo_proc kp;
int mib[6] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, (int)pid, sizeof(struct kinfo_proc), 1 };
# else
kinfo_proc *proc = kinfo_getproc(pid);
struct kinfo_proc kp;
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, (int)pid };
# endif
if (!proc)
size_t len = sizeof(kp);
u_int mib_len = sizeof(mib)/sizeof(u_int);
if (sysctl(mib, mib_len, &kp, &len, NULL, 0) < 0)
return QString();
# if defined(__GLIBC__) && defined(__FreeBSD_kernel__)
if (sysctl(mib, 4, proc, &len, NULL, 0) < 0) {
free(proc);
# if defined(Q_OS_OPENBSD) || defined(Q_OS_NETBSD)
if (kp.p_pid != pid)
return QString();
}
if (proc->ki_pid != pid) {
free(proc);
QString name = QFile::decodeName(kp.p_comm);
# else
if (kp.ki_pid != pid)
return QString();
}
QString name = QFile::decodeName(kp.ki_comm);
# endif
QString name = QFile::decodeName(proc->ki_comm);
free(proc);
return name;
#else
Q_UNUSED(pid);
return QString();
......
......@@ -137,9 +137,11 @@ bool QLockFilePrivate::isApparentlyStale() const
if (!procHandle)
return true;
// We got a handle but check if process is still alive
DWORD dwR = ::WaitForSingleObject(procHandle, 0);
DWORD exitCode = 0;
if (!::GetExitCodeProcess(procHandle, &exitCode))
exitCode = 0;
::CloseHandle(procHandle);
if (dwR == WAIT_TIMEOUT)
if (exitCode != STILL_ACTIVE)
return true;
const QString processName = processNameByPid(pid);
if (!processName.isEmpty() && processName != appname)
......
......@@ -2090,10 +2090,7 @@ void QProcess::start(const QString &program, const QStringList &arguments, OpenM
return;
}
if (program.isEmpty()) {
Q_D(QProcess);
d->processError = QProcess::FailedToStart;
setErrorString(tr("No program defined"));
emit error(d->processError);
d->setErrorAndEmit(QProcess::FailedToStart, tr("No program defined"));
return;
}
......@@ -2120,10 +2117,7 @@ void QProcess::start(OpenMode mode)
return;
}
if (d->program.isEmpty()) {
Q_D(QProcess);
d->processError = QProcess::FailedToStart;
setErrorString(tr("No program defined"));
emit error(d->processError);
d->setErrorAndEmit(QProcess::FailedToStart, tr("No program defined"));
return;
}
......
......@@ -202,6 +202,8 @@ bool QWindowsPipeWriter::write(const QByteArray &ba)
void QWindowsPipeWriter::stop()
{
stopped = true;
bytesWrittenPending = false;
pendingBytesWrittenValue = 0;
if (writeSequenceStarted) {
if (!qt_cancelIo(handle, &overlapped)) {
const DWORD dwError = GetLastError();
......
......@@ -402,7 +402,7 @@ public:
// pack with itself, we'll discard the high part anyway
chunk = _mm_packus_epi16(chunk, chunk);
// unaligned 64-bit store
qUnalignedStore(l + i, _mm_cvtsi128_si64(chunk));
qToUnaligned(_mm_cvtsi128_si64(chunk), l + i);
i += 8;
}
# endif
......