Esempio n. 1
0
void IPCEngineHost::selectThread(int index)
{
    resetLocation();
    Threads threads = threadsHandler()->threads();
    QTC_ASSERT(index < threads.size(), return);
    QByteArray p;
    {
        QDataStream s(&p, QIODevice::WriteOnly);
        SET_NATIVE_BYTE_ORDER(s);
        s << quint64(threads.at(index).id);
    }
    rpcCall(SelectThread, p);
}
Esempio n. 2
0
void ThreadsHandler::setThreads(const Threads &threads)
{
    beginResetModel();
    m_threads = threads;
    bool found = false;
    for (int i = 0, n = m_threads.size(); i < n; ++i)
        if (threads.at(i).id == m_currentId) {
            found = true;
            break;
        }
    if (!found)
        m_currentId = ThreadId();
    m_resetLocationScheduled = false;
    endResetModel();
    updateThreadBox();
}