summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/kaction.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/microkde/kdeui/kaction.cpp b/microkde/kdeui/kaction.cpp
index 77d36a5..d38a6d5 100644
--- a/microkde/kdeui/kaction.cpp
+++ b/microkde/kdeui/kaction.cpp
@@ -211,9 +211,8 @@ KAction::KAction( QObject* parent, const char* name )
211// KDE 4: remove end 211// KDE 4: remove end
212 212
213KAction::~KAction() 213KAction::~KAction()
214{ 214{
215 kdDebug(129) << "KAction::~KAction( this = \"" << name() << "\" )" << endl; // -- ellis
216#ifndef KDE_NO_COMPAT 215#ifndef KDE_NO_COMPAT
217 if (d->m_kaccel) 216 if (d->m_kaccel)
218 unplugAccel(); 217 unplugAccel();
219#endif 218#endif
@@ -434,9 +433,10 @@ bool KAction::setShortcut( const KShortcut& cut )
434} 433}
435 434
436bool KAction::updateKAccelShortcut( KAccel* kaccel ) 435bool KAction::updateKAccelShortcut( KAccel* kaccel )
437{ 436{
438 qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed"); 437 //qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed");
438
439 // Check if action is permitted 439 // Check if action is permitted
440/*US 440/*US
441 if (kapp && !kapp->authorizeKAction(name())) 441 if (kapp && !kapp->authorizeKAction(name()))
442 return false; 442 return false;
@@ -461,9 +461,10 @@ bool KAction::updateKAccelShortcut( KAccel* kaccel )
461} 461}
462 462
463void KAction::insertKAccel( KAccel* kaccel ) 463void KAction::insertKAccel( KAccel* kaccel )
464{ 464{
465 qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed"); 465 //qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed");
466
466/*US 467/*US
467 //kdDebug(129) << "KAction::insertKAccel( " << kaccel << " ): this = " << this << endl; 468 //kdDebug(129) << "KAction::insertKAccel( " << kaccel << " ): this = " << this << endl;
468 if ( !kaccel->actions().actionPtr( name() ) ) { 469 if ( !kaccel->actions().actionPtr( name() ) ) {
469 if( updateKAccelShortcut( kaccel ) ) { 470 if( updateKAccelShortcut( kaccel ) ) {
@@ -477,9 +478,10 @@ void KAction::insertKAccel( KAccel* kaccel )
477} 478}
478 479
479void KAction::removeKAccel( KAccel* kaccel ) 480void KAction::removeKAccel( KAccel* kaccel )
480{ 481{
481 qDebug("KAction::removeKAccel~ ...1 has top be fixed"); 482 // qDebug("KAction::removeKAccel~ ...1 has top be fixed");
483
482/*US 484/*US
483 //kdDebug(129) << "KAction::removeKAccel( " << i << " ): this = " << this << endl; 485 //kdDebug(129) << "KAction::removeKAccel( " << i << " ): this = " << this << endl;
484 for( uint i = 0; i < d->m_kaccelList.count(); i++ ) { 486 for( uint i = 0; i < d->m_kaccelList.count(); i++ ) {
485 if( d->m_kaccelList[i] == kaccel ) { 487 if( d->m_kaccelList[i] == kaccel ) {
@@ -510,9 +512,10 @@ void KAction::updateShortcut( int i )
510 } 512 }
511 else if ( w->inherits( "QMenuBar" ) ) 513 else if ( w->inherits( "QMenuBar" ) )
512//US static_cast<QMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id ); 514//US static_cast<QMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id );
513//US (QMenuBar*)(w)->setAccel( d->m_cut.keyCodeQt(), id ); 515//US (QMenuBar*)(w)->setAccel( d->m_cut.keyCodeQt(), id );
514 qDebug("KAction::updateShortcut( int i ) ...1 has top be fixed"); 516
517 ; //qDebug("KAction::updateShortcut( int i ) ...1 has top be fixed");
515 518
516} 519}
517 520
518void KAction::updateShortcut( QPopupMenu* menu, int id ) 521void KAction::updateShortcut( QPopupMenu* menu, int id )
@@ -538,9 +541,11 @@ void KAction::updateShortcut( QPopupMenu* menu, int id )
538 menu->setAccel( d->m_cut.keyCodeQt(), id ); 541 menu->setAccel( d->m_cut.keyCodeQt(), id );
539 kdWarning(129) << "KAction::updateShortcut(): name = \"" << name() << "\", cut = " << d->m_cut.toStringInternal() << "; No KAccel, probably missing a parent collection." << endl; 542 kdWarning(129) << "KAction::updateShortcut(): name = \"" << name() << "\", cut = " << d->m_cut.toStringInternal() << "; No KAccel, probably missing a parent collection." << endl;
540 } 543 }
541*/ 544*/
542 qDebug("KAction::updateShortcut( QPopupMenu* menu, int id ) ...1 has top be fixed"); 545
546
547//qDebug("KAction::updateShortcut( QPopupMenu* menu, int id ) ...1 has top be fixed");
543 548
544} 549}
545 550
546const KShortcut& KAction::shortcut() const 551const KShortcut& KAction::shortcut() const
@@ -564,9 +569,9 @@ void KAction::setShortcutText( const QString& s )
564} 569}
565 570
566int KAction::accel() const 571int KAction::accel() const
567{ 572{
568 qDebug("KAction::accel() ...1 has top be fixed"); 573 // qDebug("KAction::accel() ...1 has top be fixed");
569//US return d->m_cut.keyCodeQt(); 574//US return d->m_cut.keyCodeQt();
570 return 0; 575 return 0;
571} 576}
572 577
@@ -600,9 +605,9 @@ bool KAction::isShortcutConfigurable() const
600} 605}
601 606
602void KAction::setToolTip( const QString& tt ) 607void KAction::setToolTip( const QString& tt )
603{ 608{
604 qDebug("KAction::setToolTip ...1 has top be fixed"); 609 //qDebug("KAction::setToolTip ...1 has top be fixed");
605 d->setToolTip( tt ); 610 d->setToolTip( tt );
606 611
607 int len = containerCount(); 612 int len = containerCount();
608 for( int i = 0; i < len; ++i ) 613 for( int i = 0; i < len; ++i )
@@ -610,9 +615,9 @@ void KAction::setToolTip( const QString& tt )
610} 615}
611 616
612void KAction::updateToolTip( int i ) 617void KAction::updateToolTip( int i )
613{ 618{
614 qDebug("KAction::updateToolTip ...1 has top be fixed"); 619 //qDebug("KAction::updateToolTip ...1 has top be fixed");
615 QWidget *w = container( i ); 620 QWidget *w = container( i );
616 621
617 if ( w->inherits( "KToolBar" ) ) 622 if ( w->inherits( "KToolBar" ) )
618 QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); 623 QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
@@ -632,16 +637,9 @@ int KAction::plug( QWidget *w, int index )
632 kdWarning(129) << "KAction::plug called with 0 argument\n"; 637 kdWarning(129) << "KAction::plug called with 0 argument\n";
633 return -1; 638 return -1;
634 } 639 }
635 640
636#ifndef NDEBUG 641
637 KAccel* kaccel = kaccelCurrent();
638 // If there is a shortcut, but no KAccel available
639 if( !d->m_cut.isNull() && kaccel == 0 ) {
640 kdWarning(129) << "KAction::plug(): has no KAccel object; this = " << this << " name = " << name() << " parentCollection = " << m_parentCollection << endl; // ellis
641//US kdDebug(129) << kdBacktrace() << endl;
642 }
643#endif
644 642
645 // Check if action is permitted 643 // Check if action is permitted
646//US if (kapp && !kapp->authorizeKAction(name())) 644//US if (kapp && !kapp->authorizeKAction(name()))
647//US return -1; 645//US return -1;
@@ -774,9 +772,10 @@ void KAction::unplug( QWidget *w )
774} 772}
775 773
776void KAction::plugAccel(KAccel *kacc, bool configurable) 774void KAction::plugAccel(KAccel *kacc, bool configurable)
777{ 775{
778 qDebug("KAction::plugAccel ...1 has top be fixed"); 776 // qDebug("KAction::plugAccel ...1 has top be fixed");
777
779/*US 778/*US
780 kdWarning(129) << "KAction::plugAccel(): call to deprecated action." << endl; 779 kdWarning(129) << "KAction::plugAccel(): call to deprecated action." << endl;
781 kdDebug(129) << kdBacktrace() << endl; 780 kdDebug(129) << kdBacktrace() << endl;
782 //kdDebug(129) << "KAction::plugAccel( kacc = " << kacc << " ): name \"" << name() << "\"" << endl; 781 //kdDebug(129) << "KAction::plugAccel( kacc = " << kacc << " ): name \"" << name() << "\"" << endl;
@@ -805,9 +804,9 @@ void KAction::plugAccel(KAccel *kacc, bool configurable)
805} 804}
806 805
807void KAction::unplugAccel() 806void KAction::unplugAccel()
808{ 807{
809 qDebug("KAction::unplugAccel ...1 has top be fixed"); 808 // qDebug("KAction::unplugAccel ...1 has top be fixed");
810/*US 809/*US
811 //kdDebug(129) << "KAction::unplugAccel() " << this << " " << name() << endl; 810 //kdDebug(129) << "KAction::unplugAccel() " << this << " " << name() << endl;
812 if ( d->m_kaccel ) 811 if ( d->m_kaccel )
813 { 812 {
@@ -818,9 +817,10 @@ void KAction::unplugAccel()
818} 817}
819 818
820void KAction::plugMainWindowAccel( QWidget *w ) 819void KAction::plugMainWindowAccel( QWidget *w )
821{ 820{
822 qDebug("KAction::plugMainWindowAccel ...1 has top be fixed"); 821 // qDebug("KAction::plugMainWindowAccel ...1 has top be fixed");
822
823/*US 823/*US
824 // Note: topLevelWidget() stops too early, we can't use it. 824 // Note: topLevelWidget() stops too early, we can't use it.
825 QWidget * tl = w; 825 QWidget * tl = w;
826 QWidget * n; 826 QWidget * n;
@@ -914,9 +914,9 @@ void KAction::updateText( int i )
914 else if ( w->inherits( "QMenuBar" ) ) 914 else if ( w->inherits( "QMenuBar" ) )
915 static_cast<QMenuBar*>(w)->changeItem( itemId( i ), d->text() ); 915 static_cast<QMenuBar*>(w)->changeItem( itemId( i ), d->text() );
916 else if ( w->inherits( "KToolBar" ) ) 916 else if ( w->inherits( "KToolBar" ) )
917 { 917 {
918 qDebug("KAction::updateText ...3 has top be fixed"); 918 //qDebug("KAction::updateText ...3 has top be fixed");
919 QWidget *button = static_cast<KToolBar *>(w)->getWidget( itemId( i ) ); 919 QWidget *button = static_cast<KToolBar *>(w)->getWidget( itemId( i ) );
920 if ( button->inherits( "KToolBarButton" ) ) 920 if ( button->inherits( "KToolBarButton" ) )
921 static_cast<KToolBarButton *>(button)->setText( d->plainText() ); 921 static_cast<KToolBarButton *>(button)->setText( d->plainText() );
922 922
@@ -1117,9 +1117,9 @@ void KAction::slotActivated()
1117} 1117}
1118 1118
1119void KAction::slotDestroyed() 1119void KAction::slotDestroyed()
1120{ 1120{
1121 kdDebug(129) << "KAction::slotDestroyed(): this = " << this << ", name = \"" << name() << "\", sender = " << sender() << endl; 1121
1122 const QObject* o = sender(); 1122 const QObject* o = sender();
1123 1123
1124/* 1124/*
1125 1125