diff options
author | Jake Petroules <jake.petroules@qt.io> | 2018-02-01 10:23:53 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2018-02-07 20:00:22 +0000 |
commit | 3343295d808edfb7e6010b95eecb8398f2207cde (patch) | |
tree | 47ec893c0c24d51f0b36b3a9308c0de214f537c2 /examples/widgets | |
parent | 5f058a73c8d29bd7cdb98f9efad0ce711bddaf6b (diff) |
Fix a bunch of compiler warnings in the qtbase examples
Change-Id: Id0c615aa72d4f4c5941cfa5ca258c3114694ef67
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'examples/widgets')
5 files changed, 5 insertions, 3 deletions
diff --git a/examples/widgets/graphicsview/boxes/glextensions.h b/examples/widgets/graphicsview/boxes/glextensions.h index ac73e61641..9b1724805d 100644 --- a/examples/widgets/graphicsview/boxes/glextensions.h +++ b/examples/widgets/graphicsview/boxes/glextensions.h @@ -81,6 +81,7 @@ glUnmapBuffer #ifndef Q_OS_MAC # ifndef APIENTRYP # ifdef APIENTRY +# undef APIENTRYP # define APIENTRYP APIENTRY * # else # define APIENTRY diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp index 4259aab803..cfee96050d 100644 --- a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp +++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp @@ -174,7 +174,7 @@ void GraphWidget::timerEvent(QTimerEvent *event) bool itemsMoved = false; foreach (Node *node, nodes) { - if (node->advance()) + if (node->advanceNext()) itemsMoved = true; } diff --git a/examples/widgets/graphicsview/elasticnodes/node.cpp b/examples/widgets/graphicsview/elasticnodes/node.cpp index 94df45524a..fb7f7b92da 100644 --- a/examples/widgets/graphicsview/elasticnodes/node.cpp +++ b/examples/widgets/graphicsview/elasticnodes/node.cpp @@ -138,7 +138,7 @@ void Node::calculateForces() //! [6] //! [7] -bool Node::advance() +bool Node::advanceNext() { if (newPos == pos()) return false; diff --git a/examples/widgets/graphicsview/elasticnodes/node.h b/examples/widgets/graphicsview/elasticnodes/node.h index 487ae0d68e..cd2ca84194 100644 --- a/examples/widgets/graphicsview/elasticnodes/node.h +++ b/examples/widgets/graphicsview/elasticnodes/node.h @@ -73,7 +73,7 @@ public: int type() const override { return Type; } void calculateForces(); - bool advance(); + bool advanceNext(); QRectF boundingRect() const override; QPainterPath shape() const override; diff --git a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp index b2c5ccc473..931bee2d31 100644 --- a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp +++ b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp @@ -97,6 +97,7 @@ MainWindow::MainWindow(const CustomSizeHintMap &customSizeHints, QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags) { + Q_UNUSED(message); setObjectName("MainWindow"); setWindowTitle("Qt Main Window Example"); |