QtGui: 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: I763a1c60d7cc080677736447dc358299d8f7ab04 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
64fab8f7e2
commit
ee845dfc39
@ -866,10 +866,12 @@ void QBmpHandler::setOption(ImageOption option, const QVariant &value)
|
||||
Q_UNUSED(value);
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
QByteArray QBmpHandler::name() const
|
||||
{
|
||||
return formatName();
|
||||
}
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -113,8 +113,9 @@ public:
|
||||
bool read(QImage *image) override;
|
||||
bool write(const QImage &image) override;
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
QByteArray name() const override;
|
||||
|
||||
#endif
|
||||
static bool canRead(QIODevice *device);
|
||||
|
||||
QVariant option(ImageOption option) const override;
|
||||
|
@ -1450,6 +1450,7 @@ void QImage::setDevicePixelRatio(qreal scaleFactor)
|
||||
d->devicePixelRatio = scaleFactor;
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 10)
|
||||
/*!
|
||||
\since 4.6
|
||||
\obsolete
|
||||
@ -1466,6 +1467,7 @@ int QImage::byteCount() const
|
||||
Q_ASSERT(!d || d->nbytes < std::numeric_limits<int>::max());
|
||||
return d ? int(d->nbytes) : 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\since 5.10
|
||||
|
@ -1197,10 +1197,12 @@ void QPngHandler::setOption(ImageOption option, const QVariant &value)
|
||||
d->scaledSize = value.toSize();
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
QByteArray QPngHandler::name() const
|
||||
{
|
||||
return "png";
|
||||
}
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -69,7 +69,9 @@ public:
|
||||
bool read(QImage *image) override;
|
||||
bool write(const QImage &image) override;
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
QByteArray name() const override;
|
||||
#endif
|
||||
|
||||
QVariant option(ImageOption option) const override;
|
||||
void setOption(ImageOption option, const QVariant &value) override;
|
||||
|
@ -576,10 +576,12 @@ void QPpmHandler::setOption(ImageOption option, const QVariant &value)
|
||||
subType = value.toByteArray().toLower();
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
QByteArray QPpmHandler::name() const
|
||||
{
|
||||
return subType.isEmpty() ? QByteArray("ppm") : subType;
|
||||
}
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -67,7 +67,9 @@ public:
|
||||
bool read(QImage *image) override;
|
||||
bool write(const QImage &image) override;
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
QByteArray name() const override;
|
||||
#endif
|
||||
|
||||
static bool canRead(QIODevice *device, QByteArray *subType = 0);
|
||||
|
||||
|
@ -356,10 +356,12 @@ void QXbmHandler::setOption(ImageOption option, const QVariant &value)
|
||||
fileName = value.toString();
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
QByteArray QXbmHandler::name() const
|
||||
{
|
||||
return "xbm";
|
||||
}
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -66,7 +66,9 @@ public:
|
||||
bool read(QImage *image) override;
|
||||
bool write(const QImage &image) override;
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
QByteArray name() const override;
|
||||
#endif
|
||||
|
||||
static bool canRead(QIODevice *device);
|
||||
|
||||
|
@ -1287,10 +1287,12 @@ void QXpmHandler::setOption(ImageOption option, const QVariant &value)
|
||||
fileName = value.toString();
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
QByteArray QXpmHandler::name() const
|
||||
{
|
||||
return "xpm";
|
||||
}
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -68,7 +68,9 @@ public:
|
||||
|
||||
static bool canRead(QIODevice *device);
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
QByteArray name() const override;
|
||||
#endif
|
||||
|
||||
QVariant option(ImageOption option) const override;
|
||||
void setOption(ImageOption option, const QVariant &value) override;
|
||||
|
@ -245,10 +245,12 @@ inline qreal QTransform::determinant() const
|
||||
return affine._m11*(m_33*affine._m22-affine._dy*m_23) -
|
||||
affine._m21*(m_33*affine._m12-affine._dy*m_13)+affine._dx*(m_23*affine._m12-affine._m22*m_13);
|
||||
}
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
inline qreal QTransform::det() const
|
||||
{
|
||||
return determinant();
|
||||
}
|
||||
#endif
|
||||
inline qreal QTransform::m11() const
|
||||
{
|
||||
return affine._m11;
|
||||
|
@ -496,10 +496,12 @@ void QTextOdfWriter::writeFormats(QXmlStreamWriter &writer, const QSet<int> &for
|
||||
else
|
||||
writeFrameFormat(writer, textFormat.toFrameFormat(), formatIndex);
|
||||
break;
|
||||
#if QT_DEPRECATED_SINCE(5, 3)
|
||||
case QTextFormat::TableFormat:
|
||||
// this case never happens, because TableFormat is a FrameFormat
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user