diff options
author | Martin Smith <msmith@trolltech.com> | 2010-04-14 11:50:28 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-04-14 11:50:28 (GMT) |
commit | e5d1bb8e20cfa322807198359efc05c18938b2f3 (patch) | |
tree | 000e380d4240ecebbf12e61007fc459d5d502909 /tools | |
parent | a3c73742d9b9b9329492f8f70d74d6701840062f (diff) | |
parent | 4dae6bd829e1103d0e21ce9e509d758b5af0c2c0 (diff) | |
download | Qt-e5d1bb8e20cfa322807198359efc05c18938b2f3.zip Qt-e5d1bb8e20cfa322807198359efc05c18938b2f3.tar.gz Qt-e5d1bb8e20cfa322807198359efc05c18938b2f3.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tools')
-rw-r--r-- | tools/designer/src/components/propertyeditor/brushpropertymanager.cpp | 18 | ||||
-rw-r--r-- | tools/qdoc3/test/qt-defines.qdocconf | 2 | ||||
-rw-r--r-- | tools/qdoc3/test/qt-html-templates.qdocconf | 2 |
3 files changed, 16 insertions, 6 deletions
diff --git a/tools/designer/src/components/propertyeditor/brushpropertymanager.cpp b/tools/designer/src/components/propertyeditor/brushpropertymanager.cpp index 6e9a698..2300b47 100644 --- a/tools/designer/src/components/propertyeditor/brushpropertymanager.cpp +++ b/tools/designer/src/components/propertyeditor/brushpropertymanager.cpp @@ -119,21 +119,31 @@ Qt::BrushStyle BrushPropertyManager::brushStyleIndexToStyle(int brushStyleIndex) return Qt::NoBrush; } + +typedef QMap<int, QIcon> EnumIndexIconMap; + +static void clearBrushIcons(); +Q_GLOBAL_STATIC_WITH_INITIALIZER(EnumIndexIconMap, brushIcons, qAddPostRoutine(clearBrushIcons)) + +static void clearBrushIcons() +{ + brushIcons()->clear(); +} + const BrushPropertyManager::EnumIndexIconMap &BrushPropertyManager::brushStyleIcons() { // Create a map of icons for the brush style editor - static EnumIndexIconMap rc; - if (rc.empty()) { + if (brushIcons()->empty()) { const int brushStyleCount = sizeof(brushStyles)/sizeof(const char *); QBrush brush(Qt::black); const QIcon solidIcon = QtPropertyBrowserUtils::brushValueIcon(brush); for (int i = 0; i < brushStyleCount; i++) { const Qt::BrushStyle style = brushStyleIndexToStyle(i); brush.setStyle(style); - rc.insert(i, QtPropertyBrowserUtils::brushValueIcon(brush)); + brushIcons()->insert(i, QtPropertyBrowserUtils::brushValueIcon(brush)); } } - return rc; + return *(brushIcons()); } QString BrushPropertyManager::brushStyleIndexToString(int brushStyleIndex) diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf index 06bdaae..faf3906 100644 --- a/tools/qdoc3/test/qt-defines.qdocconf +++ b/tools/qdoc3/test/qt-defines.qdocconf @@ -1,4 +1,4 @@ -defines = Q_QDOC \ +defines = Q_QDOC \ QT_.*_SUPPORT \ QT_.*_LIB \ QT_COMPAT \ diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 26bc0e7..67a25f3 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -1,4 +1,4 @@ -HTML.stylesheets = style/style.css +HTML.stylesheets = style/style.css HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \ " <div id=\"nav-logo\">\n" \ " <a href=\"index.html\">Home</a></div>\n" \ |