summaryrefslogtreecommitdiffstats
path: root/certmanager/storedtransferjob.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /certmanager/storedtransferjob.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'certmanager/storedtransferjob.cpp')
-rw-r--r--certmanager/storedtransferjob.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/certmanager/storedtransferjob.cpp b/certmanager/storedtransferjob.cpp
index 589acd702..1aa995e8f 100644
--- a/certmanager/storedtransferjob.cpp
+++ b/certmanager/storedtransferjob.cpp
@@ -21,39 +21,39 @@
using namespace KIOext;
-#define KIO_ARGS QByteArray packedArgs; QDataStream stream( packedArgs, IO_WriteOnly ); stream
+#define KIO_ARGS TQByteArray packedArgs; TQDataStream stream( packedArgs, IO_WriteOnly ); stream
StoredTransferJob::StoredTransferJob(const KURL& url, int command,
- const QByteArray &packedArgs,
- const QByteArray &_staticData,
+ const TQByteArray &packedArgs,
+ const TQByteArray &_staticData,
bool showProgressInfo)
: KIO::TransferJob( url, command, packedArgs, _staticData, showProgressInfo ),
m_uploadOffset( 0 )
{
- connect( this, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
- connect( this, SIGNAL( dataReq( KIO::Job *, QByteArray & ) ),
- SLOT( slotDataReq( KIO::Job *, QByteArray & ) ) );
+ connect( this, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotData( KIO::Job *, const TQByteArray & ) ) );
+ connect( this, TQT_SIGNAL( dataReq( KIO::Job *, TQByteArray & ) ),
+ TQT_SLOT( slotDataReq( KIO::Job *, TQByteArray & ) ) );
}
-void StoredTransferJob::setData( const QByteArray& arr )
+void StoredTransferJob::setData( const TQByteArray& arr )
{
Q_ASSERT( m_data.isNull() ); // check that we're only called once
Q_ASSERT( m_uploadOffset == 0 ); // no upload started yet
m_data = arr;
}
-void StoredTransferJob::slotData( KIO::Job *, const QByteArray &data )
+void StoredTransferJob::slotData( KIO::Job *, const TQByteArray &data )
{
// check for end-of-data marker:
if ( data.size() == 0 )
return;
unsigned int oldSize = m_data.size();
- m_data.resize( oldSize + data.size(), QGArray::SpeedOptim );
+ m_data.resize( oldSize + data.size(), TQGArray::SpeedOptim );
memcpy( m_data.data() + oldSize, data.data(), data.size() );
}
-void StoredTransferJob::slotDataReq( KIO::Job *, QByteArray &data )
+void StoredTransferJob::slotDataReq( KIO::Job *, TQByteArray &data )
{
// Inspired from kmail's KMKernel::byteArrayToRemoteFile
// send the data in 64 KB chunks
@@ -68,7 +68,7 @@ void StoredTransferJob::slotDataReq( KIO::Job *, QByteArray &data )
} else {
// send the remaining bytes to the receiver (deep copy)
data.duplicate( m_data.data() + m_uploadOffset, remainingBytes );
- m_data = QByteArray();
+ m_data = TQByteArray();
m_uploadOffset = 0;
//kdDebug() << "Sending " << remainingBytes << " bytes\n";
}
@@ -80,17 +80,17 @@ StoredTransferJob *KIOext::storedGet( const KURL& url, bool reload, bool showPro
{
// Send decoded path and encoded query
KIO_ARGS << url;
- StoredTransferJob * job = new StoredTransferJob( url, KIO::CMD_GET, packedArgs, QByteArray(), showProgressInfo );
+ StoredTransferJob * job = new StoredTransferJob( url, KIO::CMD_GET, packedArgs, TQByteArray(), showProgressInfo );
if (reload)
job->addMetaData("cache", "reload");
return job;
}
-StoredTransferJob *KIOext::put( const QByteArray& arr, const KURL& url, int permissions,
+StoredTransferJob *KIOext::put( const TQByteArray& arr, const KURL& url, int permissions,
bool overwrite, bool resume, bool showProgressInfo )
{
KIO_ARGS << url << Q_INT8( overwrite ? 1 : 0 ) << Q_INT8( resume ? 1 : 0 ) << permissions;
- StoredTransferJob * job = new StoredTransferJob( url, KIO::CMD_PUT, packedArgs, QByteArray(), showProgressInfo );
+ StoredTransferJob * job = new StoredTransferJob( url, KIO::CMD_PUT, packedArgs, TQByteArray(), showProgressInfo );
job->setData( arr );
return job;
}