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
Glib::ustring Tab::get_label_text(
const int & page_number
const int & PAGE_NUMBER
) {
auto pageWidget = get_nth_page(
page_number
PAGE_NUMBER
);
if (pageWidget != nullptr)
@ -79,10 +79,10 @@ void Tab::append(
};
void Tab::close(
const int & page_number
const int & PAGE_NUMBER
) {
remove_page(
page_number
PAGE_NUMBER
);
// @TODO memory cleanup
@ -106,10 +106,10 @@ void Tab::close_all()
}
void Tab::update(
const int & page_number
const int & PAGE_NUMBER
) {
auto pageWidget = get_nth_page(
page_number
PAGE_NUMBER
);
if (pageWidget != nullptr)
@ -122,10 +122,10 @@ void Tab::update(
} // @TODO
void Tab::refresh(
const int & page_number
const int & PAGE_NUMBER
) {
auto pageWidget = get_nth_page(
page_number
PAGE_NUMBER
);
if (pageWidget == nullptr)

View File

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

View File

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

View File

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

View File

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

View File

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