diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-03-23 13:05:54 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-03-24 21:09:01 +0000 |
commit | 2e385b3d74ffbcad820b36b717f9215cc7b86720 (patch) | |
tree | 137a8c9dbe584c4274daa64b0588884481c4a7e2 /src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | |
parent | 1534297323284c8e5daec36246bc30d968899f2f (diff) |
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 <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsdialoghelpers.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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(); } |