Comment 17 for bug 326132

Revision history for this message
Dmitry (diepress) wrote :

Hello everyone.

I have made some changes to pinentry-qt4 to enable copy/paste. As i found out, at some point they moved from QString to secqstring (which is std::basic_string) and did commented defines, that enable ContextMenu and CopyPaste.

So "fix" have 3 part anyone with minor programming skill can impelement:
* define q_to_sec and sec_to_q conversion functions in secstring.h http://paste.ubuntu.com/663492/
* implement those functions in secstring.cpp: http://paste.ubuntu.com/663494/
* comment QT_NO_CLIPBOARD / QT_NO_CONEXTMENU / QT_NO_DRAGANDDROP defines at the beginning of the qsecurelineedit.h: http://paste.ubuntu.com/663496/
* (not recommended way) open qsecurelineedit.cpp and replace it with http://paste.ubuntu.com/663498/
* (recommended way) compare your qsecurelineedit.cpp with http://paste.ubuntu.com/663498/ and make appropriate changes (use sec_to_q and q_to_sec where needed). I also commentet QUnicoreControlComething becouse can't find where it's include.
* now configure pinentry (./configure --enable-pinentry-qt4) and make
* copy compiled binary to appropriate place.

Now your pinentry should be able to do basic copy/cut/paste operations.

Sorry for such "textual" fix, dunno how to make it more Ubuntish :)