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 @@
[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
......@@ -256,6 +256,9 @@ namespace GekkoFyre {
#define GK_EVENTLOG_SEVERITY_ERROR_IDX (5)
#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_DATETIME_IDX (1)
#define GK_ACTIVE_MSGS_TABLEVIEW_MODEL_AGE_IDX (2)
......
......@@ -198,7 +198,8 @@ QString FileIo::read_initial_settings(const Database::Settings::init_cfg &key)
switch (key) {
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;
case DbExt:
value = "";
......
......@@ -79,7 +79,7 @@ public:
std::string get_file_contents(const boost::filesystem::path &filePath);
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:
static std::vector<boost::filesystem::path> analyze_dir(const boost::filesystem::path &dirPath, const std::vector<std::string> &dirsToSkip = { });
......
......@@ -49,6 +49,10 @@
#include <QDateTime>
#include <QStandardPaths>
#if defined(_WIN32) || defined(__MINGW64__) || defined(__CYGWIN__)
#include <windows.h>
#endif
using namespace GekkoFyre;
using namespace GkAudioFramework;
using namespace Database;
......@@ -82,12 +86,13 @@ namespace sys = boost::system;
* @param parent
*/
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 {
setParent(parent);
m_trayIcon = std::move(sysTrayIcon);
gkStringFuncs = std::move(stringFuncs);
m_windowId = win_id;
//
// File I/O
......@@ -96,7 +101,8 @@ GkEventLogger::GkEventLogger(const QPointer<QSystemTrayIcon> &sysTrayIcon, const
fs::path slash = "/";
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),
true, QString::fromStdString(dir_to_append.string())).toStdString();
if (fs::exists(log_data_loc)) { // Entity already exists!
......@@ -146,9 +152,16 @@ GkEventLogger::~GkEventLogger()
* @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 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,
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!
......@@ -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());
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;
}
......
......@@ -66,13 +66,13 @@ class GkEventLogger : public QObject {
public:
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;
public slots:
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 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);
signals:
......@@ -90,6 +90,10 @@ private:
QPointer<GekkoFyre::FileIo> gkFileIo;
QFile gkWriteCsvIo;
//
// Microsoft Windows
quintptr m_windowId;
#if defined(GFYRE_ENBL_MSVC_WINTOAST)
std::unique_ptr<WinToastLib::WinToastTemplate> toastTempl;
#endif
......
......@@ -145,7 +145,8 @@ GkXmppClient::GkXmppClient(const GkUserConn &connection_details, QPointer<GekkoF
fs::path slash = "/";
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),
true, QString::fromStdString(dir_to_append.string())).toStdString(); // Path to save final database towards
if (!fs::exists(vcard_save_path)) {
......@@ -1433,20 +1434,6 @@ void GkXmppClient::sendXmppMsg(const QString &bareJid, const QXmppMessage &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;
}
......
......@@ -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();
......
......@@ -144,7 +144,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
fs::path slash = "/";
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),
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
// The handler is a Crashpad-specific background process
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),
true, QString::fromStdString(sentry_crash_dir.string())).toStdString();
......@@ -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->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 &)),
gkEventLoggerModel, SLOT(insertData(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
//
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 +917,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 +1066,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 +2203,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);
......@@ -281,7 +279,7 @@ GkXmppRosterDialog::GkXmppRosterDialog(QPointer<GekkoFyre::StringFuncs> stringFu
GkXmppRosterDialog::~GkXmppRosterDialog()
{
gkDb->write_xmpp_settings(QString::number(ui->comboBox_current_status->currentIndex()), Settings::GkXmppCfg::XmppLastOnlinePresence);
// gkDb->write_xmpp_settings(QString::number(ui->comboBox_current_status->currentIndex()), Settings::GkXmppCfg::XmppLastOnlinePresence);
cleanupTables();
delete ui;
......@@ -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