summaryrefslogtreecommitdiffabout
path: root/libkdepim
Unidiff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/categoryeditdialog.h4
-rw-r--r--libkdepim/categoryselectdialog.cpp1
-rw-r--r--libkdepim/ksyncmanager.cpp9
-rw-r--r--libkdepim/ksyncmanager.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/libkdepim/categoryeditdialog.h b/libkdepim/categoryeditdialog.h
index 3e8ab45..9bb3201 100644
--- a/libkdepim/categoryeditdialog.h
+++ b/libkdepim/categoryeditdialog.h
@@ -27,26 +27,26 @@
27#include <qlistview.h> 27#include <qlistview.h>
28 28
29class KPimPrefs; 29class KPimPrefs;
30 30
31namespace KPIM { 31namespace KPIM {
32 32
33 class CategorySelectItem :public QObject, public QCheckListItem 33 class CategorySelectItem :public QObject, public QCheckListItem
34{ 34{
35 35
36 Q_OBJECT 36 Q_OBJECT
37 public: 37 public:
38 38
39 CategorySelectItem(QListView * parent, const QString & text, Type tt) : 39 CategorySelectItem(QListView * parent, const QString & text, Type tt) : QObject( parent ),
40 QCheckListItem (parent, text, tt ) , QObject( parent ) 40 QCheckListItem (parent, text, tt )
41 {;} 41 {;}
42 42
43 signals: 43 signals:
44 void stateChanged( QListViewItem*); 44 void stateChanged( QListViewItem*);
45 45
46 protected: 46 protected:
47 47
48 virtual void stateChange(bool b) 48 virtual void stateChange(bool b)
49 { 49 {
50 QCheckListItem::stateChange(b); 50 QCheckListItem::stateChange(b);
51 emit stateChanged( this ); 51 emit stateChanged( this );
52 } 52 }
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp
index a4e0024..2a9b43e 100644
--- a/libkdepim/categoryselectdialog.cpp
+++ b/libkdepim/categoryselectdialog.cpp
@@ -33,24 +33,25 @@
33#include "categoryselectdialog.h" 33#include "categoryselectdialog.h"
34 34
35#include "kpimprefs.h" 35#include "kpimprefs.h"
36 36
37using namespace KPIM; 37using namespace KPIM;
38 38
39CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent, 39CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent,
40 const char* name, 40 const char* name,
41 bool modal, WFlags fl ) 41 bool modal, WFlags fl )
42 : CategorySelectDialog_base( parent, name, true, fl ), 42 : CategorySelectDialog_base( parent, name, true, fl ),
43 mPrefs( prefs ) 43 mPrefs( prefs )
44{ 44{
45 Q_UNUSED( modal );
45 mColorItem = 0; 46 mColorItem = 0;
46 mColorEnabled = false; 47 mColorEnabled = false;
47 mCategories->header()->hide(); 48 mCategories->header()->hide();
48 49
49 setCategories(); 50 setCategories();
50 51
51 connect(mButtonEdit,SIGNAL(clicked()),this, SLOT(editCategoriesDialog())); 52 connect(mButtonEdit,SIGNAL(clicked()),this, SLOT(editCategoriesDialog()));
52 if ( QApplication::desktop()->width() > 460 ) 53 if ( QApplication::desktop()->width() > 460 )
53 resize( 300, 360 ); 54 resize( 300, 360 );
54 else 55 else
55 showMaximized(); 56 showMaximized();
56 connect( mSetColorCat, SIGNAL( clicked() ), this, SLOT( setColorCat() ) ); 57 connect( mSetColorCat, SIGNAL( clicked() ), this, SLOT( setColorCat() ) );
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 0109c02..28c48fe 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -744,25 +744,24 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask)
744 744
745 745
746 int fi; 746 int fi;
747 if ( (fi = preCommand.find("$PWD$")) > 0 ) { 747 if ( (fi = preCommand.find("$PWD$")) > 0 ) {
748 QString pwd = getPassword(); 748 QString pwd = getPassword();
749 preCommand = preCommand.left( fi )+ pwd + preCommand.mid( fi+5 ); 749 preCommand = preCommand.left( fi )+ pwd + preCommand.mid( fi+5 );
750 750
751 } 751 }
752 int maxlen = 30; 752 int maxlen = 30;
753 if ( QApplication::desktop()->width() > 320 ) 753 if ( QApplication::desktop()->width() > 320 )
754 maxlen += 25; 754 maxlen += 25;
755 mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) ); 755 mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) );
756 int fileSize = 0;
757 int result = system ( preCommand ); 756 int result = system ( preCommand );
758 // 0 : okay 757 // 0 : okay
759 // 256: no such file or dir 758 // 256: no such file or dir
760 // 759 //
761 qDebug("KSM::Sync: Remote copy result(0 = okay): %d ",result ); 760 qDebug("KSM::Sync: Remote copy result(0 = okay): %d ",result );
762 if ( result != 0 ) { 761 if ( result != 0 ) {
763 unsigned int len = maxlen; 762 unsigned int len = maxlen;
764 while ( len < preCommand.length() ) { 763 while ( len < preCommand.length() ) {
765 preCommand.insert( len , "\n" ); 764 preCommand.insert( len , "\n" );
766 len += maxlen +2; 765 len += maxlen +2;
767 } 766 }
768 question = i18n("Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n").arg (preCommand) ; 767 question = i18n("Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n").arg (preCommand) ;
@@ -915,25 +914,25 @@ void KSyncManager::confSync()
915 sp = new KSyncPrefsDialog( mParent, "syncprefs", true ); 914 sp = new KSyncPrefsDialog( mParent, "syncprefs", true );
916 } 915 }
917 sp->usrReadConfig(); 916 sp->usrReadConfig();
918#ifndef DESKTOP_VERSION 917#ifndef DESKTOP_VERSION
919 sp->showMaximized(); 918 sp->showMaximized();
920#else 919#else
921 sp->show(); 920 sp->show();
922#endif 921#endif
923 sp->exec(); 922 sp->exec();
924 QStringList oldSyncProfileNames = mSyncProfileNames; 923 QStringList oldSyncProfileNames = mSyncProfileNames;
925 mSyncProfileNames = sp->getSyncProfileNames(); 924 mSyncProfileNames = sp->getSyncProfileNames();
926 mLocalMachineName = sp->getLocalMachineName (); 925 mLocalMachineName = sp->getLocalMachineName ();
927 int ii; 926 uint ii;
928 for ( ii = 0; ii < oldSyncProfileNames.count(); ++ii ) { 927 for ( ii = 0; ii < oldSyncProfileNames.count(); ++ii ) {
929 if ( ! mSyncProfileNames.contains( oldSyncProfileNames[ii] ) ) 928 if ( ! mSyncProfileNames.contains( oldSyncProfileNames[ii] ) )
930 mImplementation->removeSyncInfo( oldSyncProfileNames[ii] ); 929 mImplementation->removeSyncInfo( oldSyncProfileNames[ii] );
931 } 930 }
932 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); 931 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
933} 932}
934void KSyncManager::syncKDE() 933void KSyncManager::syncKDE()
935{ 934{
936 mSyncWithDesktop = true; 935 mSyncWithDesktop = true;
937 emit save(); 936 emit save();
938 switch(mTargetApp) 937 switch(mTargetApp)
939 { 938 {
@@ -1132,33 +1131,33 @@ void KSyncManager::syncPi()
1132 return; 1131 return;
1133 } 1132 }
1134 bool ok; 1133 bool ok;
1135 Q_UINT16 port = mActiveSyncPort.toUInt(&ok); 1134 Q_UINT16 port = mActiveSyncPort.toUInt(&ok);
1136 if ( ! ok ) { 1135 if ( ! ok ) {
1137 mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); 1136 mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") );
1138 mPisyncFinished = true; 1137 mPisyncFinished = true;
1139 return; 1138 return;
1140 } 1139 }
1141 mCurrentResourceLocal = ""; 1140 mCurrentResourceLocal = "";
1142 mCurrentResourceRemote = ""; 1141 mCurrentResourceRemote = "";
1143 if ( mSpecificResources.count() ) { 1142 if ( mSpecificResources.count() ) {
1144 int lastSyncRes = mSpecificResources.count()/2; 1143 uint lastSyncRes = mSpecificResources.count()/2;
1145 int ccc = mSpecificResources.count()-1; 1144 int ccc = mSpecificResources.count()-1;
1146 while ( lastSyncRes > 0 && ccc > 0 && mSpecificResources[ ccc ].isEmpty() ) { 1145 while ( lastSyncRes > 0 && ccc > 0 && mSpecificResources[ ccc ].isEmpty() ) {
1147 --ccc; 1146 --ccc;
1148 --lastSyncRes; 1147 --lastSyncRes;
1149 //qDebug ( "KSM: sync pi %d",ccc ); 1148 //qDebug ( "KSM: sync pi %d",ccc );
1150 } 1149 }
1151 int startLocal = 0; 1150 uint startLocal = 0;
1152 int startRemote = mSpecificResources.count()/2; 1151 uint startRemote = mSpecificResources.count()/2;
1153 emit multiResourceSyncStart( true ); 1152 emit multiResourceSyncStart( true );
1154 while ( startLocal < mSpecificResources.count()/2 ) { 1153 while ( startLocal < mSpecificResources.count()/2 ) {
1155 if ( startLocal+1 >= lastSyncRes ) 1154 if ( startLocal+1 >= lastSyncRes )
1156 emit multiResourceSyncStart( false ); 1155 emit multiResourceSyncStart( false );
1157 mPisyncFinished = false; 1156 mPisyncFinished = false;
1158 mCurrentResourceLocal = mSpecificResources[ startLocal ]; 1157 mCurrentResourceLocal = mSpecificResources[ startLocal ];
1159 mCurrentResourceRemote = mSpecificResources[ startRemote ]; 1158 mCurrentResourceRemote = mSpecificResources[ startRemote ];
1160 //qDebug ( "KSM: AAASyncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); 1159 //qDebug ( "KSM: AAASyncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() );
1161 if ( !mCurrentResourceRemote.isEmpty() ) { 1160 if ( !mCurrentResourceRemote.isEmpty() ) {
1162 qDebug ( "KSM: Syncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); 1161 qDebug ( "KSM: Syncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() );
1163 1162
1164 KCommandSocket* commandSocket = new KCommandSocket( mCurrentResourceRemote, mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); 1163 KCommandSocket* commandSocket = new KCommandSocket( mCurrentResourceRemote, mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() );
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 604adb8..04cdade 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -226,24 +226,24 @@ private slots:
226 void displayErrorPort(); 226 void displayErrorPort();
227 void confSync(); 227 void confSync();
228 228
229 229
230}; 230};
231 231
232 232
233class KSyncInterface 233class KSyncInterface
234{ 234{
235 public : 235 public :
236 virtual void removeSyncInfo( QString syncProfile) = 0; 236 virtual void removeSyncInfo( QString syncProfile) = 0;
237 virtual bool sync(KSyncManager* manager, QString filename, int mode, QString resource) = 0; 237 virtual bool sync(KSyncManager* manager, QString filename, int mode, QString resource) = 0;
238 virtual bool syncExternal(KSyncManager* manager, QString resource) 238 virtual bool syncExternal(KSyncManager* /*manager*/, QString /*resource*/)
239 { 239 {
240 // empty implementation, because some syncable applications do not 240 // empty implementation, because some syncable applications do not
241 // have an external(sharpdtm) syncmode, like pwmanager. 241 // have an external(sharpdtm) syncmode, like pwmanager.
242 return false; 242 return false;
243 } 243 }
244 244
245 245
246}; 246};
247 247
248 248
249#endif 249#endif