From 719a7beb48c8f2229ee08bfe4e66e3499121393c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Sat, 17 Nov 2007 22:37:33 +0000 Subject: [PATCH] make Application slimmer git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21659 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/Application.h | 4 ---- src/frontends/qt4/GuiView.cpp | 10 +++++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/frontends/Application.h b/src/frontends/Application.h index 985137304f..30f05c2c65 100644 --- a/src/frontends/Application.h +++ b/src/frontends/Application.h @@ -151,10 +151,6 @@ public: /// virtual ~Application() {} - /// - virtual int createRegisteredView() = 0; - /// - virtual bool unregisterView(int id) = 0; /// virtual bool closeAllViews() = 0; diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index a11c0acac0..5f3b2d7eae 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -15,6 +15,7 @@ #include "GuiView.h" +#include "GuiApplication.h" #include "GuiWorkArea.h" #include "GuiKeySymbol.h" #include "GuiMenubar.h" @@ -24,7 +25,6 @@ #include "qt_helpers.h" -#include "frontends/Application.h" #include "frontends/Dialogs.h" #include "support/filetools.h" @@ -403,7 +403,7 @@ void GuiView::closeEvent(QCloseEvent * close_event) { // we may have been called through the close window button // which bypasses the LFUN machinery. - if (!quitting_by_menu_ && theApp()->viewCount() == 1) { + if (!quitting_by_menu_ && guiApp->viewCount() == 1) { if (!theBufferList().quitWriteAll()) { close_event->ignore(); return; @@ -428,8 +428,8 @@ void GuiView::closeEvent(QCloseEvent * close_event) d.toolbars_->saveToolbarInfo(); } - theApp()->unregisterView(id()); - if (theApp()->viewCount() > 0) { + guiApp->unregisterView(id()); + if (guiApp->viewCount() > 0) { // Just close the window and do nothing else if this is not the // last window. close_event->accept(); @@ -575,7 +575,7 @@ bool GuiView::event(QEvent * e) // break; case QEvent::WindowActivate: { - theApp()->setCurrentView(*this); + guiApp->setCurrentView(*this); if (d.current_work_area_) { BufferView & bv = d.current_work_area_->bufferView(); connectBufferView(bv); -- 2.39.2