Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-04-28 18:18:35 +0300
committerHannah von Reth <vonreth@kde.org>2021-05-18 12:19:35 +0300
commita2c238b9be273d6fec7c20c667d4719b88c6615a (patch)
tree2111197af58423c1267934a99b2a231df2a03d72 /src/gui/protocolwidget.cpp
parent54159cb09bdf00dd9a183c81b2e4ae4caca3f19b (diff)
Add context menu to activity list
Diffstat (limited to 'src/gui/protocolwidget.cpp')
-rw-r--r--src/gui/protocolwidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/protocolwidget.cpp b/src/gui/protocolwidget.cpp
index a21eaa7e9..82dd11aac 100644
--- a/src/gui/protocolwidget.cpp
+++ b/src/gui/protocolwidget.cpp
@@ -78,6 +78,7 @@ void ProtocolWidget::showContextMenu(QWidget *parent, ProtocolItemModel *model,
auto menu = new QMenu(parent);
menu->setAttribute(Qt::WA_DeleteOnClose);
+ // keep in sync with ActivityWidget::slotItemContextMenu
menu->addAction(tr("Copy to clipboard"), parent, [text = Models::formatSelection(items)] {
QApplication::clipboard()->setText(text);
});
@@ -89,6 +90,7 @@ void ProtocolWidget::showContextMenu(QWidget *parent, ProtocolItemModel *model,
{
const QString localPath = folder->path() + data.path();
if (QFileInfo::exists(localPath)) {
+ // keep in sync with ActivityWidget::slotItemContextMenu
menu->addAction(tr("Show in file browser"), parent, [localPath] {
if (QFileInfo::exists(localPath)) {
showInFileManager(localPath);
@@ -129,7 +131,6 @@ void ProtocolWidget::showContextMenu(QWidget *parent, ProtocolItemModel *model,
void ProtocolWidget::slotItemContextMenu()
{
- QModelIndexList list;
auto rows = _ui->_tableView->selectionModel()->selectedRows();
for (int i = 0; i < rows.size(); ++i) {
rows[i] = _sortModel->mapToSource(rows[i]);