diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-03-24 07:37:43 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-03-24 07:38:02 +0100 |
commit | 135ebe4f3d268121047fdbfee49f2dd52006165e (patch) | |
tree | 6b303103f36e69e29cfa860b8b7afc584c55d6f3 /src/corelib/io | |
parent | e7feb956280105113b3e58f12e5f32f54199a95a (diff) | |
parent | 1e8f50a8d069c97ea6a4f00d664c12e594884f54 (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: If5d2e621c2fa5476c3ab687a3f4620c54fc3b32e
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qdebug.h | 10 | ||||
-rw-r--r-- | src/corelib/io/qdir.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qlockfile_unix.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qlockfile_win.cpp | 2 |
4 files changed, 11 insertions, 5 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index 95f5993e4f..354c0e1392 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -290,7 +290,10 @@ operator<<(QDebug dbg, T value) } template <class T> -inline typename QtPrivate::QEnableIf<QtPrivate::IsQEnumHelper<T>::Value, QDebug>::Type operator<<(QDebug debug, const QFlags<T> &flags) +inline typename QtPrivate::QEnableIf< + QtPrivate::IsQEnumHelper<T>::Value || QtPrivate::IsQEnumHelper<QFlags<T> >::Value, + QDebug>::Type +operator<<(QDebug debug, const QFlags<T> &flags) { const QMetaObject *obj = qt_getEnumMetaObject(T()); const char *name = qt_getEnumName(T()); @@ -298,7 +301,10 @@ inline typename QtPrivate::QEnableIf<QtPrivate::IsQEnumHelper<T>::Value, QDebug> } template <class T> -inline typename QtPrivate::QEnableIf<!QtPrivate::IsQEnumHelper<T>::Value, QDebug>::Type operator<<(QDebug debug, const QFlags<T> &flags) +inline typename QtPrivate::QEnableIf< + !QtPrivate::IsQEnumHelper<T>::Value && !QtPrivate::IsQEnumHelper<QFlags<T> >::Value, + QDebug>::Type +operator<<(QDebug debug, const QFlags<T> &flags) #else // !QT_NO_QOBJECT template <class T> inline QDebug operator<<(QDebug debug, const QFlags<T> &flags) diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index c9c6704423..7fa53bd850 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -235,7 +235,7 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt firstModified.setTimeSpec(Qt::UTC); secondModified.setTimeSpec(Qt::UTC); - r = firstModified.secsTo(secondModified); + r = firstModified.msecsTo(secondModified); break; } case QDir::Size: diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp index 1c8da607a7..c663681aaa 100644 --- a/src/corelib/io/qlockfile_unix.cpp +++ b/src/corelib/io/qlockfile_unix.cpp @@ -137,7 +137,7 @@ QLockFile::LockError QLockFilePrivate::tryLock_sys() // (otherwise we'd have to check every write call) // Use operator% from the fast builder to avoid multiple memory allocations. QByteArray fileData = QByteArray::number(QCoreApplication::applicationPid()) % '\n' - % qAppName().toUtf8() % '\n' + % QCoreApplication::applicationName().toUtf8() % '\n' % localHostName() % '\n'; const QByteArray lockFileName = QFile::encodeName(fileName); diff --git a/src/corelib/io/qlockfile_win.cpp b/src/corelib/io/qlockfile_win.cpp index 95d952c918..a36e6e93b8 100644 --- a/src/corelib/io/qlockfile_win.cpp +++ b/src/corelib/io/qlockfile_win.cpp @@ -94,7 +94,7 @@ QLockFile::LockError QLockFilePrivate::tryLock_sys() QByteArray fileData; fileData += QByteArray::number(QCoreApplication::applicationPid()); fileData += '\n'; - fileData += qAppName().toUtf8(); + fileData += QCoreApplication::applicationName().toUtf8(); fileData += '\n'; fileData += localHostName(); fileData += '\n'; |