From 85bb44539aed47856b24ac131f10eb550a080f97 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 20 Jun 2017 16:16:51 +0200 Subject: Fix GCC 7 warnings in examples plugin.cpp: In member function 'virtual void MinuteTimer::timerEvent(QTimerEvent*)': plugin.cpp:85:28: warning: ignoring return value of 'QTime QTime::addSecs(int) const', declared with attribute nodiscard [-Wunused-result] time.addSecs(60); main.cpp: In function 'int qMain(int, char**)': main.cpp:71:1: warning: no return statement in function returning non-void [-Wreturn-type] Task-number: QTBUG-60630 Change-Id: I0c0002533aa28c480a4d9eb45856dd10753d2476 Reviewed-by: Shawn Rutledge --- examples/qml/qmlextensionplugins/plugin.cpp | 2 +- examples/quick/scenegraph/customgeometry/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/qml/qmlextensionplugins/plugin.cpp b/examples/qml/qmlextensionplugins/plugin.cpp index e04cfa57d8..8e016b8ae5 100644 --- a/examples/qml/qmlextensionplugins/plugin.cpp +++ b/examples/qml/qmlextensionplugins/plugin.cpp @@ -82,7 +82,7 @@ protected: QTime now = QTime::currentTime(); if (now.second() == 59 && now.minute() == time.minute() && now.hour() == time.hour()) { // just missed time tick over, force it, wait extra 0.5 seconds - time.addSecs(60); + time = time.addSecs(60); timer.start(60500, this); } else { time = now; diff --git a/examples/quick/scenegraph/customgeometry/main.cpp b/examples/quick/scenegraph/customgeometry/main.cpp index bbbbf64c4c..6f3c24e87b 100644 --- a/examples/quick/scenegraph/customgeometry/main.cpp +++ b/examples/quick/scenegraph/customgeometry/main.cpp @@ -67,6 +67,6 @@ int main(int argc, char **argv) view.setSource(QUrl("qrc:///scenegraph/customgeometry/main.qml")); view.show(); - app.exec(); + return app.exec(); } //! [1] -- cgit v1.2.3