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
|
// returns false if the database is up to date, true if it needs to be saved
|
||||||
bool KBuildSycoca::build()
|
bool KBuildSycoca::build()
|
||||||
{
|
{
|
||||||
typedef QLinkedList<KBSEntryDict *> KBSEntryDictList;
|
typedef QList<KBSEntryDict *> KBSEntryDictList;
|
||||||
KBSEntryDictList entryDictList;
|
KBSEntryDictList entryDictList;
|
||||||
KBSEntryDict *serviceEntryDict = 0;
|
KBSEntryDict *serviceEntryDict = 0;
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ bool KBuildSycoca::build()
|
||||||
g_currentFactory = (*it);
|
g_currentFactory = (*it);
|
||||||
// g_ctimeInfo gets created after the initial loop, so it has no entryDict.
|
// g_ctimeInfo gets created after the initial loop, so it has no entryDict.
|
||||||
g_currentEntryDict = ed_it == ed_end ? 0 : *ed_it;
|
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();
|
const KSycocaResourceList *list = g_currentFactory->resourceList();
|
||||||
if (!list) continue;
|
if (!list) continue;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef KSYCOCARESOURCELIST_H
|
#ifndef KSYCOCARESOURCELIST_H
|
||||||
#define KSYCOCARESOURCELIST_H
|
#define KSYCOCARESOURCELIST_H
|
||||||
|
|
||||||
#include <QtCore/QLinkedList>
|
#include <QtCore/QList>
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
|
|
||||||
struct KSycocaResource
|
struct KSycocaResource
|
||||||
|
@ -27,7 +27,7 @@ struct KSycocaResource
|
||||||
QString extension;
|
QString extension;
|
||||||
};
|
};
|
||||||
|
|
||||||
class KSycocaResourceList : public QLinkedList<KSycocaResource>
|
class KSycocaResourceList : public QList<KSycocaResource>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
KSycocaResourceList() { }
|
KSycocaResourceList() { }
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BarActionBuilder( KActionCollection *actionCollection, KXmlGuiWindow *mainWindow,
|
BarActionBuilder( KActionCollection *actionCollection, KXmlGuiWindow *mainWindow,
|
||||||
QLinkedList<KToolBar*> &oldToolBarList )
|
QList<KToolBar*> &oldToolBarList )
|
||||||
: m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false )
|
: m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false )
|
||||||
{
|
{
|
||||||
QList<KToolBar*> toolBars = m_mainWindow->findChildren<KToolBar*>();
|
QList<KToolBar*> toolBars = m_mainWindow->findChildren<KToolBar*>();
|
||||||
|
@ -106,7 +106,7 @@ namespace
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QLinkedList<KToolBar*> &toolBars() const
|
const QList<KToolBar*> &toolBars() const
|
||||||
{
|
{
|
||||||
return m_toolBars;
|
return m_toolBars;
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ namespace
|
||||||
KActionCollection *m_actionCollection;
|
KActionCollection *m_actionCollection;
|
||||||
KXmlGuiWindow *m_mainWindow;
|
KXmlGuiWindow *m_mainWindow;
|
||||||
|
|
||||||
QLinkedList<KToolBar*> m_toolBars;
|
QList<KToolBar*> m_toolBars;
|
||||||
QList<QAction*> m_toolBarActions;
|
QList<QAction*> m_toolBarActions;
|
||||||
|
|
||||||
bool m_needsRebuild : 1;
|
bool m_needsRebuild : 1;
|
||||||
|
@ -158,7 +158,7 @@ class ToolBarHandler::Private
|
||||||
ToolBarHandler *parent;
|
ToolBarHandler *parent;
|
||||||
QPointer<KXmlGuiWindow> mainWindow;
|
QPointer<KXmlGuiWindow> mainWindow;
|
||||||
QList<QAction*> actions;
|
QList<QAction*> actions;
|
||||||
QLinkedList<KToolBar*> toolBars;
|
QList<KToolBar*> toolBars;
|
||||||
};
|
};
|
||||||
|
|
||||||
void ToolBarHandler::Private::init( KXmlGuiWindow *mw )
|
void ToolBarHandler::Private::init( KXmlGuiWindow *mw )
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef KTOOLBARHANDLER_H
|
#ifndef KTOOLBARHANDLER_H
|
||||||
#define KTOOLBARHANDLER_H
|
#define KTOOLBARHANDLER_H
|
||||||
|
|
||||||
#include <QtCore/QLinkedList>
|
#include <QtCore/QList>
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
#include <QtCore/QPointer>
|
#include <QtCore/QPointer>
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#include <kurifilter.h>
|
#include <kurifilter.h>
|
||||||
|
|
||||||
#include <QtCore/QDir>
|
#include <QtCore/QDir>
|
||||||
#include <QtCore/QLinkedList>
|
#include <QtCore/QList>
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
#include <QtGui/QApplication>
|
#include <QtGui/QApplication>
|
||||||
#include <QtGui/QBoxLayout>
|
#include <QtGui/QBoxLayout>
|
||||||
|
@ -641,7 +641,7 @@ void KUrlNavigator::Private::updateButtonVisibility()
|
||||||
bool isLastButton = true;
|
bool isLastButton = true;
|
||||||
bool hasHiddenButtons = false;
|
bool hasHiddenButtons = false;
|
||||||
|
|
||||||
QLinkedList<KUrlNavigatorButton*> buttonsToShow;
|
QList<KUrlNavigatorButton*> buttonsToShow;
|
||||||
while (it != itBegin) {
|
while (it != itBegin) {
|
||||||
--it;
|
--it;
|
||||||
KUrlNavigatorButton* button = (*it);
|
KUrlNavigatorButton* button = (*it);
|
||||||
|
|
|
@ -74,7 +74,7 @@ namespace KIO {
|
||||||
int m_newGroup;
|
int m_newGroup;
|
||||||
bool m_recursive;
|
bool m_recursive;
|
||||||
KFileItemList m_lstItems;
|
KFileItemList m_lstItems;
|
||||||
QLinkedList<ChmodInfo> m_infos; // linkedlist since we keep removing the first item
|
QList<ChmodInfo> m_infos;
|
||||||
|
|
||||||
void chmodNextFile();
|
void chmodNextFile();
|
||||||
void _k_slotEntries( KIO::Job * , const KIO::UDSEntryList & );
|
void _k_slotEntries( KIO::Job * , const KIO::UDSEntryList & );
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "job.h"
|
#include "job.h"
|
||||||
#include <kfileitem.h>
|
#include <kfileitem.h>
|
||||||
|
|
||||||
#include <QtCore/QLinkedList>
|
#include <QtCore/QList>
|
||||||
|
|
||||||
namespace KIO {
|
namespace KIO {
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <QtCore/qlinkedlist.h>
|
#include <QtCore/QList>
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
#include <QtCore/QFile>
|
#include <QtCore/QFile>
|
||||||
#include <sys/stat.h> // mode_t
|
#include <sys/stat.h> // mode_t
|
||||||
|
@ -146,8 +146,8 @@ public:
|
||||||
bool m_bURLDirty;
|
bool m_bURLDirty;
|
||||||
// Used after copying all the files into the dirs, to set mtime (TODO: and permissions?)
|
// Used after copying all the files into the dirs, to set mtime (TODO: and permissions?)
|
||||||
// after the copy is done
|
// after the copy is done
|
||||||
QLinkedList<CopyInfo> m_directoriesCopied;
|
QList<CopyInfo> m_directoriesCopied;
|
||||||
QLinkedList<CopyInfo>::const_iterator m_directoriesCopiedIterator;
|
QList<CopyInfo>::const_iterator m_directoriesCopiedIterator;
|
||||||
|
|
||||||
CopyJob::CopyMode m_mode;
|
CopyJob::CopyMode m_mode;
|
||||||
bool m_asMethod;
|
bool m_asMethod;
|
||||||
|
@ -1704,7 +1704,7 @@ void CopyJobPrivate::setNextDirAttribute()
|
||||||
// TODO: can be removed now. Or reintroduced as a fast path for local files
|
// 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.
|
// 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 ) {
|
for ( ; it != m_directoriesCopied.constEnd() ; ++it ) {
|
||||||
const KUrl& url = (*it).uDest;
|
const KUrl& url = (*it).uDest;
|
||||||
if ( url.isLocalFile() && (*it).mtime != (time_t)-1 ) {
|
if ( url.isLocalFile() && (*it).mtime != (time_t)-1 ) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ extern "C" {
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
}
|
}
|
||||||
#include <QtCore/qlinkedlist.h>
|
#include <QtCore/QList>
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
#include <QtCore/QFile>
|
#include <QtCore/QFile>
|
||||||
#include <QtCore/qbuffer.h>
|
#include <QtCore/qbuffer.h>
|
||||||
|
@ -2734,7 +2734,7 @@ public:
|
||||||
inline bool operator==( const GetRequest& req ) const
|
inline bool operator==( const GetRequest& req ) const
|
||||||
{ return req.id == id; }
|
{ return req.id == id; }
|
||||||
};
|
};
|
||||||
typedef QLinkedList<GetRequest> RequestQueue;
|
typedef QList<GetRequest> RequestQueue;
|
||||||
|
|
||||||
RequestQueue m_waitQueue;
|
RequestQueue m_waitQueue;
|
||||||
RequestQueue m_activeQueue;
|
RequestQueue m_activeQueue;
|
||||||
|
@ -2750,7 +2750,7 @@ public:
|
||||||
virtual void start(Slave *slave);
|
virtual void start(Slave *slave);
|
||||||
|
|
||||||
bool findCurrentEntry();
|
bool findCurrentEntry();
|
||||||
void flushQueue(QLinkedList<GetRequest> &queue);
|
void flushQueue(QList<GetRequest> &queue);
|
||||||
|
|
||||||
Q_DECLARE_PUBLIC(MultiGetJob)
|
Q_DECLARE_PUBLIC(MultiGetJob)
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "kdirlister.h"
|
#include "kdirlister.h"
|
||||||
#include "kdirlister_p.h"
|
#include "kdirlister_p.h"
|
||||||
|
|
||||||
#include <QtCore/qlinkedlist.h>
|
#include <QtCore/QList>
|
||||||
#include <QtCore/QRegExp>
|
#include <QtCore/QRegExp>
|
||||||
#include <QtCore/qcoreapplication.h>
|
#include <QtCore/qcoreapplication.h>
|
||||||
|
|
||||||
|
@ -1521,7 +1521,7 @@ void KDirListerCache::renameDir( const KUrl &oldUrl, const KUrl &newUrl )
|
||||||
//DirItem *dir = itemsInUse.take( oldUrlStr );
|
//DirItem *dir = itemsInUse.take( oldUrlStr );
|
||||||
//emitRedirections( oldUrl, url );
|
//emitRedirections( oldUrl, url );
|
||||||
|
|
||||||
QLinkedList<ItemInUseChange> itemsToChange;
|
QList<ItemInUseChange> itemsToChange;
|
||||||
QSet<KDirLister *> listers;
|
QSet<KDirLister *> listers;
|
||||||
|
|
||||||
// Look at all dirs being listed/shown
|
// Look at all dirs being listed/shown
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <QtGui/QImage>
|
#include <QtGui/QImage>
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
#include <QtCore/QRegExp>
|
#include <QtCore/QRegExp>
|
||||||
#include <QtCore/QLinkedList>
|
#include <QtCore/QList>
|
||||||
#include <QCryptographicHash>
|
#include <QCryptographicHash>
|
||||||
|
|
||||||
#include <kfileitem.h>
|
#include <kfileitem.h>
|
||||||
|
@ -79,8 +79,8 @@ public:
|
||||||
// Some plugins support remote URLs, <protocol, mimetypes>
|
// Some plugins support remote URLs, <protocol, mimetypes>
|
||||||
QHash<QString, QStringList> m_remoteProtocolPlugins;
|
QHash<QString, QStringList> m_remoteProtocolPlugins;
|
||||||
// Our todo list :)
|
// Our todo list :)
|
||||||
// We remove the first item at every step, so use QLinkedList
|
// We remove the first item at every step, so use QList
|
||||||
QLinkedList<PreviewItem> items;
|
QList<PreviewItem> items;
|
||||||
// The current item
|
// The current item
|
||||||
PreviewItem currentItem;
|
PreviewItem currentItem;
|
||||||
// The modification time of that URL
|
// The modification time of that URL
|
||||||
|
@ -343,7 +343,7 @@ void PreviewJobPrivate::startPreview()
|
||||||
void PreviewJob::removeItem( const KUrl& url )
|
void PreviewJob::removeItem( const KUrl& url )
|
||||||
{
|
{
|
||||||
Q_D(PreviewJob);
|
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)
|
if ((*it).item.url() == url)
|
||||||
{
|
{
|
||||||
d->items.erase(it);
|
d->items.erase(it);
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <QtCore/qbytearray.h>
|
#include <QtCore/qbytearray.h>
|
||||||
#include <QtCore/qlinkedlist.h>
|
#include <QtCore/qlist.h>
|
||||||
|
|
||||||
#define CHUNKSIZE 4096
|
#define CHUNKSIZE 4096
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ public:
|
||||||
{
|
{
|
||||||
int index = 0;
|
int index = 0;
|
||||||
int start = head;
|
int start = head;
|
||||||
QLinkedList<QByteArray>::ConstIterator it = buffers.begin();
|
QList<QByteArray>::ConstIterator it = buffers.begin();
|
||||||
forever {
|
forever {
|
||||||
if (!maxLength)
|
if (!maxLength)
|
||||||
return index;
|
return index;
|
||||||
|
@ -219,7 +219,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QLinkedList<QByteArray> buffers;
|
QList<QByteArray> buffers;
|
||||||
int head, tail;
|
int head, tail;
|
||||||
int totalSize;
|
int totalSize;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue