summaryrefslogtreecommitdiffabout
path: root/libkdepim
Side-by-side diff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp16
-rw-r--r--libkdepim/ksyncmanager.h1
2 files changed, 15 insertions, 2 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index feb184b..e09050e 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -56,4 +56,7 @@
#include <kfiledialog.h>
+QDateTime KSyncManager::mRequestedSyncEvent;
+
+
KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu)
: QObject(), mParent(parent), mImplementation(implementation), mTargetApp(ta), mPrefs(prefs ),mSyncMenu(syncmenu)
@@ -1112,7 +1115,14 @@ void KServerSocket::readClient()
QStringList tokens = QStringList::split( QRegExp("[ \r\n][ \r\n]*"), line );
if ( tokens[0] == "GET" ) {
- if ( tokens[1] == mPassWord )
+ if ( tokens[1] == mPassWord ) {
//emit sendFile( mSocket );
+ bool ok = false;
+ QDateTime dt = KGlobal::locale()->readDateTime( tokens[2], KLocale::ISODate, &ok);
+ if ( ok )
+ KSyncManager::mRequestedSyncEvent = dt;
+ else
+ KSyncManager::mRequestedSyncEvent = QDateTime();
send_file();
+ }
else {
KMessageBox::error( 0, i18n("Got send file request\nwith invalid password"));
@@ -1268,5 +1278,7 @@ void KCommandSocket::readFile( QString fn )
QTextStream os( mSocket );
os.setEncoding( QTextStream::Latin1 );
- os << "GET " << mPassWord << "\r\n";
+
+ QString curDt = KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate );
+ os << "GET " << mPassWord << curDt <<"\r\n";
mTimerSocket->start( 20000 );
}
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index aa32e28..2af891b 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -147,4 +147,5 @@ class KSyncManager : public QObject
QString mActiveSyncPort;
QString mActiveSyncIP ;
+ static QDateTime mRequestedSyncEvent;
signals: