Verified Commit 0f1da8fe authored by Phobos D'thorga's avatar Phobos D'thorga 🐲
Browse files

* Had to remove QtSpell dependency from Small World Deluxe project due to...

* Had to remove QtSpell dependency from Small World Deluxe project due to gross incompatibility with Microsoft Windows systems.
parent dbb4deb1
Pipeline #986 passed with stages
in 24 minutes and 40 seconds
......@@ -43,9 +43,6 @@
[submodule "src/contrib/nuspell"]
path = src/contrib/nuspell
url = https://github.com/nuspell/nuspell.git
[submodule "src/contrib/qtspell"]
path = src/contrib/qtspell
url = https://github.com/manisandro/qtspell.git
[submodule "src/contrib/curl"]
path = src/contrib/curl
url = https://github.com/curl/curl.git
......@@ -437,22 +437,6 @@ else()
message(FATAL_ERROR "The 'Vorbis' audio (de-/en-)coding library could not be found!")
endif(Vorbis_FOUND)
#
# QtSpell
# https://github.com/manisandro/qtspell
#
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/
#
......
......@@ -66,10 +66,6 @@ Enchant by Reuben Thomas et al.
<https://github.com/AbiWord/enchant>
GNU Lesser General Public License (LGPL, version 2.1)
QtSpell by Sandro Mani
<https://github.com/manisandro/qtspell>
GNU General Public License (GPL, version 3)
AudioFile by Adam Stark
<https://github.com/adamstark/AudioFile>
GNU General Public License (GPL, version 3)
......
......@@ -24,7 +24,6 @@
<p><code>SingleApplication -- Copyright © 2015 - 2020 Itay Grudev.</code></p>
<p><code>KissFFT -- Copyright © 2003 - 2010 Mark Borgerding . All rights reserved.</code></p>
<p><code>Enchant -- Copyright © 1998 - 2020 AbiSource Community. All rights reserved.</code></p>
<p><code>QtSpell - Copyright © 2014 Sandro Mani.</code></p>
<p><code>QwtWaterfallplot -- Copyright © 2019 Amine Mzoughi.</code></p>
<hr />
<pre><code>Opus
......
......@@ -31,8 +31,6 @@ Please see [CREDITS](https://code.gekkofyre.io/amateur-radio/small-world-deluxe/
`Enchant -- Copyright © 1998 - 2020 AbiSource Community. All rights reserved.`
`QtSpell - Copyright © 2014 Sandro Mani.`
`QwtWaterfallplot -- Copyright © 2019 Amine Mzoughi.`
------
......
Subproject commit e9b3465a4c41eb5cb413a41e32f369347a237ded
......@@ -104,7 +104,6 @@ DialogSettings::DialogSettings(QPointer<GkLevelDb> dkDb,
QPointer<GekkoFyre::GkXmppClient> xmppClient,
QPointer<GekkoFyre::GkEventLogger> eventLogger,
QPointer<GekkoFyre::GkTextToSpeech> textToSpeechPtr,
QPointer<QtSpell::TextEditChecker> spellChecking,
const System::UserInterface::GkSettingsDlgTab &settingsDlgTab,
QWidget *parent)
: QDialog(parent), ui(new Ui::DialogSettings)
......@@ -128,8 +127,6 @@ DialogSettings::DialogSettings(QPointer<GkLevelDb> dkDb,
gkTextToSpeech = std::move(textToSpeechPtr);
gkSerialPortMap = com_ports;
m_spellChecker = std::move(spellChecking);
gkAudioInput = audioSysInput;
gkAudioOutput = audioSysOutput;
avail_input_audio_devs = gkAvailInputDevs;
......@@ -961,13 +958,6 @@ void DialogSettings::prefill_uri_lookup_method()
*/
void DialogSettings::prefill_lang_dictionaries()
{
auto langList = m_spellChecker->getLanguageList();
for (const auto &lang: langList) {
if (!lang.isEmpty()) {
ui->comboBox_accessibility_dict->addItem(lang);
}
}
return;
}
......
......@@ -45,7 +45,6 @@
#include "src/gk_string_funcs.hpp"
#include "src/gk_text_to_speech.hpp"
#include "src/models/tableview/gk_frequency_model.hpp"
#include <QtSpell.hpp>
#include <boost/logic/tribool.hpp>
#include <list>
#include <tuple>
......@@ -96,7 +95,6 @@ public:
QPointer<GekkoFyre::GkXmppClient> xmppClient,
QPointer<GekkoFyre::GkEventLogger> eventLogger,
QPointer<GekkoFyre::GkTextToSpeech> textToSpeechPtr,
QPointer<QtSpell::TextEditChecker> spellChecking,
const GekkoFyre::System::UserInterface::GkSettingsDlgTab &settingsDlgTab = GekkoFyre::System::UserInterface::GkSettingsDlgTab::GkGeneralStation,
QWidget *parent = nullptr);
~DialogSettings() override;
......@@ -354,7 +352,7 @@ private:
//
// Spell-checking, dictionaries, etc.
//
QPointer<QtSpell::TextEditChecker> m_spellChecker;
// QPointer<QtSpell::TextEditChecker> m_spellChecker;
void prefill_audio_devices();
void prefill_audio_encode_comboboxes();
......
......@@ -871,9 +871,7 @@ 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
// m_spellChecker->setTextEdit(widget_mesg_outgoing);
widget_mesg_outgoing->setTabChangesFocus(true);
widget_mesg_outgoing->setPlaceholderText(tr("Enter your outgoing messages here..."));
QObject::connect(widget_mesg_outgoing, SIGNAL(execFuncAfterEvent(const QString &)),
......@@ -917,7 +915,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
//
// Initialize the QXmpp client!
m_xmppClient = new GkXmppClient(gkConnDetails, gkDb, gkStringFuncs, gkFileIo, gkEventLogger, false, nullptr);
gkXmppRosterDlg = new GkXmppRosterDialog(gkStringFuncs, gkConnDetails, m_xmppClient, gkDb, m_spellChecker, gkEventLogger, true, this);
gkXmppRosterDlg = new GkXmppRosterDialog(gkStringFuncs, gkConnDetails, m_xmppClient, gkDb, gkEventLogger, true, this);
} catch (const std::exception &e) {
QMessageBox::warning(this, tr("Error!"), tr("An error was encountered upon launch!\n\n%1").arg(e.what()), QMessageBox::Ok);
QApplication::exit(EXIT_FAILURE);
......@@ -1066,7 +1064,7 @@ void MainWindow::launchSettingsWin(const System::UserInterface::GkSettingsDlgTab
pref_input_device, pref_output_device, gkRadioLibs,
gkStringFuncs, gkRadioPtr, gkSerialPortMap, gkUsbPortMap,
gkFreqList, gkFreqTableModel, gkConnDetails, m_xmppClient,
gkEventLogger, gkTextToSpeech, m_spellChecker, settingsDlgTab, this);
gkEventLogger, gkTextToSpeech, settingsDlgTab, this);
dlg_settings->setWindowFlags(Qt::Window);
dlg_settings->setAttribute(Qt::WA_DeleteOnClose, true);
QObject::connect(dlg_settings, SIGNAL(destroyed(QObject*)), this, SLOT(show()));
......@@ -2203,17 +2201,8 @@ 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
// m_spellChecker->setLanguage(curr_chosen_dict);
}
} catch (const std::exception &e) {
std::throw_with_nested(std::runtime_error(e.what()));
......
......@@ -65,7 +65,6 @@
#include <leveldb/db.h>
#include <leveldb/status.h>
#include <leveldb/options.h>
#include <QtSpell.hpp>
#include <stdexcept>
#include <exception>
#include <utility>
......@@ -474,11 +473,7 @@ private:
//
// Spell-checking, dictionaries, etc.
//
#ifdef GFYRE_ENBL_QTSPELL_LIBS
QPointer<QtSpell::TextEditChecker> m_spellChecker;
#else
void *m_spellChecker;
#endif
// QPointer<QtSpell::TextEditChecker> m_spellChecker;
//
// QFileDialog related
......
......@@ -93,8 +93,7 @@ bool GkPlainTextKeyEnter::eventFilter(QObject *obj, QEvent *event)
* @param parent The parent to this dialog.
*/
GkXmppMessageDialog::GkXmppMessageDialog(QPointer<GekkoFyre::StringFuncs> stringFuncs, QPointer<GekkoFyre::GkEventLogger> eventLogger,
QPointer<GekkoFyre::GkLevelDb> database, QPointer<QtSpell::TextEditChecker> spellChecking,
const GekkoFyre::Network::GkXmpp::GkUserConn &connection_details,
QPointer<GekkoFyre::GkLevelDb> database, const GekkoFyre::Network::GkXmpp::GkUserConn &connection_details,
QPointer<GekkoFyre::GkXmppClient> xmppClient, const QStringList &bareJids,
QWidget *parent) : QDialog(parent), ui(new Ui::GkXmppMessageDialog)
{
......@@ -105,7 +104,6 @@ GkXmppMessageDialog::GkXmppMessageDialog(QPointer<GekkoFyre::StringFuncs> string
gkEventLogger = std::move(eventLogger);
gkDb = std::move(database);
gkConnDetails = connection_details;
m_spellChecker = std::move(spellChecking);
m_xmppClient = std::move(xmppClient);
m_bareJids = bareJids;
......
......@@ -46,7 +46,6 @@
#include "src/gk_xmpp_client.hpp"
#include "src/gk_string_funcs.hpp"
#include "src/models/tableview/gk_xmpp_recv_msgs_model.hpp"
#include <QtSpell.hpp>
#include <qxmpp/QXmppMessage.h>
#include <queue>
#include <mutex>
......@@ -81,8 +80,7 @@ class GkXmppMessageDialog : public QDialog
public:
explicit GkXmppMessageDialog(QPointer<GekkoFyre::StringFuncs> stringFuncs, QPointer<GekkoFyre::GkEventLogger> eventLogger,
QPointer<GekkoFyre::GkLevelDb> database, QPointer<QtSpell::TextEditChecker> spellChecking,
const GekkoFyre::Network::GkXmpp::GkUserConn &connection_details,
QPointer<GekkoFyre::GkLevelDb> database, const GekkoFyre::Network::GkXmpp::GkUserConn &connection_details,
QPointer<GekkoFyre::GkXmppClient> xmppClient, const QStringList &bareJids,
QWidget *parent = nullptr);
~GkXmppMessageDialog();
......@@ -139,7 +137,7 @@ private:
//
// Spell-checking, dictionaries, etc.
//
QPointer<QtSpell::TextEditChecker> m_spellChecker;
// QPointer<QtSpell::TextEditChecker> m_spellChecker;
//
// Multithreading, mutexes, etc.
......
......@@ -74,9 +74,8 @@ using namespace Security;
GkXmppRosterDialog::GkXmppRosterDialog(QPointer<GekkoFyre::StringFuncs> stringFuncs, const GkUserConn &connection_details,
QPointer<GekkoFyre::GkXmppClient> xmppClient, QPointer<GekkoFyre::GkLevelDb> database,
QPointer<QtSpell::TextEditChecker> spellChecking, QPointer<GkEventLogger> eventLogger,
const bool &skipConnectionCheck, QWidget *parent) : shownXmppPreviewNotice(false),
QDialog(parent), ui(new Ui::GkXmppRosterDialog)
QPointer<GkEventLogger> eventLogger, const bool &skipConnectionCheck,
QWidget *parent) : shownXmppPreviewNotice(false), QDialog(parent), ui(new Ui::GkXmppRosterDialog)
{
ui->setupUi(this);
......@@ -85,7 +84,6 @@ GkXmppRosterDialog::GkXmppRosterDialog(QPointer<GekkoFyre::StringFuncs> stringFu
gkConnDetails = connection_details;
m_xmppClient = std::move(xmppClient);
gkDb = std::move(database);
m_spellChecker = std::move(spellChecking);
gkEventLogger = std::move(eventLogger);
m_progressBar = new QProgressBar(nullptr);
......@@ -730,7 +728,7 @@ void GkXmppRosterDialog::launchMsgDlg(const QString &bareJid)
{
QStringList bareJids;
bareJids << bareJid;
QPointer<GkXmppMessageDialog> gkXmppMsgDlg = new GkXmppMessageDialog(gkStringFuncs, gkEventLogger, gkDb, m_spellChecker, gkConnDetails, m_xmppClient, bareJids, this);
QPointer<GkXmppMessageDialog> gkXmppMsgDlg = new GkXmppMessageDialog(gkStringFuncs, gkEventLogger, gkDb, gkConnDetails, m_xmppClient, bareJids, this);
if (gkXmppMsgDlg) {
if (!gkXmppMsgDlg->isVisible()) {
gkXmppMsgDlg->setWindowFlags(Qt::Window);
......@@ -750,7 +748,7 @@ void GkXmppRosterDialog::launchMsgDlg(const QString &bareJid)
*/
void GkXmppRosterDialog::launchMsgDlg(const QStringList &bareJids)
{
QPointer<GkXmppMessageDialog> gkXmppMsgDlg = new GkXmppMessageDialog(gkStringFuncs, gkEventLogger, gkDb, m_spellChecker, gkConnDetails, m_xmppClient, bareJids, this);
QPointer<GkXmppMessageDialog> gkXmppMsgDlg = new GkXmppMessageDialog(gkStringFuncs, gkEventLogger, gkDb, gkConnDetails, m_xmppClient, bareJids, this);
if (gkXmppMsgDlg) {
if (!gkXmppMsgDlg->isVisible()) {
gkXmppMsgDlg->setWindowFlags(Qt::Window);
......
......@@ -49,7 +49,6 @@
#include "src/models/tableview/gk_xmpp_roster_pending_model.hpp"
#include "src/models/tableview/gk_xmpp_roster_blocked_model.hpp"
#include "src/gk_logger.hpp"
#include <QtSpell.hpp>
#include <memory>
#include <QImage>
#include <QTimer>
......@@ -75,8 +74,8 @@ class GkXmppRosterDialog : public QDialog
public:
explicit GkXmppRosterDialog(QPointer<GekkoFyre::StringFuncs> stringFuncs, const GekkoFyre::Network::GkXmpp::GkUserConn &connection_details,
QPointer<GekkoFyre::GkXmppClient> xmppClient, QPointer<GekkoFyre::GkLevelDb> database,
QPointer<QtSpell::TextEditChecker> spellChecking, QPointer<GekkoFyre::GkEventLogger> eventLogger,
const bool &skipConnectionCheck = false, QWidget *parent = nullptr);
QPointer<GekkoFyre::GkEventLogger> eventLogger, const bool &skipConnectionCheck = false,
QWidget *parent = nullptr);
~GkXmppRosterDialog();
private slots:
......@@ -192,7 +191,7 @@ private:
//
// Spell-checking, dictionaries, etc.
//
QPointer<QtSpell::TextEditChecker> m_spellChecker;
// QPointer<QtSpell::TextEditChecker> m_spellChecker;
//
// QXmpp and XMPP 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