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) ...@@ -441,13 +441,17 @@ endif(Vorbis_FOUND)
# QtSpell # QtSpell
# https://github.com/manisandro/qtspell # https://github.com/manisandro/qtspell
# #
find_package(QtSpell REQUIRED) if (LINUX)
if (QTSPELL_FOUND) find_package(QtSpell REQUIRED)
include_directories(${QTSPELL_INCLUDE_DIRS}) if (QTSPELL_FOUND)
set(LIBS ${LIBS} ${QTSPELL_LIBRARIES}) include_directories(${QTSPELL_INCLUDE_DIRS})
else() set(LIBS ${LIBS} ${QTSPELL_LIBRARIES})
message(STATUS "The 'QtSpell' spelling libraries have been configured!") add_definitions(-DGFYRE_ENBL_QTSPELL_LIBS)
endif(QTSPELL_FOUND) 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/ # https://xiph.org/vorbis/
......
Subproject commit 1f91bdb7a680d67e4e9387f7916cf51e8f35c474 Subproject commit 645717241f4a952d05eab50e1bfb990a3d3d8b53
...@@ -871,7 +871,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi ...@@ -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); QPointer<GkPlainTextSubmit> widget_mesg_outgoing = new GkPlainTextSubmit(ui->frame_mesg_log);
ui->verticalLayout_3->addWidget(widget_mesg_outgoing); ui->verticalLayout_3->addWidget(widget_mesg_outgoing);
#ifdef GFYRE_ENBL_QTSPELL_LIBS
m_spellChecker->setTextEdit(widget_mesg_outgoing); m_spellChecker->setTextEdit(widget_mesg_outgoing);
#endif
widget_mesg_outgoing->setTabChangesFocus(true); widget_mesg_outgoing->setTabChangesFocus(true);
widget_mesg_outgoing->setPlaceholderText(tr("Enter your outgoing messages here...")); widget_mesg_outgoing->setPlaceholderText(tr("Enter your outgoing messages here..."));
QObject::connect(widget_mesg_outgoing, SIGNAL(execFuncAfterEvent(const QString &)), QObject::connect(widget_mesg_outgoing, SIGNAL(execFuncAfterEvent(const QString &)),
...@@ -2201,13 +2203,17 @@ void MainWindow::readEnchantSettings() ...@@ -2201,13 +2203,17 @@ void MainWindow::readEnchantSettings()
curr_chosen_dict = Filesystem::enchantSpellDefLang; // Default language dictionary to use if none has been specified! 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 = new QtSpell::TextEditChecker(this);
m_spellChecker->setDecodeLanguageCodes(true); m_spellChecker->setDecodeLanguageCodes(true);
m_spellChecker->setShowCheckSpellingCheckbox(true); m_spellChecker->setShowCheckSpellingCheckbox(true);
m_spellChecker->setUndoRedoEnabled(true); m_spellChecker->setUndoRedoEnabled(true);
#endif
if (!curr_chosen_dict.isEmpty()) { if (!curr_chosen_dict.isEmpty()) {
#ifdef GFYRE_ENBL_QTSPELL_LIBS
m_spellChecker->setLanguage(curr_chosen_dict); m_spellChecker->setLanguage(curr_chosen_dict);
#endif
} }
} catch (const std::exception &e) { } catch (const std::exception &e) {
std::throw_with_nested(std::runtime_error(e.what())); std::throw_with_nested(std::runtime_error(e.what()));
......
...@@ -474,7 +474,11 @@ private: ...@@ -474,7 +474,11 @@ private:
// //
// Spell-checking, dictionaries, etc. // Spell-checking, dictionaries, etc.
// //
#ifdef GFYRE_ENBL_QTSPELL_LIBS
QPointer<QtSpell::TextEditChecker> m_spellChecker; QPointer<QtSpell::TextEditChecker> m_spellChecker;
#else
void *m_spellChecker;
#endif
// //
// QFileDialog related // 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