forked from qt-creator/qt-creator
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: Daniel Molkentin <daniel.molkentin@nokia.com>
(cherry picked from commit 5b6ccb0468
)
This commit is contained in:
@@ -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('/');
|
||||
|
||||
|
Reference in New Issue
Block a user