Deprecate implementations of functions deprecated in headers

If you build with configure -DQT_NO_DEPRECATED this will avoid some
build errors.

Change-Id: If2b2e57b6919091f3f077ebc2aeca0c3fd2421aa
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
Shawn Rutledge 2014-11-25 09:47:43 +01:00 committed by Konstantin Ritt
parent b55f88caba
commit b9d98c10bd
7 changed files with 18 additions and 1 deletions

View File

@ -2580,6 +2580,7 @@ void QCoreApplication::removeNativeEventFilter(QAbstractNativeEventFilter *filte
\sa QAbstractEventDispatcher::hasPendingEvents()
*/
#if QT_DEPRECATED_SINCE(5, 3)
bool QCoreApplication::hasPendingEvents()
{
QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();
@ -2587,6 +2588,7 @@ bool QCoreApplication::hasPendingEvents()
return eventDispatcher->hasPendingEvents();
return false;
}
#endif
/*!
Returns a pointer to the event dispatcher object for the main thread. If no

View File

@ -308,6 +308,7 @@ void QSurfaceFormat::setSamples(int numSamples)
}
}
#if QT_DEPRECATED_SINCE(5, 2)
/*!
\obsolete
\overload
@ -343,6 +344,7 @@ bool QSurfaceFormat::testOption(QSurfaceFormat::FormatOptions opt) const
{
return d->opts & opt;
}
#endif // QT_DEPRECATED_SINCE(5, 2)
/*!
\since 5.3

View File

@ -119,8 +119,10 @@ public:
bool stereo() const;
void setStereo(bool enable);
#if QT_DEPRECATED_SINCE(5, 2)
QT_DEPRECATED void setOption(QSurfaceFormat::FormatOptions opt);
QT_DEPRECATED bool testOption(QSurfaceFormat::FormatOptions opt) const;
#endif
void setOptions(QSurfaceFormat::FormatOptions options);
void setOption(FormatOption option, bool on = true);

View File

@ -2591,6 +2591,7 @@ void QOpenGLTexture::setData(PixelFormat sourceFormat, PixelType sourceType,
d->setData(0, 0, QOpenGLTexture::CubeMapPositiveX, sourceFormat, sourceType, data, options);
}
#if QT_DEPRECATED_SINCE(5, 3)
/*!
\obsolete
\overload
@ -2648,6 +2649,7 @@ void QOpenGLTexture::setData(PixelFormat sourceFormat, PixelType sourceType,
Q_ASSERT(d->textureId);
d->setData(0, 0, QOpenGLTexture::CubeMapPositiveX, sourceFormat, sourceType, data, options);
}
#endif
/*!
This overload of setData() will allocate storage for you.
@ -2736,6 +2738,7 @@ void QOpenGLTexture::setCompressedData(int dataSize, const void *data,
d->setCompressedData(0, 0, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);
}
#if QT_DEPRECATED_SINCE(5, 3)
/*!
\obsolete
\overload
@ -2789,6 +2792,7 @@ void QOpenGLTexture::setCompressedData(int dataSize, void *data,
Q_ASSERT(d->textureId);
d->setCompressedData(0, 0, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);
}
#endif
/*!
Returns \c true if your OpenGL implementation and version supports the texture

View File

@ -342,6 +342,7 @@ public:
// Pixel transfer
// ### Qt 6: remove the non-const void * overloads
#if QT_DEPRECATED_SINCE(5, 3)
QT_DEPRECATED void setData(int mipLevel, int layer, CubeMapFace cubeFace,
PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options = 0);
@ -353,6 +354,7 @@ public:
void *data, const QOpenGLPixelTransferOptions * const options = 0);
QT_DEPRECATED void setData(PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options = 0);
#endif // QT_DEPRECATED_SINCE(5, 3)
void setData(int mipLevel, int layer, CubeMapFace cubeFace,
PixelFormat sourceFormat, PixelType sourceType,
@ -368,6 +370,7 @@ public:
// Compressed data upload
// ### Qt 6: remove the non-const void * overloads
#if QT_DEPRECATED_SINCE(5, 3)
QT_DEPRECATED void setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace,
int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options = 0);
@ -378,6 +381,7 @@ public:
const QOpenGLPixelTransferOptions * const options = 0);
QT_DEPRECATED void setCompressedData(int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options = 0);
#endif // QT_DEPRECATED_SINCE(5, 3)
void setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace,
int dataSize, const void *data,

View File

@ -1950,6 +1950,7 @@ static void set_extended_font_bits(quint8 bits, QFontPrivate *f)
}
#endif
#if QT_DEPRECATED_SINCE(5, 3)
/*!
\fn QString QFont::rawName() const
\deprecated
@ -1986,6 +1987,7 @@ QString QFont::rawName() const
void QFont::setRawName(const QString &)
{
}
#endif
/*!
Returns the font's key, a textual representation of a font. It is

View File

@ -2443,11 +2443,12 @@ bool QFontDatabase::removeAllApplicationFonts()
\sa {Thread-Support in Qt Modules#Painting In Threads}{Painting In Threads}
*/
// QT_DEPRECATED_SINCE(5, 2)
#if QT_DEPRECATED_SINCE(5, 2)
bool QFontDatabase::supportsThreadedFontRendering()
{
return true;
}
#endif
/*!
\internal