diff --git a/src/blackmisc/invoke.h b/src/blackmisc/invoke.h index bcef4e079..6620478f5 100644 --- a/src/blackmisc/invoke.h +++ b/src/blackmisc/invoke.h @@ -14,6 +14,7 @@ #include #include "blackmisc/typetraits.h" #include "blackmisc/integersequence.h" +#include namespace BlackMisc { @@ -23,17 +24,17 @@ namespace BlackMisc // Our own version of C++17 std::invoke(). template ::value>> - decltype(auto) invoke(F ptr, T &&object) + decltype(auto) invoke(F ptr, T && object) { return std::forward(object).*ptr; } template ::value>> - decltype(auto) invoke(F ptr, T &&object, Ts &&... args) + decltype(auto) invoke(F ptr, T && object, Ts && ... args) { return (std::forward(object).*ptr)(std::forward(args)...); } - template >::value>> - decltype(auto) invoke(F &&func, Ts &&... args) + template < typename F, typename... Ts, typename = std::enable_if_t < ! std::is_member_pointer>::value >> + decltype(auto) invoke(F && func, Ts && ... args) { return std::forward(func)(std::forward(args)...); } @@ -54,7 +55,7 @@ namespace BlackMisc template decltype(auto) invokeSlot(F &&func, T *object, Ts &&... args) { - using seq = MaskSequence, ! TIsQPrivateSignal>::value...>; + using seq = MaskSequence < std::make_index_sequence, ! TIsQPrivateSignal>::value... >; return invokeSlotImpl(std::forward(func), object, std::forward_as_tuple(std::forward(args)...), seq(), std::is_member_pointer>()); } @@ -62,4 +63,4 @@ namespace BlackMisc //! \endcond } -#endif \ No newline at end of file +#endif diff --git a/src/blackmisc/network/url.h b/src/blackmisc/network/url.h index de0fc93d3..b99fa682a 100644 --- a/src/blackmisc/network/url.h +++ b/src/blackmisc/network/url.h @@ -11,11 +11,11 @@ #ifndef BLACKMISC_NETWORK_URL_H #define BLACKMISC_NETWORK_URL_H -#include "blackmisc/blackmiscexport.h" #include "blackmisc/metaclass.h" #include "blackmisc/propertyindex.h" #include "blackmisc/valueobject.h" #include "blackmisc/variant.h" +#include "blackmisc/blackmiscexport.h" #include #include diff --git a/src/plugins/weatherdata/gfs/weatherdatagfs.cpp b/src/plugins/weatherdata/gfs/weatherdatagfs.cpp index a66271c01..d539215b7 100644 --- a/src/plugins/weatherdata/gfs/weatherdatagfs.cpp +++ b/src/plugins/weatherdata/gfs/weatherdatagfs.cpp @@ -153,7 +153,7 @@ namespace BlackWxPlugin m_maxRange = range; if (m_gribData.isEmpty()) { - if (!sApp->isInternetAccessible()) + if (!sApp || !sApp->isInternetAccessible()) { CLogMessage(this).error(u"No weather download since network/internet not accessible"); return; diff --git a/tests/blackmisc/aviation/testflightplan/testflightplan.pro b/tests/blackmisc/aviation/testflightplan/testflightplan.pro index b2d4cfabf..3ff0b3e2e 100644 --- a/tests/blackmisc/aviation/testflightplan/testflightplan.pro +++ b/tests/blackmisc/aviation/testflightplan/testflightplan.pro @@ -1,6 +1,6 @@ load(common_pre) -QT += core dbus testlib +QT += core dbus testlib network TARGET = testflightplan CONFIG -= app_bundle diff --git a/tests/blackmisc/simulation/testxplane/testxplane.pro b/tests/blackmisc/simulation/testxplane/testxplane.pro index b2ddad508..541689fe8 100644 --- a/tests/blackmisc/simulation/testxplane/testxplane.pro +++ b/tests/blackmisc/simulation/testxplane/testxplane.pro @@ -1,6 +1,6 @@ load(common_pre) -QT += core dbus testlib +QT += core dbus testlib network TARGET = testxplane CONFIG -= app_bundle diff --git a/tests/blackmisc/testdatastream/testdatastream.pro b/tests/blackmisc/testdatastream/testdatastream.pro index 4a3edf50d..9f8c66cca 100644 --- a/tests/blackmisc/testdatastream/testdatastream.pro +++ b/tests/blackmisc/testdatastream/testdatastream.pro @@ -1,6 +1,6 @@ load(common_pre) -QT += core dbus testlib +QT += core dbus testlib network TARGET = testdatastream CONFIG -= app_bundle diff --git a/tests/blackmisc/testdbus/testdbus.pro b/tests/blackmisc/testdbus/testdbus.pro index 053aeeda4..56aa52814 100644 --- a/tests/blackmisc/testdbus/testdbus.pro +++ b/tests/blackmisc/testdbus/testdbus.pro @@ -1,6 +1,6 @@ load(common_pre) -QT += core dbus testlib +QT += core dbus testlib network TARGET = testdbus CONFIG -= app_bundle diff --git a/tests/blackmisc/testpropertyindex/testpropertyindex.pro b/tests/blackmisc/testpropertyindex/testpropertyindex.pro index 32ef1fdce..43d203aa7 100644 --- a/tests/blackmisc/testpropertyindex/testpropertyindex.pro +++ b/tests/blackmisc/testpropertyindex/testpropertyindex.pro @@ -1,6 +1,6 @@ load(common_pre) -QT += core dbus testlib +QT += core dbus testlib network TARGET = testpropertyindex CONFIG -= app_bundle diff --git a/tests/blackmisc/teststringutils/teststringutils.pro b/tests/blackmisc/teststringutils/teststringutils.pro index 33affb0d2..cc885a9de 100644 --- a/tests/blackmisc/teststringutils/teststringutils.pro +++ b/tests/blackmisc/teststringutils/teststringutils.pro @@ -1,6 +1,6 @@ load(common_pre) -QT += core dbus testlib +QT += core dbus testlib network TARGET = teststringutils CONFIG -= app_bundle diff --git a/tests/blackmisc/weather/testweather/testweather.pro b/tests/blackmisc/weather/testweather/testweather.pro index 5a66a2503..9168f4f64 100644 --- a/tests/blackmisc/weather/testweather/testweather.pro +++ b/tests/blackmisc/weather/testweather/testweather.pro @@ -1,6 +1,6 @@ load(common_pre) -QT += core dbus testlib +QT += core dbus testlib network TARGET = testweather CONFIG -= app_bundle