libQuotient icon indicating copy to clipboard operation
libQuotient copied to clipboard

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

Open TobiasFella opened this issue 7 months ago • 1 comments

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

  • Migrate all existing keys from byte arrays to strings
  • Change all existing code to read and write strings
  • Ideally also adjust API to make sure that we keep keys as strings as much as possible

TobiasFella avatar Jul 15 '24 14:07 TobiasFella