diff options
author | Janne Koskinen <janne.p.koskinen@digia.com> | 2010-04-23 14:08:48 (GMT) |
---|---|---|
committer | Janne Koskinen <janne.p.koskinen@digia.com> | 2010-04-23 14:08:48 (GMT) |
commit | fecce960a050ef2964e28f373bf1a35f7d9949a3 (patch) | |
tree | 296ef35071a80076a5186e71696cddc88cc1a56f /src/gui/image/qiconengine.cpp | |
parent | 02c65146610cdd5bfe1f3ee4656ba07af82afcc7 (diff) | |
parent | 15088d236924bccee787953e04214f87392e8e55 (diff) | |
download | Qt-fecce960a050ef2964e28f373bf1a35f7d9949a3.zip Qt-fecce960a050ef2964e28f373bf1a35f7d9949a3.tar.gz Qt-fecce960a050ef2964e28f373bf1a35f7d9949a3.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-webkit into 4.7
Diffstat (limited to 'src/gui/image/qiconengine.cpp')
-rw-r--r-- | src/gui/image/qiconengine.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/image/qiconengine.cpp b/src/gui/image/qiconengine.cpp index 4c7c728..050d48d 100644 --- a/src/gui/image/qiconengine.cpp +++ b/src/gui/image/qiconengine.cpp @@ -183,6 +183,10 @@ void QIconEngine::addFile(const QString &/*fileName*/, const QSize &/*size*/, QI 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 @@ QList<QSize> QIconEngineV2::availableSizes(QIcon::Mode mode, QIcon::State state) 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<void*>(&name)); + return name; +} + QT_END_NAMESPACE |