Compilation fix

This commit is contained in:
Jean-Marc Lasgouttes 2019-03-22 14:39:36 +01:00
parent 36edbffe2f
commit b79a694c56

View File

@ -550,7 +550,12 @@ void GuiLyXFiles::passParams(string const & data)
void GuiLyXFiles::selectItem(QString const item)
{
QList<QTreeWidgetItem *> twi = filesLW->findItems(item, Qt::MatchExactly|Qt::MatchRecursive);
/* Using an intermediary variable flags is needed up to at least
* Qt 5.5 because of a subtle namespace issue. See:
* https://stackoverflow.com/questions/10755058/qflags-enum-type-conversion-fails-all-of-a-sudden
* for details.*/
Qt::MatchFlags const flags(Qt::MatchExactly|Qt::MatchRecursive);
QList<QTreeWidgetItem *> twi = filesLW->findItems(item, flags);
if (!twi.isEmpty())
twi.first()->setSelected(true);
}