diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-18 17:32:11 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-18 17:32:11 -0500 |
| commit | e749b2072601830c11495ce210907391dfe7bc6b (patch) | |
| tree | 45d3082c037c99d60ddbbe5be8ab2bc60e467e23 /src/settings.cpp | |
| parent | 8c2814c9dc0d92e1ab015cde33eee8dcf880e265 (diff) | |
| parent | a28bd45c0b4dfbedcb816fedf0783c5287be3b19 (diff) | |
Merge pull request #1003 from isanae/file-list-improvements
Refresh optimizations
Diffstat (limited to 'src/settings.cpp')
| -rw-r--r-- | src/settings.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 4431e7d9..f0496fe8 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -209,6 +209,16 @@ void Settings::setUseSplash(bool b) set(m_Settings, "Settings", "use_splash", b); } +std::size_t Settings::refreshThreadCount() const +{ + return get<std::size_t>(m_Settings, "Settings", "refresh_thread_count", 10); +} + +void Settings::setRefreshThreadCount(std::size_t n) const +{ + return set(m_Settings, "Settings", "refresh_thread_count", n); +} + std::optional<QVersionNumber> Settings::version() const { if (auto v=getOptional<QString>(m_Settings, "General", "version")) { @@ -1992,6 +2002,24 @@ void InterfaceSettings::setDoubleClicksOpenPreviews(bool b) set(m_Settings, "Settings", "double_click_previews", b); } +FilterWidget::Options InterfaceSettings::filterOptions() const +{ + FilterWidget::Options o; + + o.useRegex = get<bool>(m_Settings, "Settings", "filter_regex", false); + o.regexCaseSensitive = get<bool>(m_Settings, "Settings", "regex_case_sensitive", false); + o.regexExtended = get<bool>(m_Settings, "Settings", "regex_extended", false); + + return o; +} + +void InterfaceSettings::setFilterOptions(const FilterWidget::Options& o) +{ + set(m_Settings, "Settings", "filter_regex", o.useRegex); + set(m_Settings, "Settings", "regex_case_sensitive", o.regexCaseSensitive); + set(m_Settings, "Settings", "regex_extended", o.regexExtended); +} + DiagnosticsSettings::DiagnosticsSettings(QSettings& settings) : m_Settings(settings) |
