Skip to content

Commit

Permalink
fix: move document thread
Browse files Browse the repository at this point in the history
Change-Id: I00f6bf0b15430eb5e49fce1c0f372843a7cdf819
  • Loading branch information
rekols committed Aug 28, 2018
1 parent c143fd3 commit 862499b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/src/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "utils.h"
#include "fileloadthread.h"

#include <QCoreApplication>
#include <QApplication>
#include <QDebug>
#include <QDir>
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 862499b

Please sign in to comment.