diff options
| author | 2011-02-18 19:55:17 +0000 | |
|---|---|---|
| committer | 2011-02-18 19:55:17 +0000 | |
| commit | 3256e96cfac18d7a13f2e0a2d9ff229d651ee7dd (patch) | |
| tree | 7d38694ec9d6ac5c0ac666761ff317f1b1b78b5d /src/modules/objects/KvsObject_ftp.cpp | |
| parent | Code improvements and fixes in kvs class ftp (diff) | |
| download | KVIrc-3256e96cfac18d7a13f2e0a2d9ff229d651ee7dd.tar.gz KVIrc-3256e96cfac18d7a13f2e0a2d9ff229d651ee7dd.tar.bz2 KVIrc-3256e96cfac18d7a13f2e0a2d9ff229d651ee7dd.zip | |
style fix and added omitted commands; updated italian translation
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5484 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/objects/KvsObject_ftp.cpp')
| -rw-r--r-- | src/modules/objects/KvsObject_ftp.cpp | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/src/modules/objects/KvsObject_ftp.cpp b/src/modules/objects/KvsObject_ftp.cpp index 7588ceb05..5fd27968d 100644 --- a/src/modules/objects/KvsObject_ftp.cpp +++ b/src/modules/objects/KvsObject_ftp.cpp @@ -223,28 +223,43 @@ KVSO_CLASS_FUNCTION(ftp,commandFinishedEvent) return true; } -void KvsObject_ftp::slotCommandFinished ( int id, bool error ) +void KvsObject_ftp::slotCommandFinished(int iId, bool bError) { - QString szCommand=""; - if (m_pFtp->currentCommand()==QFtp::Get || m_pFtp->currentCommand()==QFtp::Put) - delete m_pFtp->currentDevice(); - if (m_pFtp->currentCommand()==QFtp:: Login) szCommand="login"; - else if (m_pFtp->currentCommand()==QFtp:: Cd) szCommand="cd"; - else if (m_pFtp->currentCommand()==QFtp:: List) szCommand="list"; - else if (m_pFtp->currentCommand()==QFtp:: None) szCommand="none"; - else if (m_pFtp->currentCommand()==QFtp:: SetTransferMode) szCommand="setTransferMode"; - else if (m_pFtp->currentCommand()==QFtp:: SetProxy) szCommand="setProxy"; - else if (m_pFtp->currentCommand()==QFtp:: ConnectToHost) szCommand="connectToHost"; - else if (m_pFtp->currentCommand()==QFtp:: Put) szCommand="put"; - else if (m_pFtp->currentCommand()==QFtp:: Get) szCommand="get"; - else if (m_pFtp->currentCommand()==QFtp:: Remove) szCommand="remove"; - else if (m_pFtp->currentCommand()==QFtp:: Mkdir) szCommand="mkdir"; - else if (m_pFtp->currentCommand()==QFtp:: Rmdir) szCommand="rmdir"; - else if (m_pFtp->currentCommand()==QFtp:: RawCommand) szCommand="rawCommand"; + QString szCommand = ""; + + switch(m_pFtp->currentCommand()) + { + case QFtp::None: szCommand = "none"; break; + case QFtp::SetTransferMode: szCommand = "setTransferMode"; break; + case QFtp::SetProxy: szCommand = "setProxy"; break; + case QFtp::ConnectToHost: szCommand = "connectToHost"; break; + case QFtp::Login: szCommand = "login"; break; + case QFtp::Close: szCommand = "close"; break; + case QFtp::List: szCommand = "list"; break; + case QFtp::Cd: szCommand = "cd"; break; + case QFtp::Get: + { + delete m_pFtp->currentDevice(); + szCommand = "get"; + break; + } + case QFtp::Put: + { + delete m_pFtp->currentDevice(); + szCommand = "put"; + break; + } + case QFtp::Remove: szCommand = "remove"; break; + case QFtp::Mkdir: szCommand = "mkdir"; break; + case QFtp::Rmdir: szCommand = "rmdir"; break; + case QFtp::Rename: szCommand = "rename"; break; + case QFtp::RawCommand: szCommand = "rawCommand"; break; + } + KviKvsVariantList lParams; - lParams.append(new KviKvsVariant((kvs_int_t) id)); + lParams.append(new KviKvsVariant((kvs_int_t)iId)); lParams.append(new KviKvsVariant(szCommand)); - lParams.append(new KviKvsVariant(error)); + lParams.append(new KviKvsVariant(bError)); callFunction(this,"commandFinishedEvent",0,&lParams); } |
