From be39d41e086d81a73c0bfa24c439f062d3fcf1ed Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Fri, 12 Sep 2008 16:23:27 +0000 Subject: compilation fixes (objects module) fixes for filetransferwindow git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@2443 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/objects/class_ftp.cpp | 109 +++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 54 deletions(-) (limited to 'src/modules/objects/class_ftp.cpp') diff --git a/src/modules/objects/class_ftp.cpp b/src/modules/objects/class_ftp.cpp index d42178cef..82716c3a2 100644 --- a/src/modules/objects/class_ftp.cpp +++ b/src/modules/objects/class_ftp.cpp @@ -167,76 +167,77 @@ bool KviKvsObject_ftp::function_commandFinishedEvent(KviKvsObjectFunctionCall *c return true; } -void KviKvsObject_ftp::slotCommandFinished ( int id, bool error ) -{ - QString status=""; - if (m_pFtp->currentCommand()==QFtp::Get){ - status="Finished to load"; - m_pFile->close(); - delete m_pFile; - } - else if (m_pFtp->currentCommand()==QFtp:: ConnectToHost) status="connected"; - else if (m_pFtp->currentCommand()==QFtp:: Login) status="logged"; - else if (m_pFtp->currentCommand()==QFtp:: Cd) status="entered"; - else if (m_pFtp->currentCommand()==QFtp:: List) status="listCompleted"; +void KviKvsObject_ftp::slotCommandFinished ( int id, bool error ) +{ + QString status=""; + if (m_pFtp->currentCommand()==QFtp::Get){ + status="Finished to load"; + m_pFile->close(); + delete m_pFile; + } + else if (m_pFtp->currentCommand()==QFtp:: ConnectToHost) status="connected"; + else if (m_pFtp->currentCommand()==QFtp:: Login) status="logged"; + else if (m_pFtp->currentCommand()==QFtp:: Cd) status="entered"; + else if (m_pFtp->currentCommand()==QFtp:: List) status="listCompleted"; callFunction(this,"commandFinishedEvent",0,new KviKvsVariantList(new KviKvsVariant((kvs_int_t) id), - new KviKvsVariant(status),new KviKvsVariant(error))); -} - -void KviKvsObject_ftp::slotCommandStarted ( int id ) -{ -} - -void KviKvsObject_ftp::slotDataTransferProgress ( qint64 done, qint64 total ) -{ + new KviKvsVariant(status),new KviKvsVariant(error))); +} + +void KviKvsObject_ftp::slotCommandStarted ( int id ) +{ +} + +void KviKvsObject_ftp::slotDataTransferProgress ( qint64 done, qint64 total ) +{ + //FIXME qint64 to kvs_int_t cast callFunction(this,"dataTransferProgressEvent",0,new KviKvsVariantList( - new KviKvsVariant(done),new KviKvsVariant(total))); -} + new KviKvsVariant((kvs_int_t) done),new KviKvsVariant((kvs_int_t) total))); +} bool KviKvsObject_ftp::function_dataTransferProgressEvent(KviKvsObjectFunctionCall *c) { emitSignal("dataTransferProgress",c,c->params()); return true; -} -void KviKvsObject_ftp::slotDone ( bool error ) -{ -} - -void KviKvsObject_ftp::slotListInfo ( const QUrlInfo & i ) -{ +} +void KviKvsObject_ftp::slotDone ( bool error ) +{ +} + +void KviKvsObject_ftp::slotListInfo ( const QUrlInfo & i ) +{ callFunction(this,"listInfoEvent",0,new KviKvsVariantList( - new KviKvsVariant(i.name()))); - -} + new KviKvsVariant(i.name()))); + +} bool KviKvsObject_ftp::function_listInfoEvent(KviKvsObjectFunctionCall *c) { emitSignal("listInfo",c,c->params()); return true; -} -void KviKvsObject_ftp::slotRawCommandReply ( int replyCode, const QString & detail ) -{ -} - -void KviKvsObject_ftp::slotReadyRead () -{ -} - -void KviKvsObject_ftp::slotStateChanged ( int state) -{ - QString szState=""; - if (state==QFtp::Unconnected) szState="Unconnected"; - else if (state==QFtp::HostLookup) szState="HostLookup"; - else if (state==QFtp::Connecting) szState="Connecting"; - else if (state==QFtp::Connected) szState="Connected"; - else if (state==QFtp::LoggedIn) szState="LoggedIn"; - else if (state==QFtp::Closing) szState="Closing"; +} +void KviKvsObject_ftp::slotRawCommandReply ( int replyCode, const QString & detail ) +{ +} + +void KviKvsObject_ftp::slotReadyRead () +{ +} + +void KviKvsObject_ftp::slotStateChanged ( int state) +{ + QString szState=""; + if (state==QFtp::Unconnected) szState="Unconnected"; + else if (state==QFtp::HostLookup) szState="HostLookup"; + else if (state==QFtp::Connecting) szState="Connecting"; + else if (state==QFtp::Connected) szState="Connected"; + else if (state==QFtp::LoggedIn) szState="LoggedIn"; + else if (state==QFtp::Closing) szState="Closing"; callFunction(this,"stateChangedEvent",0,new KviKvsVariantList( - new KviKvsVariant(szState))); -} + new KviKvsVariant(szState))); +} bool KviKvsObject_ftp::function_stateChangedEvent(KviKvsObjectFunctionCall *c) { emitSignal("stateChanged",c,c->params()); return true; -} +} #ifndef COMPILE_USE_STANDALONE_MOC_SOURCES #include "m_class_ftp.moc" #endif //!COMPILE_USE_STANDALONE_MOC_SOURCES -- cgit v1.3.1-10-gc9f91