2020-05-23 22:52:42 +02:00
|
|
|
#ifndef COMMON_H
|
|
|
|
#define COMMON_H
|
|
|
|
#include <QCoreApplication>
|
2022-05-30 20:03:40 +02:00
|
|
|
#include <QFileInfo>
|
2022-06-13 19:36:12 +02:00
|
|
|
|
|
|
|
#define SETTINGS_KEY_DBPATH "dbpath"
|
|
|
|
#define SETTINGS_KEY_FIRSTRUN "firstrun"
|
|
|
|
#define SETTINGS_KEY_IPCSOCKETPATH "ipcsocketpath"
|
|
|
|
#define SETTINGS_KEY_PDFVIEWER "pdfviewer"
|
|
|
|
#define SETTINGS_KEY_EXCLUDEDPATHS "excludedpaths"
|
|
|
|
#define SETTINGS_KEY_MOUNTPATHS "mountpaths"
|
|
|
|
#define SETTINGS_KEY_PREVIEWSPERPAGE "previewsPerPage"
|
|
|
|
|
2020-05-23 22:52:42 +02:00
|
|
|
namespace Common
|
|
|
|
{
|
|
|
|
void setupAppInfo();
|
2020-05-24 15:36:27 +02:00
|
|
|
QString databasePath();
|
2022-04-24 12:12:23 +02:00
|
|
|
QString ipcSocketPath();
|
2022-04-25 23:01:05 +02:00
|
|
|
void setPdfViewer();
|
|
|
|
QString findInPath(QString needle);
|
2020-08-24 21:36:45 +02:00
|
|
|
bool initSqliteDatabase(QString path);
|
|
|
|
void ensureConfigured();
|
2022-05-29 15:46:06 +02:00
|
|
|
QStringList excludedPaths();
|
2022-06-05 20:53:37 +02:00
|
|
|
QStringList mountPaths();
|
2022-05-30 20:03:40 +02:00
|
|
|
bool isTextFile(QFileInfo fileInfo);
|
2022-06-05 20:53:37 +02:00
|
|
|
bool isMountPath(QString path);
|
2022-06-06 23:18:58 +02:00
|
|
|
bool noSandboxModeRequested();
|
2022-05-31 18:40:40 +02:00
|
|
|
QString versionText();
|
2020-05-24 15:36:27 +02:00
|
|
|
} // namespace Common
|
2020-05-23 22:52:42 +02:00
|
|
|
#endif
|