Re: [Development] QString, QVariant and QSQLite

2021-05-27 Thread Alberto Mardegan
On 27/05/21 11:50, Giuseppe D'Angelo via Development wrote: > In the overwhelming majority of cases, utf16() won't make any > allocation. There's just one exception -- if the QString was built via > fromRawData(). In that case, in order to ensure NUL termination, utf16() > does actually "detach" (e

Re: [Development] QString, QVariant and QSQLite

2021-05-27 Thread Giuseppe D'Angelo via Development
On 26/05/2021 21:39, Alberto Mardegan wrote: Now, I haven't dug very deep in QString and QVariant, I preferred to let the experts talk first :-) Does the code in the QSQLite plugin look correct to you? That depends: when does SQLite exactly stop using the string data passed to it exactly?

Re: [Development] QString, QVariant and QSQLite

2021-05-26 Thread Chris Adams
Hi, On Thu, May 27, 2021 at 7:34 AM Alberto Mardegan < ma...@users.sourceforge.net> wrote: > On 26/05/21 23:31, Christian Ehrlicher wrote: > > Your observation looks correct even though I wonder why this was never > > found before since this was not changed since the initial Qt5 import :) > > Wha

Re: [Development] QString, QVariant and QSQLite

2021-05-26 Thread Alberto Mardegan
On 26/05/21 23:31, Christian Ehrlicher wrote: > Your observation looks correct even though I wonder why this was never > found before since this was not changed since the initial Qt5 import :) > What Qt version do you use? > Please fill a bug report with a minimal, compilable example. I'm using Qt

Re: [Development] QString, QVariant and QSQLite

2021-05-26 Thread Christian Ehrlicher
Am 26.05.2021 um 21:39 schrieb Alberto Mardegan: Hi there! I'm encountering some sort of memory corruption issue in a library I'm using, which does not cause a crash, but rather a QSQLite query to sometimes simply return no results, without errors or warnings. You can find the valgrind trace

Re: [Development] QString, QVariant and QSQLite

2021-05-26 Thread Henry Skoglund
On 2021-05-26 21:39, Alberto Mardegan wrote: Hi there! I'm encountering some sort of memory corruption issue in a library I'm using, which does not cause a crash, but rather a QSQLite query to sometimes simply return no results, without errors or warnings. You can find the valgrind trace here

[Development] QString, QVariant and QSQLite

2021-05-26 Thread Alberto Mardegan
Hi there! I'm encountering some sort of memory corruption issue in a library I'm using, which does not cause a crash, but rather a QSQLite query to sometimes simply return no results, without errors or warnings. You can find the valgrind trace here: https://git.sailfishos.org/mer-core/qtcontacts