Commit b2b97bad authored by Topi Reiniö's avatar Topi Reiniö Committed by Qt by Nokia
Browse files

Qt XML Patterns File System Example: Do not bind to a null node index


Adds a check for validity of the file node index before running an
XQuery.

In evaluateResult(), QXmlQuery binds to a QXmlNodeModelIndex variable
without checking if it's valid. This causes an assert to trigger if
the default directory that the example tries to open does not exist.
In this case, m_fileNode has the default (null) value when
evaluateResult() is invoked on QComboBox::currentIndexChanged()
signal.

Task-number: QTBUG-26081
Change-Id: I03c39939b57fcf658527ce3110fdc30d204de520
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
parent 0c1be711
Showing with 1 addition and 1 deletion
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment