MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / loadData

Method loadData

dialog/accountmaintenancedialog.cpp:78–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76
77
78void AccountMaintenanceDialog::loadData() {
79 names.clear();
80 ids.clear();
81 nameList->clear();
82 deleteButton->setEnabled(false);
83
84 names = global.accountsManager->nameList();
85 ids = global.accountsManager->idList();
86 for (int i=0; i<names.size(); i++)
87 nameList->addItem(names[i]);
88
89 if (ids.size() >= 2) {
90 deleteButton->setEnabled(true);
91 }
92
93 nameList->sortItems();
94 if (ids.size() >= 1) {
95 nameList->item(0)->setSelected(true);
96 }
97
98}
99
100
101void AccountMaintenanceDialog::deleteAccount() {

Callers 1

Calls 5

setEnabledMethod · 0.80
nameListMethod · 0.80
idListMethod · 0.80
addItemMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected