mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Pass current dir explicitly to QUrl::fromUserInput
It works with QString() but that's a bug, I didn't expect it to work with my fromUserInput code and wrote otherwise in its documentation...
This commit is contained in:
parent
f54174f9f6
commit
0309bb1818
1 changed files with 2 additions and 1 deletions
|
@ -24,9 +24,10 @@
|
||||||
|
|
||||||
QList<QUrl> Dolphin::validateUris(const QStringList& uriList)
|
QList<QUrl> Dolphin::validateUris(const QStringList& uriList)
|
||||||
{
|
{
|
||||||
|
const QString currentDir = QDir::currentPath();
|
||||||
QList<QUrl> urls;
|
QList<QUrl> urls;
|
||||||
foreach (const QString& str, uriList) {
|
foreach (const QString& str, uriList) {
|
||||||
const QUrl url = QUrl::fromUserInput(str, QString(), QUrl::AssumeLocalFile);
|
const QUrl url = QUrl::fromUserInput(str, currentDir, QUrl::AssumeLocalFile);
|
||||||
if (url.isValid()) {
|
if (url.isValid()) {
|
||||||
urls.append(url);
|
urls.append(url);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue