-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Highlight feature for WidgetGroup #1068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a169ac0
80dba57
21861de
eef17ad
9b7ac9a
fb98db3
a3b86ce
4aa9d9a
05488db
cd58c7d
b811d38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -610,25 +610,19 @@ QWidget* LegacySkinParser::parseSplitter(const QDomElement& node) { | |
| return pSplitter; | ||
| } | ||
|
|
||
| QWidget* LegacySkinParser::parseWidgetGroup(const QDomElement& node) { | ||
| WWidgetGroup* pGroup = new WWidgetGroup(m_pParent); | ||
| commonWidgetSetup(node, pGroup); | ||
| pGroup->setup(node, *m_pContext); | ||
| pGroup->Init(); | ||
|
|
||
| void LegacySkinParser::parseChildren( | ||
| const QDomElement& node, | ||
| WWidgetGroup* pGroup) { | ||
| QDomNode childrenNode = m_pContext->selectNode(node, "Children"); | ||
|
|
||
| QWidget* pOldParent = m_pParent; | ||
| m_pParent = pGroup; | ||
|
|
||
| if (!childrenNode.isNull()) { | ||
| // Descend children | ||
| QDomNodeList children = childrenNode.childNodes(); | ||
| for (int i = 0; i < children.count(); ++i) { | ||
| QDomNode node = children.at(i); | ||
| if (node.isElement()) { | ||
| QList<QWidget*> children = parseNode(node.toElement()); | ||
|
|
||
| foreach (QWidget* pChild, children) { | ||
| if (pChild == NULL) { | ||
| continue; | ||
|
|
@@ -639,6 +633,14 @@ QWidget* LegacySkinParser::parseWidgetGroup(const QDomElement& node) { | |
| } | ||
| } | ||
| m_pParent = pOldParent; | ||
| } | ||
|
|
||
| QWidget* LegacySkinParser::parseWidgetGroup(const QDomElement& node) { | ||
| WWidgetGroup* pGroup = new WWidgetGroup(m_pParent); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why don't you use
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We must not mix smart pointers with the Qt object tree, which manages the widget lifetime just right. This widget is added to the object tree here: Some time ago we have tested the object tree performance versus smart pointer solutions.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks I didn't know about that |
||
| commonWidgetSetup(node, pGroup); | ||
| pGroup->setup(node, *m_pContext); | ||
| pGroup->Init(); | ||
| parseChildren(node, pGroup); | ||
| return pGroup; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the whole
<Connection>element if it isn't doing anything.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is prepared to take the new CO once your work is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, okay. LGTM then as long as it's documented on the wiki. 👍