shared: SandboxedProcessor: Perform MIME-type detection
Detect mime types, and for text/*, run the default text processor. The added benefit is that we can now add plaintext files without extensions, or many other text files (e. g. source code).
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
#ifndef SANDBOXEDPROCESSOR_H
|
||||
#define SANDBOXEDPROCESSOR_H
|
||||
#include <QString>
|
||||
#include <QMimeDatabase>
|
||||
#include "pagedata.h"
|
||||
|
||||
class SandboxedProcessor
|
||||
{
|
||||
private:
|
||||
QString filePath;
|
||||
QMimeDatabase mimeDatabase;
|
||||
|
||||
void enableSandbox(QString readablePath = "");
|
||||
void printResults(const QVector<PageData> &pageData);
|
||||
|
Reference in New Issue
Block a user