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

--- Comment #6 from caulier.gil...@gmail.com ---
I see the problem. In 5.5.0 version the imagequerybuilder.cpp line 1142 is this
one :

    else if (name == QLatin1String("videoaudiobitrate"))
    {
        //fieldQuery.addIntField("VideoMetadata.audioBitRate");
        QList<int> values = reader.valueToIntList();

        if (values.size() != 2)
        {
            qCWarning(DIGIKAM_DATABASE_LOG) << "Relation Interval requires a
list of two values";
        }

        sql += QString::fromUtf8(" ( CAST(VideoMetadata.audioBitRate AS
INTEGER)");
        ImageQueryBuilder::addSqlRelation(sql,
                                          relation == SearchXml::Interval ?
SearchXml::GreaterThanOrEqual : SearchXml::GreaterThan);
        sql += QString::fromUtf8(" ? AND CAST(VideoMetadata.audioBitRate AS
INTEGER)");
        ImageQueryBuilder::addSqlRelation(sql,
                                          relation == SearchXml::Interval ?
SearchXml::LessThanOrEqual : SearchXml::LessThan);
        sql += QString::fromUtf8(" ?) ");

        *boundValues << values.first() << values.last(); <<<<<<<<<<<<<<<<<<<!!!
    }

In this source code, there are plenty of QList<> << v.first() << v.last()
operation. if v list is empty, due to the queries to encapsulate to XML, Qt
generate an exception and application crash.

So everywhere in this code, when this kind of operation is done, we need a
check to see if v list is empty or not.

Gilles Caulier

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to