diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/Qt5CoreConfigExtras.cmake.in | 2 | ||||
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 2 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 4 | ||||
-rw-r--r-- | src/corelib/global/qlogging.cpp | 15 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemengine_unix.cpp | 6 | ||||
-rw-r--r-- | src/corelib/io/qprocess.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qprocess_win.cpp | 1 | ||||
-rw-r--r-- | src/corelib/io/qtextstream.cpp | 5 | ||||
-rw-r--r-- | src/corelib/io/qwindowspipewriter_p.h | 6 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreevent.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 5 | ||||
-rw-r--r-- | src/corelib/thread/qthread.cpp | 4 | ||||
-rw-r--r-- | src/corelib/tools/qbytearray.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qbytearraymatcher.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qfreelist_p.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qline.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qmargins.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qpair.h | 4 | ||||
-rw-r--r-- | src/corelib/tools/qsharedpointer_impl.h | 2 | ||||
-rw-r--r-- | src/corelib/xml/qxmlstream.cpp | 4 |
20 files changed, 42 insertions, 32 deletions
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in index 9bda70ec07..4387bedc44 100644 --- a/src/corelib/Qt5CoreConfigExtras.cmake.in +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in @@ -66,14 +66,12 @@ list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes}) set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes}) set(_qt5_corelib_extra_includes) -!!IF !isEmpty(CMAKE_ADD_FPIE_FLAGS) # Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The # Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module # macro to add it. set(Qt5_POSITION_INDEPENDENT_CODE True) set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\") set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIE\") -!!ENDIF !!IF !isEmpty(QT_NAMESPACE) list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 7be4ed8bef..d144c4faad 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -533,7 +533,6 @@ # define Q_COMPILER_AUTO_FUNCTION # define Q_COMPILER_NULLPTR # define Q_COMPILER_TEMPLATE_ALIAS -# define Q_COMPILER_UNICODE_STRINGS # define Q_COMPILER_VARIADIC_TEMPLATES # endif # if __INTEL_COMPILER >= 1300 @@ -554,6 +553,7 @@ # define Q_COMPILER_RANGE_FOR # define Q_COMPILER_RAW_STRINGS # define Q_COMPILER_REF_QUALIFIERS +# define Q_COMPILER_UNICODE_STRINGS # define Q_COMPILER_UNRESTRICTED_UNIONS # endif # if __INTEL_COMPILER >= 1500 diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index cb8bd15d8d..dade7fc6ec 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -37,11 +37,11 @@ #include <stddef.h> -#define QT_VERSION_STR "5.4.1" +#define QT_VERSION_STR "5.4.2" /* QT_VERSION is (major << 16) + (minor << 8) + patch. */ -#define QT_VERSION 0x050401 +#define QT_VERSION 0x050402 /* can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) */ diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 86ba082398..18b672d7ee 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -77,14 +77,21 @@ #endif #if !defined QT_NO_REGULAREXPRESSION && !defined(QT_BOOTSTRAPPED) -# if (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include(<cxxabi.h>) && __has_include(<execinfo.h>)) +# ifdef __UCLIBC__ +# if __UCLIBC_HAS_BACKTRACE__ +# define QLOGGING_HAVE_BACKTRACE +# endif +# elif (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include(<cxxabi.h>) && __has_include(<execinfo.h>)) # define QLOGGING_HAVE_BACKTRACE -# include <qregularexpression.h> -# include <cxxabi.h> -# include <execinfo.h> # endif #endif +#ifdef QLOGGING_HAVE_BACKTRACE +# include <qregularexpression.h> +# include <cxxabi.h> +# include <execinfo.h> +#endif + #include <stdio.h> QT_BEGIN_NAMESPACE diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index cd42aff35c..bfa4483ca7 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -83,13 +83,13 @@ static bool isPackage(const QFileSystemMetaData &data, const QFileSystemEntry &e if (suffix.length() > 0) { // First step: is the extension known ? - CFStringRef extensionRef = QCFString::toCFStringRef(suffix); - CFStringRef uniformTypeIdentifier = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extensionRef, NULL); + QCFType<CFStringRef> extensionRef = QCFString::toCFStringRef(suffix); + QCFType<CFStringRef> uniformTypeIdentifier = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extensionRef, NULL); if (UTTypeConformsTo(uniformTypeIdentifier, kUTTypeBundle)) return true; // Second step: check if an application knows the package type - CFStringRef path = QCFString::toCFStringRef(entry.filePath()); + QCFType<CFStringRef> path = QCFString::toCFStringRef(entry.filePath()); QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, path, kCFURLPOSIXPathStyle, true); UInt32 type, creator; diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index a234050777..939cecfb44 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1044,9 +1044,9 @@ bool QProcessPrivate::_q_processDied() return false; #endif #ifdef Q_OS_WIN - drainOutputPipes(); if (processFinishedNotifier) processFinishedNotifier->setEnabled(false); + drainOutputPipes(); #endif // the process may have died before it got a chance to report that it was diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index ee6b7e13f4..9e60daa5b4 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -785,6 +785,7 @@ bool QProcessPrivate::waitForFinished(int msecs) void QProcessPrivate::findExitCode() { DWORD theExitCode; + Q_ASSERT(pid); if (GetExitCodeProcess(pid->hProcess, &theExitCode)) { exitCode = theExitCode; crashed = (exitCode == 0xf291 // our magic number, see killProcess diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 089a915a36..571875c508 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -1550,11 +1550,10 @@ QString QTextStream::readAll() the stream contains lines longer than this, then the lines will be split after \a maxlen characters and returned in parts. - If \a maxlen is 0, the lines can be of any length. A common value - for \a maxlen is 75. + If \a maxlen is 0, the lines can be of any length. The returned line has no trailing end-of-line characters ("\\n" - or "\\r\\n"), so calling QString::trimmed() is unnecessary. + or "\\r\\n"), so calling QString::trimmed() can be unnecessary. If the stream has read to the end of the file, \l {QTextStream::readLine()}{readLine()} will return a null QString. For strings, or for devices that support it, diff --git a/src/corelib/io/qwindowspipewriter_p.h b/src/corelib/io/qwindowspipewriter_p.h index 47b7744e81..6035993500 100644 --- a/src/corelib/io/qwindowspipewriter_p.h +++ b/src/corelib/io/qwindowspipewriter_p.h @@ -45,7 +45,7 @@ // We mean it. // -#include <qdatetime.h> +#include <qelapsedtimer.h> #include <qthread.h> #include <qmutex.h> #include <qwaitcondition.h> @@ -83,7 +83,7 @@ public: { if (totalTimeOut == -1) return SLEEPMAX; - return qMax(totalTimeOut - timer.elapsed(), 0); + return qMax(int(totalTimeOut - timer.elapsed()), 0); } bool hasTimedOut() const @@ -99,7 +99,7 @@ public: } private: - QTime timer; + QElapsedTimer timer; int totalTimeOut; int nextSleep; }; diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index 191ceaa37b..85b7f51bd6 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -538,7 +538,7 @@ QTimerEvent::~QTimerEvent() \a child. \a type can be QEvent::ChildAdded, QEvent::ChildRemoved, - QEvent::ChildPolished, or QEvent::ChildRemoved. + or QEvent::ChildPolished. \sa child() */ diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index a1a04b3ce5..f2ceb7081c 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -3710,13 +3710,14 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i } else if (callFunction && c->method_offset <= receiver->metaObject()->methodOffset()) { //we compare the vtable to make sure we are not in the destructor of the object. locker.unlock(); + const int methodIndex = c->method(); if (qt_signal_spy_callback_set.slot_begin_callback != 0) - qt_signal_spy_callback_set.slot_begin_callback(receiver, c->method(), argv ? argv : empty_argv); + qt_signal_spy_callback_set.slot_begin_callback(receiver, methodIndex, argv ? argv : empty_argv); callFunction(receiver, QMetaObject::InvokeMetaMethod, method_relative, argv ? argv : empty_argv); if (qt_signal_spy_callback_set.slot_end_callback != 0) - qt_signal_spy_callback_set.slot_end_callback(receiver, c->method()); + qt_signal_spy_callback_set.slot_end_callback(receiver, methodIndex); locker.relock(); } else { const int method = method_relative + c->method_offset; diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index 3caad7c4b2..933fd06afa 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -178,7 +178,7 @@ QThreadPrivate::~QThreadPrivate() event loop by calling exec() and runs a Qt event loop inside the thread. You can use worker objects by moving them to the thread using - QObject::moveToThread. + QObject::moveToThread(). \snippet code/src_corelib_thread_qthread.cpp worker @@ -256,7 +256,7 @@ QThreadPrivate::~QThreadPrivate() \l{Mandelbrot Example}, as that is the name of the QThread subclass). Note that this is currently not available with release builds on Windows. - \sa {Thread Support in Qt}, QThreadStorage, {Synchronizing Threads} + \sa {Thread Support in Qt}, QThreadStorage, {Synchronizing Threads}, {Mandelbrot Example}, {Semaphores Example}, {Wait Conditions Example} */ diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index a3c1cc3907..bd0215902c 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -3945,7 +3945,7 @@ QByteArray QByteArray::fromRawData(const char *data, int size) copies of it exist that have not been modified. This function can be used instead of fromRawData() to re-use - existings QByteArray objects to save memory re-allocations. + existing QByteArray objects to save memory re-allocations. \sa fromRawData(), data(), constData() */ diff --git a/src/corelib/tools/qbytearraymatcher.cpp b/src/corelib/tools/qbytearraymatcher.cpp index f14d941c27..82f012be66 100644 --- a/src/corelib/tools/qbytearraymatcher.cpp +++ b/src/corelib/tools/qbytearraymatcher.cpp @@ -256,7 +256,7 @@ static int qFindByteArrayBoyerMoore( #define REHASH(a) \ if (sl_minus_1 < sizeof(uint) * CHAR_BIT) \ - hashHaystack -= (a) << sl_minus_1; \ + hashHaystack -= uint(a) << sl_minus_1; \ hashHaystack <<= 1 /*! diff --git a/src/corelib/tools/qfreelist_p.h b/src/corelib/tools/qfreelist_p.h index bfb03fb723..189140016c 100644 --- a/src/corelib/tools/qfreelist_p.h +++ b/src/corelib/tools/qfreelist_p.h @@ -171,7 +171,7 @@ class QFreeList // take the current serial number from \a o, increment it, and store it in \a n static inline int incrementserial(int o, int n) { - return (n & ConstantsType::IndexMask) | ((o + ConstantsType::SerialCounter) & ConstantsType::SerialMask); + return int((uint(n) & ConstantsType::IndexMask) | ((uint(o) + ConstantsType::SerialCounter) & ConstantsType::SerialMask)); } // the blocks diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp index 4561f831c8..9feb697aad 100644 --- a/src/corelib/tools/qline.cpp +++ b/src/corelib/tools/qline.cpp @@ -334,7 +334,7 @@ QDataStream &operator>>(QDataStream &stream, QLine &line) or a null line. The intersect() function determines the IntersectType for this - line and a given line, while the angle() function returns the + line and a given line, while the angleTo() function returns the angle between the lines. In addition, the unitVector() function returns a line that has the same starting point as this line, but with a length of only 1, while the normalVector() function returns diff --git a/src/corelib/tools/qmargins.cpp b/src/corelib/tools/qmargins.cpp index 419551aaca..265e44bfcf 100644 --- a/src/corelib/tools/qmargins.cpp +++ b/src/corelib/tools/qmargins.cpp @@ -484,7 +484,7 @@ QDebug operator<<(QDebug dbg, const QMargins &m) { /*! \fn bool QMarginsF::isNull() const - Returns \c true if all margins are is 0; otherwise returns + Returns \c true if all margins are 0; otherwise returns false. */ diff --git a/src/corelib/tools/qpair.h b/src/corelib/tools/qpair.h index b2217e4dd0..76b7abd263 100644 --- a/src/corelib/tools/qpair.h +++ b/src/corelib/tools/qpair.h @@ -56,7 +56,9 @@ struct QPair { first = p.first; second = p.second; return *this; } #ifdef Q_COMPILER_RVALUE_REFS template <typename TT1, typename TT2> - Q_DECL_CONSTEXPR QPair(QPair<TT1, TT2> &&p) : first(std::move(p.first)), second(std::move(p.second)) {} + Q_DECL_CONSTEXPR QPair(QPair<TT1, TT2> &&p) + // can't use std::move here as it's not constexpr in C++11: + : first(static_cast<TT1 &&>(p.first)), second(static_cast<TT2 &&>(p.second)) {} template <typename TT1, typename TT2> QPair &operator=(QPair<TT1, TT2> &&p) { first = std::move(p.first); second = std::move(p.second); return *this; } diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index 061c7a5a2d..a18b2c28a1 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -412,6 +412,7 @@ public: # ifdef QT_SHAREDPOINTER_TRACK_POINTERS internalSafetyCheckAdd(result.d, result.value); # endif + result.enableSharedFromThis(result.data()); return result; } #else @@ -432,6 +433,7 @@ public: internalSafetyCheckAdd(result.d, result.value); # endif result.d->setQObjectShared(result.value, true); + result.enableSharedFromThis(result.data()); return result; } diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index d1698b812f..ad10c63686 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -728,7 +728,7 @@ static const short QXmlStreamReader_tokenTypeString_indices[] = { /*! \property QXmlStreamReader::namespaceProcessing - the namespace-processing flag of the stream reader + The namespace-processing flag of the stream reader This property controls whether or not the stream reader processes namespaces. If enabled, the reader processes namespaces, otherwise @@ -3318,7 +3318,7 @@ QTextCodec *QXmlStreamWriter::codec() const /*! \property QXmlStreamWriter::autoFormatting \since 4.4 - the auto-formatting flag of the stream writer + The auto-formatting flag of the stream writer This property controls whether or not the stream writer automatically formats the generated XML data. If enabled, the |