Build fix for -no-feature-imageformat_xpm

Change-Id: I081fdfb622f21fc63a72e153d4d6c7120107ba67
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Paul Olav Tvete 2017-02-20 10:09:39 +01:00 committed by Stephan Binner
parent d83a20af1d
commit a58dafd2e8
2 changed files with 6 additions and 2 deletions

View File

@ -5239,6 +5239,7 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
return ret;
}
#if QT_CONFIG(imageformat_xpm)
static QPixmap cachedPixmapFromXPM(const char * const *xpm)
{
QPixmap result;
@ -5251,6 +5252,7 @@ static QPixmap cachedPixmapFromXPM(const char * const *xpm)
}
static inline QPixmap titleBarMenuCachedPixmapFromXPM() { return cachedPixmapFromXPM(qt_menu_xpm); }
#endif // QT_CONFIG(imageformat_xpm)
#ifndef QT_NO_IMAGEFORMAT_PNG
static inline QString clearText16IconPath()

View File

@ -86,7 +86,7 @@ static const int windowsRightBorder = 15; // right border on windows
static const int groupBoxBottomMargin = 0; // space below the groupbox
static const int groupBoxTopMargin = 3;
#if QT_CONFIG(imageformat_xpm)
/* XPM */
static const char * const dock_widget_close_xpm[] = {
"11 13 7 1",
@ -173,7 +173,7 @@ static const char * const qt_titlebar_context_help[] = {
" ",
" ## ",
" ## "};
#endif // QT_CONFIG(imageformat_xpm)
static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50)
{
@ -2368,6 +2368,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
bool hover = (titleBar->activeSubControls & SC_TitleBarContextHelpButton) && (titleBar->state & State_MouseOver);
bool sunken = (titleBar->activeSubControls & SC_TitleBarContextHelpButton) && (titleBar->state & State_Sunken);
qt_fusion_draw_mdibutton(painter, titleBar, contextHelpButtonRect, hover, sunken);
#if QT_CONFIG(imageformat_xpm)
QImage image(qt_titlebar_context_help);
QColor alpha = textColor;
alpha.setAlpha(128);
@ -2375,6 +2376,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
image.setColor(2, alpha.rgba());
painter->setRenderHint(QPainter::SmoothPixmapTransform);
painter->drawImage(contextHelpButtonRect.adjusted(4, 4, -4, -4), image);
#endif
}
}