Okay, it does NOT get more bizarre then this... y'know the problem I (and

others) was having with konsole not reading in the schema and size anymore?
Well, this fixes it for me.

The bizarre part is where the problem appears to be -- it just doesn't
make any sense!

With lots of debug statements, I found out that the 'config' object stopped
reading in *any* values after the 'slotToggleToolBar()' call in
'readProperties'.  That is, the config->readEntry calls would *always*
return the default, ignoring the saved value.

I traced into the slotToggleToolbar function and found that all I had
to do was comment out the 'enableToolbar' function and everything worked
perfectly!

I don't get it at all!  The enableToolbar function has *nothing* to do
with KConfig so how is it changing it all of a sudden :-(

Anyway, I moved the code around in readProperties and it works now.  Very
very very weird.

svn path=/trunk/kdebase/konsole/; revision=46262
wilder-portage
Kurt Granroth 26 years ago
parent e2935eb1c0
commit 347f56e400
  1. 15
      src/konsole.C

@ -535,18 +535,12 @@ void Konsole::readProperties(KConfig* config)
showFrame->setChecked( b_framevis );
slotToggleFrame();
showToolbar->setChecked(b_toolbarvis);
slotToggleToolbar();
showMenubar->setChecked(b_menuvis);
slotToggleMenubar();
toolBar()->setBarPos((KToolBar::BarPosition)n_toolbarpos);
// Options that should be applied to all sessions /////////////
// (1) set menu items and Konsole members
QFont tmpFont("fixed");
defaultFont = config->readFontEntry("defaultfont", &tmpFont);
setFont(QMIN(config->readUnsignedNumEntry("font",3),TOPFONT)); // sets n_font and menu item
setSchema(config->readEntry("schema",""));
setSchema(config->readEntry("schema", ""));
// (2) apply to sessions (currently only the 1st one)
// TESession* s = no2session.find(1);
@ -565,6 +559,13 @@ void Konsole::readProperties(KConfig* config)
// Default values for startup, changed by "save options". Not used by SM.
defaultSize.setWidth ( config->readNumEntry("defaultwidth", 0) );
defaultSize.setHeight( config->readNumEntry("defaultheight", 0) );
showToolbar->setChecked(b_toolbarvis);
slotToggleToolbar();
showMenubar->setChecked(b_menuvis);
slotToggleMenubar();
toolBar()->setBarPos((KToolBar::BarPosition)n_toolbarpos);
}
/* ------------------------------------------------------------------------- */

Loading…
Cancel
Save