Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
02b0fcce
Commit
02b0fcce
authored
Nov 30, 2021
by
Tomaz Canabrava
Browse files
Automatically import from ~/.ssh/config
parent
454eda2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/SSHManager/sshmanagermodel.cpp
View file @
02b0fcce
...
...
@@ -41,6 +41,12 @@ SSHManagerModel::SSHManagerModel(QObject *parent)
if
(
invisibleRootItem
()
->
rowCount
()
==
0
)
{
addTopLevelItem
(
i18n
(
"Default"
));
}
m_sshConfigWatcher
.
addPath
(
SshDir
+
QStringLiteral
(
"config"
));
connect
(
&
m_sshConfigWatcher
,
&
QFileSystemWatcher
::
fileChanged
,
this
,
[
this
]
{
startImportFromSshConfig
();
});
startImportFromSshConfig
();
}
SSHManagerModel
::~
SSHManagerModel
()
noexcept
...
...
src/plugins/SSHManager/sshmanagermodel.h
View file @
02b0fcce
...
...
@@ -8,6 +8,7 @@
#ifndef SSHMANAGERMODEL_H
#define SSHMANAGERMODEL_H
#include
<QFileSystemWatcher>
#include
<QStandardItemModel>
#include
<memory>
...
...
@@ -43,6 +44,7 @@ public:
private:
QStandardItem
*
m_sshConfigTopLevelItem
=
nullptr
;
QFileSystemWatcher
m_sshConfigWatcher
;
};
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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