Skip to content

Commit

Permalink
Merge pull request #274 from epasveer/273-some-source-configurations-…
Browse files Browse the repository at this point in the history
…are-not-saved-or-restored

Fixed bug #273.
  • Loading branch information
epasveer authored Nov 28, 2024
2 parents 8db74c2 + 5d10d34 commit 97cc2e9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
28 changes: 8 additions & 20 deletions src/SeerGdbWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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")) {
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions src/SeerGdbWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 97cc2e9

Please sign in to comment.