aboutsummaryrefslogtreecommitdiff
path: root/sb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sb.cpp')
-rw-r--r--sb.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/sb.cpp b/sb.cpp
index 01993c8..11a91f9 100644
--- a/sb.cpp
+++ b/sb.cpp
@@ -19,7 +19,7 @@
#include <QShortcut>
#include <QVBoxLayout>
-
+#include "webengine.hpp"
bool is_valid_url(const std::string & url);
void open_url(const std::string & url);
@@ -44,29 +44,6 @@ QWebEngineView * web;
QMainWindow * view;
Display * dpy;
-class WebEnginePage: public QWebEnginePage {
-Q_OBJECT
-public:
- WebEnginePage(QWebEngineProfile *profile) : QWebEnginePage(profile) {};
- virtual ~WebEnginePage() = default;
-
-protected:
- QWebEnginePage *createWindow(WebWindowType){
- WebEnginePage *page = new WebEnginePage(this->profile());
- connect(page, &QWebEnginePage::urlChanged, this, &WebEnginePage::onUrlChanged);
- return page;
- }
-
-private:
- void onUrlChanged(const QUrl & url){
- if(WebEnginePage *page = qobject_cast<WebEnginePage *>(sender())){
- setUrl(url);
- page->deleteLater();
- }
- }
-};
-
-#include "webengine.hpp"
std::string read_from_dmenu() {
std::string output;