forked from ShuriZma/suyu
1
0
Fork 0

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,
std::function<void()> unpack_romfs_callback,
std::function<void()> finished_callback) {
std::function<void()> finished_callback) const {
LOG_INFO(Service_AM,
"(STUBBED) called - No suitable web browser implementation found to open website page "
"at '{}'!",

View File

@ -14,7 +14,7 @@ public:
virtual ~WebBrowserApplet();
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 {
@ -22,7 +22,7 @@ public:
~DefaultWebBrowserApplet() override;
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

View File

@ -88,7 +88,7 @@ QtWebBrowser::QtWebBrowser(GMainWindow& main_window) {
QtWebBrowser::~QtWebBrowser() = default;
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->finished_callback = std::move(finished_callback);

View File

@ -38,7 +38,7 @@ public:
~QtWebBrowser() override;
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:
void MainWindowOpenPage(std::string_view filename, std::string_view additional_args) const;
@ -47,6 +47,6 @@ private:
void MainWindowUnpackRomFS();
void MainWindowFinishedBrowsing();
std::function<void()> unpack_romfs_callback;
std::function<void()> finished_callback;
mutable std::function<void()> unpack_romfs_callback;
mutable std::function<void()> finished_callback;
};