forked from qt-creator/qt-creator
VCS: Replace Q_ASSERTs with QTC_ASSERT
Also rename m to model Change-Id: Ibb283dc2d5d0c306cbac9109a7e5fc6481ac86a8 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "vcsbaseconstants.h"
|
||||
|
||||
#include <coreplugin/fileiconprovider.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QStandardItem>
|
||||
#include <QFileInfo>
|
||||
@@ -157,7 +158,7 @@ unsigned int SubmitFileModel::filterFiles(const QStringList &filter)
|
||||
*/
|
||||
void SubmitFileModel::updateSelections(SubmitFileModel *source)
|
||||
{
|
||||
Q_ASSERT(source);
|
||||
QTC_ASSERT(source, return);
|
||||
int rows = rowCount();
|
||||
int sourceRows = source->rowCount();
|
||||
int lastMatched = 0;
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#include <utils/checkablemessagebox.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <find/basetextfind.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
@@ -477,21 +478,21 @@ QStringList VcsBaseSubmitEditor::checkedFiles() const
|
||||
return d->m_widget->checkedFiles();
|
||||
}
|
||||
|
||||
void VcsBaseSubmitEditor::setFileModel(SubmitFileModel *m, const QString &repositoryDirectory)
|
||||
void VcsBaseSubmitEditor::setFileModel(SubmitFileModel *model, const QString &repositoryDirectory)
|
||||
{
|
||||
Q_ASSERT(m);
|
||||
QTC_ASSERT(model, return);
|
||||
if (SubmitFileModel *oldModel = d->m_widget->fileModel()) {
|
||||
m->updateSelections(oldModel);
|
||||
model->updateSelections(oldModel);
|
||||
delete oldModel;
|
||||
}
|
||||
d->m_widget->setFileModel(m);
|
||||
d->m_widget->setFileModel(model);
|
||||
|
||||
QSet<QString> uniqueSymbols;
|
||||
const CPlusPlus::Snapshot cppSnapShot = CPlusPlus::CppModelManagerInterface::instance()->snapshot();
|
||||
|
||||
// Iterate over the files and get interesting symbols
|
||||
for (int row = 0; row < m->rowCount(); ++row) {
|
||||
const QFileInfo fileInfo(repositoryDirectory, m->file(row));
|
||||
for (int row = 0; row < model->rowCount(); ++row) {
|
||||
const QFileInfo fileInfo(repositoryDirectory, model->file(row));
|
||||
|
||||
// Add file name
|
||||
uniqueSymbols.insert(fileInfo.fileName());
|
||||
|
||||
Reference in New Issue
Block a user