devbean / QtCipherSqlitePlugin

A Qt plugin for cipher SQLite.
http://qtciphersqliteplugin.galaxyworld.org
GNU Lesser General Public License v2.1
392 stars 159 forks source link

Can't compile on MacOS/iOS with Qt 6.5.1 #52

Open alexandrkirilov opened 1 year ago

alexandrkirilov commented 1 year ago

There issues when compiling it with 6.5.1

Screen Shot 2023-05-29 at 13 11 59 Screen Shot 2023-05-29 at 13 13 14
mxrcode commented 1 year ago

It also doesn't work for me on 6.5 (windows), I use 6.4.3 to compile.

realericzh commented 11 months ago

Just follow this:

Q_DECLARE_OPAQUE_POINTER(sqlite3*)
Q_DECLARE_METATYPE(sqlite3*)

Q_DECLARE_OPAQUE_POINTER(sqlite3_stmt*)
Q_DECLARE_METATYPE(sqlite3_stmt*)
alexandrkirilov commented 11 months ago

Why? It's already in code in sqlitecipher.cpp `Q_DECLARE_METATYPE(sqlite3) Q_DECLARE_METATYPE(sqlite3_stmt)

if (QT_VERSION >= 0x050000)

Q_DECLARE_OPAQUE_POINTER(sqlite3) Q_DECLARE_OPAQUE_POINTER(sqlite3_stmt)

endif`

alexandrkirilov commented 11 months ago
Screen Shot 2023-11-26 at 11 49 39
realericzh commented 11 months ago

just because the source of this plugin was origin from qt4/qt5 qsqliteplugin,in qt6,it looks like you should declare opaque pointer before delcare metatype,that is the key point,sorry for my poor english😂