Details
-
Suggestion
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.15.0 RC2
-
None
-
Windows 10 and Mac OS X using Qt 15.5.0RC
Description
Hi,
I use QStandardPaths to retrieve specific folder locations on Mac/Win.
For testing I wrote this final code below.
The result on windows is this:
QDir::separator = "
"
QStandardPaths::DesktopLocation = "C:/Users/ademmler/Desktop"
But I would expect this:
QStandardPaths::DesktopLocation = "C:\\Users\\ademmler
Desktop"
The results on Mac/OS X are fine:
QDir::separator = "/"
QStandardPaths::DesktopLocation = "/Users/ademmler/Desktop"
The minimal code for testing:
#include <QCoreApplication>
#include <QStandardPaths>
#include <QDir>
#include <QDebug>
int main(int argc, char *argv[])
{ QCoreApplication a(argc, argv); qDebug() << "QDir::separator = " << QString(QDir::separator()) << Qt::endl; qDebug() << "QStandardPaths::DesktopLocation = " << QStandardPaths::writableLocation(QStandardPaths::DesktopLocation) << Qt::endl; return a.exec(); }