summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 53bb55b6a..ff4f09f0e 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -1267,7 +1267,11 @@ bool WebContentsAdapter::handleDropDataFileContents(const content::DropData &dro
}
const QString &fileName = toQt(dropData.file_description_filename);
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
const QString &filePath = d->dndTmpDir->filePath(fileName);
+#else
+ const QString &filePath = d->dndTmpDir->path() + QLatin1Char('/') + fileName;
+#endif
QFile file(filePath);
if (!file.open(QIODevice::WriteOnly)) {
qWarning("Cannot write temporary file %s.", qUtf8Printable(filePath));