From ca65efb0ccad566eed89e7b81896299ca00fd2da Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 6 Feb 2019 10:12:48 +0100 Subject: Add deprecation exclusion around deprecated calls in deprecated code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix: io/qdir.cpp:1087:16: warning: ‘static void QResource::addSearchPath(const QString&)’ is deprecated: Use QDir::addSearchPath() instead [-Wdeprecated-declarations] io/qprocess.cpp:1178:34: warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations] image/qpixmap.cpp:997:48: warning: ‘static QPixmap QPixmap::grabWidget(QObject*, const QRect&)’ is deprecated: Use QWidget::grab() instead [-Wdeprecated-declarations] text/qfont.cpp:2218:29: warning: ‘QString QFont::lastResortFamily() const’ is deprecated [-Wdeprecated-declarations] itemviews/qitemdelegate.cpp:1008:41: warning: ‘static QPixmap* QPixmapCache::find(const QString&)’ is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] Change-Id: I51259edc175b1f55f61ded3af50ebfffd8c304a8 Reviewed-by: Christian Ehrlicher --- src/corelib/io/qdir.cpp | 3 +++ src/corelib/io/qprocess.cpp | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 9c4ae5a1c0..671913e92f 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1084,7 +1084,10 @@ void QDir::setNameFilters(const QStringList &nameFilters) void QDir::addResourceSearchPath(const QString &path) { #ifdef QT_BUILD_CORE_LIB +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED QResource::addSearchPath(path); +QT_WARNING_POP #else Q_UNUSED(path) #endif diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 83849980ae..d5d67d86f3 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1175,7 +1175,10 @@ bool QProcessPrivate::_q_processDied() //emit q->standardErrorClosed(); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED emit q->finished(exitCode); +QT_WARNING_POP #endif emit q->finished(exitCode, exitStatus); } -- cgit v1.2.3