From 673bdbcf3c0aedd8221c4d30d52449d3260d8594 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Tue, 1 Oct 2024 09:37:17 -0400 Subject: [PATCH] Fix detection regex for yubikey on Windows Something changed in the behavior of regex in Qt that prevents matches using a begin line caret without a complementary end line. --- src/gui/osutils/winutils/DeviceListenerWin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/osutils/winutils/DeviceListenerWin.cpp b/src/gui/osutils/winutils/DeviceListenerWin.cpp index dfd1b610d..408bf9d06 100644 --- a/src/gui/osutils/winutils/DeviceListenerWin.cpp +++ b/src/gui/osutils/winutils/DeviceListenerWin.cpp @@ -56,6 +56,7 @@ void DeviceListenerWin::registerHotplugCallback(bool arrived, regex += QString("PID_%1&").arg(productId, 0, 16).toUpper(); } } + regex += QString(".*$"); // Qt won't match otherwise m_deviceIdMatch = QRegularExpression(regex); DEV_BROADCAST_DEVICEINTERFACE_W notificationFilter{