5 * Roland Knall <rknall@gmail.com>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
14 #ifndef UI_QT_VARIANT_POINTER_H_
15 #define UI_QT_VARIANT_POINTER_H_
19 template <typename T
> class VariantPointer
23 static T
* asPtr(QVariant v
)
25 return (T
*) v
.value
<void *>();
28 static QVariant
asQVariant(T
* ptr
)
30 return QVariant::fromValue((void *) ptr
);
34 #endif /* UI_QT_VARIANT_POINTER_H_ */