File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -247,9 +247,30 @@ uint qHash( const QVariant &variant )
247
247
case QVariant::Char:
248
248
return qHash ( variant.toChar () );
249
249
case QVariant::List:
250
+
251
+ #if QT_VERSION >= 0x050600
250
252
return qHash ( variant.toList () );
253
+ #else
254
+ {
255
+ QVariantList list = variant.toList ();
256
+ if ( list.isEmpty () )
257
+ return -1 ;
258
+ else
259
+ return qHash ( list.at ( 0 ) );
260
+ }
261
+ #endif
251
262
case QVariant::StringList:
263
+ #if QT_VERSION >= 0x050600
252
264
return qHash ( variant.toStringList () );
265
+ #else
266
+ {
267
+ QStringList list = variant.toStringList ();
268
+ if ( list.isEmpty () )
269
+ return -1 ;
270
+ else
271
+ return qHash ( list.at ( 0 ) );
272
+ }
273
+ #endif
253
274
case QVariant::ByteArray:
254
275
return qHash ( variant.toByteArray () );
255
276
case QVariant::Date:
You can’t perform that action at this time.
0 commit comments