summaryrefslogtreecommitdiffabout
path: root/libkdepim/phoneaccess.cpp
Unidiff
Diffstat (limited to 'libkdepim/phoneaccess.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/phoneaccess.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp
index 357cd39..fe914dd 100644
--- a/libkdepim/phoneaccess.cpp
+++ b/libkdepim/phoneaccess.cpp
@@ -122,26 +122,30 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
122 QTextStream ts( &file ); 122 QTextStream ts( &file );
123 ts << content ; 123 ts << content ;
124 file.close(); 124 file.close();
125 } 125 }
126 126
127} 127}
128 128
129 129
130bool PhoneAccess::writeToPhone( QString fileName) 130bool PhoneAccess::writeToPhone( QString fileName)
131{ 131{
132 132
133#ifdef DESKTOP_VERSION 133#ifdef DESKTOP_VERSION
134#ifdef _WIN32_
135 QString command ="kammu --restore " + fileName ;
136#else
134 QString command ="./kammu --restore " + fileName ; 137 QString command ="./kammu --restore " + fileName ;
138#endif
135#else 139#else
136 QString command ="kammu --restore " + fileName ; 140 QString command ="kammu --restore " + fileName ;
137#endif 141#endif
138 int ret; 142 int ret;
139 while ( (ret = system ( command.latin1())) != 0 ) { 143 while ( (ret = system ( command.latin1())) != 0 ) {
140 qDebug("Error S::command returned %d. asking users", ret); 144 qDebug("Error S::command returned %d.", ret);
141 int retval = KMessageBox::warningContinueCancel(0, 145 int retval = KMessageBox::warningContinueCancel(0,
142 i18n("Error accessing device!\nPlease turn on connection\nand retry!"),i18n("KO/Pi phone access"),i18n("Retry"),i18n("Cancel")); 146 i18n("Error accessing device!\nPlease turn on connection\nand retry!"),i18n("KO/Pi phone access"),i18n("Retry"),i18n("Cancel"));
143 if ( retval != KMessageBox::Continue ) 147 if ( retval != KMessageBox::Continue )
144 return false; 148 return false;
145 } 149 }
146 return true; 150 return true;
147} 151}