diff options
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/global.pri | 12 | ||||
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 9 | ||||
-rw-r--r-- | src/corelib/global/qconfig-bootstrapped.h | 5 | ||||
-rw-r--r-- | src/corelib/global/qglobal.cpp | 6 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 26 | ||||
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 4 | ||||
-rw-r--r-- | src/corelib/global/qlogging.cpp | 25 |
7 files changed, 38 insertions, 49 deletions
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index bd2e125006..d23706e631 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -53,19 +53,11 @@ if(linux*|hurd*):!cross_compile:!static:!*-armcc* { DEFINES += ELF_INTERPRETER=\\\"$$system(LC_ALL=C readelf -l /bin/ls | perl -n -e \'$$prog\')\\\" } -slog2 { +qtConfig(slog2): \ LIBS_PRIVATE += -lslog2 - DEFINES += QT_USE_SLOG2 -} -journald { +qtConfig(journald): \ QMAKE_USE_PRIVATE += journald - DEFINES += QT_USE_JOURNALD -} - -syslog { - DEFINES += QT_USE_SYSLOG -} gcc:ltcg { versiontagging_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS) $(INCPATH) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 0b2345f8d4..d978c141a4 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -986,6 +986,9 @@ # define Q_COMPILER_THREADSAFE_STATICS # define Q_COMPILER_UNIFORM_INIT # endif +# if _MSC_VER >= 1910 +# define Q_COMPILER_CONSTEXPR +# endif # endif /* __cplusplus */ #endif /* Q_CC_MSVC */ @@ -1270,6 +1273,7 @@ # define QT_WARNING_DISABLE_INTEL(number) __pragma(warning(disable: number)) # define QT_WARNING_DISABLE_CLANG(text) # define QT_WARNING_DISABLE_GCC(text) +# define QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_INTEL(1786) #elif defined(Q_CC_INTEL) /* icc: Intel compiler on Linux or OS X */ # define QT_WARNING_PUSH QT_DO_PRAGMA(warning(push)) @@ -1278,6 +1282,7 @@ # define QT_WARNING_DISABLE_MSVC(number) # define QT_WARNING_DISABLE_CLANG(text) # define QT_WARNING_DISABLE_GCC(text) +# define QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_INTEL(1786) #elif defined(Q_CC_MSVC) && _MSC_VER >= 1500 && !defined(Q_CC_CLANG) # undef QT_DO_PRAGMA /* not needed */ # define QT_WARNING_PUSH __pragma(warning(push)) @@ -1286,6 +1291,7 @@ # define QT_WARNING_DISABLE_INTEL(number) # define QT_WARNING_DISABLE_CLANG(text) # define QT_WARNING_DISABLE_GCC(text) +# define QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_MSVC(4996) #elif defined(Q_CC_CLANG) # define QT_WARNING_PUSH QT_DO_PRAGMA(clang diagnostic push) # define QT_WARNING_POP QT_DO_PRAGMA(clang diagnostic pop) @@ -1293,6 +1299,7 @@ # define QT_WARNING_DISABLE_GCC(text) # define QT_WARNING_DISABLE_INTEL(number) # define QT_WARNING_DISABLE_MSVC(number) +# define QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_CLANG("-Wdeprecated-declarations") #elif defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) # define QT_WARNING_PUSH QT_DO_PRAGMA(GCC diagnostic push) # define QT_WARNING_POP QT_DO_PRAGMA(GCC diagnostic pop) @@ -1300,6 +1307,7 @@ # define QT_WARNING_DISABLE_CLANG(text) # define QT_WARNING_DISABLE_INTEL(number) # define QT_WARNING_DISABLE_MSVC(number) +# define QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations") #else // All other compilers, GCC < 4.6 and MSVC < 2008 # define QT_WARNING_DISABLE_GCC(text) # define QT_WARNING_PUSH @@ -1308,6 +1316,7 @@ # define QT_WARNING_DISABLE_MSVC(number) # define QT_WARNING_DISABLE_CLANG(text) # define QT_WARNING_DISABLE_GCC(text) +# define QT_WARNING_DISABLE_DEPRECATED #endif /* diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h index 3b86e94cdd..d0e45478cc 100644 --- a/src/corelib/global/qconfig-bootstrapped.h +++ b/src/corelib/global/qconfig-bootstrapped.h @@ -68,10 +68,15 @@ #define QT_CRYPTOGRAPHICHASH_ONLY_SHA1 #define QT_NO_DATASTREAM +#define QT_FEATURE_iconv -1 +#define QT_FEATURE_icu -1 +#define QT_FEATURE_journald -1 #define QT_NO_LIBRARY #define QT_FEATURE_library -1 #define QT_NO_QOBJECT #define QT_NO_SYSTEMLOCALE +#define QT_FEATURE_slog2 -1 +#define QT_FEATURE_syslog -1 #define QT_NO_THREAD #define QT_FEATURE_timezone -1 #define QT_FEATURE_topleveldomain -1 diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index e6eee5a1d2..47aca712b7 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1248,6 +1248,12 @@ bool qSharedBuild() Q_DECL_NOTHROW \value MV_TVOS_9_2 tvOS 9.2 \value MV_TVOS_10_0 tvOS 10.0 + \value MV_WATCHOS watchOS (any) + \value MV_WATCHOS_2_0 watchOS 2.0 + \value MV_WATCHOS_2_1 watchOS 2.1 + \value MV_WATCHOS_2_2 watchOS 2.2 + \value MV_WATCHOS_3_0 watchOS 3.0 + \value MV_None Not a Darwin operating system \sa WinVersion diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index f64ab143ef..4354c85bfe 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -621,32 +621,6 @@ private: class QDataStream; -#if defined(Q_OS_VXWORKS) -# define QT_NO_CRASHHANDLER // no popen -# define QT_NO_PROCESS // no exec*, no fork -# define QT_NO_SHAREDMEMORY // only POSIX, no SysV and in the end... -# define QT_NO_SYSTEMSEMAPHORE // not needed at all in a flat address space -#endif - -#if defined(Q_OS_WINRT) -# define QT_NO_FILESYSTEMWATCHER -# define QT_NO_NETWORKPROXY -# define QT_NO_PROCESS -# define QT_NO_SOCKETNOTIFIER -# define QT_NO_SOCKS5 -#endif - -#if defined(QT_PLATFORM_UIKIT) -# define QT_NO_PROCESS -#endif - -#if defined(Q_OS_INTEGRITY) -# define QT_NO_CRASHHANDLER // no popen -# define QT_NO_PROCESS // no exec*, no fork -# define QT_NO_SYSTEMSEMAPHORE // not needed at all in a single AddressSpace -# define QT_NO_MULTIPROCESS // no system -#endif - inline void qt_noop(void) {} /* These wrap try/catch so we can switch off exceptions later. diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 1469f5776b..27fe10a79e 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -318,8 +318,10 @@ QLibraryInfo::buildDate() # define COMPILER_STRING "MSVC 2012" # elif _MSC_VER < 1900 # define COMPILER_STRING "MSVC 2013" -# elif _MSC_VER < 2000 +# elif _MSC_VER < 1910 # define COMPILER_STRING "MSVC 2015" +# elif _MSC_VER < 2000 +# define COMPILER_STRING "MSVC 2017" # else # define COMPILER_STRING "MSVC _MSC_VER " QT_STRINGIFY(_MSC_VER) # endif diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 0ca6829564..0506d372b6 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#include "qglobal_p.h" #include "qlogging.h" #include "qlist.h" #include "qbytearray.h" @@ -59,7 +60,7 @@ #ifdef Q_OS_WIN #include <qt_windows.h> #endif -#ifdef QT_USE_SLOG2 +#if QT_CONFIG(slog2) #include <slog2.h> #endif @@ -67,12 +68,12 @@ #include <android/log.h> #endif -#if defined(QT_USE_JOURNALD) && !defined(QT_BOOTSTRAPPED) +#if QT_CONFIG(journald) # define SD_JOURNAL_SUPPRESS_LOCATION # include <systemd/sd-journal.h> # include <syslog.h> #endif -#if defined(QT_USE_SYSLOG) && !defined(QT_BOOTSTRAPPED) +#if QT_CONFIG(syslog) # include <syslog.h> #endif #ifdef Q_OS_UNIX @@ -93,7 +94,7 @@ # endif #endif -#if defined(QT_USE_SLOG2) +#if QT_CONFIG(slog2) extern char *__progname; #endif @@ -1281,7 +1282,7 @@ static QString formatBacktraceForLogMessage(const QMessagePattern::BacktracePara } #endif // QLOGGING_HAVE_BACKTRACE && !QT_BOOTSTRAPPED -#if defined(QT_USE_SLOG2) +#if QT_CONFIG(slog2) #ifndef QT_LOG_CODE #define QT_LOG_CODE 9000 #endif @@ -1330,7 +1331,7 @@ static void slog2_default_handler(QtMsgType msgType, const char *message) //writes to the slog2 buffer slog2c(NULL, QT_LOG_CODE, severity, message); } -#endif // QT_USE_SLOG2 +#endif // slog2 Q_GLOBAL_STATIC(QMessagePattern, qMessagePattern) @@ -1479,7 +1480,7 @@ static QBasicAtomicPointer<void (QtMsgType, const char*)> msgHandler = Q_BASIC_A // pointer to QtMessageHandler debug handler (with context) static QBasicAtomicPointer<void (QtMsgType, const QMessageLogContext &, const QString &)> messageHandler = Q_BASIC_ATOMIC_INITIALIZER(qDefaultMessageHandler); -#if defined(QT_USE_JOURNALD) && !defined(QT_BOOTSTRAPPED) +#if QT_CONFIG(journald) static void systemd_default_message_handler(QtMsgType type, const QMessageLogContext &context, const QString &message) @@ -1513,7 +1514,7 @@ static void systemd_default_message_handler(QtMsgType type, } #endif -#ifdef QT_USE_SYSLOG +#if QT_CONFIG(syslog) static void syslog_default_message_handler(QtMsgType type, const char *message) { int priority = LOG_INFO; // Informational @@ -1577,14 +1578,14 @@ static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &con logMessage.append(QLatin1Char('\n')); OutputDebugString(reinterpret_cast<const wchar_t *>(logMessage.utf16())); return; -#elif defined(QT_USE_SLOG2) +#elif QT_CONFIG(slog2) logMessage.append(QLatin1Char('\n')); slog2_default_handler(type, logMessage.toLocal8Bit().constData()); return; -#elif defined(QT_USE_JOURNALD) && !defined(QT_BOOTSTRAPPED) +#elif QT_CONFIG(journald) systemd_default_message_handler(type, context, logMessage); return; -#elif defined(QT_USE_SYSLOG) && !defined(QT_BOOTSTRAPPED) +#elif QT_CONFIG(syslog) syslog_default_message_handler(type, logMessage.toUtf8().constData()); return; #elif defined(Q_OS_ANDROID) @@ -1779,7 +1780,7 @@ void qErrnoWarning(int code, const char *msg, ...) \snippet code/src_corelib_global_qglobal.cpp 23 - \sa QtMessageHandler, QtMsgType, qDebug(), qWarning(), qCritical(), qFatal(), + \sa QtMessageHandler, QtMsgType, qDebug(), qInfo(), qWarning(), qCritical(), qFatal(), {Debugging Techniques} */ |