Fix deprecation warnings.

This commit is contained in:
Roman Telezhynskyi 2020-07-06 09:41:08 +03:00
parent d4315f7f1f
commit 8bf4c85e6e
2 changed files with 10 additions and 1 deletions

View File

@ -27,6 +27,7 @@
#include <QStringList> #include <QStringList>
#include <QTextStream> #include <QTextStream>
#include <QtDebug> #include <QtDebug>
#include <Qt>
#include <map> #include <map>
#ifdef QMUP_USE_OPENMP #ifdef QMUP_USE_OPENMP
#include <omp.h> #include <omp.h>
@ -1898,7 +1899,11 @@ void QmuParserBase::StackDump(const QStack<token_type> &a_stVal, const QStack<to
} }
stOprt.pop(); stOprt.pop();
} }
#if QT_VERSION <= QT_VERSION_CHECK(5, 15, 0)
qDebug() << dec; qDebug() << dec;
#else
qDebug() << Qt::dec;
#endif
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -156,11 +156,15 @@ void CheckableMessageBox::setText(const QString &t)
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
QPixmap CheckableMessageBox::iconPixmap() const QPixmap CheckableMessageBox::iconPixmap() const
{ {
if (const QPixmap *p = d->pixmapLabel->pixmap()) #if QT_VERSION <= QT_VERSION_CHECK(5, 15, 0)
if (const QPixmap *p = d->pixmapLabel->pixmap())
{ {
return QPixmap(*p); return QPixmap(*p);
} }
return QPixmap(); return QPixmap();
#else
return d->pixmapLabel->pixmap(Qt::ReturnByValueConstant);
#endif
} }
void CheckableMessageBox::setIconPixmap(const QPixmap &p) void CheckableMessageBox::setIconPixmap(const QPixmap &p)