1
0
mirror of https://invent.kde.org/network/krdc synced 2024-07-03 08:18:36 +00:00

remove dontSendClipboard hack

This commit is contained in:
Fabio Bas 2024-05-17 09:59:34 +02:00
parent 2d9986e1e5
commit 912cd7c90a
3 changed files with 4 additions and 8 deletions

View File

@ -28,7 +28,6 @@ RemoteView::RemoteView(QWidget *parent)
, m_keyboardIsGrabbed(false)
, m_factor(0.)
, m_clipboard(nullptr)
, m_dontSendClipboard(false)
#ifndef QTONLY
, m_wallet(nullptr)
#endif
@ -319,7 +318,7 @@ void RemoteView::localClipboardChanged()
return;
}
if (m_clipboard->ownsClipboard() || m_dontSendClipboard) {
if (m_clipboard->ownsClipboard() || m_viewOnly) {
return;
}
@ -331,10 +330,10 @@ void RemoteView::localClipboardChanged()
void RemoteView::remoteClipboardChanged(QMimeData *data)
{
const bool saved_dontSendClipboard = m_dontSendClipboard;
m_dontSendClipboard = true;
if (m_viewOnly) {
return;
}
m_clipboard->setMimeData(data, QClipboard::Clipboard);
m_dontSendClipboard = saved_dontSendClipboard;
}
#include "moc_remoteview.cpp"

View File

@ -423,7 +423,6 @@ protected:
QUrl m_url;
qreal m_factor;
QClipboard *m_clipboard;
bool m_dontSendClipboard;
#ifndef QTONLY
QString readWalletPassword(bool fromUserNameOnly = false);

View File

@ -474,8 +474,6 @@ void VncView::setViewOnly(bool viewOnly)
{
RemoteView::setViewOnly(viewOnly);
m_dontSendClipboard = viewOnly;
if (viewOnly)
setCursor(Qt::ArrowCursor);
else