diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index 2c7d0f8f5a6..6b6c2bbf956 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -1119,11 +1119,7 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface &future, const QFileInfo fileInfo = i.fileInfo(); const QString suffix = fileInfo.suffix(); if (suffix.isEmpty() || suffixes.contains(suffix)) { - QString text = fileName.mid(path.length() + 1); - if (text.isEmpty()) { - qWarning() << Q_FUNC_INFO << "Empty filename?" << path << fileName; - continue; - } + QString text = fileInfo.fileName(); if (fileInfo.isDir()) { text += QLatin1Char('/'); diff --git a/src/plugins/cpptools/cppmodelmanagerinterface.h b/src/plugins/cpptools/cppmodelmanagerinterface.h index ecea41dc2cb..996b9b6621d 100644 --- a/src/plugins/cpptools/cppmodelmanagerinterface.h +++ b/src/plugins/cpptools/cppmodelmanagerinterface.h @@ -41,7 +41,7 @@ namespace ProjectExplorer { } namespace CppTools { - + class AbstractEditorSupport; class CPPTOOLS_EXPORT CppModelManagerInterface : public QObject