Make sure that unknown types use the handler for unknown types.

This fixes an assert in the QVariant checkDataStream unit test when
it no longer links to QtGui.

Change-Id: Ib45139cf790f3ac6ee80e1c59f50d08d0b51ffa4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
bb10
Stephen Kelly 2012-07-24 12:34:33 +02:00 committed by Qt by Nokia
parent 80cd5d2017
commit f9db44ad15
1 changed files with 2 additions and 2 deletions

View File

@ -64,9 +64,9 @@ static inline int moduleForType(const uint typeId)
{
if (typeId <= QMetaType::LastCoreType)
return Core;
if (typeId <= QMetaType::LastGuiType)
if (typeId >= QMetaType::FirstGuiType && typeId <= QMetaType::LastGuiType)
return Gui;
if (typeId <= QMetaType::LastWidgetsType)
if (typeId >= QMetaType::FirstWidgetsType && typeId <= QMetaType::LastWidgetsType)
return Widgets;
return Unknown;
}