From 50dd5640b73a5a496046c3eebbabd8db6072fcff Mon Sep 17 00:00:00 2001 From: alex-z Date: Mon, 17 Jul 2023 10:04:02 +0200 Subject: [PATCH] Fix review comments. Signed-off-by: alex-z --- src/gui/tray/activitylistmodel.cpp | 4 ---- src/gui/tray/activitylistmodel.h | 1 - src/gui/tray/usermodel.cpp | 2 -- src/gui/tray/usermodel.h | 1 - 4 files changed, 8 deletions(-) diff --git a/src/gui/tray/activitylistmodel.cpp b/src/gui/tray/activitylistmodel.cpp index 05999258a3ea7..b6eb2fa0e3a50 100644 --- a/src/gui/tray/activitylistmodel.cpp +++ b/src/gui/tray/activitylistmodel.cpp @@ -440,7 +440,6 @@ void ActivityListModel::startFetchJob() void ActivityListModel::setFinalList(const ActivityList &finalList) { - QMutexLocker locker(&_finalListMutex); _finalList = finalList; emit allConflictsChanged(); @@ -670,7 +669,6 @@ void ActivityListModel::removeActivityFromActivityList(const Activity &activity) qCInfo(lcActivity) << "Trying to remove Activity/Notification/Error from view... "; { - QMutexLocker locker(&_finalListMutex); const auto index = _finalList.indexOf(activity); if (index != -1) { qCInfo(lcActivity) << "Activity/Notification/Error successfully removed from the list."; @@ -697,7 +695,6 @@ void ActivityListModel::checkAndRemoveSeenActivities(const OCC::ActivityList &ne { ActivityList activitiesToRemove; { - QMutexLocker locker(&_finalListMutex); for (const auto &activity : _finalList) { if (activity._objectType == QStringLiteral("chat") && !newActivities.contains(activity)) { activitiesToRemove.push_back(activity); @@ -961,7 +958,6 @@ void ActivityListModel::slotRefreshActivityInitial() void ActivityListModel::slotRemoveAccount() { { - QMutexLocker locker(&_finalListMutex); _finalList.clear(); } _activityLists.clear(); diff --git a/src/gui/tray/activitylistmodel.h b/src/gui/tray/activitylistmodel.h index dd3b5fc2dd2f4..72716aa4d4283 100644 --- a/src/gui/tray/activitylistmodel.h +++ b/src/gui/tray/activitylistmodel.h @@ -191,7 +191,6 @@ private slots: ActivityList _listOfIgnoredFiles; ActivityList _notificationErrorsLists; ActivityList _finalList; - QMutex _finalListMutex; QSet _presentedActivities; diff --git a/src/gui/tray/usermodel.cpp b/src/gui/tray/usermodel.cpp index 3c29f577ffdad..e9a5ed73ae433 100644 --- a/src/gui/tray/usermodel.cpp +++ b/src/gui/tray/usermodel.cpp @@ -245,7 +245,6 @@ void User::slotBuildNotificationDisplay(const ActivityList &list) void User::slotNotificationFetchFinished() { - QMutexLocker locker(&_isNotificationFetchRunningMutex); _isNotificationFetchRunning = false; } @@ -451,7 +450,6 @@ void User::slotRefreshNotifications() // start a server notification handler if no notification requests // are running if (_notificationRequestsRunning == 0) { - QMutexLocker locker(&_isNotificationFetchRunningMutex); if (_isNotificationFetchRunning) { qCDebug(lcActivity) << "Notification fetch is already running."; return; diff --git a/src/gui/tray/usermodel.h b/src/gui/tray/usermodel.h index 6e099e058afd3..bfeaff46d2487 100644 --- a/src/gui/tray/usermodel.h +++ b/src/gui/tray/usermodel.h @@ -188,7 +188,6 @@ private slots: int _lastChatNotificationsReceivedCount = 0; - QMutex _isNotificationFetchRunningMutex; bool _isNotificationFetchRunning = false; };