From 1ad567e8ed964a39b2b90e5b740536c8861589ca Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Thu, 18 Oct 2018 16:57:29 +0000 Subject: replaced deprecated code git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8393 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/radioitemdelegate.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/qmmpui/radioitemdelegate.cpp') 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); } -- cgit v1.2.3-13-gbd6f