Changeset View
Changeset View
Standalone View
Standalone View
src/ExportManager.cpp
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Line(s) | |||||
116 | { | 116 | { | ||
117 | mPixmapTimestamp = timestamp; | 117 | mPixmapTimestamp = timestamp; | ||
118 | } | 118 | } | ||
119 | 119 | | |||
120 | // native file save helpers | 120 | // native file save helpers | ||
121 | 121 | | |||
122 | QString ExportManager::defaultSaveLocation() const | 122 | QString ExportManager::defaultSaveLocation() const | ||
123 | { | 123 | { | ||
124 | QString savePath = Settings::self()->defaultSaveLocation().toLocalFile(); | 124 | const QUrl saveUrl = Settings::self()->defaultSaveLocation(); | ||
125 | // isRelative returns true if the url doesn't have a scheme | ||||
126 | QString savePath = saveUrl.isRelative() ? saveUrl.toString() : saveUrl.toLocalFile(); | ||||
125 | savePath = QDir::cleanPath(savePath); | 127 | savePath = QDir::cleanPath(savePath); | ||
126 | 128 | | |||
127 | QDir savePathDir(savePath); | 129 | QDir savePathDir(savePath); | ||
128 | if (!(savePathDir.exists())) { | 130 | if (!(savePathDir.exists())) { | ||
129 | savePathDir.mkpath(QStringLiteral(".")); | 131 | savePathDir.mkpath(QStringLiteral(".")); | ||
130 | } | 132 | } | ||
131 | 133 | | |||
132 | return savePath; | 134 | return savePath; | ||
▲ Show 20 Lines • Show All 458 Lines • Show Last 20 Lines |