From kde-commits Sun Nov 29 16:26:25 2015 From: Michal Humpula Date: Sun, 29 Nov 2015 16:26:25 +0000 To: kde-commits Subject: [kate] /: fix opening new files trough dbus Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=144881439523768 Git commit d61b121264d7b43d41c1c6417a18bbfb9078eb9d by Michal Humpula. Committed on 29/11/2015 at 16:25. Pushed by michalhumpula into branch 'master'. fix opening new files trough dbus REVIEW: 126197 M +2 -2 urlinfo.h http://commits.kde.org/kate/d61b121264d7b43d41c1c6417a18bbfb9078eb9d diff --git a/urlinfo.h b/urlinfo.h index 897140a..74a8d44 100644 --- a/urlinfo.h +++ b/urlinfo.h @@ -33,7 +33,7 @@ struct UrlInfo : cursor(KTextEditor::Cursor::invalid()) { // convert to an url - const QRegularExpression withProtocol(QStringLiteral("^[a-zA-Z]+:"= )); // TODO: remove after Qt supports this on its own + const QRegularExpression withProtocol(QStringLiteral("^[a-zA-Z]+:/= /")); // TODO: remove after Qt supports this on its own if (withProtocol.match(path).hasMatch()) { url =3D QUrl::fromUserInput(path); } else { @@ -50,7 +50,7 @@ struct UrlInfo int line =3D match.captured(1).toInt() - 1; // don't use an invalid column when the line is valid int column =3D qMax(0, match.captured(2).toInt() - 1); - url =3D QUrl::fromLocalFile(path); + url =3D QUrl::fromLocalFile(QDir::current().absoluteFilePa= th(path)); cursor =3D {line, column}; } }