[git] Pinentry - branch, master, updated. pinentry-0.8.3-3-g0b3a856
by Andre Heinecke
cvs at cvs.gnupg.org
Wed May 29 20:02:03 CEST 2013
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 0b3a8568e14b994a8d1f4c1cb42aed4959dfc811 (commit)
via fb38be960e837bb5854aa65bf8cbf9cbf535631e (commit)
from cf1404d4e24d85c809434df9330c9e1817e7d4a6 (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 0b3a8568e14b994a8d1f4c1cb42aed4959dfc811
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Wed May 29 17:38:18 2013 +0000
Add pinentry-qt4-clipboard option
Enabling this option will make it possible to paste a
passphrase into pinentry-qt4. This defeats the secmem
mechanism but drastically increases usability for some
users.
* configure.ac: New option pinentry-qt4-clipboard.
* qt4/qsecurelineedit.cpp, qt4/qsecurelineedit.h: Activate
clipboard and context menu if PINENTRY_QT4_CLIPBOARD is defined.
diff --git a/configure.ac b/configure.ac
index 0eb5e74..b4133b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -447,6 +447,18 @@ if test "$pinentry_qt4" = "yes"; then
AC_DEFINE(PINENTRY_QT4, 1, [The Qt4 version of Pinentry is to be build])
fi
+dnl
+dnl Option to add insecure clipboard support to pinentry-qt4
+dnl
+AC_ARG_ENABLE(pinentry-qt4-clipboard,
+ AC_HELP_STRING([--enable-pinentry-qt4-clipboard], [Enable clipboard support in
+ pinentry-qt4]), pinentry_qt4_clipboard=$enableval)
+
+if test "$pinentry_qt4_clipboard" = "yes" -a "$pinentry_qt4" = "yes"; then
+ AC_DEFINE(PINENTRY_QT4_CLIPBOARD, 1, [Pinentry-qt4 should have clipboard support])
+ pinentry_qt4_clip_msg="(with clipboard support)"
+fi
+
dnl if test "$pinentry_qt4" = "yes"; then
dnl Additional checks for Qt4 pinentry.
dnl End of additional checks for Qt4 pinentry.
@@ -521,7 +533,7 @@ AC_MSG_NOTICE([
GTK+ Pinentry ....: $pinentry_gtk
GTK+-2 Pinentry ..: $pinentry_gtk_2
Qt Pinentry ......: $pinentry_qt
- Qt4 Pinentry .....: $pinentry_qt4
+ Qt4 Pinentry .....: $pinentry_qt4 $pinentry_qt4_clip_msg
W32 Pinentry .....: $pinentry_w32
Fallback to Curses: $fallback_curses
diff --git a/qt4/qsecurelineedit.cpp b/qt4/qsecurelineedit.cpp
index da6bf0c..4384574 100644
--- a/qt4/qsecurelineedit.cpp
+++ b/qt4/qsecurelineedit.cpp
@@ -1325,6 +1325,16 @@ void QSecureLineEdit::deselect()
d->finishChange();
}
+#ifndef QT_NO_CLIPBOARD
+/* Should only be used if pasting the passphrase is explicitly
+ * wanted. Defeats the purpose of the secmem implmentation */
+void QSecureLineEdit::insert(const QString &newText)
+{
+ if (!newText.isEmpty() && newText.at(0).isPrint()) {
+ insert( secqstring( newText.begin(), newText.end() ) );
+ }
+}
+#endif
/*!
Deletes any selected text, inserts \a newText, and validates the
@@ -1466,6 +1476,7 @@ void QSecureLineEdit::copy() const
void QSecureLineEdit::paste()
{
+ Q_D(QSecureLineEdit);
if(echoMode() == PasswordEchoOnEdit)
{
Q_D(QSecureLineEdit);
@@ -1479,12 +1490,14 @@ void QSecureLineEdit::paste()
void QSecureLineEditPrivate::copy(bool clipboard) const
{
Q_Q(const QSecureLineEdit);
- QString t = q->selectedText();
- if (!t.isEmpty() && echoMode == QSecureLineEdit::Normal) {
- q->disconnect(QApplication::clipboard(), SIGNAL(selectionChanged()), q, 0);
- QApplication::clipboard()->setText(t, clipboard ? QClipboard::Clipboard : QClipboard::Selection);
- q->connect(QApplication::clipboard(), SIGNAL(selectionChanged()),
- q, SLOT(_q_clipboardChanged()));
+ if (echoMode == QSecureLineEdit::Normal) {
+ QString t = QString(q->selectedText().c_str());
+ if (!t.isEmpty()) {
+ q->disconnect(QApplication::clipboard(), SIGNAL(selectionChanged()), q, 0);
+ QApplication::clipboard()->setText(t, clipboard ? QClipboard::Clipboard : QClipboard::Selection);
+ q->connect(QApplication::clipboard(), SIGNAL(selectionChanged()),
+ q, SLOT(_q_clipboardChanged()));
+ }
}
}
@@ -2603,16 +2616,17 @@ QMenu *QSecureLineEdit::createStandardContextMenu()
d->actions[QSecureLineEditPrivate::UndoAct]->setEnabled(d->isUndoAvailable());
d->actions[QSecureLineEditPrivate::RedoAct]->setEnabled(d->isRedoAvailable());
#ifndef QT_NO_CLIPBOARD
- d->actions[QSecureLineEditPrivate::CutAct]->setEnabled(!d->readOnly && d->hasSelectedText());
- d->actions[QSecureLineEditPrivate::CopyAct]->setEnabled(d->hasSelectedText());
+ d->actions[QSecureLineEditPrivate::CutAct]->setEnabled(!d->readOnly && d->hasSelectedText()
+ && d->echoMode == QSecureLineEdit::Normal);
+ d->actions[QSecureLineEditPrivate::CopyAct]->setEnabled(d->hasSelectedText() && d->echoMode == QSecureLineEdit::Normal);
d->actions[QSecureLineEditPrivate::PasteAct]->setEnabled(!d->readOnly && !QApplication::clipboard()->text().isEmpty());
#else
d->actions[QSecureLineEditPrivate::CutAct]->setEnabled(false);
d->actions[QSecureLineEditPrivate::CopyAct]->setEnabled(false);
d->actions[QSecureLineEditPrivate::PasteAct]->setEnabled(false);
#endif
- d->actions[QSecureLineEditPrivate::ClearAct]->setEnabled(!d->readOnly && !d->text.isEmpty() && d->hasSelectedText());
- d->actions[QSecureLineEditPrivate::SelectAllAct]->setEnabled(!d->text.isEmpty() && !d->allSelected());
+ d->actions[QSecureLineEditPrivate::ClearAct]->setEnabled(!d->readOnly && !d->text.empty() && d->hasSelectedText());
+ d->actions[QSecureLineEditPrivate::SelectAllAct]->setEnabled(!d->text.empty() && !d->allSelected());
QMenu *popup = new QMenu(this);
popup->setObjectName(QLatin1String("qt_edit_menu"));
@@ -2640,8 +2654,8 @@ QMenu *QSecureLineEdit::createStandardContextMenu()
if (!d->readOnly) {
#endif
popup->addSeparator();
- QUnicodeControlCharacterMenu *ctrlCharacterMenu = new QUnicodeControlCharacterMenu(this, popup);
- popup->addMenu(ctrlCharacterMenu);
+ //QUnicodeControlCharacterMenu *ctrlCharacterMenu = new QUnicodeControlCharacterMenu(this, popup);
+ //popup->addMenu(ctrlCharacterMenu);
}
return popup;
}
diff --git a/qt4/qsecurelineedit.h b/qt4/qsecurelineedit.h
index 963ccc3..4afdbb2 100644
--- a/qt4/qsecurelineedit.h
+++ b/qt4/qsecurelineedit.h
@@ -50,8 +50,20 @@
#include <QtGui/qframe.h>
#include <QtCore/qstring.h>
+#include <config.h>
+
#include "secstring.h"
+#ifndef PINENTRY_QT4_CLIPBOARD
+// Sacrifice security for usability by allowing clipboard actions
+# ifndef QT_NO_CLIPBOARD
+# define QT_NO_CLIPBOARD
+# endif
+# ifndef QT_NO_CONTEXTMENU
+# define QT_NO_CONTEXTMENU
+# endif
+#endif
+
// for moc, since qt4_automoc doesn't appear to hand over defines when
// running moc. They should't be visible when #including other Qt
// headers, since they #ifdef out virtual functions (->BIC).
@@ -61,12 +73,6 @@
#ifndef QT_NO_COMPLETER
# define QT_NO_COMPLETER
#endif
-#ifndef QT_NO_CLIPBOARD
-# define QT_NO_CLIPBOARD
-#endif
-#ifndef QT_NO_CONTEXTMENU
-# define QT_NO_CONTEXTMENU
-#endif
#ifndef QT_NO_DRAGANDDROP
# define QT_NO_DRAGANDDROP
#endif
@@ -203,6 +209,9 @@ public Q_SLOTS:
public:
void deselect();
void insert(const secqstring &);
+#ifndef QT_NO_CLIPBOARD
+ void insert(const QString &);
+#endif
#ifndef QT_NO_CONTEXTMENU
QMenu *createStandardContextMenu();
#endif
commit fb38be960e837bb5854aa65bf8cbf9cbf535631e
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Wed May 29 17:32:31 2013 +0000
Remove qt4 moc files and add moc to buildsystem
This is neccessary to conditionally enable signals/slots
at build time.
* qt4/Makefile.am: Moc files automatically.
* qt4/pinentryconfirm.moc, qt4/pinentrydialog.moc,
qsecurelineedit.moc: Removed.
--
While this removes the hard version requirement to Qt 4.8.2
caused by the old generated files it breaks the possibillity
to compile pinentry-qt and pinentry-qt4 in one go as the MOC
variable is only set once either the qt4 variant or the qt3
variant will be broken. At least there is a decent
error message in that case.
diff --git a/qt4/Makefile.am b/qt4/Makefile.am
index 054427a..6606d71 100644
--- a/qt4/Makefile.am
+++ b/qt4/Makefile.am
@@ -41,9 +41,17 @@ pinentry_qt4_LDADD = $(QT4_CORE_LIBS) $(QT4_GUI_LIBS) $(libcurses) \
../pinentry/libpinentry.a $(top_builddir)/assuan/libassuan.a \
$(top_builddir)/secmem/libsecmem.a $(LIBCAP)
+$(pinentry_qt4_OBJECTS) : pinentryconfirm.moc qsecurelineedit.moc pinentrydialog.moc
+
pinentry_qt4_SOURCES = pinentrydialog.h pinentrydialog.cpp \
main.cpp secstring.h secstring.cpp qsecurelineedit.h \
- qsecurelineedit.cpp pinentrydialog.moc qsecurelineedit.moc \
- qrc_pinentry.cpp \
- qsecurelineedit_p.h \
- pinentryconfirm.cpp pinentryconfirm.h pinentryconfirm.moc
+ qsecurelineedit.cpp qrc_pinentry.cpp \
+ qsecurelineedit_p.h pinentryconfirm.cpp pinentryconfirm.h
+
+clean-moc-extra:
+ rm -vf *.moc
+
+clean-am: clean-moc-extra
+
+%.moc: %.h
+ $(MOC) $< -o $@
diff --git a/qt4/pinentryconfirm.moc b/qt4/pinentryconfirm.moc
deleted file mode 100644
index ae5841e..0000000
--- a/qt4/pinentryconfirm.moc
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-** Meta object code from reading C++ file 'pinentryconfirm.h'
-**
-** Created: Wed Aug 8 16:09:45 2012
-** by: The Qt Meta Object Compiler version 63 (Qt 4.8.2)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#include "pinentryconfirm.h"
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'pinentryconfirm.h' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 63
-#error "This file was generated using the moc from 4.8.2. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-QT_BEGIN_MOC_NAMESPACE
-static const uint qt_meta_data_PinentryConfirm[] = {
-
- // content:
- 6, // revision
- 0, // classname
- 0, 0, // classinfo
- 1, 14, // methods
- 0, 0, // properties
- 0, 0, // enums/sets
- 0, 0, // constructors
- 0, // flags
- 0, // signalCount
-
- // slots: signature, parameters, type, tag, flags
- 17, 16, 16, 16, 0x08,
-
- 0 // eod
-};
-
-static const char qt_meta_stringdata_PinentryConfirm[] = {
- "PinentryConfirm\0\0slotTimeout()\0"
-};
-
-void PinentryConfirm::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
-{
- if (_c == QMetaObject::InvokeMetaMethod) {
- Q_ASSERT(staticMetaObject.cast(_o));
- PinentryConfirm *_t = static_cast<PinentryConfirm *>(_o);
- switch (_id) {
- case 0: _t->slotTimeout(); break;
- default: ;
- }
- }
- Q_UNUSED(_a);
-}
-
-const QMetaObjectExtraData PinentryConfirm::staticMetaObjectExtraData = {
- 0, qt_static_metacall
-};
-
-const QMetaObject PinentryConfirm::staticMetaObject = {
- { &QMessageBox::staticMetaObject, qt_meta_stringdata_PinentryConfirm,
- qt_meta_data_PinentryConfirm, &staticMetaObjectExtraData }
-};
-
-#ifdef Q_NO_DATA_RELOCATION
-const QMetaObject &PinentryConfirm::getStaticMetaObject() { return staticMetaObject; }
-#endif //Q_NO_DATA_RELOCATION
-
-const QMetaObject *PinentryConfirm::metaObject() const
-{
- return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
-}
-
-void *PinentryConfirm::qt_metacast(const char *_clname)
-{
- if (!_clname) return 0;
- if (!strcmp(_clname, qt_meta_stringdata_PinentryConfirm))
- return static_cast<void*>(const_cast< PinentryConfirm*>(this));
- return QMessageBox::qt_metacast(_clname);
-}
-
-int PinentryConfirm::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
-{
- _id = QMessageBox::qt_metacall(_c, _id, _a);
- if (_id < 0)
- return _id;
- if (_c == QMetaObject::InvokeMetaMethod) {
- if (_id < 1)
- qt_static_metacall(this, _c, _id, _a);
- _id -= 1;
- }
- return _id;
-}
-QT_END_MOC_NAMESPACE
diff --git a/qt4/pinentrydialog.moc b/qt4/pinentrydialog.moc
deleted file mode 100644
index 07f39fb..0000000
--- a/qt4/pinentrydialog.moc
+++ /dev/null
@@ -1,136 +0,0 @@
-/****************************************************************************
-** Meta object code from reading C++ file 'pinentrydialog.h'
-**
-** Created: Wed Aug 8 16:09:23 2012
-** by: The Qt Meta Object Compiler version 63 (Qt 4.8.2)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#include "pinentrydialog.h"
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'pinentrydialog.h' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 63
-#error "This file was generated using the moc from 4.8.2. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-QT_BEGIN_MOC_NAMESPACE
-static const uint qt_meta_data_PinEntryDialog[] = {
-
- // content:
- 6, // revision
- 0, // classname
- 0, 0, // classinfo
- 2, 14, // methods
- 4, 24, // properties
- 0, 0, // enums/sets
- 0, 0, // constructors
- 0, // flags
- 0, // signalCount
-
- // slots: signature, parameters, type, tag, flags
- 16, 15, 15, 15, 0x0a,
- 42, 15, 15, 15, 0x0a,
-
- // properties: name, type, flags
- 64, 56, 0x0a095103,
- 76, 56, 0x0a095103,
- 93, 82, 0x0009510b,
- 97, 56, 0x0a095103,
-
- 0 // eod
-};
-
-static const char qt_meta_stringdata_PinEntryDialog[] = {
- "PinEntryDialog\0\0updateQuality(secqstring)\0"
- "slotTimeout()\0QString\0description\0"
- "error\0secqstring\0pin\0prompt\0"
-};
-
-void PinEntryDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
-{
- if (_c == QMetaObject::InvokeMetaMethod) {
- Q_ASSERT(staticMetaObject.cast(_o));
- PinEntryDialog *_t = static_cast<PinEntryDialog *>(_o);
- switch (_id) {
- case 0: _t->updateQuality((*reinterpret_cast< const secqstring(*)>(_a[1]))); break;
- case 1: _t->slotTimeout(); break;
- default: ;
- }
- }
-}
-
-const QMetaObjectExtraData PinEntryDialog::staticMetaObjectExtraData = {
- 0, qt_static_metacall
-};
-
-const QMetaObject PinEntryDialog::staticMetaObject = {
- { &QDialog::staticMetaObject, qt_meta_stringdata_PinEntryDialog,
- qt_meta_data_PinEntryDialog, &staticMetaObjectExtraData }
-};
-
-#ifdef Q_NO_DATA_RELOCATION
-const QMetaObject &PinEntryDialog::getStaticMetaObject() { return staticMetaObject; }
-#endif //Q_NO_DATA_RELOCATION
-
-const QMetaObject *PinEntryDialog::metaObject() const
-{
- return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
-}
-
-void *PinEntryDialog::qt_metacast(const char *_clname)
-{
- if (!_clname) return 0;
- if (!strcmp(_clname, qt_meta_stringdata_PinEntryDialog))
- return static_cast<void*>(const_cast< PinEntryDialog*>(this));
- return QDialog::qt_metacast(_clname);
-}
-
-int PinEntryDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
-{
- _id = QDialog::qt_metacall(_c, _id, _a);
- if (_id < 0)
- return _id;
- if (_c == QMetaObject::InvokeMetaMethod) {
- if (_id < 2)
- qt_static_metacall(this, _c, _id, _a);
- _id -= 2;
- }
-#ifndef QT_NO_PROPERTIES
- else if (_c == QMetaObject::ReadProperty) {
- void *_v = _a[0];
- switch (_id) {
- case 0: *reinterpret_cast< QString*>(_v) = description(); break;
- case 1: *reinterpret_cast< QString*>(_v) = error(); break;
- case 2: *reinterpret_cast< secqstring*>(_v) = pin(); break;
- case 3: *reinterpret_cast< QString*>(_v) = prompt(); break;
- }
- _id -= 4;
- } else if (_c == QMetaObject::WriteProperty) {
- void *_v = _a[0];
- switch (_id) {
- case 0: setDescription(*reinterpret_cast< QString*>(_v)); break;
- case 1: setError(*reinterpret_cast< QString*>(_v)); break;
- case 2: setPin(*reinterpret_cast< secqstring*>(_v)); break;
- case 3: setPrompt(*reinterpret_cast< QString*>(_v)); break;
- }
- _id -= 4;
- } else if (_c == QMetaObject::ResetProperty) {
- _id -= 4;
- } else if (_c == QMetaObject::QueryPropertyDesignable) {
- _id -= 4;
- } else if (_c == QMetaObject::QueryPropertyScriptable) {
- _id -= 4;
- } else if (_c == QMetaObject::QueryPropertyStored) {
- _id -= 4;
- } else if (_c == QMetaObject::QueryPropertyEditable) {
- _id -= 4;
- } else if (_c == QMetaObject::QueryPropertyUser) {
- _id -= 4;
- }
-#endif // QT_NO_PROPERTIES
- return _id;
-}
-QT_END_MOC_NAMESPACE
diff --git a/qt4/qsecurelineedit.moc b/qt4/qsecurelineedit.moc
deleted file mode 100644
index cb3eb47..0000000
--- a/qt4/qsecurelineedit.moc
+++ /dev/null
@@ -1,269 +0,0 @@
-/****************************************************************************
-** Meta object code from reading C++ file 'qsecurelineedit.h'
-**
-** Created: Wed Aug 8 16:09:59 2012
-** by: The Qt Meta Object Compiler version 63 (Qt 4.8.2)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#include "qsecurelineedit.h"
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'qsecurelineedit.h' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 63
-#error "This file was generated using the moc from 4.8.2. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-QT_BEGIN_MOC_NAMESPACE
-static const uint qt_meta_data_QSecureLineEdit[] = {
-
- // content:
- 6, // revision
- 0, // classname
- 0, 0, // classinfo
- 14, 14, // methods
- 16, 84, // properties
- 1, 148, // enums/sets
- 0, 0, // constructors
- 0, // flags
- 6, // signalCount
-
- // signals: signature, parameters, type, tag, flags
- 17, 16, 16, 16, 0x05,
- 41, 16, 16, 16, 0x05,
- 66, 64, 16, 16, 0x05,
- 97, 16, 16, 16, 0x05,
- 113, 16, 16, 16, 0x05,
- 131, 16, 16, 16, 0x05,
-
- // slots: signature, parameters, type, tag, flags
- 150, 16, 16, 16, 0x0a,
- 170, 16, 16, 16, 0x0a,
- 178, 16, 16, 16, 0x0a,
- 190, 16, 16, 16, 0x0a,
- 197, 16, 16, 16, 0x0a,
- 204, 16, 16, 16, 0x08,
- 226, 16, 16, 16, 0x08,
- 252, 16, 16, 16, 0x08,
-
- // properties: name, type, flags
- 280, 272, 0x0a095103,
- 301, 290, 0x0059510b,
- 310, 306, 0x02095103,
- 325, 320, 0x01095103,
- 340, 331, 0x00095009,
- 349, 290, 0x00095009,
- 361, 306, 0x02095103,
- 390, 376, 0x0009510b,
- 400, 320, 0x01094103,
- 409, 320, 0x01095001,
- 425, 290, 0x00095009,
- 438, 320, 0x01095103,
- 450, 320, 0x01095103,
- 459, 320, 0x01095001,
- 473, 320, 0x01095001,
- 487, 320, 0x01095001,
-
- // properties: notify_signal_id
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-
- // enums: name, flags, count, data
- 331, 0x0, 4, 152,
-
- // enum data: key, value
- 503, uint(QSecureLineEdit::Normal),
- 510, uint(QSecureLineEdit::NoEcho),
- 517, uint(QSecureLineEdit::Password),
- 526, uint(QSecureLineEdit::PasswordEchoOnEdit),
-
- 0 // eod
-};
-
-static const char qt_meta_stringdata_QSecureLineEdit[] = {
- "QSecureLineEdit\0\0textChanged(secqstring)\0"
- "textEdited(secqstring)\0,\0"
- "cursorPositionChanged(int,int)\0"
- "returnPressed()\0editingFinished()\0"
- "selectionChanged()\0setText(secqstring)\0"
- "clear()\0selectAll()\0undo()\0redo()\0"
- "_q_clipboardChanged()\0_q_handleWindowActivate()\0"
- "_q_deleteSelected()\0QString\0inputMask\0"
- "secqstring\0text\0int\0maxLength\0bool\0"
- "frame\0EchoMode\0echoMode\0displayText\0"
- "cursorPosition\0Qt::Alignment\0alignment\0"
- "modified\0hasSelectedText\0selectedText\0"
- "dragEnabled\0readOnly\0undoAvailable\0"
- "redoAvailable\0acceptableInput\0Normal\0"
- "NoEcho\0Password\0PasswordEchoOnEdit\0"
-};
-
-void QSecureLineEdit::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
-{
- if (_c == QMetaObject::InvokeMetaMethod) {
- Q_ASSERT(staticMetaObject.cast(_o));
- QSecureLineEdit *_t = static_cast<QSecureLineEdit *>(_o);
- switch (_id) {
- case 0: _t->textChanged((*reinterpret_cast< const secqstring(*)>(_a[1]))); break;
- case 1: _t->textEdited((*reinterpret_cast< const secqstring(*)>(_a[1]))); break;
- case 2: _t->cursorPositionChanged((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
- case 3: _t->returnPressed(); break;
- case 4: _t->editingFinished(); break;
- case 5: _t->selectionChanged(); break;
- case 6: _t->setText((*reinterpret_cast< const secqstring(*)>(_a[1]))); break;
- case 7: _t->clear(); break;
- case 8: _t->selectAll(); break;
- case 9: _t->undo(); break;
- case 10: _t->redo(); break;
- case 11: _t->d_func()->_q_clipboardChanged(); break;
- case 12: _t->d_func()->_q_handleWindowActivate(); break;
- case 13: _t->d_func()->_q_deleteSelected(); break;
- default: ;
- }
- }
-}
-
-const QMetaObjectExtraData QSecureLineEdit::staticMetaObjectExtraData = {
- 0, qt_static_metacall
-};
-
-const QMetaObject QSecureLineEdit::staticMetaObject = {
- { &QWidget::staticMetaObject, qt_meta_stringdata_QSecureLineEdit,
- qt_meta_data_QSecureLineEdit, &staticMetaObjectExtraData }
-};
-
-#ifdef Q_NO_DATA_RELOCATION
-const QMetaObject &QSecureLineEdit::getStaticMetaObject() { return staticMetaObject; }
-#endif //Q_NO_DATA_RELOCATION
-
-const QMetaObject *QSecureLineEdit::metaObject() const
-{
- return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
-}
-
-void *QSecureLineEdit::qt_metacast(const char *_clname)
-{
- if (!_clname) return 0;
- if (!strcmp(_clname, qt_meta_stringdata_QSecureLineEdit))
- return static_cast<void*>(const_cast< QSecureLineEdit*>(this));
- return QWidget::qt_metacast(_clname);
-}
-
-int QSecureLineEdit::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
-{
- _id = QWidget::qt_metacall(_c, _id, _a);
- if (_id < 0)
- return _id;
- if (_c == QMetaObject::InvokeMetaMethod) {
- if (_id < 14)
- qt_static_metacall(this, _c, _id, _a);
- _id -= 14;
- }
-#ifndef QT_NO_PROPERTIES
- else if (_c == QMetaObject::ReadProperty) {
- void *_v = _a[0];
- switch (_id) {
- case 0: *reinterpret_cast< QString*>(_v) = inputMask(); break;
- case 1: *reinterpret_cast< secqstring*>(_v) = text(); break;
- case 2: *reinterpret_cast< int*>(_v) = maxLength(); break;
- case 3: *reinterpret_cast< bool*>(_v) = hasFrame(); break;
- case 4: *reinterpret_cast< EchoMode*>(_v) = echoMode(); break;
- case 5: *reinterpret_cast< secqstring*>(_v) = displayText(); break;
- case 6: *reinterpret_cast< int*>(_v) = cursorPosition(); break;
- case 7: *reinterpret_cast< Qt::Alignment*>(_v) = alignment(); break;
- case 8: *reinterpret_cast< bool*>(_v) = isModified(); break;
- case 9: *reinterpret_cast< bool*>(_v) = hasSelectedText(); break;
- case 10: *reinterpret_cast< secqstring*>(_v) = selectedText(); break;
- case 11: *reinterpret_cast< bool*>(_v) = dragEnabled(); break;
- case 12: *reinterpret_cast< bool*>(_v) = isReadOnly(); break;
- case 13: *reinterpret_cast< bool*>(_v) = isUndoAvailable(); break;
- case 14: *reinterpret_cast< bool*>(_v) = isRedoAvailable(); break;
- case 15: *reinterpret_cast< bool*>(_v) = hasAcceptableInput(); break;
- }
- _id -= 16;
- } else if (_c == QMetaObject::WriteProperty) {
- void *_v = _a[0];
- switch (_id) {
- case 0: setInputMask(*reinterpret_cast< QString*>(_v)); break;
- case 1: setText(*reinterpret_cast< secqstring*>(_v)); break;
- case 2: setMaxLength(*reinterpret_cast< int*>(_v)); break;
- case 3: setFrame(*reinterpret_cast< bool*>(_v)); break;
- case 6: setCursorPosition(*reinterpret_cast< int*>(_v)); break;
- case 7: setAlignment(*reinterpret_cast< Qt::Alignment*>(_v)); break;
- case 8: setModified(*reinterpret_cast< bool*>(_v)); break;
- case 11: setDragEnabled(*reinterpret_cast< bool*>(_v)); break;
- case 12: setReadOnly(*reinterpret_cast< bool*>(_v)); break;
- }
- _id -= 16;
- } else if (_c == QMetaObject::ResetProperty) {
- _id -= 16;
- } else if (_c == QMetaObject::QueryPropertyDesignable) {
- _id -= 16;
- } else if (_c == QMetaObject::QueryPropertyScriptable) {
- _id -= 16;
- } else if (_c == QMetaObject::QueryPropertyStored) {
- _id -= 16;
- } else if (_c == QMetaObject::QueryPropertyEditable) {
- _id -= 16;
- } else if (_c == QMetaObject::QueryPropertyUser) {
- _id -= 16;
- }
-#endif // QT_NO_PROPERTIES
- return _id;
-}
-
-// SIGNAL 0
-void QSecureLineEdit::textChanged(const secqstring & _t1)
-{
- void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
- QMetaObject::activate(this, &staticMetaObject, 0, _a);
-}
-
-// SIGNAL 1
-void QSecureLineEdit::textEdited(const secqstring & _t1)
-{
- void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
- QMetaObject::activate(this, &staticMetaObject, 1, _a);
-}
-
-// SIGNAL 2
-void QSecureLineEdit::cursorPositionChanged(int _t1, int _t2)
-{
- void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
- QMetaObject::activate(this, &staticMetaObject, 2, _a);
-}
-
-// SIGNAL 3
-void QSecureLineEdit::returnPressed()
-{
- QMetaObject::activate(this, &staticMetaObject, 3, 0);
-}
-
-// SIGNAL 4
-void QSecureLineEdit::editingFinished()
-{
- QMetaObject::activate(this, &staticMetaObject, 4, 0);
-}
-
-// SIGNAL 5
-void QSecureLineEdit::selectionChanged()
-{
- QMetaObject::activate(this, &staticMetaObject, 5, 0);
-}
-QT_END_MOC_NAMESPACE
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 14 +++-
qt4/Makefile.am | 16 ++-
qt4/pinentryconfirm.moc | 94 ----------------
qt4/pinentrydialog.moc | 136 ------------------------
qt4/qsecurelineedit.cpp | 38 +++++--
qt4/qsecurelineedit.h | 21 +++-
qt4/qsecurelineedit.moc | 269 -----------------------------------------------
7 files changed, 66 insertions(+), 522 deletions(-)
delete mode 100644 qt4/pinentryconfirm.moc
delete mode 100644 qt4/pinentrydialog.moc
delete mode 100644 qt4/qsecurelineedit.moc
hooks/post-receive
--
The standard pinentry collection
http://git.gnupg.org
More information about the Gnupg-commits
mailing list