refactor
This commit is contained in:
parent
ee0a953848
commit
50fc7e24c6
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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:
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user