This commit is contained in:
Akash Mozumdar 2018-09-01 13:56:45 -04:00
parent ee0a953848
commit 50fc7e24c6
3 changed files with 4 additions and 5 deletions

View File

@ -51,10 +51,10 @@ void TextThread::AddSentence(std::wstring sentence)
storage.append(sentence); storage.append(sentence);
} }
void TextThread::AddText(const BYTE *con, int len) void TextThread::AddText(const BYTE* data, int len)
{ {
LOCK(ttMutex); LOCK(ttMutex);
buffer.insert(buffer.end(), con, con + len); buffer.insert(buffer.end(), data, data + len);
timestamp = GetTickCount(); timestamp = GetTickCount();
} }

View File

@ -7,7 +7,6 @@
#include "common.h" #include "common.h"
#include "types.h" #include "types.h"
class TextThread class TextThread
{ {
typedef std::function<std::wstring(TextThread*, std::wstring)> ThreadOutputCallback; typedef std::function<std::wstring(TextThread*, std::wstring)> ThreadOutputCallback;
@ -20,7 +19,7 @@ public:
void RegisterOutputCallBack(ThreadOutputCallback cb) { Output = cb; } void RegisterOutputCallBack(ThreadOutputCallback cb) { Output = cb; }
void AddText(const BYTE *con, int len); void AddText(const BYTE* data, int len);
void AddSentence(std::wstring sentence); void AddSentence(std::wstring sentence);
private: private:

View File

@ -50,7 +50,7 @@ private:
std::unordered_map<std::string, int> GetInfoForExtensions(TextThread* thread); std::unordered_map<std::string, int> GetInfoForExtensions(TextThread* thread);
QVector<HookParam> GetAllHooks(DWORD processId); QVector<HookParam> GetAllHooks(DWORD processId);
Ui::MainWindow *ui; Ui::MainWindow* ui;
QComboBox* processCombo; QComboBox* processCombo;
QComboBox* ttCombo; QComboBox* ttCombo;
QComboBox* extenCombo; QComboBox* extenCombo;