[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: important patch for KAction
From: Christian Gebauer <gebauer () bigfoot ! com>
Date: 2000-09-29 23:29:57
[Download RAW message or body]
Hi,
The default button of the keyboard binding configuration
dialog currently deletes all bindings instead of resetting
them. *BAD*
The default key binding is stored in the action collection
when calling KActionCollection::insert(). The problem is
that Simon rearranged the KAction constructor some time ago.
(http://us.mandrakesoft.com/cgi-bin/cvsweb.cgi/kdelibs/kdeui/kaction.cpp.diff?r1=1.122&r2=1.123)
Now the action is inserted before setAccel() is called, so
a action never has a default binding.
RCS file: /home/kde/kdelibs/kdeui/kaction.cpp,v
retrieving revision 1.147
diff -u -3 -p -r1.147 kaction.cpp
--- kaction.cpp 2000/09/26 10:24:53 1.147
+++ kaction.cpp 2000/09/29 23:11:08
@@ -122,8 +122,10 @@ KAction::KAction( const QString& text, i
d = new KActionPrivate;
m_parentCollection = parentCollection();
- if ( m_parentCollection )
+ if ( m_parentCollection ) {
+ d->m_accel = accel; // default key binding
m_parentCollection->insert( this );
+ }
setAccel( accel );
setText( text );
@@ -136,8 +138,10 @@ KAction::KAction( const QString& text, i
d = new KActionPrivate;
m_parentCollection = parentCollection();
- if ( m_parentCollection )
+ if ( m_parentCollection ) {
+ d->m_accel = accel; // default key binding
m_parentCollection->insert( this );
+ }
setAccel( accel );
setText( text );
@@ -153,8 +157,10 @@ KAction::KAction( const QString& text, c
d = new KActionPrivate;
m_parentCollection = parentCollection();
- if ( m_parentCollection )
+ if ( m_parentCollection ) {
+ d->m_accel = accel; // default key binding
m_parentCollection->insert( this );
+ }
setAccel( accel );
setText( text );
@@ -168,8 +174,10 @@ KAction::KAction( const QString& text, c
d = new KActionPrivate;
m_parentCollection = parentCollection();
- if ( m_parentCollection )
+ if ( m_parentCollection ) {
+ d->m_accel = accel; // default key binding
m_parentCollection->insert( this );
+ }
setText( text );
setAccel( accel );
@@ -184,8 +192,10 @@ KAction::KAction( const QString& text, c
d = new KActionPrivate;
m_parentCollection = parentCollection();
- if ( m_parentCollection )
+ if ( m_parentCollection ) {
+ d->m_accel = accel; // default key binding
m_parentCollection->insert( this );
+ }
setAccel( accel );
setText( text );
@@ -203,8 +213,10 @@ KAction::KAction( const QString& text, c
d = new KActionPrivate;
m_parentCollection = parentCollection();
- if ( m_parentCollection )
+ if ( m_parentCollection ) {
+ d->m_accel = accel; // default key binding
m_parentCollection->insert( this );
+ }
setAccel( accel );
setText( text );
Christian
--
>><< Christian Gebauer >><< gebauer@bigfoot.com >><< ICQ 14916141 >><<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic