-rw-r--r-- | korganizer/mainwindow.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 9e326a1..d8aa43a 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -853,3 +853,4 @@ void MainWindow::fillSyncMenu() { - syncMenu->clear(); + if ( syncMenu->count() ) + syncMenu->clear(); syncMenu->insertItem( i18n("Configure..."), 0 ); @@ -990,3 +991,8 @@ void MainWindow::slotSyncMenu( int action ) - confSync(); + // seems to be a Qt2 event handling bug + // syncmenu.clear causes a segfault at first time + // when we call it after the main event loop, it is ok + // same behaviour when calling OM/Pi via QCOP for the first time + QTimer::singleShot ( 1, this, SLOT ( confSync() ) ); + //confSync(); @@ -1914,5 +1920,2 @@ void MainWindow::confSync() fillSyncMenu(); - //mView->writeSettings(); - - } |