diff --git a/client/Diagnostics.cpp b/client/Diagnostics.cpp index 34fa74e31..9f380b8f8 100644 --- a/client/Diagnostics.cpp +++ b/client/Diagnostics.cpp @@ -27,6 +27,12 @@ #include #include +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) +namespace Qt { +using ::hex; +} +#endif + void Diagnostics::generalInfo(QTextStream &s) { s << "" << tr("Arguments:") << " " << Application::arguments().join(' ') << "
" @@ -122,10 +128,10 @@ void Diagnostics::generalInfo(QTextStream &s) { constexpr auto APDU = &QByteArray::fromHex; QPCSCReader::Result r = reader.transfer(apdu); - s << label << ": " << r.SW.toHex(); - if (r.SW == APDU("9000")) s << " (OK)"; - if (r.SW == APDU("6A81")) s << " (Locked)"; - if (r.SW == APDU("6A82")) s << " (Not found)"; + s << label << ": " << Qt::hex << r.SW; + if (r.SW == 0x9000) s << " (OK)"; + if (r.SW == 0x6A81) s << " (Locked)"; + if (r.SW == 0x6A82) s << " (Not found)"; s << "
"; return r; }; diff --git a/client/QSmartCard.cpp b/client/QSmartCard.cpp index a0ec16baa..bb59405a1 100644 --- a/client/QSmartCard.cpp +++ b/client/QSmartCard.cpp @@ -312,7 +312,7 @@ QSmartCard::ErrorType QSmartCard::Private::handlePinResult(QPCSCReader *reader, { if(!response || forceUpdate) card->updateCounters(reader, t.d); - switch((quint8(response.SW[0]) << 8) + quint8(response.SW[1])) + switch(response.SW) { case 0x9000: return QSmartCard::NoError; case 0x63C0: return QSmartCard::BlockedError;//pin retry count 0 diff --git a/common b/common index 8e4034fff..27319130f 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 8e4034fff04708e305d0bc9df8e445d6c3ffc81f +Subproject commit 27319130f517cc085531d59beda5779b5b223b4e