Removed obsolete Qt2's TQList/TQListIterator classes and replaced

with TQt3's TQPtrList/TQPtrListIterator ones.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 6 years ago
parent e24d5b8952
commit 489c8e0728
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -297,11 +297,11 @@ public:
/// since the list provides the autoDelete() method
/// which vould implicitly violate constness.
/// If you have to deal with const objects then
/// you need to use a TQList instead.
/// you need to use a TQPtrList instead.
///
/// Your objects also do not need to support copy constructors
/// or >= operators. This class will work fine without them
/// as opposed to a plain TQList.
/// as opposed to a plain TQPtrList.
///
/// This class also supports automatic deletion of the inseted items.
/// See the setAutoDelete() and autoDelete() members for the

@ -302,9 +302,9 @@ void KviChannel::saveProperties(KviConfig *cfg)
cfg->writeEntry("TopSplitter",m_pTopSplitter->sizes());
cfg->writeEntry("Splitter",m_pSplitter->sizes());
#ifdef COMPILE_USE_QT4
TQList<int> tmp = m_pVertSplitter->sizes();
TQPtrList<int> tmp = m_pVertSplitter->sizes();
KviValueList<int> tmp2;
for(TQList<int>::Iterator it = tmp.begin();it != tmp.end();++it)
for(TQPtrList<int>::Iterator it = tmp.begin();it != tmp.end();++it)
tmp2.append(*it);
cfg->writeEntry("VertSplitter",m_pMessageView ? tmp2 : m_VertSplitterSizesList);
#else

@ -51,7 +51,7 @@ class KviProxy;
class KviChannel;
class KviQuery;
#else
// windoze wants it to compile TQList<KviChannel> and TQList<KviQuery>
// windoze wants it to compile TQPtrList<KviChannel> and TQPtrList<KviQuery>
#include "kvi_channel.h"
#include "kvi_query.h"
#endif

@ -171,8 +171,8 @@ void KviCustomToolBar::beginCustomize()
m_pFilteredChildren->setAutoDelete(true);
// filter the events for all the children
#ifdef COMPILE_USE_QT4
TQList<TQObject*> l = children();
for(TQList<TQObject*>::Iterator it = l.begin();it != l.end();++it)
TQPtrList<TQObject*> l = children();
for(TQPtrList<TQObject*>::Iterator it = l.begin();it != l.end();++it)
{
if((*it)->isWidgetType())
filterChild(*it);
@ -193,8 +193,8 @@ void KviCustomToolBar::endCustomize()
{
// stop filtering events
#ifdef COMPILE_USE_QT4
TQList<TQObject*> l = children();
for(TQList<TQObject*>::Iterator it = l.begin();it != l.end();++it)
TQPtrList<TQObject*> l = children();
for(TQPtrList<TQObject*>::Iterator it = l.begin();it != l.end();++it)
{
if((*it)->isWidgetType())
unfilterChild(*it);

@ -1006,8 +1006,8 @@ void KviWindow::focusInEvent(TQFocusEvent *)
if(m_pIrcView)m_pFocusHandler = m_pIrcView;
else {
#ifdef COMPILE_USE_QT4
TQList<TQObject *> list = children();
for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
TQPtrList<TQObject *> list = children();
for(TQPtrList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
{
TQObject * c = *it;
if(c->isWidgetType())
@ -1124,8 +1124,8 @@ void KviWindow::childInserted(TQWidget * o)
}
#ifdef COMPILE_USE_QT4
TQList<TQObject *> list = o->children();
for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
TQPtrList<TQObject *> list = o->children();
for(TQPtrList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
{
TQObject * c = *it;
if(c->isWidgetType())
@ -1162,8 +1162,8 @@ void KviWindow::childRemoved(TQWidget * o)
m_pLastFocusedChild = 0;
#ifdef COMPILE_USE_QT4
TQList<TQObject *> list = o->children();
for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
TQPtrList<TQObject *> list = o->children();
for(TQPtrList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
{
TQObject * c = *it;
if(c->isWidgetType())
@ -1217,11 +1217,11 @@ void KviWindow::updateBackgrounds(TQObject * obj)
if(!obj)
obj = TQT_TQOBJECT(this);
#ifdef COMPILE_USE_QT4
TQList<TQObject *> list = obj->children();
TQPtrList<TQObject *> list = obj->children();
if (list.count())
{
for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
for(TQPtrList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
{
TQObject * child = *it;
if(child->metaObject()->indexOfProperty("TransparencyCapable") != -1){

@ -30,7 +30,7 @@
#include "kvi_settings.h"
#ifdef COMPILE_ON_WINDOWS
// The brain-damaged MSVC compiler can't instantiate TQList templates without a destructor definition
// The brain-damaged MSVC compiler can't instantiate TQPtrList templates without a destructor definition
#include "kvi_mdichild.h"
#else
class KviMdiChild;

Loading…
Cancel
Save