diff --git a/src/plugins/aspell/aspellclient.cpp b/src/plugins/aspell/aspellclient.cpp --- a/src/plugins/aspell/aspellclient.cpp +++ b/src/plugins/aspell/aspellclient.cpp @@ -24,13 +24,20 @@ #include "aspell_debug.h" #include +#ifdef Q_OS_WIN +#include +#endif using namespace Sonnet; ASpellClient::ASpellClient(QObject *parent) : Client(parent) { m_config = new_aspell_config(); +#ifdef Q_OS_WIN + aspell_config_replace(m_config, "data-dir", QString::fromLatin1("%1/data/aspell").arg(QCoreApplication::applicationDirPath()).toLatin1().constData()); + aspell_config_replace(m_config, "dict-dir", QString::fromLatin1("%1/data/aspell").arg(QCoreApplication::applicationDirPath()).toLatin1().constData()); +#endif } ASpellClient::~ASpellClient() diff --git a/src/plugins/aspell/aspelldict.cpp b/src/plugins/aspell/aspelldict.cpp --- a/src/plugins/aspell/aspelldict.cpp +++ b/src/plugins/aspell/aspelldict.cpp @@ -23,6 +23,9 @@ #include "aspell_debug.h" #include +#ifdef Q_OS_WIN +#include +#endif using namespace Sonnet; @@ -35,6 +38,11 @@ /* For reference, please look at BR#87250 */ aspell_config_replace(m_config, "encoding", "utf-8"); +#ifdef Q_OS_WIN + aspell_config_replace(m_config, "data-dir", QString::fromLatin1("%1/data/aspell").arg(QCoreApplication::applicationDirPath()).toLatin1().constData()); + aspell_config_replace(m_config, "dict-dir", QString::fromLatin1("%1/data/aspell").arg(QCoreApplication::applicationDirPath()).toLatin1().constData()); +#endif + AspellCanHaveError *possible_err = new_aspell_speller(m_config); if (aspell_error_number(possible_err) != 0) {