diff --git a/README.md b/README.md index 94d15b1..10c905e 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,7 @@ apt install git\ libglibmm-2.68-dev\ libgtkmm-4.0-dev\ libpangomm-2.48-dev\ - libsqlite3-dev\ - libsqlitecpp-dev + libsqlite3-dev ``` * `git clone https://github.com/YGGverse/Yoda.git` @@ -68,5 +67,4 @@ pkg-config --cflags --libs gio-2.0\ * [GTK](https://gtk.org) - free and open-source cross-platform widget toolkit * [gtkmm](https://gtkmm.org) - official C++ interface for GTK -* [SQLite](https://sqlite.org) - profile database - * [SQLiteCpp](https://github.com/SRombauts/SQLiteCpp) - SQLite3 C++ wrapper \ No newline at end of file +* [SQLite](https://sqlite.org) - profile database \ No newline at end of file diff --git a/src/app.cpp b/src/app.cpp index 26284d1..bb2a26f 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -6,9 +6,11 @@ int main( char * argv[] ) { // Init database - SQLite::Database db( + sqlite3 * db; + + sqlite3_open( "database.sqlite3", - SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE + &db ); // Init application diff --git a/src/app.hpp b/src/app.hpp index 7d28e39..7343f3e 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -1,6 +1,6 @@ #include #include -#include +#include int main( int argc, diff --git a/src/app/browser.cpp b/src/app/browser.cpp index 673833b..6afeec0 100644 --- a/src/app/browser.cpp +++ b/src/app/browser.cpp @@ -5,7 +5,7 @@ using namespace app; Browser::Browser( - SQLite::Database & db, + sqlite3 * db, const Glib::RefPtr & APP ) { // Init window actions diff --git a/src/app/browser.hpp b/src/app/browser.hpp index 33c3cfa..547644c 100644 --- a/src/app/browser.hpp +++ b/src/app/browser.hpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include namespace lib { @@ -35,7 +35,7 @@ namespace app public: Browser( - SQLite::Database & db, + sqlite3 * db, const Glib::RefPtr & APP ); }; diff --git a/src/app/browser/main.cpp b/src/app/browser/main.cpp index e7b8696..017ea07 100644 --- a/src/app/browser/main.cpp +++ b/src/app/browser/main.cpp @@ -4,7 +4,7 @@ using namespace app::browser; Main::Main( - SQLite::Database & db, + sqlite3 * db, const Glib::RefPtr & ACTION__REFRESH, const Glib::RefPtr & ACTION__MAIN_TAB_CLOSE_ACTIVE, const Glib::RefPtr & ACTION__MAIN_TAB_CLOSE_ALL, diff --git a/src/app/browser/main.hpp b/src/app/browser/main.hpp index d5b1530..a9e7e8c 100644 --- a/src/app/browser/main.hpp +++ b/src/app/browser/main.hpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include namespace app::browser { @@ -27,7 +27,7 @@ namespace app::browser public: Main( - SQLite::Database & db, + sqlite3 * db, const Glib::RefPtr & ACTION__REFRESH, const Glib::RefPtr & ACTION__MAIN_TAB_CLOSE_ACTIVE, const Glib::RefPtr & ACTION__MAIN_TAB_CLOSE_ALL, diff --git a/src/app/browser/main/tab.cpp b/src/app/browser/main/tab.cpp index 627e171..153c7be 100644 --- a/src/app/browser/main/tab.cpp +++ b/src/app/browser/main/tab.cpp @@ -5,7 +5,7 @@ using namespace app::browser::main; Tab::Tab( - SQLite::Database & db, + sqlite3 * db, const Glib::RefPtr & ACTION__REFRESH, const Glib::RefPtr & ACTION__TAB_CLOSE_ACTIVE, const Glib::RefPtr & ACTION__MAIN_TAB_CLOSE_ALL, @@ -14,7 +14,10 @@ Tab::Tab( const Glib::RefPtr & ACTION__TAB_PAGE_NAVIGATION_UPDATE ) { // Init database - db.exec( + char * errmsg; + + ::sqlite3_exec( + db, R"SQL( CREATE TABLE IF NOT EXISTS `app_browser_main_tab` ( @@ -22,7 +25,10 @@ Tab::Tab( `time` INTEGER NOT NULL, `request` VARCHAR(1024) ) - )SQL" + )SQL", + nullptr, + nullptr, + &errmsg ); // Init actions diff --git a/src/app/browser/main/tab.hpp b/src/app/browser/main/tab.hpp index e1f013a..bbcdcbe 100644 --- a/src/app/browser/main/tab.hpp +++ b/src/app/browser/main/tab.hpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include namespace app::browser::main { @@ -42,7 +42,7 @@ namespace app::browser::main public: Tab( - SQLite::Database & db, + sqlite3 * db, const Glib::RefPtr & ACTION__REFRESH, const Glib::RefPtr & ACTION__TAB_CLOSE_ACTIVE, const Glib::RefPtr & ACTION__MAIN_TAB_CLOSE_ALL,