Commit a628ad05 authored by André Wöbbeking's avatar André Wöbbeking
Browse files

Replaced deprecated Qt classes/methods with actual equivalents.

svn path=/trunk/kdesdk/cervisia/; revision=196930
parent d6a5f2aa
......@@ -32,7 +32,7 @@
CvsProgressDialog::CvsProgressDialog(const QString &text, QWidget *parent)
: QSemiModal(parent, "", true), childproc(0)
: QDialog(parent, "", true), childproc(0)
{
QBoxLayout *layout = new QVBoxLayout(this, 10);
......@@ -255,7 +255,7 @@ void CvsProgressDialog::cancelClicked()
void CvsProgressDialog::closeEvent(QCloseEvent *e)
{
cancelClicked();
QSemiModal::closeEvent(e);
QDialog::closeEvent(e);
}
#include "cvsprogressdlg.moc"
......
......@@ -15,7 +15,7 @@
#ifndef CVSPROGRESSDLG_H
#define CVSPROGRESSDLG_H
#include <qsemimodal.h>
#include <qdialog.h>
#include <qstringlist.h>
......@@ -26,7 +26,7 @@ class QCString;
class KAnimWidget;
class CvsProgressDialog : public QSemiModal
class CvsProgressDialog : public QDialog
{
Q_OBJECT
......
......@@ -40,7 +40,7 @@ public:
};
int DiffViewItemList::compareItems(QCollection::Item item1, QCollection::Item item2)
int DiffViewItemList::compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2)
{
return (static_cast<DiffViewItem*>(item1)->no
== static_cast<DiffViewItem*>(item2)->no)? 0 : 1;
......@@ -52,7 +52,7 @@ const int DiffView::BORDER = 7;
DiffView::DiffView( bool withlinenos, bool withmarker,
QWidget *parent, const char *name )
: QtTableView(parent, name, WNorthWestGravity | WRepaintNoErase)
: QtTableView(parent, name, WRepaintNoErase)
{
setNumRows(0);
setNumCols( 1 + (withlinenos?1:0) + (withmarker?1:0) );
......
......@@ -16,8 +16,10 @@
#define DIFFVIEW_H
#include "qttableview.h"
#include <qptrcollection.h>
#include <qptrlist.h>
#include <qttableview.h>
class DiffViewItem;
......@@ -26,7 +28,7 @@ class DiffViewItem;
class DiffViewItemList : public QPtrList<DiffViewItem>
{
protected:
virtual int compareItems(QCollection::Item item1, QCollection::Item item2);
virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2);
};
......
......@@ -273,11 +273,11 @@ void HistoryDialog::choiceChanged()
continue;
if ( onlyfilenames_box->isChecked() &&
!QString(filename_edit->text()).isEmpty() &&
QRegExp(filename_edit->text(), true, true).match(item->text(HistoryItem::File)) != 0 )
QRegExp(filename_edit->text(), true, true).search(item->text(HistoryItem::File)) < 0 )
continue;
if ( onlydirnames_box->isChecked() &&
!QString(dirname_edit->text()).isEmpty() &&
QRegExp(dirname_edit->text(), true, true).match(item->text(HistoryItem::Path)) != 0)
QRegExp(dirname_edit->text(), true, true).search(item->text(HistoryItem::Path)) < 0)
continue;
item->setVisible(true);
......
......@@ -39,7 +39,7 @@ ListView::~ListView()
void ListView::setColumnConfig(int sortColumn, bool sortAscending,
QArray<int> indexToColumn, QArray<int> columnSizes)
QMemArray<int> indexToColumn, QMemArray<int> columnSizes)
{
m_sortColumn = sortColumn;
m_sortAscending = sortAscending;
......@@ -56,7 +56,7 @@ void ListView::setColumnConfig(int sortColumn, bool sortAscending,
void ListView::getColumnConfig(int *sortColumn, bool *sortAscending,
QArray<int> *indexToColumn, QArray<int> *columnSizes) const
QMemArray<int> *indexToColumn, QMemArray<int> *columnSizes) const
{
*sortColumn = m_sortColumn;
*sortAscending = m_sortAscending;
......
......@@ -16,7 +16,7 @@
#define _LISTVIEW_H_
#include <qlistview.h>
#include <qarray.h>
#include <qmemarray.h>
class QTimer;
......@@ -30,9 +30,9 @@ public:
~ListView();
void setColumnConfig(int sortColumn, bool sortAscending,
QArray<int> indexToColumn, QArray<int> columnSizes);
QMemArray<int> indexToColumn, QMemArray<int> columnSizes);
void getColumnConfig(int *sortColumn, bool *sortAscending,
QArray<int> *indexToColumn, QArray<int> *columnSizes) const;
QMemArray<int> *indexToColumn, QMemArray<int> *columnSizes) const;
void setPreferredColumn(int i);
int preferredColumn() const;
......
......@@ -57,8 +57,8 @@ private:
struct Options {
int sortColumn;
bool sortAscending;
QArray<int> indexToColumn;
QArray<int> columnSizes;
QMemArray<int> indexToColumn;
QMemArray<int> columnSizes;
};
static Options *options;
......
......@@ -15,7 +15,7 @@
#ifndef LOGTREE_H
#define LOGTREE_H
#include <qarray.h>
#include <qmemarray.h>
#include <qptrlist.h>
#include "qttableview.h"
......@@ -70,8 +70,8 @@ private:
LogTreeConnectionList connections;
int currentRow, currentCol;
TipLabel *currentLabel;
QArray<int> colWidths;
QArray<int> rowHeights;
QMemArray<int> colWidths;
QMemArray<int> rowHeights;
static const int BORDER;
static const int INSPACE;
......
......@@ -22,7 +22,7 @@
#include <qdir.h>
#include <qfileinfo.h>
#include <qheader.h>
#include <qstack.h>
#include <qptrstack.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kglobalsettings.h>
......@@ -776,7 +776,7 @@ UpdateView::Filter UpdateView::filter() const
bool UpdateView::hasSingleSelection()
{
bool selfound = false;
QStack<QListViewItem> s;
QPtrStack<QListViewItem> s;
for ( QListViewItem *item = firstChild(); item;
item = item->nextSibling()? item->nextSibling() : s.pop() )
......@@ -797,7 +797,7 @@ bool UpdateView::hasSingleSelection()
void UpdateView::getSingleSelection(QString *filename, QString *revision)
{
QStack<QListViewItem> s;
QPtrStack<QListViewItem> s;
for ( QListViewItem *item = firstChild(); item;
item = item->nextSibling()? item->nextSibling() : s.pop() )
......@@ -818,7 +818,7 @@ void UpdateView::getSingleSelection(QString *filename, QString *revision)
QStringList UpdateView::multipleSelection()
{
QStringList res;
QStack<QListViewItem> s;
QPtrStack<QListViewItem> s;
for ( QListViewItem *item = firstChild(); item;
item = item->nextSibling()? item->nextSibling() : s.pop() )
......@@ -848,7 +848,7 @@ QStringList UpdateView::multipleSelection()
QStringList UpdateView::fileSelection()
{
QStringList res;
QStack<QListViewItem> s;
QPtrStack<QListViewItem> s;
for ( QListViewItem *item = firstChild(); item;
item = item->nextSibling()? item->nextSibling() : s.pop() )
......@@ -867,7 +867,7 @@ void UpdateView::unfoldTree()
{
QApplication::setOverrideCursor(waitCursor);
QStack<QListViewItem> s;
QPtrStack<QListViewItem> s;
for ( QListViewItem *item = firstChild(); item;
item = item->nextSibling()? item->nextSibling() : s.pop() )
{
......@@ -885,7 +885,7 @@ void UpdateView::unfoldTree()
void UpdateView::foldTree()
{
QStack<QListViewItem> s;
QPtrStack<QListViewItem> s;
for ( QListViewItem *item = firstChild(); item;
item = item->nextSibling()? item->nextSibling() : s.pop() )
{
......@@ -984,7 +984,7 @@ void UpdateView::rememberSelection(bool recursive)
QPtrList<QListViewItem> shallowItems, deepItems;
QStack<QListViewItem> s;
QPtrStack<QListViewItem> s;
for ( QListViewItem *item = firstChild(); item;
item = item->nextSibling()? item->nextSibling() : s.pop() )
{
......@@ -1136,7 +1136,7 @@ void UpdateView::updateItem(const QString &name, Status status, bool isdir)
dirpath += '/';
UpdateDirItem *longestmatch = 0;
QStack<QListViewItem> s;
QPtrStack<QListViewItem> s;
for ( QListViewItem *item = firstChild(); item;
item = item->nextSibling()? item->nextSibling() : s.pop() )
{
......
......@@ -15,9 +15,11 @@
#ifndef UPDATEVIEW_H
#define UPDATEVIEW_H
#include <qlist.h>
#include "listview.h"
#include <qptrlist.h>
class UpdateView : public ListView
{
......
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