Library for managing partitions. Common code for KDE Partition Manager and other projects. https://www.kde.org/applications/system/kdepartitionmanager/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.7KB

  1. /*************************************************************************
  2. * Copyright 2017 by Adriaan de Groot <groot@kde.org> *
  3. * *
  4. * This program is free software; you can redistribute it and/or *
  5. * modify it under the terms of the GNU General Public License as *
  6. * published by the Free Software Foundation; either version 3 of *
  7. * the License, or (at your option) any later version. *
  8. * *
  9. * This program is distributed in the hope that it will be useful, *
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  12. * GNU General Public License for more details. *
  13. * *
  14. * You should have received a copy of the GNU General Public License *
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.*
  16. *************************************************************************/
  17. // SPDX-License-Identifier: GPL-3.0+
  18. // Initializes KPMcore, and either loads the default backend for
  19. // the current platform, or if one is named on the command line,
  20. // loads that one. Returns 0 on success.
  21. #include <QCoreApplication>
  22. #include "helpers.h"
  23. int main( int argc, char** argv )
  24. {
  25. QCoreApplication app(argc, argv);
  26. if ( argc != 2 ) {
  27. KPMCoreInitializer i;
  28. return i.isValid() ? 0 : 1;
  29. } else {
  30. KPMCoreInitializer i( argv[1] );
  31. return i.isValid() ? 0 : 1;
  32. }
  33. }