summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@theqtcompany.com>2015-02-12 13:13:37 +0100
committerPierre Rossi <pierre.rossi@theqtcompany.com>2015-02-13 14:38:14 +0000
commitad17dd16e8c0be602c8751cdc8ada0903f642ee0 (patch)
tree9eeaaa834866a157472e7388173370ec4d376997 /src/core
parentebe4b5da40d8784351821ae0ba173f357bb519f8 (diff)
Compile time check the fileListingHelper specializations
Since we can now rely on deleted functions (supported by MSVC 2013), we can avoid the scenario we had with the last snapshot update where the file picker internal API changed slightly (see 1a744ca4 for more details). Change-Id: Iab26a7834a367f24afe5fbf37fae64639aa9c12e Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/type_conversion.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index 6bb755abc..619a3b9ba 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -155,7 +155,14 @@ inline base::FilePath toFilePath(const QString &str)
}
template <typename T>
-inline T fileListingHelper(const QString &) {qFatal("Specialization missing for %s.", Q_FUNC_INFO); return T(); }
+inline T fileListingHelper(const QString &)
+// Clang is still picky about this though it should be supported eventually.
+// See http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#941
+#ifndef Q_CC_CLANG
+= delete;
+#else
+{ return T(); }
+#endif
template <>
inline content::FileChooserFileInfo fileListingHelper<content::FileChooserFileInfo>(const QString &file)