https://bugs.kde.org/show_bug.cgi?id=499255

--- Comment #4 from Alexandre <alexandre...@gmail.com> ---
A little additional debugging. Running with this debug added:
        const QVariant dataItem = idx.data(filterRole());
        bool rc = false;
        if (dataItem.canConvert<QVariantList>()) {
            QSequentialIterable vList = dataItem.value<QSequentialIterable>();
            for (const auto& v : vList) {
                qDebug() << "Processing filterRole " << v.toString();
                rc |= d->filterIds.contains(v.toString());
                qDebug() << "Result filterRole " << rc;
            }
        } else {
            const auto id = idx.data(filterRole()).toString();
            qDebug() << "Processing filterRole " << id;
            rc = d->filterIds.contains(id);
            qDebug() << "Result filterRole " << rc;
        }

Produces:
-----------------------------------------------
Processing filterRole  "A"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "1"
Result filterRole  false
Processing filterRole  "A"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "1"
Result filterRole  false
Processing filterRole  ""
Result filterRole  false
Processing filterRole  ""
Result filterRole  false
Processing filterRole  "A"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "1"
Result filterRole  false
Processing filterRole  "A"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "0"
Result filterRole  false
Processing filterRole  "1"
Result filterRole  false
----------------------------------------------

commenting the lines and running again:
       const QVariant dataItem = idx.data(filterRole());
        bool rc = false;
        //if (dataItem.canConvert<QVariantList>()) {
        //    QSequentialIterable vList =
dataItem.value<QSequentialIterable>();
        //    for (const auto& v : vList) {
        //      qDebug() << "Processing filterRole " << v.toString();
        //        rc |= d->filterIds.contains(v.toString());
        //      qDebug() << "Result filterRole " << rc;
        //    }
        //} else {
            const auto id = idx.data(filterRole()).toString();
            qDebug() << "Processing filterRole " << id;
            rc = d->filterIds.contains(id);
            qDebug() << "Result filterRole " << rc;
        //}
Produces:
-----------------------------------------------
Processing filterRole  "A000001"
Result filterRole  true
Processing filterRole  "A000001"
Result filterRole  true
Processing filterRole  ""
Result filterRole  false
Processing filterRole  "A000001"
Result filterRole  true
Processing filterRole  "A000001"
Result filterRole  true
Processing filterRole  ""
Result filterRole  false
----------------------------------------------

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to