Qt5: 'void QTime::start()' / 'int QTime::elapsed() const' / 'int QTime::restart()' are deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations]

This commit is contained in:
wmayer
2020-06-10 23:02:47 +02:00
committed by wwmayer
parent 8dbe26a95f
commit c8dae9eb85
13 changed files with 35 additions and 26 deletions

View File

@@ -254,7 +254,10 @@ void SoFCColorBar::handleEvent (SoHandleEventAction *action)
if ((e->getButton() == SoMouseButtonEvent::BUTTON1)) {
if (e->getState() == SoButtonEvent::DOWN) {
// double click event
if (_timer.restart() < QApplication::doubleClickInterval()) {
if (!_timer.isValid()) {
_timer.start();
}
else if (_timer.restart() < QApplication::doubleClickInterval()) {
QApplication::postEvent(
new SoFCColorBarProxyObject(this),
new QEvent(QEvent::User));