fix - Reset configuration in the General tab resets general settings only
(cherry picked from commit 59c84bb57bbf6c4e663662ca6e2f18eabe019f4e) # Conflicts: # src/utils/confighandler.cpp
This commit is contained in:
@@ -23,9 +23,11 @@
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QKeySequence>
|
||||
#include <QProcess>
|
||||
#include <QStandardPaths>
|
||||
#include <algorithm>
|
||||
#if defined(Q_OS_MACOS)
|
||||
#include <QProcess>
|
||||
#endif
|
||||
|
||||
ConfigHandler::ConfigHandler()
|
||||
{
|
||||
@@ -546,9 +548,16 @@ void ConfigHandler::setUseJpgForClipboard(const bool value)
|
||||
m_settings.setValue(QStringLiteral("useJpgForClipboard"), value);
|
||||
}
|
||||
|
||||
void ConfigHandler::setDefaults()
|
||||
void ConfigHandler::setDefaultSettings()
|
||||
{
|
||||
m_settings.clear();
|
||||
foreach (const QString& key, m_settings.allKeys()) {
|
||||
if (key.startsWith("Shortcuts/")) {
|
||||
// Do not reset Shortcuts
|
||||
continue;
|
||||
}
|
||||
m_settings.remove(key);
|
||||
}
|
||||
m_settings.sync();
|
||||
}
|
||||
|
||||
void ConfigHandler::setAllTheButtons()
|
||||
|
||||
Reference in New Issue
Block a user