Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Utilities
Konsole
Commits
f7322f8e
Commit
f7322f8e
authored
Dec 26, 2014
by
David Faure
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix QUrl porting error (missing fromLocalFile) and construct URL properly.
(to escape things like usernames correctly)
parent
a98f7be3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/Session.cpp
src/Session.cpp
+8
-4
No files found.
src/Session.cpp
View file @
f7322f8e
...
...
@@ -991,12 +991,16 @@ QUrl Session::getUrl()
if
(
_foregroundProcessInfo
->
name
(
&
ok
)
==
"ssh"
&&
ok
)
{
SSHProcessInfo
sshInfo
(
*
_foregroundProcessInfo
);
path
=
"ssh://"
+
sshInfo
.
userName
()
+
'@'
+
sshInfo
.
host
();
QUrl
url
;
url
.
setScheme
(
"ssh"
);
url
.
setUserName
(
sshInfo
.
userName
());
url
.
setHost
(
sshInfo
.
host
());
QString
port
=
sshInfo
.
port
();
const
QString
port
=
sshInfo
.
port
();
if
(
!
port
.
isEmpty
()
&&
port
!=
"22"
)
{
path
.
append
(
':'
+
port
);
url
.
setPort
(
port
.
toInt
()
);
}
return
url
;
}
else
{
path
=
_foregroundProcessInfo
->
currentDir
(
&
ok
);
if
(
!
ok
)
...
...
@@ -1009,7 +1013,7 @@ QUrl Session::getUrl()
}
}
return
QUrl
(
path
);
return
QUrl
::
fromLocalFile
(
path
);
}
void
Session
::
setIconName
(
const
QString
&
iconName
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment