summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/styles/qcommonstyle.cpp72
1 files changed, 37 insertions, 35 deletions
diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp
index 17d94e4d5..5cb1699df 100644
--- a/src/styles/qcommonstyle.cpp
+++ b/src/styles/qcommonstyle.cpp
@@ -468,41 +468,43 @@ const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWi
ceData.tabBarData.identIndexMap[currentTab->identifier()] = tb->indexOf(currentTab->identifier());
}
}
- updateObjectTypeListIfNeeded(tb->parent());
- if ((const_cast<TQObject*>(tb->parent())->controlElementDataPrivateObject())->isTQTabWidget) {
- const TQTabWidget *tw = static_cast<const TQTabWidget*>(tb->parent());
- TQWidget *cw;
- cw = tw->cornerWidget(TQt::TopLeft);
- if (cw) {
- updateObjectTypeListIfNeeded(cw);
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].widgetObjectTypes = (const_cast<TQWidget*>(cw)->controlElementDataObject())->widgetObjectTypes;
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].geometry = cw->geometry();
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].rect = cw->rect();
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].pos = cw->pos();
- }
- cw = tw->cornerWidget(TQt::TopRight);
- if (cw) {
- updateObjectTypeListIfNeeded(cw);
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].widgetObjectTypes = (const_cast<TQWidget*>(cw)->controlElementDataObject())->widgetObjectTypes;
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].geometry = cw->geometry();
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].rect = cw->rect();
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].pos = cw->pos();
- }
- cw = tw->cornerWidget(TQt::BottomLeft);
- if (cw) {
- updateObjectTypeListIfNeeded(cw);
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].widgetObjectTypes = (const_cast<TQWidget*>(cw)->controlElementDataObject())->widgetObjectTypes;
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].geometry = cw->geometry();
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].rect = cw->rect();
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].pos = cw->pos();
- }
- cw = tw->cornerWidget(TQt::BottomRight);
- if (cw) {
- updateObjectTypeListIfNeeded(cw);
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].widgetObjectTypes = (const_cast<TQWidget*>(cw)->controlElementDataObject())->widgetObjectTypes;
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].geometry = cw->geometry();
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].rect = cw->rect();
- ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].pos = cw->pos();
+ if ( tb->parent() ) {
+ updateObjectTypeListIfNeeded(tb->parent());
+ if ((const_cast<TQObject*>(tb->parent())->controlElementDataPrivateObject())->isTQTabWidget) {
+ const TQTabWidget *tw = static_cast<const TQTabWidget*>(tb->parent());
+ TQWidget *cw;
+ cw = tw->cornerWidget(TQt::TopLeft);
+ if (cw) {
+ updateObjectTypeListIfNeeded(cw);
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].widgetObjectTypes = (const_cast<TQWidget*>(cw)->controlElementDataObject())->widgetObjectTypes;
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].geometry = cw->geometry();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].rect = cw->rect();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].pos = cw->pos();
+ }
+ cw = tw->cornerWidget(TQt::TopRight);
+ if (cw) {
+ updateObjectTypeListIfNeeded(cw);
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].widgetObjectTypes = (const_cast<TQWidget*>(cw)->controlElementDataObject())->widgetObjectTypes;
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].geometry = cw->geometry();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].rect = cw->rect();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].pos = cw->pos();
+ }
+ cw = tw->cornerWidget(TQt::BottomLeft);
+ if (cw) {
+ updateObjectTypeListIfNeeded(cw);
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].widgetObjectTypes = (const_cast<TQWidget*>(cw)->controlElementDataObject())->widgetObjectTypes;
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].geometry = cw->geometry();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].rect = cw->rect();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].pos = cw->pos();
+ }
+ cw = tw->cornerWidget(TQt::BottomRight);
+ if (cw) {
+ updateObjectTypeListIfNeeded(cw);
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].widgetObjectTypes = (const_cast<TQWidget*>(cw)->controlElementDataObject())->widgetObjectTypes;
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].geometry = cw->geometry();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].rect = cw->rect();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].pos = cw->pos();
+ }
}
}
}