summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qdialog.cpp2
-rw-r--r--src/widgets/dialogs/qfileinfogatherer.cpp2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp5
3 files changed, 4 insertions, 5 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 362200a4fd..906022a185 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -920,7 +920,7 @@ void QDialog::adjustPosition(QWidget* w)
if (w) {
// Use pos() if the widget is embedded into a native window
QPoint pp;
- if (w->windowHandle() && w->windowHandle()->property("_q_embedded_native_parent_handle").value<WId>())
+ if (w->windowHandle() && qvariant_cast<WId>(w->windowHandle()->property("_q_embedded_native_parent_handle")))
pp = w->pos();
else
pp = w->mapToGlobal(QPoint(0,0));
diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp
index 0beca82f28..7342efbd0d 100644
--- a/src/widgets/dialogs/qfileinfogatherer.cpp
+++ b/src/widgets/dialogs/qfileinfogatherer.cpp
@@ -232,7 +232,7 @@ void QFileInfoGatherer::watchPaths(const QStringList &paths)
void QFileInfoGatherer::unwatchPaths(const QStringList &paths)
{
#if QT_CONFIG(filesystemwatcher)
- if (m_watcher)
+ if (m_watcher && !paths.isEmpty())
m_watcher->removePaths(paths);
#else
Q_UNUSED(paths);
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 914c845565..d658f7fe0c 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -948,9 +948,8 @@ QVariant QFileSystemModel::headerData(int section, Qt::Orientation orientation,
if (section == 0) {
// ### TODO oh man this is ugly and doesn't even work all the way!
// it is still 2 pixels off
- QImage pixmap(16, 1, QImage::Format_Mono);
- pixmap.fill(0);
- pixmap.setAlphaChannel(pixmap.createAlphaMask());
+ QImage pixmap(16, 1, QImage::Format_ARGB32_Premultiplied);
+ pixmap.fill(Qt::transparent);
return pixmap;
}
break;