Skip to content

Commit cd8d216

Browse files
authored
Don't show timeout message on PIN change cancel (#1300)
IB-7963 Signed-off-by: Raul Metsma <[email protected]>
1 parent e322ed3 commit cd8d216

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,13 @@ jobs:
185185
arch: x64
186186
- name: Install WiX
187187
run: |
188-
dotnet tool install -g wix --version 5.0.0
189-
wix extension -g add WixToolset.UI.wixext/5.0.0
188+
dotnet tool install -g wix --version 5.0.2
189+
wix extension -g add WixToolset.UI.wixext/5.0.2
190190
- name: Build
191191
run: |
192+
if ($env:VCToolsRedistDir -eq $null) {
193+
$env:VCToolsRedistDir = -join ($env:VCINSTALLDIR, "Redist\MSVC\", $env:VCToolsVersion, "\")
194+
}
192195
cmake "-GNinja" -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo `
193196
-DCMAKE_TOOLCHAIN_FILE=${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake `
194197
"-DLibDigiDocpp_ROOT=libs/PFiles64/libdigidocpp"

client/MainWindow_MyEID.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ bool MainWindow::validateCardError(QSmartCardData::PinType type, QSmartCardData:
9595
switch( err )
9696
{
9797
case QSmartCard::NoError: return true;
98-
case QSmartCard::CancelError:
98+
case QSmartCard::CancelError: break;
99+
case QSmartCard::TimeoutError:
99100
FadeInNotification::warning(ui->topBar, tr("%1 timeout").arg(QSmartCardData::typeString(type)));
100101
break;
101102
case QSmartCard::BlockedError:

client/QSmartCard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ QSmartCard::ErrorType QSmartCard::Private::handlePinResult(QPCSCReader *reader,
319319
case 0x63C1: // Validate error, 1 tries left
320320
case 0x63C2: // Validate error, 2 tries left
321321
case 0x63C3: return QSmartCard::ValidateError;
322-
case 0x6400: // Timeout (SCM)
322+
case 0x6400: return QSmartCard::TimeoutError; // Timeout (SCM)
323323
case 0x6401: return QSmartCard::CancelError; // Cancel (OK, SCM)
324324
case 0x6402: return QSmartCard::DifferentError;
325325
case 0x6403: return QSmartCard::LenghtError;

client/QSmartCard.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class QSmartCardData
4242
DocumentId = 7,
4343
Expiry = 8,
4444
};
45-
enum PinType : char
45+
enum PinType : quint8
4646
{
4747
Pin1Type = 1,
4848
Pin2Type,
@@ -89,6 +89,7 @@ class QSmartCard final: public QObject
8989
NoError,
9090
UnknownError,
9191
BlockedError,
92+
TimeoutError,
9293
CancelError,
9394
DifferentError,
9495
LenghtError,

0 commit comments

Comments
 (0)