]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiApplication.cpp
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiApplication.cpp
index 7d322f36c6f5000483653387b0f50ffdce50be9d..e25211b0b69712889783e248407e1a710088d429 100644 (file)
@@ -36,6 +36,7 @@
 #include "Session.h"
 #include "version.h"
 
+#include "support/assert.h"
 #include "support/debug.h"
 #include "support/ExceptionMessage.h"
 #include "support/FileName.h"
@@ -573,7 +574,7 @@ bool GuiApplication::notify(QObject * receiver, QEvent * event)
                case WarningException:
                        Alert::warning(e.title_, e.details_);
                        return false;
-               };
+               }
        }
        catch (exception const & e) {
                docstring s = _("LyX has caught an exception, it will now "
@@ -666,8 +667,8 @@ void GuiApplication::addMenuTranslator()
 bool GuiApplication::unregisterView(int id)
 {
        updateIds(views_, view_ids_);
-       BOOST_ASSERT(views_.find(id) != views_.end());
-       BOOST_ASSERT(views_[id]);
+       LASSERT(views_.find(id) != views_.end(), /**/);
+       LASSERT(views_[id], /**/);
 
        map<int, GuiView *>::iterator it;
        for (it = views_.begin(); it != views_.end(); ++it) {
@@ -702,7 +703,7 @@ bool GuiApplication::closeAllViews()
 
 GuiView & GuiApplication::view(int id) const
 {
-       BOOST_ASSERT(views_.find(id) != views_.end());
+       LASSERT(views_.find(id) != views_.end(), /**/);
        return *views_.find(id)->second;
 }
 
@@ -756,8 +757,11 @@ void GuiApplication::onLastWindowClosed()
                global_menubar_->grabKeyboard();
 }
 
+
 ////////////////////////////////////////////////////////////////////////
+//
 // X11 specific stuff goes here...
+
 #ifdef Q_WS_X11
 bool GuiApplication::x11EventFilter(XEvent * xev)
 {
@@ -794,6 +798,13 @@ bool GuiApplication::x11EventFilter(XEvent * xev)
 } // namespace frontend
 
 
+void hideDialogs(std::string const & name, Inset * inset)
+{
+       if (theApp())
+               theApp()->hideDialogs(name, inset);
+}
+
+
 ////////////////////////////////////////////////////////////////////
 //
 // Font stuff
@@ -802,7 +813,7 @@ bool GuiApplication::x11EventFilter(XEvent * xev)
 
 frontend::FontLoader & theFontLoader()
 {
-       BOOST_ASSERT(frontend::guiApp);
+       LASSERT(frontend::guiApp, /**/);
        return frontend::guiApp->fontLoader();
 }
 
@@ -815,21 +826,27 @@ frontend::FontMetrics const & theFontMetrics(Font const & f)
 
 frontend::FontMetrics const & theFontMetrics(FontInfo const & f)
 {
-       BOOST_ASSERT(frontend::guiApp);
+       LASSERT(frontend::guiApp, /**/);
        return frontend::guiApp->fontLoader().metrics(f);
 }
 
 
+////////////////////////////////////////////////////////////////////
+//
+// Misc stuff
+//
+////////////////////////////////////////////////////////////////////
+
 frontend::Clipboard & theClipboard()
 {
-       BOOST_ASSERT(frontend::guiApp);
+       LASSERT(frontend::guiApp, /**/);
        return frontend::guiApp->clipboard();
 }
 
 
 frontend::Selection & theSelection()
 {
-       BOOST_ASSERT(frontend::guiApp);
+       LASSERT(frontend::guiApp, /**/);
        return frontend::guiApp->selection();
 }