]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiApplication.cpp
Compil fix.
[lyx.git] / src / frontends / qt4 / GuiApplication.cpp
index 8ef56090ad73d93487ccc938b0368a7d2530ecac..eaeb6e138aeca5109e414841280eae804fbd632a 100644 (file)
@@ -22,7 +22,7 @@
 #include "GuiView.h"
 #include "Menus.h"
 #include "qt_helpers.h"
-#include "ToolbarBackend.h"
+#include "Toolbars.h"
 
 #include "frontends/alert.h"
 #include "frontends/Application.h"
@@ -186,7 +186,7 @@ public:
        QString flavorFor(QString const & mime)
        {
                LYXERR(Debug::ACTION, "flavorFor " << mime);
-               if (mime == QLatin1String(pdfMimeType()))
+               if (mime == pdfMimeType())
                        return QLatin1String("com.adobe.pdf");
                return QString();
        }
@@ -195,7 +195,7 @@ public:
        {
                LYXERR(Debug::ACTION, "mimeFor " << flav);
                if (flav == QLatin1String("com.adobe.pdf"))
-                       return QLatin1String(pdfMimeType());
+                       return pdfMimeType();
                return QString();
        }
 
@@ -356,6 +356,10 @@ struct GuiApplication::Private
        QHash<int, SocketNotifier *> socket_notifiers_;
        ///
        Menus menus_;
+       ///
+       /// The global instance
+       Toolbars toolbars_;
+
        /// this timer is used for any regular events one wants to
        /// perform. at present it is used to check if forked processes
        /// are done.
@@ -706,6 +710,18 @@ FontLoader & GuiApplication::fontLoader()
 }
 
 
+Toolbars const & GuiApplication::toolbars() const 
+{
+       return d->toolbars_;
+}
+
+
+Toolbars & GuiApplication::toolbars()
+{
+       return d->toolbars_; 
+}
+
+
 Menus const & GuiApplication::menus() const 
 {
        return d->menus_;
@@ -1107,11 +1123,11 @@ bool GuiApplication::readUIFile(QString const & name, bool include)
                        break;
 
                case ui_toolbarset:
-                       toolbarbackend.readToolbars(lex);
+                       d->toolbars_.readToolbars(lex);
                        break;
 
                case ui_toolbars:
-                       toolbarbackend.readToolbarSettings(lex);
+                       d->toolbars_.readToolbarSettings(lex);
                        break;
 
                default: