Drop Qt2's TQSemiModal and TQSortedList classes

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/77/head
Michele Calgaro 1 year ago
parent 6ffa01798d
commit fd0046c407
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -15,8 +15,6 @@
#ifndef KNCLEANUP_H
#define KNCLEANUP_H
#include <tqsemimodal.h>
class TQProgressBar;
class TQLabel;

@ -41,9 +41,9 @@ KNGroupBrowser::KNGroupBrowser(TQWidget *parent, const TQString &caption, KNNntp
{
refilterTimer = new TQTimer();
allList=new TQSortedList<KNGroupInfo>;
allList=new TQPtrList<KNGroupInfo>;
allList->setAutoDelete(true);
matchList=new TQSortedList<KNGroupInfo>;
matchList=new TQPtrList<KNGroupInfo>;
matchList->setAutoDelete(false);
//create Widgets
@ -321,7 +321,7 @@ void KNGroupBrowser::slotFilter(const TQString &txt)
bool doIncrementalUpdate = (!isRegexp && incrementalFilter && (filtertxt.left(lastFilter.length())==lastFilter));
if (doIncrementalUpdate) {
TQSortedList<KNGroupInfo> *tempList = new TQSortedList<KNGroupInfo>();
TQPtrList<KNGroupInfo> *tempList = new TQPtrList<KNGroupInfo>();
tempList->setAutoDelete(false);
for(KNGroupInfo *g=matchList->first(); g; g=matchList->next()) {

@ -98,7 +98,7 @@ class KNGroupBrowser : public KDialogBase {
bool incrementalFilter;
KNNntpAccount *a_ccount;
TQSortedList<KNGroupInfo> *allList, *matchList;
TQPtrList<KNGroupInfo> *allList, *matchList;
protected slots:
void slotLoadList();

@ -121,7 +121,7 @@ void KNGroupDialog::updateItemState(CheckItem *it)
void KNGroupDialog::toSubscribe(TQSortedList<KNGroupInfo> *l)
void KNGroupDialog::toSubscribe(TQPtrList<KNGroupInfo> *l)
{
KNGroupInfo *info;
l->clear();

@ -29,7 +29,7 @@ class KNGroupDialog : public KNGroupBrowser {
KNGroupDialog(TQWidget *parent, KNNntpAccount *a);
~KNGroupDialog();
void toSubscribe(TQSortedList<KNGroupInfo> *l);
void toSubscribe(TQPtrList<KNGroupInfo> *l);
void toUnsubscribe(TQStringList *l);
protected:

@ -81,7 +81,7 @@ bool KNGroupInfo::operator< (const KNGroupInfo &gi2)
KNGroupListData::KNGroupListData()
: codecForDescriptions(0)
{
groups = new TQSortedList<KNGroupInfo>;
groups = new TQPtrList<KNGroupInfo>;
groups->setAutoDelete(true);
}
@ -196,7 +196,7 @@ bool KNGroupListData::writeOut()
// merge in new groups, we want to preserve the "subscribed"-flag
// of the loaded groups and the "new"-flag of the new groups.
void KNGroupListData::merge(TQSortedList<KNGroupInfo>* newGroups)
void KNGroupListData::merge(TQPtrList<KNGroupInfo>* newGroups)
{
bool subscribed;
@ -213,9 +213,9 @@ void KNGroupListData::merge(TQSortedList<KNGroupInfo>* newGroups)
}
TQSortedList<KNGroupInfo>* KNGroupListData::extractList()
TQPtrList<KNGroupInfo>* KNGroupListData::extractList()
{
TQSortedList<KNGroupInfo>* temp = groups;
TQPtrList<KNGroupInfo>* temp = groups;
groups = 0;
return temp;
}
@ -417,7 +417,7 @@ void KNGroupManager::showGroupDialog(KNNntpAccount *a, TQWidget *parent)
}
}
TQSortedList<KNGroupInfo> lst2;
TQPtrList<KNGroupInfo> lst2;
gDialog->toSubscribe(&lst2);
for(KNGroupInfo *var=lst2.first(); var; var=lst2.next()) {
subscribeGroup(var, a);

@ -16,7 +16,7 @@
#define KNGROUPMANAGER_H
#include <tqobject.h>
#include <tqsortedlist.h>
#include <tqptrlist.h>
#include "knjobdata.h"
#include "kngroup.h"
@ -59,13 +59,13 @@ class KNGroupListData : public KNJobItem {
bool readIn(KNProtocolClient *client=0);
bool writeOut();
void merge(TQSortedList<KNGroupInfo>* newGroups);
void merge(TQPtrList<KNGroupInfo>* newGroups);
TQSortedList<KNGroupInfo>* extractList();
TQPtrList<KNGroupInfo>* extractList();
TQStringList subscribed;
TQString path;
TQSortedList<KNGroupInfo> *groups;
TQPtrList<KNGroupInfo> *groups;
TQDate fetchSince;
bool getDescriptions;
TQTextCodec *codecForDescriptions;

@ -140,7 +140,7 @@ void KNNntpClient::doFetchGroups()
if (!job->success() || job->canceled())
return; // stopped...
TQSortedVector<KNGroupInfo> tempVector;
TQPtrVector<KNGroupInfo> tempVector;
target->groups->toVector(&tempVector);
tempVector.sort();
@ -229,7 +229,7 @@ void KNNntpClient::doCheckNewGroups()
char *s, *line;
TQString name;
KNGroup::Status status;
TQSortedList<KNGroupInfo> tmpList;
TQPtrList<KNGroupInfo> tmpList;
tmpList.setAutoDelete(true);
while (getNextLine()) {

@ -36,25 +36,6 @@ class KTempFile;
// utility classes
//*****************************************************************************
/** clone of TQSortedList... */
template<class type> class TQ_EXPORT TQSortedVector : public TQPtrVector<type>
{
public:
TQSortedVector() {}
TQSortedVector ( uint size ) : TQPtrVector<type>(size) {}
TQSortedVector( const TQSortedVector<type> &l ) : TQPtrVector<type>(l) {}
~TQSortedVector() { TQPtrVector<type>::clear(); }
TQSortedVector<type> &operator=(const TQSortedVector<type> &l)
{ return (TQSortedVector<type>&)TQPtrList<type>::operator=(l); }
virtual int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{ if ( *((type*)s1) == *((type*)s2) ) return 0; return ( *((type*)s1) < *((type*)s2) ? -1 : 1 ); }
};
//==============================================================================
class KNFile : public TQFile {
public:

Loading…
Cancel
Save