From patchwork Sun Dec 14 22:35:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 420915 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 445941400DE for ; Mon, 15 Dec 2014 09:36:13 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8F2C731BED; Sun, 14 Dec 2014 22:36:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0RbuJG9aEHQ2; Sun, 14 Dec 2014 22:36:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id B560932F05; Sun, 14 Dec 2014 22:36:09 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 008641C259F for ; Sun, 14 Dec 2014 22:36:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id F096032F05 for ; Sun, 14 Dec 2014 22:36:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OMf1WxJFa8A3 for ; Sun, 14 Dec 2014 22:36:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by silver.osuosl.org (Postfix) with ESMTPS id 689DE320AF for ; Sun, 14 Dec 2014 22:36:04 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id n12so13061170wgh.6 for ; Sun, 14 Dec 2014 14:36:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=E7/b1h8sECBGKy6MDllnis8Pwqcq6+Fubo0nYejIlyI=; b=GjTqvt6DDzzt858sTJQG0egxDKQXM76Iogbiy6EL4gqDpK/aQKT4w/biED4IgwqgQu FvCiQ8ieQZGpe02yOf+Y1na1Aie9ni/XM83DV39MqCLQf5oeMwqW8QwUi2qor9wcnO93 QV1BKQTGCgNsB+Ta5hyAaXfcwN9rDHtIWeD3C0k7TZhxMwsFhQ7/1qaobJJRr/eD+JGY ojX6doyeFApWqvjo9sHlquzuE0KEVIzATl65BC0GF6iGM14GwDqTNrjhLECTjfPO6NAu 9BRZz7XrUXslZw3IrhjrB8A3wzlKOm6r3DNpfdxUreAWqMpaUgkdg2ukP41Yofc4uKYM lHXQ== X-Received: by 10.194.57.43 with SMTP id f11mr45263016wjq.6.1418596563115; Sun, 14 Dec 2014 14:36:03 -0800 (PST) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id h14sm10990431wic.8.2014.12.14.14.36.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Dec 2014 14:36:02 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sun, 14 Dec 2014 23:35:59 +0100 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 2/2] package/pinentry: allow building without Qt accessibility X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Backport a patch applied upstream to allow building without Qt accessibility. Signed-off-by: "Yann E. MORIN" Cc: Vicente Olivert Riera --- package/pinentry/0002-qt-no-accessibility.patch | 102 ++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 package/pinentry/0002-qt-no-accessibility.patch diff --git a/package/pinentry/0002-qt-no-accessibility.patch b/package/pinentry/0002-qt-no-accessibility.patch new file mode 100644 index 0000000..2f9e508 --- /dev/null +++ b/package/pinentry/0002-qt-no-accessibility.patch @@ -0,0 +1,102 @@ +commit 484465338ea6f5f12eb1341ca0ef84aa79224ed4 +Author: Vicente Olivert Riera +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 + +Backported from upstream. + +Signed-off-by: "Yann E. MORIN" + +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 + } + } +