|
|
@ -102,8 +102,8 @@ QtNXWebEngineView::~QtNXWebEngineView() { |
|
|
StopInputThread(); |
|
|
StopInputThread(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void QtNXWebEngineView::LoadLocalWebPage(std::string_view main_url, |
|
|
|
|
|
std::string_view additional_args) { |
|
|
|
|
|
|
|
|
void QtNXWebEngineView::LoadLocalWebPage(const std::string& main_url, |
|
|
|
|
|
const std::string& additional_args) { |
|
|
is_local = true; |
|
|
is_local = true; |
|
|
|
|
|
|
|
|
LoadExtractedFonts(); |
|
|
LoadExtractedFonts(); |
|
|
@ -113,12 +113,12 @@ void QtNXWebEngineView::LoadLocalWebPage(std::string_view main_url, |
|
|
SetLastURL("http://localhost/"); |
|
|
SetLastURL("http://localhost/"); |
|
|
StartInputThread(); |
|
|
StartInputThread(); |
|
|
|
|
|
|
|
|
load(QUrl(QUrl::fromLocalFile(QString::fromStdString(std::string(main_url))).toString() + |
|
|
|
|
|
QString::fromStdString(std::string(additional_args)))); |
|
|
|
|
|
|
|
|
load(QUrl(QUrl::fromLocalFile(QString::fromStdString(main_url)).toString() + |
|
|
|
|
|
QString::fromStdString(additional_args))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void QtNXWebEngineView::LoadExternalWebPage(std::string_view main_url, |
|
|
|
|
|
std::string_view additional_args) { |
|
|
|
|
|
|
|
|
void QtNXWebEngineView::LoadExternalWebPage(const std::string& main_url, |
|
|
|
|
|
const std::string& additional_args) { |
|
|
is_local = false; |
|
|
is_local = false; |
|
|
|
|
|
|
|
|
SetUserAgent(UserAgent::WebApplet); |
|
|
SetUserAgent(UserAgent::WebApplet); |
|
|
@ -127,8 +127,7 @@ void QtNXWebEngineView::LoadExternalWebPage(std::string_view main_url, |
|
|
SetLastURL("http://localhost/"); |
|
|
SetLastURL("http://localhost/"); |
|
|
StartInputThread(); |
|
|
StartInputThread(); |
|
|
|
|
|
|
|
|
load(QUrl(QString::fromStdString(std::string(main_url)) + |
|
|
|
|
|
QString::fromStdString(std::string(additional_args)))); |
|
|
|
|
|
|
|
|
load(QUrl(QString::fromStdString(main_url) + QString::fromStdString(additional_args))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void QtNXWebEngineView::SetUserAgent(UserAgent user_agent) { |
|
|
void QtNXWebEngineView::SetUserAgent(UserAgent user_agent) { |
|
|
@ -375,7 +374,7 @@ QtWebBrowser::QtWebBrowser(GMainWindow& main_window) { |
|
|
QtWebBrowser::~QtWebBrowser() = default; |
|
|
QtWebBrowser::~QtWebBrowser() = default; |
|
|
|
|
|
|
|
|
void QtWebBrowser::OpenLocalWebPage( |
|
|
void QtWebBrowser::OpenLocalWebPage( |
|
|
std::string_view local_url, std::function<void()> extract_romfs_callback_, |
|
|
|
|
|
|
|
|
const std::string& local_url, std::function<void()> extract_romfs_callback_, |
|
|
std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback_) const { |
|
|
std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback_) const { |
|
|
extract_romfs_callback = std::move(extract_romfs_callback_); |
|
|
extract_romfs_callback = std::move(extract_romfs_callback_); |
|
|
callback = std::move(callback_); |
|
|
callback = std::move(callback_); |
|
|
@ -390,7 +389,7 @@ void QtWebBrowser::OpenLocalWebPage( |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void QtWebBrowser::OpenExternalWebPage( |
|
|
void QtWebBrowser::OpenExternalWebPage( |
|
|
std::string_view external_url, |
|
|
|
|
|
|
|
|
const std::string& external_url, |
|
|
std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback_) const { |
|
|
std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback_) const { |
|
|
callback = std::move(callback_); |
|
|
callback = std::move(callback_); |
|
|
|
|
|
|
|
|
|