summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-12 00:04:54 (UTC)
committer zautrix <zautrix>2004-09-12 00:04:54 (UTC)
commitd03369e14779dcbedb1e6a8882859664f818f588 (patch) (side-by-side diff)
treedbd76c26ae1b134ebb3497b6b4bdb695ec867be2
parent0a2900e71fd3d80393d67c81aab3aae19d2d680c (diff)
downloadkdepimpi-d03369e14779dcbedb1e6a8882859664f818f588.zip
kdepimpi-d03369e14779dcbedb1e6a8882859664f818f588.tar.gz
kdepimpi-d03369e14779dcbedb1e6a8882859664f818f588.tar.bz2
Fixed seqfault after sync config
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
@@ -848,13 +848,14 @@ void MainWindow::initActions()
connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
configureAgenda( p->mHourSize );
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();
KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
config.setGroup("General");
@@ -985,13 +986,18 @@ void MainWindow::multiSync( bool askforPrefs )
}
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 ) {
multiSync( true );
return;
@@ -1909,15 +1915,12 @@ void MainWindow::quickSyncLocalFile()
}
void MainWindow::confSync()
{
mView->confSync();
fillSyncMenu();
- //mView->writeSettings();
-
-
}
void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
{
QString question;
if ( ask ) {
question = i18n("Do you really want\nto remote sync\nwith profile \n")+ prof->getName()+" ?\n";