mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-04-27 14:14:33 +00:00
There was refactored code
This commit is contained in:
parent
95eb3eca16
commit
43ea5822c7
@ -39,10 +39,9 @@ QHash<int, QByteArray> HistoryNotificationsModel::roleNames() const {
|
|||||||
|
|
||||||
|
|
||||||
void HistoryNotificationsModel::setHistory(const QmlNotificationService::NotificationData ¬ificationData) {
|
void HistoryNotificationsModel::setHistory(const QmlNotificationService::NotificationData ¬ificationData) {
|
||||||
const int index = notificationsList.count() > 0? notificationsList.count() - 1 : notificationsList.count();
|
beginResetModel();
|
||||||
beginInsertRows(QModelIndex(), index, index);
|
notificationsList.push_back(notificationData);
|
||||||
notificationsList.insert(index, notificationData);
|
endResetModel();
|
||||||
endInsertRows();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryNotificationsModel::clearAllHistory() {
|
void HistoryNotificationsModel::clearAllHistory() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user