summaryrefslogtreecommitdiffstats
path: root/src/entrymerger.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
commit2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch)
tree18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/entrymerger.cpp
parent1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff)
downloadtellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz
tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip
TQt4 port tellico
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/entrymerger.cpp')
-rw-r--r--src/entrymerger.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/entrymerger.cpp b/src/entrymerger.cpp
index 4767026..61ed0f8 100644
--- a/src/entrymerger.cpp
+++ b/src/entrymerger.cpp
@@ -22,34 +22,34 @@
#include <klocale.h>
-#include <qtimer.h>
+#include <tqtimer.h>
using Tellico::EntryMerger;
-EntryMerger::EntryMerger(Data::EntryVec entries_, QObject* parent_)
- : QObject(parent_), m_entriesToCheck(entries_), m_origCount(entries_.count()), m_cancelled(false) {
+EntryMerger::EntryMerger(Data::EntryVec entries_, TQObject* tqparent_)
+ : TQObject(tqparent_), m_entriesToCheck(entries_), m_origCount(entries_.count()), m_cancelled(false) {
m_entriesLeft = m_entriesToCheck;
Kernel::self()->beginCommandGroup(i18n("Merge Entries"));
- QString label = i18n("Merging entries...");
+ TQString label = i18n("Merging entries...");
ProgressItem& item = ProgressManager::self()->newProgressItem(this, label, true /*canCancel*/);
item.setTotalSteps(m_origCount);
- connect(&item, SIGNAL(signalCancelled(ProgressItem*)), SLOT(slotCancel()));
+ connect(&item, TQT_SIGNAL(signalCancelled(ProgressItem*)), TQT_SLOT(slotCancel()));
// done if no entries to merge
if(m_origCount < 2) {
- QTimer::singleShot(500, this, SLOT(slotCleanup()));
+ TQTimer::singleShot(500, this, TQT_SLOT(slotCleanup()));
} else {
slotStartNext(); // starts fetching
}
}
void EntryMerger::slotStartNext() {
- QString statusMsg = i18n("Total merged/scanned entries: %1/%2")
- .arg(m_entriesToRemove.count())
- .arg(m_origCount - m_entriesToCheck.count());
- StatusBar::self()->setStatus(statusMsg);
+ TQString statusMsg = i18n("Total merged/scanned entries: %1/%2")
+ .tqarg(m_entriesToRemove.count())
+ .tqarg(m_origCount - m_entriesToCheck.count());
+ StatusBar::self()->settqStatus(statusMsg);
ProgressManager::self()->setProgress(this, m_origCount - m_entriesToCheck.count());
Data::EntryPtr baseEntry = m_entriesToCheck.front();
@@ -72,9 +72,9 @@ void EntryMerger::slotStartNext() {
m_entriesToCheck.remove(baseEntry);
if(m_cancelled || m_entriesToCheck.count() < 2) {
- QTimer::singleShot(0, this, SLOT(slotCleanup()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotCleanup()));
} else {
- QTimer::singleShot(0, this, SLOT(slotStartNext()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStartNext()));
}
}
@@ -85,7 +85,7 @@ void EntryMerger::slotCancel() {
void EntryMerger::slotCleanup() {
Kernel::self()->removeEntries(m_entriesToRemove);
Controller::self()->slotUpdateSelection(0, m_entriesLeft);
- StatusBar::self()->clearStatus();
+ StatusBar::self()->cleartqStatus();
ProgressManager::self()->setDone(this);
Kernel::self()->endCommandGroup();
deleteLater();
@@ -95,8 +95,8 @@ bool EntryMerger::cleanMerge(Data::EntryPtr e1, Data::EntryPtr e2) const {
// figure out if there's a clean merge possible
Data::FieldVec fields = e1->collection()->fields();
for(Data::FieldVecIt it = fields.begin(); it != fields.end(); ++it) {
- QString val1 = e1->field(it);
- QString val2 = e2->field(it);
+ TQString val1 = e1->field(it);
+ TQString val2 = e2->field(it);
if(val1 != val2 && !val1.isEmpty() && !val2.isEmpty()) {
return false;
}