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 0592e36fb..5850b07b5 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -1320,7 +1320,11 @@ bool WebContentsAdapter::handleDropDataFileContents(const content::DropData &dro
const auto maybeFilename = dropData.GetSafeFilenameForImageFileContents();
const QString fileName = maybeFilename ? toQt(maybeFilename->AsUTF16Unsafe()) : QString();
+#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));