Fix a number of runtime object identification problems which led to an even larger array of minor glitches

NOTE: kdevelop and kdewebdev still need to be fully repaired


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1222475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 03b783bfd6
commit 771e57c60b

@ -121,7 +121,7 @@ void dotNETstyle::polish(TQWidget* widget)
// to update the palette again.
bool extraPalette = false;
if (widget->inherits("TQComboBox") && !inheritsKHTML(widget)) {
if (widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !inheritsKHTML(widget)) {
widget->installEventFilter (this);
updatePalette( (TQComboBox*) widget );
extraPalette = true;
@ -134,10 +134,10 @@ void dotNETstyle::polish(TQWidget* widget)
// other bad things (see bug #54569)
/*
if (!widget->ownPalette()) {
if (widget->inherits("TQToolBar")) {
if (widget->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) {
updatePalette( (TQToolBar*) widget );
extraPalette = true;
} else if (widget->inherits("TQMenuBar")) {
} else if (widget->inherits(TQMENUBAR_OBJECT_NAME_STRING)) {
updatePalette( (TQMenuBar*) widget );
extraPalette = true;
}
@ -149,7 +149,7 @@ void dotNETstyle::unPolish(TQWidget* widget)
{
winstyle->unPolish(widget);
if (widget->inherits("TQComboBox") && !inheritsKHTML(widget)) {
if (widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !inheritsKHTML(widget)) {
widget->removeEventFilter (this);
}
}
@ -863,7 +863,7 @@ void dotNETstyle::drawControl(ControlElement element,
r.rect(&x, &y, &w, &h);
r.coords(&x, &y, &x2, &y2);
if (tb->parent()->inherits("TQTabWidget")) {
if (tb->parent()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) {
const TQTabWidget *tw = (const TQTabWidget *)tb->parent();
TQWidget *cw = tw->cornerWidget(Qt::TopLeft);
if (cw) {
@ -1857,10 +1857,10 @@ int dotNETstyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
return 1;
} else {
if (widget &&
(widget->inherits("TQPopupMenu") ||
widget->inherits("TQMenuBar") ||
widget->inherits("TQRangeControl") ||
widget->inherits("TQScrollView"))) {
(widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) ||
widget->inherits(TQMENUBAR_OBJECT_NAME_STRING) ||
widget->inherits(TQRANGECONTROL_OBJECT_NAME_STRING) ||
widget->inherits(TQSCROLLVIEW_OBJECT_NAME_STRING))) {
return 1;
} else {
return 2;
@ -2042,7 +2042,7 @@ void dotNETstyle::slotDestroyed()
bool dotNETstyle::eventFilter(TQObject *obj, TQEvent *ev)
{
if (obj->inherits("TQComboBox")) {
if (obj->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) {
if (ev->type() == TQEvent::Enter) {
TQWidget *btn = (TQWidget *)obj;
if (btn->isEnabled()) {
@ -2062,7 +2062,7 @@ bool dotNETstyle::eventFilter(TQObject *obj, TQEvent *ev)
pal.active().color(TQColorGroup::Background));
btn->setPalette(pal);
}
} else if (obj->inherits("TQButton")) {
} else if (obj->inherits(TQBUTTON_OBJECT_NAME_STRING)) {
TQWidget *btn = (TQWidget *)obj;
TQPalette pal = btn->palette();
pal.setColor(TQColorGroup::Button,

@ -630,7 +630,7 @@ void PhaseStyle::drawPrimitive(PrimitiveElement element,
horiz = true;
}
if ((widget) && ((widget->inherits("TQPopupMenu")) ||
if ((widget) && ((widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) ||
(widget->inherits("KPopupTitle")))) {
// kicker/kdesktop menu titles
drawPhaseBevel(painter, x,y,w,h,
@ -887,7 +887,7 @@ void PhaseStyle::drawPrimitive(PrimitiveElement element,
bool flat = true;
if (widget && widget->parent() &&
widget->parent()->inherits("TQToolBar")) {
widget->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) {
TQToolBar *toolbar = ::qt_cast<TQToolBar*>(widget->parent());
if (toolbar) {
// toolbar not floating or in a QMainWindow
@ -1852,7 +1852,7 @@ void PhaseStyle::drawComplexControl(ComplexControl control,
y2 = rect.bottom();
// check for TQToolBar parent
if (btn->parent() && btn->parent()->inherits("TQToolBar")) {
if (btn->parent() && btn->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) {
toolbar = ::qt_cast<TQToolBar*>(btn->parent());
if (toolbar) {
horiz = (toolbar->orientation() == Qt::Horizontal);

Loading…
Cancel
Save