diff --git a/src/common/Credentials.cpp b/src/common/Credentials.cpp index 6cb7c35c1..16efc4484 100644 --- a/src/common/Credentials.cpp +++ b/src/common/Credentials.cpp @@ -8,7 +8,7 @@ #include "util/Overloaded.hpp" #include -#include +#include #define FORMAT_NAME \ ([&] { \ @@ -87,7 +87,7 @@ namespace { QString name; }; - using Job = std::variant; + using Job = boost::variant; static std::queue &jobQueue() { @@ -104,9 +104,10 @@ namespace { // we were gonna use std::visit here but macos is shit auto &&item = queue.front(); - if (item.index() == 0) // set job + + if (item.which() == 0) // set job { - auto set = std::get(item); + auto set = boost::get(item); auto job = new QKeychain::WritePasswordJob("chatterino"); job->setAutoDelete(true); job->setKey(set.name); @@ -117,7 +118,7 @@ namespace { } else // erase job { - auto erase = std::get(item); + auto erase = boost::get(item); auto job = new QKeychain::DeletePasswordJob("chatterino"); job->setAutoDelete(true); job->setKey(erase.name); @@ -125,6 +126,7 @@ namespace { [](auto) { runNextJob(); }); job->start(); } + queue.pop(); } } @@ -191,7 +193,6 @@ void Credentials::set(const QString &provider, const QString &name_, if (useKeyring()) { - qDebug() << "queue set"; queueJob(SetJob{name, credential}); } else @@ -212,7 +213,6 @@ void Credentials::erase(const QString &provider, const QString &name_) if (useKeyring()) { - qDebug() << "queue erase"; queueJob(EraseJob{name}); } else