Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
31ee498e72 | ||
|
84d59a0e6c | ||
|
9d9f4980c8 |
94
qt5-qtdeclarative-bz#1120451-persian-keyboard.patch
Normal file
94
qt5-qtdeclarative-bz#1120451-persian-keyboard.patch
Normal file
@ -0,0 +1,94 @@
|
||||
diff -up qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextcontrol.cpp.bz#1120451 qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextcontrol.cpp
|
||||
--- qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextcontrol.cpp.bz#1120451 2016-11-11 07:18:01.000000000 +0100
|
||||
+++ qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextcontrol.cpp 2017-07-19 17:19:18.253590767 +0200
|
||||
@@ -608,7 +608,7 @@ void QQuickTextControl::clear()
|
||||
}
|
||||
|
||||
QQuickTextControl::QQuickTextControl(QTextDocument *doc, QObject *parent)
|
||||
- : QObject(*new QQuickTextControlPrivate, parent)
|
||||
+ : QInputControl(TextEdit, *new QQuickTextControlPrivate, parent)
|
||||
{
|
||||
Q_D(QQuickTextControl);
|
||||
Q_ASSERT(doc);
|
||||
@@ -980,9 +980,8 @@ void QQuickTextControlPrivate::keyPressE
|
||||
|
||||
process:
|
||||
{
|
||||
- QString text = e->text();
|
||||
- if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t'))) {
|
||||
- cursor.insertText(text);
|
||||
+ if (q->isAcceptableInput(e)) {
|
||||
+ cursor.insertText(e->text());
|
||||
selectionChanged();
|
||||
} else {
|
||||
e->ignore();
|
||||
diff -up qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextcontrol_p.h.bz#1120451 qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextcontrol_p.h
|
||||
--- qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextcontrol_p.h.bz#1120451 2016-11-11 07:18:01.000000000 +0100
|
||||
+++ qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextcontrol_p.h 2017-07-19 17:19:18.253590767 +0200
|
||||
@@ -59,6 +59,7 @@
|
||||
#include <QtGui/qabstracttextdocumentlayout.h>
|
||||
#include <QtGui/qtextdocumentfragment.h>
|
||||
#include <QtGui/qclipboard.h>
|
||||
+#include <QtGui/private/qinputcontrol_p.h>
|
||||
#include <QtCore/qmimedata.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@@ -71,7 +72,7 @@ class QAbstractScrollArea;
|
||||
class QEvent;
|
||||
class QTimerEvent;
|
||||
|
||||
-class Q_AUTOTEST_EXPORT QQuickTextControl : public QObject
|
||||
+class Q_AUTOTEST_EXPORT QQuickTextControl : public QInputControl
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(QQuickTextControl)
|
||||
diff -up qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextinput.cpp.bz#1120451 qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextinput.cpp
|
||||
--- qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextinput.cpp.bz#1120451 2016-11-11 07:18:01.000000000 +0100
|
||||
+++ qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextinput.cpp 2017-07-19 17:20:55.479933008 +0200
|
||||
@@ -63,6 +63,7 @@
|
||||
#endif
|
||||
|
||||
#include <QtGui/private/qtextengine_p.h>
|
||||
+#include <QtGui/private/qinputcontrol_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -2619,6 +2620,7 @@ void QQuickTextInputPrivate::init()
|
||||
option.setUseDesignMetrics(renderType != QQuickTextInput::NativeRendering);
|
||||
m_textLayout.setTextOption(option);
|
||||
}
|
||||
+ m_inputControl = new QInputControl(QInputControl::LineEdit, q);
|
||||
}
|
||||
|
||||
void QQuickTextInputPrivate::resetInputMethod()
|
||||
@@ -4452,9 +4454,8 @@ void QQuickTextInputPrivate::processKeyE
|
||||
}
|
||||
|
||||
if (unknown && !m_readOnly) {
|
||||
- QString t = event->text();
|
||||
- if (!t.isEmpty() && t.at(0).isPrint()) {
|
||||
- insert(t);
|
||||
+ if (m_inputControl->isAcceptableInput(event)) {
|
||||
+ insert(event->text());
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
diff -up qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextinput_p_p.h.bz#1120451 qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextinput_p_p.h
|
||||
--- qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextinput_p_p.h.bz#1120451 2016-11-11 07:18:01.000000000 +0100
|
||||
+++ qtdeclarative-opensource-src-5.7.1/src/quick/items/qquicktextinput_p_p.h 2017-07-19 17:19:18.254590729 +0200
|
||||
@@ -70,6 +70,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QQuickTextNode;
|
||||
+class QInputControl;
|
||||
|
||||
class Q_QUICK_PRIVATE_EXPORT QQuickTextInputPrivate : public QQuickImplicitSizeItemPrivate
|
||||
{
|
||||
@@ -227,6 +228,7 @@ public:
|
||||
QQuickItem *cursorItem;
|
||||
QQuickTextNode *textNode;
|
||||
MaskInputData *m_maskData;
|
||||
+ QInputControl *m_inputControl;
|
||||
|
||||
QList<int> m_transactions;
|
||||
QVector<Command> m_history;
|
@ -22,7 +22,7 @@
|
||||
Summary: Qt5 - QtDeclarative component
|
||||
Name: qt5-%{qt_module}
|
||||
Version: 5.7.1
|
||||
Release: 7%{?dist}
|
||||
Release: 9%{?dist}
|
||||
|
||||
# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
|
||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||
@ -45,6 +45,11 @@ Patch2: qtdeclarative-QQuickShaderEffectSource_deadlock.patch
|
||||
# https://bugs.kde.org/show_bug.cgi?id=346118#c108
|
||||
Patch201: qtdeclarative-kdebug346118.patch
|
||||
|
||||
# backport fix to accept PUA characters, ZWNJ and ZWJ as input in TextInput/Edit
|
||||
# qtdeclarative needs qt5-qtbase >= %{version}-20 due to the change
|
||||
# in the privat header files to support PUA characters, ZWNJ and ZWJ as input in TextInput/Edit
|
||||
Patch202: qt5-qtdeclarative-bz#1120451-persian-keyboard.patch
|
||||
|
||||
# filter qml provides
|
||||
%global __provides_exclude_from ^%{_qt5_archdatadir}/qml/.*\\.so$
|
||||
|
||||
@ -110,16 +115,9 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
%endif
|
||||
%patch2 -p1 -b .QQuickShaderEffectSource_deadlock
|
||||
%patch201 -p0 -b .kdebug346118
|
||||
|
||||
%patch202 -p1 -b .bz#1120451
|
||||
|
||||
%build
|
||||
mkdir %{_target_platform}
|
||||
pushd %{_target_platform}
|
||||
%{qmake_qt5} ..
|
||||
popd
|
||||
|
||||
make %{?_smp_mflags} -C %{_target_platform}
|
||||
|
||||
%if 0%{?nosse2_hack}
|
||||
# build libQt5Qml with no_sse2
|
||||
mkdir -p %{_target_platform}-no_sse2
|
||||
@ -130,13 +128,17 @@ make %{?_smp_mflags} -C src/qml
|
||||
popd
|
||||
%endif
|
||||
|
||||
%{qmake_qt5}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%if 0%{?docs}
|
||||
make %{?_smp_mflags} docs -C %{_target_platform}
|
||||
make %{?_smp_mflags} docs
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
|
||||
make install INSTALL_ROOT=%{buildroot}
|
||||
|
||||
%if 0%{?nosse2_hack}
|
||||
mkdir -p %{buildroot}%{_qt5_libdir}/sse2
|
||||
@ -145,7 +147,7 @@ make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}-no_sse2/src/qml
|
||||
%endif
|
||||
|
||||
%if 0%{?docs}
|
||||
make install_docs INSTALL_ROOT=%{buildroot} -C %{_target_platform}
|
||||
make install_docs INSTALL_ROOT=%{buildroot}
|
||||
%endif
|
||||
|
||||
# hardlink files to %{_bindir}, add -qt5 postfix to not conflict
|
||||
@ -187,11 +189,11 @@ popd
|
||||
export CTEST_OUTPUT_ON_FAILURE=1
|
||||
export PATH=%{buildroot}%{_qt5_bindir}:$PATH
|
||||
export LD_LIBRARY_PATH=%{buildroot}%{_qt5_libdir}
|
||||
make sub-tests-all %{?_smp_mflags} -C %{_target_platform}
|
||||
make sub-tests-all %{?_smp_mflags}
|
||||
xvfb-run -a \
|
||||
dbus-launch --exit-with-session \
|
||||
time \
|
||||
make check -k -C %{_target_platform}/tests ||:
|
||||
make check -k -C tests ||:
|
||||
%endif
|
||||
|
||||
|
||||
@ -249,6 +251,13 @@ make check -k -C %{_target_platform}/tests ||:
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jul 19 2017 Than Ngo <than@redhat.com> - 5.7.1-9
|
||||
- backported to fix bz#1120451, accept PUA characters, ZWNJ and ZWJ
|
||||
as input in TextInput/Edit
|
||||
|
||||
* Fri Jun 16 2017 Rex Dieter <rdieter@fedoraproject.org> - 5.7.1-8
|
||||
- (branch backport): drop shadow/out-of-tree builds (#1456211,QTBUG-37417)
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.7.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user