Remove unused function pointers in QVariant::Handler

Task-number: QTBUG-84635
Change-Id: Icfbd1aae26b0453426d93e0af64d84d6403b8e3b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
This commit is contained in:
Lars Knoll 2020-06-04 13:21:08 +02:00
parent ccbf6ae0bb
commit 3615a5813a
4 changed files with 2 additions and 37 deletions

View File

@ -1390,13 +1390,8 @@ static void streamDebug(QDebug dbg, const QVariant &v)
const QVariant::Handler qt_kernel_variant_handler = {
isNull,
#ifndef QT_NO_DATASTREAM
nullptr,
nullptr,
#endif
compare,
convert,
nullptr,
#if !defined(QT_NO_DEBUG_STREAM)
streamDebug
#else
@ -1412,13 +1407,8 @@ static void dummyStreamDebug(QDebug, const QVariant &) { Q_ASSERT_X(false, "QVar
#endif
const QVariant::Handler qt_dummy_variant_handler = {
dummyIsNull,
#ifndef QT_NO_DATASTREAM
nullptr,
nullptr,
#endif
dummyCompare,
dummyConvert,
nullptr,
#if !defined(QT_NO_DEBUG_STREAM)
dummyStreamDebug
#else
@ -1516,13 +1506,8 @@ static void customStreamDebug(QDebug dbg, const QVariant &variant) {
const QVariant::Handler qt_custom_variant_handler = {
customIsNull,
#ifndef QT_NO_DATASTREAM
nullptr,
nullptr,
#endif
customCompare,
customConvert,
nullptr,
#if !defined(QT_NO_DEBUG_STREAM)
customStreamDebug
#else

View File

@ -448,23 +448,13 @@ class Q_CORE_EXPORT QVariant
};
public:
typedef bool (*f_null)(const Private *);
#ifndef QT_NO_DATASTREAM
typedef void (*f_load)(Private *, QDataStream &);
typedef void (*f_save)(const Private *, QDataStream &);
#endif
typedef bool (*f_compare)(const Private *, const Private *);
typedef bool (*f_convert)(const QVariant::Private *d, int t, void *, bool *);
typedef bool (*f_canConvert)(const QVariant::Private *d, int t);
typedef void (*f_debugStream)(QDebug, const QVariant &);
struct Handler {
f_null isNull;
#ifndef QT_NO_DATASTREAM
f_load load;
f_save save;
#endif
f_compare compare;
f_convert convert;
f_canConvert canConvert;
f_debugStream debugStream;
};

View File

@ -306,17 +306,12 @@ static void streamDebug(QDebug dbg, const QVariant &v)
const QVariant::Handler qt_gui_variant_handler = {
isNull,
#ifndef QT_NO_DATASTREAM
nullptr,
nullptr,
#endif
compare,
convert,
nullptr,
#if !defined(QT_NO_DEBUG_STREAM)
streamDebug
#else
0
nullptr
#endif
};

View File

@ -92,17 +92,12 @@ static void streamDebug(QDebug dbg, const QVariant &v)
static const QVariant::Handler widgets_handler = {
isNull,
#ifndef QT_NO_DATASTREAM
nullptr,
nullptr,
#endif
compare,
convert,
nullptr,
#if !defined(QT_NO_DEBUG_STREAM)
streamDebug
#else
0
nullptr
#endif
};