mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-19 06:53:06 +00:00
web_browser: Make OpenPage const
This commit is contained in:
parent
ec0bc3061e
commit
f7540157e4
4 changed files with 7 additions and 7 deletions
|
@ -13,7 +13,7 @@ DefaultWebBrowserApplet::~DefaultWebBrowserApplet() = default;
|
||||||
|
|
||||||
void DefaultWebBrowserApplet::OpenPage(std::string_view filename,
|
void DefaultWebBrowserApplet::OpenPage(std::string_view filename,
|
||||||
std::function<void()> unpack_romfs_callback,
|
std::function<void()> unpack_romfs_callback,
|
||||||
std::function<void()> finished_callback) {
|
std::function<void()> finished_callback) const {
|
||||||
LOG_INFO(Service_AM,
|
LOG_INFO(Service_AM,
|
||||||
"(STUBBED) called - No suitable web browser implementation found to open website page "
|
"(STUBBED) called - No suitable web browser implementation found to open website page "
|
||||||
"at '{}'!",
|
"at '{}'!",
|
||||||
|
|
|
@ -14,7 +14,7 @@ public:
|
||||||
virtual ~WebBrowserApplet();
|
virtual ~WebBrowserApplet();
|
||||||
|
|
||||||
virtual void OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
virtual void OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
||||||
std::function<void()> finished_callback) = 0;
|
std::function<void()> finished_callback) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DefaultWebBrowserApplet final : public WebBrowserApplet {
|
class DefaultWebBrowserApplet final : public WebBrowserApplet {
|
||||||
|
@ -22,7 +22,7 @@ public:
|
||||||
~DefaultWebBrowserApplet() override;
|
~DefaultWebBrowserApplet() override;
|
||||||
|
|
||||||
void OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
void OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
||||||
std::function<void()> finished_callback) override;
|
std::function<void()> finished_callback) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Core::Frontend
|
} // namespace Core::Frontend
|
||||||
|
|
|
@ -88,7 +88,7 @@ QtWebBrowser::QtWebBrowser(GMainWindow& main_window) {
|
||||||
QtWebBrowser::~QtWebBrowser() = default;
|
QtWebBrowser::~QtWebBrowser() = default;
|
||||||
|
|
||||||
void QtWebBrowser::OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
void QtWebBrowser::OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
||||||
std::function<void()> finished_callback) {
|
std::function<void()> finished_callback) const {
|
||||||
this->unpack_romfs_callback = std::move(unpack_romfs_callback);
|
this->unpack_romfs_callback = std::move(unpack_romfs_callback);
|
||||||
this->finished_callback = std::move(finished_callback);
|
this->finished_callback = std::move(finished_callback);
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
~QtWebBrowser() override;
|
~QtWebBrowser() override;
|
||||||
|
|
||||||
void OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
void OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
|
||||||
std::function<void()> finished_callback) override;
|
std::function<void()> finished_callback) const override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void MainWindowOpenPage(std::string_view filename, std::string_view additional_args) const;
|
void MainWindowOpenPage(std::string_view filename, std::string_view additional_args) const;
|
||||||
|
@ -47,6 +47,6 @@ private:
|
||||||
void MainWindowUnpackRomFS();
|
void MainWindowUnpackRomFS();
|
||||||
void MainWindowFinishedBrowsing();
|
void MainWindowFinishedBrowsing();
|
||||||
|
|
||||||
std::function<void()> unpack_romfs_callback;
|
mutable std::function<void()> unpack_romfs_callback;
|
||||||
std::function<void()> finished_callback;
|
mutable std::function<void()> finished_callback;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue