diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-06-04 13:21:08 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-06-06 17:19:02 +0200 |
commit | 3615a5813af10c123069a0c3b16dc66d4416fd1c (patch) | |
tree | 256fd34db5cbb44b2e58beec4579b00f0cf821a2 /src | |
parent | ccbf6ae0bbddff0001c7810934c8f15a8f50c2bb (diff) |
Remove unused function pointers in QVariant::Handler
Task-number: QTBUG-84635
Change-Id: Icfbd1aae26b0453426d93e0af64d84d6403b8e3b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 15 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.h | 10 | ||||
-rw-r--r-- | src/gui/kernel/qguivariant.cpp | 7 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetsvariant.cpp | 7 |
4 files changed, 2 insertions, 37 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 25b101d5e3..496c318fef 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -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 diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 1f79bdfd89..2f21ef418f 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -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; }; diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp index e0e0d11ae3..565e91d662 100644 --- a/src/gui/kernel/qguivariant.cpp +++ b/src/gui/kernel/qguivariant.cpp @@ -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 }; diff --git a/src/widgets/kernel/qwidgetsvariant.cpp b/src/widgets/kernel/qwidgetsvariant.cpp index 45a3bb3f7a..15a48bf683 100644 --- a/src/widgets/kernel/qwidgetsvariant.cpp +++ b/src/widgets/kernel/qwidgetsvariant.cpp @@ -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 }; |