summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compat/util.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/compat/util.hpp b/compat/util.hpp
index d2aaa572..33e64a80 100644
--- a/compat/util.hpp
+++ b/compat/util.hpp
@@ -34,11 +34,16 @@ public:
if (operate_p)
val.blockSignals(true);
}
+
~inhibit_qt_signals()
{
if (operate_p)
val.blockSignals(false);
}
+
+ inhibit_qt_signals(QObject* val) : inhibit_qt_signals(*val) {}
+ inhibit_qt_signals(std::unique_ptr<QObject> val) : inhibit_qt_signals(*val.get()) {}
+ inhibit_qt_signals(std::shared_ptr<QObject> val) : inhibit_qt_signals(*val.get()) {}
};
namespace detail {