Commit dbb4deb1 authored by Phobos D'thorga's avatar Phobos D'thorga 🐲
Browse files

* Had to revert Hamlib libraries to an older Git revision, for compatibility with pre-existing Small World Deluxe code.
* Disabled the use of QtSpell code thus far under Microsoft Windows systems (needs testing to ensure these changes work).
parent d2106293
Pipeline #983 passed with stages
in 29 minutes and 28 seconds
......@@ -441,13 +441,17 @@ endif(Vorbis_FOUND)
# QtSpell
# https://github.com/manisandro/qtspell
#
find_package(QtSpell REQUIRED)
if (QTSPELL_FOUND)
include_directories(${QTSPELL_INCLUDE_DIRS})
set(LIBS ${LIBS} ${QTSPELL_LIBRARIES})
else()
message(STATUS "The 'QtSpell' spelling libraries have been configured!")
endif(QTSPELL_FOUND)
if (LINUX)
find_package(QtSpell REQUIRED)
if (QTSPELL_FOUND)
include_directories(${QTSPELL_INCLUDE_DIRS})
set(LIBS ${LIBS} ${QTSPELL_LIBRARIES})
add_definitions(-DGFYRE_ENBL_QTSPELL_LIBS)
message(STATUS "The 'QtSpell' spelling libraries have been configured!")
else()
message(FATAL_ERROR "The 'QtSpell' spelling libraries could not be found!")
endif(QTSPELL_FOUND)
endif()
#
# https://xiph.org/vorbis/
......
Subproject commit 1f91bdb7a680d67e4e9387f7916cf51e8f35c474
Subproject commit 645717241f4a952d05eab50e1bfb990a3d3d8b53
......@@ -871,7 +871,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
//
QPointer<GkPlainTextSubmit> widget_mesg_outgoing = new GkPlainTextSubmit(ui->frame_mesg_log);
ui->verticalLayout_3->addWidget(widget_mesg_outgoing);
#ifdef GFYRE_ENBL_QTSPELL_LIBS
m_spellChecker->setTextEdit(widget_mesg_outgoing);
#endif
widget_mesg_outgoing->setTabChangesFocus(true);
widget_mesg_outgoing->setPlaceholderText(tr("Enter your outgoing messages here..."));
QObject::connect(widget_mesg_outgoing, SIGNAL(execFuncAfterEvent(const QString &)),
......@@ -2201,13 +2203,17 @@ void MainWindow::readEnchantSettings()
curr_chosen_dict = Filesystem::enchantSpellDefLang; // Default language dictionary to use if none has been specified!
}
#ifdef GFYRE_ENBL_QTSPELL_LIBS
m_spellChecker = new QtSpell::TextEditChecker(this);
m_spellChecker->setDecodeLanguageCodes(true);
m_spellChecker->setShowCheckSpellingCheckbox(true);
m_spellChecker->setUndoRedoEnabled(true);
#endif
if (!curr_chosen_dict.isEmpty()) {
#ifdef GFYRE_ENBL_QTSPELL_LIBS
m_spellChecker->setLanguage(curr_chosen_dict);
#endif
}
} catch (const std::exception &e) {
std::throw_with_nested(std::runtime_error(e.what()));
......
......@@ -474,7 +474,11 @@ private:
//
// Spell-checking, dictionaries, etc.
//
#ifdef GFYRE_ENBL_QTSPELL_LIBS
QPointer<QtSpell::TextEditChecker> m_spellChecker;
#else
void *m_spellChecker;
#endif
//
// QFileDialog related
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment