Fix - Use fixed path for screenshots to save
This commit is contained in:
@@ -61,13 +61,6 @@ void GeneneralConf::updateComponents()
|
||||
m_copyAndCloseAfterUpload->setChecked(
|
||||
config.copyAndCloseAfterUploadEnabled());
|
||||
m_saveAfterCopy->setChecked(config.saveAfterCopyValue());
|
||||
|
||||
if (!config.saveAfterCopyPathValue().isEmpty()) {
|
||||
m_savePath->setText(config.saveAfterCopyPathValue());
|
||||
} else {
|
||||
ConfigHandler().setSaveAfterCopyPath(
|
||||
QStandardPaths::writableLocation(QStandardPaths::PicturesLocation));
|
||||
}
|
||||
m_copyPathAfterSave->setChecked(config.copyPathAfterSaveEnabled());
|
||||
|
||||
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
|
||||
@@ -376,7 +369,7 @@ void GeneneralConf::changeSavePath()
|
||||
QStandardPaths::writableLocation(QStandardPaths::PicturesLocation));
|
||||
if (!path.isEmpty()) {
|
||||
m_savePath->setText(path);
|
||||
ConfigHandler().setSaveAfterCopyPath(path);
|
||||
ConfigHandler().setSavePath(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -485,16 +485,6 @@ const QString& ConfigHandler::uploadStorage()
|
||||
return m_strRes;
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
@@ -87,9 +87,6 @@ public:
|
||||
bool saveAfterCopyValue();
|
||||
void setSaveAfterCopy(const bool);
|
||||
|
||||
QString saveAfterCopyPathValue();
|
||||
void setSaveAfterCopyPath(const QString&);
|
||||
|
||||
bool copyPathAfterSaveEnabled();
|
||||
void setCopyPathAfterSaveEnabled(const bool);
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ void ScreenshotSaver::saveToClipboard(const QPixmap& capture)
|
||||
// If we are able to properly save the file, save the file and copy to
|
||||
// clipboard.
|
||||
if ((ConfigHandler().saveAfterCopyValue()) &&
|
||||
(!ConfigHandler().saveAfterCopyPathValue().isEmpty())) {
|
||||
(!ConfigHandler().savePath().isEmpty())) {
|
||||
saveToFilesystem(capture,
|
||||
ConfigHandler().saveAfterCopyPathValue(),
|
||||
ConfigHandler().savePath(),
|
||||
QObject::tr("Capture saved to clipboard."));
|
||||
QApplication::clipboard()->setPixmap(capture);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user