From 2e385b3d74ffbcad820b36b717f9215cc7b86720 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 23 Mar 2016 13:05:54 +0100 Subject: Windows QPA: Fix regular expression to match CLSIDs in file dialog. Match correct number of digits and entire string, amending change 4347e811611ab15e544765a3a34761d2f5c68cb3. Task-number: QTBUG-33962 Task-number: QTBUG-51373 Change-Id: I56de00bd5ffb3a3a700efbb20970154faf86f923 Reviewed-by: Giuseppe D'Angelo --- src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index ca5b90b429..993dff5129 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -1325,7 +1325,7 @@ void QWindowsNativeFileDialogBase::setLabelText(QFileDialogOptions::DialogLabel static inline bool isClsid(const QString &s) { // detect "374DE290-123F-4565-9164-39C4925E467B". - static const QRegularExpression pattern(QLatin1String("[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{8}")); + static const QRegularExpression pattern(QLatin1String("\\A[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\z")); Q_ASSERT(pattern.isValid()); return pattern.match(s).hasMatch(); } -- cgit v1.2.3