diff options
Diffstat (limited to 'src/core/file_picker_controller.cpp')
-rw-r--r-- | src/core/file_picker_controller.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/file_picker_controller.cpp b/src/core/file_picker_controller.cpp index b81d7788a..84b5740d6 100644 --- a/src/core/file_picker_controller.cpp +++ b/src/core/file_picker_controller.cpp @@ -78,16 +78,16 @@ void FilePickerController::accepted(const QStringList &files) base::FilePath filePath = toFilePath(urlString).NormalizePathSeparators(); std::vector<base::FilePath::StringType> pathComponents; // Splits the file URL into scheme, host name, path and file name. - filePath.GetComponents(&pathComponents); + pathComponents = filePath.GetComponents(); QString absolutePath; -#if !defined(OS_WIN) +#if !defined(Q_OS_WIN) absolutePath = "/"; #endif QString scheme = toQt(pathComponents[0]); if (scheme.size() > 5) { -#if defined(OS_WIN) +#if defined(Q_OS_WIN) // There is no slash at the end of the file scheme and it is valid on Windows: file:C:/ if (scheme.size() == 7 && scheme.at(5).isLetter() && scheme.at(6) == ':') { absolutePath += scheme.at(5) + ":/"; @@ -95,7 +95,7 @@ void FilePickerController::accepted(const QStringList &files) #endif qWarning("Ignoring invalid item in FilePickerController::accepted(QStringList): %s", qPrintable(urlString)); continue; -#if defined(OS_WIN) +#if defined(Q_OS_WIN) } #endif } @@ -104,7 +104,7 @@ void FilePickerController::accepted(const QStringList &files) if (base::FilePath::IsSeparator(urlString.at(5).toLatin1()) && base::FilePath::IsSeparator(urlString.at(6).toLatin1()) && !base::FilePath::IsSeparator(urlString.at(7).toLatin1())) { -#if defined(OS_WIN) +#if defined(Q_OS_WIN) if (urlString.at(8) != ':' && pathComponents.size() > 2) { absolutePath += "//"; #else |