[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kate] /: fix opening new files trough dbus
From:       Michal Humpula <michal.humpula () hudrydum ! cz>
Date:       2015-11-29 16:26:25
Message-ID: E1a34nx-0000Bq-M7 () scm ! kde ! org
[Download RAW message or body]

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 = QUrl::fromUserInput(path);
         } else {
@@ -50,7 +50,7 @@ struct UrlInfo
                 int line = match.captured(1).toInt() - 1;
                 // don't use an invalid column when the line is valid
                 int column = qMax(0, match.captured(2).toInt() - 1);
-                url = QUrl::fromLocalFile(path);
+                url = QUrl::fromLocalFile(QDir::current().absoluteFilePath(path));
                 cursor = {line, column};
             }
         }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic