Fixed bug related to save path

This commit is contained in:
Jeremy Borgman
2021-02-15 19:56:15 -06:00
committed by borgmanJeremy
parent 40bad756ad
commit be730cf29c
3 changed files with 3 additions and 16 deletions

View File

@@ -57,10 +57,10 @@ void GeneneralConf::updateComponents()
m_saveAfterCopy->setChecked(config.saveAfterCopyValue());
m_useJpgForClipboard->setChecked(config.useJpgForClipboard());
if (!config.saveAfterCopyPathValue().isEmpty()) {
m_savePath->setText(config.saveAfterCopyPathValue());
if (!config.savePath().isEmpty()) {
m_savePath->setText(config.savePath());
} else {
ConfigHandler().setSaveAfterCopyPath(
ConfigHandler().setSavePath(
QStandardPaths::writableLocation(QStandardPaths::PicturesLocation));
}
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)

View File

@@ -444,16 +444,6 @@ void ConfigHandler::setUseJpgForClipboard(const bool value)
m_settings.setValue(QStringLiteral("useJpgForClipboard"), value);
}
QString ConfigHandler::saveAfterCopyPathValue()
{
return m_settings.value(QStringLiteral("saveAfterCopyPath")).toString();
}
void ConfigHandler::setSaveAfterCopyPath(const QString& path)
{
m_settings.setValue(QStringLiteral("saveAfterCopyPath"), path);
}
void ConfigHandler::setDefaults()
{
m_settings.clear();

View File

@@ -80,9 +80,6 @@ public:
bool saveAfterCopyValue();
void setSaveAfterCopy(const bool);
QString saveAfterCopyPathValue();
void setSaveAfterCopyPath(const QString&);
bool copyPathAfterSaveEnabled();
void setCopyPathAfterSaveEnabled(const bool);