diff options
Diffstat (limited to 'src/qmmpui/radioitemdelegate.cpp')
| -rw-r--r-- | src/qmmpui/radioitemdelegate.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qmmpui/radioitemdelegate.cpp b/src/qmmpui/radioitemdelegate.cpp index 992ba7fe8..2021936e1 100644 --- a/src/qmmpui/radioitemdelegate.cpp +++ b/src/qmmpui/radioitemdelegate.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2012-2016 by Ilya Kotov * + * Copyright (C) 2012-2018 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -102,7 +102,11 @@ bool RadioItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, QModelIndex parentItem = index.parent(); for (int i = 0; i < model->rowCount(parentItem); ++i) { - QModelIndex childIndex = parentItem.child(i,0); +#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) + QModelIndex childIndex = model->index(i, 0, parentItem); +#else + QModelIndex childIndex = parentItem.child(i, 0); +#endif if (childIndex != index) model->setData(childIndex, Qt::Unchecked, Qt::CheckStateRole); } |
