mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
drop SQLiteCpp dependency
This commit is contained in:
parent
6c2dc8c4ac
commit
dfcc131ce2
9 changed files with 24 additions and 18 deletions
|
|
@ -5,7 +5,7 @@
|
|||
using namespace app;
|
||||
|
||||
Browser::Browser(
|
||||
SQLite::Database & db,
|
||||
sqlite3 * db,
|
||||
const Glib::RefPtr<Gtk::Application> & APP
|
||||
) {
|
||||
// Init window actions
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include <gtkmm/application.h>
|
||||
#include <gtkmm/applicationwindow.h>
|
||||
#include <gtkmm/object.h>
|
||||
#include <SQLiteCpp/SQLiteCpp.h>
|
||||
#include <sqlite3.h>
|
||||
|
||||
namespace lib
|
||||
{
|
||||
|
|
@ -35,7 +35,7 @@ namespace app
|
|||
public:
|
||||
|
||||
Browser(
|
||||
SQLite::Database & db,
|
||||
sqlite3 * db,
|
||||
const Glib::RefPtr<Gtk::Application> & APP
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
using namespace app::browser;
|
||||
|
||||
Main::Main(
|
||||
SQLite::Database & db,
|
||||
sqlite3 * db,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__REFRESH,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__MAIN_TAB_CLOSE_ACTIVE,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__MAIN_TAB_CLOSE_ALL,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include <glibmm/ustring.h>
|
||||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/object.h>
|
||||
#include <SQLiteCpp/SQLiteCpp.h>
|
||||
#include <sqlite3.h>
|
||||
|
||||
namespace app::browser
|
||||
{
|
||||
|
|
@ -27,7 +27,7 @@ namespace app::browser
|
|||
public:
|
||||
|
||||
Main(
|
||||
SQLite::Database & db,
|
||||
sqlite3 * db,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__REFRESH,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__MAIN_TAB_CLOSE_ACTIVE,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__MAIN_TAB_CLOSE_ALL,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
using namespace app::browser::main;
|
||||
|
||||
Tab::Tab(
|
||||
SQLite::Database & db,
|
||||
sqlite3 * db,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__REFRESH,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__TAB_CLOSE_ACTIVE,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__MAIN_TAB_CLOSE_ALL,
|
||||
|
|
@ -14,7 +14,10 @@ Tab::Tab(
|
|||
const Glib::RefPtr<Gio::SimpleAction> & 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
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <glibmm/refptr.h>
|
||||
#include <glibmm/ustring.h>
|
||||
#include <gtkmm/notebook.h>
|
||||
#include <SQLiteCpp/SQLiteCpp.h>
|
||||
#include <sqlite3.h>
|
||||
|
||||
namespace app::browser::main
|
||||
{
|
||||
|
|
@ -42,7 +42,7 @@ namespace app::browser::main
|
|||
public:
|
||||
|
||||
Tab(
|
||||
SQLite::Database & db,
|
||||
sqlite3 * db,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__REFRESH,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__TAB_CLOSE_ACTIVE,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__MAIN_TAB_CLOSE_ALL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue