summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsdialoghelpers.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
index e1b0d36922..a237013c87 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
@@ -1319,7 +1319,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();
}
@@ -2161,6 +2161,7 @@ namespace QWindowsDialogs {
// QWindowsDialogHelperBase creation functions
bool useHelper(QPlatformTheme::DialogType type)
{
+#if !defined(_WIN32_WCE) || _WIN32_WCE < 0x800
if (QWindowsIntegration::instance()->options() & QWindowsIntegration::NoNativeDialogs)
return false;
switch (type) {
@@ -2179,10 +2180,14 @@ bool useHelper(QPlatformTheme::DialogType type)
break;
}
return false;
+#else
+ return false;
+#endif // !defined(_WIN32_WCE) || _WIN32_WCE < 0x800
}
QPlatformDialogHelper *createHelper(QPlatformTheme::DialogType type)
{
+#if !defined(_WIN32_WCE) || _WIN32_WCE < 0x800
if (QWindowsIntegration::instance()->options() & QWindowsIntegration::NoNativeDialogs)
return 0;
switch (type) {
@@ -2206,6 +2211,9 @@ QPlatformDialogHelper *createHelper(QPlatformTheme::DialogType type)
break;
}
return 0;
+#else
+ return 0;
+#endif // !defined(_WIN32_WCE) || _WIN32_WCE < 0x800
}
} // namespace QWindowsDialogs