2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

web_browser: Make OpenPage const

This commit is contained in:
Zach Hilman 2019-03-11 19:34:23 -04:00
parent ec0bc3061e
commit f7540157e4
4 changed files with 7 additions and 7 deletions

View file

@ -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 '{}'!",

View file

@ -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

View file

@ -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);

View file

@ -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;
}; };