bugGNU Octave - Bugs: bug #37498, Main tool bar settings are not...

 
 

bug #37498: Main tool bar settings are not saved.

Submitted by:  Dan Sebald <sebald>
Submitted on:  Thu 04 Oct 2012 07:02:16 AM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 04 Nov 2012 06:07:29 PM UTC, comment #3:

Sorry, I was wrong. The toolbar is not separately saved but the object name is still needed for saveState() of the main window. From the Qt-docs for QtMainWindow::saveState():
The objectName property is used to identify each QToolBar and QDockWidget. You should make sure that this property is unique for each QToolBar and QDockWidget you add to the QMainWindow

Thanks for the new patch, changeset is here:
http://hg.savannah.gnu.org/hgweb/octave/rev/8be22193532b

Torsten <ttl>
Project Member
Sun 04 Nov 2012 05:26:29 PM UTC, comment #2:

Yes, I am still seeing an error message at exit:

[octave]$ /usr/local/src/octave/octave/build-gui-9/run-octave
QMainWindow::saveState(): 'objectName' not set for QToolBar 0x1ed35c0 'Main'

And, a similar fix (new patch attached that doesn't have the annoying checksum change) gets rid of the warning.

As it stands though, without the attached patch, I confirmed that tool bars are properly saved in the settings and there is not a MainToolBar in the list of settings as I described in the original submission. So why Qt complains about this tool bar not having a name at exit when it doesn't need such a thing for settings I'm not quite sure.

(file #26875)

Dan Sebald <sebald>
Sat 03 Nov 2012 08:54:26 AM UTC, comment #1:

Dan, are you still seeing the message on STDERR? Since Changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/bbbb89cc338f
only childrens of the main window that inherit QDockWidget (not QWidget) are separatly saved in the settings.
The position of the toolbar is still saved within the state of the main window.

Torsten <ttl>
Project Member
Thu 04 Oct 2012 07:02:16 AM UTC, original submission:

The main tool bar settings are not being stored when the GUI/IDE exits. The message that is sent to STDERR upon exit is:

QMainWindow::saveState(): 'objectName' not set for QToolBar 0x120a4c0 'Main'

but this is not visible but perhaps momentarily because STDERR is redirected to the GUI/IDE terminal window and that window is gone upon exit.

The attached patch sets the name of the main_tool_bar object to "MainToolBar" immediately after its creation. Before this change, the qt-settings file looks like (snippet):

TerminalDockWidget=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\xff\xff\xfb\xb4\xff\xff\xfc\x63\xff\xff\xfe\v\xff\xff\xfe\v\xff\xff\xfb\xb4\xff\xff\xfc\x63\xff\xff\xfe\v\xff\xff\xfe\v\0\0\0\0\0\0)

and after

TerminalDockWidget=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\xff\xff\xfb\xb4\xff\xff\xfc\x63\xff\xff\xfe\v\xff\xff\xfe\v\xff\xff\xfb\xb4\xff\xff\xfc\x63\xff\xff\xfe\v\xff\xff\xfe\v\0\0\0\0\0\0)
MainToolBar=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\x19\0\0\x3\xc9\0\0\0@\0\0\0\0\0\0\0\x19\0\0\x3\xc9\0\0\0@\0\0\0\0\0\0)

Dan Sebald <sebald>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by sebald (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 04 Nov 2012 06:07:29 PM UTCttlStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Sun 04 Nov 2012 05:26:29 PM UTCsebaldAttached File-=>Added octave-toolbar_objectname-2012nov04.patch, #26875
    Thu 04 Oct 2012 01:10:36 PM UTCjordighStatusNone=>Patch Submitted
    Thu 04 Oct 2012 07:02:16 AM UTCsebaldAttached File-=>Added octave-toolbar_objectname-2012oct04.patch, #26695

    Back to the top


    Powered by Savane 3.1-cleanup1