aboutsummaryrefslogtreecommitdiff
path: root/src/filehandler.cpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-06-22 21:10:04 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-06-22 21:10:04 +0200
commit75ec461eeaa851cb5c53f4cfffc434e3e529ed1d (patch)
tree3944737340718ca3675381aa06636045d397e780 /src/filehandler.cpp
parent8dbfb0890560fd1cd698d06fa05ac868c4db8576 (diff)
downloadkristall-75ec461eeaa851cb5c53f4cfffc434e3e529ed1d.tar.gz
Restructures the project source and cleans up a bit
Diffstat (limited to 'src/filehandler.cpp')
-rw-r--r--src/filehandler.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/filehandler.cpp b/src/filehandler.cpp
deleted file mode 100644
index d26cd57..0000000
--- a/src/filehandler.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "filehandler.hpp"
-
-#include <QMimeDatabase>
-#include <QUrl>
-#include <QFile>
-
-FileHandler::FileHandler()
-{
-
-}
-
-bool FileHandler::supportsScheme(const QString &scheme) const
-{
- return (scheme == "file");
-}
-
-bool FileHandler::startRequest(const QUrl &url, RequestOptions options)
-{
- Q_UNUSED(options)
-
- QFile file { url.path() };
-
- if (file.open(QFile::ReadOnly))
- {
- QMimeDatabase db;
- auto mime = db.mimeTypeForUrl(url).name();
- auto data = file.readAll();
- emit this->requestComplete(data, mime);
- }
- else
- {
- emit this->networkError(ResourceNotFound, "The requested file does not exist!");
- }
- return true;
-}
-
-bool FileHandler::isInProgress() const
-{
- return false;
-}
-
-bool FileHandler::cancelRequest()
-{
- return true;
-}