Commit 904a6ec6 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer Committed by con

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 <>
(cherry picked from commit 5b6ccb04)
parent 138ed2fb
......@@ -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;
if (fileInfo.isDir()) {
text += QLatin1Char('/');
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment