Skip to content

Commit

Permalink
add delete for cred in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-debbech committed Sep 21, 2020
1 parent 80e77f9 commit 663bd0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mutak/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ QJsonObject MainWindow:: getFromEndPoint(const QUrl &q){

connect(reply, &QNetworkReply::finished, [&root, reply, this]() { //this is a lambda fun
if (reply->error() != QNetworkReply::NoError) {
::CredDeleteA("Mutak for Spotify 1", CRED_TYPE_GENERIC, 0);
::CredDeleteA("Mutak for Spotify 2", CRED_TYPE_GENERIC, 0);
QByteArray data = reply->readAll();
qDebug() <<"THIS IS ERROR: " << data;
QMessageBox::critical(nullptr, QObject::tr("Error"),
Expand Down

0 comments on commit 663bd0e

Please sign in to comment.