From 5d10d34111ed363db5a93e4e5e52877223ba6413 Mon Sep 17 00:00:00 2001 From: Ernie Pasveer Date: Thu, 28 Nov 2024 11:13:50 -0600 Subject: [PATCH] Fixed bug #273. --- CHANGELOG.md | 1 + src/SeerGdbWidget.cpp | 28 ++++++++-------------------- src/SeerGdbWidget.h | 3 --- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57c55d3..e4f70c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ * Fixed bug when the Basic Struct visualizer display simple variable types (non-structs). * Source all files in ~/.config/seergdb/scripts/ on startup. +* Fixed regression handling ignoring of system header files. ## [2.4] - 2024-03-18 * Changed main icon to a more license friendly one. diff --git a/src/SeerGdbWidget.cpp b/src/SeerGdbWidget.cpp index 941f6fd..338c102 100644 --- a/src/SeerGdbWidget.cpp +++ b/src/SeerGdbWidget.cpp @@ -2919,12 +2919,12 @@ void SeerGdbWidget::writeSettings () { } } settings.endArray(); - settings.beginWriteArray("sourceignoredirectories"); { - QStringList directories = sourceIgnoreDirectories(); + settings.beginWriteArray("sourceignorefilepatters"); { + QStringList patterns = sourceIgnoreFilePatterns(); - for (int i = 0; i < directories.size(); ++i) { + for (int i = 0; i < patterns.size(); ++i) { settings.setArrayIndex(i); - settings.setValue("directory", directories[i]); + settings.setValue("pattern", patterns[i]); } } settings.endArray(); @@ -3018,16 +3018,16 @@ void SeerGdbWidget::readSettings () { setSourceAlternateDirectories(directories); } settings.endArray(); - size = settings.beginReadArray("sourceignoredirectories"); { - QStringList directories; + size = settings.beginReadArray("sourceignorefilepatters"); { + QStringList patterns; for (int i = 0; i < size; ++i) { settings.setArrayIndex(i); - directories << settings.value("directory").toString(); + patterns << settings.value("pattern").toString(); } - setSourceIgnoreDirectories(directories); + setSourceIgnoreFilePatterns(patterns); } settings.endArray(); if (settings.childGroups().contains("sourcemiscfilepatterns")) { @@ -3405,18 +3405,6 @@ void SeerGdbWidget::setSourceAlternateDirectories (const QStringList& alternateD editorManager()->setEditorAlternateDirectories(alternateDirectories); } -const QStringList& SeerGdbWidget::sourceIgnoreDirectories() const { - - return editorManager()->editorIgnoreDirectories(); -} - -void SeerGdbWidget::setSourceIgnoreDirectories (const QStringList& ignoreDirectories) { - - editorManager()->setEditorIgnoreDirectories(ignoreDirectories); - - sourceLibraryManagerWidget->sourceBrowserWidget()->setIgnoreFilePatterns(ignoreDirectories); -} - void SeerGdbWidget::setSourceMiscFilePatterns (const QStringList& filePatterns) { sourceLibraryManagerWidget->sourceBrowserWidget()->setMiscFilePatterns(filePatterns); diff --git a/src/SeerGdbWidget.h b/src/SeerGdbWidget.h index 8e87ac7..28fa96d 100644 --- a/src/SeerGdbWidget.h +++ b/src/SeerGdbWidget.h @@ -132,9 +132,6 @@ class SeerGdbWidget : public QWidget, protected Ui::SeerGdbWidgetForm { void setSourceAlternateDirectories (const QStringList& alternateDirectories); const QStringList& sourceAlternateDirectories () const; - void setSourceIgnoreDirectories (const QStringList& ignoreDirectories); - const QStringList& sourceIgnoreDirectories () const; - void setSourceMiscFilePatterns (const QStringList& filePatterns); const QStringList& sourceMiscFilePatterns () const;