summaryrefslogtreecommitdiffstats
path: root/src/kvilib/ext/kvi_garbage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvilib/ext/kvi_garbage.cpp')
-rw-r--r--src/kvilib/ext/kvi_garbage.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/kvilib/ext/kvi_garbage.cpp b/src/kvilib/ext/kvi_garbage.cpp
index 0e2e8881..10aacd26 100644
--- a/src/kvilib/ext/kvi_garbage.cpp
+++ b/src/kvilib/ext/kvi_garbage.cpp
@@ -25,10 +25,10 @@
#include "kvi_garbage.h"
-#include <qvariant.h>
+#include <tqvariant.h>
KviGarbageCollector::KviGarbageCollector()
-: QObject(0)
+: TQObject(0)
{
m_pGarbageList = 0;
m_pCleanupTimer = 0;
@@ -41,17 +41,17 @@ KviGarbageCollector::~KviGarbageCollector()
cleanup();
}
-void KviGarbageCollector::collect(QObject * g)
+void KviGarbageCollector::collect(TQObject * g)
{
if(!m_pGarbageList)
{
- m_pGarbageList = new KviPointerList<QObject>;
+ m_pGarbageList = new KviPointerList<TQObject>;
m_pGarbageList->setAutoDelete(true);
}
//debug("COLLECTING GARBAGE %s",g->className());
m_pGarbageList->append(g);
// debug("Registering garbage object %d (%s:%s)",g,g->className(),g->name());
- connect(g,SIGNAL(destroyed()),this,SLOT(garbageSuicide()));
+ connect(g,TQT_SIGNAL(destroyed()),this,TQT_SLOT(garbageSuicide()));
triggerCleanup(0);
}
@@ -62,13 +62,13 @@ void KviGarbageCollector::garbageSuicide()
debug("Ops... garbage suicide while no garbage list");
return;
}
- int idx = m_pGarbageList->findRef(sender());
+ int idx = m_pGarbageList->tqfindRef(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())));
if(idx == -1)
{
debug("Ops... unregistered garbage suicide");
return;
}
- m_pGarbageList->removeRef(sender());
+ m_pGarbageList->removeRef(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())));
if(m_pGarbageList->isEmpty())
{
cleanup();
@@ -82,8 +82,8 @@ void KviGarbageCollector::triggerCleanup(int iTimeout)
{
m_pCleanupTimer->stop();
} else {
- m_pCleanupTimer = new QTimer(this);
- connect(m_pCleanupTimer,SIGNAL(timeout()),this,SLOT(cleanup()));
+ m_pCleanupTimer = new TQTimer(this);
+ connect(m_pCleanupTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(cleanup()));
}
m_pCleanupTimer->start(iTimeout);
}
@@ -94,16 +94,16 @@ void KviGarbageCollector::cleanup()
if(m_pGarbageList)
{
//debug("SOME GARBAGE TO DELETE");
- KviPointerList<QObject> dying;
+ KviPointerList<TQObject> dying;
dying.setAutoDelete(false);
- for(QObject * o = m_pGarbageList->first();o;o = m_pGarbageList->next())
+ for(TQObject * o = m_pGarbageList->first();o;o = m_pGarbageList->next())
{
//debug("CHECKING GARBAGE CLASS %s",o->className());
bool bDeleteIt = m_bForceCleanupNow;
if(!bDeleteIt)
{
//debug("CLEANUP NOT FORCED");
- QVariant v = o->property("blockingDelete");
+ TQVariant v = o->property("blockingDelete");
if(v.isValid())
{
//debug("HAS A VALID VARIANT!");
@@ -115,10 +115,10 @@ void KviGarbageCollector::cleanup()
if(bDeleteIt)dying.append(o);
}
- for(QObject * o2 = dying.first();o2;o2 = dying.next())
+ for(TQObject * o2 = dying.first();o2;o2 = dying.next())
{
//debug("KILLING GARBAGE CLASS %s",o2->className());
- disconnect(o2,SIGNAL(destroyed()),this,SLOT(garbageSuicide()));
+ disconnect(o2,TQT_SIGNAL(destroyed()),this,TQT_SLOT(garbageSuicide()));
m_pGarbageList->removeRef(o2);
}