<commit_before>#include "Core.h"

#include <QApplication>
#include <QState>
#include <QDeclarativeEngine>
#include <QDeclarativeItem>
#include <QDeclarativeComponent>
#include <QDeclarativeContext>
#include <QDeclarativeError>
#include <QMetaType>
#include <QTimer>
#include <QList>

#include "macros.h"
#include "Settings.h"
#include "FaviconImageProvider.h"
#include "OrientationFollower.h"

#define ENGINE_BASEURL                    "qrc:/qmls/"
#define BROWSERVIEW_QML                   "BrowserView.qml"
#define BROWSERVIEW_QML_WEBVIEW_OBJ_NAME  "webView"
#define LOGBOOKVIEW_QML                   "LogbookView.qml"

// public:
Core::Core(MainView *mainView, QObject *parent) :
      QObject(parent),
      m_mainView(mainView),
      m_WebViewInterface(NULL),
      m_bookmarksModel(NULL),
      m_mostVisitedModel(NULL),
      m_historyModel(NULL),
      m_logbookViewComponent(NULL),
      m_logbookView(NULL),
      m_logbook(new Logbook())
{

   // Let's start tracking orientation
   OrientationFollower * orientation = new OrientationFollower(this);

   QDeclarativeContext *context = mainView->rootContext();
   context->setContextProperty("screenWidth", 800);
   context->setContextProperty("screenHeight", 480);
   context->setContextProperty("Orientation", orientation);
   context->setContextProperty("mainWindow", mainView);

   // Initialize Settings
   Settings::initSettings();<commit_msg>Fix width in other devices than n900<commit_after>#include "Core.h"

#include <QApplication>
#include <QState>
#include <QDeclarativeEngine>
#include <QDeclarativeItem>
#include <QDeclarativeComponent>
#include <QDeclarativeContext>
#include <QDeclarativeError>
#include <QMetaType>
#include <QTimer>
#include <QList>
#include <QDesktopWidget>

#include "macros.h"
#include "Settings.h"
#include "FaviconImageProvider.h"
#include "OrientationFollower.h"

#define ENGINE_BASEURL                    "qrc:/qmls/"
#define BROWSERVIEW_QML                   "BrowserView.qml"
#define BROWSERVIEW_QML_WEBVIEW_OBJ_NAME  "webView"
#define LOGBOOKVIEW_QML                   "LogbookView.qml"
#define DEFAULT_WIDTH                     800
#define DEFAULT_HEIGHT                    480

// public:
Core::Core(MainView *mainView, QObject *parent) :
      QObject(parent),
      m_mainView(mainView),
      m_WebViewInterface(NULL),
      m_bookmarksModel(NULL),
      m_mostVisitedModel(NULL),
      m_historyModel(NULL),
      m_logbookViewComponent(NULL),
      m_logbookView(NULL),
      m_logbook(new Logbook())
{

   // Let's start tracking orientation
   OrientationFollower * orientation = new OrientationFollower(this);

   QDeclarativeContext *context = mainView->rootContext();

#if defined(Q_OS_MAC) || defined(Q_OS_WIN32)
   //desktop build, defaults
   context->setContextProperty("screenWidth", DEFAULT_WIDTH);
   context->setContextProperty("screenHeight", DEFAULT_HEIGHT);
#else
   //TODO recognise whether Q_OS_LINUX is defined and understand whether is meego or desktop linux
   //mobile builds, we want the whole screen!
   context->setContextProperty("screenWidth", qApp->desktop()->width());
   context->setContextProperty("screenHeight", qApp->desktop()->height());
#endif

   context->setContextProperty("Orientation", orientation);
   context->setContextProperty("mainWindow", mainView);

   // Initialize Settings
   Settings::initSettings();
{'fraction_non_alphanumeric': 0.11385255648038049, 'fraction_numerical': 0.005053507728894174, 'mean_word_length': 4.453808752025932, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5261812', 'n_tokens_mistral': 1081, 'n_tokens_neox': 1018, 'n_words': 204}