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 Microsoft Windows
---------------------------------------------------------------------------------- ----------------------------------------------------------------------------------
You need Microsoft Visual C++ Compiler 2008 or higher and Qt Libraries 4.7.0 You need Microsoft Visual C++ Compiler 2010 or higher, Qt Libraries 4.8.0
or higher in order to build QupZilla. or higher, QtWebKit 2.3 or higher and Hunspell library in order to build QupZilla.
Building with Microsoft Visual C++ Compiler 2010 is possible only with Qt 4.8.0 It is possible, with small changes, to build also with older Microsoft compilers
and higher. If you try to compile with Qt 4.7, you will get random crashes when or without Hunspell spellchecking.
running QupZilla. However, it is not expected from Windows users to build their software, so only
Building with MingW is perhaps possible too, but MingW QtWebKit crashes with one configuration is supported by default.
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.
Linux / Unix Linux / Unix
---------------------------------------------------------------------------------- ----------------------------------------------------------------------------------
@ -84,6 +81,7 @@ Available Defines
USE_WEBGL Enable WebGL. You need to build QupZilla with WebKit built USE_WEBGL Enable WebGL. You need to build QupZilla with WebKit built
with WebGL support, otherwise you won't be able to compile with WebGL support, otherwise you won't be able to compile
without errors. without errors.
Only for QtWebKit lower than 2.3
(disabled by default) (disabled by default)
example: example:

View File

@ -37,7 +37,17 @@ Compiling
---------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------
Before you start compiling, make sure that you have installed the Qt (>=4.7) development libraries 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: Then you can start compiling by running this commands:

View File

@ -8,7 +8,19 @@ SOURCES += $$PWD/qtwebkitplugin.cpp \
DEFINES *= QT_STATICPLUGIN DEFINES *= QT_STATICPLUGIN
unix:contains(DEFINES, USE_QTWEBKIT_2_3):system(pkg-config --exists hunspell) { 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 \ HEADERS += $$PWD/spellcheck/spellcheck.h \
$$PWD/spellcheck/speller.h \ $$PWD/spellcheck/speller.h \
$$PWD/spellcheck/spellcheckdialog.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 FORMS += $$PWD/spellcheck/spellcheckdialog.ui
DEFINES *= USE_HUNSPELL 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) void WebView::createSpellCheckContextMenu(QMenu* menu)
{ {
Q_UNUSED(menu)
#ifdef USE_HUNSPELL
menu->addSeparator(); menu->addSeparator();
QAction* act = menu->addAction(tr("Check &Spelling"), mApp->speller(), SLOT(toggleEnableSpellChecking())); QAction* act = menu->addAction(tr("Check &Spelling"), mApp->speller(), SLOT(toggleEnableSpellChecking()));
@ -1046,6 +1048,7 @@ void WebView::createSpellCheckContextMenu(QMenu* menu)
} }
menu->addSeparator(); menu->addSeparator();
#endif
} }
void WebView::pauseMedia() void WebView::pauseMedia()