summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-05-11 12:39:09 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-05-11 12:39:09 +0200
commit5e2b0aa1b344bc93af29d7977aa7e497bfc7a9cf (patch)
treec478b00d1c04166f3c1c163971edb4575b065b13 /src/widgets/dialogs
parentd1622207ba501b93bd83b88d61a5631d3d0da0cc (diff)
parentfda40e37df1152b5a8c572fe4bc53620bfcbcc45 (diff)
Merge remote branch 'staging/master' into refactor
Conflicts: src/gui/painting/qdrawhelper_p.h src/gui/painting/qgraphicssystemfactory.cpp src/gui/painting/qpainter.cpp src/gui/painting/qunifiedtoolbarsurface_mac.cpp src/gui/painting/qunifiedtoolbarsurface_mac_p.h src/openvg/openvg.pro src/openvg/qpaintengine_vg.cpp src/openvg/qwindowsurface_vg.cpp src/openvg/qwindowsurface_vgegl.cpp src/plugins/platforms/wayland/qwaylanddisplay.cpp src/widgets/graphicsview/qgraphicsscene.cpp
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qcolordialog_mac.mm5
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp12
2 files changed, 12 insertions, 5 deletions
diff --git a/src/widgets/dialogs/qcolordialog_mac.mm b/src/widgets/dialogs/qcolordialog_mac.mm
index ee9b19ad99..9daf595a9b 100644
--- a/src/widgets/dialogs/qcolordialog_mac.mm
+++ b/src/widgets/dialogs/qcolordialog_mac.mm
@@ -343,6 +343,7 @@ QT_USE_NAMESPACE
mDialogIsExecuting = true;
bool modalEnded = false;
while (!modalEnded) {
+#ifndef QT_NO_EXCEPTIONS
@try {
[NSApp runModalForWindow:mColorPanel];
modalEnded = true;
@@ -351,6 +352,10 @@ QT_USE_NAMESPACE
// clicking on 'SelectedMenuItemColor' from the 'Developer'
// palette (tab three).
}
+#else
+ [NSApp runModalForWindow:mColorPanel];
+ modalEnded = true;
+#endif
}
QAbstractEventDispatcher::instance()->interrupt();
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index cb8eb6ad66..ff4410db97 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -1977,13 +1977,14 @@ bool QFileSystemModelPrivate::filtersAcceptsNode(const QFileSystemNode *node) co
const bool hideHidden = !(filters & QDir::Hidden);
const bool hideSystem = !(filters & QDir::System);
const bool hideSymlinks = (filters & QDir::NoSymLinks);
- const bool hideDotAndDotDot = (filters & QDir::NoDotAndDotDot);
+ const bool hideDot = (filters & QDir::NoDot) || (filters & QDir::NoDotAndDotDot); // ### Qt5: simplify (because NoDotAndDotDot=NoDot|NoDotDot)
+ const bool hideDotDot = (filters & QDir::NoDotDot) || (filters & QDir::NoDotAndDotDot); // ### Qt5: simplify (because NoDotAndDotDot=NoDot|NoDotDot)
// Note that we match the behavior of entryList and not QFileInfo on this and this
// incompatibility won't be fixed until Qt 5 at least
- bool isDotOrDot = ( (node->fileName == QLatin1String(".")
- || node->fileName == QLatin1String("..")));
- if ( (hideHidden && (!isDotOrDot && node->isHidden()))
+ bool isDot = (node->fileName == QLatin1String("."));
+ bool isDotDot = (node->fileName == QLatin1String(".."));
+ if ( (hideHidden && !(isDot || isDotDot) && node->isHidden())
|| (hideSystem && node->isSystem())
|| (hideDirs && node->isDir())
|| (hideFiles && node->isFile())
@@ -1991,7 +1992,8 @@ bool QFileSystemModelPrivate::filtersAcceptsNode(const QFileSystemNode *node) co
|| (hideReadable && node->isReadable())
|| (hideWritable && node->isWritable())
|| (hideExecutable && node->isExecutable())
- || (hideDotAndDotDot && isDotOrDot))
+ || (hideDot && isDot)
+ || (hideDotDot && isDotDot))
return false;
return nameFilterDisables || passNameFilters(node);