[git] Pinentry - branch, master, updated. pinentry-1.0.0-15-gcd7b35e

by Andre Heinecke cvs at cvs.gnupg.org
Mon Feb 13 17:51:59 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The standard pinentry collection".

The branch, master has been updated
       via  cd7b35e8ff106993b9ce98ea99a5210d637f3452 (commit)
      from  e467a000f87e87582f5838964b6f1e0a960d4445 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cd7b35e8ff106993b9ce98ea99a5210d637f3452
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Feb 13 17:34:24 2017 +0100

    qt: Fix pinentry-curses fallback for qt5
    
    * qt/main.cpp (main): Initialize QApplication later.
    
    --
    This fixes the curses fallback because with Qt5 the creation of
    the auto_ptr for the application already initialized the XCB subsystem
    and caused the abort of the application.
    
    Also removes the usage of the deprecated auto_ptr.

diff --git a/qt/main.cpp b/qt/main.cpp
index e2af686..40d0a5b 100644
--- a/qt/main.cpp
+++ b/qt/main.cpp
@@ -42,7 +42,6 @@
 #include <stdlib.h>
 #include <errno.h>
 
-#include <memory>
 #include <stdexcept>
 #include <gpg-error.h>
 
@@ -313,7 +312,7 @@ main(int argc, char *argv[])
 {
     pinentry_init("pinentry-qt");
 
-    std::auto_ptr<QApplication> app;
+    QApplication *app = Q_NULLPTR;
 
 #ifdef FALLBACK_CURSES
     if (!pinentry_have_display(argc, argv)) {
@@ -353,14 +352,14 @@ main(int argc, char *argv[])
                 p += strlen(argv[i]) + 1;
             }
 
-        /* We use a modal dialog window, so we don't need the application
-           window anymore.  */
         i = argc;
-        app.reset(new QApplication(i, new_argv));
+        app = new QApplication(i, new_argv);
         app->setWindowIcon(QIcon(QLatin1String(":/document-encrypt.png")));
     }
 
     pinentry_parse_opts(argc, argv);
 
-    return pinentry_loop() ? EXIT_FAILURE : EXIT_SUCCESS ;
+    int rc = pinentry_loop();
+    delete app;
+    return rc ? EXIT_FAILURE : EXIT_SUCCESS ;
 }

-----------------------------------------------------------------------

Summary of changes:
 qt/main.cpp | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
The standard pinentry collection
http://git.gnupg.org




More information about the Gnupg-commits mailing list