mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-21 17:51:03 +00:00
Fix the 100% cpu load problem when previewing with Qt 4.2 and 4.3.
Now it works fine again with those Qt versions. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36235 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
74a3fa9cf1
commit
91208a2f79
@ -497,6 +497,7 @@ QVector<GuiWorkArea*> GuiView::GuiViewPrivate::guiWorkAreas()
|
||||
}
|
||||
|
||||
|
||||
#if QT_VERSION >= 0x040400
|
||||
void GuiView::setCursorShapes(Qt::CursorShape shape)
|
||||
{
|
||||
QVector<GuiWorkArea*> areas = d.guiWorkAreas();
|
||||
@ -549,7 +550,6 @@ void GuiView::processingThreadStarted()
|
||||
|
||||
void GuiView::processingThreadFinished()
|
||||
{
|
||||
#if (QT_VERSION >= 0x040400)
|
||||
QFutureWatcher<docstring> const * watcher =
|
||||
static_cast<QFutureWatcher<docstring> const *>(sender());
|
||||
message(watcher->result());
|
||||
@ -558,9 +558,40 @@ void GuiView::processingThreadFinished()
|
||||
d.processing_cursor_timer_.stop();
|
||||
restoreCursorShapes();
|
||||
d.indicates_processing_ = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void GuiView::setCursorShapes(Qt::CursorShape)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GuiView::restoreCursorShapes()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GuiView::saveCursorShapes()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GuiView::indicateProcessing()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GuiView::processingThreadStarted()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GuiView::processingThreadFinished()
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void GuiView::saveLayout() const
|
||||
{
|
||||
@ -2942,12 +2973,12 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing(
|
||||
if (!used_buffer)
|
||||
return false;
|
||||
|
||||
gv_->processingThreadStarted();
|
||||
string format = argument;
|
||||
if (format.empty())
|
||||
format = used_buffer->getDefaultOutputFormat();
|
||||
|
||||
#if EXPORT_in_THREAD && (QT_VERSION >= 0x040400)
|
||||
gv_->processingThreadStarted();
|
||||
if (!msg.empty()) {
|
||||
progress_->clearMessages();
|
||||
gv_->message(msg);
|
||||
@ -2972,7 +3003,6 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing(
|
||||
!used_buffer->params().getIncludedChildren().empty();
|
||||
return (used_buffer->*syncFunc)(format, true, update_unincluded);
|
||||
} else if (previewFunc) {
|
||||
// TODO includeall must be false or we get a 100% busy thread, a bug?
|
||||
return (used_buffer->*previewFunc)(format, false);
|
||||
}
|
||||
(void) asyncFunc;
|
||||
|
Loading…
Reference in New Issue
Block a user