mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:47:30 +02:00
More coding standard stuff
This commit is contained in:
parent
44efcdf82a
commit
eab4ad9ea9
5 changed files with 11 additions and 6 deletions
|
@ -20,7 +20,7 @@ class AddressBarDialog : public OffscreenQmlDialog
|
|||
QML_DIALOG_DECL
|
||||
|
||||
public:
|
||||
AddressBarDialog(QQuickItem* parent = 0);
|
||||
AddressBarDialog(QQuickItem* parent = nullptr);
|
||||
|
||||
protected:
|
||||
void displayAddressOfflineMessage();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -14,5 +14,5 @@ OffscreenQmlDialog::OffscreenQmlDialog(QQuickItem* parent)
|
|||
: QQuickItem(parent) { }
|
||||
|
||||
void OffscreenQmlDialog::hide() {
|
||||
((QQuickItem*)parent())->setEnabled(false);
|
||||
static_cast<QQuickItem*>(parent())->setEnabled(false);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ class OffscreenQmlDialog : public QQuickItem
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
OffscreenQmlDialog(QQuickItem* parent = 0);
|
||||
OffscreenQmlDialog(QQuickItem* parent = nullptr);
|
||||
|
||||
protected:
|
||||
void hide();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue