refactor: some Application & style things (#5561)

This commit is contained in:
pajlada
2024-08-25 15:33:07 +02:00
committed by GitHub
parent ac88730563
commit 627c735524
41 changed files with 733 additions and 678 deletions
+6 -5
View File
@@ -8,6 +8,7 @@
#include "util/CombinePath.hpp"
#include "util/Variant.hpp"
#include <QApplication>
#include <QJsonDocument>
#include <QJsonObject>
#include <QSaveFile>
@@ -89,7 +90,7 @@ void queueInsecureSave()
if (!isQueued)
{
isQueued = true;
QTimer::singleShot(200, qApp, [] {
QTimer::singleShot(200, QApplication::instance(), [] {
storeInsecure(insecureInstance());
isQueued = false;
});
@@ -133,8 +134,8 @@ void runNextJob()
job->setAutoDelete(true);
job->setKey(set.name);
job->setTextData(set.credential);
QObject::connect(job, &QKeychain::Job::finished, qApp,
[](auto) {
QObject::connect(job, &QKeychain::Job::finished,
QApplication::instance(), [](auto) {
runNextJob();
});
job->start();
@@ -143,8 +144,8 @@ void runNextJob()
auto *job = new QKeychain::DeletePasswordJob("chatterino");
job->setAutoDelete(true);
job->setKey(erase.name);
QObject::connect(job, &QKeychain::Job::finished, qApp,
[](auto) {
QObject::connect(job, &QKeychain::Job::finished,
QApplication::instance(), [](auto) {
runNextJob();
});
job->start();