X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Ftreeviewtouch.cpp;h=74799b3f62f09e6d2bc4461ee5420d45f0d341a7;hp=96845ac4721c7e9eb11b3c9b03575c793f76388d;hb=ab7ef4d24f62b5848b628482b7762ebfc0b53e1a;hpb=ec474657f6af9f598a9b936f56c6ef7b863a77c9 diff --git a/src/uisupport/treeviewtouch.cpp b/src/uisupport/treeviewtouch.cpp index 96845ac4..74799b3f 100644 --- a/src/uisupport/treeviewtouch.cpp +++ b/src/uisupport/treeviewtouch.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -33,11 +33,7 @@ TreeViewTouch::TreeViewTouch(QWidget *parent) bool TreeViewTouch::event(QEvent *event) { -#if QT_VERSION >= 0x050000 if (event->type() == QEvent::TouchBegin && ((QTouchEvent*)event)->device()->type()==QTouchDevice::TouchScreen) { -#else - if (event->type() == QEvent::TouchBegin && ((QTouchEvent*)event)->deviceType()==QTouchEvent::TouchScreen) { -#endif // Register that we may be scrolling, set the scroll mode to scroll-per-pixel // and accept the event (return true) so that we will receive TouchUpdate and TouchEnd/TouchCancel _touchScrollInProgress = true; @@ -62,11 +58,7 @@ bool TreeViewTouch::event(QEvent *event) { return true; } -#if QT_VERSION >= 0x050000 if (event->type() == QEvent::TouchEnd || event->type() == QEvent::TouchCancel) { -#else - if (event->type() == QEvent::TouchEnd) { -#endif // End scroll and reset variables _touchScrollInProgress = false; _firstTouchUpdateHappened = false;