From b9433359de50ede174e8892ef79a6fa3b2be66b6 Mon Sep 17 00:00:00 2001 From: firewave Date: Tue, 21 Apr 2026 16:59:33 +0200 Subject: [PATCH] fixed handling of empty user include in GUI [skip ci] --- gui/mainwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 8035b6da78b..3906fbbd3e3 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1122,7 +1122,9 @@ bool MainWindow::getCppcheckSettings(Settings& settings, Suppressions& supprs) for (const QString& undefine : undefines) settings.userUndefs.insert(undefine.toStdString()); - settings.userIncludes.push_back(mProjectFile->getUserInclude().toStdString()); + const QString& userInclude = mProjectFile->getUserInclude(); + if (!userInclude.isEmpty()) + settings.userIncludes.push_back(userInclude.toStdString()); const QStringList libraries = mProjectFile->getLibraries(); for (const QString& library : libraries) {