summaryrefslogtreecommitdiffhomepage
path: root/options
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-20 11:41:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-20 11:42:54 +0200
commitac07604a12b4d4a08e19f5096f161649c85bd57d (patch)
tree1770b4427ca5e69c4b5b75f99fd5ab727d15f5ad /options
parent20e00b43a6cfd2db5507753f828f54e3dd07d515 (diff)
options/connector: spew warning when init/deinit mismatch
Diffstat (limited to 'options')
-rw-r--r--options/connector.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/options/connector.cpp b/options/connector.cpp
index c721971d..ba460b1f 100644
--- a/options/connector.cpp
+++ b/options/connector.cpp
@@ -11,6 +11,9 @@ void connector::on_value_destructed(const QString& name, const base_value* val)
QMutexLocker l(get_mtx());
auto it = connected_values.find(name);
+
+ bool ok = false;
+
if (it != connected_values.end())
{
std::vector<const base_value*>& values = (*it).second;
@@ -19,10 +22,16 @@ void connector::on_value_destructed(const QString& name, const base_value* val)
if (*it == val)
{
values.erase(it);
+ ok = true;
break;
}
}
}
+
+ if (!ok)
+ qWarning() << "connector: bundle destructed without creating;"
+ << "name" << name
+ << "ptr" << quintptr(val);
}
void connector::on_value_created(const QString& name, const base_value* val)