diff -r b72c6db6890b -r 5dc02b23752f src/gui/image/qiconengine.cpp --- a/src/gui/image/qiconengine.cpp Wed Jun 23 19:07:03 2010 +0300 +++ b/src/gui/image/qiconengine.cpp Tue Jul 06 15:10:48 2010 +0300 @@ -183,6 +183,10 @@ that should be filled with icon sizes. Engines that work in terms of a scalable, vectorial format normally return an empty list. + \value IconNameHook Allows to query the name used to create the + icon, for example when instantiating an icon using + QIcon::fromTheme(). + \sa virtual_hook() */ @@ -301,4 +305,20 @@ return arg.sizes; } +/*! + \since 4.7 + + Returns the name used to create the engine, if available. + + \note This is a helper method and the actual work is done by + virtual_hook() method, hence this method depends on icon engine support + and may not work with all icon engines. + */ +QString QIconEngineV2::iconName() +{ + QString name; + virtual_hook(QIconEngineV2::IconNameHook, reinterpret_cast(&name)); + return name; +} + QT_END_NAMESPACE