Commit 7fb3965 1 parent 84fac11 commit 7fb3965 Copy full SHA for 7fb3965
File tree 2 files changed +8
-13
lines changed
2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,6 @@ VersionInfoDialog::VersionInfoDialog(QWidget *parent)
57
57
58
58
ui->rightTreeWidget ->addAction (copyActionRightTreewidget);
59
59
ui->rightTreeWidget ->addAction (selAllActionRightTreewidget);
60
-
61
- contextMenu = new QMenu (this );
62
60
}
63
61
64
62
VersionInfoDialog::~VersionInfoDialog () {}
@@ -68,21 +66,20 @@ void VersionInfoDialog::CopyTreeWidgetSelection(QTreeWidget *t)
68
66
const int keyColumnIndex = 0 , valueColumnIndex = 1 ;
69
67
QString vinfo, row;
70
68
71
- for (QTreeWidgetItem *x : t->selectedItems ()) {
72
- row = x->text (keyColumnIndex) + " = " + x->text (valueColumnIndex) + " \n " ;
73
- vinfo.append (row);
69
+ QTreeWidgetItemIterator it (t);
70
+
71
+ while (*it) {
72
+ if ((*it)->isSelected ()) {
73
+ row = (*it)->text (keyColumnIndex) + " = " + (*it)->text (valueColumnIndex) + " \n " ;
74
+ vinfo.append (row);
75
+ }
76
+ it++;
74
77
}
75
78
76
79
QClipboard *clipboard = QApplication::clipboard ();
77
80
clipboard->setText (vinfo.trimmed ());
78
81
}
79
82
80
- void VersionInfoDialog::contextMenuEvent (QContextMenuEvent *event)
81
- {
82
- contextMenu->exec (event->globalPos ());
83
- event->accept ();
84
- }
85
-
86
83
void VersionInfoDialog::fillVersionInfo ()
87
84
{
88
85
RzCoreLocked core (Core ());
Original file line number Diff line number Diff line change @@ -28,8 +28,6 @@ private slots:
28
28
QAction *selAllActionLeftTreewidget = nullptr ;
29
29
QAction *selAllActionRightTreewidget = nullptr ;
30
30
31
- void contextMenuEvent (QContextMenuEvent *event) override ;
32
-
33
31
private:
34
32
std::unique_ptr<Ui::VersionInfoDialog> ui;
35
33
CutterCore *core;
You can’t perform that action at this time.
0 commit comments