Details
-
Suggestion
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.3.1
-
None
Description
QMetaType::type returns 0 for unregistered types, whereas 0 is considered a default-type by QMetaType::isRegistered. A -1 return value from QMetaType::type would be more in line with the rest of Qt.
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
if (!QMetaType::isRegistered(QMetaType::type("QList<double>")))
{ qRegisterMetaType< QList<double> >("QList<double>"); } Q_ASSERT("queued connection with QList<double> parameter");
}
Update:
Such a change cannot be done until Qt 5 due to compabitility reasons.