diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-10-18 16:57:29 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-10-18 16:57:29 +0000 |
| commit | 1ad567e8ed964a39b2b90e5b740536c8861589ca (patch) | |
| tree | 33f70b78650d981a989cbf8a695f7a755c5585e1 /src/qmmpui/radioitemdelegate.cpp | |
| parent | a239ae1c9e0b49f911959d0c4066f35f242b4d8e (diff) | |
| download | qmmp-1ad567e8ed964a39b2b90e5b740536c8861589ca.tar.gz qmmp-1ad567e8ed964a39b2b90e5b740536c8861589ca.tar.bz2 qmmp-1ad567e8ed964a39b2b90e5b740536c8861589ca.zip | |
replaced deprecated code
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8393 90c681e8-e032-0410-971d-27865f9a5e38
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); } |
