forked from qt-creator/qt-creator
Don't access static functions/fields via instance
Courtesy of readability-static-accessed-through-instance Change-Id: I71f54244f1e091315dac2943d9e1bfad6efa56a9 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -476,7 +476,7 @@ void CMakeBuildSettingsWidget::updateSelection()
|
||||
|
||||
for (const QModelIndex &index : selectedIndexes) {
|
||||
if (index.isValid() && index.flags().testFlag(Qt::ItemIsSelectable)) {
|
||||
ConfigModel::DataItem di = m_configModel->dataItemFromIndex(index);
|
||||
const ConfigModel::DataItem di = ConfigModel::dataItemFromIndex(index);
|
||||
if (di.isUnset)
|
||||
setableCount++;
|
||||
else
|
||||
@@ -498,7 +498,7 @@ void CMakeBuildSettingsWidget::setVariableUnsetFlag(bool unsetFlag)
|
||||
bool unsetFlagToggled = false;
|
||||
for (const QModelIndex &index : selectedIndexes) {
|
||||
if (index.isValid()) {
|
||||
ConfigModel::DataItem di = m_configModel->dataItemFromIndex(index);
|
||||
const ConfigModel::DataItem di = ConfigModel::dataItemFromIndex(index);
|
||||
if (di.isUnset != unsetFlag) {
|
||||
m_configModel->toggleUnsetFlag(mapToSource(m_configView, index));
|
||||
unsetFlagToggled = true;
|
||||
|
||||
@@ -1068,8 +1068,8 @@ QList<ProjectExplorer::ExtraCompiler *> CMakeBuildSystem::findExtraCompilers()
|
||||
|
||||
// Find all files generated by any of the extra compilers, in a rather crude way.
|
||||
Project *p = project();
|
||||
const FilePaths fileList = p->files([&fileExtensions, p](const Node *n) {
|
||||
if (!p->SourceFiles(n))
|
||||
const FilePaths fileList = p->files([&fileExtensions](const Node *n) {
|
||||
if (!Project::SourceFiles(n))
|
||||
return false;
|
||||
const QString fp = n->filePath().toString();
|
||||
const int pos = fp.lastIndexOf('.');
|
||||
|
||||
Reference in New Issue
Block a user