[PATCH] Bugfix for #50495

Tobias Koenig tokoe at kde.org
Fri Oct 31 02:10:36 GMT 2003


Hi,

the attached patch solves http://bugs.kde.org/show_bug.cgi?id=50495 for
me. Can I commit?

Ciao,
Tobias
-- 
Can a government that shoots at reporters be democratic?
Separate politics from religion and economy!
-------------- next part --------------
? preloader/preloader_skel.cpp
Index: konq_mainwindow.cc
===================================================================
RCS file: /home/kde/kdebase/konqueror/konq_mainwindow.cc,v
retrieving revision 1.1251
diff -p -u -b -r1.1251 konq_mainwindow.cc
--- konq_mainwindow.cc	30 Oct 2003 15:48:21 -0000	1.1251
+++ konq_mainwindow.cc	31 Oct 2003 02:09:33 -0000
@@ -366,8 +366,8 @@ void KonqMainWindow::initBookmarkBar()
   KToolBar * bar = static_cast<KToolBar *>( child( "bookmarkToolBar", "KToolBar" ) );
 
   if (!bar) return;
-  if (m_paBookmarkBar) return;
 
+  delete m_paBookmarkBar;
   m_paBookmarkBar = new KBookmarkBar( KonqBookmarkManager::self(), m_pBookmarksOwner, bar, m_bookmarkBarActionCollection, this );
   connect( m_paBookmarkBar,
            SIGNAL( aboutToShowContextMenu(const KBookmark &, QPopupMenu*) ),
@@ -376,7 +376,6 @@ void KonqMainWindow::initBookmarkBar()
   // hide if empty
   if (bar->count() == 0 )
      bar->hide();
-
 }
 
 void KonqMainWindow::removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id )
@@ -1700,8 +1699,11 @@ void KonqMainWindow::slotConfigureToolba
     saveMainWindowSettings( KGlobal::config(), "KonqMainWindow" );
   KEditToolbar dlg(factory());
   connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
-  if ( dlg.exec() )
+  connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(initBookmarkBar()));
+  if ( dlg.exec() ) {
     createGUI( m_pViewManager->activePart() );
+    initBookmarkBar();
+  }
 }
 
 void KonqMainWindow::slotNewToolbarConfig() // This is called when OK or Apply is clicked
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031031/8a39e62b/attachment.sig>


More information about the kde-core-devel mailing list