Remove deprecated members from several QtGui classes

Those can be trivially removed as they have direct replacements, or
are completely unused.

The migration path for QCursor::bitmap and QCursor::mask is

QBitmap *pb = c.bitmap(); // up to 5.15, warns in 5.15
QBitmap vb = c.bitmap(Qt::ReturnByValue); // from 5.15, works in 6
QBitmap b = c.bitmap(); // from 6.0 on

Change-Id: I3b3acd1c7f09c4c8414e98b3ce11986f1ecd5eda
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Volker Hilsheimer 2020-04-17 17:19:24 +02:00
parent 4ba25a0920
commit dccf28b7c3
19 changed files with 31 additions and 406 deletions

View File

@ -1370,24 +1370,6 @@ void QStandardItem::setCheckable(bool checkable)
\sa setCheckable(), checkState(), isUserTristate(), isAutoTristate() \sa setCheckable(), checkState(), isUserTristate(), isAutoTristate()
*/ */
/*!
\fn void QStandardItem::setTristate(bool tristate)
\obsolete
Use QStandardItem::setAutoTristate(bool tristate) instead.
For a tristate checkbox that the user can change between all three
states, use QStandardItem::setUserTristate(bool tristate) instead.
*/
/*!
\fn void QStandardItem::isTristate() const
\obsolete
Use QStandardItem::isAutoTristate() instead.
For a tristate checkbox that the user can change between all three
states, use QStandardItem::isUserTristate() instead.
*/
/*! /*!
Determines that the item is tristate and controlled by QTreeWidget if \a tristate Determines that the item is tristate and controlled by QTreeWidget if \a tristate
is \c true. is \c true.
@ -1442,13 +1424,6 @@ void QStandardItem::setUserTristate(bool tristate)
\sa setUserTristate(), isCheckable(), checkState() \sa setUserTristate(), isCheckable(), checkState()
*/ */
#if QT_DEPRECATED_SINCE(5, 6)
void QStandardItem::setTristate(bool tristate)
{
setAutoTristate(tristate);
}
#endif
#if QT_CONFIG(draganddrop) #if QT_CONFIG(draganddrop)
/*! /*!

View File

@ -171,11 +171,6 @@ public:
} }
void setUserTristate(bool tristate); void setUserTristate(bool tristate);
#if QT_DEPRECATED_SINCE(5, 6)
QT_DEPRECATED bool isTristate() const { return isAutoTristate(); }
QT_DEPRECATED void setTristate(bool tristate);
#endif
#if QT_CONFIG(draganddrop) #if QT_CONFIG(draganddrop)
inline bool isDragEnabled() const { inline bool isDragEnabled() const {
return (flags() & Qt::ItemIsDragEnabled) != 0; return (flags() & Qt::ItemIsDragEnabled) != 0;

View File

@ -565,63 +565,25 @@ void QCursor::setShape(Qt::CursorShape shape)
} }
} }
#if QT_DEPRECATED_SINCE(5, 15)
/*!
\deprecated
New code should use the other overload which returns QBitmap by-value.
Returns the cursor bitmap, or \nullptr if it is one of the
standard cursors.
*/
const QBitmap *QCursor::bitmap() const
{
if (!QCursorData::initialized)
QCursorData::initialize();
return d->bm;
}
/*!
\deprecated
New code should use the other overload which returns QBitmap by-value.
Returns the cursor bitmap mask, or \nullptr if it is one of the
standard cursors.
*/
const QBitmap *QCursor::mask() const
{
if (!QCursorData::initialized)
QCursorData::initialize();
return d->bmm;
}
#endif // QT_DEPRECATED_SINCE(5, 15)
/*! /*!
\fn QBitmap QCursor::bitmap(Qt::ReturnByValueConstant) const
\since 5.15 \since 5.15
\obsolete Use the overload without argument instead.
Returns the cursor bitmap, or a null bitmap if it is one of the Returns the cursor bitmap, or a null bitmap if it is one of the
standard cursors. standard cursors.
Previously, Qt provided a version of \c bitmap() which returned the bitmap Previously, Qt provided a version of \c bitmap() which returned the bitmap
by-pointer. That version is now deprecated. To maintain compatibility by-pointer. That version is now removed. To maintain compatibility
with old code, you can explicitly differentiate between the by-pointer with old code, this function was provided to differentiate between the by-pointer
function and the by-value function: function and the by-value function.
\code
const QBitmap *bmpPtr = cursor->bitmap();
QBitmap bmpVal = cursor->bitmap(Qt::ReturnByValue);
\endcode
If you disable the deprecated version using the QT_DISABLE_DEPRECATED_BEFORE
macro, then you can omit \c Qt::ReturnByValue as shown below:
\code
QBitmap bmpVal = cursor->bitmap();
\endcode
*/ */
QBitmap QCursor::bitmap(Qt::ReturnByValueConstant) const
/*!
Returns the cursor bitmap, or a null bitmap if it is one of the
standard cursors.
*/
QBitmap QCursor::bitmap() const
{ {
if (!QCursorData::initialized) if (!QCursorData::initialized)
QCursorData::initialize(); QCursorData::initialize();
@ -631,29 +593,24 @@ QBitmap QCursor::bitmap(Qt::ReturnByValueConstant) const
} }
/*! /*!
\fn QBitmap QCursor::mask(Qt::ReturnByValueConstant) const
\since 5.15 \since 5.15
\obsolete Use the overload without argument instead.
Returns the cursor bitmap mask, or a null bitmap if it is one of the Returns the cursor bitmap mask, or a null bitmap if it is one of the
standard cursors. standard cursors.
Previously, Qt provided a version of \c mask() which returned the bitmap Previously, Qt provided a version of \c mask() which returned the bitmap
by-pointer. That version is now deprecated. To maintain compatibility by-pointer. That version is now removed. To maintain compatibility
with old code, you can explicitly differentiate between the by-pointer with old code, this function was provided to differentiate between the by-pointer
function and the by-value function: function and the by-value function.
\code
const QBitmap *bmpPtr = cursor->mask();
QBitmap bmpVal = cursor->mask(Qt::ReturnByValue);
\endcode
If you disable the deprecated version using the QT_DISABLE_DEPRECATED_BEFORE
macro, then you can omit \c Qt::ReturnByValue as shown below:
\code
QBitmap bmpVal = cursor->mask();
\endcode
*/ */
QBitmap QCursor::mask(Qt::ReturnByValueConstant) const
/*!
Returns the cursor bitmap mask, or a null bitmap if it is one of the
standard cursors.
*/
QBitmap QCursor::mask() const
{ {
if (!QCursorData::initialized) if (!QCursorData::initialized)
QCursorData::initialize(); QCursorData::initialize();

View File

@ -43,6 +43,7 @@
#include <QtGui/qtguiglobal.h> #include <QtGui/qtguiglobal.h>
#include <QtCore/qpoint.h> #include <QtCore/qpoint.h>
#include <QtGui/qwindowdefs.h> #include <QtGui/qwindowdefs.h>
#include <QtGui/qbitmap.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -97,19 +98,13 @@ public:
Qt::CursorShape shape() const; Qt::CursorShape shape() const;
void setShape(Qt::CursorShape newShape); void setShape(Qt::CursorShape newShape);
#if QT_DEPRECATED_SINCE(5, 15) #if QT_DEPRECATED_SINCE(6, 6)
QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QBitmap by-value") QBitmap bitmap(Qt::ReturnByValueConstant) const { return bitmap(); }
const QBitmap *bitmap() const; // ### Qt 7: Remove function QBitmap mask(Qt::ReturnByValueConstant) const { return mask(); }
#endif // QT_DEPRECATED_SINCE(6, 6)
QBitmap bitmap() const;
QBitmap mask() const;
QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QBitmap by-value")
const QBitmap *mask() const; // ### Qt 7: Remove function
QBitmap bitmap(Qt::ReturnByValueConstant) const;
QBitmap mask(Qt::ReturnByValueConstant) const;
#else
QBitmap bitmap(Qt::ReturnByValueConstant = Qt::ReturnByValue) const; // ### Qt 7: Remove arg
QBitmap mask(Qt::ReturnByValueConstant = Qt::ReturnByValue) const; // ### Qt 7: Remove arg
#endif // QT_DEPRECATED_SINCE(5, 15)
QPixmap pixmap() const; QPixmap pixmap() const;
QPoint hotSpot() const; QPoint hotSpot() const;

View File

@ -287,36 +287,6 @@ Qt::DropAction QDrag::exec(Qt::DropActions supportedActions, Qt::DropAction defa
return d->executed_action; return d->executed_action;
} }
#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
\b{Note:} It is recommended to use exec() instead of this function.
Starts the drag and drop operation and returns a value indicating the requested
drop action when it is completed. The drop actions that the user can choose
from are specified in \a request. Qt::CopyAction is always allowed.
\b{Note:} Although the drag and drop operation can take some time, this function
does not block the event loop. Other events are still delivered to the application
while the operation is performed.
\sa exec()
*/
Qt::DropAction QDrag::start(Qt::DropActions request)
{
Q_D(QDrag);
if (!d->data) {
qWarning("QDrag: No mimedata set before starting the drag");
return d->executed_action;
}
d->supported_actions = request | Qt::CopyAction;
d->default_action = Qt::IgnoreAction;
d->executed_action = QDragManager::self()->drag(this);
return d->executed_action;
}
#endif
/*! /*!
Sets the drag \a cursor for the \a action. This allows you Sets the drag \a cursor for the \a action. This allows you
to override the default native cursors. To revert to using the to override the default native cursors. To revert to using the

View File

@ -74,10 +74,6 @@ public:
QObject *source() const; QObject *source() const;
QObject *target() const; QObject *target() const;
#if QT_DEPRECATED_SINCE(5, 13)
QT_DEPRECATED_X("Use QDrag::exec() instead")
Qt::DropAction start(Qt::DropActions supportedActions = Qt::CopyAction);
#endif
Qt::DropAction exec(Qt::DropActions supportedActions = Qt::MoveAction); Qt::DropAction exec(Qt::DropActions supportedActions = Qt::MoveAction);
Qt::DropAction exec(Qt::DropActions supportedActions, Qt::DropAction defaultAction); Qt::DropAction exec(Qt::DropActions supportedActions, Qt::DropAction defaultAction);

View File

@ -178,10 +178,6 @@ public:
static QKeySequence mnemonic(const QString &text); static QKeySequence mnemonic(const QString &text);
static QList<QKeySequence> keyBindings(StandardKey key); static QList<QKeySequence> keyBindings(StandardKey key);
#if QT_DEPRECATED_SINCE(5, 0)
QT_DEPRECATED operator QString() const { return toString(QKeySequence::NativeText); }
QT_DEPRECATED operator int() const { if (1 <= count()) return operator [](0); return 0; }
#endif
operator QVariant() const; operator QVariant() const;
int operator[](uint i) const; int operator[](uint i) const;
QKeySequence &operator=(const QKeySequence &other); QKeySequence &operator=(const QKeySequence &other);

View File

@ -919,24 +919,6 @@ bool QPalette::isEqual(QPalette::ColorGroup group1, QPalette::ColorGroup group2)
return true; return true;
} }
/*! \fn int QPalette::serialNumber() const
\obsolete
Returns a number that identifies the contents of this QPalette
object. Distinct QPalette objects can only have the same serial
number if they refer to the same contents (but they don't have
to). Also, the serial number of a QPalette may change during the
lifetime of the object.
Use cacheKey() instead.
\warning The serial number doesn't necessarily change when the
palette is altered. This means that it may be dangerous to use it
as a cache key.
\sa operator==()
*/
/*! /*!
Returns a number that identifies the contents of this QPalette Returns a number that identifies the contents of this QPalette
object. Distinct QPalette objects can have the same key if object. Distinct QPalette objects can have the same key if

View File

@ -152,9 +152,6 @@ public:
inline bool operator!=(const QPalette &p) const { return !(operator==(p)); } inline bool operator!=(const QPalette &p) const { return !(operator==(p)); }
bool isCopyOf(const QPalette &p) const; bool isCopyOf(const QPalette &p) const;
#if QT_DEPRECATED_SINCE(5, 0)
QT_DEPRECATED inline int serialNumber() const { return cacheKey() >> 32; }
#endif
qint64 cacheKey() const; qint64 cacheKey() const;
QPalette resolve(const QPalette &other) const; QPalette resolve(const QPalette &other) const;

View File

@ -908,20 +908,6 @@ void QBrush::setTransform(const QTransform &matrix)
} }
#if QT_DEPRECATED_SINCE(5, 15)
/*!
\fn void QBrush::matrix() const
\since 4.2
\obsolete
Use transform() instead.
Returns the current transformation matrix for the brush.
\sa setMatrix()
*/
#endif // QT_DEPRECATED_SINCE(5, 15)
/*! /*!
\fn bool QBrush::operator!=(const QBrush &brush) const \fn bool QBrush::operator!=(const QBrush &brush) const

View File

@ -2870,28 +2870,6 @@ QColor QColor::darker(int factor) const noexcept
return hsv.convertTo(cspec); return hsv.convertTo(cspec);
} }
#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
Use lighter(\a factor) instead.
*/
QColor QColor::light(int factor) const noexcept
{
return lighter(factor);
}
/*!
\obsolete
Use darker(\a factor) instead.
*/
QColor QColor::dark(int factor) const noexcept
{
return darker(factor);
}
#endif
/*! \overload /*! \overload
Assigns a copy of \a color and returns a reference to this color. Assigns a copy of \a color and returns a reference to this color.
*/ */

View File

@ -215,12 +215,6 @@ public:
static QColor fromHsl(int h, int s, int l, int a = 255); static QColor fromHsl(int h, int s, int l, int a = 255);
static QColor fromHslF(qreal h, qreal s, qreal l, qreal a = 1.0); static QColor fromHslF(qreal h, qreal s, qreal l, qreal a = 1.0);
#if QT_DEPRECATED_SINCE(5, 13)
QT_DEPRECATED_X("Use QColor::lighter() instead")
Q_REQUIRED_RESULT QColor light(int f = 150) const noexcept;
QT_DEPRECATED_X("Use QColor::darker() instead")
Q_REQUIRED_RESULT QColor dark(int f = 200) const noexcept;
#endif
Q_REQUIRED_RESULT QColor lighter(int f = 150) const noexcept; Q_REQUIRED_RESULT QColor lighter(int f = 150) const noexcept;
Q_REQUIRED_RESULT QColor darker(int f = 200) const noexcept; Q_REQUIRED_RESULT QColor darker(int f = 200) const noexcept;

View File

@ -429,9 +429,6 @@ QDebug operator<<(QDebug s, const QRegion &r)
\sa united(), operator+() \sa united(), operator+()
*/ */
#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
const
#endif
QRegion QRegion::operator|(const QRegion &r) const QRegion QRegion::operator|(const QRegion &r) const
{ return united(r); } { return united(r); }
@ -441,9 +438,6 @@ QRegion QRegion::operator|(const QRegion &r) const
\sa united(), operator|() \sa united(), operator|()
*/ */
#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
const
#endif
QRegion QRegion::operator+(const QRegion &r) const QRegion QRegion::operator+(const QRegion &r) const
{ return united(r); } { return united(r); }
@ -451,9 +445,6 @@ QRegion QRegion::operator+(const QRegion &r) const
\overload \overload
\since 4.4 \since 4.4
*/ */
#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
const
#endif
QRegion QRegion::operator+(const QRect &r) const QRegion QRegion::operator+(const QRect &r) const
{ return united(r); } { return united(r); }
@ -463,9 +454,6 @@ QRegion QRegion::operator+(const QRect &r) const
\sa intersected() \sa intersected()
*/ */
#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
const
#endif
QRegion QRegion::operator&(const QRegion &r) const QRegion QRegion::operator&(const QRegion &r) const
{ return intersected(r); } { return intersected(r); }
@ -473,9 +461,6 @@ QRegion QRegion::operator&(const QRegion &r) const
\overload \overload
\since 4.4 \since 4.4
*/ */
#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
const
#endif
QRegion QRegion::operator&(const QRect &r) const QRegion QRegion::operator&(const QRect &r) const
{ {
return intersected(r); return intersected(r);
@ -487,9 +472,6 @@ QRegion QRegion::operator&(const QRect &r) const
\sa subtracted() \sa subtracted()
*/ */
#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
const
#endif
QRegion QRegion::operator-(const QRegion &r) const QRegion QRegion::operator-(const QRegion &r) const
{ return subtracted(r); } { return subtracted(r); }
@ -499,9 +481,6 @@ QRegion QRegion::operator-(const QRegion &r) const
\sa xored() \sa xored()
*/ */
#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
const
#endif
QRegion QRegion::operator^(const QRegion &r) const QRegion QRegion::operator^(const QRegion &r) const
{ return xored(r); } { return xored(r); }
@ -743,21 +722,6 @@ QRegion QRegion::intersect(const QRect &r) const
returns \c false. returns \c false.
*/ */
/*!
\fn QRegion QRegion::unite(const QRegion &r) const
\obsolete
Use united(\a r) instead.
*/
/*!
\fn QRegion QRegion::unite(const QRect &rect) const
\since 4.4
\obsolete
Use united(\a rect) instead.
*/
/*! /*!
\fn QRegion QRegion::united(const QRect &rect) const \fn QRegion QRegion::united(const QRect &rect) const
\since 4.4 \since 4.4
@ -780,21 +744,6 @@ QRegion QRegion::intersect(const QRect &r) const
\sa intersected(), subtracted(), xored() \sa intersected(), subtracted(), xored()
*/ */
/*!
\fn QRegion QRegion::intersect(const QRegion &r) const
\obsolete
Use intersected(\a r) instead.
*/
/*!
\fn QRegion QRegion::intersect(const QRect &rect) const
\since 4.4
\obsolete
Use intersected(\a rect) instead.
*/
/*! /*!
\fn QRegion QRegion::intersected(const QRect &rect) const \fn QRegion QRegion::intersected(const QRect &rect) const
\since 4.4 \since 4.4
@ -817,13 +766,6 @@ QRegion QRegion::intersect(const QRect &r) const
\sa subtracted(), united(), xored() \sa subtracted(), united(), xored()
*/ */
/*!
\fn QRegion QRegion::subtract(const QRegion &r) const
\obsolete
Use subtracted(\a r) instead.
*/
/*! /*!
\fn QRegion QRegion::subtracted(const QRegion &r) const \fn QRegion QRegion::subtracted(const QRegion &r) const
\since 4.2 \since 4.2
@ -838,13 +780,6 @@ QRegion QRegion::intersect(const QRect &r) const
\sa intersected(), united(), xored() \sa intersected(), united(), xored()
*/ */
/*!
\fn QRegion QRegion::eor(const QRegion &r) const
\obsolete
Use xored(\a r) instead.
*/
/*! /*!
\fn QRegion QRegion::xored(const QRegion &r) const \fn QRegion QRegion::xored(const QRegion &r) const
\since 4.2 \since 4.2
@ -866,20 +801,6 @@ QRegion QRegion::intersect(const QRect &r) const
gives a rectangle that is QRect::isNull(). gives a rectangle that is QRect::isNull().
*/ */
#if QT_DEPRECATED_SINCE(5, 11)
/*!
\fn QVector<QRect> QRegion::rects() const
\obsolete
Use begin() and end() instead.
Returns an array of non-overlapping rectangles that make up the
region.
The union of all the rectangles is equal to the original region.
*/
#endif
/*! /*!
\typedef QRegion::const_iterator \typedef QRegion::const_iterator
\since 5.8 \since 5.8
@ -4312,20 +4233,6 @@ bool qt_region_strictContains(const QRegion &region, const QRect &rect)
&& rect.top() >= r1.top() && rect.bottom() <= r1.bottom()); && rect.top() >= r1.top() && rect.bottom() <= r1.bottom());
} }
#if QT_DEPRECATED_SINCE(5, 11)
QVector<QRect> QRegion::rects() const
{
if (d->qt_rgn) {
d->qt_rgn->vectorize();
d->qt_rgn->rects.reserve(d->qt_rgn->numRects);
d->qt_rgn->rects.resize(d->qt_rgn->numRects);
return d->qt_rgn->rects;
} else {
return QVector<QRect>();
}
}
#endif
QRegion::const_iterator QRegion::begin() const noexcept QRegion::const_iterator QRegion::begin() const noexcept
{ {
return d->qt_rgn ? d->qt_rgn->begin() : nullptr; return d->qt_rgn ? d->qt_rgn->begin() : nullptr;

View File

@ -107,35 +107,13 @@ public:
Q_REQUIRED_RESULT QRegion subtracted(const QRegion &r) const; Q_REQUIRED_RESULT QRegion subtracted(const QRegion &r) const;
Q_REQUIRED_RESULT QRegion xored(const QRegion &r) const; Q_REQUIRED_RESULT QRegion xored(const QRegion &r) const;
#if QT_DEPRECATED_SINCE(5, 0)
Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion unite(const QRegion &r) const { return united(r); }
Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion unite(const QRect &r) const { return united(r); }
Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion intersect(const QRegion &r) const { return intersected(r); }
Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion intersect(const QRect &r) const { return intersected(r); }
Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion subtract(const QRegion &r) const { return subtracted(r); }
Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion eor(const QRegion &r) const { return xored(r); }
#endif
bool intersects(const QRegion &r) const; bool intersects(const QRegion &r) const;
bool intersects(const QRect &r) const; bool intersects(const QRect &r) const;
QRect boundingRect() const noexcept; QRect boundingRect() const noexcept;
#if QT_DEPRECATED_SINCE(5, 11)
QT_DEPRECATED_X("Use begin()/end() instead")
QVector<QRect> rects() const;
#endif
void setRects(const QRect *rect, int num); void setRects(const QRect *rect, int num);
int rectCount() const noexcept; int rectCount() const noexcept;
#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
// ### Qt 6: remove these, they're kept for MSVC compat
const QRegion operator|(const QRegion &r) const;
const QRegion operator+(const QRegion &r) const;
const QRegion operator+(const QRect &r) const;
const QRegion operator&(const QRegion &r) const;
const QRegion operator&(const QRect &r) const;
const QRegion operator-(const QRegion &r) const;
const QRegion operator^(const QRegion &r) const;
#else
QRegion operator|(const QRegion &r) const; QRegion operator|(const QRegion &r) const;
QRegion operator+(const QRegion &r) const; QRegion operator+(const QRegion &r) const;
QRegion operator+(const QRect &r) const; QRegion operator+(const QRect &r) const;
@ -143,7 +121,7 @@ public:
QRegion operator&(const QRect &r) const; QRegion operator&(const QRect &r) const;
QRegion operator-(const QRegion &r) const; QRegion operator-(const QRegion &r) const;
QRegion operator^(const QRegion &r) const; QRegion operator^(const QRegion &r) const;
#endif // Q_COMPILER_MANGLES_RETURN_TYPE
QRegion& operator|=(const QRegion &r); QRegion& operator|=(const QRegion &r);
QRegion& operator+=(const QRegion &r); QRegion& operator+=(const QRegion &r);
QRegion& operator+=(const QRect &r); QRegion& operator+=(const QRect &r);

View File

@ -2471,27 +2471,6 @@ bool QFontDatabase::removeAllApplicationFonts()
return true; return true;
} }
/*!
\fn bool QFontDatabase::supportsThreadedFontRendering()
\since 4.4
\deprecated
Returns \c true if font rendering is supported outside the GUI
thread, false otherwise. In other words, a return value of false
means that all QPainter::drawText() calls outside the GUI thread
will not produce readable output.
As of 5.0, always returns \c true.
\sa {Thread-Support in Qt Modules#Painting In Threads}{Painting In Threads}
*/
#if QT_DEPRECATED_SINCE(5, 2)
bool QFontDatabase::supportsThreadedFontRendering()
{
return true;
}
#endif
/*! /*!
\internal \internal
*/ */

View File

@ -149,10 +149,6 @@ public:
static bool removeApplicationFont(int id); static bool removeApplicationFont(int id);
static bool removeAllApplicationFonts(); static bool removeAllApplicationFonts();
#if QT_DEPRECATED_SINCE(5, 2)
QT_DEPRECATED static bool supportsThreadedFontRendering();
#endif
static QFont systemFont(SystemFont type); static QFont systemFont(SystemFont type);
private: private:

View File

@ -308,18 +308,6 @@ void tst_QStandardItem::getSetFlags()
item.setCheckState(Qt::Checked); item.setCheckState(Qt::Checked);
item.setCheckable(true); item.setCheckable(true);
QCOMPARE(item.checkState(), Qt::Checked); QCOMPARE(item.checkState(), Qt::Checked);
#if QT_DEPRECATED_SINCE(5, 6)
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
// deprecated API
item.setTristate(true);
QVERIFY(item.isTristate());
QVERIFY(item.flags() & Qt::ItemIsTristate);
item.setTristate(false);
QVERIFY(!(item.flags() & Qt::ItemIsTristate));
QT_WARNING_POP
#endif
} }
void tst_QStandardItem::getSetRowAndColumnCount() void tst_QStandardItem::getSetRowAndColumnCount()

View File

@ -72,13 +72,6 @@ void tst_QDrag::getSetCheck()
QCOMPARE(result, Qt::IgnoreAction); QCOMPARE(result, Qt::IgnoreAction);
result = obj1.exec(Qt::MoveAction | Qt::LinkAction); result = obj1.exec(Qt::MoveAction | Qt::LinkAction);
QCOMPARE(result, Qt::IgnoreAction); QCOMPARE(result, Qt::IgnoreAction);
#if QT_DEPRECATED_SINCE(5, 13)
result = obj1.start();
QCOMPARE(result, Qt::IgnoreAction);
result = obj1.start(Qt::MoveAction | Qt::LinkAction);
QCOMPARE(result, Qt::IgnoreAction);
#endif
} }
QTEST_MAIN(tst_QDrag) QTEST_MAIN(tst_QDrag)

View File

@ -155,19 +155,12 @@ void tst_QRegion::rects()
QRegion region(rect); QRegion region(rect);
QVERIFY(region.isEmpty()); QVERIFY(region.isEmpty());
QCOMPARE(region.begin(), region.end()); QCOMPARE(region.begin(), region.end());
#if QT_DEPRECATED_SINCE(5, 11)
QVERIFY(region.rects().isEmpty());
#endif
} }
{ {
QRect rect(10, -20, 30, 40); QRect rect(10, -20, 30, 40);
QRegion region(rect); QRegion region(rect);
QCOMPARE(region.end(), region.begin() + 1); QCOMPARE(region.end(), region.begin() + 1);
QCOMPARE(*region.begin(), rect); QCOMPARE(*region.begin(), rect);
#if QT_DEPRECATED_SINCE(5, 11)
QCOMPARE(region.rects().count(), 1);
QCOMPARE(region.rects()[0], rect);
#endif
} }
{ {
QRect r(QPoint(10, 10), QPoint(40, 40)); QRect r(QPoint(10, 10), QPoint(40, 40));
@ -214,9 +207,6 @@ void tst_QRegion::setRects()
QCOMPARE(region, QRegion()); QCOMPARE(region, QRegion());
QCOMPARE(region.begin(), region.end()); QCOMPARE(region.begin(), region.end());
QVERIFY(!region.boundingRect().isValid()); QVERIFY(!region.boundingRect().isValid());
#if QT_DEPRECATED_SINCE(5, 11)
QVERIFY(region.rects().isEmpty());
#endif
} }
{ {
QRegion region; QRegion region;
@ -224,19 +214,12 @@ void tst_QRegion::setRects()
region.setRects(&rect, 1); region.setRects(&rect, 1);
QCOMPARE(region.begin(), region.end()); QCOMPARE(region.begin(), region.end());
QVERIFY(!region.boundingRect().isValid()); QVERIFY(!region.boundingRect().isValid());
#if QT_DEPRECATED_SINCE(5, 11)
QVERIFY(region.rects().isEmpty());
#endif
} }
{ {
QRegion region; QRegion region;
QRect rect(10, -20, 30, 40); QRect rect(10, -20, 30, 40);
region.setRects(&rect, 1); region.setRects(&rect, 1);
QCOMPARE(region.end(), region.begin() + 1); QCOMPARE(region.end(), region.begin() + 1);
#if QT_DEPRECATED_SINCE(5, 11)
QCOMPARE(region.rects().count(), 1);
QCOMPARE(region.rects()[0], rect);
#endif
QCOMPARE(*region.begin(), rect); QCOMPARE(*region.begin(), rect);
} }
} }
@ -355,9 +338,6 @@ void tst_QRegion::emptyPolygonRegion()
std::copy(r.begin(), r.end(), std::back_inserter(rects)); std::copy(r.begin(), r.end(), std::back_inserter(rects));
QTEST(rects.size(), "numRects"); QTEST(rects.size(), "numRects");
QTEST(rects, "rects"); QTEST(rects, "rects");
#if QT_DEPRECATED_SINCE(5, 11)
QCOMPARE(r.rects(), rects);
#endif
} }
@ -900,9 +880,6 @@ void tst_QRegion::isEmpty()
QCOMPARE(region, QRegion()); QCOMPARE(region, QRegion());
QCOMPARE(region.rectCount(), 0); QCOMPARE(region.rectCount(), 0);
QCOMPARE(region.boundingRect(), QRect()); QCOMPARE(region.boundingRect(), QRect());
#if QT_DEPRECATED_SINCE(5, 11)
QVERIFY(region.rects().isEmpty());
#endif
} }
void tst_QRegion::regionFromPath() void tst_QRegion::regionFromPath()
@ -918,12 +895,6 @@ void tst_QRegion::regionFromPath()
QCOMPARE(rgn.begin()[0], QRect(0, 0, 10, 10)); QCOMPARE(rgn.begin()[0], QRect(0, 0, 10, 10));
QCOMPARE(rgn.begin()[1], QRect(0, 100, 100, 1000)); QCOMPARE(rgn.begin()[1], QRect(0, 100, 100, 1000));
#if QT_DEPRECATED_SINCE(5, 11)
QCOMPARE(rgn.rects().size(), 2);
QCOMPARE(rgn.rects().at(0), QRect(0, 0, 10, 10));
QCOMPARE(rgn.rects().at(1), QRect(0, 100, 100, 1000));
#endif
QCOMPARE(rgn.boundingRect(), QRect(0, 0, 100, 1100)); QCOMPARE(rgn.boundingRect(), QRect(0, 0, 100, 1100));
} }
@ -940,14 +911,6 @@ void tst_QRegion::regionFromPath()
QCOMPARE(rgn.begin()[2], QRect(90, 10, 10, 80)); QCOMPARE(rgn.begin()[2], QRect(90, 10, 10, 80));
QCOMPARE(rgn.begin()[3], QRect(0, 90, 100, 10)); QCOMPARE(rgn.begin()[3], QRect(0, 90, 100, 10));
#if QT_DEPRECATED_SINCE(5, 11)
QCOMPARE(rgn.rects().size(), 4);
QCOMPARE(rgn.rects().at(0), QRect(0, 0, 100, 10));
QCOMPARE(rgn.rects().at(1), QRect(0, 10, 10, 80));
QCOMPARE(rgn.rects().at(2), QRect(90, 10, 10, 80));
QCOMPARE(rgn.rects().at(3), QRect(0, 90, 100, 10));
#endif
QCOMPARE(rgn.boundingRect(), QRect(0, 0, 100, 100)); QCOMPARE(rgn.boundingRect(), QRect(0, 0, 100, 100));
} }
} }