bool CoreIrcListHelper::dispatchQuery(const NetworkId &netId, const QString &query) {
  CoreNetwork *network = coreSession()->network(netId);
  if(network) {
    _channelLists[netId] = QList<ChannelDescription>();
    network->userInputHandler()->handleList(BufferInfo(), query);
    _queryTimeout[startTimer(10000)] = netId;
    return true;
  } else {
    return false;
  }
}
예제 #2
0
bool CoreIrcListHelper::dispatchQuery(const NetworkId &netId, const QString &query)
{
    CoreNetwork *network = coreSession()->network(netId);
    if (network) {
        _channelLists[netId] = QList<ChannelDescription>();
        network->userInputHandler()->handleList(BufferInfo(), query);

        auto timer = std::make_shared<QBasicTimer>();
        timer->start(kTimeoutMs, this);
        _queryTimeoutByNetId[netId] = timer;
        _queryTimeoutByTimerId[timer->timerId()] = netId;

        return true;
    }
    else {
        return false;
    }
}