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

 
 

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

Submitter:  Dan Sebald <sebald>
Submitted:  Thu 04 Oct 2012 07:02:16 AM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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 Lilge <ttl>
Group 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 Lilge <ttl>
Group 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 Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-11-04 ttl StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2012-11-04 sebald Attached File- Added octave-toolbar_objectname-2012nov04.patch, #26875
    2012-10-04 jordigh StatusNone Patch Submitted
    2012-10-04 sebald Attached File- Added octave-toolbar_objectname-2012oct04.patch, #26695

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code