Commit c2d30612 authored by David Redondo's avatar David Redondo 🏎
Browse files

Correctly handle defaultSaveLocation without scheme

Summary:
This used to be a string now it's an url. Without this change saving doesn't work
with old configs where this value is not a valid url.

Reviewers: broulik

Subscribers: #spectacle

Tags: #spectacle

Differential Revision: https://phabricator.kde.org/D26619
parent 7a84ca99
......@@ -121,7 +121,8 @@ void ExportManager::setTimestamp(const QDateTime &timestamp)
QString ExportManager::defaultSaveLocation() const
{
QString savePath = Settings::self()->defaultSaveLocation().toLocalFile();
const QUrl saveUrl = Settings::self()->defaultSaveLocation();
QString savePath = saveUrl.scheme().isEmpty() ? saveUrl.toString() : saveUrl.toLocalFile();
savePath = QDir::cleanPath(savePath);
QDir savePathDir(savePath);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment