summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/Qt5CoreConfigExtras.cmake.in2
-rw-r--r--src/corelib/codecs/qtextcodec_p.h2
-rw-r--r--src/corelib/global/global.pri5
-rw-r--r--src/corelib/global/qglobal.cpp10
-rw-r--r--src/corelib/global/qlogging.cpp20
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/corelib/global/qnamespace.qdoc1
-rw-r--r--src/corelib/global/qsysinfo.h4
-rw-r--r--src/corelib/global/qsystemdetection.h11
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp11
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp17
-rw-r--r--src/corelib/kernel/qcore_mac_p.h2
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp19
-rw-r--r--src/corelib/thread/qthread_unix.cpp4
14 files changed, 66 insertions, 44 deletions
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index 737c12034b..36a54787b3 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -80,6 +80,8 @@ list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE)
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE)
!!ENDIF
+set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>)
+
!!IF contains(QT_CONFIG, reduce_exports)
set(QT_VISIBILITY_AVAILABLE \"True\")
!!ENDIF
diff --git a/src/corelib/codecs/qtextcodec_p.h b/src/corelib/codecs/qtextcodec_p.h
index 0fec1e80c7..00c067821e 100644
--- a/src/corelib/codecs/qtextcodec_p.h
+++ b/src/corelib/codecs/qtextcodec_p.h
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_TEXTCODEC
-#if defined(Q_OS_MAC) || defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || defined(Q_OS_QNX)
+#if defined(Q_OS_MAC) || defined(Q_OS_ANDROID) || defined(Q_OS_QNX)
#define QT_LOCALE_IS_UTF8
#endif
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index 4084d4f2ad..a0842a946d 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -30,9 +30,12 @@ SOURCES += \
INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
# configure creates these, not syncqt, so we need to manually inject them
-targ_headers.files += \
+qconfig_h_files = \
$$OUT_PWD/global/qconfig.h \
$$QT_BUILD_TREE/include/QtCore/QtConfig
+targ_headers.files += $$qconfig_h_files
+contains(QMAKE_BUNDLE_DATA, FRAMEWORK_HEADERS): \
+ FRAMEWORK_HEADERS.files += $$qconfig_h_files
# Only used on platforms with CONFIG += precompile_header
PRECOMPILED_HEADER = global/qt_pch.h
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index e6da7bb32d..c085dbaa4d 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1042,7 +1042,7 @@ bool qSharedBuild() Q_DECL_NOTHROW
\enum QSysInfo::MacVersion
This enum provides symbolic names for the various versions of the
- Macintosh operating system. On Mac, the
+ OS X operating system. On OS X, the
QSysInfo::MacintoshVersion variable gives the version of the
system on which the application is run.
@@ -1054,8 +1054,9 @@ bool qSharedBuild() Q_DECL_NOTHROW
\value MV_10_4 Mac OS X 10.4 (unsupported)
\value MV_10_5 Mac OS X 10.5 (unsupported)
\value MV_10_6 Mac OS X 10.6
- \value MV_10_7 Mac OS X 10.7
- \value MV_10_8 Mac OS X 10.8
+ \value MV_10_7 OS X 10.7
+ \value MV_10_8 OS X 10.8
+ \value MV_10_9 OS X 10.9
\value MV_Unknown An unknown and currently unsupported platform
\value MV_CHEETAH Apple codename for MV_10_0
@@ -1067,6 +1068,7 @@ bool qSharedBuild() Q_DECL_NOTHROW
\value MV_SNOWLEOPARD Apple codename for MV_10_6
\value MV_LION Apple codename for MV_10_7
\value MV_MOUNTAINLION Apple codename for MV_10_8
+ \value MV_MAVERICKS Apple codename for MV_10_9
\sa WinVersion
*/
@@ -1694,7 +1696,7 @@ Q_CORE_EXPORT QString qt_mac_from_pascal_string(const Str255 pstr) {
QSysInfo::MacVersion QSysInfo::macVersion()
{
-#ifndef Q_OS_IOS
+#ifdef Q_OS_MACX
SInt32 gestalt_version;
if (Gestalt(gestaltSystemVersion, &gestalt_version) == noErr) {
return QSysInfo::MacVersion(((gestalt_version & 0x00F0) >> 4) + 2);
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 85ff89ebdd..a37fc15b61 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -917,21 +917,19 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex
static void qt_message_fatal(QtMsgType, const QMessageLogContext &context, const QString &message)
{
#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
- wchar_t contextFileL[256];
- // we probably should let the compiler do this for us, by
- // declaring QMessageLogContext::file to be const wchar_t * in
- // the first place, but the #ifdefery above is very complex
- // and we wouldn't be able to change it later on...
- convert_to_wchar_t_elided(contextFileL, sizeof contextFileL / sizeof *contextFileL, context.file);
+ wchar_t contextFileL[256];
+ // we probably should let the compiler do this for us, by declaring QMessageLogContext::file to
+ // be const wchar_t * in the first place, but the #ifdefery above is very complex and we
+ // wouldn't be able to change it later on...
+ convert_to_wchar_t_elided(contextFileL, sizeof contextFileL / sizeof *contextFileL,
+ context.file);
// get the current report mode
int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW);
_CrtSetReportMode(_CRT_ERROR, reportMode);
- int ret = _CrtDbgReportW(_CRT_ERROR, contextFileL,
- context.line, _CRT_WIDE(QT_VERSION_STR),
- reinterpret_cast<const wchar_t *> (
- message.utf16()));
- if (ret == 0 && reportMode & _CRTDBG_MODE_WNDW)
+ int ret = _CrtDbgReportW(_CRT_ERROR, contextFileL, context.line, _CRT_WIDE(QT_VERSION_STR),
+ reinterpret_cast<const wchar_t *>(message.utf16()));
+ if ((ret == 0) && (reportMode & _CRTDBG_MODE_WNDW))
return; // ignore
else if (ret == 1)
_CrtDbgBreak();
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 74949b86f0..25c47d5d34 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -980,6 +980,8 @@ public:
Key_TouchpadOn = 0x01000111,
Key_TouchpadOff = 0x01000112,
+ Key_MicMute = 0x01000113,
+
Key_MediaLast = 0x0100ffff,
// Keypad navigation keys
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 9eb0c6b8f2..f9248eb68d 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1621,6 +1621,7 @@
\value Key_TouchpadToggle
\value Key_TouchpadOn
\value Key_TouchpadOff
+ \value Key_MicMute
\value Key_MediaLast
\value Key_unknown
diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h
index 58939cc013..a6accdfebc 100644
--- a/src/corelib/global/qsysinfo.h
+++ b/src/corelib/global/qsysinfo.h
@@ -132,6 +132,7 @@ public:
MV_10_6 = 0x0008,
MV_10_7 = 0x0009,
MV_10_8 = 0x000A,
+ MV_10_9 = 0x000B,
/* codenames */
MV_CHEETAH = MV_10_0,
@@ -142,7 +143,8 @@ public:
MV_LEOPARD = MV_10_5,
MV_SNOWLEOPARD = MV_10_6,
MV_LION = MV_10_7,
- MV_MOUNTAINLION = MV_10_8
+ MV_MOUNTAINLION = MV_10_8,
+ MV_MAVERICKS = MV_10_9
};
static const MacVersion MacintoshVersion;
static MacVersion macVersion();
diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h
index 690442d066..cb55fa808b 100644
--- a/src/corelib/global/qsystemdetection.h
+++ b/src/corelib/global/qsystemdetection.h
@@ -207,12 +207,18 @@
# if !defined(__MAC_10_8)
# define __MAC_10_8 1080
# endif
+# if !defined(__MAC_10_9)
+# define __MAC_10_9 1090
+# endif
# if !defined(MAC_OS_X_VERSION_10_7)
# define MAC_OS_X_VERSION_10_7 1070
# endif
# if !defined(MAC_OS_X_VERSION_10_8)
# define MAC_OS_X_VERSION_10_8 1080
# endif
+# if !defined(MAC_OS_X_VERSION_10_9)
+# define MAC_OS_X_VERSION_10_9 1090
+# endif
#
# if !defined(__IPHONE_4_3)
# define __IPHONE_4_3 40300
@@ -229,9 +235,12 @@
# if !defined(__IPHONE_6_1)
# define __IPHONE_6_1 60100
# endif
+# if !defined(__IPHONE_7_0)
+# define __IPHONE_7_0 70000
+# endif
#
# if (__MAC_OS_X_VERSION_MAX_ALLOWED > __MAC_10_8)
-# warning "This version of Mac OS X is unsupported"
+# warning "This version of OS X is unsupported"
# endif
#endif
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index b18e32b29a..a7517b4c7f 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -510,11 +510,12 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea
}
if (slash) {
const QByteArray chunk = QFile::encodeName(dirName.left(slash));
- QT_STATBUF st;
- if (QT_STAT(chunk.constData(), &st) != -1) {
- if ((st.st_mode & S_IFMT) != S_IFDIR)
- return false;
- } else if (QT_MKDIR(chunk.constData(), 0777) != 0) {
+ if (QT_MKDIR(chunk.constData(), 0777) != 0) {
+ if (errno == EEXIST) {
+ QT_STATBUF st;
+ if (QT_STAT(chunk.constData(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR)
+ continue;
+ }
return false;
}
}
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index bee7689535..2c9ed9da3d 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -1034,6 +1034,10 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea
}
if (oldslash != -1)
oldslash = dirName.indexOf(QDir::separator(), oldslash);
+ } else if (dirName.size() > 2
+ && dirName.at(1) == QLatin1Char(':')) {
+ // Don't try to call mkdir with just a drive letter
+ oldslash = 2;
}
for (int slash=0; slash != -1; oldslash = slash) {
slash = dirName.indexOf(QDir::separator(), oldslash+1);
@@ -1044,14 +1048,13 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea
}
if (slash) {
QString chunk = dirName.left(slash);
- bool existed = false;
- if (!isDirPath(chunk, &existed)) {
- if (!existed) {
- if (!mkDir(chunk))
- return false;
- } else {
- return false;
+ if (!mkDir(chunk)) {
+ if (GetLastError() == ERROR_ALREADY_EXISTS) {
+ bool existed = false;
+ if (isDirPath(chunk, &existed) && existed)
+ continue;
}
+ return false;
}
}
}
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index ad6be762c0..fa911fb967 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -65,7 +65,7 @@
#include "qglobal.h"
-#ifndef Q_OS_IOS
+#ifdef Q_OS_MACX
#include <CoreServices/CoreServices.h>
#endif
diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
index 61c9b40e83..c617325e9e 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -72,7 +72,6 @@ public:
QByteArray iid;
QList<QLibraryPrivate*> libraryList;
QMap<QString,QLibraryPrivate*> keyMap;
- QStringList keyList;
QString suffix;
Qt::CaseSensitivity cs;
QStringList loadedPaths;
@@ -176,10 +175,8 @@ void QFactoryLoader::update()
metaDataOk = true;
QJsonArray k = object.value(QLatin1String("Keys")).toArray();
- for (int i = 0; i < k.size(); ++i) {
- QString s = k.at(i).toString();
- keys += s;
- }
+ for (int i = 0; i < k.size(); ++i)
+ keys += d->cs ? k.at(i).toString() : k.at(i).toString().toLower();
}
if (qt_debug_component())
qDebug() << "Got keys from plugin meta data" << keys;
@@ -190,15 +187,13 @@ void QFactoryLoader::update()
continue;
}
- d->libraryList += library;
+ int keyUsageCount = 0;
for (int k = 0; k < keys.count(); ++k) {
// first come first serve, unless the first
// library was built with a future Qt version,
// whereas the new one has a Qt version that fits
// better
- QString key = keys.at(k);
- if (!d->cs)
- key = key.toLower();
+ const QString &key = keys.at(k);
QLibraryPrivate *previous = d->keyMap.value(key);
int prev_qt_version = 0;
if (previous) {
@@ -207,9 +202,13 @@ void QFactoryLoader::update()
int qt_version = (int)library->metaData.value(QLatin1String("version")).toDouble();
if (!previous || (prev_qt_version > QT_VERSION && qt_version <= QT_VERSION)) {
d->keyMap[key] = library;
- d->keyList += keys.at(k);
+ ++keyUsageCount;
}
}
+ if (keyUsageCount || keys.isEmpty())
+ d->libraryList += library;
+ else
+ library->release();
}
}
#else
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index be9b946990..6a91193785 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -83,9 +83,9 @@
# define old_qDebug qDebug
# undef qDebug
# endif
-#ifndef Q_OS_IOS
+#ifdef Q_OS_MACX
# include <CoreServices/CoreServices.h>
-#endif //Q_OS_IOS
+#endif // Q_OS_MACX
# ifdef old_qDebug
# undef qDebug