main.cpp 510 B

1234567891011121314151617181920212223242526272829
  1. #include "setup.h"
  2. #include "unlock.h"
  3. #include <QApplication>
  4. #include <QJsonDocument>
  5. #include <QJsonObject>
  6. #include <QFile>
  7. int main(int argc, char *argv[]) {
  8. QApplication a(argc, argv);
  9. QString homeDirectory = getenv("HOME");
  10. if (QFile::exists(homeDirectory + "/.config/fake-gnome-keyring/config.json")) {
  11. Unlock* u = new Unlock;
  12. u->show();
  13. a.exec();
  14. u->quit();
  15. }
  16. else {
  17. Setup* s = new Setup;
  18. s->show();
  19. a.exec();
  20. }
  21. }