From 862499bf997a8bef3999d21c29be33621b60b42a Mon Sep 17 00:00:00 2001 From: rekols Date: Tue, 28 Aug 2018 18:24:54 +0800 Subject: [PATCH] fix: move document thread Change-Id: I00f6bf0b15430eb5e49fce1c0f372843a7cdf819 --- editor/src/editor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/src/editor.cpp b/editor/src/editor.cpp index 46eba753..aa690f49 100644 --- a/editor/src/editor.cpp +++ b/editor/src/editor.cpp @@ -25,6 +25,7 @@ #include "utils.h" #include "fileloadthread.h" +#include #include #include #include @@ -172,6 +173,7 @@ void Editor::handleFileLoadFinished(const QString &encode, const QString &conten QApplication::restoreOverrideCursor(); // set text. + textEditor->document()->moveToThread(QCoreApplication::instance()->thread()); textEditor->document()->setPlainText(content); // update status.