1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #4119

Yuri (1):
      fix(clipboard): Made clipboard operations work the same on all OSes.
This commit is contained in:
sudden6 2017-02-05 10:53:30 +01:00
commit bb2098d929
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -82,14 +82,12 @@ ChatLog::ChatLog(QWidget* parent)
});
addAction(copyAction);
#ifdef Q_OS_LINUX
// Ctrl+Insert shortcut
QShortcut* copyCtrlInsShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Insert), this);
connect(copyCtrlInsShortcut, &QShortcut::activated, this, [this]()
{
copySelectedText();
});
#endif
// select all action (ie. Ctrl+A)
selectAllAction = new QAction(this);
@ -119,9 +117,7 @@ ChatLog::ChatLog(QWidget* parent)
// selection
connect(this, &ChatLog::selectionChanged, this, [this]() {
copyAction->setEnabled(hasTextToBeCopied());
#ifdef Q_OS_LINUX
copySelectedText(true);
#endif
});
retranslateUi();