From 089118c18533dfa3e6ce5065dbebdd4db94051f1 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:33:51 -0600 Subject: Rename old tq methods that no longer need a unique name --- kget/dlgIndividual.cpp | 14 +++++++------- kget/dlgadvancedbase.ui | 4 ++-- kget/dlgautomationbase.ui | 6 +++--- kget/dlgconnectionbase.ui | 10 +++++----- kget/dlgdirectoriesbase.ui | 2 +- kget/dlglimitsbase.ui | 6 +++--- kget/dlgsystembase.ui | 4 ++-- kget/docking.cpp | 6 +++--- kget/docking.h | 2 +- kget/droptarget.cpp | 2 +- kget/kmainwidget.cpp | 34 +++++++++++++++++----------------- kget/settings.cpp | 2 +- kget/transfer.cpp | 22 +++++++++++----------- kget/transfer.h | 12 ++++++------ kget/transferlist.cpp | 4 ++-- kget/transferlist.h | 2 +- 16 files changed, 66 insertions(+), 66 deletions(-) (limited to 'kget') diff --git a/kget/dlgIndividual.cpp b/kget/dlgIndividual.cpp index b61f7c72..91b34007 100644 --- a/kget/dlgIndividual.cpp +++ b/kget/dlgIndividual.cpp @@ -162,9 +162,9 @@ DlgIndividual::DlgIndividual(Transfer * _item) // otherwise set it to the current time TQDateTime dt; - if (item->getStartTime() < TQDateTime::tqcurrentDateTime() && item->getMode() != Transfer::MD_SCHEDULED) + if (item->getStartTime() < TQDateTime::currentDateTime() && item->getMode() != Transfer::MD_SCHEDULED) { - dt = TQDateTime::tqcurrentDateTime(); + dt = TQDateTime::currentDateTime(); } else { @@ -182,14 +182,14 @@ DlgIndividual::DlgIndividual(Transfer * _item) ml_log = new TQTextEdit(panelAdvanced); ml_log->setTextFormat(LogText); ml_log->setReadOnly(true); - // ml_log->setFixedSize(tqsizeHint()); + // ml_log->setFixedSize(sizeHint()); ml_log->setVScrollBarMode(TQScrollView::Auto); ml_log->setWordWrap(TQTextEdit::NoWrap); - // ml_log->tqsetSizePolicy(policy); + // ml_log->setSizePolicy(policy); panelAdvanced->addTab(ml_log, i18n("Log")); - // panelAdvanced->setFixedSize(tqsizeHint()); + // panelAdvanced->setFixedSize(sizeHint()); @@ -197,7 +197,7 @@ DlgIndividual::DlgIndividual(Transfer * _item) advanced = ksettings.b_advancedIndividual; slotToggleAdvanced(); - resize( tqminimumSizeHint() ); + resize( minimumSizeHint() ); setMaximumHeight( height() ); //bool keepOpenChecked = false; @@ -315,7 +315,7 @@ void DlgIndividual::slotKeepOpenToggled(bool bToggled) bKeepDlgOpen=bToggled; - if (!bKeepDlgOpen && item->gettqStatus()==Transfer::ST_FINISHED) + if (!bKeepDlgOpen && item->getStatus()==Transfer::ST_FINISHED) { hide(); m_pDockIndividual->hide(); diff --git a/kget/dlgadvancedbase.ui b/kget/dlgadvancedbase.ui index 9b317d91..03436214 100644 --- a/kget/dlgadvancedbase.ui +++ b/kget/dlgadvancedbase.ui @@ -48,7 +48,7 @@ Preferred - + 40 20 @@ -178,7 +178,7 @@ Expanding - + 35 20 diff --git a/kget/dlgautomationbase.ui b/kget/dlgautomationbase.ui index abf40f34..bad713e1 100644 --- a/kget/dlgautomationbase.ui +++ b/kget/dlgautomationbase.ui @@ -112,7 +112,7 @@ Preferred - + 40 20 @@ -129,7 +129,7 @@ Preferred - + 50 20 @@ -146,7 +146,7 @@ Preferred - + 50 20 diff --git a/kget/dlgconnectionbase.ui b/kget/dlgconnectionbase.ui index 49eada65..1a0034e5 100644 --- a/kget/dlgconnectionbase.ui +++ b/kget/dlgconnectionbase.ui @@ -94,7 +94,7 @@ Expanding - + 40 20 @@ -111,7 +111,7 @@ Expanding - + 40 20 @@ -141,7 +141,7 @@ Expanding - + 40 20 @@ -174,7 +174,7 @@ Expanding - + 40 20 @@ -283,7 +283,7 @@ Expanding - + 20 20 diff --git a/kget/dlgdirectoriesbase.ui b/kget/dlgdirectoriesbase.ui index 6a86b045..9b46fadb 100644 --- a/kget/dlgdirectoriesbase.ui +++ b/kget/dlgdirectoriesbase.ui @@ -51,7 +51,7 @@ Expanding - + 20 40 diff --git a/kget/dlglimitsbase.ui b/kget/dlglimitsbase.ui index 09e0cbce..29af48da 100644 --- a/kget/dlglimitsbase.ui +++ b/kget/dlglimitsbase.ui @@ -106,7 +106,7 @@ Expanding - + 40 20 @@ -123,7 +123,7 @@ Expanding - + 40 20 @@ -140,7 +140,7 @@ Expanding - + 40 20 diff --git a/kget/dlgsystembase.ui b/kget/dlgsystembase.ui index 5d516195..03fa75fe 100644 --- a/kget/dlgsystembase.ui +++ b/kget/dlgsystembase.ui @@ -107,7 +107,7 @@ Expanding - + 40 20 @@ -124,7 +124,7 @@ Expanding - + 40 10 diff --git a/kget/docking.cpp b/kget/docking.cpp index c637303d..b13e04a5 100644 --- a/kget/docking.cpp +++ b/kget/docking.cpp @@ -56,7 +56,7 @@ DockWidget::DockWidget(KMainWidget * _parent):KSystemTray(_parent) setAcceptDrops(true); dtip = new DynamicTip( this ); - dtip->settqStatus( kapp->aboutData()->shortDescription() ); + dtip->setStatus( kapp->aboutData()->shortDescription() ); } @@ -100,7 +100,7 @@ void DockWidget::mousePressEvent(TQMouseEvent * e) void DockWidget::updateToolTip( const TQString& _status ) { - dtip->settqStatus( _status ); + dtip->setStatus( _status ); } @@ -117,7 +117,7 @@ DynamicTip::DynamicTip( TQWidget * parent ) } -void DynamicTip::settqStatus( const TQString & _status ) +void DynamicTip::setStatus( const TQString & _status ) { status = _status; } diff --git a/kget/docking.h b/kget/docking.h index 7d866c88..d7c73aac 100644 --- a/kget/docking.h +++ b/kget/docking.h @@ -43,7 +43,7 @@ class DynamicTip : public TQToolTip public: DynamicTip( TQWidget * parent ); virtual ~DynamicTip() {}//TODO workaround for qt-bug, can be removed after 4.0 - void settqStatus( const TQString & _status ); + void setStatus( const TQString & _status ); protected: void maybeTip( const TQPoint & ); diff --git a/kget/droptarget.cpp b/kget/droptarget.cpp index 78bad0b4..9fdf6ee5 100644 --- a/kget/droptarget.cpp +++ b/kget/droptarget.cpp @@ -45,7 +45,7 @@ #include #include #undef Bool -#undef tqStatus +#undef Status #endif #include "settings.h" #include "droptarget.h" diff --git a/kget/kmainwidget.cpp b/kget/kmainwidget.cpp index ad5fa4a9..c860d66b 100644 --- a/kget/kmainwidget.cpp +++ b/kget/kmainwidget.cpp @@ -142,8 +142,8 @@ KMainWidget::KMainWidget(bool bStartDocked) kmain = this; // Set log time, needed for the name of log file - TQDate date = TQDateTime::tqcurrentDateTime().date(); - TQTime time = TQDateTime::tqcurrentDateTime().time(); + TQDate date = TQDateTime::currentDateTime().date(); + TQTime time = TQDateTime::currentDateTime().time(); TQString tmp; tmp.sprintf("log%d:%d:%d-%d:%d:%d", date.day(), date.month(), date.year(), time.hour(), time.minute(), time.second()); @@ -708,7 +708,7 @@ void KMainWidget::slotQuit() for (; it.current(); ++it) { item = it.current(); - if (item->gettqStatus() == Transfer::ST_RUNNING && !ksettings.b_expertMode) { + if (item->getStatus() == Transfer::ST_RUNNING && !ksettings.b_expertMode) { if (KMessageBox::warningContinueCancel(this, i18n("Some transfers are still running.\nAre you sure you want to quit KGet?"), i18n("Warning"), KStdGuiItem::quit()) != KMessageBox::Continue) { #ifdef _DEBUG sDebugOut << endl; @@ -876,10 +876,10 @@ void KMainWidget::stopAll() log(i18n("Stopping all jobs"), false); TransferIterator it(myTransferList); - Transfer::TransfertqStatus tqStatus; + Transfer::TransferStatus Status; for (; it.current(); ++it) { - tqStatus = it.current()->gettqStatus(); - if (tqStatus == Transfer::ST_TRYING || tqStatus == Transfer::ST_RUNNING) + Status = it.current()->getStatus(); + if (Status == Transfer::ST_TRYING || Status == Transfer::ST_RUNNING) it.current()->slotStop(); } slotUpdateActions(); @@ -1360,7 +1360,7 @@ void KMainWidget::checkQueue() // count running transfers for (; it.current(); ++it) { - status = it.current()->gettqStatus(); + status = it.current()->getStatus(); if (status == Transfer::ST_RUNNING || status == Transfer::ST_TRYING) numRun++; } @@ -1370,7 +1370,7 @@ void KMainWidget::checkQueue() bool isQuequed; for (; it.current() && numRun < ksettings.maxSimultaneousConnections; ++it) { item = it.current(); - isRunning = (item->gettqStatus() == Transfer::ST_RUNNING) || ((item->gettqStatus() == Transfer::ST_TRYING)); + isRunning = (item->getStatus() == Transfer::ST_RUNNING) || ((item->getStatus() == Transfer::ST_TRYING)); isQuequed = (item->getMode() == Transfer::MD_TQUEUED || item->getMode() == Transfer::MD_NEW); @@ -1394,7 +1394,7 @@ void KMainWidget::checkQueue() for (; it.current(); ++it) { item = it.current(); - if (item->getMode() == Transfer::MD_NEW && item->gettqStatus() == Transfer::ST_STOPPED) + if (item->getMode() == Transfer::MD_NEW && item->getStatus() == Transfer::ST_STOPPED) { item->checkCache(); } @@ -1420,7 +1420,7 @@ void KMainWidget::slotAnimTimeout() animCounter = 0; } // update status of all items of transferList - isTransfer = myTransferList->updatetqStatus(animCounter); + isTransfer = myTransferList->updateStatus(animCounter); //if (this->isVisible()) { updateStatusBar(); @@ -1445,7 +1445,7 @@ void KMainWidget::slotTransferTimeout() for (; it.current(); ++it) { item = it.current(); - if (item->getMode() == Transfer::MD_SCHEDULED && item->getStartTime() <= TQDateTime::tqcurrentDateTime()) { + if (item->getMode() == Transfer::MD_SCHEDULED && item->getStartTime() <= TQDateTime::currentDateTime()) { item->setMode(Transfer::MD_TQUEUED); flag = true; } @@ -1455,7 +1455,7 @@ void KMainWidget::slotTransferTimeout() checkQueue(); } - if (ksettings.b_autoDisconnect && ksettings.b_timedDisconnect && ksettings.disconnectTime <= TQTime::currentTime() && ksettings.disconnectDate == TQDate::tqcurrentDate()) { + if (ksettings.b_autoDisconnect && ksettings.b_timedDisconnect && ksettings.disconnectTime <= TQTime::currentTime() && ksettings.disconnectDate == TQDate::currentDate()) { onlineDisconnect(); } @@ -2040,7 +2040,7 @@ void KMainWidget::slotUpdateActions() sDebug << "-->ONLINE= " << ksettings.b_offline << endl; #endif if (item == first_item && !ksettings.b_offline) { - switch (item->gettqStatus()) { + switch (item->getStatus()) { case Transfer::ST_TRYING: case Transfer::ST_RUNNING: m_paResume->setEnabled(false); @@ -2052,7 +2052,7 @@ void KMainWidget::slotUpdateActions() m_paPause->setEnabled(false); m_paRestart->setEnabled(false); #ifdef _DEBUG - sDebug << "STATUS IS stopped" << item->gettqStatus() << endl; + sDebug << "STATUS IS stopped" << item->getStatus() << endl; #endif break; case Transfer::ST_FINISHED: @@ -2064,7 +2064,7 @@ void KMainWidget::slotUpdateActions() } //end switch - } else if (item->gettqStatus() != first_item->gettqStatus()) { + } else if (item->getStatus() != first_item->getStatus()) { // disable all when all selected items don't have the same status m_paResume->setEnabled(false); m_paPause->setEnabled(false); @@ -2076,7 +2076,7 @@ void KMainWidget::slotUpdateActions() m_paDelete->setEnabled(true); m_paCopy->setEnabled(true); m_paIndividual->setEnabled(true); - if (item->gettqStatus() != Transfer::ST_FINISHED) { + if (item->getStatus() != Transfer::ST_FINISHED) { m_paQueue->setEnabled(true); m_paTimer->setEnabled(true); m_paDelay->setEnabled(true); @@ -2469,7 +2469,7 @@ bool KMainWidget::sanityChecksSuccessful( const KURL& url ) Transfer *transfer = myTransferList->find( url ); if ( transfer ) { - if ( transfer->gettqStatus() != Transfer::ST_FINISHED ) + if ( transfer->getStatus() != Transfer::ST_FINISHED ) { if ( !ksettings.b_expertMode ) { diff --git a/kget/settings.cpp b/kget/settings.cpp index 66bc73f6..6f2a0aa4 100644 --- a/kget/settings.cpp +++ b/kget/settings.cpp @@ -91,7 +91,7 @@ Settings::load() b_timedDisconnect = config->readBoolEntry("TimedDisconnect", DEF_TimedDisconnect); disconnectTime.setHMS(config->readNumEntry("DisconnectTimeHour"), config->readNumEntry("DisconnectTimeMinute"), 0); - disconnectDate = TQDate::tqcurrentDate(); // doesn't make sense to save it + disconnectDate = TQDate::currentDate(); // doesn't make sense to save it b_autoShutdown = config->readBoolEntry("AutoShutdown", DEF_AutoShutdown); b_autoPaste = config->readBoolEntry("AutoPaste", DEF_AutoPaste); diff --git a/kget/transfer.cpp b/kget/transfer.cpp index 36ce7887..a698f979 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::tqcurrentDateTime(); + startTime = TQDateTime::currentDateTime(); speed = 0; // retryCount = ksettings.reconnectRetries-1; retryCount = 0; @@ -270,7 +270,7 @@ void Transfer::updateAll() { sDebugIn << endl; - updatetqStatus(status); // first phase of animation + updateStatus(status); // first phase of animation logMessage(i18n("Copy file from: %1").tqarg(src.prettyURL())); logMessage(i18n("To: %1").tqarg(dest.prettyURL())); @@ -303,7 +303,7 @@ void Transfer::updateAll() } -bool Transfer::updatetqStatus(int counter) +bool Transfer::updateStatus(int counter) { //sDebug<< ">>>>Entering"<lv_pixmap, *pix); view->setUpdatesEnabled(true); - if(prevtqStatus!=status || prevMode != mode || status==ST_RUNNING || status==ST_TRYING) + if(prevStatus!=status || prevMode != mode || status==ST_RUNNING || status==ST_TRYING) { TQRect rect = view->header()->sectionRect(view->lv_pixmap); int x = rect.x(); - int y = view->tqitemRect(this).y(); + int y = view->itemRect(this).y(); int w = rect.width(); int h = rect.height(); view->TQScrollView::updateContents(x,y,w,h); - prevtqStatus = status; + prevStatus = status; prevMode = mode; } @@ -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::tqcurrentDateTime()) { - TQDateTime dt = TQDateTime::tqcurrentDateTime(); + if (startTime < TQDateTime::currentDateTime()) { + TQDateTime dt = TQDateTime::currentDateTime(); startTime = dt.addSecs(60); } if (status == ST_RUNNING) { @@ -787,7 +787,7 @@ bool Transfer::read(KSimpleConfig * config, int id) } mode = (TransferMode) config->readNumEntry("Mode", MD_TQUEUED); - status = (TransfertqStatus) config->readNumEntry("Status", ST_RUNNING); + status = (TransferStatus) config->readNumEntry("Status", ST_RUNNING); startTime = config->readDateTimeEntry("ScheduledTime"); canResume = config->readBoolEntry("CanResume", true); totalSize = config->readUnsignedNum64Entry("TotalSize", 0); @@ -851,7 +851,7 @@ void Transfer::slotExecError() status = ST_STOPPED; mode = MD_SCHEDULED; - startTime=TQDateTime::tqcurrentDateTime().addSecs(ksettings.reconnectTime * 60); + startTime=TQDateTime::currentDateTime().addSecs(ksettings.reconnectTime * 60); emit statusChanged(this, OP_SCHEDULED); sDebugOut << endl; @@ -982,7 +982,7 @@ bool Transfer::keepDialogOpen() const void Transfer::maybeShow() { - if ( ksettings.b_showIndividual && gettqStatus() != Transfer::ST_FINISHED ) + if ( ksettings.b_showIndividual && getStatus() != Transfer::ST_FINISHED ) { if(dlgIndividual) dlgIndividual->show(); diff --git a/kget/transfer.h b/kget/transfer.h index 17e4aa08..c21938eb 100644 --- a/kget/transfer.h +++ b/kget/transfer.h @@ -57,7 +57,7 @@ class Transfer:public TQObject, public KListViewItem public: enum TransferMode { MD_TQUEUED, MD_DELAYED, MD_SCHEDULED, MD_NONE, MD_NEW }; - enum TransfertqStatus { ST_TRYING, ST_RUNNING, ST_STOPPED, ST_FINISHED }; + enum TransferStatus { ST_TRYING, ST_RUNNING, ST_STOPPED, ST_FINISHED }; enum TransferOperation { OP_FINISHED, OP_RESUMED, OP_PAUSED, OP_REMOVED, OP_ABORTED, @@ -114,7 +114,7 @@ public: { return speed; } - TransfertqStatus gettqStatus()const + TransferStatus getStatus()const { return status; } @@ -127,7 +127,7 @@ public: { mode = _mode; } - void settqStatus(TransfertqStatus _status) + void setStatus(TransferStatus _status) { status = _status; }; @@ -139,7 +139,7 @@ public: // update methods void updateAll(); - bool updatetqStatus(int counter); + bool updateStatus(int counter); void showIndividual(); void UpdateRetry(); @@ -220,10 +220,10 @@ private: unsigned int remainingTimeSec; TQString remainingTime; - TransfertqStatus status; + TransferStatus status; TransferMode mode; - TransfertqStatus prevtqStatus; + TransferStatus prevStatus; TransferMode prevMode; // how many times have we retried already diff --git a/kget/transferlist.cpp b/kget/transferlist.cpp index 71a48dec..99372bdb 100644 --- a/kget/transferlist.cpp +++ b/kget/transferlist.cpp @@ -182,14 +182,14 @@ void TransferList::moveToEnd(Transfer * item) } -bool TransferList::updatetqStatus(int counter) +bool TransferList::updateStatus(int counter) { bool isTransfer = false; TransferIterator it(this); for (; it.current(); ++it) { - isTransfer |= it.current()->updatetqStatus(counter); + isTransfer |= it.current()->updateStatus(counter); } return isTransfer; diff --git a/kget/transferlist.h b/kget/transferlist.h index ae3fd6d8..e32bcb3a 100644 --- a/kget/transferlist.h +++ b/kget/transferlist.h @@ -76,7 +76,7 @@ public: { return phasesNum; } - bool updatetqStatus(int counter); + bool updateStatus(int counter); Transfer * find(const KURL& _src); bool areTransfersQueuedOrScheduled(); -- cgit v1.2.1