aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.hpp
diff options
context:
space:
mode:
authorMike Skec <skec@protonmail.ch>2021-01-06 19:37:26 +1100
committerFelix Queißner <felix@ib-queissner.de>2021-01-06 10:51:18 +0100
commit2a9bb4fa6121de62d9e6ba06d9a109ba6d57f14c (patch)
tree7f2b49ca97071b003697ffeaaa904ce1dfe166d6 /src/mainwindow.hpp
parent24086fdfe92814c38da6d219916ee9d45d8ba581 (diff)
downloadkristall-2a9bb4fa6121de62d9e6ba06d9a109ba6d57f14c.tar.gz
cache code refactor
Diffstat (limited to 'src/mainwindow.hpp')
-rw-r--r--src/mainwindow.hpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/mainwindow.hpp b/src/mainwindow.hpp
index 1868eaf..ae86588 100644
--- a/src/mainwindow.hpp
+++ b/src/mainwindow.hpp
@@ -5,7 +5,6 @@
#include <QLabel>
#include <QSettings>
-
#include "favouritecollection.hpp"
#include "renderers/geminirenderer.hpp"
@@ -21,24 +20,6 @@ class BrowserTab;
enum class UIDensity : int;
-struct CachedPage
-{
- QUrl url;
-
- QByteArray body;
-
- MimeType mime;
-
- int scroll_pos;
-
- // also: maybe compress page contents? May test
- // to see if it's worth it
-
- CachedPage(const QUrl &url, const QByteArray &body, const MimeType &mime)
- : url(url), body(body), mime(mime), scroll_pos(-1)
- {}
-};
-
class MainWindow : public QMainWindow
{
Q_OBJECT
@@ -62,12 +43,6 @@ public:
void mousePressEvent(QMouseEvent *event) override;
- std::shared_ptr<CachedPage> cacheFind(QString const &url);
-
- bool cacheContains(QUrl const & url) const;
-
- void cachePage(QUrl const & url, QByteArray const & body, MimeType const & mime);
-
private slots:
void on_browser_tabs_currentChanged(int index);
@@ -139,8 +114,5 @@ private:
QLabel * file_size;
QLabel * file_mime;
QLabel * load_time;
-
- // This is where we store our current in-memory cache.
- std::unordered_map<QString, std::shared_ptr<CachedPage>> page_cache;
};
#endif // MAINWINDOW_HPP