Re: Qt4 resize bug

2006-06-19 Thread Lars Gullik Bjønnes
Abdelrazak Younes <[EMAIL PROTECTED]> writes: | > (and Qt3 AFAIC) | | As Far As I Can ... ? As Far As I Care :-) -- Lgb

Re: Qt4 resize bug

2006-06-19 Thread Abdelrazak Younes
Lars Gullik Bjønnes wrote: Abdelrazak Younes <[EMAIL PROTECTED]> writes: | Angus Leeming wrote: | > Abdelrazak Younes wrote: | >> Peter Kümmel wrote: | >>> Abdelrazak Younes wrote: | Please commit to "trunk" and... | > | >>> Do you think I could commit it now, | >>> or should I wait for mor

Re: Qt4 resize bug

2006-06-19 Thread Abdelrazak Younes
Lars Gullik Bjønnes wrote: Abdelrazak Younes <[EMAIL PROTECTED]> writes: | Index: QLPainter.C | === | --- QLPainter.C (revision 14065) | +++ QLPainter.C (working copy) | @@ -41,8 +41,13 @@ | } | | QLPainter::QLPainte

Re: Qt4 resize bug

2006-06-19 Thread Lars Gullik Bjønnes
Abdelrazak Younes <[EMAIL PROTECTED]> writes: | Angus Leeming wrote: | > Abdelrazak Younes wrote: | >> Peter Kümmel wrote: | >>> Abdelrazak Younes wrote: | Please commit to "trunk" and... | > | >>> Do you think I could commit it now, | >>> or should I wait for more comments? | > | >> I think

Re: Qt4 resize bug

2006-06-19 Thread Lars Gullik Bjønnes
Abdelrazak Younes <[EMAIL PROTECTED]> writes: | Index: QLPainter.C | === | --- QLPainter.C (revision 14065) | +++ QLPainter.C (working copy) | @@ -41,8 +41,13 @@ | } | | QLPainter::QLPainter(WorkArea * qwa) | - : P

Re: Qt4 resize bug

2006-06-16 Thread Andre Poenitz
On Thu, Jun 15, 2006 at 02:10:40PM +0200, Peter Kümmel wrote: > Where is the coding style guide? The style guide is basically "do what's done in most places in src/*.{C,h}" > Do you mean there is no indentation of the "-" list? No, some 'i=0' or such. That should be 'i = 0'. Andre'

Re: Qt4 resize bug

2006-06-16 Thread Andre Poenitz
On Thu, Jun 15, 2006 at 03:54:03PM +0200, Peter Kümmel wrote: > I've done a second look at the posted patch, and I don't see > the wrong spacing, at least not in the code I've added. > Could you give me a hint? I've already deleted the mail. IIRC ther was some 'for(int i=0' or similar. Andre'

Re: Qt4 resize bug

2006-06-15 Thread Peter Kümmel
Andre Poenitz wrote: > On Wed, Jun 14, 2006 at 10:25:42AM +0200, Peter Kümmel wrote: >> Do you think I could commit it now, or should I wait >> for more comments? > > Maybe I should change my commenting style to 'auto comment "Spacing is > off!"' and only sent comments if it isn't > > Andre'

Re: Qt4 resize bug

2006-06-15 Thread Jose' Matos
On Thursday 15 June 2006 13:10, Peter Kümmel wrote: > > Where is the coding style guide? development/Code_rules/* -- José Abílio

Re: Qt4 resize bug

2006-06-15 Thread Peter Kümmel
Andre Poenitz wrote: > On Wed, Jun 14, 2006 at 10:25:42AM +0200, Peter Kümmel wrote: >> Do you think I could commit it now, or should I wait >> for more comments? > > Maybe I should change my commenting style to 'auto comment "Spacing is > off!"' and only sent comments if it isn't > > Andre'

Re: Qt4 resize bug

2006-06-14 Thread Abdelrazak Younes
Andre Poenitz wrote: On Wed, Jun 14, 2006 at 10:15:52AM +0200, Abdelrazak Younes wrote: + // fi is a reference to the pointer type (QLFontInfo *) in the + // fontinfo_ table. + QPainter * & qp = + qpainters_[current_color_][current_ls_][current_lw_]; + if (q

Re: Qt4 resize bug

2006-06-14 Thread Jose' Matos
On Wednesday 14 June 2006 19:44, Andre Poenitz wrote: > Yeah... the procedure sounds familiar... Yes, been there, done that. Wait... I am still there... ;-) > Andre' -- José Abílio

Re: Qt4 resize bug

2006-06-14 Thread Andre Poenitz
On Wed, Jun 14, 2006 at 11:28:27AM +0100, Angus Leeming wrote: > José Abílio wrote: > > Abdelrazak Younes wrote: > >> Great, I am promoted to official "OK-sayer" :-) > > > You have been for some time now, > > you simply did not know that. ;-) > > He never asked ;-) > > We should probably collat

Re: Qt4 resize bug

2006-06-14 Thread Andre Poenitz
On Wed, Jun 14, 2006 at 10:15:52AM +0200, Abdelrazak Younes wrote: > + // fi is a reference to the pointer type (QLFontInfo *) in the > + // fontinfo_ table. > + QPainter * & qp = > + qpainters_[current_color_][current_ls_][current_lw_]; > + if (qp) > + retur

Re: Qt4 resize bug

2006-06-14 Thread Andre Poenitz
On Wed, Jun 14, 2006 at 10:25:42AM +0200, Peter Kümmel wrote: > Do you think I could commit it now, or should I wait > for more comments? Maybe I should change my commenting style to 'auto comment "Spacing is off!"' and only sent comments if it isn't Andre'

Re: Qt4 resize bug

2006-06-14 Thread Andre Poenitz
On Mon, Jun 12, 2006 at 10:13:40PM +0200, Peter Kümmel wrote: > but I could only find where it happens > and couldn't figure out how to fix it. > > > In QWorkArea::resizeEvent the asignment of the > QPixmap with the new size fails because the > painter is active. That should not happen. If it do

Re: Qt4 resize bug

2006-06-14 Thread Angus Leeming
José Abílio wrote: > Abdelrazak Younes wrote: >> Great, I am promoted to official "OK-sayer" :-) > You have been for some time now, > you simply did not know that. ;-) He never asked ;-) We should probably collate a list of official "OK-sayer"s and publish it alongside http://www.lyx.org/about/

Re: Qt4 resize bug

2006-06-14 Thread Jose' Matos
On Wednesday 14 June 2006 10:45, Abdelrazak Younes wrote: > Great, I am promoted to official "OK-sayer" :-) You have been for some time now, you simply did not know that. ;-) > Abdel. -- José Abílio

Re: Qt4 resize bug

2006-06-14 Thread Abdelrazak Younes
Angus Leeming wrote: Abdelrazak Younes wrote: Peter Kümmel wrote: Abdelrazak Younes wrote: Please commit to "trunk" and... Do you think I could commit it now, or should I wait for more comments? I think your changes are very reasonable so yes you could commit now... maybe it's better to

Re: Qt4 resize bug

2006-06-14 Thread Angus Leeming
Abdelrazak Younes wrote: >Peter Kümmel wrote: >> Abdelrazak Younes wrote: >>> Please commit to "trunk" and... >> Do you think I could commit it now, >> or should I wait for more comments? > I think your changes are very reasonable > so yes you could commit now... maybe it's > better to wait a b

Re: Qt4 resize bug

2006-06-14 Thread Georg Baum
Peter Kümmel wrote: > But why is painting sometime active? After hours of debugging I've found > the reason. [...] Impressive debug work! Georg

Re: Qt4 resize bug

2006-06-14 Thread Abdelrazak Younes
Peter Kümmel wrote: Abdelrazak Younes wrote: Please commit to "trunk" and... Do you think I could commit it now, or should I wait for more comments? I think your changes are very reasonable so yes you could commit now... maybe it's better to wait a bit more to let others comment on it if th

Re: Qt4 resize bug

2006-06-14 Thread Peter Kümmel
Abdelrazak Younes wrote: > Very good Peter! So we don't need the shared_ptr in WorkArea then? No, this would only be a hack. >> And here are some cleanups: >> >> - setQPainterPen needs not to return its parameter QPainter& > > Good, note that in my QPainter cache try, I transformed this > setQPa

Re: Qt4 resize bug

2006-06-14 Thread Abdelrazak Younes
Peter Kümmel wrote: Peter Kümmel wrote: This is the Qt message: QPixmap::operator=: Cannot assign to pixmap during painting [...] The assignment fails because on the old QPixmap painting is still active. But why is painting sometime active? After hours of debugging I've found the reason. [

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Peter Kümmel wrote: > This is the Qt message: > QPixmap::operator=: Cannot assign to pixmap during painting > > and happens at > > void QWorkArea::resizeEvent(QResizeEvent * resizeEvent) > { > workWidth_ = viewport()->width(); > workHeight_ = viewport()->height(); > > verti

Re: Qt4 resize bug

2006-06-13 Thread Abdelrazak Younes
Peter Kümmel wrote: Abdelrazak Younes wrote: Peter Kümmel wrote: Am Dienstag, 13. Juni 2006 16:19 schrieb Abdelrazak Younes: No bug under Linux, also no error message. Indeed. Now I see it too as well in the "younes" branch. But I am 100% sure those two bugs weren't there before. Fine, now

Re: Qt4 resize bug

2006-06-13 Thread Edwin Leuven
Peter Kümmel wrote: Do you have more than text in this document in the first show up? the attached document reproduces it. the second line has "noun" on and is the culprit another disturbing thing: deleting line 2 and maximizing still gives funky resizing however after closing and reopening

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Abdelrazak Younes wrote: > Peter Kümmel wrote: >> Am Dienstag, 13. Juni 2006 16:19 schrieb Abdelrazak Younes: >> >> No bug under Linux, also no error message. >> >>> Indeed. Now I see it too as well in the "younes" branch. But I am 100% >>> sure those two bugs weren't there before. >> >> Fine, now

Re: Qt4 resize bug

2006-06-13 Thread Abdelrazak Younes
Peter Kümmel wrote: Am Dienstag, 13. Juni 2006 16:19 schrieb Abdelrazak Younes: No bug under Linux, also no error message. Indeed. Now I see it too as well in the "younes" branch. But I am 100% sure those two bugs weren't there before. Fine, now the question is before WHAT? I don't know! A

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Am Dienstag, 13. Juni 2006 16:19 schrieb Abdelrazak Younes: No bug under Linux, also no error message. > Indeed. Now I see it too as well in the "younes" branch. But I am 100% > sure those two bugs weren't there before. Fine, now the question is before WHAT? Peter

Re: Qt4 resize bug

2006-06-13 Thread Abdelrazak Younes
Edwin Leuven wrote: Peter Kümmel wrote: It depends on the scrolling before resizing. things are messed up here also if i load a document and then maximize the window. no scrolling needed... Indeed. Now I see it too as well in the "younes" branch. But I am 100% sure those two bugs weren't t

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Edwin Leuven wrote: > Peter Kümmel wrote: >> It depends on the scrolling before resizing. > > things are messed up here also if i load a document and then maximize > the window. no scrolling needed... > > I've the impression it depends on the stuff which has been painted before the resize occur

Re: Qt4 resize bug

2006-06-13 Thread Edwin Leuven
Peter Kümmel wrote: It depends on the scrolling before resizing. things are messed up here also if i load a document and then maximize the window. no scrolling needed...

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Edwin Leuven wrote: > Peter Kümmel wrote: > > I also see the bug when compiled with mingw, >> but under Linux it is gone. >> >> Maybe it is a Qt bug. >> >> The Qt4/msvc patch doesn't change the Qt code >> much, most changes are for the Borland compiler >> and qmake, and they are harmless. > > but

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Abdelrazak Younes wrote: >> I also see the bug when compiled with mingw, >> but under Linux it is gone. > > You mean "the bug" or the "Qt error message"? I indeed see occasionally > the message but I am quite sure the resize bug was not there with mingw. With mingw I see the bug AND the error me

Re: Qt4 resize bug

2006-06-13 Thread Edwin Leuven
Peter Kümmel wrote: > I also see the bug when compiled with mingw, but under Linux it is gone. Maybe it is a Qt bug. The Qt4/msvc patch doesn't change the Qt code much, most changes are for the Borland compiler and qmake, and they are harmless. but it hasn't always been there (mingw) revert

Re: Qt4 resize bug

2006-06-13 Thread Abdelrazak Younes
Peter Kümmel wrote: Abdelrazak Younes wrote: Peter Kümmel wrote: At least I'm now 100% sure this is the right place to look for the bug: I've tested your shared_ptr solution, and the resize bug is gone, but I get-as assumed-this from Qt: :) QPaintDevice: Cannot destroy paint device that is bei

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Abdelrazak Younes wrote: > Peter Kümmel wrote: >> >> At least I'm now 100% sure this is the right place to look for the bug: >> I've tested your shared_ptr solution, and the resize bug is gone, but >> I get-as assumed-this from Qt: :) >> >> QPaintDevice: Cannot destroy paint device that is being pa

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Abdelrazak Younes wrote: > Peter Kümmel wrote: >> >> At least I'm now 100% sure this is the right place to look for the bug: >> I've tested your shared_ptr solution, and the resize bug is gone, but >> I get-as assumed-this from Qt: :) >> >> QPaintDevice: Cannot destroy paint device that is being pa

Re: Qt4 resize bug

2006-06-13 Thread Angus Leeming
Peter Kümmel wrote: > At least I'm now 100% sure this is the right > place to look for the bug: > I've tested your shared_ptr solution, and the > resize bug is gone, but I get-as assumed-this > from Qt: :) > QPaintDevice: Cannot destroy paint device > that is being painted. Be sure to > QPainter

Re: Qt4 resize bug

2006-06-13 Thread Abdelrazak Younes
Peter Kümmel wrote: At least I'm now 100% sure this is the right place to look for the bug: I've tested your shared_ptr solution, and the resize bug is gone, but I get-as assumed-this from Qt: :) QPaintDevice: Cannot destroy paint device that is being painted. Be sure to QPainter::end() paint

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Abdelrazak Younes wrote: > Peter Kümmel wrote: >> Abdelrazak Younes wrote: I don't think we could just delete it, it's in use, but I will try. >>> Indeed. Sorry I did not understand your question. Let's going back to >>> the beginning, we have: >>> >>>verticalScrollBar()->setPageStep(viewp

Re: Qt4 resize bug

2006-06-13 Thread Abdelrazak Younes
Peter Kümmel wrote: Abdelrazak Younes wrote: I don't think we could just delete it, it's in use, but I will try. Indeed. Sorry I did not understand your question. Let's going back to the beginning, we have: verticalScrollBar()->setPageStep(viewport()->height()); Should do nothing paint

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Abdelrazak Younes wrote: >> >> I don't think we could just delete it, it's in use, but I will try. > > Indeed. Sorry I did not understand your question. Let's going back to > the beginning, we have: > >verticalScrollBar()->setPageStep(viewport()->height()); > > Should do nothing > >pain

Re: Qt4 resize bug

2006-06-13 Thread Abdelrazak Younes
Peter Kümmel wrote: Abdelrazak Younes wrote: Peter Kümmel wrote: Abdelrazak Younes wrote: Try to inverse the two lines: paint_device_ = QPixmap(viewport()->width(), viewport()->height()); verticalScrollBar()->setPageStep(viewport()->height()); Does not help. I guess the "verticalScrollBa

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Abdelrazak Younes wrote: > Peter Kümmel wrote: >> Abdelrazak Younes wrote: >>> Try to inverse the two lines: >>> >>> paint_device_ = QPixmap(viewport()->width(), viewport()->height()); >>> verticalScrollBar()->setPageStep(viewport()->height()); >> >> Does not help. >> >>> I guess the "verticalScr

Re: Qt4 resize bug

2006-06-13 Thread Abdelrazak Younes
Peter Kümmel wrote: Abdelrazak Younes wrote: Try to inverse the two lines: paint_device_ = QPixmap(viewport()->width(), viewport()->height()); verticalScrollBar()->setPageStep(viewport()->height()); Does not help. I guess the "verticalScrollBar()->setPageStep()" results in a painting even

Re: Qt4 resize bug

2006-06-13 Thread Peter Kümmel
Abdelrazak Younes wrote: > > Try to inverse the two lines: > > paint_device_ = QPixmap(viewport()->width(), viewport()->height()); > verticalScrollBar()->setPageStep(viewport()->height()); Does not help. > I guess the "verticalScrollBar()->setPageStep()" results in a painting > event so paint

Re: Qt4 resize bug

2006-06-13 Thread Abdelrazak Younes
Peter Kümmel wrote: I've tried to fix the resize bug, - open lyx - resize to a small window - load a file - scroll down a bit <- this is important - maximize teh window, but I could only find where it happens and couldn't figure out how to fix it. In QWorkArea::resizeEvent the asignment of th

Qt4 resize bug

2006-06-12 Thread Peter Kümmel
I've tried to fix the resize bug, - open lyx - resize to a small window - load a file - scroll down a bit <- this is important - maximize teh window, but I could only find where it happens and couldn't figure out how to fix it. In QWorkArea::resizeEvent the asignment of the QPixmap with the new