Skip to content

Commit

Permalink
Remove anchient and broken workaround
Browse files Browse the repository at this point in the history
Summary: The Craft version of aspell is relocatable and this hack is not

Reviewers: #frameworks, #craft, leinir, apol

Reviewed By: leinir, apol

Subscribers: apol, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D9421
  • Loading branch information
TheOneRing committed Dec 20, 2017
1 parent bdc6562 commit d10d613
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
3 changes: 0 additions & 3 deletions src/plugins/aspell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ include_directories( ${ASPELL_INCLUDE_DIR})
set(sonnet_aspell_PART_SRCS aspellclient.cpp aspelldict.cpp)
ecm_qt_declare_logging_category(sonnet_aspell_PART_SRCS HEADER aspell_debug.h IDENTIFIER SONNET_LOG_ASPELL CATEGORY_NAME sonnet.plugins.aspell)

if(WIN32)
add_definitions(-DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
endif()
add_library(sonnet_aspell MODULE ${sonnet_aspell_PART_SRCS})

target_link_libraries(sonnet_aspell PRIVATE KF5::SonnetCore ${ASPELL_LIBRARIES})
Expand Down
15 changes: 0 additions & 15 deletions src/plugins/aspell/aspellclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,10 @@

using namespace Sonnet;

#ifdef Q_OS_WIN
#define ASPELL_DATA_ROOT "/lib/aspell-0.60/"

QString aspell_data_dir()
{
// TODO: is this still valid on Windows?
// A generated config-aspell.h (or config-kspell.h, if shared) should be added then, to define CMAKE_INSTALL_PREFIX
return QLatin1String(CMAKE_INSTALL_PREFIX ASPELL_DATA_ROOT);
}
#endif

ASpellClient::ASpellClient(QObject *parent)
: Client(parent)
{
m_config = new_aspell_config();
#ifdef Q_OS_WIN
aspell_config_replace(m_config, "data-dir", aspell_data_dir().toLocal8Bit().data());
aspell_config_replace(m_config, "dict-dir", aspell_data_dir().toLocal8Bit().data());
#endif
}

ASpellClient::~ASpellClient()
Expand Down
6 changes: 0 additions & 6 deletions src/plugins/aspell/aspelldict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ ASpellDict::ASpellDict(const QString &lang)
/* For reference, please look at BR#87250 */
aspell_config_replace(m_config, "encoding", "utf-8");

#ifdef Q_OS_WIN
QString aspell_data_dir();
aspell_config_replace(m_config, "data-dir", aspell_data_dir().toLocal8Bit().data());
aspell_config_replace(m_config, "dict-dir", aspell_data_dir().toLocal8Bit().data());
#endif

AspellCanHaveError *possible_err = new_aspell_speller(m_config);

if (aspell_error_number(possible_err) != 0) {
Expand Down

0 comments on commit d10d613

Please sign in to comment.