summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp13
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
@@ -850,9 +850,10 @@ void MainWindow::initActions()
connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
}
void MainWindow::fillSyncMenu()
{
- syncMenu->clear();
+ if ( syncMenu->count() )
+ syncMenu->clear();
syncMenu->insertItem( i18n("Configure..."), 0 );
syncMenu->insertSeparator();
syncMenu->insertItem( i18n("Multiple sync"), 1 );
syncMenu->insertSeparator();
@@ -987,9 +988,14 @@ 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;
}
if ( action == 1 ) {
@@ -1911,11 +1917,8 @@ void MainWindow::quickSyncLocalFile()
void MainWindow::confSync()
{
mView->confSync();
fillSyncMenu();
- //mView->writeSettings();
-
-
}
void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
{
QString question;