memspyui/ui/hb/src/enginewrapper.cpp
changeset 19 4b22a598b890
parent 17 4f2773374eff
child 31 e7a04a6385be
--- a/memspyui/ui/hb/src/enginewrapper.cpp	Fri May 14 15:53:02 2010 +0300
+++ b/memspyui/ui/hb/src/enginewrapper.cpp	Thu May 27 12:52:19 2010 +0300
@@ -54,9 +54,22 @@
 	return result;
 }
 
+QList<MemSpyThreadInfoItem*> EngineWrapper::getThreadInfo(ThreadId threadId, ThreadInfoType type)
+{
+	QList<MemSpyThreadInfoItem*> result;
+	RArray<CMemSpyApiThreadInfoItem*> threadInfo;
+	TRAPD(error, mSession.GetThreadInfoItems(threadInfo, threadId, 
+			static_cast<TMemSpyThreadInfoItemType>(type)));
+	if (error == KErrNone)
+		for (TInt i=0; i<threadInfo.Count(); i++)
+			result.append(new MemSpyThreadInfoItem(threadInfo[i]));
+	
+	return result;
+}
+
 void EngineWrapper::setThreadPriority(ThreadId threadId, ThreadPriority priority)
 {
-	TRAPD(error, mSession.SetThreadPriorityL(threadId, priority));
+	TRAP_IGNORE(mSession.SetThreadPriorityL(threadId, priority));
 }
 
 QList<MemSpyKernelObjectType*> EngineWrapper::getKernelObjectTypes()