forked from sandsmark/selectdefaultapplication
-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.cpp
29 lines (23 loc) · 813 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
#include "selectdefaultapplication.h"
#include <QApplication>
#include <QCommandLineParser>
int main(int argc, char *argv[])
{
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication a(argc, argv);
a.setApplicationVersion("2.0");
a.setApplicationDisplayName("Select Default Application");
QCommandLineParser parser;
parser.setApplicationDescription(
"A very simple application that lets you define default applications on Linux in a sane way.");
parser.addHelpOption();
parser.addVersionOption();
QCommandLineOption verbose(QStringList() << "V"
<< "verbose",
"Print verbose information about how the desktop files are parsed");
parser.addOption(verbose);
parser.process(a);
SelectDefaultApplication w(nullptr, parser.isSet(verbose));
w.show();
return a.exec();
}