diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2020-06-26 23:53:47 +0200 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2020-06-26 23:53:47 +0200 |
| commit | a2d567a95e388e946cae8b0a5e30a7428f12eba4 (patch) | |
| tree | 75338838a6803574a51b59bdde3f6adec631211f | |
| parent | d725accd2bc2c6d9e9a749f8758c6a287a81c9b1 (diff) | |
| download | kristall-a2d567a95e388e946cae8b0a5e30a7428f12eba4.tar.gz | |
Adds favourite completions in the toolbar. This was waaaay easier than planned.
| -rw-r--r-- | BUILDING.md | 4 | ||||
| -rw-r--r-- | ROADMAP.md | 3 | ||||
| -rw-r--r-- | src/widgets/searchbar.cpp | 8 |
3 files changed, 13 insertions, 2 deletions
diff --git a/BUILDING.md b/BUILDING.md index c74ca9a..0341059 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -27,6 +27,10 @@ make #### Notes on FreeBSD - Kristall can't be used with LibreSSL, but requires OpenSSL (probably because of Qt) +- Required packages + - `qt5` +<tiwesdaeg> xq: I just built kristall on a new freebsd install. +<tiwesdaeg> all I needed to do was install the git and qt5 packages #### Notes for Ubuntu Supported Versions: 18.04, 20.04 @@ -8,6 +8,7 @@ This document contains TODO items for planned Kristall releases as well as some - [x] Fix all tab-indices - [ ] Provide text search function - [ ] auto-highlighting/following outline + - [ ] Implement support for snail-case anchors - [ ] Add maximum text width option - [ ] Remember scroll position for navigating back - [ ] Improved favourites @@ -32,7 +33,7 @@ This document contains TODO items for planned Kristall releases as well as some - [ ] Opt-In: Regularly check for `domain/favicon.txt` - [ ] Opt-In: Regularly check for `domain/favicon.ico` - [ ] Smart searchbar - - [ ] Allow quick access to favourites + - [x] Allow quick access to favourites - [ ] Allow scrolling through "global" history - [ ] Allow users to gather a list of "visited pages" - [ ] Make default protocol configurable diff --git a/src/widgets/searchbar.cpp b/src/widgets/searchbar.cpp index 4d8ea3a..a89b8d6 100644 --- a/src/widgets/searchbar.cpp +++ b/src/widgets/searchbar.cpp @@ -1,10 +1,16 @@ #include "searchbar.hpp" +#include "kristall.hpp" #include <QKeyEvent> +#include <QCompleter> SearchBar::SearchBar(QWidget *parent) : QLineEdit(parent) { - + QCompleter *completer = new QCompleter(this); + completer->setModel(&global_favourites); + completer->setCaseSensitivity(Qt::CaseInsensitive); + completer->setCompletionRole(Qt::DisplayRole); + this->setCompleter(completer); } void SearchBar::keyPressEvent(QKeyEvent *event) |
