aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-08-23 14:52:58 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2017-08-23 14:52:58 +0200
commit3810a2bff06a38c9d4098560cd94a17a24031e23 (patch)
treed3f079161dcd3b7a37f3d2a737c6c72f8a49e187 /src
parentAdded URL bar completer (diff)
downloadsmolbote-3810a2bff06a38c9d4098560cd94a17a24031e23.tar.xz
Split address bar off into static library
Diffstat (limited to 'src')
-rw-r--r--src/lib/navigation/navigation.qbs21
-rw-r--r--src/lib/navigation/urllineedit.cpp (renamed from src/widgets/urllineedit.cpp)8
-rw-r--r--src/lib/navigation/urllineedit.h (renamed from src/widgets/urllineedit.h)0
-rw-r--r--src/mainwindow.h2
4 files changed, 26 insertions, 5 deletions
diff --git a/src/lib/navigation/navigation.qbs b/src/lib/navigation/navigation.qbs
new file mode 100644
index 0000000..5f7ba41
--- /dev/null
+++ b/src/lib/navigation/navigation.qbs
@@ -0,0 +1,21 @@
+import qbs 1.0
+
+Project {
+ name: "navigation"
+
+ StaticLibrary {
+ id: navigation
+ name: "navigation"
+
+ Depends {
+ name: "Qt"
+ versionAtLeast: "5.9.0"
+ submodules: ["core", "widgets"]
+ }
+
+ files: [
+ "urllineedit.cpp",
+ "urllineedit.h",
+ ]
+ }
+}
diff --git a/src/widgets/urllineedit.cpp b/src/lib/navigation/urllineedit.cpp
index 871cd53..8083088 100644
--- a/src/widgets/urllineedit.cpp
+++ b/src/lib/navigation/urllineedit.cpp
@@ -24,7 +24,7 @@
#include <QAction>
#include <QStyle>
-#include "browser.h"
+//#include "browser.h"
#include <QWidgetAction>
@@ -135,9 +135,9 @@ void UrlLineEdit::clearTextFormat()
QUrl UrlLineEdit::urlFromUserInput(const QString &input)
{
- if(input.startsWith('#')) {
- return QUrl::fromUserInput(qApp->settings()->value("general.search").toString().replace("$term", input.mid(1)));
- }
+// if(input.startsWith('#')) {
+// return QUrl::fromUserInput(qApp->settings()->value("general.search").toString().replace("$term", input.mid(1)));
+// }
return QUrl::fromUserInput(input);
}
diff --git a/src/widgets/urllineedit.h b/src/lib/navigation/urllineedit.h
index 548000a..548000a 100644
--- a/src/widgets/urllineedit.h
+++ b/src/lib/navigation/urllineedit.h
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 4e0ed3a..12ebb0d 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -23,7 +23,7 @@
#include <QMainWindow>
#include <QToolBar>
-#include "widgets/urllineedit.h"
+#include <navigation/urllineedit.h>
#include <QWebEngineView>
#include "webengine/webengineprofile.h"
#include <QUrl>