From baff7f213f07b7ae134062cd54b22c691f48fbe4 Mon Sep 17 00:00:00 2001 From: xmrdsc Date: Sun, 14 Apr 2019 17:12:24 +0200 Subject: [PATCH] Animation slow down for debugging --- filter.cpp | 20 ++++++++++++++++++++ monero-wallet-gui.pro | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/filter.cpp b/filter.cpp index 9129d92b..e66e5ade 100644 --- a/filter.cpp +++ b/filter.cpp @@ -27,9 +27,14 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "filter.h" +#include #include #include +#ifdef QT_DEBUG + #include "private/qabstractanimation_p.h" +#endif + filter::filter(QObject *parent) : QObject(parent) { @@ -79,6 +84,21 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) { case QEvent::KeyRelease: { QKeyEvent *ke = static_cast(ev); +#ifdef QT_DEBUG + if(ke->key() == Qt::Key_F9){ + QUnifiedTimer::instance()->setSlowModeEnabled(true); + QUnifiedTimer::instance()->setSlowdownFactor(10); + qDebug() << "Slow animations enabled"; + } + + if(ke->key() == Qt::Key_F10){ + QUnifiedTimer::instance()->setSlowModeEnabled(false); + QUnifiedTimer::instance()->setSlowdownFactor(1); + + qDebug() << "Slow animations disabled"; + } +#endif + if(ke->key() == Qt::Key_Backtab) m_backtabPressed = false; diff --git a/monero-wallet-gui.pro b/monero-wallet-gui.pro index c06dcb3c..cf4050ec 100644 --- a/monero-wallet-gui.pro +++ b/monero-wallet-gui.pro @@ -5,7 +5,7 @@ lessThan (QT_MAJOR_VERSION, 5) | lessThan (QT_MINOR_VERSION, 7) { TEMPLATE = app -QT += qml quick widgets +QT += qml gui-private quick widgets WALLET_ROOT=$$PWD/monero