Verified Commit 48336deb authored by Phobos D'thorga's avatar Phobos D'thorga 🐲
Browse files

Merge branch 'develop'

parents aad9089c fe62e239
Pipeline #990 passed with stages
in 30 minutes and 35 seconds
...@@ -43,9 +43,6 @@ ...@@ -43,9 +43,6 @@
[submodule "src/contrib/nuspell"] [submodule "src/contrib/nuspell"]
path = src/contrib/nuspell path = src/contrib/nuspell
url = https://github.com/nuspell/nuspell.git 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"] [submodule "src/contrib/curl"]
path = src/contrib/curl path = src/contrib/curl
url = https://github.com/curl/curl.git url = https://github.com/curl/curl.git
...@@ -437,22 +437,6 @@ else() ...@@ -437,22 +437,6 @@ else()
message(FATAL_ERROR "The 'Vorbis' audio (de-/en-)coding library could not be found!") message(FATAL_ERROR "The 'Vorbis' audio (de-/en-)coding library could not be found!")
endif(Vorbis_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/ # https://xiph.org/vorbis/
# #
......
...@@ -66,10 +66,6 @@ Enchant by Reuben Thomas et al. ...@@ -66,10 +66,6 @@ Enchant by Reuben Thomas et al.
<https://github.com/AbiWord/enchant> <https://github.com/AbiWord/enchant>
GNU Lesser General Public License (LGPL, version 2.1) 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 AudioFile by Adam Stark
<https://github.com/adamstark/AudioFile> <https://github.com/adamstark/AudioFile>
GNU General Public License (GPL, version 3) GNU General Public License (GPL, version 3)
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
<p><code>SingleApplication -- Copyright © 2015 - 2020 Itay Grudev.</code></p> <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>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>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> <p><code>QwtWaterfallplot -- Copyright © 2019 Amine Mzoughi.</code></p>
<hr /> <hr />
<pre><code>Opus <pre><code>Opus
......
...@@ -31,8 +31,6 @@ Please see [CREDITS](https://code.gekkofyre.io/amateur-radio/small-world-deluxe/ ...@@ -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.` `Enchant -- Copyright © 1998 - 2020 AbiSource Community. All rights reserved.`
`QtSpell - Copyright © 2014 Sandro Mani.`
`QwtWaterfallplot -- Copyright © 2019 Amine Mzoughi.` `QwtWaterfallplot -- Copyright © 2019 Amine Mzoughi.`
------ ------
......
Subproject commit e9b3465a4c41eb5cb413a41e32f369347a237ded
...@@ -256,6 +256,9 @@ namespace GekkoFyre { ...@@ -256,6 +256,9 @@ namespace GekkoFyre {
#define GK_EVENTLOG_SEVERITY_ERROR_IDX (5) #define GK_EVENTLOG_SEVERITY_ERROR_IDX (5)
#define GK_EVENTLOG_SEVERITY_FATAL_IDX (6) #define GK_EVENTLOG_SEVERITY_FATAL_IDX (6)
#define GK_EVENTLOG_TASKBAR_FLASHER_PERIOD_COUNT (15) // Total amount of periods to flash for!
#define GK_EVENTLOG_TASKBAR_FLASHER_DURAT_COUNT (750) // Duration, in milliseconds, between each flashing period.
#define GK_ACTIVE_MSGS_TABLEVIEW_MODEL_OFFSET_IDX (0) #define GK_ACTIVE_MSGS_TABLEVIEW_MODEL_OFFSET_IDX (0)
#define GK_ACTIVE_MSGS_TABLEVIEW_MODEL_DATETIME_IDX (1) #define GK_ACTIVE_MSGS_TABLEVIEW_MODEL_DATETIME_IDX (1)
#define GK_ACTIVE_MSGS_TABLEVIEW_MODEL_AGE_IDX (2) #define GK_ACTIVE_MSGS_TABLEVIEW_MODEL_AGE_IDX (2)
......
...@@ -198,7 +198,8 @@ QString FileIo::read_initial_settings(const Database::Settings::init_cfg &key) ...@@ -198,7 +198,8 @@ QString FileIo::read_initial_settings(const Database::Settings::init_cfg &key)
switch (key) { switch (key) {
case DbName: case DbName:
value = QString::fromStdString(fs::path(Filesystem::defaultDirAppend + native_slash.string() + Filesystem::fileName).string()); value = QString::fromStdString(fs::path(General::companyName + native_slash.string() + Filesystem::defaultDirAppend +
native_slash.string() + Filesystem::fileName).string());
break; break;
case DbExt: case DbExt:
value = ""; value = "";
......
...@@ -79,7 +79,7 @@ public: ...@@ -79,7 +79,7 @@ public:
std::string get_file_contents(const boost::filesystem::path &filePath); std::string get_file_contents(const boost::filesystem::path &filePath);
QString defaultDirectory(const QString &base_path, const bool &use_native_slashes = false, QString defaultDirectory(const QString &base_path, const bool &use_native_slashes = false,
const QString &append_dir = Filesystem::defaultDirAppend); const QString &append_dir = QString(General::companyName + QString("/") + Filesystem::defaultDirAppend));
protected: protected:
static std::vector<boost::filesystem::path> analyze_dir(const boost::filesystem::path &dirPath, const std::vector<std::string> &dirsToSkip = { }); static std::vector<boost::filesystem::path> analyze_dir(const boost::filesystem::path &dirPath, const std::vector<std::string> &dirsToSkip = { });
......
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
#include <QDateTime> #include <QDateTime>
#include <QStandardPaths> #include <QStandardPaths>
#if defined(_WIN32) || defined(__MINGW64__) || defined(__CYGWIN__)
#include <windows.h>
#endif
using namespace GekkoFyre; using namespace GekkoFyre;
using namespace GkAudioFramework; using namespace GkAudioFramework;
using namespace Database; using namespace Database;
...@@ -82,12 +86,13 @@ namespace sys = boost::system; ...@@ -82,12 +86,13 @@ namespace sys = boost::system;
* @param parent * @param parent
*/ */
GkEventLogger::GkEventLogger(const QPointer<QSystemTrayIcon> &sysTrayIcon, const QPointer<GekkoFyre::StringFuncs> &stringFuncs, GkEventLogger::GkEventLogger(const QPointer<QSystemTrayIcon> &sysTrayIcon, const QPointer<GekkoFyre::StringFuncs> &stringFuncs,
QPointer<GekkoFyre::FileIo> fileIo, QObject *parent) QPointer<GekkoFyre::FileIo> fileIo, const quintptr &win_id, QObject *parent)
{ {
try { try {
setParent(parent); setParent(parent);
m_trayIcon = std::move(sysTrayIcon); m_trayIcon = std::move(sysTrayIcon);
gkStringFuncs = std::move(stringFuncs); gkStringFuncs = std::move(stringFuncs);
m_windowId = win_id;
// //
// File I/O // File I/O
...@@ -96,7 +101,8 @@ GkEventLogger::GkEventLogger(const QPointer<QSystemTrayIcon> &sysTrayIcon, const ...@@ -96,7 +101,8 @@ GkEventLogger::GkEventLogger(const QPointer<QSystemTrayIcon> &sysTrayIcon, const
fs::path slash = "/"; fs::path slash = "/";
fs::path native_slash = slash.make_preferred().native(); fs::path native_slash = slash.make_preferred().native();
const fs::path dir_to_append = fs::path(Filesystem::defaultDirAppend + native_slash.string() + Filesystem::fileLogData); const fs::path dir_to_append = fs::path(General::companyName + native_slash.string() + Filesystem::defaultDirAppend +
native_slash.string() + Filesystem::fileLogData);
const fs::path log_data_loc = gkFileIo->defaultDirectory(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation), const fs::path log_data_loc = gkFileIo->defaultDirectory(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation),
true, QString::fromStdString(dir_to_append.string())).toStdString(); true, QString::fromStdString(dir_to_append.string())).toStdString();
if (fs::exists(log_data_loc)) { // Entity already exists! if (fs::exists(log_data_loc)) { // Entity already exists!
...@@ -146,9 +152,16 @@ GkEventLogger::~GkEventLogger() ...@@ -146,9 +152,16 @@ GkEventLogger::~GkEventLogger()
* @param event The event message itself. * @param event The event message itself.
* @param severity The severity of the issue, where it's just a warning all the way to a fatal error. * @param severity The severity of the issue, where it's just a warning all the way to a fatal error.
* @param arguments Any arguments that are associated with the event message. This tends to be left blank. * @param arguments Any arguments that are associated with the event message. This tends to be left blank.
* @param sys_notification
* @param publishToConsole
* @param publishToStatusBar
* @param displayMsgBox
* @param flashTaskbar Whether to flash the taskbar and/or active window. This is dependent upon host operating system
* functionality, of course!
*/ */
void GkEventLogger::publishEvent(const QString &event, const GkSeverity &severity, const QVariant &arguments, const bool &sys_notification, void GkEventLogger::publishEvent(const QString &event, const GkSeverity &severity, const QVariant &arguments, const bool &sys_notification,
const bool &publishToConsole, const bool &publishToStatusBar, const bool &displayMsgBox) const bool &publishToConsole, const bool &publishToStatusBar, const bool &displayMsgBox,
const bool &flashTaskbar)
{ {
// //
// TODO: Introduce proper mutex'ing for multithreading! // TODO: Introduce proper mutex'ing for multithreading!
...@@ -196,8 +209,24 @@ void GkEventLogger::publishEvent(const QString &event, const GkSeverity &severit ...@@ -196,8 +209,24 @@ void GkEventLogger::publishEvent(const QString &event, const GkSeverity &severit
} }
} }
// TODO: Write out in a neater format! Such as XML, CSV, etc. if (flashTaskbar) {
#if defined(_WIN32) || defined(__MINGW64__) || defined(__CYGWIN__)
FLASHWINFO flash_info;
flash_info.cbSize = sizeof(FLASHWINFO);
flash_info.hwnd = (HWND)m_windowId;
flash_info.uCount = GK_EVENTLOG_TASKBAR_FLASHER_PERIOD_COUNT; // Flash for only 20-periods
flash_info.dwTimeout = GK_EVENTLOG_TASKBAR_FLASHER_DURAT_COUNT; // Duration in milliseconds between flashes
flash_info.dwFlags = FLASHW_TRAY; // Flash only taskbar button
FlashWindowEx(&flash_info);
#elif __linux__
// TODO: Implement functionality for Linux operating systems!
#endif
}
gkWriteCsvIo.write(event_log.mesg.message.toStdString().c_str(), event_log.mesg.message.length()); gkWriteCsvIo.write(event_log.mesg.message.toStdString().c_str(), event_log.mesg.message.length());
const QString tmp_event_out = QString("%1\n\n").arg(event_log.mesg.message);
gkWriteCsvIo.write(tmp_event_out.toStdString().c_str(), tmp_event_out.length());
return; return;
} }
......
...@@ -66,13 +66,13 @@ class GkEventLogger : public QObject { ...@@ -66,13 +66,13 @@ class GkEventLogger : public QObject {
public: public:
explicit GkEventLogger(const QPointer<QSystemTrayIcon> &sysTrayIcon, const QPointer<GekkoFyre::StringFuncs> &stringFuncs, explicit GkEventLogger(const QPointer<QSystemTrayIcon> &sysTrayIcon, const QPointer<GekkoFyre::StringFuncs> &stringFuncs,
QPointer<GekkoFyre::FileIo> fileIo, QObject *parent = nullptr); QPointer<GekkoFyre::FileIo> fileIo, const quintptr &win_id, QObject *parent = nullptr);
~GkEventLogger() override; ~GkEventLogger() override;
public slots: public slots:
void publishEvent(const QString &event, const GekkoFyre::System::Events::Logging::GkSeverity &severity = GekkoFyre::System::Events::Logging::GkSeverity::Warning, void publishEvent(const QString &event, const GekkoFyre::System::Events::Logging::GkSeverity &severity = GekkoFyre::System::Events::Logging::GkSeverity::Warning,
const QVariant &arguments = "", const bool &sys_notification = false, const bool &publishToConsole = true, const QVariant &arguments = "", const bool &sys_notification = false, const bool &publishToConsole = true,
const bool &publishToStatusBar = false, const bool &displayMsgBox = false); const bool &publishToStatusBar = false, const bool &displayMsgBox = false, const bool &flashTaskbar = false);
void recvXmppLog(QXmppLogger::MessageType msg_type, QString msg); void recvXmppLog(QXmppLogger::MessageType msg_type, QString msg);
signals: signals:
...@@ -90,6 +90,10 @@ private: ...@@ -90,6 +90,10 @@ private:
QPointer<GekkoFyre::FileIo> gkFileIo; QPointer<GekkoFyre::FileIo> gkFileIo;
QFile gkWriteCsvIo; QFile gkWriteCsvIo;
//
// Microsoft Windows
quintptr m_windowId;
#if defined(GFYRE_ENBL_MSVC_WINTOAST) #if defined(GFYRE_ENBL_MSVC_WINTOAST)
std::unique_ptr<WinToastLib::WinToastTemplate> toastTempl; std::unique_ptr<WinToastLib::WinToastTemplate> toastTempl;
#endif #endif
......
...@@ -145,7 +145,8 @@ GkXmppClient::GkXmppClient(const GkUserConn &connection_details, QPointer<GekkoF ...@@ -145,7 +145,8 @@ GkXmppClient::GkXmppClient(const GkUserConn &connection_details, QPointer<GekkoF
fs::path slash = "/"; fs::path slash = "/";
native_slash = slash.make_preferred().native(); native_slash = slash.make_preferred().native();
const fs::path dir_to_append = fs::path(Filesystem::defaultDirAppend + native_slash.string() + Filesystem::xmppVCardDir); const fs::path dir_to_append = fs::path(General::companyName + native_slash.string() + Filesystem::defaultDirAppend +
native_slash.string() + Filesystem::xmppVCardDir);
vcard_save_path = gkFileIo->defaultDirectory(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation), vcard_save_path = gkFileIo->defaultDirectory(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation),
true, QString::fromStdString(dir_to_append.string())).toStdString(); // Path to save final database towards true, QString::fromStdString(dir_to_append.string())).toStdString(); // Path to save final database towards
if (!fs::exists(vcard_save_path)) { if (!fs::exists(vcard_save_path)) {
...@@ -1433,20 +1434,6 @@ void GkXmppClient::sendXmppMsg(const QString &bareJid, const QXmppMessage &msg, ...@@ -1433,20 +1434,6 @@ void GkXmppClient::sendXmppMsg(const QString &bareJid, const QXmppMessage &msg,
sendPacket(msg); sendPacket(msg);
} }
if (!m_rosterList.isEmpty()) {
for (const auto &roster: m_rosterList) {
if (!roster.bareJid.isEmpty()) {
if (roster.bareJid == bareJid) {
if (beginTimestamp.isValid() && endTimestamp.isValid()) {
getArchivedMessages(m_connDetails.jid, QString(), roster.bareJid, beginTimestamp, endTimestamp, QXmppResultSetQuery());
} else {
getArchivedMessages(m_connDetails.jid, QString(), roster.bareJid, QDateTime::currentDateTimeUtc(), QDateTime::currentDateTimeUtc(), QXmppResultSetQuery());
}
}
}
}
}
return; return;
} }
......
...@@ -104,7 +104,6 @@ DialogSettings::DialogSettings(QPointer<GkLevelDb> dkDb, ...@@ -104,7 +104,6 @@ DialogSettings::DialogSettings(QPointer<GkLevelDb> dkDb,
QPointer<GekkoFyre::GkXmppClient> xmppClient, QPointer<GekkoFyre::GkXmppClient> xmppClient,
QPointer<GekkoFyre::GkEventLogger> eventLogger, QPointer<GekkoFyre::GkEventLogger> eventLogger,
QPointer<GekkoFyre::GkTextToSpeech> textToSpeechPtr, QPointer<GekkoFyre::GkTextToSpeech> textToSpeechPtr,
QPointer<QtSpell::TextEditChecker> spellChecking,
const System::UserInterface::GkSettingsDlgTab &settingsDlgTab, const System::UserInterface::GkSettingsDlgTab &settingsDlgTab,
QWidget *parent) QWidget *parent)
: QDialog(parent), ui(new Ui::DialogSettings) : QDialog(parent), ui(new Ui::DialogSettings)
...@@ -128,8 +127,6 @@ DialogSettings::DialogSettings(QPointer<GkLevelDb> dkDb, ...@@ -128,8 +127,6 @@ DialogSettings::DialogSettings(QPointer<GkLevelDb> dkDb,
gkTextToSpeech = std::move(textToSpeechPtr); gkTextToSpeech = std::move(textToSpeechPtr);
gkSerialPortMap = com_ports; gkSerialPortMap = com_ports;
m_spellChecker = std::move(spellChecking);
gkAudioInput = audioSysInput; gkAudioInput = audioSysInput;
gkAudioOutput = audioSysOutput; gkAudioOutput = audioSysOutput;
avail_input_audio_devs = gkAvailInputDevs; avail_input_audio_devs = gkAvailInputDevs;
...@@ -961,13 +958,6 @@ void DialogSettings::prefill_uri_lookup_method() ...@@ -961,13 +958,6 @@ void DialogSettings::prefill_uri_lookup_method()
*/ */
void DialogSettings::prefill_lang_dictionaries() 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; return;
} }
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#include "src/gk_string_funcs.hpp" #include "src/gk_string_funcs.hpp"
#include "src/gk_text_to_speech.hpp" #include "src/gk_text_to_speech.hpp"
#include "src/models/tableview/gk_frequency_model.hpp" #include "src/models/tableview/gk_frequency_model.hpp"
#include <QtSpell.hpp>
#include <boost/logic/tribool.hpp> #include <boost/logic/tribool.hpp>
#include <list> #include <list>
#include <tuple> #include <tuple>
...@@ -96,7 +95,6 @@ public: ...@@ -96,7 +95,6 @@ public:
QPointer<GekkoFyre::GkXmppClient> xmppClient, QPointer<GekkoFyre::GkXmppClient> xmppClient,
QPointer<GekkoFyre::GkEventLogger> eventLogger, QPointer<GekkoFyre::GkEventLogger> eventLogger,
QPointer<GekkoFyre::GkTextToSpeech> textToSpeechPtr, QPointer<GekkoFyre::GkTextToSpeech> textToSpeechPtr,
QPointer<QtSpell::TextEditChecker> spellChecking,
const GekkoFyre::System::UserInterface::GkSettingsDlgTab &settingsDlgTab = GekkoFyre::System::UserInterface::GkSettingsDlgTab::GkGeneralStation, const GekkoFyre::System::UserInterface::GkSettingsDlgTab &settingsDlgTab = GekkoFyre::System::UserInterface::GkSettingsDlgTab::GkGeneralStation,
QWidget *parent = nullptr); QWidget *parent = nullptr);
~DialogSettings() override; ~DialogSettings() override;
...@@ -354,7 +352,7 @@ private: ...@@ -354,7 +352,7 @@ private:
// //
// Spell-checking, dictionaries, etc. // Spell-checking, dictionaries, etc.
// //
QPointer<QtSpell::TextEditChecker> m_spellChecker; // QPointer<QtSpell::TextEditChecker> m_spellChecker;
void prefill_audio_devices(); void prefill_audio_devices();
void prefill_audio_encode_comboboxes(); void prefill_audio_encode_comboboxes();
......
...@@ -144,7 +144,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi ...@@ -144,7 +144,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
fs::path slash = "/"; fs::path slash = "/";
native_slash = slash.make_preferred().native(); native_slash = slash.make_preferred().native();
const fs::path dir_to_append = fs::path(Filesystem::defaultDirAppend + native_slash.string() + Filesystem::fileName); const fs::path dir_to_append = fs::path(General::companyName + native_slash.string() + Filesystem::defaultDirAppend +
native_slash.string() + Filesystem::fileName);
const fs::path swrld_save_path = gkFileIo->defaultDirectory(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation), const fs::path swrld_save_path = gkFileIo->defaultDirectory(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation),
true, QString::fromStdString(dir_to_append.string())).toStdString(); // Path to save final database towards true, QString::fromStdString(dir_to_append.string())).toStdString(); // Path to save final database towards
...@@ -332,7 +333,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi ...@@ -332,7 +333,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
// The handler is a Crashpad-specific background process // The handler is a Crashpad-specific background process
sentry_options_set_handler_path(sen_opt, handler_to_use.string().c_str()); sentry_options_set_handler_path(sen_opt, handler_to_use.string().c_str());
const fs::path sentry_crash_dir = fs::path(Filesystem::defaultDirAppend + native_slash.string() + Filesystem::gk_sentry_dump_dir); const fs::path sentry_crash_dir = fs::path(General::companyName + native_slash.string() + Filesystem::defaultDirAppend +
native_slash.string() + Filesystem::gk_sentry_dump_dir);
const fs::path gk_minidump = gkFileIo->defaultDirectory(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation), const fs::path gk_minidump = gkFileIo->defaultDirectory(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation),
true, QString::fromStdString(sentry_crash_dir.string())).toStdString(); true, QString::fromStdString(sentry_crash_dir.string())).toStdString();
...@@ -398,7 +400,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi ...@@ -398,7 +400,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
ui->tableView_maingui_logs->horizontalHeader()->setSectionResizeMode(GK_EVENTLOG_TABLEVIEW_MODEL_MESSAGE_IDX, QHeaderView::Stretch); ui->tableView_maingui_logs->horizontalHeader()->setSectionResizeMode(GK_EVENTLOG_TABLEVIEW_MODEL_MESSAGE_IDX, QHeaderView::Stretch);
ui->tableView_maingui_logs->show(); ui->tableView_maingui_logs->show();
gkEventLogger = new GkEventLogger(m_trayIcon, gkStringFuncs, gkFileIo, this); gkEventLogger = new GkEventLogger(m_trayIcon, gkStringFuncs, gkFileIo, this->winId(), this);
QObject::connect(gkEventLogger, SIGNAL(sendEvent(const GekkoFyre::System::Events::Logging::GkEventLogging &)), QObject::connect(gkEventLogger, SIGNAL(sendEvent(const GekkoFyre::System::Events::Logging::GkEventLogging &)),
gkEventLoggerModel, SLOT(insertData(const GekkoFyre::System::Events::Logging::GkEventLogging &))); gkEventLoggerModel, SLOT(insertData(const GekkoFyre::System::Events::Logging::GkEventLogging &)));
QObject::connect(gkEventLogger, SIGNAL(removeEvent(const GekkoFyre::System::Events::Logging::GkEventLogging &)), QObject::connect(gkEventLogger, SIGNAL(removeEvent(const GekkoFyre::System::Events::Logging::GkEventLogging &)),
...@@ -871,9 +873,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi ...@@ -871,9 +873,7 @@ 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 &)),
...@@ -917,7 +917,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi ...@@ -917,7 +917,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
// //
// Initialize the QXmpp client! // Initialize the QXmpp client!
m_xmppClient = new GkXmppClient(gkConnDetails, gkDb, gkStringFuncs, gkFileIo, gkEventLogger, false, nullptr); 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) { } 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); QMessageBox::warning(this, tr("Error!"), tr("An error was encountered upon launch!\n\n%1").arg(e.what()), QMessageBox::Ok);
QApplication::exit(EXIT_FAILURE); QApplication::exit(EXIT_FAILURE);
...@@ -1066,7 +1066,7 @@ void MainWindow::launchSettingsWin(const System::UserInterface::GkSettingsDlgTab ...@@ -1066,7 +1066,7 @@ void MainWindow::launchSettingsWin(const System::UserInterface::GkSettingsDlgTab
pref_input_device, pref_output_device, gkRadioLibs, pref_input_device, pref_output_device, gkRadioLibs,
gkStringFuncs, gkRadioPtr, gkSerialPortMap, gkUsbPortMap, gkStringFuncs, gkRadioPtr, gkSerialPortMap, gkUsbPortMap,
gkFreqList, gkFreqTableModel, gkConnDetails, m_xmppClient, gkFreqList, gkFreqTableModel, gkConnDetails, m_xmppClient,
gkEventLogger, gkTextToSpeech, m_spellChecker, settingsDlgTab, this); gkEventLogger, gkTextToSpeech, settingsDlgTab, this);
dlg_settings->setWindowFlags(Qt::Window); dlg_settings->setWindowFlags(Qt::Window);
dlg_settings->setAttribute(Qt::WA_DeleteOnClose, true); dlg_settings->setAttribute(Qt::WA_DeleteOnClose, true);
QObject::connect(dlg_settings, SIGNAL(destroyed(QObject*)), this, SLOT(show())); QObject::connect(dlg_settings, SIGNAL(destroyed(QObject*)), this, SLOT(show()));
...@@ -2203,17 +2203,8 @@ void MainWindow::readEnchantSettings() ...@@ -2203,17 +2203,8 @@ 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->setDecodeLanguageCodes(true);
m_spellChecker->setShowCheckSpellingCheckbox(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()));
......
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
#include <leveldb/db.h> #include <leveldb/db.h>
#include <leveldb/status.h> #include <leveldb/status.h>
#include <leveldb/options.h> #include <leveldb/options.h>
#include <QtSpell.hpp>
#include <stdexcept> #include <stdexcept>
#include <exception> #include <exception>
#include <utility> #include <utility>
...@@ -474,11 +473,7 @@ private: ...@@ -474,11 +473,7 @@ 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
......
...@@ -93,8 +93,7 @@ bool GkPlainTextKeyEnter::eventFilter(QObject *obj, QEvent *event) ...@@ -93,8 +93,7 @@ bool GkPlainTextKeyEnter::eventFilter(QObject *obj, QEvent *event)
* @param parent The parent to this dialog. * @param parent The parent to this dialog.
*/ */
GkXmppMessageDialog::GkXmppMessageDialog(QPointer<GekkoFyre::StringFuncs> stringFuncs, QPointer<GekkoFyre::GkEventLogger> eventLogger, GkXmppMessageDialog::GkXmppMessageDialog(QPointer<GekkoFyre::StringFuncs> stringFuncs, QPointer<GekkoFyre::GkEventLogger> eventLogger,
QPointer<GekkoFyre::GkLevelDb> database, QPointer<QtSpell::TextEditChecker> spellChecking, QPointer<GekkoFyre::GkLevelDb> database, const GekkoFyre::Network::GkXmpp::GkUserConn &connection_details,
const GekkoFyre::Network::GkXmpp::GkUserConn &connection_details,
QPointer<GekkoFyre::GkXmppClient> xmppClient, const QStringList &bareJids, QPointer<GekkoFyre::GkXmppClient> xmppClient, const QStringList &bareJids,
QWidget *parent) : QDialog(parent), ui(new Ui::GkXmppMessageDialog) QWidget *parent) : QDialog(parent), ui(new Ui::GkXmppMessageDialog)
{ {
...@@ -105,7 +104,6 @@ GkXmppMessageDialog::GkXmppMessageDialog(QPointer<GekkoFyre::StringFuncs> string ...@@ -105,7 +104,6 @@ GkXmppMessageDialog::GkXmppMessageDialog(QPointer<GekkoFyre::StringFuncs> string
gkEventLogger = std::move(eventLogger); gkEventLogger = std::move(eventLogger);
gkDb = std::move(database); gkDb = std::move(database);
gkConnDetails = connection_details; gkConnDetails = connection_details;
m_spellChecker = std::move(spellChecking);
m_xmppClient = std::move(xmppClient); m_xmppClient = std::move(xmppClient);
m_bareJids = bareJids; m_bareJids = bareJids;
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
#include "src/gk_xmpp_client.hpp" #include "src/gk_xmpp_client.hpp"
#include "src/gk_string_funcs.hpp" #include "src/gk_string_funcs.hpp"
#include "src/models/tableview/gk_xmpp_recv_msgs_model.hpp" #include "src/models/tableview/gk_xmpp_recv_msgs_model.hpp"
#include <QtSpell.hpp>
#include <qxmpp/QXmppMessage.h> #include <qxmpp/QXmppMessage.h>
#include <queue> #include <queue>
#include <mutex> #include <mutex>
...@@ -81,8 +80,7 @@ class GkXmppMessageDialog : public QDialog ...@@ -81,8 +80,7 @@ class GkXmppMessageDialog : public QDialog
public: