ricardodovalle
7th April 2014, 21:44
This warning only show when i attributed the false value.
At windows:
C:\Users\ricardo\Documents\Thorx\workspace\thx6\2\ src\app\main.cpp:88: warning: converting 'false' to pointer type for argument 2 of 'void QQmlContext::setContextProperty(const QString&, QObject*)' [-Wconversion-null]
engine.rootContext()->setContextProperty("QT_DEBUG", false);
At OSX:
/Users/ricardo/Thorx/workspace/thx6/2/src/app/main.cpp:88: warning: initialization of pointer of type 'QObject *' to null from a constant boolean expression [-Wbool-conversion]
engine.rootContext()->setContextProperty("QT_DEBUG", false);
Source code
QQmlApplicationEngine engine;
#ifdef QT_DEBUG
engine.rootContext()->setContextProperty("QT_DEBUG", true);
#else
engine.rootContext()->setContextProperty("QT_DEBUG", false);
#endif
Thanks.
At windows:
C:\Users\ricardo\Documents\Thorx\workspace\thx6\2\ src\app\main.cpp:88: warning: converting 'false' to pointer type for argument 2 of 'void QQmlContext::setContextProperty(const QString&, QObject*)' [-Wconversion-null]
engine.rootContext()->setContextProperty("QT_DEBUG", false);
At OSX:
/Users/ricardo/Thorx/workspace/thx6/2/src/app/main.cpp:88: warning: initialization of pointer of type 'QObject *' to null from a constant boolean expression [-Wbool-conversion]
engine.rootContext()->setContextProperty("QT_DEBUG", false);
Source code
QQmlApplicationEngine engine;
#ifdef QT_DEBUG
engine.rootContext()->setContextProperty("QT_DEBUG", true);
#else
engine.rootContext()->setContextProperty("QT_DEBUG", false);
#endif
Thanks.