summaryrefslogtreecommitdiffstats
path: root/package/pinentry
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2014-12-14 23:35:59 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-12-21 22:41:03 +0100
commit0ec5167d0cccd8628537ac98222cfc528b08022b (patch)
treedbe42fc416489c6cc64e84a6a4cc4d84e6642f50 /package/pinentry
parent4d58a27da458c438d375250c74fbc4444c9b5d3d (diff)
downloadbuildroot-0ec5167d0cccd8628537ac98222cfc528b08022b.tar.gz
buildroot-0ec5167d0cccd8628537ac98222cfc528b08022b.zip
package/pinentry: allow building without Qt accessibility
Backport a patch applied upstream to allow building without Qt accessibility. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/pinentry')
-rw-r--r--package/pinentry/0002-qt-no-accessibility.patch102
1 files changed, 102 insertions, 0 deletions
diff --git a/package/pinentry/0002-qt-no-accessibility.patch b/package/pinentry/0002-qt-no-accessibility.patch
new file mode 100644
index 0000000000..2f9e50805e
--- /dev/null
+++ b/package/pinentry/0002-qt-no-accessibility.patch
@@ -0,0 +1,102 @@
+commit 484465338ea6f5f12eb1341ca0ef84aa79224ed4
+Author: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+Date: Mon Dec 8 16:42:42 2014 +0000
+
+ pinentry-qt4: make the accessibility part optional
+
+ Check if the Qt libraries have support for QT Accessibility before using
+ it. Otherwise it will raise error like these one:
+
+ main.cpp: In function 'int qt_cmd_handler(pinentry_t)':
+ main.cpp:220:51: error: 'class QAbstractButton' has no member named
+ 'setAccessibleDescription'
+
+ Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+
+Backported from upstream.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff --git a/qt4/main.cpp b/qt4/main.cpp
+index 106999e..b2a69f2 100644
+--- a/qt4/main.cpp
++++ b/qt4/main.cpp
+@@ -217,8 +217,9 @@ qt_cmd_handler (pinentry_t pe)
+ for ( size_t i = 0 ; i < sizeof buttonLabels / sizeof *buttonLabels ; ++i )
+ if ( (buttons & buttonLabels[i].button) && !buttonLabels[i].label.isEmpty() ) {
+ box.button( buttonLabels[i].button )->setText( buttonLabels[i].label );
++#ifndef QT_NO_ACCESSIBILITY
+ box.button( buttonLabels[i].button )->setAccessibleDescription ( buttonLabels[i].label );
+-
++#endif
+ }
+
+ box.setIconPixmap( icon() );
+diff --git a/qt4/pinentryconfirm.cpp b/qt4/pinentryconfirm.cpp
+index dfbd19f..6b3d545 100644
+--- a/qt4/pinentryconfirm.cpp
++++ b/qt4/pinentryconfirm.cpp
+@@ -30,8 +30,10 @@ PinentryConfirm::PinentryConfirm(Icon icon, int timeout, const QString &title,
+ connect(_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ _timer->start(timeout*1000);
+ }
++#ifndef QT_NO_ACCESSIBILITY
+ setAccessibleDescription (desc);
+ setAccessibleName (title);
++#endif
+ raiseWindow (this);
+ }
+
+diff --git a/qt4/pinentrydialog.cpp b/qt4/pinentrydialog.cpp
+index 3a6dacc..456f022 100644
+--- a/qt4/pinentrydialog.cpp
++++ b/qt4/pinentrydialog.cpp
+@@ -217,7 +217,9 @@ void PinEntryDialog::setDescription( const QString& txt )
+ {
+ _desc->setVisible( !txt.isEmpty() );
+ _desc->setText( txt );
++#ifndef QT_NO_ACCESSIBILITY
+ _desc->setAccessibleDescription ( txt );
++#endif
+ _icon->setPixmap( icon() );
+ setError( QString::null );
+ }
+@@ -231,7 +233,9 @@ void PinEntryDialog::setError( const QString& txt )
+ {
+ if( !txt.isNull() )_icon->setPixmap( icon( QStyle::SP_MessageBoxCritical ) );
+ _error->setText( txt );
++#ifndef QT_NO_ACCESSIBILITY
+ _error->setAccessibleDescription ( txt );
++#endif
+ _error->setVisible( !txt.isEmpty() );
+ }
+
+@@ -264,14 +268,18 @@ QString PinEntryDialog::prompt() const
+ void PinEntryDialog::setOkText( const QString& txt )
+ {
+ _ok->setText( txt );
++#ifndef QT_NO_ACCESSIBILITY
+ _ok->setAccessibleDescription ( txt );
++#endif
+ _ok->setVisible( !txt.isEmpty() );
+ }
+
+ void PinEntryDialog::setCancelText( const QString& txt )
+ {
+ _cancel->setText( txt );
++#ifndef QT_NO_ACCESSIBILITY
+ _cancel->setAccessibleDescription ( txt );
++#endif
+ _cancel->setVisible( !txt.isEmpty() );
+ }
+
+@@ -279,7 +287,9 @@ void PinEntryDialog::setQualityBar( const QString& txt )
+ {
+ if (_have_quality_bar) {
+ _quality_bar_label->setText( txt );
++#ifndef QT_NO_ACCESSIBILITY
+ _quality_bar_label->setAccessibleDescription ( txt );
++#endif
+ }
+ }
+
OpenPOWER on IntegriCloud