File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -139,26 +139,26 @@ class DspConfig :
139139 auto variant = _conf->getVariant (skey, true , exists);
140140
141141 if constexpr (std::is_same_v<T, QVariant>) {
142- return variant;
142+ return (T)( variant) ;
143143 }
144144 if constexpr (std::is_same_v<T, std::string>) {
145- return variant.toString ().toStdString ();
145+ return (T)( variant.toString ().toStdString () );
146146 }
147147 if constexpr (std::is_same_v<T, QString>) {
148- return variant.toString ();
148+ return (T)( variant.toString () );
149149 }
150150 if constexpr (std::is_same_v<T, int >) {
151- return variant.toInt ();
151+ return (T)( variant.toInt () );
152152 }
153153 if constexpr (std::is_same_v<T, float >) {
154- return variant.toFloat ();
154+ return (T)( variant.toFloat () );
155155 }
156156 if constexpr (std::is_same_v<T, bool >) {
157- return variant.toBool ();
157+ return (T)( variant.toBool () );
158158 }
159159
160160 Log::error (" DspConfig::get<T>: Unknown type T" );
161- return 0 ;
161+ throw new std::exception ;
162162 }
163163
164164 Type type (const Key &key)
You can’t perform that action at this time.
0 commit comments