]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
modernize use auto
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 15 Feb 2023 08:37:20 +0000 (09:37 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 22 Feb 2023 15:50:20 +0000 (16:50 +0100)
done with clang-tidy

run-clang-tidy -p build -header-filter='.*' -config="{Checks: '*', CheckOptions: [{key: UseAssignment, value: true}]}" -checks='-*,modernize-use-auto' -fix

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/3rdparty/kirigami/wheelhandler.cpp

index 7821b64f9385d2d93ab2de739f4c1269de50690c..f0a043cd333a5cb0d89a14e2e2cd3a28d4ce9863 100644 (file)
@@ -489,7 +489,7 @@ bool WheelHandler::eventFilter(QObject *watched, QEvent *event)
                 m_horizontalScrollBar->setProperty("interactive", true);
             }
         }
-        QWheelEvent *wheelEvent = static_cast<QWheelEvent *>(event);
+        auto *wheelEvent = static_cast<QWheelEvent *>(event);
 
         // NOTE: On X11 with libinput, pixelDelta is identical to angleDelta when using a mouse that shouldn't use pixelDelta.
         // If faulty pixelDelta, reset pixelDelta to (0,0).
@@ -603,7 +603,7 @@ bool WheelHandler::eventFilter(QObject *watched, QEvent *event)
         if (!m_keyNavigationEnabled) {
             break;
         }
-        QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+        auto *keyEvent = static_cast<QKeyEvent *>(event);
         bool horizontalScroll = keyEvent->modifiers() & m_defaultHorizontalScrollModifiers;
         switch (keyEvent->key()) {
         case Qt::Key_Up: return scrollUp();