From 2e441060df9ddf855f23e6771bf79073bada00b9 Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 11 Sep 2024 00:03:48 +0300 Subject: [PATCH] remove extra ns --- src/app/browser/main/tab.cpp | 22 +++++++++++----------- src/app/browser/main/tab/page.cpp | 14 +++++++------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/app/browser/main/tab.cpp b/src/app/browser/main/tab.cpp index 680a561f..6b4ab667 100644 --- a/src/app/browser/main/tab.cpp +++ b/src/app/browser/main/tab.cpp @@ -53,7 +53,7 @@ int Tab::restore() { sqlite3_stmt* statement; // @TODO move to the DB model namespace - const int PREPARE_STATUS = ::sqlite3_prepare_v3( + const int PREPARE_STATUS = sqlite3_prepare_v3( db, R"SQL( SELECT * FROM `app_browser_main_tab__session` ORDER BY `page_number` ASC @@ -72,12 +72,12 @@ int Tab::restore() { const int PAGE_NUMBER = append( reinterpret_cast( - ::sqlite3_column_text( + sqlite3_column_text( statement, DB::APP_BROWSER_MAIN_TAB__SESSION::LABEL_TEXT ) ), - ::sqlite3_column_int( + sqlite3_column_int( statement, DB::APP_BROWSER_MAIN_TAB__SESSION::IS_CURRENT ) == 1 @@ -85,7 +85,7 @@ int Tab::restore() } } - ::sqlite3_finalize( + sqlite3_finalize( statement ); @@ -338,7 +338,7 @@ int Tab::DB::init( ) { char * error; - return ::sqlite3_exec( + return sqlite3_exec( db, R"SQL( CREATE TABLE IF NOT EXISTS `app_browser_main_tab__session` @@ -362,7 +362,7 @@ int Tab::DB::clear( char * error; // @TODO sqlite3_stmt * statement; - const int PREPARE_STATUS = ::sqlite3_prepare_v3( + const int PREPARE_STATUS = sqlite3_prepare_v3( db, R"SQL( SELECT * FROM `app_browser_main_tab__session` @@ -377,13 +377,13 @@ int Tab::DB::clear( { while (::sqlite3_step(statement) == SQLITE_ROW) { - const int APP_BROWSER_MAIN_TAB__SESSION_ID = ::sqlite3_column_int( + const int APP_BROWSER_MAIN_TAB__SESSION_ID = sqlite3_column_int( statement, DB::APP_BROWSER_MAIN_TAB__SESSION::ID ); // Delete record - ::sqlite3_exec( + sqlite3_exec( db, Glib::ustring::sprintf( R"SQL( @@ -404,7 +404,7 @@ int Tab::DB::clear( } } - return ::sqlite3_finalize( + return sqlite3_finalize( statement ); } @@ -417,7 +417,7 @@ sqlite3_int64 Tab::DB::add( ) { char * error; // @TODO - ::sqlite3_exec( + sqlite3_exec( db, Glib::ustring::sprintf( R"SQL( @@ -442,7 +442,7 @@ sqlite3_int64 Tab::DB::add( &error ); - return ::sqlite3_last_insert_rowid( + return sqlite3_last_insert_rowid( db ); } \ No newline at end of file diff --git a/src/app/browser/main/tab/page.cpp b/src/app/browser/main/tab/page.cpp index b946d2e9..5fa2b9c2 100644 --- a/src/app/browser/main/tab/page.cpp +++ b/src/app/browser/main/tab/page.cpp @@ -369,7 +369,7 @@ int Page::DB::init( ) { char * error; - return ::sqlite3_exec( + return sqlite3_exec( db, R"SQL( CREATE TABLE IF NOT EXISTS `app_browser_main_tab_page__session` @@ -394,7 +394,7 @@ int Page::DB::clear( char * error; // @TODO sqlite3_stmt * statement; - const int PREPARE_STATUS = ::sqlite3_prepare_v3( + const int PREPARE_STATUS = sqlite3_prepare_v3( db, Glib::ustring::sprintf( R"SQL( @@ -412,7 +412,7 @@ int Page::DB::clear( { while (::sqlite3_step(statement) == SQLITE_ROW) { - const int APP_BROWSER_MAIN_TAB_PAGE__SESSION_ID = ::sqlite3_column_int( + const int APP_BROWSER_MAIN_TAB_PAGE__SESSION_ID = sqlite3_column_int( statement, DB::APP_BROWSER_MAIN_TAB_PAGE__SESSION::ID ); @@ -420,7 +420,7 @@ int Page::DB::clear( // @TODO Delegate cleanup to the child components // Delete record - ::sqlite3_exec( + sqlite3_exec( db, Glib::ustring::sprintf( R"SQL( @@ -435,7 +435,7 @@ int Page::DB::clear( } } - return ::sqlite3_finalize( + return sqlite3_finalize( statement ); } @@ -449,7 +449,7 @@ sqlite3_int64 Page::DB::add( ) { char * error; // @TODO - ::sqlite3_exec( + sqlite3_exec( db, Glib::ustring::sprintf( R"SQL( @@ -477,7 +477,7 @@ sqlite3_int64 Page::DB::add( &error ); - return ::sqlite3_last_insert_rowid( + return sqlite3_last_insert_rowid( db ); } \ No newline at end of file