diff --git a/BUILDING b/BUILDING index 867008a98..54853a994 100644 --- a/BUILDING +++ b/BUILDING @@ -21,15 +21,12 @@ General Microsoft Windows ---------------------------------------------------------------------------------- - You need Microsoft Visual C++ Compiler 2008 or higher and Qt Libraries 4.7.0 - or higher in order to build QupZilla. - Building with Microsoft Visual C++ Compiler 2010 is possible only with Qt 4.8.0 - and higher. If you try to compile with Qt 4.7, you will get random crashes when - running QupZilla. - Building with MingW is perhaps possible too, but MingW QtWebKit crashes with - every Flash, so MingW is not officially supported. - If you don't meet this, please use precompiled version, which is also in smart - windows installer. + You need Microsoft Visual C++ Compiler 2010 or higher, Qt Libraries 4.8.0 + or higher, QtWebKit 2.3 or higher and Hunspell library in order to build QupZilla. + It is possible, with small changes, to build also with older Microsoft compilers + or without Hunspell spellchecking. + However, it is not expected from Windows users to build their software, so only + one configuration is supported by default. Linux / Unix ---------------------------------------------------------------------------------- @@ -84,6 +81,7 @@ Available Defines USE_WEBGL Enable WebGL. You need to build QupZilla with WebKit built with WebGL support, otherwise you won't be able to compile without errors. + Only for QtWebKit lower than 2.3 (disabled by default) example: diff --git a/README.md b/README.md index 7e09ef526..9acf002f1 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,17 @@ Compiling ---------------------------------------------------------------------------------------- Before you start compiling, make sure that you have installed the Qt (>=4.7) development libraries -and you have read the BUILDING information. +and you have read the BUILDING information. + +**Linux** + + * pkg-config is optional (to correctly detect versions of QtWebKit) + * pkg-config is required for Hunspell spellcheck + * Hunspell developer package for spellcheck + +**Windows** + * QtWebKit 2.3 is required + * Hunspell library is required for spellcheck Then you can start compiling by running this commands: diff --git a/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri b/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri index 1c80a789c..43a5a3ad1 100644 --- a/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri +++ b/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri @@ -8,7 +8,19 @@ SOURCES += $$PWD/qtwebkitplugin.cpp \ DEFINES *= QT_STATICPLUGIN + unix:contains(DEFINES, USE_QTWEBKIT_2_3):system(pkg-config --exists hunspell) { + buildSpellcheck = true + LIBS += $$system(pkg-config --libs hunspell) +} + +win { + # QtWebKit 2.3 and Hunspell is now needed to build on Windows + buildSpellcheck = true + LIBS += $PWD/../../../../bin/libhunspell.dll +} + +equals(buildSpellcheck, true) { HEADERS += $$PWD/spellcheck/spellcheck.h \ $$PWD/spellcheck/speller.h \ $$PWD/spellcheck/spellcheckdialog.h \ @@ -20,9 +32,4 @@ unix:contains(DEFINES, USE_QTWEBKIT_2_3):system(pkg-config --exists hunspell) { FORMS += $$PWD/spellcheck/spellcheckdialog.ui DEFINES *= USE_HUNSPELL - LIBS += $$system(pkg-config --libs hunspell) -} - -win{ -# TODO } diff --git a/src/lib/webview/webview.cpp b/src/lib/webview/webview.cpp index 09c9cabf8..ed3e55178 100644 --- a/src/lib/webview/webview.cpp +++ b/src/lib/webview/webview.cpp @@ -1034,6 +1034,8 @@ void WebView::createMediaContextMenu(QMenu* menu, const QWebHitTestResult &hitTe void WebView::createSpellCheckContextMenu(QMenu* menu) { + Q_UNUSED(menu) +#ifdef USE_HUNSPELL menu->addSeparator(); QAction* act = menu->addAction(tr("Check &Spelling"), mApp->speller(), SLOT(toggleEnableSpellChecking())); @@ -1046,6 +1048,7 @@ void WebView::createSpellCheckContextMenu(QMenu* menu) } menu->addSeparator(); +#endif } void WebView::pauseMedia()