Commit f6d4b484 authored by Tomaz  Canabrava's avatar Tomaz Canabrava
Browse files

Ignore items that are already imported

parent ec39a5cd
......@@ -251,6 +251,12 @@ void SSHManagerModel::importFromSshConfigFile(const QString &file)
}
if (!data.host.isEmpty()) {
// We already registered this entity.
if (hasHost(data.host)) {
ignoreEntry = true;
continue;
}
if (data.name.isEmpty()) {
data.name = data.host;
}
......@@ -284,11 +290,13 @@ void SSHManagerModel::importFromSshConfigFile(const QString &file)
// the last possible read
if (data.host.count()) {
if (data.name.isEmpty()) {
data.name = data.host.trimmed();
if (!hasHost(data.host)) {
if (data.name.isEmpty()) {
data.name = data.host.trimmed();
}
data.useSshConfig = true;
data.importedFromSshConfig = true;
addChildItem(data, tr("SSH Config"));
}
data.useSshConfig = true;
data.importedFromSshConfig = true;
addChildItem(data, tr("SSH Config"));
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment