QIcon: ensure that QIconLoader is initialized

Make sure that QIconLoader is initialized when QIcon::themeName()
is called. Otherwise, themeName() may return the wrong value.

Change-Id: I54621e31da24bdbe745e7d6ae6a1d58cb4190cd7
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
Dmitry Shachnev 2013-03-03 19:08:35 +04:00 committed by The Qt Project
parent 4520cb9865
commit 2041f4eae8

View File

@ -945,6 +945,7 @@ void QIcon::setThemeName(const QString &name)
*/
QString QIcon::themeName()
{
QIconLoader::instance()->ensureInitialized();
return QIconLoader::instance()->themeName();
}