From 4e6b1d6be4c413bec65f104a5e568066fa5430b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 15 Apr 2026 12:42:55 +0200 Subject: [PATCH] Fix #14672 (GUI: cfg files in current folder are not shown) --- gui/manualtest/projectfiledialog.md | 11 +++++++++-- gui/projectfile.cpp | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gui/manualtest/projectfiledialog.md b/gui/manualtest/projectfiledialog.md index eb76109e53e..f11b030f246 100644 --- a/gui/manualtest/projectfiledialog.md +++ b/gui/manualtest/projectfiledialog.md @@ -4,8 +4,7 @@ Some manual testing in the project file dialog interface - -## Test: Platform files +## Test: Platform file pic8.xml Ticket: #14489 @@ -14,6 +13,14 @@ EXPECTED: In the project file dialog it should be possible to select xml files i TODO: can this test be automated +## Test: Custom cfg file + +Ticket: #14672 + +1. Copy addons/avr.cfg to a file "aa.cfg" in same folder as a cppcheck GUI project file + +EXPECTED: It should not be possible to activate "aa.cfg" in the project file dialog, it should appear in alphabetical order. + ## Test: Misra C checkbox diff --git a/gui/projectfile.cpp b/gui/projectfile.cpp index b807723ceeb..4b5db97c159 100644 --- a/gui/projectfile.cpp +++ b/gui/projectfile.cpp @@ -1195,5 +1195,5 @@ QStringList ProjectFile::getSearchPaths(const QString& dir) const { const QString applicationFilePath = QCoreApplication::applicationFilePath(); const QString appPath = QFileInfo(applicationFilePath).canonicalPath(); const QString datadir = getDataDir(); - return getSearchPaths(inf.canonicalFilePath(), appPath, datadir, dir); + return getSearchPaths(inf.canonicalPath(), appPath, datadir, dir); }