From 7b60947c03416b44abf6d0083dc12cf1fd25df6a Mon Sep 17 00:00:00 2001 From: Itay Grudev Date: Sat, 28 May 2016 00:55:29 +0100 Subject: [PATCH 1/3] Silences an annoying warning warning: field 'm_multiplier' will be initialized after field 'm_dpi' [-Wreorder] : QObject(attachee), m_screen(nullptr), m_window(nullptr), m_multiplier(1), m_dpi(0) --- src/core/units.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/units.cpp b/src/core/units.cpp index 21557180..015a6434 100644 --- a/src/core/units.cpp +++ b/src/core/units.cpp @@ -20,7 +20,7 @@ #define DEFAULT_DPI 72 UnitsAttached::UnitsAttached(QObject *attachee) - : QObject(attachee), m_screen(nullptr), m_window(nullptr), m_multiplier(1), m_dpi(0) + : QObject(attachee), m_screen(nullptr), m_window(nullptr), m_dpi(0), m_multiplier(1) { m_attachee = qobject_cast(attachee); From fcdf16589bbc738f96af57d1939e58b848ef094e Mon Sep 17 00:00:00 2001 From: Itay Grudev Date: Sun, 29 May 2016 16:43:07 +0100 Subject: [PATCH 2/3] Added missing navigation menu icon in the demo As the file was listed in the demo.qrc it caused an error on compilation. --- demo/icons/navigation_menu.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 demo/icons/navigation_menu.svg diff --git a/demo/icons/navigation_menu.svg b/demo/icons/navigation_menu.svg new file mode 100644 index 00000000..6c9b6bf9 --- /dev/null +++ b/demo/icons/navigation_menu.svg @@ -0,0 +1 @@ + \ No newline at end of file From a8d1e1ca3853d3a1d41d89a53e45ceaebef36f13 Mon Sep 17 00:00:00 2001 From: Itay Grudev Date: Sun, 29 May 2016 16:46:09 +0100 Subject: [PATCH 3/3] Fix Material module missing in the demo The Material module was not included in the demo nor were any import paths present. --- demo/demo.pro | 5 +++++ demo/main.cpp | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/demo/demo.pro b/demo/demo.pro index dae52407..058218e4 100644 --- a/demo/demo.pro +++ b/demo/demo.pro @@ -4,3 +4,8 @@ QT += qml quick SOURCES += main.cpp RESOURCES += demo.qrc icons/icons.qrc + +# Include qml-material +OPTIONS += roboto +DEFINES += QPM_INIT +include(../material.pri) diff --git a/demo/main.cpp b/demo/main.cpp index d1e6dc06..3e1b3113 100644 --- a/demo/main.cpp +++ b/demo/main.cpp @@ -5,7 +5,9 @@ int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); - QQmlApplicationEngine engine(QUrl(QStringLiteral("qrc:/main.qml"))); + QQmlApplicationEngine engine; + engine.addImportPath( "qrc:///" ); + engine.load( QUrl( QStringLiteral( "qrc:/main.qml" ) ) ); return app.exec(); }