Changeset View
Changeset View
Standalone View
Standalone View
src/config/alias_config.cpp
Show All 28 Lines | 18 | { | |||
---|---|---|---|---|---|
29 | 29 | | |||
30 | connect(aliasInput, &KLineEdit::textChanged, this, &Alias_Config::nameChanged); | 30 | connect(aliasInput, &KLineEdit::textChanged, this, &Alias_Config::nameChanged); | ||
31 | connect(replacementInput, &KLineEdit::textChanged, this, &Alias_Config::actionChanged); | 31 | connect(replacementInput, &KLineEdit::textChanged, this, &Alias_Config::actionChanged); | ||
32 | 32 | | |||
33 | connect(newButton, &QPushButton::clicked, this, &Alias_Config::addEntry); | 33 | connect(newButton, &QPushButton::clicked, this, &Alias_Config::addEntry); | ||
34 | connect(removeButton, &QPushButton::clicked, this, &Alias_Config::removeEntry); | 34 | connect(removeButton, &QPushButton::clicked, this, &Alias_Config::removeEntry); | ||
35 | } | 35 | } | ||
36 | 36 | | |||
37 | Alias_Config::~Alias_Config() | 37 | Alias_Config::~Alias_Config() = default; | ||
38 | { | | |||
39 | } | | |||
40 | 38 | | |||
41 | void Alias_Config::loadSettings() | 39 | void Alias_Config::loadSettings() | ||
42 | { | 40 | { | ||
43 | setAliasListView(Preferences::self()->aliasList()); | 41 | setAliasListView(Preferences::self()->aliasList()); | ||
44 | } | 42 | } | ||
45 | 43 | | |||
46 | void Alias_Config::saveSettings() | 44 | void Alias_Config::saveSettings() | ||
47 | { | 45 | { | ||
▲ Show 20 Lines • Show All 147 Lines • ▼ Show 20 Line(s) | 183 | { | |||
195 | if (nextItem) | 193 | if (nextItem) | ||
196 | { | 194 | { | ||
197 | // select the item and make it the current item | 195 | // select the item and make it the current item | ||
198 | aliasListView->setCurrentItem(nextItem); | 196 | aliasListView->setCurrentItem(nextItem); | ||
199 | } | 197 | } | ||
200 | else | 198 | else | ||
201 | { | 199 | { | ||
202 | // no next item found, this means the list is empty | 200 | // no next item found, this means the list is empty | ||
203 | entrySelected(0); | 201 | entrySelected(nullptr); | ||
204 | } | 202 | } | ||
205 | // tell the config system that somethig has changed | 203 | // tell the config system that somethig has changed | ||
206 | emit modified(); | 204 | emit modified(); | ||
207 | } | 205 | } | ||
208 | } | 206 | } | ||
209 | 207 | | |||
210 | 208 | |