diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-02 08:18:20 +0100 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-02 08:21:36 +0100 | 
| commit | d6bbd3260a6e78cf9973f407b116b0a4ea7904b7 (patch) | |
| tree | e8caeef73e27d38924fa4b42830c264027b2fd25 | |
| parent | 59dec5d1ee6161633c081cf1bddfed33fcc593cd (diff) | |
options/value: add always-default values
Also Visual Studio 2017 Preview 15.5 now does "constexpr inline"
| -rw-r--r-- | options/value.hpp | 11 | 
1 files changed, 6 insertions, 5 deletions
| diff --git a/options/value.hpp b/options/value.hpp index 099a8cb2..244f23fd 100644 --- a/options/value.hpp +++ b/options/value.hpp @@ -69,17 +69,18 @@ public:          return datum;      } -    static constexpr const Qt::ConnectionType DIRECT_CONNTYPE = Qt::DirectConnection; -    static constexpr const Qt::ConnectionType SAFE_CONNTYPE = Qt::QueuedConnection; +    static constexpr inline Qt::ConnectionType DIRECT_CONNTYPE = Qt::DirectConnection; +    static constexpr inline Qt::ConnectionType SAFE_CONNTYPE = Qt::QueuedConnection;      never_inline      value(bundle b, const QString& name, t def) :          base_value(b, name, &is_equal, std::type_index(typeid(element_type))),          def(def)      { -        QObject::connect(b.get(), SIGNAL(reloading()), -                         this, SLOT(reload()), -                         DIRECT_CONNTYPE); +        if (!self_name.isEmpty()) +            QObject::connect(b.get(), SIGNAL(reloading()), +                             this, SLOT(reload()), +                             DIRECT_CONNTYPE);      }      never_inline | 
