| 32 | #include <QtSql/QSqlRecord> |
| 33 | |
| 34 | ScreenshotManager::ScreenshotManager(QObject *parent) : QObject(parent), mHistoryInitialized(false) |
| 35 | { |
| 36 | if (QFile::exists(qApp->applicationDirPath() + QDir::separator() + "config.ini")) { |
| 37 | mSettings = new QSettings(qApp->applicationDirPath() + QDir::separator() + "config.ini", QSettings::IniFormat, this); |
| 38 | mPortableMode = true; |
| 39 | mHistoryPath = qApp->applicationDirPath() + QDir::separator(); |
| 40 | } else { |
| 41 | mSettings = new QSettings(this); |
| 42 | mPortableMode = false; |
| 43 | mHistoryPath = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QDir::separator(); |
| 44 | } |
| 45 | |
| 46 | connect(Uploader::instance(), &Uploader::done, this, &ScreenshotManager::uploadDone); |
| 47 | } |
| 48 | |
| 49 | void ScreenshotManager::initHistory() |
| 50 | { |
nothing calls this directly
no outgoing calls
no test coverage detected