summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-03-17 11:00:12 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-03-17 11:04:40 (GMT)
commit5ecdb1a77b06956d3475f7d19dc573815233595a (patch)
tree86d2100d91a979b8bea80e2799f5f4a649418481 /src/gui
parented08d67fea713e550da0fd0542672cc4443806e2 (diff)
downloadQt-5ecdb1a77b06956d3475f7d19dc573815233595a.zip
Qt-5ecdb1a77b06956d3475f7d19dc573815233595a.tar.gz
Qt-5ecdb1a77b06956d3475f7d19dc573815233595a.tar.bz2
add default values to parameter of virtual methods in QProxyModel
That makes it consistent with the other models. Task-number: QTBUG-8766 Reviewed-by: gabi
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemviews/qproxymodel.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/gui/itemviews/qproxymodel.h b/src/gui/itemviews/qproxymodel.h
index 1a6b14b..f179a7a 100644
--- a/src/gui/itemviews/qproxymodel.h
+++ b/src/gui/itemviews/qproxymodel.h
@@ -67,19 +67,19 @@ public:
// implementing model interface
- QModelIndex index(int row, int column, const QModelIndex &parent) const;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &child) const;
- int rowCount(const QModelIndex &parent) const;
- int columnCount(const QModelIndex &parent) const;
- bool hasChildren(const QModelIndex &parent) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
- QVariant data(const QModelIndex &index, int role) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role);
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
- QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value,
- int role);
+ int role = Qt::EditRole);
QStringList mimeTypes() const;
QMimeData *mimeData(const QModelIndexList &indexes) const;
@@ -87,16 +87,17 @@ public:
int row, int column, const QModelIndex &parent);
Qt::DropActions supportedDropActions() const;
- bool insertRows(int row, int count, const QModelIndex &parent);
- bool insertColumns(int column, int count, const QModelIndex &parent);
+ bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
+ bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex());
void fetchMore(const QModelIndex &parent);
Qt::ItemFlags flags(const QModelIndex &index) const;
- void sort(int column, Qt::SortOrder order);
+ void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
QModelIndexList match(const QModelIndex &start, int role, const QVariant &value,
- int hits, Qt::MatchFlags flags) const;
+ int hits = 1, Qt::MatchFlags flags =
+ Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const;
QSize span(const QModelIndex &index) const;