summaryrefslogtreecommitdiffstats
path: root/kget/transfer.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kget/transfer.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kget/transfer.cpp')
-rw-r--r--kget/transfer.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kget/transfer.cpp b/kget/transfer.cpp
index 7569e52b..e06cdfc5 100644
--- a/kget/transfer.cpp
+++ b/kget/transfer.cpp
@@ -109,7 +109,7 @@ Transfer::init(const uint _id)
id = _id;
m_pSlave = new Slave(this, src, dest);
canResume = false;
- startTime = TQDateTime::currentDateTime();
+ startTime = TQDateTime::tqcurrentDateTime();
speed = 0;
// retryCount = ksettings.reconnectRetries-1;
retryCount = 0;
@@ -178,7 +178,7 @@ void Transfer::synchronousAbort()
void Transfer::slotUpdateActions()
{
- sDebugIn << "the item Status is =" << status << "offline=" << ksettings.b_offline << endl;
+ sDebugIn << "the item tqStatus is =" << status << "offline=" << ksettings.b_offline << endl;
//if we are offline just disable Resume and Pause and return
if (ksettings.b_offline) {
m_paResume->setEnabled(false);
@@ -218,7 +218,7 @@ void Transfer::slotUpdateActions()
m_paDelay->blockSignals(true);
switch (mode) {
- case MD_QUEUED:
+ case MD_TQUEUED:
m_paQueue->setChecked(true);
break;
case MD_SCHEDULED:
@@ -270,10 +270,10 @@ void Transfer::updateAll()
{
sDebugIn << endl;
- updateStatus(status); // first phase of animation
+ updatetqStatus(status); // first phase of animation
- logMessage(i18n("Copy file from: %1").arg(src.prettyURL()));
- logMessage(i18n("To: %1").arg(dest.prettyURL()));
+ logMessage(i18n("Copy file from: %1").tqarg(src.prettyURL()));
+ logMessage(i18n("To: %1").tqarg(dest.prettyURL()));
// source
setText(view->lv_url, src.prettyURL());
@@ -291,7 +291,7 @@ void Transfer::updateAll()
}
if (totalSize != 0) {
- //logMessage(i18n("Total size is %1 bytes").arg((double)totalSize));
+ //logMessage(i18n("Total size is %1 bytes").tqarg((double)totalSize));
setText(view->lv_total, KIO::convertSize(totalSize));
} else {
//logMessage(i18n("Total size is unknown"));
@@ -303,7 +303,7 @@ void Transfer::updateAll()
}
-bool Transfer::updateStatus(int counter)
+bool Transfer::updatetqStatus(int counter)
{
//sDebug<< ">>>>Entering"<<endl;
@@ -323,7 +323,7 @@ bool Transfer::updateStatus(int counter)
isTransfer = true;
break;
case ST_STOPPED:
- if(mode == MD_QUEUED)
+ if(mode == MD_TQUEUED)
pix = &view->pixQueued;
else if(mode == MD_SCHEDULED)
pix = &view->pixScheduled;
@@ -337,18 +337,18 @@ bool Transfer::updateStatus(int counter)
setPixmap(view->lv_pixmap, *pix);
view->setUpdatesEnabled(true);
- if(prevStatus!=status || prevMode != mode || status==ST_RUNNING || status==ST_TRYING)
+ if(prevtqStatus!=status || prevMode != mode || status==ST_RUNNING || status==ST_TRYING)
{
TQRect rect = view->header()->sectionRect(view->lv_pixmap);
int x = rect.x();
- int y = view->itemRect(this).y();
+ int y = view->tqitemRect(this).y();
int w = rect.width();
int h = rect.height();
view->TQScrollView::updateContents(x,y,w,h);
- prevStatus = status;
+ prevtqStatus = status;
prevMode = mode;
}
@@ -385,8 +385,8 @@ void Transfer::slotResume()
m_paResume->setEnabled(false);
status = ST_TRYING;
- mode = MD_QUEUED;
- logMessage(i18n("Attempt number %1").arg(retryCount));
+ mode = MD_TQUEUED;
+ logMessage(i18n("Attempt number %1").tqarg(retryCount));
sDebug << "sending Resume to slave " << endl;
m_pSlave->Op(Slave::RETR);
@@ -407,7 +407,7 @@ void Transfer::slotResume()
sDebug << "Killing Slave" << endl;
slotSpeed(0);
- mode = MD_QUEUED;
+ mode = MD_TQUEUED;
status=ST_STOPPED;
m_paQueue->setChecked(true);
@@ -455,7 +455,7 @@ void Transfer::slotRequestRemove()
if (dlgIndividual && !ksettings.b_expertMode)
{
if (KMessageBox::warningContinueCancel(0, i18n("Are you sure you want to delete this transfer?"),
- TQString::null, KStdGuiItem::del(),
+ TQString(), KStdGuiItem::del(),
TQString("delete_transfer"))
!= KMessageBox::Continue)
return;
@@ -492,11 +492,11 @@ void Transfer::slotQueue()
logMessage(i18n("Queueing"));
- assert(!(mode == MD_QUEUED));
+ assert(!(mode == MD_TQUEUED));
- mode = MD_QUEUED;
+ mode = MD_TQUEUED;
m_paQueue->setChecked(true);
- emit statusChanged(this, OP_QUEUED);
+ emit statusChanged(this, OP_TQUEUED);
sDebugOut << endl;
}
@@ -510,8 +510,8 @@ void Transfer::slotRequestSchedule()
// if the time was already set somewhere in the future, keep it
// otherwise set it to the current time + 60 seconds
- if (startTime < TQDateTime::currentDateTime()) {
- TQDateTime dt = TQDateTime::currentDateTime();
+ if (startTime < TQDateTime::tqcurrentDateTime()) {
+ TQDateTime dt = TQDateTime::tqcurrentDateTime();
startTime = dt.addSecs(60);
}
if (status == ST_RUNNING) {
@@ -581,7 +581,7 @@ void Transfer::slotRenaming(KIO::Job *, const KURL &, const KURL & to)
dest = to;
- logMessage(i18n("Renaming to %1").arg(dest.prettyURL().ascii()));
+ logMessage(i18n("Renaming to %1").tqarg(dest.prettyURL().ascii()));
// destination
setText (view->lv_filename, dest.fileName ());
@@ -623,7 +623,7 @@ void Transfer::slotSpeed(unsigned long bytes_per_second)
dlgIndividual->setSpeed(i18n("Stopped"));
} else {
- TQString tmps = i18n("%1/s").arg(KIO::convertSize(speed));
+ TQString tmps = i18n("%1/s").tqarg(KIO::convertSize(speed));
setText(view->lv_speed, tmps);
setText(view->lv_remaining, remainingTime);
if(dlgIndividual)
@@ -644,7 +644,7 @@ void Transfer::slotTotalSize(KIO::filesize_t bytes)
if (totalSize == 0) {
totalSize = bytes;
if (totalSize != 0) {
- logMessage(i18n("Total size is %1 bytes").arg((double)totalSize,0,'f',0));
+ logMessage(i18n("Total size is %1 bytes").tqarg((double)totalSize,0,'f',0));
setText(view->lv_total, KIO::convertSize(totalSize));
if(dlgIndividual)
{
@@ -786,8 +786,8 @@ bool Transfer::read(KSimpleConfig * config, int id)
return false;
}
- mode = (TransferMode) config->readNumEntry("Mode", MD_QUEUED);
- status = (TransferStatus) config->readNumEntry("Status", ST_RUNNING);
+ mode = (TransferMode) config->readNumEntry("Mode", MD_TQUEUED);
+ status = (TransfertqStatus) config->readNumEntry("tqStatus", ST_RUNNING);
startTime = config->readDateTimeEntry("ScheduledTime");
canResume = config->readBoolEntry("CanResume", true);
totalSize = config->readUnsignedNum64Entry("TotalSize", 0);
@@ -815,7 +815,7 @@ void Transfer::write(KSimpleConfig * config, int id)
config->writePathEntry("Source", src.url());
config->writePathEntry("Dest", dest.url());
config->writeEntry("Mode", mode);
- config->writeEntry("Status", status);
+ config->writeEntry("tqStatus", status);
config->writeEntry("CanResume", canResume);
config->writeEntry("TotalSize", totalSize );
config->writeEntry("ProcessedSize", processedSize );
@@ -851,7 +851,7 @@ void Transfer::slotExecError()
status = ST_STOPPED;
mode = MD_SCHEDULED;
- startTime=TQDateTime::currentDateTime().addSecs(ksettings.reconnectTime * 60);
+ startTime=TQDateTime::tqcurrentDateTime().addSecs(ksettings.reconnectTime * 60);
emit statusChanged(this, OP_SCHEDULED);
sDebugOut << endl;
@@ -862,8 +862,8 @@ void Transfer::slotExecBroken()
sDebugIn << endl;
status = ST_STOPPED;
- mode = MD_QUEUED;
- emit statusChanged(this, OP_QUEUED);
+ mode = MD_TQUEUED;
+ emit statusChanged(this, OP_TQUEUED);
sDebugOut << endl;
}
@@ -897,8 +897,8 @@ void Transfer::slotExecConnected()
m_pSlave->Op(Slave::KILL);
if (ksettings.b_addQueued)
{
- mode = MD_QUEUED;
- emit statusChanged(this, OP_QUEUED);
+ mode = MD_TQUEUED;
+ emit statusChanged(this, OP_TQUEUED);
}
else
{
@@ -982,7 +982,7 @@ bool Transfer::keepDialogOpen() const
void Transfer::maybeShow()
{
- if ( ksettings.b_showIndividual && getStatus() != Transfer::ST_FINISHED )
+ if ( ksettings.b_showIndividual && gettqStatus() != Transfer::ST_FINISHED )
{
if(dlgIndividual)
dlgIndividual->show();
@@ -1016,7 +1016,7 @@ void Transfer::NotInCache()
{
logMessage(i18n("checking if file is in cache...no"));
if (ksettings.b_addQueued)
- mode = MD_QUEUED;
+ mode = MD_TQUEUED;
else
mode = MD_DELAYED;
status = ST_STOPPED;