quotient-im / libQuotient

A Qt library to write cross-platform clients for Matrix
https://quotient-im.github.io/libQuotient/
GNU Lesser General Public License v2.1
129 stars 56 forks source link

Database is inconsistent about QString and QByteArray, causing a high risk of bugs #773

Open TobiasFella opened 1 month ago

TobiasFella commented 1 month ago

When storing keys in the database, libQuotient sometimes uses QByteArray and sometimes QString, depending on the type the variable has in the C++ code. When trying to load a key that was stored as a byte array as a string (or vice-versa), the result is empty, leading to unexpected and very difficult to figure out bugs.

A future database migration should

KitsuneRal commented 1 month ago

Yeah, I guess this would be the best way out, the savings from using QByteArray in this context are tiny if exist at all.