From 3fb0674831b7129b2cf688fb1ac6fe589f5de8f3 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 29 Jan 2022 17:07:12 +0200 Subject: [PATCH] generic: replace QLinkedList with QList Signed-off-by: Ivailo Monev --- kded/kbuildsycoca.cpp | 4 ++-- kded/ksycocaresourcelist.h | 4 ++-- kdeui/xmlgui/ktoolbarhandler.cpp | 8 ++++---- kdeui/xmlgui/ktoolbarhandler_p.h | 2 +- kfile/kurlnavigator.cpp | 4 ++-- kio/kio/chmodjob.cpp | 2 +- kio/kio/chmodjob.h | 2 +- kio/kio/copyjob.cpp | 8 ++++---- kio/kio/job.cpp | 6 +++--- kio/kio/kdirlister.cpp | 4 ++-- kio/kio/previewjob.cpp | 8 ++++---- kpty/kptydevice.cpp | 6 +++--- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/kded/kbuildsycoca.cpp b/kded/kbuildsycoca.cpp index 08c1d958..741264c8 100644 --- a/kded/kbuildsycoca.cpp +++ b/kded/kbuildsycoca.cpp @@ -173,7 +173,7 @@ KService::Ptr KBuildSycoca::createService(const QString &path) // returns false if the database is up to date, true if it needs to be saved bool KBuildSycoca::build() { - typedef QLinkedList KBSEntryDictList; + typedef QList KBSEntryDictList; KBSEntryDictList entryDictList; KBSEntryDict *serviceEntryDict = 0; @@ -250,7 +250,7 @@ bool KBuildSycoca::build() g_currentFactory = (*it); // g_ctimeInfo gets created after the initial loop, so it has no entryDict. g_currentEntryDict = ed_it == ed_end ? 0 : *ed_it; - // For each resource the factory deals with + // For each resource the factory deals with const KSycocaResourceList *list = g_currentFactory->resourceList(); if (!list) continue; diff --git a/kded/ksycocaresourcelist.h b/kded/ksycocaresourcelist.h index 34290c8a..021b1452 100644 --- a/kded/ksycocaresourcelist.h +++ b/kded/ksycocaresourcelist.h @@ -18,7 +18,7 @@ #ifndef KSYCOCARESOURCELIST_H #define KSYCOCARESOURCELIST_H -#include +#include #include struct KSycocaResource @@ -27,7 +27,7 @@ struct KSycocaResource QString extension; }; -class KSycocaResourceList : public QLinkedList +class KSycocaResourceList : public QList { public: KSycocaResourceList() { } diff --git a/kdeui/xmlgui/ktoolbarhandler.cpp b/kdeui/xmlgui/ktoolbarhandler.cpp index c69657b1..2d8a3615 100644 --- a/kdeui/xmlgui/ktoolbarhandler.cpp +++ b/kdeui/xmlgui/ktoolbarhandler.cpp @@ -51,7 +51,7 @@ namespace { public: BarActionBuilder( KActionCollection *actionCollection, KXmlGuiWindow *mainWindow, - QLinkedList &oldToolBarList ) + QList &oldToolBarList ) : m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false ) { QList toolBars = m_mainWindow->findChildren(); @@ -106,7 +106,7 @@ namespace return actions; } - const QLinkedList &toolBars() const + const QList &toolBars() const { return m_toolBars; } @@ -127,7 +127,7 @@ namespace KActionCollection *m_actionCollection; KXmlGuiWindow *m_mainWindow; - QLinkedList m_toolBars; + QList m_toolBars; QList m_toolBarActions; bool m_needsRebuild : 1; @@ -158,7 +158,7 @@ class ToolBarHandler::Private ToolBarHandler *parent; QPointer mainWindow; QList actions; - QLinkedList toolBars; + QList toolBars; }; void ToolBarHandler::Private::init( KXmlGuiWindow *mw ) diff --git a/kdeui/xmlgui/ktoolbarhandler_p.h b/kdeui/xmlgui/ktoolbarhandler_p.h index eb2e7c8f..b054bec1 100644 --- a/kdeui/xmlgui/ktoolbarhandler_p.h +++ b/kdeui/xmlgui/ktoolbarhandler_p.h @@ -19,7 +19,7 @@ #ifndef KTOOLBARHANDLER_H #define KTOOLBARHANDLER_H -#include +#include #include #include diff --git a/kfile/kurlnavigator.cpp b/kfile/kurlnavigator.cpp index b304d42e..28e72684 100644 --- a/kfile/kurlnavigator.cpp +++ b/kfile/kurlnavigator.cpp @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include @@ -641,7 +641,7 @@ void KUrlNavigator::Private::updateButtonVisibility() bool isLastButton = true; bool hasHiddenButtons = false; - QLinkedList buttonsToShow; + QList buttonsToShow; while (it != itBegin) { --it; KUrlNavigatorButton* button = (*it); diff --git a/kio/kio/chmodjob.cpp b/kio/kio/chmodjob.cpp index 863ca035..3d3b578b 100644 --- a/kio/kio/chmodjob.cpp +++ b/kio/kio/chmodjob.cpp @@ -74,7 +74,7 @@ namespace KIO { int m_newGroup; bool m_recursive; KFileItemList m_lstItems; - QLinkedList m_infos; // linkedlist since we keep removing the first item + QList m_infos; void chmodNextFile(); void _k_slotEntries( KIO::Job * , const KIO::UDSEntryList & ); diff --git a/kio/kio/chmodjob.h b/kio/kio/chmodjob.h index a38cfa4e..a969ce1c 100644 --- a/kio/kio/chmodjob.h +++ b/kio/kio/chmodjob.h @@ -26,7 +26,7 @@ #include "job.h" #include -#include +#include namespace KIO { diff --git a/kio/kio/copyjob.cpp b/kio/kio/copyjob.cpp index c9c6ade2..e0955613 100644 --- a/kio/kio/copyjob.cpp +++ b/kio/kio/copyjob.cpp @@ -46,7 +46,7 @@ #endif #include -#include +#include #include #include #include // mode_t @@ -146,8 +146,8 @@ public: bool m_bURLDirty; // Used after copying all the files into the dirs, to set mtime (TODO: and permissions?) // after the copy is done - QLinkedList m_directoriesCopied; - QLinkedList::const_iterator m_directoriesCopiedIterator; + QList m_directoriesCopied; + QList::const_iterator m_directoriesCopiedIterator; CopyJob::CopyMode m_mode; bool m_asMethod; @@ -1704,7 +1704,7 @@ void CopyJobPrivate::setNextDirAttribute() // TODO: can be removed now. Or reintroduced as a fast path for local files // if launching even more jobs as done above is a performance problem. // - QLinkedList::const_iterator it = m_directoriesCopied.constBegin(); + QList::const_iterator it = m_directoriesCopied.constBegin(); for ( ; it != m_directoriesCopied.constEnd() ; ++it ) { const KUrl& url = (*it).uDest; if ( url.isLocalFile() && (*it).mtime != (time_t)-1 ) { diff --git a/kio/kio/job.cpp b/kio/kio/job.cpp index 25d72c4b..58823015 100644 --- a/kio/kio/job.cpp +++ b/kio/kio/job.cpp @@ -37,7 +37,7 @@ extern "C" { #include #include } -#include +#include #include #include #include @@ -2734,7 +2734,7 @@ public: inline bool operator==( const GetRequest& req ) const { return req.id == id; } }; - typedef QLinkedList RequestQueue; + typedef QList RequestQueue; RequestQueue m_waitQueue; RequestQueue m_activeQueue; @@ -2750,7 +2750,7 @@ public: virtual void start(Slave *slave); bool findCurrentEntry(); - void flushQueue(QLinkedList &queue); + void flushQueue(QList &queue); Q_DECLARE_PUBLIC(MultiGetJob) diff --git a/kio/kio/kdirlister.cpp b/kio/kio/kdirlister.cpp index c567aff1..85fdce82 100644 --- a/kio/kio/kdirlister.cpp +++ b/kio/kio/kdirlister.cpp @@ -23,7 +23,7 @@ #include "kdirlister.h" #include "kdirlister_p.h" -#include +#include #include #include @@ -1521,7 +1521,7 @@ void KDirListerCache::renameDir( const KUrl &oldUrl, const KUrl &newUrl ) //DirItem *dir = itemsInUse.take( oldUrlStr ); //emitRedirections( oldUrl, url ); - QLinkedList itemsToChange; + QList itemsToChange; QSet listers; // Look at all dirs being listed/shown diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp index c4c4ed38..a3a24842 100644 --- a/kio/kio/previewjob.cpp +++ b/kio/kio/previewjob.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -79,8 +79,8 @@ public: // Some plugins support remote URLs, QHash m_remoteProtocolPlugins; // Our todo list :) - // We remove the first item at every step, so use QLinkedList - QLinkedList items; + // We remove the first item at every step, so use QList + QList items; // The current item PreviewItem currentItem; // The modification time of that URL @@ -343,7 +343,7 @@ void PreviewJobPrivate::startPreview() void PreviewJob::removeItem( const KUrl& url ) { Q_D(PreviewJob); - for (QLinkedList::Iterator it = d->items.begin(); it != d->items.end(); ++it) + for (QList::Iterator it = d->items.begin(); it != d->items.end(); ++it) if ((*it).item.url() == url) { d->items.erase(it); diff --git a/kpty/kptydevice.cpp b/kpty/kptydevice.cpp index 92151cb9..11157b28 100644 --- a/kpty/kptydevice.cpp +++ b/kpty/kptydevice.cpp @@ -62,7 +62,7 @@ ///////////////////////////////////////////////////// #include -#include +#include #define CHUNKSIZE 4096 @@ -170,7 +170,7 @@ public: { int index = 0; int start = head; - QLinkedList::ConstIterator it = buffers.begin(); + QList::ConstIterator it = buffers.begin(); forever { if (!maxLength) return index; @@ -219,7 +219,7 @@ public: } private: - QLinkedList buffers; + QList buffers; int head, tail; int totalSize; };