~ubuntu-branches/ubuntu/utopic/mysql-workbench/utopic

« back to all changes in this revision

Viewing changes to backend/wbpublic/grt/grt_manager.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2014-05-31 12:03:58 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140531120358-cjik5ofkmj0fxsn8
Tags: 6.1.6+dfsg-1
* New upstream release [May 2014].
* Dropped "prtcl.patch".
* "debian/clean": better clean-up.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* 
2
 
 * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
 
2
 * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or
5
5
 * modify it under the terms of the GNU General Public License as
469
469
}
470
470
 
471
471
 
472
 
void GRTManager::run_once_when_idle(base::trackable *owner, const boost::function<void ()> &slot)
 
472
boost::signals2::connection GRTManager::run_once_when_idle(base::trackable *owner, const boost::function<void ()> &slot)
473
473
{
474
474
  if (!slot)
475
475
    throw std::invalid_argument("Adding null slot for idle");
476
476
  MutexLock lock(_idle_mutex);
477
 
  owner->track_connection(_idle_signals[_current_idle_signal].connect(slot));
 
477
  boost::signals2::connection tmp(_idle_signals[_current_idle_signal].connect(slot));
 
478
  owner->track_connection(tmp);
 
479
  return tmp;
478
480
}
479
481
 
480
482