From 615b02bfa2fb861f362c511087e6962660c25ea3 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 28 Apr 2019 13:39:29 +0200 Subject: QtCore: compile with QT_DISABLE_DEPRECATED_BEFORE=0x050d00 Don't call or implement functions which are not available when compiling with QT_DISABLE_DEPRECATED_BEFORE=0x050d00 Change-Id: I949b12bba880c516391f312f58c8748303a1790d Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- src/corelib/io/qprocess.cpp | 5 +++++ src/corelib/kernel/qcoreapplication.cpp | 2 ++ src/corelib/kernel/qsignalmapper.cpp | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index a4d0962b33..9557a1d24b 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -998,7 +998,12 @@ void QProcessPrivate::setErrorAndEmit(QProcess::ProcessError error, const QStrin Q_ASSERT(error != QProcess::UnknownError); setError(error, description); emit q->errorOccurred(processError); +#if QT_DEPRECATED_SINCE(5, 6) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED emit q->error(processError); +QT_WARNING_POP +#endif } /*! diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 0711914e2d..69b2a9bf41 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1013,6 +1013,7 @@ void QCoreApplication::setQuitLockEnabled(bool enabled) quitLockRefEnabled = enabled; } +#if QT_DEPRECATED_SINCE(5, 6) /*! \internal \deprecated @@ -1024,6 +1025,7 @@ bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event) { return notifyInternal2(receiver, event); } +#endif /*! \internal diff --git a/src/corelib/kernel/qsignalmapper.cpp b/src/corelib/kernel/qsignalmapper.cpp index 02a1281f92..34fea861cd 100644 --- a/src/corelib/kernel/qsignalmapper.cpp +++ b/src/corelib/kernel/qsignalmapper.cpp @@ -37,6 +37,9 @@ ** ****************************************************************************/ +#include "qglobal.h" +#if QT_DEPRECATED_SINCE(5, 10) + #include "qsignalmapper.h" #include "qhash.h" #include "qobject_p.h" @@ -312,3 +315,4 @@ QT_END_NAMESPACE #include "moc_qsignalmapper.cpp" +#endif -- cgit v1.2.3