Allow to copy all the trackers with a keyboard shortcut

If multiple trackers are selected, Ctrl+C will copy only one of them
while the context menu will copy all of them. Fix this inconsistency.

Closes #2675.
This commit is contained in:
Gabriele 2015-03-08 12:40:58 +01:00
parent 19b9a84576
commit 48c1bd58dd
2 changed files with 3 additions and 0 deletions

View file

@ -78,6 +78,7 @@ TrackerList::TrackerList(PropertiesWidget *properties): QTreeWidget(), propertie
editHotkey = new QShortcut(QKeySequence("F2"), this, SLOT(editSelectedTracker()), 0, Qt::WidgetShortcut); editHotkey = new QShortcut(QKeySequence("F2"), this, SLOT(editSelectedTracker()), 0, Qt::WidgetShortcut);
connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(editSelectedTracker())); connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(editSelectedTracker()));
deleteHotkey = new QShortcut(QKeySequence(QKeySequence::Delete), this, SLOT(deleteSelectedTrackers()), 0, Qt::WidgetShortcut); deleteHotkey = new QShortcut(QKeySequence(QKeySequence::Delete), this, SLOT(deleteSelectedTrackers()), 0, Qt::WidgetShortcut);
copyHotkey = new QShortcut(QKeySequence(Qt::ControlModifier + Qt::Key_C), this, SLOT(copyTrackerUrl()), 0, Qt::WidgetShortcut);
loadSettings(); loadSettings();
} }
@ -85,6 +86,7 @@ TrackerList::TrackerList(PropertiesWidget *properties): QTreeWidget(), propertie
TrackerList::~TrackerList() { TrackerList::~TrackerList() {
delete editHotkey; delete editHotkey;
delete deleteHotkey; delete deleteHotkey;
delete copyHotkey;
saveSettings(); saveSettings();
} }

View file

@ -55,6 +55,7 @@ private:
QTreeWidgetItem* lsd_item; QTreeWidgetItem* lsd_item;
QShortcut *editHotkey; QShortcut *editHotkey;
QShortcut *deleteHotkey; QShortcut *deleteHotkey;
QShortcut *copyHotkey;
public: public:
TrackerList(PropertiesWidget *properties); TrackerList(PropertiesWidget *properties);