MCPcopy Create free account
hub / github.com/KDE/konsole / SSHManagerModel

Method SSHManagerModel

src/plugins/SSHManager/sshmanagermodel.cpp:40–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40SSHManagerModel::SSHManagerModel(QObject *parent)
41 : QStandardItemModel(parent)
42{
43 load();
44 if (!m_sshConfigTopLevelItem) {
45 // this also sets the m_sshConfigTopLevelItem if the text is `SSH Config`.
46 addTopLevelItem(i18nc("@item:inlistbox Hosts from ssh/config file", "SSH Config"));
47 }
48 if (invisibleRootItem()->rowCount() == 0) {
49 addTopLevelItem(i18nc("@item:inlistbox The default list of ssh hosts", "Default"));
50 }
51 if (QFileInfo::exists(sshDir + QStringLiteral("config"))) {
52 m_sshConfigWatcher.addPath(sshDir + QStringLiteral("config"));
53 connect(&m_sshConfigWatcher, &QFileSystemWatcher::fileChanged, this, [this] {
54 startImportFromSshConfig();
55 });
56 startImportFromSshConfig();
57 }
58}
59
60SSHManagerModel::~SSHManagerModel() noexcept
61{

Callers

nothing calls this directly

Calls 1

rowCountMethod · 0.45

Tested by

no test coverage detected