From 9e635fc49d218b4b5fda27fadaa1bcd21df25063 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 10 Apr 2013 23:20:54 -0500 Subject: Fix QtCurve hang in menu headers Clean up spurious build files --- style/qtcurve.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'style/qtcurve.cpp') diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp index 0c8391a..db4f8c7 100644 --- a/style/qtcurve.cpp +++ b/style/qtcurve.cpp @@ -3240,7 +3240,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS } else if(0==flags) // Header on popup menu? { TQWidget *widget(p && p->device() ? dynamic_cast(p->device()) : 0L); - bool menuTitle(widget && 0==qstrcmp(ceData.widgetObjectTypes[ceData.widgetObjectTypes.count()-1].ascii(), "TDEPopupTitle")); + bool menuTitle(widget && (ceData.widgetObjectTypes.count() > 0) && 0==qstrcmp(ceData.widgetObjectTypes[ceData.widgetObjectTypes.count()-1].ascii(), "TDEPopupTitle")); const TQColor *use(buttonColors(cg)); TQRect r2(r); @@ -4206,7 +4206,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS { TQWidget *widget(dynamic_cast(p->device())); - if(widget && 0==qstrcmp(ceData.widgetObjectTypes[ceData.widgetObjectTypes.count()-1], "TQViewportWidget") && + if(widget && (ceData.widgetObjectTypes.count() > 0) && 0==qstrcmp(ceData.widgetObjectTypes[ceData.widgetObjectTypes.count()-1], "TQViewportWidget") && widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) && widget->parentWidget()->parentWidget() && ::tqqt_cast(widget->parentWidget()->parentWidget())) { @@ -4654,7 +4654,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty firstTab(0==tabIndex), lastTab((ceData.tabBarData.tabCount-1)==tabIndex), // isFirstKTabCtlTab(firstTab && widget->parent() -// ? 0==qstrcmp("KTabCtl", ceData.parentWidgetData.objectTypes[ceData.widgetObjectTypes.count()-1]) +// ? ((ceData.widgetObjectTypes.count() > 0) && 0==qstrcmp("KTabCtl", ceData.parentWidgetData.objectTypes[ceData.widgetObjectTypes.count()-1])) // : false), active(flags & Style_Selected), itsHover(itsHoverTab && itsHoverTab->isEnabled() && data.tab()==itsHoverTab && -- cgit v1.2.1