diff --git a/interface/src/ui/AddressBarDialog.h b/interface/src/ui/AddressBarDialog.h index a9035cc915..28056edd30 100644 --- a/interface/src/ui/AddressBarDialog.h +++ b/interface/src/ui/AddressBarDialog.h @@ -20,7 +20,7 @@ class AddressBarDialog : public OffscreenQmlDialog QML_DIALOG_DECL public: - AddressBarDialog(QQuickItem* parent = 0); + AddressBarDialog(QQuickItem* parent = nullptr); protected: void displayAddressOfflineMessage(); diff --git a/interface/src/ui/LoginDialog.h b/interface/src/ui/LoginDialog.h index b4f83bb9ad..b6d505943e 100644 --- a/interface/src/ui/LoginDialog.h +++ b/interface/src/ui/LoginDialog.h @@ -25,9 +25,9 @@ class LoginDialog : public OffscreenQmlDialog public: static void toggleAction(); - LoginDialog(QQuickItem* parent = 0); + LoginDialog(QQuickItem* parent = nullptr); - void setStatusText(const QString& a); + void setStatusText(const QString& statusText); QString statusText() const; QString rootUrl() const; diff --git a/libraries/render-utils/src/OffscreenQmlDialog.cpp b/libraries/render-utils/src/OffscreenQmlDialog.cpp index 98dc68f94b..d1e060245d 100644 --- a/libraries/render-utils/src/OffscreenQmlDialog.cpp +++ b/libraries/render-utils/src/OffscreenQmlDialog.cpp @@ -14,5 +14,5 @@ OffscreenQmlDialog::OffscreenQmlDialog(QQuickItem* parent) : QQuickItem(parent) { } void OffscreenQmlDialog::hide() { - ((QQuickItem*)parent())->setEnabled(false); + static_cast<QQuickItem*>(parent())->setEnabled(false); } diff --git a/libraries/render-utils/src/OffscreenQmlDialog.h b/libraries/render-utils/src/OffscreenQmlDialog.h index bb69b4b63f..eca82261c0 100644 --- a/libraries/render-utils/src/OffscreenQmlDialog.h +++ b/libraries/render-utils/src/OffscreenQmlDialog.h @@ -47,7 +47,7 @@ class OffscreenQmlDialog : public QQuickItem { Q_OBJECT public: - OffscreenQmlDialog(QQuickItem* parent = 0); + OffscreenQmlDialog(QQuickItem* parent = nullptr); protected: void hide(); diff --git a/libraries/render-utils/src/OffscreenUi.cpp b/libraries/render-utils/src/OffscreenUi.cpp index d63f3330e9..d4e1f15b22 100644 --- a/libraries/render-utils/src/OffscreenUi.cpp +++ b/libraries/render-utils/src/OffscreenUi.cpp @@ -14,6 +14,11 @@ #include <QGLWidget> #include <QtQml> +// Time between receiving a request to render the offscreen UI actually triggering +// the render. Could possibly be increased depending on the framerate we expect to +// achieve. +static const int SMALL_INTERVAL = 5; + class OffscreenUiRoot : public QQuickItem { Q_OBJECT public: @@ -76,7 +81,7 @@ void OffscreenUi::create(QOpenGLContext* shareContext) { // When Quick says there is a need to render, we will not render immediately. Instead, // a timer with a small interval is used to get better performance. _updateTimer.setSingleShot(true); - _updateTimer.setInterval(5); + _updateTimer.setInterval(SMALL_INTERVAL); connect(&_updateTimer, &QTimer::timeout, this, &OffscreenUi::updateQuick); // Now hook up the signals. For simplicy we don't differentiate between