Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.9.2
-
None
Description
Following code (mode is Debug, so Q_ASSERT is not no-op) works fine, but should not:
struct UrlInterceptor : QQmlAbstractUrlInterceptor { QUrl intercept(const QUrl & url, DataType type) Q_DECL_OVERRIDE { Q_UNUSED(type); return url; } }; // main: QQmlApplicationEngine engine; QPointer qmlFileSelector = QQmlFileSelector::get(&engine); Q_CHECK_PTR(qmlFileSelector); engine.setUrlInterceptor(new (std::nothrow) UrlInterceptor); Q_CHECK_PTR(qmlFileSelector); Q_ASSERT(!QQmlFileSelector::get(&engine)); // !!!
Compiler is GCC 7.2.0 (CMAKE_CXX_STANDARD 17), system - Ubuntu 16.04.3.