diff --git a/src/editor/editwrapper.cpp b/src/editor/editwrapper.cpp index f8642463..c48eefd8 100644 --- a/src/editor/editwrapper.cpp +++ b/src/editor/editwrapper.cpp @@ -1451,8 +1451,12 @@ void EditWrapper::updateHighlighterAll() return; } + int blockCount = 0; for (QTextBlock var = beginBlock; var != endBlock; var = var.next()) { m_pSyntaxHighlighter->rehighlightBlock(var); + if (++blockCount % 100 == 0) { + qApp->processEvents(); + } } m_pSyntaxHighlighter->rehighlightBlock(endBlock); diff --git a/src/widgets/window.cpp b/src/widgets/window.cpp index 91a9af10..e6a0ad16 100644 --- a/src/widgets/window.cpp +++ b/src/widgets/window.cpp @@ -2441,7 +2441,6 @@ void Window::popupPrintDialog() return; } - DPrinter printer(QPrinter::HighResolution); m_isNewPrint = true; m_pPreview = new DPrintPreviewDialog(this); m_pPreview->setAttribute(Qt::WA_DeleteOnClose);