Skip to content
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

Merged
merged 2 commits into from
May 18, 2021
Merged

Add context menu to activity list #8585

merged 2 commits into from
May 18, 2021

Conversation

TheOneRing
Copy link
Member

image

@TheOneRing
Copy link
Member Author

Depends on #8584

@sonarcloud
Copy link

sonarcloud bot commented May 7, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

case ActivityRole::Text:
return 120;
case ActivityRole::Account:
return 20;
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Member Author

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;
Copy link
Contributor

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) {
Copy link
Contributor

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.

@TheOneRing TheOneRing merged commit a2c238b into master May 18, 2021
@delete-merged-branch delete-merged-branch bot deleted the work/activity_context branch May 18, 2021 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants