mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix paste check in Linux global menu
This commit is contained in:
parent
75fc88d679
commit
53305f5f46
1 changed files with 3 additions and 2 deletions
|
@ -42,6 +42,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
#include <QtCore/QSize>
|
#include <QtCore/QSize>
|
||||||
#include <QtCore/QTemporaryFile>
|
#include <QtCore/QTemporaryFile>
|
||||||
|
#include <QtCore/QMimeData>
|
||||||
#include <QtGui/QWindow>
|
#include <QtGui/QWindow>
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
@ -1299,8 +1300,8 @@ void MainWindow::updateGlobalMenuHook() {
|
||||||
auto canPaste = false;
|
auto canPaste = false;
|
||||||
auto canDelete = false;
|
auto canDelete = false;
|
||||||
auto canSelectAll = false;
|
auto canSelectAll = false;
|
||||||
const auto clipboardHasText = QGuiApplication::clipboard()
|
const auto mimeData = QGuiApplication::clipboard()->mimeData();
|
||||||
->ownsClipboard();
|
const auto clipboardHasText = mimeData ? mimeData->hasText() : false;
|
||||||
auto markdownEnabled = false;
|
auto markdownEnabled = false;
|
||||||
if (const auto edit = qobject_cast<QLineEdit*>(focused)) {
|
if (const auto edit = qobject_cast<QLineEdit*>(focused)) {
|
||||||
canCut = canCopy = canDelete = edit->hasSelectedText();
|
canCut = canCopy = canDelete = edit->hasSelectedText();
|
||||||
|
|
Loading…
Add table
Reference in a new issue