Skip to content

Commit

Permalink
Use static functions for overriding curser via base class
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed May 5, 2022
1 parent 87272cf commit 8616bb2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/util/scopedoverridecursor.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#pragma once

#include <QApplication>
#include <QGuiApplication>

class ScopedOverrideCursor {
public:
inline explicit ScopedOverrideCursor(const QCursor& cursor) {
QApplication::setOverrideCursor(cursor);
QApplication::processEvents();
QGuiApplication::setOverrideCursor(cursor);
QGuiApplication::processEvents();
}

inline virtual ~ScopedOverrideCursor() {
QApplication::restoreOverrideCursor();
QGuiApplication::restoreOverrideCursor();
}
};

Expand Down

0 comments on commit 8616bb2

Please sign in to comment.