-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add context menu to activity list #8585
Conversation
TheOneRing
commented
Apr 28, 2021
5cfe9a1
to
0d35ebf
Compare
Depends on #8584 |
0d35ebf
to
a7825bb
Compare
Kudos, SonarCloud Quality Gate passed! |
case ActivityRole::Text: | ||
return 120; | ||
case ActivityRole::Account: | ||
return 20; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might use Q_FALLTHROUGH
here.
@@ -174,55 +173,6 @@ void ActivityWidget::slotAccountActivityStatus(AccountState *ast, int statusCode | |||
showLabels(); | |||
} | |||
|
|||
// FIXME: Reused from protocol widget. Move over to utilities. | |||
QString ActivityWidget::timeString(QDateTime dt, QLocale::FormatType format) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change appears to be unrelated cleanup and should be in a separate commit. Otherwise, the Git history becomes quite useless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just removed custom date handling, we just provide a qdate to the view and it takes care of the presentation.
As we no longer sort by the display string we don't need to have seconds in the display string.
@@ -129,7 +131,6 @@ void ProtocolWidget::showContextMenu(QWidget *parent, ProtocolItemModel *model, | |||
|
|||
void ProtocolWidget::slotItemContextMenu() | |||
{ | |||
QModelIndexList list; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like some unrelated cleanup as well.
@@ -313,24 +253,23 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList &list) | |||
|
|||
const auto accId = list.first().uuid(); | |||
QList<Activity::Identifier> strayCats; | |||
for (const auto &id : _widgetForNotifId.keys()) { | |||
NotificationWidget *widget = _widgetForNotifId[id]; | |||
for (auto it = _widgetForNotifId.cbegin(); it != _widgetForNotifId.cend(); ++it) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change somehow related to the topic of the PR? I don't see the relation between using an iterator here and the new context menu.