diff --git a/src/corelib/io/qfilesystemengine_p.h b/src/corelib/io/qfilesystemengine_p.h
index 555483a972..c6f7a360d3 100644
--- a/src/corelib/io/qfilesystemengine_p.h
+++ b/src/corelib/io/qfilesystemengine_p.h
@@ -56,6 +56,8 @@
 #include "qfilesystemmetadata_p.h"
 #include <QtCore/private/qsystemerror_p.h>
 
+#include <iosfwd>
+
 QT_BEGIN_NAMESPACE
 
 #define Q_RETURN_ON_INVALID_FILENAME(message, result) \
@@ -179,6 +181,8 @@ private:
 #endif
 };
 
+std::wostream &operator<<(std::wostream &str, const QString &s);
+
 QT_END_NAMESPACE
 
 #endif // include guard
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 6ad123f3b6..acb2bd26aa 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -68,6 +68,7 @@
 #include <initguid.h>
 #include <ctype.h>
 #include <limits.h>
+#include <iostream>
 #ifndef Q_OS_WINRT
 #  define SECURITY_WIN32
 #  include <security.h>
@@ -167,6 +168,12 @@ static HANDLE currentUserImpersonatedToken = nullptr;
 
 QT_BEGIN_NAMESPACE
 
+std::wostream &operator<<(std::wostream &str, const QString &s)
+{
+  str<< reinterpret_cast<const wchar_t *>(s.utf16());
+  return str;
+}
+
 namespace {
 struct GlobalSid
 {
@@ -600,6 +607,7 @@ QString QFileSystemEngine::nativeAbsoluteFilePath(const QString &path)
     Q_CHECK_FILE_NAME(path, QString());
 
     // can be //server or //server/share
+    std::wcerr << '>' << __FUNCTION__ << ' ' << path <<'\n';
     QString absPath;
     QVarLengthArray<wchar_t, MAX_PATH> buf(qMax(MAX_PATH, path.size() + 1));
     wchar_t *fileName = 0;
@@ -610,6 +618,7 @@ QString QFileSystemEngine::nativeAbsoluteFilePath(const QString &path)
     }
     if (retLen != 0)
         absPath = QString::fromWCharArray(buf.data(), retLen);
+    std::wcerr << '<' << __FUNCTION__ << " returns via GetFullPathName() " << absPath << '\n';
 #  if defined(Q_OS_WINRT)
     // Win32 returns eg C:/ as root directory with a trailing /.
     // WinRT returns the sandbox root without /.
@@ -634,6 +643,9 @@ QString QFileSystemEngine::nativeAbsoluteFilePath(const QString &path)
 //static
 QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
 {
+    std::wcerr << '>' << __FUNCTION__ << " QFileSystemEntry(path=\"" << entry.path()
+                << "\" entry.isRelative()=" << entry.isRelative() << " entry.isAbsolute()="
+                << entry.isAbsolute() << ")\n";
     Q_CHECK_FILE_NAME(entry, entry);
 
     QString ret;
@@ -646,6 +658,7 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
     } else {
         ret = QDir::cleanPath(QDir::currentPath() + QLatin1Char('/') + entry.filePath());
     }
+    std::wcerr << '<' << __FUNCTION__ <<  " returns " << ret << '\n';
 
 #ifndef Q_OS_WINRT
     // The path should be absolute at this point.
diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp
index 3ff90bd0a3..a9a79936c6 100644
--- a/src/corelib/io/qfilesystementry.cpp
+++ b/src/corelib/io/qfilesystementry.cpp
@@ -46,8 +46,13 @@
 #include <QtCore/qstringbuilder.h>
 #endif
 
+#include <iostream>
+
 QT_BEGIN_NAMESPACE
 
+
+std::wostream &operator<<(std::wostream &str, const QString &s);
+
 #ifdef Q_OS_WIN
 static bool isUncRoot(const QString &server)
 {
@@ -151,6 +156,7 @@ void QFileSystemEntry::resolveFilePath() const
 #else
         m_filePath = QDir::fromNativeSeparators(QFile::decodeName(m_nativeFilePath));
 #endif
+        std::wcerr << __FUNCTION__ << ' ' << m_filePath << '\n';
     }
 }
 
@@ -177,6 +183,7 @@ void QFileSystemEntry::resolveNativeFilePath() const
         // of 256 characters in the filename plus the preprending path
         m_nativeFilePath.prepend("\\\\?\\");
 #endif
+        std::wcerr << __FUNCTION__ << ' ' << m_nativeFilePath << '\n';
     }
 }
 
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index c016a622c7..a4b5ef0fee 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -45,6 +45,7 @@
 #include "private/qtemporaryfile_p.h"
 #include "private/qfile_p.h"
 #include "private/qsystemerror_p.h"
+#include <iostream>
 
 #if !defined(Q_OS_WIN)
 #include "private/qcore_unix_p.h"       // overrides QT_OPEN
@@ -77,6 +78,7 @@ typedef int NativeFileHandle;
 
 QTemporaryFileName::QTemporaryFileName(const QString &templateName)
 {
+    std::wcerr  << __FUNCTION__ << ' ' << templateName << '\n';
     // Ensure there is a placeholder mask
     QString qfilename = templateName;
     uint phPos = qfilename.length();
@@ -104,9 +106,12 @@ QTemporaryFileName::QTemporaryFileName(const QString &templateName)
         qfilename.append(QLatin1String(".XXXXXX"));
 
     // "Nativify" :-)
+    std::wcerr  << __FUNCTION__ << " natifying qfilename="
+                << qfilename << '\n';
     QFileSystemEntry::NativePath filename = QFileSystemEngine::absoluteName(
             QFileSystemEntry(qfilename, QFileSystemEntry::FromInternalPath()))
         .nativeFilePath();
+    std::wcerr  << __FUNCTION__ << " natified="<< filename <<  "\n";
 
     // Find mask in native path
     phPos = filename.length();
@@ -132,6 +137,7 @@ QTemporaryFileName::QTemporaryFileName(const QString &templateName)
     path = filename;
     pos = phPos;
     length = phLength;
+    std::wcerr  << __FUNCTION__ << " returns " << path  << '\n';
 }
 
 /*!
