]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiWorkArea.C
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / GuiWorkArea.C
index 48437bb1c9c3b7e9ae9a7d8dd714955e8fd24c09..dfbf30fbca6fe50b2bd944cbd47cb096678461b9 100644 (file)
@@ -13,8 +13,7 @@
 
 #include "GuiWorkArea.h"
 
-#include "Application.h"
-#include "ColorCache.h"
+#include "GuiApplication.h"
 #include "QLPainter.h"
 #include "QLyXKeySym.h"
 #include "qt_helpers.h"
@@ -129,9 +128,6 @@ GuiWorkArea::GuiWorkArea(int w, int h, LyXView & lyx_view)
 
        viewport()->setAutoFillBackground(false);
        viewport()->setAttribute(Qt::WA_OpaquePaintEvent);
-
-       viewport()->setFocusPolicy(Qt::WheelFocus);
-       viewport()->setFocus();
        setFocusPolicy(Qt::WheelFocus);
 
        viewport()->setCursor(Qt::IBeamCursor);
@@ -221,7 +217,7 @@ void GuiWorkArea::dropEvent(QDropEvent* event)
 
        lyxerr[Debug::GUI] << "GuiWorkArea::dropEvent: got URIs!" << endl;
        for (int i = 0; i!=files.size(); ++i) {
-               string const file = os::internal_path(fromqstr(files.at(i).toString()));
+               string const file = os::internal_path(fromqstr(files.at(i).toLocalFile()));
                if (!file.empty())
                        dispatch(FuncRequest(LFUN_FILE_OPEN, file));
        }
@@ -496,7 +492,7 @@ void GuiWorkArea::showCursor(int x, int y, int h, CursorShape shape)
 
        show_vcursor_ = true;
 
-       QColor const & required_color = lcolorcache.get(LColor::cursor);
+       QColor const & required_color = guiApp->colorCache().get(LColor::cursor);
 
        if (x==cursor_x_ && y==cursor_y_ && h==cursor_h_
                && cursor_color_ == required_color