From: Enrico Forestieri Date: Wed, 10 Nov 2010 14:36:35 +0000 (+0000) Subject: Correct style and squash compiler warnings. X-Git-Tag: 2.0.0~1896 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=74a3fa9cf1c81702a755675a55fe3395b597967d;p=features.git Correct style and squash compiler warnings. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36234 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 60eef6fbf9..4048dcfa36 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -496,6 +496,7 @@ QVector GuiView::GuiViewPrivate::guiWorkAreas() return areas; } + void GuiView::setCursorShapes(Qt::CursorShape shape) { QVector areas = d.guiWorkAreas(); @@ -504,6 +505,7 @@ void GuiView::setCursorShapes(Qt::CursorShape shape) } } + void GuiView::restoreCursorShapes() { QVector areas = d.guiWorkAreas(); @@ -514,6 +516,7 @@ void GuiView::restoreCursorShapes() } } + void GuiView::saveCursorShapes() { d.orig_cursors_.clear(); @@ -523,6 +526,7 @@ void GuiView::saveCursorShapes() } } + void GuiView::indicateProcessing() { if (d.indicates_processing_) { @@ -533,6 +537,7 @@ void GuiView::indicateProcessing() d.indicates_processing_ = !d.indicates_processing_; } + void GuiView::processingThreadStarted() { saveCursorShapes(); @@ -541,6 +546,7 @@ void GuiView::processingThreadStarted() d.processing_cursor_timer_.start(); } + void GuiView::processingThreadFinished() { #if (QT_VERSION >= 0x040400) @@ -2877,18 +2883,21 @@ docstring GuiView::GuiViewPrivate::runAndDestroy(const T& func, Buffer const * o : bformat(_("Error " + msg + " format: %1$s"), from_utf8(format)); } + docstring GuiView::GuiViewPrivate::compileAndDestroy(Buffer const * orig, Buffer * buffer, string const & format) { bool (Buffer::* mem_func)(std::string const &, bool, bool) const = &Buffer::doExport; return runAndDestroy(bind(mem_func, buffer, _1, true, _2), orig, buffer, format, "export"); } + docstring GuiView::GuiViewPrivate::exportAndDestroy(Buffer const * orig, Buffer * buffer, string const & format) { bool (Buffer::* mem_func)(std::string const &, bool, bool) const = &Buffer::doExport; return runAndDestroy(bind(mem_func, buffer, _1, false, _2), orig, buffer, format, "export"); } + docstring GuiView::GuiViewPrivate::previewAndDestroy(Buffer const * orig, Buffer * buffer, string const & format) { bool(Buffer::* mem_func)(std::string const &, bool) const = &Buffer::preview; @@ -2899,17 +2908,22 @@ docstring GuiView::GuiViewPrivate::previewAndDestroy(Buffer const * orig, Buffer // not used, but the linker needs them -docstring GuiView::GuiViewPrivate::compileAndDestroy(Buffer const * orig, Buffer * buffer, string const & format) +docstring GuiView::GuiViewPrivate::compileAndDestroy( + Buffer const *, Buffer *, string const &) { return docstring(); } -docstring GuiView::GuiViewPrivate::exportAndDestroy(Buffer const * orig, Buffer * buffer, string const & format) + +docstring GuiView::GuiViewPrivate::exportAndDestroy( + Buffer const *, Buffer *, string const &) { return docstring(); } -docstring GuiView::GuiViewPrivate::previewAndDestroy(Buffer const * orig, Buffer * buffer, string const & format) + +docstring GuiView::GuiViewPrivate::previewAndDestroy( + Buffer const *, Buffer *, string const &) { return docstring(); } @@ -2925,14 +2939,14 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing( bool (Buffer::*syncFunc)(string const &, bool, bool) const, bool (Buffer::*previewFunc)(string const &, bool) const) { - if (!used_buffer) { + if (!used_buffer) return false; - } + gv_->processingThreadStarted(); string format = argument; - if (format.empty()) { + if (format.empty()) format = used_buffer->getDefaultOutputFormat(); - } + #if EXPORT_in_THREAD && (QT_VERSION >= 0x040400) if (!msg.empty()) { progress_->clearMessages();