diff options
author | Liang Qi <liang.qi@qt.io> | 2017-02-08 15:48:29 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-02-08 15:49:18 +0100 |
commit | dd756011da13b95fdb630a1bbb90234f1e60f415 (patch) | |
tree | a6259b1e9b6463108796ce912e3d1752e301505f /src/corelib/kernel | |
parent | 0c50edbe84914469973a3b10e0170023ccdd66fe (diff) | |
parent | b6bf2a33f4c33a212da7b58a049b3b5b20b3f327 (diff) |
Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
configure.json
mkspecs/win32-icc/qmake.conf
Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcore_foundation.mm | 12 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 8 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication_win.cpp | 27 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 12 |
4 files changed, 17 insertions, 42 deletions
diff --git a/src/corelib/kernel/qcore_foundation.mm b/src/corelib/kernel/qcore_foundation.mm index 8b6be9b08e..0e69f69a85 100644 --- a/src/corelib/kernel/qcore_foundation.mm +++ b/src/corelib/kernel/qcore_foundation.mm @@ -495,7 +495,7 @@ NSTimeZone *QTimeZone::toNSTimeZone() const Creates a CGRect from a QRect. - \sa fromCGRect() + \sa QRectF::fromCGRect() */ CGRect QRect::toCGRect() const Q_DECL_NOTHROW { @@ -517,7 +517,7 @@ CGRect QRectF::toCGRect() const Q_DECL_NOTHROW /*! \since 5.8 - Creates a QRectF from a CGRect. + Creates a QRectF from CGRect \a rect. \sa toCGRect() */ @@ -533,7 +533,7 @@ QRectF QRectF::fromCGRect(CGRect rect) Q_DECL_NOTHROW Creates a CGPoint from a QPoint. - \sa fromCGPoint() + \sa QPointF::fromCGPoint() */ CGPoint QPoint::toCGPoint() const Q_DECL_NOTHROW { @@ -555,7 +555,7 @@ CGPoint QPointF::toCGPoint() const Q_DECL_NOTHROW /*! \since 5.8 - Creates a QRectF from a CGPoint. + Creates a QRectF from CGPoint \a point. \sa toCGPoint() */ @@ -571,7 +571,7 @@ QPointF QPointF::fromCGPoint(CGPoint point) Q_DECL_NOTHROW Creates a CGSize from a QSize. - \sa fromCGSize() + \sa QSizeF::fromCGSize() */ CGSize QSize::toCGSize() const Q_DECL_NOTHROW { @@ -593,7 +593,7 @@ CGSize QSizeF::toCGSize() const Q_DECL_NOTHROW /*! \since 5.8 - Creates a QRectF from a CGSize. + Creates a QRectF from \a size. \sa toCGSize() */ diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 152177a926..a936457bce 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -353,10 +353,6 @@ Q_CORE_EXPORT uint qGlobalPostedEventsCount() QAbstractEventDispatcher *QCoreApplicationPrivate::eventDispatcher = 0; -#ifdef Q_OS_UNIX -Qt::HANDLE qt_application_thread_id = 0; -#endif - #endif // QT_NO_QOBJECT QCoreApplication *QCoreApplication::self = 0; @@ -468,10 +464,6 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint qFatal("FATAL: The application binary appears to be running setuid, this is a security hole."); # endif // Q_OS_UNIX -# if defined(Q_OS_UNIX) - qt_application_thread_id = QThread::currentThreadId(); -# endif - QThread *cur = QThread::currentThread(); // note: this may end up setting theMainThread! if (cur != theMainThread) qWarning("WARNING: QApplication was not created in the main() thread."); diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 856d2a2101..50888dd0aa 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -197,33 +197,6 @@ Q_CORE_EXPORT int qWinAppCmdShow() // get main window sho } #endif -/***************************************************************************** - qWinMain() - Initializes Windows. Called from WinMain() in qtmain_win.cpp - *****************************************************************************/ - -#if !defined(Q_OS_WINRT) - -// ### Qt6: FIXME: Consider removing this function. It is here for Active Qt -// servers and for binary for compatibility to applications built with Qt 5.3 -// using qtmain.lib which calls it In Qt 5.4, qtmain.lib was changed to use -// CommandLineToArgvW() without calling into Qt5Core. -Q_CORE_EXPORT -void qWinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam, - int cmdShow, int &argc, QVector<char *> &argv) -{ - Q_UNUSED(instance) - Q_UNUSED(prevInstance) - Q_UNUSED(cmdShow) - - const QStringList wArgv = qWinCmdArgs(QString::fromLocal8Bit(cmdParam)); - argv.clear(); - argc = wArgv.size(); - for (const QString &wArg : wArgv) - argv.append(_strdup(wArg.toLocal8Bit().constData())); -} - -#endif // !Q_OS_WINRT - #ifndef QT_NO_QOBJECT #if defined(Q_OS_WIN) && !defined(QT_NO_DEBUG_STREAM) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 8a4ad8bbf3..c908e7cdbc 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -74,6 +74,7 @@ #include "qline.h" #endif +#include <cmath> #include <float.h> #include <cstring> @@ -3472,8 +3473,17 @@ static int numericCompare(const QVariant::Private *d1, const QVariant::Private * Q_ASSERT(ok); qreal r2 = qConvertToRealNumber(d2, &ok); Q_ASSERT(ok); - if (r1 == r2 || qFuzzyCompare(r1, r2)) + if (r1 == r2) return 0; + + // only do fuzzy comparisons for finite, non-zero numbers + int c1 = std::fpclassify(r1); + int c2 = std::fpclassify(r2); + if ((c1 == FP_NORMAL || c1 == FP_SUBNORMAL) && (c2 == FP_NORMAL || c2 == FP_SUBNORMAL)) { + if (qFuzzyCompare(r1, r2)) + return 0; + } + return r1 < r2 ? -1 : 1; } |