Commit 507f90fb authored by Laurent Montel's avatar Laurent Montel 😁

QList -> qPtrList

svn path=/trunk/kdesdk/cervisia/; revision=114118
parent 0c4702fa
......@@ -259,8 +259,8 @@ void HistoryDialog::choiceChanged()
// Now move all items which fulfill our criteria
// back into the listview.
QList<ItemCopy> shownitems;
QListIterator<ItemCopy> it(hiddenitems);
QPtrList<ItemCopy> shownitems;
QPtrListIterator<ItemCopy> it(hiddenitems);
for (; it.current(); ++it)
{
ItemCopy *item = it.current();
......@@ -287,7 +287,7 @@ void HistoryDialog::choiceChanged()
}
// Delete shown items from hidden list
QListIterator<ItemCopy> it2(shownitems);
QPtrListIterator<ItemCopy> it2(shownitems);
for (; it2.current(); ++it2)
hiddenitems.remove(it2.current());
......
......@@ -324,7 +324,7 @@ bool LogDialog::parseCvsLog(const QString &sbox, const QString &repo, const QStr
// Build tagcomment and taglist:
// tagcomment contains Tags, Branchpoints and 'On Branch's
// taglist contains tags (without prefix) and Branchpoints
QListIterator<TagInfo> it(tags);
QPtrListIterator<TagInfo> it(tags);
for (; it.current(); ++it)
{
if (rev == it.current()->rev)
......@@ -373,7 +373,7 @@ bool LogDialog::parseCvsLog(const QString &sbox, const QString &repo, const QStr
tagcombo[0]->insertItem("");
tagcombo[1]->insertItem("");
QListIterator<TagInfo> it(tags);
QPtrListIterator<TagInfo> it(tags);
for (; it.current(); ++it)
{
QString str = it.current()->tag;
......@@ -421,7 +421,7 @@ void LogDialog::annotateClicked()
void LogDialog::revisionSelected(QString rev, bool rmb)
{
QListIterator<RevisionInfo> it(items);
QPtrListIterator<RevisionInfo> it(items);
for (; it.current(); ++it)
if (it.current()->rev == rev)
{
......@@ -446,7 +446,7 @@ void LogDialog::revisionSelected(QString rev, bool rmb)
void LogDialog::tagSelected(QString tag, bool rmb)
{
QListIterator<TagInfo> it(tags);
QPtrListIterator<TagInfo> it(tags);
for (; it.current(); ++it)
if (tag == it.current()->tag)
{
......
......@@ -78,8 +78,8 @@ private:
QString sandbox;
QString repository;
QString filename;
QList<RevisionInfo> items;
QList<TagInfo> tags;
QPtrList<RevisionInfo> items;
QPtrList<TagInfo> tags;
QString selectionA;
QString selectionB;
LogTreeView *tree;
......
......@@ -331,7 +331,7 @@ AddRepositoryDialog::AddRepositoryDialog(QWidget *parent, const char *name)
KButtonBox *buttonbox = new KButtonBox(this);
buttonbox->addStretch();
QPushButton *ok = buttonbox->addButton(i18n("OK"));
ok = buttonbox->addButton(i18n("OK"));
QPushButton *cancel = buttonbox->addButton(i18n("Cancel"));
ok->setDefault(true);
connect( ok, SIGNAL(clicked()), this, SLOT(accept()) );
......@@ -349,6 +349,7 @@ AddRepositoryDialog::AddRepositoryDialog(QWidget *parent, const char *name)
if (options)
resize(options->size);
ok->setEnabled(!repo_edit->text().isEmpty());
}
......@@ -386,6 +387,7 @@ void AddRepositoryDialog::repoChanged()
QString repo = repository();
rsh_edit->setEnabled(repo.left(9) != ":pserver:"
&& repo.contains(":"));
ok->setEnabled(!repo.isEmpty());
}
......
......@@ -20,7 +20,7 @@
#include <klineedit.h>
class ListView;
class QPushButton;
class RepositoryDialog : public QDialog
{
......@@ -86,6 +86,7 @@ private:
KLineEdit *repo_edit;
KLineEdit *rsh_edit;
QPushButton *ok;
};
#endif
......
......@@ -19,7 +19,7 @@
#include <qlabel.h>
#include <qmultilinedit.h>
#include <qcheckbox.h>
#include <qlist.h>
#include <qptrlist.h>
#include "diffview.h"
class ResolveItem;
......@@ -70,7 +70,7 @@ private:
QPushButton *abutton, *bbutton, *abbutton, *babutton, *editbutton;
DiffView *diff1, *diff2, *merge;
QList<ResolveItem> items;
QPtrList<ResolveItem> items;
QString fname;
int markeditem;
};
......
......@@ -658,7 +658,7 @@ void UpdateView::setFilter(Filter filter)
{
filt = filter;
QStack<ListViewItem> s;
QList<ListViewItem> l;
QPtrList<ListViewItem> l;
ListViewItem *item = static_cast<ListViewItem*>(firstChild());
// Hack: Since applyFilter() changes the whole child structure, we have
......@@ -877,7 +877,7 @@ void UpdateView::finishJob(bool success)
*/
void UpdateView::markUpdated(bool laststage, bool success)
{
QListIterator<ListViewItem> it(relevantSelection);
QPtrListIterator<ListViewItem> it(relevantSelection);
for ( ; it.current(); ++it)
if (isDirItem(it.current()))
{
......@@ -904,7 +904,7 @@ void UpdateView::rememberSelection(bool recursive)
{
// Collect all selected dir and file items into relevantSelection
QList<ListViewItem> shallowItems, deepItems;
QPtrList<ListViewItem> shallowItems, deepItems;
QStack<QListViewItem> s;
for ( QListViewItem *item = firstChild(); item;
......@@ -921,7 +921,7 @@ void UpdateView::rememberSelection(bool recursive)
if (recursive)
{
QListIterator<ListViewItem> it(shallowItems);
QPtrListIterator<ListViewItem> it(shallowItems);
for ( ; it.current(); ++it)
if (isDirItem(it.current()))
for ( QListViewItem *item = it.current()->firstChild(); item;
......@@ -936,11 +936,11 @@ void UpdateView::rememberSelection(bool recursive)
#if 0
DEBUGOUT("Deep:");
QListIterator<ListViewItem> it42(deepItems);
QPtrListIterator<ListViewItem> it42(deepItems);
for (; it42.current(); ++it42)
DEBUGOUT(" " << (*it42)->text(0));
DEBUGOUT("Shallow:");
QListIterator<ListViewItem> it43(shallowItems);
QPtrListIterator<ListViewItem> it43(shallowItems);
for (; it43.current(); ++it43)
DEBUGOUT(" " << (*it43)->text(0));
#endif
......@@ -948,18 +948,18 @@ void UpdateView::rememberSelection(bool recursive)
// Collect everything together, and avoid duplicates:
relevantSelection.clear();
QListIterator<ListViewItem> it1(shallowItems);
QPtrListIterator<ListViewItem> it1(shallowItems);
for ( ; it1.current(); ++it1)
if (!relevantSelection.contains(it1.current()))
relevantSelection.append(it1.current());
QListIterator<ListViewItem> it2(deepItems);
QPtrListIterator<ListViewItem> it2(deepItems);
for ( ; it2.current(); ++it2)
if (!relevantSelection.contains(it2.current()))
relevantSelection.append(it2.current());
#if 0
DEBUGOUT("Relevant:");
QListIterator<ListViewItem> it44(relevantSelection);
QPtrListIterator<ListViewItem> it44(relevantSelection);
for (; it44.current(); ++it44)
DEBUGOUT(" " << (*it44)->text(0));
DEBUGOUT("End");
......@@ -973,9 +973,9 @@ void UpdateView::rememberSelection(bool recursive)
*/
void UpdateView::syncSelection()
{
QList<UpdateDirItem> dirs;
QPtrList<UpdateDirItem> dirs;
QListIterator<ListViewItem> it1(relevantSelection);
QPtrListIterator<ListViewItem> it1(relevantSelection);
for ( ; it1.current(); ++it1)
{
UpdateDirItem *diritem = 0;
......@@ -989,7 +989,7 @@ void UpdateView::syncSelection()
QApplication::setOverrideCursor(waitCursor);
QListIterator<UpdateDirItem> it2(dirs);
QPtrListIterator<UpdateDirItem> it2(dirs);
for ( ; it2.current(); ++it2)
{
it2.current()->syncWithDirectory();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment