diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-06-20 16:16:51 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-06-21 06:13:32 +0000 |
commit | 85bb44539aed47856b24ac131f10eb550a080f97 (patch) | |
tree | c9979e9e073dd3d67a558e9c42f3f3ace0d7ceb5 /examples/qml | |
parent | 0e73e58f7e8afc4a31c02fe74ddbb3a6781d8144 (diff) |
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 <shawn.rutledge@qt.io>
Diffstat (limited to 'examples/qml')
-rw-r--r-- | examples/qml/qmlextensionplugins/plugin.cpp | 2 |
1 files changed, 1 insertions, 1 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; |