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

--- Comment #1 from Tom Max <tmass...@gmail.com> ---
Probably found from where these strange valgrind notes are coming from, qt
regular expression:

==114405== Conditional jump or move depends on uninitialised value(s)
==114405==    at 0x486AC39: ???
==114405==    by 0x7A648C7: ???
==114405== 


file PageDataObject.cpp, function 
QVariant converted(const QVariant &variant, QMetaType::Type type),

this line:
            auto match = boolTrueExpression.match(variant.toString());

I have reproduced the problem with this example:

========8<=======
#include <QRegularExpression>
#include <QDebug>

int main(int argc, char *argv[])
{
    const QString qs("section-0");
    const QVariant variant (qs);

    static const QRegularExpression
boolTrueExpression(QStringLiteral("^[yY][eE][sS]|[tT][rR][uU][eE]$"));
    qDebug() << __FILE__ << __LINE__;
    auto match = boolTrueExpression.match(variant.toString());
    qDebug() << __FILE__ << __LINE__;
    if (!match.hasMatch()) {
        qDebug() << __FILE__ << __LINE__;
        return 0;//QVariant{};
    }
}
========8<=======

running it I can see:
tom1@tom-neon:~/projects/test_regexp/build$ valgrind ./test_regexp
==114405== Memcheck, a memory error detector
==114405== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==114405== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==114405== Command: ./test_regexp
==114405== 
/home/tom1/projects/test_regexp/src/main.cpp 10
==114405== Conditional jump or move depends on uninitialised value(s)
==114405==    at 0x486AC39: ???
==114405==    by 0x7A648C7: ???
==114405== 
/home/tom1/projects/test_regexp/src/main.cpp 12
/home/tom1/projects/test_regexp/src/main.cpp 14
==114


NB: I have built the example with qt5, as Kdevelop is not configured for qt6
(or I'm unable to use it) on the neon machine.
Can somebody test this code with qt6 or pass me a link to configure KDevelop
for qt6?

thanks

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

Reply via email to