-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
33 lines (25 loc) · 911 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <filesystem>
#include <set>
#include <QApplication>
#include "mainwindow.h"
#include "seconds.h"
auto main(int argc, char *argv[]) -> int
{
QCoreApplication::setOrganizationName("louis-langholtz");
QCoreApplication::setOrganizationDomain("louis-langholtz.github.io");
QCoreApplication::setApplicationName("Time Machine Helper");
const QApplication app(argc, argv);
// Allow some standard library types as QVariant...
qRegisterMetaType<std::filesystem::path>();
qRegisterMetaType<std::filesystem::file_status>();
qRegisterMetaType<std::error_code>();
qRegisterMetaType<std::chrono::seconds>();
qRegisterMetaType<std::set<QString>>();
QMetaType::registerConverter<std::chrono::seconds, QString>(
[](std::chrono::seconds value) {
return toString(value);
});
MainWindow w;
w.show();
return QApplication::exec();
}