summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/linguist/linguist/messagemodel.cpp18
-rw-r--r--src/qconfig/featuretreemodel.cpp2
2 files changed, 10 insertions, 10 deletions
diff --git a/src/linguist/linguist/messagemodel.cpp b/src/linguist/linguist/messagemodel.cpp
index 5740a5435..cd1fe46a2 100644
--- a/src/linguist/linguist/messagemodel.cpp
+++ b/src/linguist/linguist/messagemodel.cpp
@@ -716,7 +716,7 @@ void MultiDataModel::append(DataModel *dm, bool readWrite)
m_msgModel->beginInsertColumns(QModelIndex(), insCol, insCol);
m_dataModels.append(dm);
for (int j = 0; j < contextCount(); ++j) {
- m_msgModel->beginInsertColumns(m_msgModel->createIndex(j, 0, 0), insCol, insCol);
+ m_msgModel->beginInsertColumns(m_msgModel->createIndex(j, 0), insCol, insCol);
m_multiContextList[j].appendEmptyModel();
m_msgModel->endInsertColumns();
}
@@ -739,7 +739,7 @@ void MultiDataModel::append(DataModel *dm, bool readWrite)
}
if (!appendItems.isEmpty()) {
int msgCnt = mc->messageCount();
- m_msgModel->beginInsertRows(m_msgModel->createIndex(mcx, 0, 0),
+ m_msgModel->beginInsertRows(m_msgModel->createIndex(mcx, 0),
msgCnt, msgCnt + appendItems.size() - 1);
mc->appendMessageItems(appendItems);
m_msgModel->endInsertRows();
@@ -775,7 +775,7 @@ void MultiDataModel::close(int model)
int delCol = model + 1;
m_msgModel->beginRemoveColumns(QModelIndex(), delCol, delCol);
for (int i = m_multiContextList.size(); --i >= 0;) {
- m_msgModel->beginRemoveColumns(m_msgModel->createIndex(i, 0, 0), delCol, delCol);
+ m_msgModel->beginRemoveColumns(m_msgModel->createIndex(i, 0), delCol, delCol);
m_multiContextList[i].removeModel(model);
m_msgModel->endRemoveColumns();
}
@@ -784,7 +784,7 @@ void MultiDataModel::close(int model)
emit modelDeleted(model);
for (int i = m_multiContextList.size(); --i >= 0;) {
MultiContextItem &mc = m_multiContextList[i];
- QModelIndex contextIdx = m_msgModel->createIndex(i, 0, 0);
+ QModelIndex contextIdx = m_msgModel->createIndex(i, 0);
for (int j = mc.messageCount(); --j >= 0;)
if (mc.multiMessageItem(j)->isEmpty()) {
m_msgModel->beginRemoveRows(contextIdx, j, j);
@@ -1184,7 +1184,7 @@ MessageModel::MessageModel(QObject *parent, MultiDataModel *data)
QModelIndex MessageModel::index(int row, int column, const QModelIndex &parent) const
{
if (!parent.isValid())
- return createIndex(row, column, 0);
+ return createIndex(row, column);
if (!parent.internalId())
return createIndex(row, column, parent.row() + 1);
return QModelIndex();
@@ -1193,19 +1193,19 @@ QModelIndex MessageModel::index(int row, int column, const QModelIndex &parent)
QModelIndex MessageModel::parent(const QModelIndex& index) const
{
if (index.internalId())
- return createIndex(index.internalId() - 1, 0, 0);
+ return createIndex(index.internalId() - 1, 0);
return QModelIndex();
}
void MessageModel::multiContextItemChanged(const MultiDataIndex &index)
{
- QModelIndex idx = createIndex(index.context(), m_data->modelCount() + 2, 0);
+ QModelIndex idx = createIndex(index.context(), m_data->modelCount() + 2);
emit dataChanged(idx, idx);
}
void MessageModel::contextItemChanged(const MultiDataIndex &index)
{
- QModelIndex idx = createIndex(index.context(), index.model() + 1, 0);
+ QModelIndex idx = createIndex(index.context(), index.model() + 1);
emit dataChanged(idx, idx);
}
@@ -1218,7 +1218,7 @@ void MessageModel::messageItemChanged(const MultiDataIndex &index)
QModelIndex MessageModel::modelIndex(const MultiDataIndex &index)
{
if (index.message() < 0) // Should be unused case
- return createIndex(index.context(), index.model() + 1, 0);
+ return createIndex(index.context(), index.model() + 1);
return createIndex(index.message(), index.model() + 1, index.context() + 1);
}
diff --git a/src/qconfig/featuretreemodel.cpp b/src/qconfig/featuretreemodel.cpp
index dd03d00ce..848afa08e 100644
--- a/src/qconfig/featuretreemodel.cpp
+++ b/src/qconfig/featuretreemodel.cpp
@@ -189,7 +189,7 @@ QModelIndex FeatureTreeModel::index(int row, int column,
{
if (!parent.isValid()) { // index is a section
if (row < sections.size() && column == 0)
- return QAbstractItemModel::createIndex(row, column, 0);
+ return QAbstractItemModel::createIndex(row, column);
return QModelIndex();
}