summaryrefslogtreecommitdiffstats
path: root/korn/tdeio_subjects.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-09-03 20:02:55 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-09-03 21:02:00 +0200
commit533bad2a1503973aaf8186691422c2eda91d02d4 (patch)
treef7e52f62416048859aa9bde8425e20aac0e7c669 /korn/tdeio_subjects.cpp
parent8144d5434bbd1c4448a37695aed6ad3d348043d8 (diff)
downloadtdepim-533bad2a1503973aaf8186691422c2eda91d02d4.tar.gz
tdepim-533bad2a1503973aaf8186691422c2eda91d02d4.zip
Additional k => tde renaming and fixes
Diffstat (limited to 'korn/tdeio_subjects.cpp')
-rw-r--r--korn/tdeio_subjects.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/korn/tdeio_subjects.cpp b/korn/tdeio_subjects.cpp
index f76a1c99e..985a89e5a 100644
--- a/korn/tdeio_subjects.cpp
+++ b/korn/tdeio_subjects.cpp
@@ -18,7 +18,7 @@
#include "tdeio_subjects.h"
-#include "kio.h"
+#include "tdeio.h"
#include "tdeio_single_subject.h"
#include "tdeio_proto.h"
#include "mailsubject.h"
@@ -31,20 +31,20 @@
#include <tqvaluelist.h>
#include <tqstring.h>
-KIO_Subjects::KIO_Subjects( TQObject * parent, const char * name )
+TDEIO_Subjects::TDEIO_Subjects( TQObject * parent, const char * name )
: TQObject( parent, name ),
_protocol( 0 ),
_slave( 0 ),
_valid( true )
{
- _jobs = new TQPtrList<KIO_Single_Subject>;
+ _jobs = new TQPtrList<TDEIO_Single_Subject>;
_kurl = new KURL;
_metadata = new TDEIO::MetaData;
_jobs->setAutoDelete( true );
}
-KIO_Subjects::~KIO_Subjects( )
+TDEIO_Subjects::~TDEIO_Subjects( )
{
delete _jobs;
delete _kurl;
@@ -52,15 +52,15 @@ KIO_Subjects::~KIO_Subjects( )
_protocol = 0;
}
-void KIO_Subjects::doReadSubjects( KKioDrop *drop )
+void TDEIO_Subjects::doReadSubjects( KKioDrop *drop )
{
TQValueList<KKioDrop::FileInfo>::ConstIterator it;
TQValueList<KKioDrop::FileInfo>::ConstIterator end_it = drop->_mailurls->end();
- _kio = drop;
- _protocol = _kio->_protocol;
- *_kurl = *_kio->_kurl;
- *_metadata = *_kio->_metadata;
+ _tdeio = drop;
+ _protocol = _tdeio->_protocol;
+ *_kurl = *_tdeio->_kurl;
+ *_metadata = *_tdeio->_metadata;
if( _jobs->count() > 0 )
kdWarning() << i18n( "Already a slave pending." ) << endl;
@@ -71,17 +71,17 @@ void KIO_Subjects::doReadSubjects( KKioDrop *drop )
getConnection( );
//Open jobs for easy item in the list
- for( it = _kio->_mailurls->begin(); it != end_it; it++ )
+ for( it = _tdeio->_mailurls->begin(); it != end_it; it++ )
startJob( (*it).name, (*it).size );
//close connection for trivial situations (empty list)
disConnect( true );
//passing number of subjects for progress bar.
- _kio->emitReadSubjectsTotalSteps( _jobs->count() );
+ _tdeio->emitReadSubjectsTotalSteps( _jobs->count() );
}
-void KIO_Subjects::getConnection( )
+void TDEIO_Subjects::getConnection( )
{
KURL kurl = *_kurl;
TDEIO::MetaData metadata = *_metadata;
@@ -97,43 +97,43 @@ void KIO_Subjects::getConnection( )
_protocol->readSubjectConnectKURL( kurl, metadata );
if( kurl.port() == 0 )
- kurl.setPort( _protocol->defaultPort( _kio->_ssl ) );
+ kurl.setPort( _protocol->defaultPort( _tdeio->_ssl ) );
if( ! ( _slave = TDEIO::Scheduler::getConnectedSlave( kurl, metadata ) ) )
{
- kdWarning() << i18n( "Not able to open a kio-slave for %1." ).arg( _protocol->configName() );
- _kio->emitShowPassivePopup( i18n( "Not able to open a kio-slave for %1." ).arg( _protocol->configName() ) );
+ kdWarning() << i18n( "Not able to open a tdeio-slave for %1." ).arg( _protocol->configName() );
+ _tdeio->emitShowPassivePopup( i18n( "Not able to open a tdeio-slave for %1." ).arg( _protocol->configName() ) );
_valid = false;
- _kio->emitValidChanged();
+ _tdeio->emitValidChanged();
_slave = 0;
- _kio->emitReadSubjectsReady( false );
+ _tdeio->emitReadSubjectsReady( false );
return;
}
}
}
-void KIO_Subjects::startJob( const TQString &name, const long size )
+void TDEIO_Subjects::startJob( const TQString &name, const long size )
{
KURL kurl = *_kurl;
TDEIO::MetaData metadata = *_metadata;
- KIO_Single_Subject *subject;
+ TDEIO_Single_Subject *subject;
kurl = name;
_protocol->readSubjectKURL( kurl, metadata );
if( kurl.port() == 0 )
- kurl.setPort( _protocol->defaultPort( _kio->_ssl ) );
+ kurl.setPort( _protocol->defaultPort( _tdeio->_ssl ) );
- subject = new KIO_Single_Subject( this, name.latin1(), kurl, metadata, _protocol, _slave, name, size );
+ subject = new TDEIO_Single_Subject( this, name.latin1(), kurl, metadata, _protocol, _slave, name, size );
connect( subject, TQT_SIGNAL( readSubject( KornMailSubject* ) ), this, TQT_SLOT( slotReadSubject( KornMailSubject* ) ) );
- connect( subject, TQT_SIGNAL( finished( KIO_Single_Subject* ) ), this, TQT_SLOT( slotFinished( KIO_Single_Subject* ) ) );
+ connect( subject, TQT_SIGNAL( finished( TDEIO_Single_Subject* ) ), this, TQT_SLOT( slotFinished( TDEIO_Single_Subject* ) ) );
_jobs->append( subject );
}
-void KIO_Subjects::disConnect( bool result )
+void TDEIO_Subjects::disConnect( bool result )
{
if( _jobs->isEmpty() )
{
@@ -142,33 +142,33 @@ void KIO_Subjects::disConnect( bool result )
TDEIO::Scheduler::disconnectSlave( _slave );
_slave = 0;
}
- _kio->emitReadSubjectsReady( result );
+ _tdeio->emitReadSubjectsReady( result );
}
}
-void KIO_Subjects::cancelled( )
+void TDEIO_Subjects::cancelled( )
{
_jobs->clear();
- //_slave died in cancelJob with is by called from the destructor of KIO_Single_Subject,
+ //_slave died in cancelJob with is by called from the destructor of TDEIO_Single_Subject,
//withs is by called by _jobs->clear because autoRemove equals true.
_slave = 0;
disConnect( false );
}
-void KIO_Subjects::slotReadSubject( KornMailSubject* subject )
+void TDEIO_Subjects::slotReadSubject( KornMailSubject* subject )
{
_valid = true;
- _kio->emitValidChanged();
- subject->setMailDrop( _kio );
- _kio->emitReadSubjectsRead( subject );
+ _tdeio->emitValidChanged();
+ subject->setMailDrop( _tdeio );
+ _tdeio->emitReadSubjectsRead( subject );
}
-void KIO_Subjects::slotFinished( KIO_Single_Subject* item )
+void TDEIO_Subjects::slotFinished( TDEIO_Single_Subject* item )
{
//Remove sender.... I didn't know of the computer gonna like me, but it seems he does :)
_jobs->remove( item );
- _kio->emitReadSubjectsProgress( _jobs->count( ) );
+ _tdeio->emitReadSubjectsProgress( _jobs->count( ) );
disConnect( true ); //Only works when all jobs are finished.
}