本文整理汇总了C++中Threads::at方法的典型用法代码示例。如果您正苦于以下问题:C++ Threads::at方法的具体用法?C++ Threads::at怎么用?C++ Threads::at使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Threads
的用法示例。
在下文中一共展示了Threads::at方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: selectThread
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);
}
示例2: setThreads
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();
}