mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-23 08:54:12 +08:00
move display logic to gui
This commit is contained in:
parent
4b70c62d64
commit
143a2f091f
@ -112,6 +112,7 @@ void MainWindow::AddThread(TextThread* thread)
|
|||||||
thread->RegisterOutputCallBack([&](TextThread* thread, std::wstring output)
|
thread->RegisterOutputCallBack([&](TextThread* thread, std::wstring output)
|
||||||
{
|
{
|
||||||
output = DispatchSentenceToExtensions(output, GetInfoForExtensions(thread));
|
output = DispatchSentenceToExtensions(output, GetInfoForExtensions(thread));
|
||||||
|
output += L"\r\n";
|
||||||
emit ThreadOutputReceived(thread, QString::fromWCharArray(output.c_str()));
|
emit ThreadOutputReceived(thread, QString::fromWCharArray(output.c_str()));
|
||||||
return output;
|
return output;
|
||||||
});
|
});
|
||||||
|
@ -72,7 +72,6 @@ void TextThread::AddSentence()
|
|||||||
void TextThread::AddSentence(std::wstring sentence)
|
void TextThread::AddSentence(std::wstring sentence)
|
||||||
{
|
{
|
||||||
TT_LOCK;
|
TT_LOCK;
|
||||||
sentence.append(L"\r\n");
|
|
||||||
if (output) sentence = output(this, sentence);
|
if (output) sentence = output(this, sentence);
|
||||||
storage.append(sentence);
|
storage.append(sentence);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user