From fd0046c40716f19ab1bd3bff77b123e373b73771 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 19 Jun 2023 00:12:51 +0900 Subject: [PATCH] Drop Qt2's TQSemiModal and TQSortedList classes Signed-off-by: Michele Calgaro --- knode/kncleanup.h | 2 -- knode/kngroupbrowser.cpp | 6 +++--- knode/kngroupbrowser.h | 2 +- knode/kngroupdialog.cpp | 2 +- knode/kngroupdialog.h | 2 +- knode/kngroupmanager.cpp | 10 +++++----- knode/kngroupmanager.h | 8 ++++---- knode/knnntpclient.cpp | 4 ++-- knode/utilities.h | 19 ------------------- 9 files changed, 17 insertions(+), 38 deletions(-) diff --git a/knode/kncleanup.h b/knode/kncleanup.h index d765dc15..5019b207 100644 --- a/knode/kncleanup.h +++ b/knode/kncleanup.h @@ -15,8 +15,6 @@ #ifndef KNCLEANUP_H #define KNCLEANUP_H -#include - class TQProgressBar; class TQLabel; diff --git a/knode/kngroupbrowser.cpp b/knode/kngroupbrowser.cpp index f2379f51..e77f7687 100644 --- a/knode/kngroupbrowser.cpp +++ b/knode/kngroupbrowser.cpp @@ -41,9 +41,9 @@ KNGroupBrowser::KNGroupBrowser(TQWidget *parent, const TQString &caption, KNNntp { refilterTimer = new TQTimer(); - allList=new TQSortedList; + allList=new TQPtrList; allList->setAutoDelete(true); - matchList=new TQSortedList; + matchList=new TQPtrList; 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 *tempList = new TQSortedList(); + TQPtrList *tempList = new TQPtrList(); tempList->setAutoDelete(false); for(KNGroupInfo *g=matchList->first(); g; g=matchList->next()) { diff --git a/knode/kngroupbrowser.h b/knode/kngroupbrowser.h index a3df9a76..c7391b3a 100644 --- a/knode/kngroupbrowser.h +++ b/knode/kngroupbrowser.h @@ -98,7 +98,7 @@ class KNGroupBrowser : public KDialogBase { bool incrementalFilter; KNNntpAccount *a_ccount; - TQSortedList *allList, *matchList; + TQPtrList *allList, *matchList; protected slots: void slotLoadList(); diff --git a/knode/kngroupdialog.cpp b/knode/kngroupdialog.cpp index 8c9a1746..f8922e07 100644 --- a/knode/kngroupdialog.cpp +++ b/knode/kngroupdialog.cpp @@ -121,7 +121,7 @@ void KNGroupDialog::updateItemState(CheckItem *it) -void KNGroupDialog::toSubscribe(TQSortedList *l) +void KNGroupDialog::toSubscribe(TQPtrList *l) { KNGroupInfo *info; l->clear(); diff --git a/knode/kngroupdialog.h b/knode/kngroupdialog.h index f9b5a523..49a3971d 100644 --- a/knode/kngroupdialog.h +++ b/knode/kngroupdialog.h @@ -29,7 +29,7 @@ class KNGroupDialog : public KNGroupBrowser { KNGroupDialog(TQWidget *parent, KNNntpAccount *a); ~KNGroupDialog(); - void toSubscribe(TQSortedList *l); + void toSubscribe(TQPtrList *l); void toUnsubscribe(TQStringList *l); protected: diff --git a/knode/kngroupmanager.cpp b/knode/kngroupmanager.cpp index b429bd6c..188a8e1b 100644 --- a/knode/kngroupmanager.cpp +++ b/knode/kngroupmanager.cpp @@ -81,7 +81,7 @@ bool KNGroupInfo::operator< (const KNGroupInfo &gi2) KNGroupListData::KNGroupListData() : codecForDescriptions(0) { - groups = new TQSortedList; + groups = new TQPtrList; 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* newGroups) +void KNGroupListData::merge(TQPtrList* newGroups) { bool subscribed; @@ -213,9 +213,9 @@ void KNGroupListData::merge(TQSortedList* newGroups) } -TQSortedList* KNGroupListData::extractList() +TQPtrList* KNGroupListData::extractList() { - TQSortedList* temp = groups; + TQPtrList* temp = groups; groups = 0; return temp; } @@ -417,7 +417,7 @@ void KNGroupManager::showGroupDialog(KNNntpAccount *a, TQWidget *parent) } } - TQSortedList lst2; + TQPtrList lst2; gDialog->toSubscribe(&lst2); for(KNGroupInfo *var=lst2.first(); var; var=lst2.next()) { subscribeGroup(var, a); diff --git a/knode/kngroupmanager.h b/knode/kngroupmanager.h index e3573830..f713a90b 100644 --- a/knode/kngroupmanager.h +++ b/knode/kngroupmanager.h @@ -16,7 +16,7 @@ #define KNGROUPMANAGER_H #include -#include +#include #include "knjobdata.h" #include "kngroup.h" @@ -59,13 +59,13 @@ class KNGroupListData : public KNJobItem { bool readIn(KNProtocolClient *client=0); bool writeOut(); - void merge(TQSortedList* newGroups); + void merge(TQPtrList* newGroups); - TQSortedList* extractList(); + TQPtrList* extractList(); TQStringList subscribed; TQString path; - TQSortedList *groups; + TQPtrList *groups; TQDate fetchSince; bool getDescriptions; TQTextCodec *codecForDescriptions; diff --git a/knode/knnntpclient.cpp b/knode/knnntpclient.cpp index 2ba465be..ceaeafe0 100644 --- a/knode/knnntpclient.cpp +++ b/knode/knnntpclient.cpp @@ -140,7 +140,7 @@ void KNNntpClient::doFetchGroups() if (!job->success() || job->canceled()) return; // stopped... - TQSortedVector tempVector; + TQPtrVector tempVector; target->groups->toVector(&tempVector); tempVector.sort(); @@ -229,7 +229,7 @@ void KNNntpClient::doCheckNewGroups() char *s, *line; TQString name; KNGroup::Status status; - TQSortedList tmpList; + TQPtrList tmpList; tmpList.setAutoDelete(true); while (getNextLine()) { diff --git a/knode/utilities.h b/knode/utilities.h index e88ca695..98938875 100644 --- a/knode/utilities.h +++ b/knode/utilities.h @@ -36,25 +36,6 @@ class KTempFile; // utility classes //***************************************************************************** -/** clone of TQSortedList... */ -template class TQ_EXPORT TQSortedVector : public TQPtrVector -{ -public: - TQSortedVector() {} - TQSortedVector ( uint size ) : TQPtrVector(size) {} - TQSortedVector( const TQSortedVector &l ) : TQPtrVector(l) {} - ~TQSortedVector() { TQPtrVector::clear(); } - TQSortedVector &operator=(const TQSortedVector &l) - { return (TQSortedVector&)TQPtrList::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: