mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
avoid temporaries in QTextHtmlParser::declarationsForNode()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
d7648eb131
commit
62fd2eae04
1 changed files with 2 additions and 7 deletions
|
@ -1840,8 +1840,6 @@ void QTextHtmlParser::importStyleSheet(const QString &href)
|
|||
|
||||
QVector<QCss::Declaration> QTextHtmlParser::declarationsForNode(int node) const
|
||||
{
|
||||
QVector<QCss::Declaration> decls;
|
||||
|
||||
QTextHtmlStyleSelector selector(this);
|
||||
|
||||
int idx = 0;
|
||||
|
@ -1862,12 +1860,9 @@ QVector<QCss::Declaration> QTextHtmlParser::declarationsForNode(int node) const
|
|||
QCss::StyleSelector::NodePtr n;
|
||||
n.id = node;
|
||||
|
||||
const char *extraPseudo = 0;
|
||||
if (nodes.at(node).id == Html_a && nodes.at(node).hasHref)
|
||||
extraPseudo = "link";
|
||||
decls = selector.declarationsForNode(n, extraPseudo);
|
||||
|
||||
return decls;
|
||||
return selector.declarationsForNode(n, "link");
|
||||
return selector.declarationsForNode(n, 0);
|
||||
}
|
||||
|
||||
bool QTextHtmlParser::nodeIsChildOf(int i, QTextHTMLElements id) const
|
||||
|
|
Loading…
Add table
Reference in a new issue