sijk / qt5-sqlcipher Goto Github PK
View Code? Open in Web Editor NEWBuild SqlCipher as a Qt 5 plugin
License: Other
Build SqlCipher as a Qt 5 plugin
License: Other
I also tried using the Qt 5.2.1 sources from Qt website and my own SqlCipher plug-in but it does give me the same error. I cannot make it compile on Ubuntu 14.04 64bit. qsql_sqlite.cpp depends on an internal header, but that is not found. It resides in /qtbase/src/sql/kernel/
.
/home/lars/Projects/qt5-sqlcipher/qtbase/src/sql/drivers/sqlite/qsql_sqlite.cpp:51:46: fatal error: QtSql/private/qsqlcachedresult_p.h: No such file or directory
#include <QtSql/private/qsqlcachedresult_p.h>
Full console output:
g++ -c -m64 -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DNDEBUG -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE -DSQLITE_DISABLE_LFS -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/home/lars/Projects/qt5-sqlcipher -I/home/lars/Projects/qt5-sqlcipher/qtbase/src/sql/drivers/sqlite -I/home/lars/Projects/qt5-sqlcipher/build/include -I/usr/include/qt5/QtSql/5.2.1 -I/usr/include/qt5/QtSql/5.2.1/QtSql -I/usr/include/qt5 -I/usr/include/qt5/QtSql -I/usr/include/qt5/QtCore/5.2.1 -I/usr/include/qt5/QtCore/5.2.1/QtCore -I/usr/include/qt5/QtCore -I. -I. -o qsql_sqlite.o /home/lars/Projects/qt5-sqlcipher/qtbase/src/sql/drivers/sqlite/qsql_sqlite.cpp
/home/lars/Projects/qt5-sqlcipher/qtbase/src/sql/drivers/sqlite/qsql_sqlite.cpp:51:46: fatal error: QtSql/private/qsqlcachedresult_p.h: No such file or directory
#include <QtSql/private/qsqlcachedresult_p.h>
^
compilation terminated.
Hello,
I have succeeded in building and loading the plugin into my App.
I am just stuck as to creating a new encrypted database...
Is there a simple example you can give me?
Kind Regards,
Drew
Whenever I try to compile this project qt creator is complaining about a missing top-level .qmake.conf file
What am I doing wrong?
qsql_sqlite.cpp:339:7: error: no matching constructor for initialization of 'QSqlCachedResult' : QSqlCachedResult(db)
first of all: thanks for aswering me on the PR and spending your time for this software ๐
I followed your instruction and made the following steps:
tests will fail.
whe I run ldd against libqsqlcipher.so
i see that it has been linked with sqlite, not sqlcipher.
compiling it in verbose mode I saw that the linker it's executed with -lsqlite
.
running again the linker with -lsqlcipher
will solve the problem and make tests to pass.
I hope that this will help you ๐
CMake output:
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- checking for module 'sqlcipher'
-- found sqlcipher, version 2.2.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nino/Documenti/qt5-sqlcipher/build
thanks for the qsqlcipher plugin. Had to make a few minor tweaks (like use a different copy of private headers). I made a couple of changes to get the tests to compile correctly on Fedora (26/27). Cmake's convention seems to be set (CMAKE_CXX_STANDARD 14) rather than set(CMAKE_CXX_FLAGS "-std=c++14")
I also added the Qt example app sqlwidgetmapper under this project for my own verification of something tangible. Neither of these is a big deal but if you are interested, I can send over a changeset for consideration.
CMake Error at CMakeLists.txt:6 (find_package):
By not providing "FindQt5Sql.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Sql", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Sql" with any
of the following names:
Qt5SqlConfig.cmake
qt5sql-config.cmake
Add the installation prefix of "Qt5Sql" to CMAKE_PREFIX_PATH or set
"Qt5Sql_DIR" to a directory containing one of the above files. If "Qt5Sql"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "<Your Folder>/qt5-sqlcipher-master/CMakeFiles/CMakeOutput.log".
Case-insensitive matching of Unicode characters does not work by default. Please add ICU support
$ wget http://www.sqlite.org/sqlite-amalgamation-XXXXX.tar.gz
$ tar xzfv sqlite*
$ cd sqlite*
$ CFLAGS='-Os -DSQLITE_ENABLE_ICU' CPPFLAGS=icu-config --cppflags
LDFLAGS=icu-config --ldflags
./configure
$ make && sudo make install
Dear sijk,
in my fork I implemented a download feature in CMake that automatically retrieves the correct headers/sources for the locally installed version of Qt5.
This makes building much more convenient (i.e. just do cmake && make).
I dont know whether my other changes are interesting for you, but some parts might be - please do tell me if you would like to merge some!
Cheers and thank you for this nice wrapper :)
Hi,
This sqlcipher plugin for Qt5 is very interesting.
But, because we need the full source code of Qt5 (not only headers), this is difficult to use it in a software that must be packaged in linux distribution.
I opened the following incident on Qt to include it in Qt:
https://bugreports.qt.io/browse/QTBUG-46150
As you can see, Qt team advices me to contact you.
What do you think? Are you ready to contribute to Qt with this really interesting plugin?
I assume that some internals have changed.
I get the following error:
qt-private\qsql_sqlite.cpp(340): error C2664: 'QSqlCachedResult::QSqlCachedResult(const QSqlCachedResult &)': cannot convert argument 1 from 'const QSQLiteDriver *' to 'QSqlCachedResultPrivate &
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.