summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/network/torrent/connectionmanager.cpp2
-rw-r--r--examples/opengl/qopenglwindow/background_renderer.cpp2
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/network/torrent/connectionmanager.cpp b/examples/network/torrent/connectionmanager.cpp
index acab59b0e3..87b7a16e28 100644
--- a/examples/network/torrent/connectionmanager.cpp
+++ b/examples/network/torrent/connectionmanager.cpp
@@ -88,7 +88,7 @@ QByteArray ConnectionManager::clientId() const
// Generate peer id
qint64 startupTime = QDateTime::currentSecsSinceEpoch();
- id += QString::asprintf("-QT%04x-", (QT_VERSION % 0xffff00) >> 8).toLatin1();
+ id += QString::asprintf("-QT%04x-", QT_VERSION >> 8).toLatin1();
id += QByteArray::number(startupTime, 10);
id += QByteArray(20 - id.size(), '-');
}
diff --git a/examples/opengl/qopenglwindow/background_renderer.cpp b/examples/opengl/qopenglwindow/background_renderer.cpp
index 296044a35a..d57198444e 100644
--- a/examples/opengl/qopenglwindow/background_renderer.cpp
+++ b/examples/opengl/qopenglwindow/background_renderer.cpp
@@ -180,7 +180,7 @@ void FragmentToy::draw(const QSize &windowSize)
m_program->enableAttributeArray("vertexCoord");
m_vertex_buffer.release();
- m_program->setUniformValue("currentTime", (uint) QDateTime::currentDateTime().toMSecsSinceEpoch());
+ m_program->setUniformValue("currentTime", (uint) QDateTime::currentMSecsSinceEpoch());
m_program->setUniformValue("windowSize", windowSize);
QOpenGLContext::currentContext()->functions()->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
diff --git a/examples/widgets/painting/pathstroke/pathstroke.cpp b/examples/widgets/painting/pathstroke/pathstroke.cpp
index 185238c351..dc10457d27 100644
--- a/examples/widgets/painting/pathstroke/pathstroke.cpp
+++ b/examples/widgets/painting/pathstroke/pathstroke.cpp
@@ -494,7 +494,7 @@ void PathStrokeRenderer::initializePoints()
m_vectors.clear();
QMatrix m;
- qreal rot = 360 / count;
+ qreal rot = 360.0 / count;
QPointF center(width() / 2, height() / 2);
QMatrix vm;
vm.shear(2, -1);