[Kde-games-devel] Review Request 109800: [PATCH] Fix for click-and-drag alternative

Saurav Singhi saurav.singhi at gmail.com
Mon Jun 17 04:29:24 UTC 2013



> On April 2, 2013, 10:23 p.m., Albert Astals Cid wrote:
> > dealer.cpp, line 1114
> > <http://git.reviewboard.kde.org/r/109800/diff/1/?file=126710#file126710line1114>
> >
> >     To be honest i'm not sure that this QTime solution is good, but if you plan on keep using it, you should at least use QApplication::startDragTime and not 500

i needed the time difference between press and release to determine whether its a click or its a drag. QApplication::startDragTime() sets the time after which mouse starts dragging. yet i added this to add smoothness to the app.


> On April 2, 2013, 10:23 p.m., Albert Astals Cid wrote:
> > dealer.cpp, line 1097
> > <http://git.reviewboard.kde.org/r/109800/diff/1/?file=126710#file126710line1097>
> >
> >     I'm not a KPat expert but calling KCardScene::mousReleaseEvent from mousePressEvent does look weird

i have not used this line for the first time. It was used before as well.


- Saurav


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109800/#review30300
-----------------------------------------------------------


On March 30, 2013, 2:51 p.m., Saurav Singhi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109800/
> -----------------------------------------------------------
> 
> (Updated March 30, 2013, 2:51 p.m.)
> 
> 
> Review request for KDE Games and Viranch Mehta.
> 
> 
> Description
> -------
> 
> This patch applies to kpat/dealer.h and kpat/dealer.cpp
> 
> I have introduced a QTime variable clickTime in th class DealerScene to measure the time difference between mouse press and mouse release. Mouse press is treated as single click and if mouse is released before 500 ms the release function does nothing. The release statements are executed the next time mouse is clicked.
> 
> 
> This addresses bug 249812.
>     http://bugs.kde.org/show_bug.cgi?id=249812
> 
> 
> Diffs
> -----
> 
>   dealer.h 9db2087 
>   dealer.cpp 1de913f 
> 
> Diff: http://git.reviewboard.kde.org/r/109800/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Saurav Singhi
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20130617/37aaed12/attachment-0001.html>


More information about the kde-games-devel mailing list