Skip to content

Commit

Permalink
scide: enable local storage for QtWebKit
Browse files Browse the repository at this point in the history
Fixes issue #544 and issue #545
  • Loading branch information
jleben committed Sep 27, 2012
1 parent 3676234 commit be5dcda
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions editors/sc-ide/core/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <QFileOpenEvent>
#include <QLibraryInfo>
#include <QTranslator>
#include <QWebSettings>

using namespace ScIDE;

Expand All @@ -46,10 +47,14 @@ int main( int argc, char *argv[] )
QStringList arguments (QApplication::arguments());
arguments.pop_front(); // application path

// Pass files to existing instance and quit

SingleInstanceGuard guard;
if (guard.tryConnect(arguments))
return 0;

// Set up translations

QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
app.installTranslator(&qtTranslator);
Expand All @@ -58,6 +63,12 @@ int main( int argc, char *argv[] )
scideTranslator.load("scide_" + QLocale::system().name());
app.installTranslator(&scideTranslator);

// QtWebKit settings

QWebSettings::globalSettings()->setAttribute( QWebSettings::LocalStorageEnabled, true );

// Go...

Main * main = Main::instance();

MainWindow *win = new MainWindow(main);
Expand Down

0 comments on commit be5dcda

Please sign in to comment.