Kaydet (Commit) 485e4432 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix o3tl::typed_flags to bool conversions

Change-Id: Iaed915b3765a3d23aea7f771a7c912956d864c5b
üst 549b7fad
...@@ -516,7 +516,7 @@ bool WidgetPainter::drawStyledWidget( QWidget *pWidget, ...@@ -516,7 +516,7 @@ bool WidgetPainter::drawStyledWidget( QWidget *pWidget,
pWidget->move( 0, 0 ); pWidget->move( 0, 0 );
// Enable/disable the widget // Enable/disable the widget
pWidget->setEnabled( nState & ControlState::ENABLED ); pWidget->setEnabled( bool(nState & ControlState::ENABLED) );
// Create pixmap to paint to // Create pixmap to paint to
KDEX11Pixmap xPixmap( pWidget->width(), pWidget->height() ); KDEX11Pixmap xPixmap( pWidget->width(), pWidget->height() );
...@@ -1413,7 +1413,7 @@ bool KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, ...@@ -1413,7 +1413,7 @@ bool KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart,
if ( (nType == CTRL_PUSHBUTTON) && (nPart == PART_ENTIRE_CONTROL) ) if ( (nType == CTRL_PUSHBUTTON) && (nPart == PART_ENTIRE_CONTROL) )
{ {
bReturn = pWidgetPainter->drawStyledWidget( bReturn = pWidgetPainter->drawStyledWidget(
pWidgetPainter->pushButton( rControlRegion, (nState & ControlState::DEFAULT) ), pWidgetPainter->pushButton( rControlRegion, bool(nState & ControlState::DEFAULT) ),
nState, aValue, this ); nState, aValue, this );
} }
else if ( (nType == CTRL_RADIOBUTTON) && (nPart == PART_ENTIRE_CONTROL) ) else if ( (nType == CTRL_RADIOBUTTON) && (nPart == PART_ENTIRE_CONTROL) )
...@@ -1542,7 +1542,7 @@ bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar ...@@ -1542,7 +1542,7 @@ bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
{ {
// Metrics of the push button // Metrics of the push button
case CTRL_PUSHBUTTON: case CTRL_PUSHBUTTON:
pWidget = pWidgetPainter->pushButton( rControlRegion, ( nState & ControlState::DEFAULT ) ); pWidget = pWidgetPainter->pushButton( rControlRegion, bool( nState & ControlState::DEFAULT ) );
switch ( nPart ) switch ( nPart )
{ {
......
...@@ -337,7 +337,7 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, ...@@ -337,7 +337,7 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
QStyleOptionMenuItem option; QStyleOptionMenuItem option;
option.checkType = ( part == PART_MENU_ITEM_CHECK_MARK ) option.checkType = ( part == PART_MENU_ITEM_CHECK_MARK )
? QStyleOptionMenuItem::NonExclusive : QStyleOptionMenuItem::Exclusive; ? QStyleOptionMenuItem::NonExclusive : QStyleOptionMenuItem::Exclusive;
option.checked = (nControlState & ControlState::PRESSED) ? true : false; option.checked = bool( nControlState & ControlState::PRESSED );
// widgetRect is now the rectangle for the checkbox/radiobutton itself, but Qt // widgetRect is now the rectangle for the checkbox/radiobutton itself, but Qt
// paints the whole menu item, so translate position (and it'll be clipped); // paints the whole menu item, so translate position (and it'll be clipped);
// it is also necessary to fill the background transparently first, as this // it is also necessary to fill the background transparently first, as this
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment