[svn] pinentry - r156 - in trunk: . qt
svn author marcus
cvs at cvs.gnupg.org
Fri Apr 13 02:06:56 CEST 2007
Author: marcus
Date: 2007-04-13 02:06:55 +0200 (Fri, 13 Apr 2007)
New Revision: 156
Modified:
trunk/ChangeLog
trunk/THANKS
trunk/qt/secqlineedit.cpp
trunk/qt/secqlineedit.h
Log:
2007-04-13 Marcus Brinkmann <marcus at g10code.de>
* qt/secqlineedit.h (SecQLineEdit::contextMenuEvent,
SecQLineEdit::createPopupMenu): Remove prototype.
* qt/secqlineedit.cpp (SecQLineEdit::contextMenuEvent,
SecQLineEdit::createPopupMenu): Remove implementation.
Submitted by Tobias Koenig <tokoe at kde.org>.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-02-14 16:24:02 UTC (rev 155)
+++ trunk/ChangeLog 2007-04-13 00:06:55 UTC (rev 156)
@@ -1,3 +1,11 @@
+2007-04-13 Marcus Brinkmann <marcus at g10code.de>
+
+ * qt/secqlineedit.h (SecQLineEdit::contextMenuEvent,
+ SecQLineEdit::createPopupMenu): Remove prototype.
+ * qt/secqlineedit.cpp (SecQLineEdit::contextMenuEvent,
+ SecQLineEdit::createPopupMenu): Remove implementation.
+ Submitted by Tobias Koenig <tokoe at kde.org>.
+
2007-02-14 Werner Koch <wk at g10code.com>
* pinentry/pinentry.h (struct pinentry): Add TOUCH_FILE.
Modified: trunk/THANKS
===================================================================
--- trunk/THANKS 2007-02-14 16:24:02 UTC (rev 155)
+++ trunk/THANKS 2007-04-13 00:06:55 UTC (rev 156)
@@ -2,3 +2,4 @@
Alexander Zangerl az at snafu.priv.at
Michael Nottebrock michaelnottebrock at gmx.net
Peter Eisentraut peter_e at gmx.net
+Tobias Koenig tokoe at kde.org
Modified: trunk/qt/secqlineedit.cpp
===================================================================
--- trunk/qt/secqlineedit.cpp 2007-02-14 16:24:02 UTC (rev 155)
+++ trunk/qt/secqlineedit.cpp 2007-04-13 00:06:55 UTC (rev 156)
@@ -1675,90 +1675,6 @@
enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll };
-/*!\reimp
-*/
-void SecQLineEdit::contextMenuEvent( QContextMenuEvent * e )
-{
-#ifndef QT_NO_POPUPMENU
- d->separate();
-
- QGuardedPtr<QPopupMenu> popup = createPopupMenu();
- QGuardedPtr<SecQLineEdit> that = this;
- QPoint pos = e->reason() == QContextMenuEvent::Mouse ? e->globalPos() :
- mapToGlobal( QPoint(e->pos().x(), 0) ) + QPoint( width() / 2, height() / 2 );
- int r = popup->exec( pos );
- delete (QPopupMenu*)popup;
- if ( that && d->menuId ) {
- switch ( d->menuId - r ) {
- case IdClear: clear(); break;
- case IdSelectAll: selectAll(); break;
-#ifndef SECURE_NO_UNDO
- case IdUndo: undo(); break;
- case IdRedo: redo(); break;
-#endif
-#ifndef QT_NO_CLIPBOARD
- case IdCut: cut(); break;
- case IdCopy: copy(); break;
- case IdPaste: paste(); break;
-#endif
- default:
- ; // nothing selected or lineedit destroyed. Be careful.
- }
- }
-#endif //QT_NO_POPUPMENU
-}
-
-/*!
- This function is called to create the popup menu which is shown
- when the user clicks on the line edit with the right mouse button.
- If you want to create a custom popup menu, reimplement this
- function and return the popup menu you create. The popup menu's
- ownership is transferred to the caller.
-*/
-
-QPopupMenu *SecQLineEdit::createPopupMenu()
-{
-#ifndef QT_NO_POPUPMENU
- QPopupMenu *popup = new QPopupMenu( this, "qt_edit_menu" );
- int id = d->menuId = popup->insertItem( QString( "&Undo" ) + ACCEL_KEY( Z ) );
- popup->insertItem( QString ("&Redo") + ACCEL_KEY( Y ) );
- popup->insertSeparator();
- popup->insertItem( QString ("Cu&t") + ACCEL_KEY( X ) );
- popup->insertItem( QString ("&Copy") + ACCEL_KEY( C ) );
- popup->insertItem( QString ("&Paste") + ACCEL_KEY( V ) );
- popup->insertItem( QString ("Clear") );
- popup->insertSeparator();
- popup->insertItem( QString ("Select All")
-#ifndef Q_WS_X11
- + ACCEL_KEY( A )
-#endif
- );
-#ifndef SECURE_NO_UNDO
- popup->setItemEnabled( id - IdUndo, d->isUndoAvailable() );
- popup->setItemEnabled( id - IdRedo, d->isRedoAvailable() );
-#else
- popup->setItemVisible( id - IdUndo, FALSE );
- popup->setItemVisible( id - IdRedo, FALSE );
-#endif /* SECURE_NO_UNDO */
-
-#ifndef QT_NO_CLIPBOARD
- popup->setItemEnabled( id - IdCut, !d->readOnly && d->hasSelectedText() );
- popup->setItemEnabled( id - IdCopy, d->hasSelectedText() );
- popup->setItemEnabled( id - IdPaste, !d->readOnly && !QApplication::clipboard()->text().isEmpty() );
-#else
- popup->setItemVisible( id - IdCut, FALSE );
- popup->setItemVisible( id - IdCopy, FALSE );
- popup->setItemVisible( id - IdPaste, FALSE );
-#endif
- popup->setItemEnabled( id - IdClear, !d->readOnly && !d->text.isEmpty() );
- popup->setItemEnabled( id - IdSelectAll, !d->text.isEmpty() && !d->allSelected() );
- return popup;
-#else
- return 0;
-#endif
-}
-
-
/*! \reimp */
void SecQLineEdit::windowActivationChange( bool b )
{
Modified: trunk/qt/secqlineedit.h
===================================================================
--- trunk/qt/secqlineedit.h 2007-02-14 16:24:02 UTC (rev 155)
+++ trunk/qt/secqlineedit.h 2007-04-13 00:06:55 UTC (rev 156)
@@ -202,8 +202,6 @@
void focusOutEvent( QFocusEvent * );
void resizeEvent( QResizeEvent * );
void drawContents( QPainter * );
- void contextMenuEvent( QContextMenuEvent * );
- virtual QPopupMenu *createPopupMenu();
void windowActivationChange( bool );
#ifndef QT_NO_COMPAT
void repaintArea( int, int ) { update(); }
More information about the Gnupg-commits
mailing list