update values reset construction

This commit is contained in:
yggverse 2024-09-14 07:22:51 +03:00
parent 90c9c36ebf
commit 9f0245e5ff
2 changed files with 11 additions and 13 deletions

View File

@ -148,20 +148,18 @@ int Request::save(
void Request::parse() // @TODO https://docs.gtk.org/glib/struct.Uri.html
{
scheme.clear();
host.clear();
port.clear();
path.clear();
query.clear();
auto match = Glib::Regex::split_simple(
R"regex(^((\w+)?:\/\/)?([^:\/]+)?(:(\d+)?)?([^\?$]+)?(\?(.*)?)?)regex",
get_text()
);
scheme = "";
host = "";
port = "";
path = "";
query = "";
int index = 0;
for (const Glib::ustring & VALUE : match)
int index = 0; for (const Glib::ustring & VALUE : match)
{
switch (index)
{

View File

@ -67,10 +67,10 @@ namespace app::browser::main::tab::page::navigation
double progress_fraction;
Glib::ustring scheme,
host,
port,
path,
query;
host,
port,
path,
query;
// Defaults
const bool HEXPAND = true;