diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-04-15 13:18:50 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-04-15 13:21:29 +0200 |
commit | 1db482f38fb4b0f311bd414d7c9db9f67ede5855 (patch) | |
tree | b48bd9e1b4f9b70c63ce2d17a49b9fcae3de36c6 /vcl/unx/kde4 | |
parent | f82a46dabeb431fc199aa4b43766115184844efe (diff) |
avoid OSL_ASSERT that is actually never true
Diffstat (limited to 'vcl/unx/kde4')
-rw-r--r-- | vcl/unx/kde4/KDESalGraphics.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index 04f71bfbed3d..5075db4fe27d 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -901,14 +901,14 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart p if( part == PART_TRACK_VERT_AREA || part == PART_TRACK_HORZ_AREA ) { QStyleOptionSlider option; - OSL_ASSERT( val.getType() == CTRL_SCROLLBAR ); - const ScrollbarValue* sbVal = static_cast<const ScrollbarValue *>(&val); option.orientation = ( part == PART_TRACK_HORZ_AREA ) ? Qt::Horizontal : Qt::Vertical; - option.minimum = sbVal->mnMin; - option.maximum = sbVal->mnMax; - option.sliderValue = sbVal->mnCur; - option.sliderPosition = sbVal->mnCur; - option.pageStep = sbVal->mnVisibleSize; + // getNativeControlRegion usually gets ImplControlValue as 'val' (i.e. not the proper + // subclass), so use random sensible values (doesn't matter anyway, as the wanted + // geometry here depends only on button sizes) + option.maximum = 10; + option.minimum = 0; + option.sliderPosition = option.sliderValue = 4; + option.pageStep = 2; // Adjust coordinates to make the widget appear to be at (0,0), i.e. make // widget and screen coordinates the same. QStyle functions should use screen // coordinates but at least QPlastiqueStyle::subControlRect() is buggy |