Changeset View
Changeset View
Standalone View
Standalone View
gemini/CloudAccountsModel.cpp
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Line(s) | 235 | if(d->entries.at(i)->text == text) { | |||
---|---|---|---|---|---|
236 | d->entries.removeAt(i); | 236 | d->entries.removeAt(i); | ||
237 | } | 237 | } | ||
238 | } | 238 | } | ||
239 | endResetModel(); | 239 | endResetModel(); | ||
240 | } | 240 | } | ||
241 | 241 | | |||
242 | void CloudAccountsModel::removeAccount(int index) | 242 | void CloudAccountsModel::removeAccount(int index) | ||
243 | { | 243 | { | ||
244 | if(index > -1 && index < d->entries.count() - 1) | 244 | if(index > -1 && index < d->entries.count()) | ||
245 | { | 245 | { | ||
246 | beginRemoveRows(QModelIndex(), index, index); | 246 | beginRemoveRows(QModelIndex(), index, index); | ||
247 | delete(d->entries.takeAt(index)); | 247 | delete(d->entries.takeAt(index)); | ||
248 | endRemoveRows(); | 248 | endRemoveRows(); | ||
249 | d->saveList(); | 249 | d->saveList(); | ||
250 | } | 250 | } | ||
251 | } | 251 | } | ||
252 | 252 | | |||
Show All 25 Lines |