-rw-r--r-- | libkdepim/categoryeditdialog.h | 4 | ||||
-rw-r--r-- | libkdepim/categoryselectdialog.cpp | 1 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 9 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.h | 2 |
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 @@ -15,50 +15,50 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef KPIM_CATEGORYEDITDIALOG_H #define KPIM_CATEGORYEDITDIALOG_H #include <categoryeditdialog_base.h> #include <qlistview.h> class KPimPrefs; namespace KPIM { class CategorySelectItem :public QObject, public QCheckListItem { Q_OBJECT public: - CategorySelectItem(QListView * parent, const QString & text, Type tt) : - QCheckListItem (parent, text, tt ) , QObject( parent ) + CategorySelectItem(QListView * parent, const QString & text, Type tt) : QObject( parent ), + QCheckListItem (parent, text, tt ) {;} signals: void stateChanged( QListViewItem*); protected: virtual void stateChange(bool b) { QCheckListItem::stateChange(b); emit stateChanged( this ); } }; class CategoryEditDialog : public CategoryEditDialog_base { Q_OBJECT public: CategoryEditDialog( KPimPrefs *prefs, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~CategoryEditDialog(); diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp index a4e0024..2a9b43e 100644 --- a/libkdepim/categoryselectdialog.cpp +++ b/libkdepim/categoryselectdialog.cpp @@ -21,48 +21,49 @@ without including the source code for Qt in the source distribution. */ #include <qlistview.h> #include <qpushbutton.h> #include <qheader.h> #include <qapp.h> #include <qmessagebox.h> #include <kmessagebox.h> #include "categoryeditdialog.h" #include "categoryselectdialog.h" #include "kpimprefs.h" using namespace KPIM; CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent, const char* name, bool modal, WFlags fl ) : CategorySelectDialog_base( parent, name, true, fl ), mPrefs( prefs ) { + Q_UNUSED( modal ); mColorItem = 0; mColorEnabled = false; mCategories->header()->hide(); setCategories(); connect(mButtonEdit,SIGNAL(clicked()),this, SLOT(editCategoriesDialog())); if ( QApplication::desktop()->width() > 460 ) resize( 300, 360 ); else showMaximized(); connect( mSetColorCat, SIGNAL( clicked() ), this, SLOT( setColorCat() ) ); // connect( mCategories, SIGNAL( clicked(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) ); #ifndef DESKTOP_VERSION mButtonOk->hide(); mButtonCancel->hide(); #endif } void CategorySelectDialog::editCategoriesDialog() { KPIM::CategoryEditDialog* ced = new KPIM::CategoryEditDialog(mPrefs,this ); ced->exec(); delete ced; diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 0109c02..28c48fe 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -732,49 +732,48 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) postCommand = prof->getPostSyncCommand(); localTempFile = prof->getLocalTempFile(); break; case (PWMPI): preCommand = prof->getPreSyncCommandPWM(); postCommand = prof->getPostSyncCommandPWM(); localTempFile = prof->getLocalTempFilePWM(); break; default: qDebug("KSM::syncRemote: invalid apptype selected"); break; } int fi; if ( (fi = preCommand.find("$PWD$")) > 0 ) { QString pwd = getPassword(); preCommand = preCommand.left( fi )+ pwd + preCommand.mid( fi+5 ); } int maxlen = 30; if ( QApplication::desktop()->width() > 320 ) maxlen += 25; mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) ); - int fileSize = 0; int result = system ( preCommand ); // 0 : okay // 256: no such file or dir // qDebug("KSM::Sync: Remote copy result(0 = okay): %d ",result ); if ( result != 0 ) { unsigned int len = maxlen; while ( len < preCommand.length() ) { preCommand.insert( len , "\n" ); len += maxlen +2; } 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) ; QMessageBox::information( mParent, i18n("Sync - ERROR"), question, i18n("Okay!")) ; mParent->topLevelWidget()->setCaption ("KDE-Pim"); return; } mParent->topLevelWidget()->setCaption ( i18n( "Copying succeed." ) ); //qDebug(" file **%s** ",prof->getLocalTempFile().latin1() ); if ( syncWithFile( localTempFile, true ) ) { if ( mWriteBackFile ) { @@ -903,49 +902,49 @@ QString KSyncManager::getPassword( ) retfile = lab.text(); dia.hide(); qApp->processEvents(); return retfile; } void KSyncManager::confSync() { static KSyncPrefsDialog* sp = 0; if ( ! sp ) { sp = new KSyncPrefsDialog( mParent, "syncprefs", true ); } sp->usrReadConfig(); #ifndef DESKTOP_VERSION sp->showMaximized(); #else sp->show(); #endif sp->exec(); QStringList oldSyncProfileNames = mSyncProfileNames; mSyncProfileNames = sp->getSyncProfileNames(); mLocalMachineName = sp->getLocalMachineName (); - int ii; + uint ii; for ( ii = 0; ii < oldSyncProfileNames.count(); ++ii ) { if ( ! mSyncProfileNames.contains( oldSyncProfileNames[ii] ) ) mImplementation->removeSyncInfo( oldSyncProfileNames[ii] ); } QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); } void KSyncManager::syncKDE() { mSyncWithDesktop = true; emit save(); switch(mTargetApp) { case (KAPI): { #ifdef DESKTOP_VERSION QString command = "kdeabdump33"; QString commandfile = "kdeabdump33"; QString commandpath = qApp->applicationDirPath () + "/"; #else QString command = "kdeabdump33"; QString commandfile = "kdeabdump33"; QString commandpath = QDir::homeDirPath ()+"/"; #endif if ( ! QFile::exists ( commandpath+commandfile ) ) @@ -1120,57 +1119,57 @@ QString KSyncManager::syncFileName() #endif } void KSyncManager::syncPi() { mIsKapiFile = true; mPisyncFinished = false; qApp->processEvents(); if ( mAskForPreferences ) if ( !edit_pisync_options()) { mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); mPisyncFinished = true; return; } bool ok; Q_UINT16 port = mActiveSyncPort.toUInt(&ok); if ( ! ok ) { mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); mPisyncFinished = true; return; } mCurrentResourceLocal = ""; mCurrentResourceRemote = ""; if ( mSpecificResources.count() ) { - int lastSyncRes = mSpecificResources.count()/2; + uint lastSyncRes = mSpecificResources.count()/2; int ccc = mSpecificResources.count()-1; while ( lastSyncRes > 0 && ccc > 0 && mSpecificResources[ ccc ].isEmpty() ) { --ccc; --lastSyncRes; //qDebug ( "KSM: sync pi %d",ccc ); } - int startLocal = 0; - int startRemote = mSpecificResources.count()/2; + uint startLocal = 0; + uint startRemote = mSpecificResources.count()/2; emit multiResourceSyncStart( true ); while ( startLocal < mSpecificResources.count()/2 ) { if ( startLocal+1 >= lastSyncRes ) emit multiResourceSyncStart( false ); mPisyncFinished = false; mCurrentResourceLocal = mSpecificResources[ startLocal ]; mCurrentResourceRemote = mSpecificResources[ startRemote ]; //qDebug ( "KSM: AAASyncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); if ( !mCurrentResourceRemote.isEmpty() ) { qDebug ( "KSM: Syncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); KCommandSocket* commandSocket = new KCommandSocket( mCurrentResourceRemote, mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); commandSocket->readFile( syncFileName() ); mParent->topLevelWidget()->setCaption( i18n("Syncing %1 <-> %2").arg( mCurrentResourceLocal ).arg( mCurrentResourceRemote ) ); while ( !mPisyncFinished ) { //qDebug("waiting "); qApp->processEvents(); } if ( startLocal+1 < mSpecificResources.count()/2 ) { mParent->topLevelWidget()->setCaption( i18n("Waiting 2 secs before syncing next resource...") ); QTime timer; timer.start(); while ( timer.elapsed () < 2000 ) { diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 604adb8..04cdade 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h @@ -214,36 +214,36 @@ class KSyncManager : public QObject QStringList mSpecificResources; QString mCurrentResourceLocal; QString mCurrentResourceRemote; bool mBlockSaveFlag; QWidget* mParent; KSyncInterface* mImplementation; TargetApp mTargetApp; QPopupMenu* mSyncMenu; QProgressBar* bar; bool mSyncWithDesktop; private slots: void displayErrorPort(); void confSync(); }; class KSyncInterface { public : virtual void removeSyncInfo( QString syncProfile) = 0; virtual bool sync(KSyncManager* manager, QString filename, int mode, QString resource) = 0; - virtual bool syncExternal(KSyncManager* manager, QString resource) + virtual bool syncExternal(KSyncManager* /*manager*/, QString /*resource*/) { // empty implementation, because some syncable applications do not // have an external(sharpdtm) syncmode, like pwmanager. return false; } }; #endif |