mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-14 18:34:49 +00:00
commit
1f16e50c30
@ -74,6 +74,7 @@
|
|||||||
#include <QtWidgets/qlineedit.h>
|
#include <QtWidgets/qlineedit.h>
|
||||||
#include <QtGui/qaccessible.h>
|
#include <QtGui/qaccessible.h>
|
||||||
#include <QtCore/qmetaobject.h>
|
#include <QtCore/qmetaobject.h>
|
||||||
|
#include <QLocale.h>
|
||||||
|
|
||||||
#ifndef QT_NO_SHORTCUT
|
#ifndef QT_NO_SHORTCUT
|
||||||
#include "private/qapplication_p.h"
|
#include "private/qapplication_p.h"
|
||||||
@ -1340,13 +1341,17 @@ void QWidgetTextControlPrivate::keyPressEvent(QKeyEvent *e)
|
|||||||
goto accept;
|
goto accept;
|
||||||
|
|
||||||
process:
|
process:
|
||||||
|
{
|
||||||
|
if (QGuiApplication::inputMethod()->locale().language() == QLocale::German)
|
||||||
{
|
{
|
||||||
// QTBUG-35734: ignore Ctrl/Ctrl+Shift; accept only AltGr (Alt+Ctrl) on German keyboards
|
// QTBUG-35734: ignore Ctrl/Ctrl+Shift; accept only AltGr (Alt+Ctrl) on German keyboards
|
||||||
|
//
|
||||||
if (e->modifiers() == Qt::ControlModifier
|
if (e->modifiers() == Qt::ControlModifier
|
||||||
|| e->modifiers() == (Qt::ShiftModifier | Qt::ControlModifier)) {
|
|| e->modifiers() == (Qt::ShiftModifier | Qt::ControlModifier)) {
|
||||||
e->ignore();
|
e->ignore();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
QString text = e->text();
|
QString text = e->text();
|
||||||
if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t') || text.at(0).unicode() == 0x200C || text.at(0).unicode() == 0x200D)) {
|
if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t') || text.at(0).unicode() == 0x200C || text.at(0).unicode() == 0x200D)) {
|
||||||
if (overwriteMode
|
if (overwriteMode
|
||||||
|
Loading…
Reference in New Issue
Block a user