1
0
Fork 0
forked from blue/squawk

Shared namespace refactoring, enum class refactoring, going offline related crash fix

This commit is contained in:
Blue 2020-04-04 01:28:15 +03:00
parent b309100f99
commit ddfb3419cc
59 changed files with 1948 additions and 1695 deletions

View file

@ -115,7 +115,7 @@ void Accounts::updateConnectButton()
bool allConnected = true;
for (int i = 0; i < selectionSize && allConnected; ++i) {
const Models::Account* mAcc = model->getAccount(sm->selectedRows().at(i).row());
allConnected = mAcc->getState() == Shared::connected;
allConnected = mAcc->getState() == Shared::ConnectionState::connected;
}
if (allConnected) {
toDisconnect = true;

View file

@ -58,7 +58,7 @@ void Chat::updateState()
{
Shared::Availability av = contact->getAvailability();
statusIcon->setPixmap(Shared::availabilityIcon(av, true).pixmap(40));
statusIcon->setToolTip(QCoreApplication::translate("Global", Shared::availabilityNames[av].toLatin1()));
statusIcon->setToolTip(Shared::Global::getName(av));
}
void Chat::handleSendMessage(const QString& text)

View file

@ -20,7 +20,9 @@
#define CHAT_H
#include "conversation.h"
#include "../models/contact.h"
#include "ui/models/contact.h"
#include "shared/icons.h"
#include "shared/global.h"
namespace Ui
{

View file

@ -19,6 +19,7 @@
#include "conversation.h"
#include "ui_conversation.h"
#include "ui/utils/dropshadoweffect.h"
#include "shared/icons.h"
#include <QDebug>
#include <QScrollBar>
@ -27,6 +28,7 @@
#include <QMimeDatabase>
#include <unistd.h>
#include <QAbstractTextDocumentLayout>
#include <QCoreApplication>
Conversation::Conversation(bool muc, Models::Account* acc, const QString pJid, const QString pRes, QWidget* parent):
QWidget(parent),

View file

@ -23,7 +23,7 @@
#include <QScopedPointer>
#include <QMap>
#include "global.h"
#include "shared/message.h"
#include "order.h"
#include "ui/models/account.h"
#include "ui/utils/messageline.h"

View file

@ -18,6 +18,9 @@
#include "emailsmodel.h"
#include "shared/icons.h"
#include <QCoreApplication>
UI::VCard::EMailsModel::EMailsModel(bool p_edit, QObject* parent):
QAbstractTableModel(parent),
edit(p_edit),

View file

@ -24,7 +24,7 @@
#include <deque>
#include "global.h"
#include "shared/vcard.h"
namespace UI {
namespace VCard {

View file

@ -18,6 +18,9 @@
#include "phonesmodel.h"
#include "shared/icons.h"
#include <QCoreApplication>
UI::VCard::PhonesModel::PhonesModel(bool p_edit, QObject* parent):
QAbstractTableModel(parent),
edit(p_edit),

View file

@ -22,7 +22,7 @@
#include <QAbstractTableModel>
#include <QIcon>
#include "global.h"
#include "shared/vcard.h"
namespace UI {
namespace VCard {

View file

@ -18,7 +18,7 @@
#include "vcard.h"
#include "ui_vcard.h"
#include "shared/icons.h"
#include <QDebug>
#include <algorithm>

View file

@ -36,7 +36,7 @@
#include <set>
#include "global.h"
#include "shared/vcard.h"
#include "emailsmodel.h"
#include "phonesmodel.h"
#include "ui/utils/progress.h"