summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-17 10:24:36 (UTC)
committer zautrix <zautrix>2004-09-17 10:24:36 (UTC)
commite8dac946bcd8c080b9abb74b45221ca0c5f268c7 (patch) (unidiff)
treebbe396a67d21dbc8a4b97ecd9c34496509fa0d36
parent9421138854b85a9baced09649f617118502610c1 (diff)
downloadkdepimpi-e8dac946bcd8c080b9abb74b45221ca0c5f268c7.zip
kdepimpi-e8dac946bcd8c080b9abb74b45221ca0c5f268c7.tar.gz
kdepimpi-e8dac946bcd8c080b9abb74b45221ca0c5f268c7.tar.bz2
Bugfix in password asking in kopi syncing
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index b1c7709..b597a6a 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1970,25 +1970,31 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
1970 i18n("Okay!")) ; 1970 i18n("Okay!")) ;
1971 setCaption ("KO/Pi"); 1971 setCaption ("KO/Pi");
1972 return; 1972 return;
1973 } 1973 }
1974 setCaption ( i18n( "Copying succeed." ) ); 1974 setCaption ( i18n( "Copying succeed." ) );
1975 //qDebug(" file **%s** ",prof->getLocalTempFile().latin1() ); 1975 //qDebug(" file **%s** ",prof->getLocalTempFile().latin1() );
1976 if ( syncWithFile( prof->getLocalTempFile(), true ) ) { 1976 if ( syncWithFile( prof->getLocalTempFile(), true ) ) {
1977// Event* e = mView->getLastSyncEvent(); 1977// Event* e = mView->getLastSyncEvent();
1978// e->setReadOnly( false ); 1978// e->setReadOnly( false );
1979// e->setLocation( KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]); 1979// e->setLocation( KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]);
1980// e->setReadOnly( true ); 1980// e->setReadOnly( true );
1981 if ( KOPrefs::instance()->mWriteBackFile ) { 1981 if ( KOPrefs::instance()->mWriteBackFile ) {
1982 command = prof->getPostSyncCommand(); 1982 command = prof->getPostSyncCommand();
1983 int fi;
1984 if ( (fi = command.find("$PWD$")) > 0 ) {
1985 QString pwd = getPassword();
1986 command = command.left( fi )+ pwd + command.mid( fi+5 );
1987
1988 }
1983 setCaption ( i18n( "Writing back file ..." ) ); 1989 setCaption ( i18n( "Writing back file ..." ) );
1984 result = system ( command ); 1990 result = system ( command );
1985 qDebug("KO: Writing back file result: %d ", result); 1991 qDebug("KO: Writing back file result: %d ", result);
1986 if ( result != 0 ) { 1992 if ( result != 0 ) {
1987 setCaption ( i18n( "Writing back file result: " )+QString::number( result ) ); 1993 setCaption ( i18n( "Writing back file result: " )+QString::number( result ) );
1988 return; 1994 return;
1989 } else { 1995 } else {
1990 setCaption ( i18n( "Syncronization sucessfully completed" ) ); 1996 setCaption ( i18n( "Syncronization sucessfully completed" ) );
1991 } 1997 }
1992 } 1998 }
1993 } 1999 }
1994 return; 2000 return;