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

fix(clipboard): Made clipboard operations work the same on all OSes.

Qt should handle all OS differences, not individual apps.
This commit is contained in:
Yuri 2017-02-02 13:09:44 -08:00
parent 5c5dce4d33
commit a18e0b6a2c

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();