Correct style and squash compiler warnings.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36234 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-11-10 14:36:35 +00:00
parent 00e6cfee4a
commit 74a3fa9cf1

View File

@ -496,6 +496,7 @@ QVector<GuiWorkArea*> GuiView::GuiViewPrivate::guiWorkAreas()
return areas; return areas;
} }
void GuiView::setCursorShapes(Qt::CursorShape shape) void GuiView::setCursorShapes(Qt::CursorShape shape)
{ {
QVector<GuiWorkArea*> areas = d.guiWorkAreas(); QVector<GuiWorkArea*> areas = d.guiWorkAreas();
@ -504,6 +505,7 @@ void GuiView::setCursorShapes(Qt::CursorShape shape)
} }
} }
void GuiView::restoreCursorShapes() void GuiView::restoreCursorShapes()
{ {
QVector<GuiWorkArea*> areas = d.guiWorkAreas(); QVector<GuiWorkArea*> areas = d.guiWorkAreas();
@ -514,6 +516,7 @@ void GuiView::restoreCursorShapes()
} }
} }
void GuiView::saveCursorShapes() void GuiView::saveCursorShapes()
{ {
d.orig_cursors_.clear(); d.orig_cursors_.clear();
@ -523,6 +526,7 @@ void GuiView::saveCursorShapes()
} }
} }
void GuiView::indicateProcessing() void GuiView::indicateProcessing()
{ {
if (d.indicates_processing_) { if (d.indicates_processing_) {
@ -533,6 +537,7 @@ void GuiView::indicateProcessing()
d.indicates_processing_ = !d.indicates_processing_; d.indicates_processing_ = !d.indicates_processing_;
} }
void GuiView::processingThreadStarted() void GuiView::processingThreadStarted()
{ {
saveCursorShapes(); saveCursorShapes();
@ -541,6 +546,7 @@ void GuiView::processingThreadStarted()
d.processing_cursor_timer_.start(); d.processing_cursor_timer_.start();
} }
void GuiView::processingThreadFinished() void GuiView::processingThreadFinished()
{ {
#if (QT_VERSION >= 0x040400) #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)); : bformat(_("Error " + msg + " format: %1$s"), from_utf8(format));
} }
docstring GuiView::GuiViewPrivate::compileAndDestroy(Buffer const * orig, Buffer * buffer, string const & 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; 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"); 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) docstring GuiView::GuiViewPrivate::exportAndDestroy(Buffer const * orig, Buffer * buffer, string const & format)
{ {
bool (Buffer::* mem_func)(std::string const &, bool, bool) const = &Buffer::doExport; 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"); 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) docstring GuiView::GuiViewPrivate::previewAndDestroy(Buffer const * orig, Buffer * buffer, string const & format)
{ {
bool(Buffer::* mem_func)(std::string const &, bool) const = &Buffer::preview; 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 // 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(); 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(); 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(); return docstring();
} }
@ -2925,14 +2939,14 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing(
bool (Buffer::*syncFunc)(string const &, bool, bool) const, bool (Buffer::*syncFunc)(string const &, bool, bool) const,
bool (Buffer::*previewFunc)(string const &, bool) const) bool (Buffer::*previewFunc)(string const &, bool) const)
{ {
if (!used_buffer) { if (!used_buffer)
return false; return false;
}
gv_->processingThreadStarted(); gv_->processingThreadStarted();
string format = argument; string format = argument;
if (format.empty()) { if (format.empty())
format = used_buffer->getDefaultOutputFormat(); format = used_buffer->getDefaultOutputFormat();
}
#if EXPORT_in_THREAD && (QT_VERSION >= 0x040400) #if EXPORT_in_THREAD && (QT_VERSION >= 0x040400)
if (!msg.empty()) { if (!msg.empty()) {
progress_->clearMessages(); progress_->clearMessages();