[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-10 Thread Денис Песоцкий
Here it is. Also created constant for wrap margin, IMHO it looks better. 2011/2/11 Albert Astals Cid : > A Divendres, 11 de febrer de 2011, Денис Песоцкий va escriure: >> So you don't accept that fix? I mean this: http://paste.kde.org/4508/ > > Have been busy and did not really have time to review

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-10 Thread Albert Astals Cid
A Divendres, 11 de febrer de 2011, Денис Песоцкий va escriure: > So you don't accept that fix? I mean this: http://paste.kde.org/4508/ Have been busy and did not really have time to review your code yet. Sorry about that. Could you please send the patch as an attachment to the list instead of p

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-10 Thread Денис Песоцкий
So you don't accept that fix? I mean this: http://paste.kde.org/4508/ ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-03 Thread Денис Песоцкий
Code with QCursor::pos() works ok with any panel position, tested it on 2 PCs. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Денис Песоцкий
And, by the way, why it happens? Is it Qt bug? ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Денис Песоцкий
QCursor::pos().x() and QCursor::pos().y(), I mean (typed in mailer). Now tested this solution. It works well. ___ Okular-devel mailing list Okular-devel@kde.org https://mail.kde.org/mailman/listinfo/okular-devel

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Денис Песоцкий
Sorry about that. I don't have any experience with big OSS projects collaborative development (except kde-l10n, where we don't need to care about revisions, diffs, ...). Yes, it happens when panel is at top (following is logged after I commented out delta fix): http://paste.kde.org/3932/ IMHO bett

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Albert Astals Cid
A Dimecres, 2 de febrer de 2011, Денис Песоцкий va escriure: > revision 1156337 hasn't any bug reference in annotation, what ar you > talking about? Yes it has. It says "forwardport aacid * r1156334" And then you go to http://websvn.kde.org/?view=revision&revision=1156334 you can read BUGS: 234

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Денис Песоцкий
revision 1156337 hasn't any bug reference in annotation, what ar you talking about? 2011/2/2 Albert Astals Cid : > A Dimarts, 1 de febrer de 2011, Денис Песоцкий va escriure: >> Thank you, now it works. Inserted qDebug messages in that ifs about >> absDelta. They happen only if I scroll very fast

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Albert Astals Cid
A Dimarts, 1 de febrer de 2011, Денис Песоцкий va escriure: > Thank you, now it works. Inserted qDebug messages in that ifs about > absDelta. They happen only if I scroll very fast (as excepted — mouse > moves fast, so delta is high). And, as I said, moving cursor fast > leads to wrong scrolling. >

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Денис Песоцкий
Thank you, now it works. Inserted qDebug messages in that ifs about absDelta. They happen only if I scroll very fast (as excepted — mouse moves fast, so delta is high). And, as I said, moving cursor fast leads to wrong scrolling. When I removed that blocks, it works as excepted. When I added my mar

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Albert Astals Cid
A Dimarts, 1 de febrer de 2011, Денис Песоцкий va escriure: > obey@damnbook okular % pwd > /home/obey/tmp/kdegraphics/build/okular > obey@damnbook okular % export KDEDIRS=$(pwd):$(kde4-config --prefix) > obey@damnbook okular % kbuildsycoca4 > kbuildsycoca4 running... > obey@damnbook okular % ./shel

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Денис Песоцкий
obey@damnbook okular % pwd /home/obey/tmp/kdegraphics/build/okular obey@damnbook okular % export KDEDIRS=$(pwd):$(kde4-config --prefix) obey@damnbook okular % kbuildsycoca4 kbuildsycoca4 running... obey@damnbook okular % ./shell/okular ~/Downloads/Deluge/c_cpp_standards/c_iso_iec_9899_1999.pdf And

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Albert Astals Cid
A Dimarts, 1 de febrer de 2011, Денис Песоцкий va escriure: > Yes, I've tried that. I make changes to ui/pageview.cpp, recompile it, > start ./shell/okular and it works like nothing happend. Ever if I > don't create d-pointer in constructor. Probably it loads that lib > dynamically from my system.

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Денис Песоцкий
Yes, I've tried that. I make changes to ui/pageview.cpp, recompile it, start ./shell/okular and it works like nothing happend. Ever if I don't create d-pointer in constructor. Probably it loads that lib dynamically from my system. 2011/2/2 Albert Astals Cid : > A Dimarts, 1 de febrer de 2011, Дени

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Albert Astals Cid
A Dimarts, 1 de febrer de 2011, Денис Песоцкий va escriure: > > As said in the other mail, check the svn logs and make sure your fix does > > not break what the other code was supposed to fix. > > Ok, I found that commit: > http://websvn.kde.org/?view=revision&revision=1156337 Anyway, I can't > un

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Денис Песоцкий
> As said in the other mail, check the svn logs and make sure your fix does not > break what the other code was supposed to fix. Ok, I found that commit: http://websvn.kde.org/?view=revision&revision=1156337 Anyway, I can't understand what for it is needed and did he fixed anything. Because any tim

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Albert Astals Cid
A Dimarts, 1 de febrer de 2011, Денис Песоцкий va escriure: > There is also hardcoded margin. Here is better code (added margin and > removed stupid check): Again, please control your language. > > else if ( !d->mouseGrabPos.isNull() ) > { > se

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-02-01 Thread Albert Astals Cid
A Dimarts, 1 de febrer de 2011, Денис Песоцкий va escriure: > Fuck sake :) Control your language > Following happens when mouse is wrapped: > 1) QCursor::setPos(new_pos) > 2) mouseGrabPos = new_pos > So absDelta will be ok. I'll mark corresponding lines, look: > > if ( mouse

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-01-31 Thread Денис Песоцкий
There is also hardcoded margin. Here is better code (added margin and removed stupid check): else if ( !d->mouseGrabPos.isNull() ) { setCursor( Qt::SizeAllCursor ); QPoint mousePos = e->globalPos(); QPoint

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-01-31 Thread Денис Песоцкий
Fuck sake :) Following happens when mouse is wrapped: 1) QCursor::setPos(new_pos) 2) mouseGrabPos = new_pos So absDelta will be ok. I'll mark corresponding lines, look:                     if ( mousePos.y() <= mouseContainer.top() + 4 && verticalScrollBar()->value() < ver

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-01-31 Thread Albert Astals Cid
A Dimarts, 1 de febrer de 2011, Денис Песоцкий va escriure: > >> Ok, I'm here. > >> It can happen in 2 cases: > >> 1) Mouse is moved by more than (screen height)/2 vetically between > >> event loops. I did that with my thinkpoint and it drags not as > >> excepted if I move cursor fast. > > > > Hmm

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-01-31 Thread Денис Песоцкий
>> Ok, I'm here. >> It can happen in 2 cases: >> 1) Mouse is moved by more than (screen height)/2 vetically between >> event loops. I did that with my thinkpoint and it drags not as >> excepted if I move cursor fast. > Hmm, this is unfortunate we really never though that could be possible, are > yo

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-01-31 Thread Albert Astals Cid
A Dimarts, 1 de febrer de 2011, Денис Песоцкий va escriure: > > if ( absDelta.y() > mouseContainer.height() / 2 ) happens not when you > > move the mouse very fast but when cursor wraps from the top to the > > bottom of the screen as the comment says. Anyway if you wish to continue > > discussing t

[Okular-devel] Re: About 265002 (Unreachable code in okular/ui/pageview.cpp (related to drag scroll))

2011-01-31 Thread Денис Песоцкий
> if ( absDelta.y() > mouseContainer.height() / 2 ) happens not when you move > the > mouse very fast but when cursor wraps from the top to the bottom of the screen > as the comment says. Anyway if you wish to continue discussing this please > subscribe to okular-devel mailing list and post there.