From bd6b4acb39498ffea3beea7d9b5f7620b60c14db Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 13 Sep 2004 21:35:12 +0000 Subject: Many bugfixes --- (limited to 'microkde/kdeui/kaction.cpp') 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 @@ -212,7 +212,6 @@ KAction::KAction( QObject* parent, const char* name ) KAction::~KAction() { - kdDebug(129) << "KAction::~KAction( this = \"" << name() << "\" )" << endl; // -- ellis #ifndef KDE_NO_COMPAT if (d->m_kaccel) unplugAccel(); @@ -435,7 +434,8 @@ bool KAction::setShortcut( const KShortcut& cut ) bool KAction::updateKAccelShortcut( KAccel* kaccel ) { - qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed"); + //qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed"); + // Check if action is permitted /*US if (kapp && !kapp->authorizeKAction(name())) @@ -462,7 +462,8 @@ bool KAction::updateKAccelShortcut( KAccel* kaccel ) void KAction::insertKAccel( KAccel* kaccel ) { - qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed"); + //qDebug("KAction::updateKAccelShortcut~ ...1 has top be fixed"); + /*US //kdDebug(129) << "KAction::insertKAccel( " << kaccel << " ): this = " << this << endl; if ( !kaccel->actions().actionPtr( name() ) ) { @@ -478,7 +479,8 @@ void KAction::insertKAccel( KAccel* kaccel ) void KAction::removeKAccel( KAccel* kaccel ) { - qDebug("KAction::removeKAccel~ ...1 has top be fixed"); + // qDebug("KAction::removeKAccel~ ...1 has top be fixed"); + /*US //kdDebug(129) << "KAction::removeKAccel( " << i << " ): this = " << this << endl; for( uint i = 0; i < d->m_kaccelList.count(); i++ ) { @@ -511,7 +513,8 @@ void KAction::updateShortcut( int i ) else if ( w->inherits( "QMenuBar" ) ) //US static_cast(w)->setAccel( d->m_cut.keyCodeQt(), id ); //US (QMenuBar*)(w)->setAccel( d->m_cut.keyCodeQt(), id ); - qDebug("KAction::updateShortcut( int i ) ...1 has top be fixed"); + + ; //qDebug("KAction::updateShortcut( int i ) ...1 has top be fixed"); } @@ -539,7 +542,9 @@ void KAction::updateShortcut( QPopupMenu* menu, int id ) kdWarning(129) << "KAction::updateShortcut(): name = \"" << name() << "\", cut = " << d->m_cut.toStringInternal() << "; No KAccel, probably missing a parent collection." << endl; } */ - qDebug("KAction::updateShortcut( QPopupMenu* menu, int id ) ...1 has top be fixed"); + + +//qDebug("KAction::updateShortcut( QPopupMenu* menu, int id ) ...1 has top be fixed"); } @@ -565,7 +570,7 @@ void KAction::setShortcutText( const QString& s ) int KAction::accel() const { - qDebug("KAction::accel() ...1 has top be fixed"); + // qDebug("KAction::accel() ...1 has top be fixed"); //US return d->m_cut.keyCodeQt(); return 0; } @@ -601,7 +606,7 @@ bool KAction::isShortcutConfigurable() const void KAction::setToolTip( const QString& tt ) { - qDebug("KAction::setToolTip ...1 has top be fixed"); + //qDebug("KAction::setToolTip ...1 has top be fixed"); d->setToolTip( tt ); int len = containerCount(); @@ -611,7 +616,7 @@ void KAction::setToolTip( const QString& tt ) void KAction::updateToolTip( int i ) { - qDebug("KAction::updateToolTip ...1 has top be fixed"); + //qDebug("KAction::updateToolTip ...1 has top be fixed"); QWidget *w = container( i ); if ( w->inherits( "KToolBar" ) ) @@ -633,14 +638,7 @@ int KAction::plug( QWidget *w, int index ) return -1; } -#ifndef NDEBUG - KAccel* kaccel = kaccelCurrent(); - // If there is a shortcut, but no KAccel available - if( !d->m_cut.isNull() && kaccel == 0 ) { - kdWarning(129) << "KAction::plug(): has no KAccel object; this = " << this << " name = " << name() << " parentCollection = " << m_parentCollection << endl; // ellis -//US kdDebug(129) << kdBacktrace() << endl; - } -#endif + // Check if action is permitted //US if (kapp && !kapp->authorizeKAction(name())) @@ -775,7 +773,8 @@ void KAction::unplug( QWidget *w ) void KAction::plugAccel(KAccel *kacc, bool configurable) { - qDebug("KAction::plugAccel ...1 has top be fixed"); + // qDebug("KAction::plugAccel ...1 has top be fixed"); + /*US kdWarning(129) << "KAction::plugAccel(): call to deprecated action." << endl; kdDebug(129) << kdBacktrace() << endl; @@ -806,7 +805,7 @@ void KAction::plugAccel(KAccel *kacc, bool configurable) void KAction::unplugAccel() { - qDebug("KAction::unplugAccel ...1 has top be fixed"); + // qDebug("KAction::unplugAccel ...1 has top be fixed"); /*US //kdDebug(129) << "KAction::unplugAccel() " << this << " " << name() << endl; if ( d->m_kaccel ) @@ -819,7 +818,8 @@ void KAction::unplugAccel() void KAction::plugMainWindowAccel( QWidget *w ) { - qDebug("KAction::plugMainWindowAccel ...1 has top be fixed"); + // qDebug("KAction::plugMainWindowAccel ...1 has top be fixed"); + /*US // Note: topLevelWidget() stops too early, we can't use it. QWidget * tl = w; @@ -915,7 +915,7 @@ void KAction::updateText( int i ) static_cast(w)->changeItem( itemId( i ), d->text() ); else if ( w->inherits( "KToolBar" ) ) { - qDebug("KAction::updateText ...3 has top be fixed"); + //qDebug("KAction::updateText ...3 has top be fixed"); QWidget *button = static_cast(w)->getWidget( itemId( i ) ); if ( button->inherits( "KToolBarButton" ) ) static_cast(button)->setText( d->plainText() ); @@ -1118,7 +1118,7 @@ void KAction::slotActivated() void KAction::slotDestroyed() { - kdDebug(129) << "KAction::slotDestroyed(): this = " << this << ", name = \"" << name() << "\", sender = " << sender() << endl; + const QObject* o = sender(); /* -- cgit v0.9.0.2