mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
Work arount for QVariant not converting to QVariant
This commit is contained in:
parent
578ab1a9f2
commit
e4591e0d03
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,8 @@
|
|||
#ifndef hifi_SettingHandle_h
|
||||
#define hifi_SettingHandle_h
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <QSettings>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
|
@ -57,7 +59,7 @@ namespace Setting {
|
|||
|
||||
template <typename T>
|
||||
void Handle<T>::setVariant(const QVariant& variant) {
|
||||
if (variant.canConvert<T>()) {
|
||||
if (variant.canConvert<T>() || std::is_same<T, QVariant>::value) {
|
||||
set(variant.value<T>());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue