Commit 45edb590 authored by Jan's avatar Jan

Fixed remaining QElapsedTimer warnings

parent d5fcc1ab
......@@ -226,7 +226,7 @@ Core::init() {
connect(scenegraphCheckTimer_, SIGNAL(timeout()), this, SLOT(checkScenegraphDirty()),Qt::DirectConnection);
// Will measure the time between redraws
redrawTime_ = new QTime();
redrawTime_ = new QElapsedTimer();
redrawTime_->start ();
if ( OpenFlipperSettings().value("Core/Gui/splash",true).toBool() ) {
......
......@@ -928,8 +928,8 @@ private slots:
void stopVideoCapture();
private:
QTimer videoTimer_;
QTime lastVideoTime_;
QTimer videoTimer_;
QElapsedTimer lastVideoTime_;
int captureType_;
......@@ -1472,7 +1472,7 @@ private slots:
QTimer *scenegraphCheckTimer_;
/// Holds the time since last redraw
QTime *redrawTime_;
QElapsedTimer *redrawTime_;
/** @} */
......
......@@ -341,7 +341,7 @@ void Core::loadPlugins()
emit log(LOGOUT,"================================================================================");
QTime time;
QElapsedTimer time;
time.start();
......
......@@ -793,7 +793,7 @@ void QtBaseViewer::updateGL()
void QtBaseViewer::drawScene()
{
QTime timer;
QElapsedTimer timer;
timer.start();
......
......@@ -76,7 +76,7 @@
#include <QString>
#include <QMenu>
#include <QToolBar>
#include <QTime>
#include <QElapsedTimer>
#include <vector>
#include <string>
......@@ -89,7 +89,7 @@ class QPushButton;
class QToolButton;
class QStatusBar;
class QSplitter;
class QTimer;
class QElapsedTimer;
class QImage;
class QSocketNotifier;
class QGraphicsWidget;
......@@ -906,7 +906,7 @@ private:
std::vector< QAction * > drawMenuActions_;
// Used to calculate the time passed between redraws
QTime redrawTime_;
QElapsedTimer redrawTime_;
//===========================================================================
/** @name view handling
......
......@@ -402,7 +402,7 @@ bool QtExaminerViewer::mapToSphere(const QPoint& _v2D, Vec3d& _v3D) const
void QtExaminerViewer::slotAnimation()
{
QTime t;
QElapsedTimer t;
t.start();
makeCurrent();
rotate( lastRotationAxis_, lastRotationAngle_ );
......
......@@ -58,6 +58,7 @@
#include "QtBaseViewer.hh"
#include <QElapsedTimer>
#include <QTime>
#include <QMouseEvent>
#include <QWheelEvent>
......@@ -160,7 +161,7 @@ private:
// animation stuff
Vec3d lastRotationAxis_;
double lastRotationAngle_;
QTime lastMoveTime_;
QElapsedTimer lastMoveTime_;
QTimer* timer_;
};
......
......@@ -174,7 +174,7 @@ glViewer::glViewer( QGraphicsScene* _scene,
sp.setVerticalStretch( 1 );
setSizePolicy( sp );
redrawTime_.start ();
redrawTime_.start();
// timer for animation
timer_ = new QTimer( this );
......@@ -543,7 +543,7 @@ void glViewer::drawScene(double _aspect)
// Inside the glWidget rendering, the system should not send extra updates
properties_.blockSignals(true);
QTime timer;
QElapsedTimer timer;
timer.start();
// *****************************************************************
......@@ -1595,7 +1595,7 @@ void glViewer::mousePressEvent(QGraphicsSceneMouseEvent* _e)
if (clickTimer_.isActive ())
{
clickTime_ = QTime ();
clickTime_.invalidate();
clickTimer_.stop ();
}
else
......@@ -1720,9 +1720,9 @@ void glViewer::mouseReleaseEvent(QGraphicsSceneMouseEvent* _e)
case Viewer::ExamineMode:
viewMouseEvent(&me);
if (!clickTime_.isNull ())
if (clickTime_.isValid())
{
int elapsed = clickTime_.elapsed ();
int elapsed = clickTime_.elapsed();
QPoint diff = clickEvent_.pos () - me.pos ();
if (abs (diff.x ()) <= 1 && abs (diff.y ()) <= 1 && elapsed <= QApplication::doubleClickInterval () / 2)
......@@ -1733,7 +1733,7 @@ void glViewer::mouseReleaseEvent(QGraphicsSceneMouseEvent* _e)
}
else
{
clickTime_ = QTime ();
clickTime_.invalidate();
clickTimer_.stop ();
}
}
......
......@@ -76,6 +76,7 @@
#include <QTimer>
#include <QMouseEvent>
#include <QTime>
#include <QElapsedTimer>
//== FORWARDDECLARATIONS ======================================================
......@@ -618,7 +619,7 @@ private:
std::vector< QAction * > drawMenuActions_;
// Used to calculate the time passed between redraws
QTime redrawTime_;
QElapsedTimer redrawTime_;
// Default VAO needed in core profile mode
ACG::VertexArrayObject defaultVAO_;
......@@ -955,12 +956,12 @@ private:
ACG::Vec3d lastRotationAxis_;
ACG::Vec3d constrainedRotationAxis_;
double lastRotationAngle_;
QTime lastMoveTime_;
QElapsedTimer lastMoveTime_;
QTimer* timer_;
double fovyModifier_;
QTimer clickTimer_;
QTime clickTime_;
QElapsedTimer clickTime_;
QMouseEvent clickEvent_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment