SecretService 0.13.2d47dfe
SecretService is base back end library for your c++ Qt projects.
main.cpp
Go to the documentation of this file.
1//#
2//# Copyright (C) 2024-2024 QuasarApp.
3//# Distributed under the GPLv3 software license, see the accompanying
4//# Everyone is permitted to copy and distribute verbatim copies
5//# of this license document, but changing it is not allowed.
6//#
7
8#include "params.h"
9#include <QASecret.h>
10#include <QCoreApplication>
11#include <QTimer>
12#include <QASecret/keystorage.h>
13
14
15int main(int argc, char * argv[]) {
16
17 QCoreApplication app(argc, argv);
19
20 auto service = QASecret::KeyStorage::instance();
21
22 QTimer::singleShot(0, nullptr, [service]() {
23 auto hash = service->add("val");
24 auto val = service->get(hash);
25
26 if (val == "val") {
27 QuasarAppUtils::Params::log("All is fine!", QuasarAppUtils::Info);
28 }
29
30 QCoreApplication::quit();
31 });
32
33
34 return app.exec();
35}
int main(int argc, char *argv[])
Definition main.cpp:15
bool init()
init main initialize method of The SecretService library
Definition QASecret.cpp:15