1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

[spellcheck] Enable SpellCheck on Windows by default.

This commit is contained in:
nowrep 2013-02-06 13:11:26 +01:00
parent 785b9fcdbe
commit 7c9d7fd25c
4 changed files with 33 additions and 15 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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
}

View File

@ -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()