Merge branch 'FindHDF5-restore-default-C' into release-3.6
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index c849d52..61c4d7b 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -101,11 +101,13 @@
   QTextCodec::setCodecForLocale(utf8_codec);
 #endif
 
+#if QT_VERSION < 0x050000
   // clean out standard Qt paths for plugins, which we don't use anyway
   // when creating Mac bundles, it potentially causes problems
   foreach (QString p, QApplication::libraryPaths()) {
     QApplication::removeLibraryPath(p);
   }
+#endif
 
   // tell the cmake library where cmake is
   QDir cmExecDir(QApplication::applicationDirPath());