mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
generic: replace QLinkedList<T> with QList<T>
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
939b844683
commit
3fb0674831
12 changed files with 29 additions and 29 deletions
|
@ -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<KBSEntryDict *> KBSEntryDictList;
|
||||
typedef QList<KBSEntryDict *> 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;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#ifndef KSYCOCARESOURCELIST_H
|
||||
#define KSYCOCARESOURCELIST_H
|
||||
|
||||
#include <QtCore/QLinkedList>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QString>
|
||||
|
||||
struct KSycocaResource
|
||||
|
@ -27,7 +27,7 @@ struct KSycocaResource
|
|||
QString extension;
|
||||
};
|
||||
|
||||
class KSycocaResourceList : public QLinkedList<KSycocaResource>
|
||||
class KSycocaResourceList : public QList<KSycocaResource>
|
||||
{
|
||||
public:
|
||||
KSycocaResourceList() { }
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace
|
|||
{
|
||||
public:
|
||||
BarActionBuilder( KActionCollection *actionCollection, KXmlGuiWindow *mainWindow,
|
||||
QLinkedList<KToolBar*> &oldToolBarList )
|
||||
QList<KToolBar*> &oldToolBarList )
|
||||
: m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false )
|
||||
{
|
||||
QList<KToolBar*> toolBars = m_mainWindow->findChildren<KToolBar*>();
|
||||
|
@ -106,7 +106,7 @@ namespace
|
|||
return actions;
|
||||
}
|
||||
|
||||
const QLinkedList<KToolBar*> &toolBars() const
|
||||
const QList<KToolBar*> &toolBars() const
|
||||
{
|
||||
return m_toolBars;
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ namespace
|
|||
KActionCollection *m_actionCollection;
|
||||
KXmlGuiWindow *m_mainWindow;
|
||||
|
||||
QLinkedList<KToolBar*> m_toolBars;
|
||||
QList<KToolBar*> m_toolBars;
|
||||
QList<QAction*> m_toolBarActions;
|
||||
|
||||
bool m_needsRebuild : 1;
|
||||
|
@ -158,7 +158,7 @@ class ToolBarHandler::Private
|
|||
ToolBarHandler *parent;
|
||||
QPointer<KXmlGuiWindow> mainWindow;
|
||||
QList<QAction*> actions;
|
||||
QLinkedList<KToolBar*> toolBars;
|
||||
QList<KToolBar*> toolBars;
|
||||
};
|
||||
|
||||
void ToolBarHandler::Private::init( KXmlGuiWindow *mw )
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#ifndef KTOOLBARHANDLER_H
|
||||
#define KTOOLBARHANDLER_H
|
||||
|
||||
#include <QtCore/QLinkedList>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include <kurifilter.h>
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QLinkedList>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QBoxLayout>
|
||||
|
@ -641,7 +641,7 @@ void KUrlNavigator::Private::updateButtonVisibility()
|
|||
bool isLastButton = true;
|
||||
bool hasHiddenButtons = false;
|
||||
|
||||
QLinkedList<KUrlNavigatorButton*> buttonsToShow;
|
||||
QList<KUrlNavigatorButton*> buttonsToShow;
|
||||
while (it != itBegin) {
|
||||
--it;
|
||||
KUrlNavigatorButton* button = (*it);
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace KIO {
|
|||
int m_newGroup;
|
||||
bool m_recursive;
|
||||
KFileItemList m_lstItems;
|
||||
QLinkedList<ChmodInfo> m_infos; // linkedlist since we keep removing the first item
|
||||
QList<ChmodInfo> m_infos;
|
||||
|
||||
void chmodNextFile();
|
||||
void _k_slotEntries( KIO::Job * , const KIO::UDSEntryList & );
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "job.h"
|
||||
#include <kfileitem.h>
|
||||
|
||||
#include <QtCore/QLinkedList>
|
||||
#include <QtCore/QList>
|
||||
|
||||
namespace KIO {
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include <QtCore/qlinkedlist.h>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QFile>
|
||||
#include <sys/stat.h> // 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<CopyInfo> m_directoriesCopied;
|
||||
QLinkedList<CopyInfo>::const_iterator m_directoriesCopiedIterator;
|
||||
QList<CopyInfo> m_directoriesCopied;
|
||||
QList<CopyInfo>::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<CopyInfo>::const_iterator it = m_directoriesCopied.constBegin();
|
||||
QList<CopyInfo>::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 ) {
|
||||
|
|
|
@ -37,7 +37,7 @@ extern "C" {
|
|||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
}
|
||||
#include <QtCore/qlinkedlist.h>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/qbuffer.h>
|
||||
|
@ -2734,7 +2734,7 @@ public:
|
|||
inline bool operator==( const GetRequest& req ) const
|
||||
{ return req.id == id; }
|
||||
};
|
||||
typedef QLinkedList<GetRequest> RequestQueue;
|
||||
typedef QList<GetRequest> RequestQueue;
|
||||
|
||||
RequestQueue m_waitQueue;
|
||||
RequestQueue m_activeQueue;
|
||||
|
@ -2750,7 +2750,7 @@ public:
|
|||
virtual void start(Slave *slave);
|
||||
|
||||
bool findCurrentEntry();
|
||||
void flushQueue(QLinkedList<GetRequest> &queue);
|
||||
void flushQueue(QList<GetRequest> &queue);
|
||||
|
||||
Q_DECLARE_PUBLIC(MultiGetJob)
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "kdirlister.h"
|
||||
#include "kdirlister_p.h"
|
||||
|
||||
#include <QtCore/qlinkedlist.h>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QRegExp>
|
||||
#include <QtCore/qcoreapplication.h>
|
||||
|
||||
|
@ -1521,7 +1521,7 @@ void KDirListerCache::renameDir( const KUrl &oldUrl, const KUrl &newUrl )
|
|||
//DirItem *dir = itemsInUse.take( oldUrlStr );
|
||||
//emitRedirections( oldUrl, url );
|
||||
|
||||
QLinkedList<ItemInUseChange> itemsToChange;
|
||||
QList<ItemInUseChange> itemsToChange;
|
||||
QSet<KDirLister *> listers;
|
||||
|
||||
// Look at all dirs being listed/shown
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <QtGui/QImage>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QRegExp>
|
||||
#include <QtCore/QLinkedList>
|
||||
#include <QtCore/QList>
|
||||
#include <QCryptographicHash>
|
||||
|
||||
#include <kfileitem.h>
|
||||
|
@ -79,8 +79,8 @@ public:
|
|||
// Some plugins support remote URLs, <protocol, mimetypes>
|
||||
QHash<QString, QStringList> m_remoteProtocolPlugins;
|
||||
// Our todo list :)
|
||||
// We remove the first item at every step, so use QLinkedList
|
||||
QLinkedList<PreviewItem> items;
|
||||
// We remove the first item at every step, so use QList
|
||||
QList<PreviewItem> 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<PreviewItem>::Iterator it = d->items.begin(); it != d->items.end(); ++it)
|
||||
for (QList<PreviewItem>::Iterator it = d->items.begin(); it != d->items.end(); ++it)
|
||||
if ((*it).item.url() == url)
|
||||
{
|
||||
d->items.erase(it);
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
/////////////////////////////////////////////////////
|
||||
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qlinkedlist.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
#define CHUNKSIZE 4096
|
||||
|
||||
|
@ -170,7 +170,7 @@ public:
|
|||
{
|
||||
int index = 0;
|
||||
int start = head;
|
||||
QLinkedList<QByteArray>::ConstIterator it = buffers.begin();
|
||||
QList<QByteArray>::ConstIterator it = buffers.begin();
|
||||
forever {
|
||||
if (!maxLength)
|
||||
return index;
|
||||
|
@ -219,7 +219,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
QLinkedList<QByteArray> buffers;
|
||||
QList<QByteArray> buffers;
|
||||
int head, tail;
|
||||
int totalSize;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue