Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/telegramdesktop/tdesktop
Browse files Browse the repository at this point in the history
…into dev
  • Loading branch information
john-preston committed Oct 17, 2015
2 parents 5c3d030 + 1f16e50 commit a945095
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
#include <QtWidgets/qlineedit.h>
#include <QtGui/qaccessible.h>
#include <QtCore/qmetaobject.h>
#include <QLocale.h>

#ifndef QT_NO_SHORTCUT
#include "private/qapplication_p.h"
Expand Down Expand Up @@ -1341,11 +1342,15 @@ void QWidgetTextControlPrivate::keyPressEvent(QKeyEvent *e)

process:
{
// QTBUG-35734: ignore Ctrl/Ctrl+Shift; accept only AltGr (Alt+Ctrl) on German keyboards
if (e->modifiers() == Qt::ControlModifier
|| e->modifiers() == (Qt::ShiftModifier | Qt::ControlModifier)) {
e->ignore();
return;
if (QGuiApplication::inputMethod()->locale().language() == QLocale::German)
{
// QTBUG-35734: ignore Ctrl/Ctrl+Shift; accept only AltGr (Alt+Ctrl) on German keyboards
//
if (e->modifiers() == Qt::ControlModifier
|| e->modifiers() == (Qt::ShiftModifier | Qt::ControlModifier)) {
e->ignore();
return;
}
}
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)) {
Expand Down

0 comments on commit a945095

Please sign in to comment.