Add deprecation exclusion around deprecated calls in deprecated code
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 <ch.ehrlicher@gmx.de>
This commit is contained in:
parent
71a1c66ab9
commit
ca65efb0cc
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -994,7 +994,10 @@ QPixmap QPixmap::grabWidget(QObject *widget, const QRect &rectangle)
|
||||
*/
|
||||
QPixmap QPixmap::grabWidget(QObject *widget, int x, int y, int w, int h)
|
||||
{
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
return grabWidget(widget, QRect(x, y, w, h));
|
||||
QT_WARNING_POP
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2981,7 +2981,10 @@ void QPainter::setMatrix(const QMatrix &matrix, bool combine)
|
||||
|
||||
const QMatrix &QPainter::matrix() const
|
||||
{
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
return worldMatrix();
|
||||
QT_WARNING_POP
|
||||
}
|
||||
|
||||
|
||||
|
@ -2215,7 +2215,10 @@ QString QFont::defaultFamily() const
|
||||
*/
|
||||
QString QFont::lastResortFont() const
|
||||
{
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
return lastResortFamily();
|
||||
QT_WARNING_POP
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1005,11 +1005,14 @@ static QString qPixmapSerial(quint64 i, bool enabled)
|
||||
QPixmap *QItemDelegate::selected(const QPixmap &pixmap, const QPalette &palette, bool enabled) const
|
||||
{
|
||||
const QString key = qPixmapSerial(pixmap.cacheKey(), enabled);
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
QPixmap *pm = QPixmapCache::find(key);
|
||||
if (pm)
|
||||
return pm;
|
||||
selectedPixmap(pixmap, palette, enabled);
|
||||
return QPixmapCache::find(key);
|
||||
QT_WARNING_POP
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user