Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
debug tracing
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
  • Loading branch information
Denis Zalevskiy committed Nov 12, 2015
1 parent 786dda7 commit a152239
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/contextkit-subscriber/property.cpp
Expand Up @@ -474,6 +474,7 @@ void PropertyMonitor::write(WriteRequest *req)

void Property::changed() const
{
debug::debug("Notify", file_.key(), targets_.size(), "targets");
for (auto target : targets_)
target->dataReady(target);
}
Expand Down Expand Up @@ -508,6 +509,7 @@ void PropertyMonitor::subscribe(SubscribeRequest *req)
std::shared_ptr<Property> handler;
QVariant retval;

debug::debug("Subcribe request:", tgt, key);
if (!tgt) {
debug::warning("Logic issue: subscription target is null");
return;
Expand All @@ -534,6 +536,8 @@ void PropertyMonitor::unsubscribe(UnsubscribeRequest *req)
auto tgt = req->tgt_;
auto key = req->key_;

debug::debug("Unsubcribe request:", tgt, key);

auto phandlers = properties_.find(key);
if (phandlers == properties_.end())
return;
Expand Down Expand Up @@ -688,6 +692,7 @@ bool Property::update()
if (value != prev_value) {
cache_->store(value);
is_updated = true;
debug::debug("Updated", file_.key(), value);
}
} else {
debug::warning("Error accessing? ", rc, "..." + file_.fileName());
Expand Down Expand Up @@ -837,6 +842,7 @@ bool ContextPropertyPrivate::event(QEvent *e)
switch (t) {
case Event::Ready: {
auto p = EVENT_CAST(e, DataReadyEvent);
debug::debug("Data ready:", this, key_);
if (p) updateFromRemoteCache(p);
break;
}
Expand Down

0 comments on commit a152239

Please sign in to comment.