From f111a8e3229e61f9baa2cd78c18b7f2c11f85c85 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Tue, 13 Nov 2007 13:23:44 +0000 Subject: [PATCH] Some cosmetics and a gcc compile fix. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21581 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/LyXView.h | 6 ------ src/frontends/qt4/Action.cpp | 2 -- src/frontends/qt4/GuiCommandBuffer.cpp | 2 -- src/frontends/qt4/GuiToc.cpp | 2 -- src/frontends/qt4/GuiView.cpp | 10 ++-------- src/frontends/qt4/GuiView.h | 8 ++++---- src/frontends/qt4/InsertTableWidget.h | 2 +- 7 files changed, 7 insertions(+), 25 deletions(-) diff --git a/src/frontends/LyXView.h b/src/frontends/LyXView.h index 9fef747e37..ac04535407 100644 --- a/src/frontends/LyXView.h +++ b/src/frontends/LyXView.h @@ -116,7 +116,6 @@ public: /// updates the possible layouts selectable virtual void updateLayoutChoice(bool force) = 0; - /// update the toolbar virtual void updateToolbars() = 0; /// get toolbar info @@ -125,13 +124,9 @@ public: virtual void toggleToolbarState(std::string const & name, bool allowauto) = 0; /// update the status bar virtual void updateStatusBar() = 0; - /// display a message in the view virtual void message(docstring const &) = 0; - /// clear any temporary message and replace with current status - virtual void clearMessage() = 0; - /// dispatch to current BufferView virtual void dispatch(FuncRequest const & cmd) = 0; @@ -143,7 +138,6 @@ public: /// returns true if this view has the focus. virtual bool hasFocus() const = 0; - /// virtual void restartCursor() = 0; diff --git a/src/frontends/qt4/Action.cpp b/src/frontends/qt4/Action.cpp index 2d4fc2c4c3..f7f12256d1 100644 --- a/src/frontends/qt4/Action.cpp +++ b/src/frontends/qt4/Action.cpp @@ -12,8 +12,6 @@ #include "Action.h" -#include "frontends/LyXView.h" - #include "debug.h" #include "FuncRequest.h" #include "FuncStatus.h" diff --git a/src/frontends/qt4/GuiCommandBuffer.cpp b/src/frontends/qt4/GuiCommandBuffer.cpp index 92317f60dd..d77db6a90f 100644 --- a/src/frontends/qt4/GuiCommandBuffer.cpp +++ b/src/frontends/qt4/GuiCommandBuffer.cpp @@ -24,8 +24,6 @@ #include "LyXAction.h" #include "FuncRequest.h" -#include "frontends/LyXView.h" - #include "support/lyxalgo.h" #include "support/lstrings.h" diff --git a/src/frontends/qt4/GuiToc.cpp b/src/frontends/qt4/GuiToc.cpp index d804eb3222..760e7d07d8 100644 --- a/src/frontends/qt4/GuiToc.cpp +++ b/src/frontends/qt4/GuiToc.cpp @@ -31,8 +31,6 @@ #include "gettext.h" #include "TextClass.h" -#include "frontends/LyXView.h" - #include "support/convert.h" #include diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index a6166c057a..5dc221fe16 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -362,7 +362,7 @@ void GuiView::init() statusBar()->setSizeGripEnabled(true); QObject::connect(&statusbar_timer_, SIGNAL(timeout()), - this, SLOT(update_view_state_qt())); + this, SLOT(clearMessage())); d.setBackground(); } @@ -608,12 +608,6 @@ void GuiView::message(docstring const & str) } -void GuiView::clearMessage() -{ - update_view_state_qt(); -} - - void GuiView::setIconSize(unsigned int size) { d.lastIconSize = size; @@ -639,7 +633,7 @@ void GuiView::bigSizedIcons() } -void GuiView::update_view_state_qt() +void GuiView::clearMessage() { if (!hasFocus()) return; diff --git a/src/frontends/qt4/GuiView.h b/src/frontends/qt4/GuiView.h index aa42aab739..45cedc88ac 100644 --- a/src/frontends/qt4/GuiView.h +++ b/src/frontends/qt4/GuiView.h @@ -72,7 +72,6 @@ public: GuiToolbar * makeToolbar(ToolbarInfo const & tbinfo, bool newline); virtual void updateStatusBar(); virtual void message(docstring const & str); - virtual void clearMessage(); virtual bool hasFocus() const; void showMiniBuffer(bool); void openMenu(docstring const &); @@ -108,8 +107,9 @@ Q_SIGNALS: void closing(int); public Q_SLOTS: - /// idle timeout - void update_view_state_qt(); + /// idle timeout. + /// clear any temporary message and replace with current status. + void clearMessage(); /// void updateWindowTitle(GuiWorkArea * wa); @@ -123,7 +123,7 @@ public Q_SLOTS: void bigSizedIcons(); private: - friend GuiWorkArea; + friend class GuiWorkArea; /// make sure we quit cleanly virtual void closeEvent(QCloseEvent * e); diff --git a/src/frontends/qt4/InsertTableWidget.h b/src/frontends/qt4/InsertTableWidget.h index f6a2b3cf7f..a36b2fc72c 100644 --- a/src/frontends/qt4/InsertTableWidget.h +++ b/src/frontends/qt4/InsertTableWidget.h @@ -13,12 +13,12 @@ #ifndef INSERTTABLEWIDGET_H #define INSERTTABLEWIDGET_H -#include "frontends/LyXView.h" #include namespace lyx { namespace frontend { +class LyXView; class InsertTableWidget : public QWidget { Q_OBJECT -- 2.39.2