-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
27 lines (20 loc) · 710 Bytes
/
main.cpp
File metadata and controls
27 lines (20 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <QApplication>
#include <QDebug>
#include "biometricauth.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
BiometricAuth auth;
QObject::connect(&auth, &BiometricAuth::authenticationSucceeded, [](){
qDebug() << "Authentication successful!";
QApplication::quit();
});
QObject::connect(&auth, &BiometricAuth::authenticationFailed, [](const QString &error){
qDebug() << "Authentication failed:" << error;
});
QObject::connect(&auth, &BiometricAuth::authenticationCanceled, [](){
qDebug() << "Authentication canceled by user.";
});
auth.authenticate("Authenticate to unlock sensitive data.");
return a.exec();
}