diff --git a/interface/src/Application.h b/interface/src/Application.h index cb54f7dc79..89de18dde5 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -171,8 +171,8 @@ public: void touchUpdateEvent(QTouchEvent* event); void wheelEvent(QWheelEvent* event); - void dropEvent(QDropEvent *event); - void dragEnterEvent(QDragEnterEvent *event); + void dropEvent(QDropEvent* event); + void dragEnterEvent(QDragEnterEvent* event); bool event(QEvent* event); bool eventFilter(QObject* object, QEvent* event); diff --git a/interface/src/GLCanvas.cpp b/interface/src/GLCanvas.cpp index d0c0cb6713..0e25f0f596 100644 --- a/interface/src/GLCanvas.cpp +++ b/interface/src/GLCanvas.cpp @@ -127,7 +127,7 @@ void GLCanvas::throttleRender() { int updateTime = 0; bool GLCanvas::event(QEvent* event) { switch (event->type()) { - case QEvent::MouseMove: + case QEvent::MouseMove: case QEvent::MouseButtonPress: case QEvent::MouseButtonRelease: case QEvent::KeyPress: diff --git a/interface/src/ui/AddressBarDialog.cpp b/interface/src/ui/AddressBarDialog.cpp index 5ef9b930ac..6b5c92c194 100644 --- a/interface/src/ui/AddressBarDialog.cpp +++ b/interface/src/ui/AddressBarDialog.cpp @@ -17,7 +17,7 @@ QML_DIALOG_DEF(AddressBarDialog) -AddressBarDialog::AddressBarDialog(QQuickItem *parent) : OffscreenQmlDialog(parent) { +AddressBarDialog::AddressBarDialog(QQuickItem* parent) : OffscreenQmlDialog(parent) { auto addressManager = DependencyManager::get(); connect(addressManager.data(), &AddressManager::lookupResultIsOffline, this, &AddressBarDialog::displayAddressOfflineMessage); connect(addressManager.data(), &AddressManager::lookupResultIsNotFound, this, &AddressBarDialog::displayAddressNotFoundMessage); @@ -25,10 +25,10 @@ AddressBarDialog::AddressBarDialog(QQuickItem *parent) : OffscreenQmlDialog(pare } void AddressBarDialog::hide() { - ((QQuickItem *)parent())->setEnabled(false); + ((QQuickItem*)parent())->setEnabled(false); } -void AddressBarDialog::loadAddress(const QString & address) { +void AddressBarDialog::loadAddress(const QString& address) { qDebug() << "Called LoadAddress with address " << address; if (!address.isEmpty()) { DependencyManager::get()->handleLookupString(address); diff --git a/interface/src/ui/AddressBarDialog.h b/interface/src/ui/AddressBarDialog.h index b4f4c44e0f..a9035cc915 100644 --- a/interface/src/ui/AddressBarDialog.h +++ b/interface/src/ui/AddressBarDialog.h @@ -20,14 +20,14 @@ class AddressBarDialog : public OffscreenQmlDialog QML_DIALOG_DECL public: - AddressBarDialog(QQuickItem *parent = 0); + AddressBarDialog(QQuickItem* parent = 0); protected: void displayAddressOfflineMessage(); void displayAddressNotFoundMessage(); void hide(); - Q_INVOKABLE void loadAddress(const QString & address); + Q_INVOKABLE void loadAddress(const QString& address); }; #endif diff --git a/interface/src/ui/LoginDialog.cpp b/interface/src/ui/LoginDialog.cpp index 3637d824fb..10541415bf 100644 --- a/interface/src/ui/LoginDialog.cpp +++ b/interface/src/ui/LoginDialog.cpp @@ -41,7 +41,7 @@ void LoginDialog::toggleAction() { } } -void LoginDialog::handleLoginCompleted(const QUrl& authURL) { +void LoginDialog::handleLoginCompleted(const QUrl&) { hide(); } @@ -49,9 +49,9 @@ void LoginDialog::handleLoginFailed() { setStatusText("Invalid username or password.< / font>"); } -void LoginDialog::setStatusText(const QString &a) { +void LoginDialog::setStatusText(const QString& statusText) { if (a != _statusText) { - _statusText = a; + _statusText = statusText; emit statusTextChanged(); } } @@ -64,12 +64,12 @@ QString LoginDialog::rootUrl() const { return _rootUrl; } -void LoginDialog::login(const QString & username, const QString & password) { +void LoginDialog::login(const QString& username, const QString& password) { qDebug() << "Attempting to login " << username; setStatusText("Authenticating..."); AccountManager::getInstance().requestAccessToken(username, password); } -void LoginDialog::openUrl(const QString & url) { +void LoginDialog::openUrl(const QString& url) { qDebug() << url; } diff --git a/interface/src/ui/LoginDialog.h b/interface/src/ui/LoginDialog.h index 7fe44bf543..b4f83bb9ad 100644 --- a/interface/src/ui/LoginDialog.h +++ b/interface/src/ui/LoginDialog.h @@ -27,7 +27,7 @@ public: LoginDialog(QQuickItem* parent = 0); - void setStatusText(const QString & a); + void setStatusText(const QString& a); QString statusText() const; QString rootUrl() const; diff --git a/libraries/render-utils/src/FboCache.cpp b/libraries/render-utils/src/FboCache.cpp index fdd29d20d8..2ca3d47bdf 100644 --- a/libraries/render-utils/src/FboCache.cpp +++ b/libraries/render-utils/src/FboCache.cpp @@ -72,7 +72,7 @@ QOpenGLFramebufferObject* FboCache::getReadyFbo() { return result; } -void FboCache::setSize(const QSize & newSize) { +void FboCache::setSize(const QSize& newSize) { if (_size == newSize) { return; } diff --git a/libraries/render-utils/src/FboCache.h b/libraries/render-utils/src/FboCache.h index 975d602278..30278470fd 100644 --- a/libraries/render-utils/src/FboCache.h +++ b/libraries/render-utils/src/FboCache.h @@ -30,7 +30,7 @@ public: // the appropriate OpenGL context is active when doing so. // Important.... textures are sharable resources, but FBOs ARE NOT. - void setSize(const QSize & newSize); + void setSize(const QSize& newSize); QOpenGLFramebufferObject* getReadyFbo(); // These operations are thread safe and require no OpenGL context. They manipulate the diff --git a/libraries/render-utils/src/OffscreenQmlDialog.cpp b/libraries/render-utils/src/OffscreenQmlDialog.cpp index ae0525e17d..98dc68f94b 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); + ((QQuickItem*)parent())->setEnabled(false); } diff --git a/libraries/render-utils/src/OffscreenUi.cpp b/libraries/render-utils/src/OffscreenUi.cpp index 6849837da3..5fb2773d31 100644 --- a/libraries/render-utils/src/OffscreenUi.cpp +++ b/libraries/render-utils/src/OffscreenUi.cpp @@ -139,13 +139,15 @@ void OffscreenUi::load(const QUrl& qmlSource, std::function void OffscreenUi::requestUpdate() { _polish = true; - if (!_updateTimer.isActive()) + if (!_updateTimer.isActive()) { _updateTimer.start(); + } } void OffscreenUi::requestRender() { - if (!_updateTimer.isActive()) + if (!_updateTimer.isActive()) { _updateTimer.start(); + } } void OffscreenUi::finishQmlLoad() { diff --git a/libraries/shared/src/ThreadHelpers.h b/libraries/shared/src/ThreadHelpers.h index 8a64691da7..cc0e1ee666 100644 --- a/libraries/shared/src/ThreadHelpers.h +++ b/libraries/shared/src/ThreadHelpers.h @@ -21,9 +21,9 @@ void withLock(L lock, F function) { } template -void withLock(QMutex & lock, F function) { +void withLock(QMutex& lock, F function) { QMutexLocker locker(&lock); function(); } -#endif \ No newline at end of file +#endif diff --git a/tests/render-utils/src/main.cpp b/tests/render-utils/src/main.cpp index eb61fd1f72..7adad34879 100644 --- a/tests/render-utils/src/main.cpp +++ b/tests/render-utils/src/main.cpp @@ -70,7 +70,7 @@ public: }; -const QString & getQmlDir() { +const QString& getQmlDir() { static QString dir; if (dir.isEmpty()) { QDir path(__FILE__); @@ -98,7 +98,7 @@ protected: void renderQml(); private: - void resizeWindow(const QSize & size) { + void resizeWindow(const QSize& size) { _size = size; DependencyManager::get()->resize(_size); } @@ -126,7 +126,7 @@ public: makeCurrent(); { - QOpenGLDebugLogger *logger = new QOpenGLDebugLogger(this); + QOpenGLDebugLogger* logger = new QOpenGLDebugLogger(this); logger->initialize(); // initializes in the current context, i.e. ctx logger->enableMessages(); connect(logger, &QOpenGLDebugLogger::messageLogged, this, [&](const QOpenGLDebugMessage & debugMessage) { @@ -201,12 +201,12 @@ public: protected: - void resizeEvent(QResizeEvent * ev) override { + void resizeEvent(QResizeEvent* ev) override { resizeWindow(ev->size()); } - void keyPressEvent(QKeyEvent *event) { + void keyPressEvent(QKeyEvent* event) { switch (event->key()) { case Qt::Key_L: if (event->modifiers() & Qt::CTRL) { @@ -217,7 +217,7 @@ protected: QWindow::keyPressEvent(event); } - void moveEvent(QMoveEvent *event) { + void moveEvent(QMoveEvent* event) { static qreal oldPixelRatio = 0.0; if (devicePixelRatio() != oldPixelRatio) { oldPixelRatio = devicePixelRatio(); @@ -232,8 +232,8 @@ protected: #define SERIF_FONT_FAMILY "Times New Roman" #endif -static const wchar_t * EXAMPLE_TEXT = L"Hello"; -//static const wchar_t * EXAMPLE_TEXT = L"\xC1y Hello 1.0\ny\xC1 line 2\n\xC1y"; +static const wchar_t* EXAMPLE_TEXT = L"Hello"; +//static const wchar_t* EXAMPLE_TEXT = L"\xC1y Hello 1.0\ny\xC1 line 2\n\xC1y"; static const glm::uvec2 QUAD_OFFSET(10, 10); static const glm::vec3 COLORS[4] = { { 1.0, 1.0, 1.0 }, { 0.5, 1.0, 0.5 }, { @@ -283,7 +283,6 @@ void QTestWindow::renderText() { } void QTestWindow::renderQml() { - glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); @@ -297,7 +296,6 @@ void QTestWindow::renderQml() { } glBegin(GL_QUADS); { - glTexCoord2f(0, 0); glVertex2f(-1, -1); glTexCoord2f(0, 1);