-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 | |||
@@ -852,5 +852,6 @@ void MainWindow::initActions() | |||
852 | void MainWindow::fillSyncMenu() | 852 | void MainWindow::fillSyncMenu() |
853 | { | 853 | { |
854 | syncMenu->clear(); | 854 | if ( syncMenu->count() ) |
855 | syncMenu->clear(); | ||
855 | syncMenu->insertItem( i18n("Configure..."), 0 ); | 856 | syncMenu->insertItem( i18n("Configure..."), 0 ); |
856 | syncMenu->insertSeparator(); | 857 | syncMenu->insertSeparator(); |
@@ -989,5 +990,10 @@ void MainWindow::slotSyncMenu( int action ) | |||
989 | if ( action == 0 ) { | 990 | if ( action == 0 ) { |
990 | 991 | ||
991 | confSync(); | 992 | // seems to be a Qt2 event handling bug |
993 | // syncmenu.clear causes a segfault at first time | ||
994 | // when we call it after the main event loop, it is ok | ||
995 | // same behaviour when calling OM/Pi via QCOP for the first time | ||
996 | QTimer::singleShot ( 1, this, SLOT ( confSync() ) ); | ||
997 | //confSync(); | ||
992 | 998 | ||
993 | return; | 999 | return; |
@@ -1913,7 +1919,4 @@ void MainWindow::confSync() | |||
1913 | mView->confSync(); | 1919 | mView->confSync(); |
1914 | fillSyncMenu(); | 1920 | fillSyncMenu(); |
1915 | //mView->writeSettings(); | ||
1916 | |||
1917 | |||
1918 | } | 1921 | } |
1919 | void MainWindow::syncRemote( KSyncProfile* prof, bool ask) | 1922 | void MainWindow::syncRemote( KSyncProfile* prof, bool ask) |