File indexing completed on 2024-05-26 09:40:53

0001 /*
0002     SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
0003     SPDX-FileCopyrightText: 2018 Andrius Štikonas <andrius@stikonas.eu>
0004     SPDX-FileCopyrightText: 2019 Shubham Jangra <aryan100jangid@gmail.com>
0005 
0006     SPDX-License-Identifier: GPL-3.0-or-later
0007 */
0008 
0009 // Initializes KPMcore, and either loads the default backend for
0010 // the current platform, or if one is named on the command line,
0011 // loads that one. Returns 0 on success.
0012 
0013 #include <QCoreApplication>
0014 
0015 #include "helpers.h"
0016 
0017 int main( int argc, char** argv )
0018 {
0019     QCoreApplication app(argc, argv);
0020     if ( argc != 2 ) {
0021         KPMCoreInitializer i;
0022         return i.isValid() ? 0 : 1;
0023     } else {
0024         KPMCoreInitializer i( argv[1] );
0025         return i.isValid() ? 0 : 1;
0026     }
0027 }
0028