freebsd-ports/net-im/libqtelegram-ae/files/patch-libqtelegram-ae.pro
Tobias C. Berner 89f2abf9c3 Change c++11 behaviour of net-im/libqtelegram-ae and net-im/telegramqml.
Instead of explicitely disabling c++11 mode as the code uses narrowing of
unsigned ints to ints, simply pass -no-c++11-narrowing if the compiler is clang.
This is done in preparation for Qt 5.7.1, which requires c++11 mode.

Approved by:	rakuco (mentor)
2017-02-12 12:02:44 +00:00

18 lines
553 B
Prolog

C++11 does not allow narrowing of integer types by default -- however multiple
constants defined in the code are too large to fit into a signed int, and rely
on the narrowing behaviour.
--- libqtelegram-ae.pro.orig 2017-02-10 23:08:39 UTC
+++ libqtelegram-ae.pro
@@ -25,6 +25,11 @@ linux {
}
}
+# Explictely allow narrowing of integer types
+clang {
+ QMAKE_CXXFLAGS += -Wno-c++11-narrowing
+}
+
!contains(CONFIG, no_install) {
isEmpty(PREFIX) {
isEmpty(INSTALL_HEADERS_PREFIX): INSTALL_HEADERS_PREFIX = $$[QT_INSTALL_HEADERS]