diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-23 15:08:59 +0100 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-23 15:09:20 +0100 |
| commit | 061d58bc0fa016cfeed744fd3e4663460635d69b (patch) | |
| tree | ad9b8b032c803e1c9054c23fa1b7a0f1976bf98f /Source/WebKit2/qt/MainQt.cpp | |
| parent | 470286ecfe79d59df14944e5b5d34630fc739391 (diff) | |
| download | qtwebkit-061d58bc0fa016cfeed744fd3e4663460635d69b.tar.gz | |
Imported WebKit commit 8eb048315f36fa33731f28694630fe4a3c2cbc99 (http://svn.webkit.org/repository/webkit/trunk@135602)
New snapshot that fixes various bugs
Change-Id: Icb6ce541a26a9f500d087821ce4b83a8d8a5474a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebKit2/qt/MainQt.cpp')
| -rw-r--r-- | Source/WebKit2/qt/MainQt.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Source/WebKit2/qt/MainQt.cpp b/Source/WebKit2/qt/MainQt.cpp index 1e1ce2b3d..17ad8537d 100644 --- a/Source/WebKit2/qt/MainQt.cpp +++ b/Source/WebKit2/qt/MainQt.cpp @@ -42,8 +42,8 @@ typedef QApplication ApplicationType; namespace WebKit { Q_DECL_IMPORT int WebProcessMainQt(QGuiApplication*); -#if defined(HAVE_WEBKIT1) -Q_DECL_IMPORT void initializeWebKit2Theme(); +#if !defined(QT_NO_WIDGETS) +Q_DECL_IMPORT void initializeWebKitWidgets(); #endif } @@ -82,15 +82,20 @@ int main(int argc, char** argv) } #endif -#if defined(HAVE_WEBKIT1) - WebKit::initializeWebKit2Theme(); -#endif - // Has to be done before QApplication is constructed in case // QApplication itself produces debug output. QByteArray suppressOutput = qgetenv("QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT"); if (!suppressOutput.isEmpty() && suppressOutput != "0") qInstallMessageHandler(messageHandler); - return WebKit::WebProcessMainQt(new ApplicationType(argc, argv)); + // QApplication must be created before we call initializeWebKitWidgets() so that + // the standard pixmaps can be fetched from the style. + ApplicationType* appInstance = new ApplicationType(argc, argv); + +#if !defined(QT_NO_WIDGETS) + if (qgetenv("QT_WEBKIT_THEME_NAME") == "qstyle") + WebKit::initializeWebKitWidgets(); +#endif + + return WebKit::WebProcessMainQt(appInstance); } |
