Index: kactioncollection.h
===================================================================
--- kactioncollection.h	(wersja 607513)
+++ kactioncollection.h	(kopia robocza)
@@ -282,8 +282,8 @@
    * null if nothing matches.
    */
   template <class T>
-  KAction* actionOfType( const QString& name ) const
-  { return actionOfTypeInternal(name, ((T)0)->staticMetaObject); }
+  T* actionOfType( const QString& name ) const
+  { return qobject_cast<T*>( actionOfTypeInternal(name, ((T)0)->staticMetaObject) ); }
 
   /**
    * Find all actions of a given subclass of KAction in the action collection.
@@ -292,8 +292,8 @@
    * @return A list of all KActions in the collection which match the parameters
    */
   template <class T>
-  KAction* actionsOfType( const QString& name ) const
-  { return actionsOfTypeInternal(name, ((T)0)->staticMetaObject); }
+  QList<T*> actionsOfType( const QString& name ) const
+  { return actionsOfTypeInternal<T>(name, ((T)0)->staticMetaObject); }
 
   /**
    * Returns the list of KActions which belong to this action collection.
@@ -391,8 +391,10 @@
 
 private:
   KAction* actionOfTypeInternal( const QString& name, const QMetaObject& mo ) const;
-  QList<KAction*> actionsOfTypeInternal( const QString& name, const QMetaObject& mo ) const;
 
+  template <class T>
+  QList<T*> actionsOfTypeInternal( const QString& name, const QMetaObject& mo ) const;
+
   KActionCollection( const KXMLGUIClient* parent ); // used by KXMLGUIClient
 
   class KActionCollectionPrivate* const d;
