Remove ambiguous argument to createIndex.
authorStephen Kelly <stephen.kelly@kdab.com>
Fri, 21 Sep 2012 08:32:08 +0000 (10:32 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 21 Sep 2012 12:04:15 +0000 (14:04 +0200)
Change-Id: I12cf8fe5b82f675a6c9dcaa628410fc066745bea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
src/linguist/linguist/messagemodel.cpp
src/qconfig/featuretreemodel.cpp

index 5740a54..cd1fe46 100644 (file)
@@ -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);
 }
 
index dd03d00..848afa0 100644 (file)
@@ -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();
     }