uppercase const names

This commit is contained in:
yggverse 2024-08-27 14:20:47 +03:00
parent c75744f777
commit 8ad13b2aa2
6 changed files with 28 additions and 28 deletions

View File

@ -31,10 +31,10 @@ Tab::~Tab() = default;
// Getters // Getters
Glib::ustring Tab::get_label_text( Glib::ustring Tab::get_label_text(
const int & page_number const int & PAGE_NUMBER
) { ) {
auto pageWidget = get_nth_page( auto pageWidget = get_nth_page(
page_number PAGE_NUMBER
); );
if (pageWidget != nullptr) if (pageWidget != nullptr)
@ -79,10 +79,10 @@ void Tab::append(
}; };
void Tab::close( void Tab::close(
const int & page_number const int & PAGE_NUMBER
) { ) {
remove_page( remove_page(
page_number PAGE_NUMBER
); );
// @TODO memory cleanup // @TODO memory cleanup
@ -106,10 +106,10 @@ void Tab::close_all()
} }
void Tab::update( void Tab::update(
const int & page_number const int & PAGE_NUMBER
) { ) {
auto pageWidget = get_nth_page( auto pageWidget = get_nth_page(
page_number PAGE_NUMBER
); );
if (pageWidget != nullptr) if (pageWidget != nullptr)
@ -122,10 +122,10 @@ void Tab::update(
} // @TODO } // @TODO
void Tab::refresh( void Tab::refresh(
const int & page_number const int & PAGE_NUMBER
) { ) {
auto pageWidget = get_nth_page( auto pageWidget = get_nth_page(
page_number PAGE_NUMBER
); );
if (pageWidget == nullptr) if (pageWidget == nullptr)

View File

@ -19,7 +19,7 @@ namespace app::browser::main
~Tab(); ~Tab();
Glib::ustring get_label_text( Glib::ustring get_label_text(
const int & page_number const int & PAGE_NUMBER
); );
void append( void append(
@ -29,7 +29,7 @@ namespace app::browser::main
); );
void close( void close(
const int & page_number const int & PAGE_NUMBER
); );
void close_left(); void close_left();
@ -37,11 +37,11 @@ namespace app::browser::main
void close_all(); void close_all();
void refresh( void refresh(
const int & page_number const int & PAGE_NUMBER
); );
void update( void update(
const int & page_number const int & PAGE_NUMBER
); );
}; };
} }

View File

@ -8,7 +8,7 @@
using namespace app::browser::main::tab::page; using namespace app::browser::main::tab::page;
Navbar::Navbar( Navbar::Navbar(
const Glib::ustring & request_text const Glib::ustring & REQUEST
) { ) {
// Init container // Init container
set_orientation( set_orientation(
@ -55,7 +55,7 @@ Navbar::Navbar(
); );
navbarRequest = new navbar::Request( navbarRequest = new navbar::Request(
request_text REQUEST
); );
append( append(
@ -111,10 +111,10 @@ void Navbar::refresh()
// Setters // Setters
void Navbar::set_request_text( void Navbar::set_request_text(
const Glib::ustring & value const Glib::ustring & TEXT
) { ) {
navbarRequest->set_text( navbarRequest->set_text(
value TEXT
); );
// refresh(); not wanted as on change listener do same @TODO // refresh(); not wanted as on change listener do same @TODO

View File

@ -32,7 +32,7 @@ namespace app::browser::main::tab::page
public: public:
Navbar( Navbar(
const Glib::ustring & request_text = "" const Glib::ustring & REQUEST = ""
); );
~Navbar(); ~Navbar();
@ -42,7 +42,7 @@ namespace app::browser::main::tab::page
// Setters // Setters
void set_request_text( void set_request_text(
const Glib::ustring & value const Glib::ustring & TEXT
); );
// Getters // Getters

View File

@ -4,7 +4,7 @@ using namespace app::browser::main::tab::page::navbar;
// Construct // Construct
Request::Request( Request::Request(
const Glib::ustring & text const Glib::ustring & TEXT
) { ) {
// Init entry // Init entry
set_placeholder_text( set_placeholder_text(
@ -15,10 +15,10 @@ Request::Request(
HEXPAND HEXPAND
); );
if (!text.empty()) if (!TEXT.empty())
{ {
set_text( set_text(
text TEXT
); );
parse(); parse();
@ -92,15 +92,15 @@ void Request::parse()
int index = 0; int index = 0;
for (const Glib::ustring & value : match) for (const Glib::ustring & VALUE : match)
{ {
switch (index) switch (index)
{ {
case 2: scheme = value; break; case 2: scheme = VALUE; break;
case 3: host = value; break; case 3: host = VALUE; break;
case 5: port = value; break; case 5: port = VALUE; break;
case 6: path = value; break; case 6: path = VALUE; break;
case 8: query = value; break; case 8: query = VALUE; break;
} }
index++; index++;

View File

@ -23,7 +23,7 @@ namespace app::browser::main::tab::page::navbar
public: public:
Request( Request(
const Glib::ustring & text = "" const Glib::ustring & VALUE = ""
); );
~Request(); ~Request();