Skip to content
GitLab
Menu
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
21069461
Commit
21069461
authored
Nov 30, 2021
by
Tomaz Canabrava
Browse files
Save the pointer to the SSH Config Folder
parent
55d82783
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/SSHManager/sshmanagermodel.cpp
View file @
21069461
...
...
@@ -34,6 +34,10 @@ SSHManagerModel::SSHManagerModel(QObject *parent)
:
QStandardItemModel
(
parent
)
{
load
();
if
(
!
m_sshConfigTopLevelItem
)
{
// this also sets the m_sshConfigTopLevelItem if the text is `SSH Config`.
addTopLevelItem
(
i18n
(
"SSH Config"
));
}
if
(
invisibleRootItem
()
->
rowCount
()
==
0
)
{
addTopLevelItem
(
i18n
(
"Default"
));
}
...
...
@@ -57,6 +61,11 @@ QStandardItem *SSHManagerModel::addTopLevelItem(const QString &name)
newItem
->
setToolTip
(
i18n
(
"%1 is a folder for SSH entries"
,
name
));
invisibleRootItem
()
->
appendRow
(
newItem
);
invisibleRootItem
()
->
sortChildren
(
0
);
if
(
name
==
i18n
(
"SSH Config"
))
{
m_sshConfigTopLevelItem
=
newItem
;
}
return
newItem
;
}
...
...
src/plugins/SSHManager/sshmanagermodel.h
View file @
21069461
...
...
@@ -38,6 +38,9 @@ public:
void
importFromSshConfigFile
(
const
QString
&
file
);
void
load
();
void
save
();
private:
QStandardItem
*
m_sshConfigTopLevelItem
=
nullptr
;
};
#endif
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