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

QList -> qPtrList

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