Commit 5b6ccb04 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Added a check for empty filename

No empty entries should be added to the completion list, but it seems
like this is what is happening. Maybe this warning will give some more
information about the problem.
Reviewed-by: default avatarDaniel Molkentin <daniel.molkentin@nokia.com>
parent beb2916e
......@@ -1120,6 +1120,10 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface<void> &future,
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;
}
if (fileInfo.isDir()) {
text += QLatin1Char('/');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment