From d03369e14779dcbedb1e6a8882859664f818f588 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 12 Sep 2004 00:04:54 +0000 Subject: Fixed seqfault after sync config --- (limited to 'korganizer/mainwindow.cpp') diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 9e326a1..d8aa43a 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -851,7 +851,8 @@ void MainWindow::initActions() } void MainWindow::fillSyncMenu() { - syncMenu->clear(); + if ( syncMenu->count() ) + syncMenu->clear(); syncMenu->insertItem( i18n("Configure..."), 0 ); syncMenu->insertSeparator(); syncMenu->insertItem( i18n("Multiple sync"), 1 ); @@ -988,7 +989,12 @@ void MainWindow::slotSyncMenu( int action ) //qDebug("syncaction %d ", action); if ( action == 0 ) { - 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(); return; } @@ -1912,9 +1918,6 @@ void MainWindow::confSync() { mView->confSync(); fillSyncMenu(); - //mView->writeSettings(); - - } void MainWindow::syncRemote( KSyncProfile* prof, bool ask) { -- cgit v0.9.0.2