-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
55 lines (43 loc) · 1.89 KB
/
main.cpp
File metadata and controls
55 lines (43 loc) · 1.89 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 Reikooters <https://github.com/Reikooters>
#include <QApplication>
#include <KAboutData>
#include "ScannerEngine.h"
#include "PartitionDialog.h"
#include "MainWindow.h"
#include "Version.h"
int main(int argc, char* argv[])
{
for (int i = 1; i < argc; ++i) {
if (std::string_view(argv[i]) == "--version") {
std::cout << "kerything v" << Version::VERSION << std::endl;
return 0;
}
}
QApplication app(argc, argv);
// Make QSettings persistent and predictable.
// (Used for UI preferences like device scope selection.)
QCoreApplication::setOrganizationName(QStringLiteral("Reikooters"));
QCoreApplication::setApplicationName(QStringLiteral("kerything"));
KAboutData aboutData(
QStringLiteral("kerything"),
QStringLiteral("Kerything"),
QString::fromUtf8(Version::VERSION),
QStringLiteral("A fast NTFS and EXT4 file searcher, inspired by the Windows utility \"Everything\" by Voidtools."),
KAboutLicense::GPL_V3,
QStringLiteral("(c) 2026 Reikooters <https://github.com/Reikooters>")
);
aboutData.addAuthor("Reikooters", "Developer", "https://github.com/Reikooters");
aboutData.setBugAddress("https://github.com/Reikooters/kerything/issues");
aboutData.setHomepage("https://github.com/Reikooters/kerything");
// This tells KDE to look for the icon named 'kerything' in the system theme
aboutData.setProgramLogo(QIcon::fromTheme(QStringLiteral("kerything")));
KAboutData::setApplicationData(aboutData);
// This must match the .desktop filename exactly
QApplication::setDesktopFileName(QStringLiteral("net.reikooters.kerything"));
// Set window icon
QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("kerything")));
MainWindow window;
window.show();
return app.exec();
}