Baloo

file/extractor/main.cpp
1/*
2 This file is part of the Nepomuk KDE project.
3 SPDX-FileCopyrightText: 2010-14 Vishesh Handa <handa.vish@gmail.com>
4 SPDX-FileCopyrightText: 2010-2011 Sebastian Trueg <trueg@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#include "app.h"
10#include "../priority.h"
11
12#include <KCrash>
13#include <KAboutData>
14#include <KLocalizedString>
15#include <QStandardPaths>
16
17#include <QGuiApplication>
18#include <QSessionManager>
19
20int main(int argc, char* argv[])
21{
22 lowerIOPriority();
23 setIdleSchedulingPriority();
24 lowerPriority();
25
27 QGuiApplication app(argc, argv);
28
29 KAboutData aboutData(QStringLiteral("baloo"), i18n("Baloo File Extractor"), QLatin1String(PROJECT_VERSION));
31
33
34 app.setQuitOnLastWindowClosed(false);
35
36 auto disableSessionManagement = [](QSessionManager &sm) {
37 sm.setRestartHint(QSessionManager::RestartNever);
38 };
39 QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
40 QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
41
42 Baloo::App appObject;
43 return app.exec();
44}
static void setApplicationData(const KAboutData &aboutData)
QString i18n(const char *text, const TYPE &arg...)
KCRASH_EXPORT void initialize()
void commitDataRequest(QSessionManager &manager)
void saveStateRequest(QSessionManager &manager)
void setDesktopSettingsAware(bool on)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.