qmerge dialog should remember its size

Bug #435286 reported by Alexander Belchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QBzr
Incomplete
Undecided
Unassigned

Bug Description

John Arbash Meinel пишет:
> Alexander Belchenko wrote:
>> Russel Winder пишет:
>>> I wonder if the push and pull dialogs should resize to the length of the
>>> URL if there is one present (i.e. the default). I am finding it very
>>> irritating that the width of the dialog is nowhere near long enough to
>>> know if the URL is the right one. Also it shows the right hand end of
>>> the URL and in fact the easiest discriminator for me is the left hand
>>> end.
>> If you resize the dialog then new size will be remembered. So feel free
>> to change the size as you need.
>>
>
> I just tried that with qmerge and the new size was not remembered. My
> merge target had "Nothing to do", but I still hit 'Ok'. Note that
> resizing and hitting Cancel also does not remember the dialog width.
>
> John
> =:->

Tags: qmerge qt4.5
Revision history for this message
Alexander Belchenko (bialix) wrote :

It works for me actually. Sorry for the noise.

Changed in qbzr:
status: New → Invalid
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 435286] Re: qmerge dialog should remember its size

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> It works for me actually. Sorry for the noise.
>

So it still doesn't work for me for merge, push, and pull

Other windows like branch seem to have settings in qbzr.conf.

Hmm... they have settings but the changes are not remembered.

Maybe it is because I'm using PyQt 4.5.2 on python2.6?

I don't see any failure warnings, etc. in ~/.bzr.log is there something
I can do to help debug this?

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkq6MaQACgkQJdeBCYSNAAPE/QCghd2EueF41TJDmPR0TYCpBfqs
bNcAnRFNbuR5xzmNvjjv8Uhw0m40uRJw
=ABy7
-----END PGP SIGNATURE-----

Revision history for this message
Alexander Belchenko (bialix) wrote :

OK, perhaps it's the Qt 4.5 related problem. Recently Martin <gzlist> has fixed several 4.5-related problems. Perhaps we can check this again.

Changed in qbzr:
status: Invalid → Incomplete
tags: added: qt4.5
Revision history for this message
John A Meinel (jameinel) wrote :
Download full text (4.9 KiB)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John A Meinel wrote:
> Alexander Belchenko wrote:
>> It works for me actually. Sorry for the noise.
>
>
> So it still doesn't work for me for merge, push, and pull
>
> Other windows like branch seem to have settings in qbzr.conf.
>
> Hmm... they have settings but the changes are not remembered.
>
> Maybe it is because I'm using PyQt 4.5.2 on python2.6?
>
> I don't see any failure warnings, etc. in ~/.bzr.log is there something
> I can do to help debug this?
>
> John
> =:->
>

So I started adding some 'print' statements into qbzr, and while I see:
$ bzr qcommit
_QBzrWindowBase.restoreSize (CommitWindow), commit
Committing to: C:/Users/jameinel/dev/,tmp/a/
modified foo
Committed revision 3.

I never see "saveSize()" getting called.

I tracked things down to _QBzrWindowBase.closeEvent() which is the only
bit of code I could find that was calling saveSize().

So I started tracking down through the call paths of closeEvent and I
think I have it sorted out.

Specifically, SubProcessDialog.closeEvent is:

    def closeEvent(self, event):
        if not self.process_widget.is_running():
            QBzrDialog.closeEvent(self, event)
        else:
            self.process_widget.abort()
            event.ignore()

And if check QBzrDialog I have:

class QBzrDialog(QtGui.QDialog, _QBzrWindowBase):

and it is on _QBzrWindowBase that you have:

    def closeEvent(self, event):
        self.closing = True
        self.saveSize()
        for window in self.windows:
            if window.isVisible():
                window.close()
        event.accept()

My guess is that PyQt 4.5.2 now implements a closeEvent function, and
you are using multi-inheritance and expecting all members to get called.

However because you have:

class QBzrDialog(QtGui.QDialog, _QBzrWindowBase):

Only the QDialog.closeEvent is getting called, and not your custom
implementation. and QDialog.closeEvent() isn't calling
super(...).closeEvent() in order to handle the multi-inheritance issue.

As somewhat proof of this, if I do:

=== modified file 'lib/util.py'
- --- lib/util.py 2009-08-20 13:23:27 +0000
+++ lib/util.py 2009-09-23 15:12:57 +0000
@@ -390,7 +390,7 @@
         self.closing = False

- -class QBzrDialog(QtGui.QDialog, _QBzrWindowBase):
+class QBzrDialog(_QBzrWindowBase, QtGui.QDialog):

     def __init__(self, title=None, parent=None, ui_mode=True):
         self.ui_mode = ui_mode

Then settings are properly saved again....

I don't really know the correct answer, but I can say that multiple
inheritance is hurting you here. It may be that the PyQt wrappers don't
play well with multiple inheritance.

I also notice that "_QBzrWindowBase" is a bare class, not a subclass of
QObject or 'object', which may complicate things even more. (without
subclassing 'object' you get an old-style class, which acts differently
in python than new-style classes.)

However, neither
  class _QBzrWindowBase(QtCore.QObject):
nor
  class _QBzrWindowBase(object):

caused things to work. The only thing that worked was the above. Or
possibly:
=== modified file 'lib/util.py'
- --- lib/util.py 2009-08-20 13:23:27 +0000
+++ lib/util.py 2009-09-23 ...

Read more...

Revision history for this message
Gary van der Merwe (garyvdm) wrote :

I think that this may be a dup of bug 417809, which is now fixed on trunk.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.