mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor(style): Match declaration and definition argument names
Conform with readability-named-parameter and readability-inconsistent-declaration-parameter-name
This commit is contained in:
parent
47d52f9977
commit
cabcf4111f
|
@ -17,12 +17,12 @@
|
||||||
along with qTox. If not, see <http://www.gnu.org/licenses/>.
|
along with qTox. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include "audio/audio.h"
|
#include "audio/audio.h"
|
||||||
#include "audio/iaudiosettings.h"
|
#include "audio/iaudiosettings.h"
|
||||||
#include "backend/openal.h"
|
#include "backend/openal.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Select the audio backend
|
* @brief Select the audio backend
|
||||||
* @param settings Audio settings to use
|
* @param settings Audio settings to use
|
||||||
|
|
|
@ -123,7 +123,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual bool initInput(const QString& deviceName);
|
virtual bool initInput(const QString& deviceName);
|
||||||
virtual bool initOutput(const QString& outDevDescr);
|
virtual bool initOutput(const QString& deviceName);
|
||||||
|
|
||||||
void cleanupBuffers(uint sourceId);
|
void cleanupBuffers(uint sourceId);
|
||||||
void cleanupSound();
|
void cleanupSound();
|
||||||
|
|
|
@ -35,32 +35,38 @@ int ChatLineContent::type() const
|
||||||
return GraphicsItemType::ChatLineContentType;
|
return GraphicsItemType::ChatLineContentType;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatLineContent::selectionMouseMove(QPointF)
|
void ChatLineContent::selectionMouseMove(QPointF scenePos)
|
||||||
{
|
{
|
||||||
|
std::ignore = scenePos;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatLineContent::selectionStarted(QPointF)
|
void ChatLineContent::selectionStarted(QPointF scenePos)
|
||||||
{
|
{
|
||||||
|
std::ignore = scenePos;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatLineContent::selectionCleared()
|
void ChatLineContent::selectionCleared()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatLineContent::selectionDoubleClick(QPointF)
|
void ChatLineContent::selectionDoubleClick(QPointF scenePos)
|
||||||
{
|
{
|
||||||
|
std::ignore = scenePos;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatLineContent::selectionTripleClick(QPointF)
|
void ChatLineContent::selectionTripleClick(QPointF scenePos)
|
||||||
{
|
{
|
||||||
|
std::ignore = scenePos;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatLineContent::selectionFocusChanged(bool)
|
void ChatLineContent::selectionFocusChanged(bool focusIn)
|
||||||
{
|
{
|
||||||
|
std::ignore = focusIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ChatLineContent::isOverSelection(QPointF) const
|
bool ChatLineContent::isOverSelection(QPointF scenePos) const
|
||||||
{
|
{
|
||||||
|
std::ignore = scenePos;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,8 +85,9 @@ qreal ChatLineContent::getAscent() const
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatLineContent::visibilityChanged(bool)
|
void ChatLineContent::visibilityChanged(bool visible)
|
||||||
{
|
{
|
||||||
|
std::ignore = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatLineContent::reloadTheme()
|
void ChatLineContent::reloadTheme()
|
||||||
|
|
|
@ -50,22 +50,22 @@ public:
|
||||||
ALERT,
|
ALERT,
|
||||||
};
|
};
|
||||||
|
|
||||||
ChatMessage(DocumentCache&, Settings&);
|
ChatMessage(DocumentCache& documentCache, Settings& settings);
|
||||||
~ChatMessage();
|
~ChatMessage();
|
||||||
ChatMessage(const ChatMessage&) = default;
|
ChatMessage(const ChatMessage&) = default;
|
||||||
ChatMessage(ChatMessage&&) = default;
|
ChatMessage(ChatMessage&&) = default;
|
||||||
|
|
||||||
static ChatMessage::Ptr createChatMessage(const QString& sender, const QString& rawMessage,
|
static ChatMessage::Ptr createChatMessage(const QString& sender, const QString& rawMessage,
|
||||||
MessageType type, bool isMe, MessageState state,
|
MessageType type, bool isMe, MessageState state,
|
||||||
const QDateTime& date, DocumentCache&,
|
const QDateTime& date, DocumentCache& documentCache,
|
||||||
SmileyPack&, Settings&, bool colorizeName = false);
|
SmileyPack& smileyPack, Settings& settings, bool colorizeName = false);
|
||||||
static ChatMessage::Ptr createChatInfoMessage(const QString& rawMessage, SystemMessageType type,
|
static ChatMessage::Ptr createChatInfoMessage(const QString& rawMessage, SystemMessageType type,
|
||||||
const QDateTime& date, DocumentCache&, Settings&);
|
const QDateTime& date, DocumentCache& documentCache, Settings& settings);
|
||||||
static ChatMessage::Ptr createFileTransferMessage(const QString& sender, CoreFile& coreFile,
|
static ChatMessage::Ptr createFileTransferMessage(const QString& sender, CoreFile& coreFile,
|
||||||
ToxFile file, bool isMe, const QDateTime& date,
|
ToxFile file, bool isMe, const QDateTime& date,
|
||||||
DocumentCache&, Settings&);
|
DocumentCache& documentCache, Settings& settings);
|
||||||
static ChatMessage::Ptr createTypingNotification(DocumentCache&, Settings&);
|
static ChatMessage::Ptr createTypingNotification(DocumentCache& documentCache, Settings& settings);
|
||||||
static ChatMessage::Ptr createBusyNotification(DocumentCache&, Settings&);
|
static ChatMessage::Ptr createBusyNotification(DocumentCache& documentCache, Settings& settings);
|
||||||
|
|
||||||
void markAsDelivered(const QDateTime& time);
|
void markAsDelivered(const QDateTime& time);
|
||||||
void markAsBroken();
|
void markAsBroken();
|
||||||
|
|
|
@ -1304,8 +1304,9 @@ void ChatWidget::handleMultiClickEvent()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatWidget::showEvent(QShowEvent*)
|
void ChatWidget::showEvent(QShowEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
// Empty.
|
// Empty.
|
||||||
// The default implementation calls centerOn - for some reason - causing
|
// The default implementation calls centerOn - for some reason - causing
|
||||||
// the scrollbar to move.
|
// the scrollbar to move.
|
||||||
|
|
|
@ -44,8 +44,8 @@ class ChatWidget : public QGraphicsView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ChatWidget(IChatLog& chatLog_, const Core& core_, DocumentCache&, SmileyPack&,
|
ChatWidget(IChatLog& chatLog_, const Core& core_, DocumentCache& documentCache,
|
||||||
Settings&, QWidget* parent = nullptr);
|
SmileyPack& smileyPack, Settings& settings, QWidget* parent = nullptr);
|
||||||
virtual ~ChatWidget();
|
virtual ~ChatWidget();
|
||||||
|
|
||||||
void insertChatlines(std::map<ChatLogIdx, ChatLine::Ptr> chatLines);
|
void insertChatlines(std::map<ChatLogIdx, ChatLine::Ptr> chatLines);
|
||||||
|
@ -94,7 +94,7 @@ private slots:
|
||||||
void renderMessage(ChatLogIdx idx);
|
void renderMessage(ChatLogIdx idx);
|
||||||
void renderMessages(ChatLogIdx begin, ChatLogIdx end);
|
void renderMessages(ChatLogIdx begin, ChatLogIdx end);
|
||||||
|
|
||||||
void setRenderedWindowStart(ChatLogIdx start);
|
void setRenderedWindowStart(ChatLogIdx begin);
|
||||||
void setRenderedWindowEnd(ChatLogIdx end);
|
void setRenderedWindowEnd(ChatLogIdx end);
|
||||||
|
|
||||||
void onRenderFinished();
|
void onRenderFinished();
|
||||||
|
@ -121,7 +121,7 @@ protected:
|
||||||
void mouseMoveEvent(QMouseEvent* ev) final;
|
void mouseMoveEvent(QMouseEvent* ev) final;
|
||||||
void scrollContentsBy(int dx, int dy) final;
|
void scrollContentsBy(int dx, int dy) final;
|
||||||
void resizeEvent(QResizeEvent* ev) final;
|
void resizeEvent(QResizeEvent* ev) final;
|
||||||
void showEvent(QShowEvent*) final;
|
void showEvent(QShowEvent* event) final;
|
||||||
void hideEvent(QHideEvent* event) final;
|
void hideEvent(QHideEvent* event) final;
|
||||||
void focusInEvent(QFocusEvent* ev) final;
|
void focusInEvent(QFocusEvent* ev) final;
|
||||||
void focusOutEvent(QFocusEvent* ev) final;
|
void focusOutEvent(QFocusEvent* ev) final;
|
||||||
|
@ -133,7 +133,7 @@ protected:
|
||||||
|
|
||||||
ChatLine::Ptr findLineByPosY(qreal yPos) const;
|
ChatLine::Ptr findLineByPosY(qreal yPos) const;
|
||||||
|
|
||||||
void removeLines(ChatLogIdx being, ChatLogIdx end);
|
void removeLines(ChatLogIdx begin, ChatLogIdx end);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
|
|
|
@ -181,8 +181,9 @@ bool FileTransferWidget::drawButtonAreaNeeded() const
|
||||||
&& !(ui->leftButton->isVisible() && ui->leftButton->objectName() == "ok");
|
&& !(ui->leftButton->isVisible() && ui->leftButton->objectName() == "ok");
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileTransferWidget::paintEvent(QPaintEvent*)
|
void FileTransferWidget::paintEvent(QPaintEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
// required by Hi-DPI support as border-image doesn't work.
|
// required by Hi-DPI support as border-image doesn't work.
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
painter.setRenderHint(QPainter::Antialiasing);
|
painter.setRenderHint(QPainter::Antialiasing);
|
||||||
|
|
|
@ -40,7 +40,7 @@ class FileTransferWidget : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FileTransferWidget(QWidget* parent, CoreFile& _coreFile, ToxFile file, Settings&);
|
FileTransferWidget(QWidget* parent, CoreFile& _coreFile, ToxFile file, Settings& settings);
|
||||||
virtual ~FileTransferWidget();
|
virtual ~FileTransferWidget();
|
||||||
bool isActive() const;
|
bool isActive() const;
|
||||||
void onFileTransferUpdate(ToxFile file);
|
void onFileTransferUpdate(ToxFile file);
|
||||||
|
@ -60,7 +60,7 @@ protected:
|
||||||
|
|
||||||
bool drawButtonAreaNeeded() const;
|
bool drawButtonAreaNeeded() const;
|
||||||
|
|
||||||
void paintEvent(QPaintEvent*) final;
|
void paintEvent(QPaintEvent* event) final;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void reloadTheme();
|
void reloadTheme();
|
||||||
|
|
|
@ -31,7 +31,7 @@ class NotificationIcon : public ChatLineContent
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit NotificationIcon(Settings&, QSize size);
|
explicit NotificationIcon(Settings& settings, QSize size);
|
||||||
|
|
||||||
QRectF boundingRect() const override;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
|
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
|
||||||
|
|
|
@ -32,9 +32,9 @@
|
||||||
#include <QTextFragment>
|
#include <QTextFragment>
|
||||||
|
|
||||||
Text::Text(DocumentCache& documentCache_, Settings& settings_, const QString& txt,
|
Text::Text(DocumentCache& documentCache_, Settings& settings_, const QString& txt,
|
||||||
const QFont& font, bool enableElide, const QString& rwText, const TextType& type,
|
const QFont& font, bool enableElide, const QString& rawText_, const TextType& type,
|
||||||
const QColor& custom)
|
const QColor& custom)
|
||||||
: rawText(rwText)
|
: rawText(rawText_)
|
||||||
, elide(enableElide)
|
, elide(enableElide)
|
||||||
, defFont(font)
|
, defFont(font)
|
||||||
, defStyleSheet(Style::getStylesheet(QStringLiteral("chatArea/innerStyle.css"), settings_, font))
|
, defStyleSheet(Style::getStylesheet(QStringLiteral("chatArea/innerStyle.css"), settings_, font))
|
||||||
|
|
|
@ -40,9 +40,9 @@ public:
|
||||||
CUSTOM
|
CUSTOM
|
||||||
};
|
};
|
||||||
|
|
||||||
Text(DocumentCache&, Settings&, const QString& txt = "", const QFont& font = QFont(),
|
Text(DocumentCache& documentCache, Settings& settings, const QString& txt = "",
|
||||||
bool enableElide = false, const QString& rawText = QString(),
|
const QFont& font = QFont(), bool enableElide = false,
|
||||||
const TextType& type = NORMAL,
|
const QString& rawText = QString(), const TextType& type = NORMAL,
|
||||||
const QColor& custom = Style::getColor(Style::ColorPalette::MainText));
|
const QColor& custom = Style::getColor(Style::ColorPalette::MainText));
|
||||||
virtual ~Text();
|
virtual ~Text();
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ public:
|
||||||
QRectF boundingRect() const final;
|
QRectF boundingRect() const final;
|
||||||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) final;
|
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) final;
|
||||||
|
|
||||||
void visibilityChanged(bool keepInMemory) final;
|
void visibilityChanged(bool visible) final;
|
||||||
void reloadTheme() final;
|
void reloadTheme() final;
|
||||||
|
|
||||||
qreal getAscent() const final;
|
qreal getAscent() const final;
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Timestamp : public Text
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
Timestamp(const QDateTime& time_, const QString& format, const QFont& font,
|
Timestamp(const QDateTime& time_, const QString& format, const QFont& font,
|
||||||
DocumentCache&, Settings&);
|
DocumentCache& documentCache, Settings& settings);
|
||||||
QDateTime getTime();
|
QDateTime getTime();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -32,7 +32,7 @@ class CustomTextDocument : public QTextDocument
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
CustomTextDocument(SmileyPack&, Settings&, QObject* parent = nullptr);
|
CustomTextDocument(SmileyPack& smileyPack, Settings& settings, QObject* parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QVariant loadResource(int type, const QUrl& name);
|
virtual QVariant loadResource(int type, const QUrl& name);
|
||||||
|
|
|
@ -28,7 +28,7 @@ class Settings;
|
||||||
class DocumentCache
|
class DocumentCache
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DocumentCache(SmileyPack&, Settings&);
|
DocumentCache(SmileyPack& smileyPack, Settings& settings);
|
||||||
~DocumentCache();
|
~DocumentCache();
|
||||||
DocumentCache(DocumentCache&) = delete;
|
DocumentCache(DocumentCache&) = delete;
|
||||||
DocumentCache& operator=(const DocumentCache&) = delete;
|
DocumentCache& operator=(const DocumentCache&) = delete;
|
||||||
|
|
|
@ -872,44 +872,50 @@ void Core::bootstrapDht()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onFriendRequest(Tox*, const uint8_t* cFriendPk, const uint8_t* cMessage,
|
void Core::onFriendRequest(Tox* tox, const uint8_t* cFriendPk, const uint8_t* cMessage,
|
||||||
size_t cMessageSize, void* core)
|
size_t cMessageSize, void* core)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
ToxPk friendPk(cFriendPk);
|
ToxPk friendPk(cFriendPk);
|
||||||
QString requestMessage = ToxString(cMessage, cMessageSize).getQString();
|
QString requestMessage = ToxString(cMessage, cMessageSize).getQString();
|
||||||
emit static_cast<Core*>(core)->friendRequestReceived(friendPk, requestMessage);
|
emit static_cast<Core*>(core)->friendRequestReceived(friendPk, requestMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onFriendMessage(Tox*, uint32_t friendId, Tox_Message_Type type, const uint8_t* cMessage,
|
void Core::onFriendMessage(Tox* tox, uint32_t friendId, Tox_Message_Type type, const uint8_t* cMessage,
|
||||||
size_t cMessageSize, void* core)
|
size_t cMessageSize, void* core)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
bool isAction = (type == TOX_MESSAGE_TYPE_ACTION);
|
bool isAction = (type == TOX_MESSAGE_TYPE_ACTION);
|
||||||
QString msg = ToxString(cMessage, cMessageSize).getQString();
|
QString msg = ToxString(cMessage, cMessageSize).getQString();
|
||||||
emit static_cast<Core*>(core)->friendMessageReceived(friendId, msg, isAction);
|
emit static_cast<Core*>(core)->friendMessageReceived(friendId, msg, isAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onFriendNameChange(Tox*, uint32_t friendId, const uint8_t* cName, size_t cNameSize, void* core)
|
void Core::onFriendNameChange(Tox* tox, uint32_t friendId, const uint8_t* cName, size_t cNameSize, void* core)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
QString newName = ToxString(cName, cNameSize).getQString();
|
QString newName = ToxString(cName, cNameSize).getQString();
|
||||||
// no saveRequest, this callback is called on every connection, not just on name change
|
// no saveRequest, this callback is called on every connection, not just on name change
|
||||||
emit static_cast<Core*>(core)->friendUsernameChanged(friendId, newName);
|
emit static_cast<Core*>(core)->friendUsernameChanged(friendId, newName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onFriendTypingChange(Tox*, uint32_t friendId, bool isTyping, void* core)
|
void Core::onFriendTypingChange(Tox* tox, uint32_t friendId, bool isTyping, void* core)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
emit static_cast<Core*>(core)->friendTypingChanged(friendId, isTyping);
|
emit static_cast<Core*>(core)->friendTypingChanged(friendId, isTyping);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onStatusMessageChanged(Tox*, uint32_t friendId, const uint8_t* cMessage,
|
void Core::onStatusMessageChanged(Tox* tox, uint32_t friendId, const uint8_t* cMessage,
|
||||||
size_t cMessageSize, void* core)
|
size_t cMessageSize, void* core)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
QString message = ToxString(cMessage, cMessageSize).getQString();
|
QString message = ToxString(cMessage, cMessageSize).getQString();
|
||||||
// no saveRequest, this callback is called on every connection, not just on name change
|
// no saveRequest, this callback is called on every connection, not just on name change
|
||||||
emit static_cast<Core*>(core)->friendStatusMessageChanged(friendId, message);
|
emit static_cast<Core*>(core)->friendStatusMessageChanged(friendId, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onUserStatusChanged(Tox*, uint32_t friendId, Tox_User_Status userstatus, void* core)
|
void Core::onUserStatusChanged(Tox* tox, uint32_t friendId, Tox_User_Status userstatus, void* core)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
Status::Status status;
|
Status::Status status;
|
||||||
switch (userstatus) {
|
switch (userstatus) {
|
||||||
case TOX_USER_STATUS_AWAY:
|
case TOX_USER_STATUS_AWAY:
|
||||||
|
@ -929,8 +935,9 @@ void Core::onUserStatusChanged(Tox*, uint32_t friendId, Tox_User_Status userstat
|
||||||
emit static_cast<Core*>(core)->friendStatusChanged(friendId, status);
|
emit static_cast<Core*>(core)->friendStatusChanged(friendId, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onConnectionStatusChanged(Tox*, uint32_t friendId, Tox_Connection status, void* vCore)
|
void Core::onConnectionStatusChanged(Tox* tox, uint32_t friendId, Tox_Connection status, void* vCore)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
Core* core = static_cast<Core*>(vCore);
|
Core* core = static_cast<Core*>(vCore);
|
||||||
Status::Status friendStatus = Status::Status::Offline;
|
Status::Status friendStatus = Status::Status::Offline;
|
||||||
switch (status)
|
switch (status)
|
||||||
|
@ -981,26 +988,29 @@ void Core::onGroupInvite(Tox* tox, uint32_t friendId, Tox_Conference_Type type,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onGroupMessage(Tox*, uint32_t groupId, uint32_t peerId, Tox_Message_Type type,
|
void Core::onGroupMessage(Tox* tox, uint32_t groupId, uint32_t peerId, Tox_Message_Type type,
|
||||||
const uint8_t* cMessage, size_t length, void* vCore)
|
const uint8_t* cMessage, size_t length, void* vCore)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
Core* core = static_cast<Core*>(vCore);
|
Core* core = static_cast<Core*>(vCore);
|
||||||
bool isAction = type == TOX_MESSAGE_TYPE_ACTION;
|
bool isAction = type == TOX_MESSAGE_TYPE_ACTION;
|
||||||
QString message = ToxString(cMessage, length).getQString();
|
QString message = ToxString(cMessage, length).getQString();
|
||||||
emit core->groupMessageReceived(groupId, peerId, message, isAction);
|
emit core->groupMessageReceived(groupId, peerId, message, isAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onGroupPeerListChange(Tox*, uint32_t groupId, void* vCore)
|
void Core::onGroupPeerListChange(Tox* tox, uint32_t groupId, void* vCore)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
const auto core = static_cast<Core*>(vCore);
|
const auto core = static_cast<Core*>(vCore);
|
||||||
qDebug() << QString("Group %1 peerlist changed").arg(groupId);
|
qDebug() << QString("Group %1 peerlist changed").arg(groupId);
|
||||||
// no saveRequest, this callback is called on every connection to group peer, not just on brand new peers
|
// no saveRequest, this callback is called on every connection to group peer, not just on brand new peers
|
||||||
emit core->groupPeerlistChanged(groupId);
|
emit core->groupPeerlistChanged(groupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onGroupPeerNameChange(Tox*, uint32_t groupId, uint32_t peerId, const uint8_t* name,
|
void Core::onGroupPeerNameChange(Tox* tox, uint32_t groupId, uint32_t peerId, const uint8_t* name,
|
||||||
size_t length, void* vCore)
|
size_t length, void* vCore)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
const auto newName = ToxString(name, length).getQString();
|
const auto newName = ToxString(name, length).getQString();
|
||||||
qDebug() << QString("Group %1, peer %2, name changed to %3").arg(groupId).arg(peerId).arg(newName);
|
qDebug() << QString("Group %1, peer %2, name changed to %3").arg(groupId).arg(peerId).arg(newName);
|
||||||
auto* core = static_cast<Core*>(vCore);
|
auto* core = static_cast<Core*>(vCore);
|
||||||
|
@ -1008,9 +1018,10 @@ void Core::onGroupPeerNameChange(Tox*, uint32_t groupId, uint32_t peerId, const
|
||||||
emit core->groupPeerNameChanged(groupId, peerPk, newName);
|
emit core->groupPeerNameChanged(groupId, peerPk, newName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onGroupTitleChange(Tox*, uint32_t groupId, uint32_t peerId, const uint8_t* cTitle,
|
void Core::onGroupTitleChange(Tox* tox, uint32_t groupId, uint32_t peerId, const uint8_t* cTitle,
|
||||||
size_t length, void* vCore)
|
size_t length, void* vCore)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
Core* core = static_cast<Core*>(vCore);
|
Core* core = static_cast<Core*>(vCore);
|
||||||
QString author;
|
QString author;
|
||||||
// from tox.h: "If peer_number == UINT32_MAX, then author is unknown (e.g. initial joining the conference)."
|
// from tox.h: "If peer_number == UINT32_MAX, then author is unknown (e.g. initial joining the conference)."
|
||||||
|
@ -1024,15 +1035,17 @@ void Core::onGroupTitleChange(Tox*, uint32_t groupId, uint32_t peerId, const uin
|
||||||
/**
|
/**
|
||||||
* @brief Handling of custom lossless packets received by toxcore. Currently only used to forward toxext packets to CoreExt
|
* @brief Handling of custom lossless packets received by toxcore. Currently only used to forward toxext packets to CoreExt
|
||||||
*/
|
*/
|
||||||
void Core::onLosslessPacket(Tox*, uint32_t friendId,
|
void Core::onLosslessPacket(Tox* tox, uint32_t friendId,
|
||||||
const uint8_t* data, size_t length, void* vCore)
|
const uint8_t* data, size_t length, void* vCore)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
Core* core = static_cast<Core*>(vCore);
|
Core* core = static_cast<Core*>(vCore);
|
||||||
core->ext->onLosslessPacket(friendId, data, length);
|
core->ext->onLosslessPacket(friendId, data, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onReadReceiptCallback(Tox*, uint32_t friendId, uint32_t receipt, void* core)
|
void Core::onReadReceiptCallback(Tox* tox, uint32_t friendId, uint32_t receipt, void* core)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
emit static_cast<Core*>(core)->receiptRecieved(friendId, ReceiptNum{receipt});
|
emit static_cast<Core*>(core)->receiptRecieved(friendId, ReceiptNum{receipt});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ public slots:
|
||||||
QByteArray getToxSaveData();
|
QByteArray getToxSaveData();
|
||||||
|
|
||||||
void acceptFriendRequest(const ToxPk& friendPk);
|
void acceptFriendRequest(const ToxPk& friendPk);
|
||||||
void requestFriendship(const ToxId& friendAddress, const QString& message);
|
void requestFriendship(const ToxId& friendId, const QString& message);
|
||||||
void groupInviteFriend(uint32_t friendId, int groupId);
|
void groupInviteFriend(uint32_t friendId, int groupId);
|
||||||
int createGroup(uint8_t type = TOX_CONFERENCE_TYPE_AV);
|
int createGroup(uint8_t type = TOX_CONFERENCE_TYPE_AV);
|
||||||
|
|
||||||
|
@ -197,9 +197,9 @@ signals:
|
||||||
void failedToRemoveFriend(uint32_t friendId);
|
void failedToRemoveFriend(uint32_t friendId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Core(QThread* coreThread_, IBootstrapListGenerator& bootstrapNodes_, const ICoreSettings& settings_);
|
Core(QThread* coreThread_, IBootstrapListGenerator& bootstrapListGenerator_, const ICoreSettings& settings_);
|
||||||
|
|
||||||
static void onFriendRequest(Tox* tox, const uint8_t* cUserId, const uint8_t* cMessage,
|
static void onFriendRequest(Tox* tox, const uint8_t* cFriendPk, const uint8_t* cMessage,
|
||||||
size_t cMessageSize, void* core);
|
size_t cMessageSize, void* core);
|
||||||
static void onFriendMessage(Tox* tox, uint32_t friendId, Tox_Message_Type type,
|
static void onFriendMessage(Tox* tox, uint32_t friendId, Tox_Message_Type type,
|
||||||
const uint8_t* cMessage, size_t cMessageSize, void* core);
|
const uint8_t* cMessage, size_t cMessageSize, void* core);
|
||||||
|
@ -216,8 +216,8 @@ private:
|
||||||
const uint8_t* cookie, size_t length, void* vCore);
|
const uint8_t* cookie, size_t length, void* vCore);
|
||||||
static void onGroupMessage(Tox* tox, uint32_t groupId, uint32_t peerId, Tox_Message_Type type,
|
static void onGroupMessage(Tox* tox, uint32_t groupId, uint32_t peerId, Tox_Message_Type type,
|
||||||
const uint8_t* cMessage, size_t length, void* vCore);
|
const uint8_t* cMessage, size_t length, void* vCore);
|
||||||
static void onGroupPeerListChange(Tox*, uint32_t groupId, void* core);
|
static void onGroupPeerListChange(Tox* tox, uint32_t groupId, void* core);
|
||||||
static void onGroupPeerNameChange(Tox*, uint32_t groupId, uint32_t peerId, const uint8_t* name,
|
static void onGroupPeerNameChange(Tox* tox, uint32_t groupId, uint32_t peerId, const uint8_t* name,
|
||||||
size_t length, void* core);
|
size_t length, void* core);
|
||||||
static void onGroupTitleChange(Tox* tox, uint32_t groupId, uint32_t peerId,
|
static void onGroupTitleChange(Tox* tox, uint32_t groupId, uint32_t peerId,
|
||||||
const uint8_t* cTitle, size_t length, void* vCore);
|
const uint8_t* cTitle, size_t length, void* vCore);
|
||||||
|
|
|
@ -572,21 +572,21 @@ void CoreAV::joinGroupCall(const Group& group)
|
||||||
* @note Call from the GUI thread.
|
* @note Call from the GUI thread.
|
||||||
* @param groupId Id of group to leave
|
* @param groupId Id of group to leave
|
||||||
*/
|
*/
|
||||||
void CoreAV::leaveGroupCall(int groupId)
|
void CoreAV::leaveGroupCall(int groupNum)
|
||||||
{
|
{
|
||||||
QWriteLocker locker{&callsLock};
|
QWriteLocker locker{&callsLock};
|
||||||
|
|
||||||
qDebug() << QString("Leaving group call %1").arg(groupId);
|
qDebug() << QString("Leaving group call %1").arg(groupNum);
|
||||||
|
|
||||||
groupCalls.erase(groupId);
|
groupCalls.erase(groupNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CoreAV::sendGroupCallAudio(int groupId, const int16_t* pcm, size_t samples, uint8_t chans,
|
bool CoreAV::sendGroupCallAudio(int groupNum, const int16_t* pcm, size_t samples, uint8_t chans,
|
||||||
uint32_t rate) const
|
uint32_t rate) const
|
||||||
{
|
{
|
||||||
QReadLocker locker{&callsLock};
|
QReadLocker locker{&callsLock};
|
||||||
|
|
||||||
std::map<int, ToxGroupCallPtr>::const_iterator it = groupCalls.find(groupId);
|
std::map<int, ToxGroupCallPtr>::const_iterator it = groupCalls.find(groupNum);
|
||||||
if (it == groupCalls.end()) {
|
if (it == groupCalls.end()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -595,7 +595,7 @@ bool CoreAV::sendGroupCallAudio(int groupId, const int16_t* pcm, size_t samples,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toxav_group_send_audio(toxav_get_tox(toxav.get()), groupId, pcm, samples, chans, rate) != 0)
|
if (toxav_group_send_audio(toxav_get_tox(toxav.get()), groupNum, pcm, samples, chans, rate) != 0)
|
||||||
qDebug() << "toxav_group_send_audio error";
|
qDebug() << "toxav_group_send_audio error";
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -844,9 +844,10 @@ void CoreAV::videoBitrateCallback(ToxAV* toxav, uint32_t friendNum, uint32_t rat
|
||||||
qDebug() << "Recommended video bitrate with" << friendNum << " is now " << rate << ", ignoring it";
|
qDebug() << "Recommended video bitrate with" << friendNum << " is now " << rate << ", ignoring it";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreAV::audioFrameCallback(ToxAV*, uint32_t friendNum, const int16_t* pcm, size_t sampleCount,
|
void CoreAV::audioFrameCallback(ToxAV* toxAV, uint32_t friendNum, const int16_t* pcm, size_t sampleCount,
|
||||||
uint8_t channels, uint32_t samplingRate, void* vSelf)
|
uint8_t channels, uint32_t samplingRate, void* vSelf)
|
||||||
{
|
{
|
||||||
|
std::ignore = toxAV;
|
||||||
CoreAV* self = static_cast<CoreAV*>(vSelf);
|
CoreAV* self = static_cast<CoreAV*>(vSelf);
|
||||||
// This callback should come from the CoreAV thread
|
// This callback should come from the CoreAV thread
|
||||||
assert(QThread::currentThread() == self->coreavThread.get());
|
assert(QThread::currentThread() == self->coreavThread.get());
|
||||||
|
@ -866,10 +867,11 @@ void CoreAV::audioFrameCallback(ToxAV*, uint32_t friendNum, const int16_t* pcm,
|
||||||
call.playAudioBuffer(pcm, sampleCount, channels, samplingRate);
|
call.playAudioBuffer(pcm, sampleCount, channels, samplingRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreAV::videoFrameCallback(ToxAV*, uint32_t friendNum, uint16_t w, uint16_t h,
|
void CoreAV::videoFrameCallback(ToxAV* toxAV, uint32_t friendNum, uint16_t w, uint16_t h,
|
||||||
const uint8_t* y, const uint8_t* u, const uint8_t* v,
|
const uint8_t* y, const uint8_t* u, const uint8_t* v,
|
||||||
int32_t ystride, int32_t ustride, int32_t vstride, void* vSelf)
|
int32_t ystride, int32_t ustride, int32_t vstride, void* vSelf)
|
||||||
{
|
{
|
||||||
|
std::ignore = toxAV;
|
||||||
auto self = static_cast<CoreAV*>(vSelf);
|
auto self = static_cast<CoreAV*>(vSelf);
|
||||||
// This callback should come from the CoreAV thread
|
// This callback should come from the CoreAV thread
|
||||||
assert(QThread::currentThread() == self->coreavThread.get());
|
assert(QThread::currentThread() == self->coreavThread.get());
|
||||||
|
|
|
@ -52,7 +52,7 @@ public:
|
||||||
using CoreAVPtr = std::unique_ptr<CoreAV>;
|
using CoreAVPtr = std::unique_ptr<CoreAV>;
|
||||||
static CoreAVPtr makeCoreAV(Tox* core, CompatibleRecursiveMutex& toxCoreLock,
|
static CoreAVPtr makeCoreAV(Tox* core, CompatibleRecursiveMutex& toxCoreLock,
|
||||||
IAudioSettings& audioSettings, IGroupSettings& groupSettings,
|
IAudioSettings& audioSettings, IGroupSettings& groupSettings,
|
||||||
CameraSource&);
|
CameraSource& cameraSource);
|
||||||
|
|
||||||
void setAudio(IAudioControl& newAudio);
|
void setAudio(IAudioControl& newAudio);
|
||||||
IAudioControl* getAudio();
|
IAudioControl* getAudio();
|
||||||
|
@ -60,17 +60,17 @@ public:
|
||||||
~CoreAV();
|
~CoreAV();
|
||||||
|
|
||||||
bool isCallStarted(const Friend* f) const;
|
bool isCallStarted(const Friend* f) const;
|
||||||
bool isCallStarted(const Group* f) const;
|
bool isCallStarted(const Group* g) const;
|
||||||
bool isCallActive(const Friend* f) const;
|
bool isCallActive(const Friend* f) const;
|
||||||
bool isCallActive(const Group* g) const;
|
bool isCallActive(const Group* g) const;
|
||||||
bool isCallVideoEnabled(const Friend* f) const;
|
bool isCallVideoEnabled(const Friend* f) const;
|
||||||
bool sendCallAudio(uint32_t friendNum, const int16_t* pcm, size_t samples, uint8_t chans,
|
bool sendCallAudio(uint32_t callId, const int16_t* pcm, size_t samples, uint8_t chans,
|
||||||
uint32_t rate) const;
|
uint32_t rate) const;
|
||||||
void sendCallVideo(uint32_t friendNum, std::shared_ptr<VideoFrame> frame);
|
void sendCallVideo(uint32_t callId, std::shared_ptr<VideoFrame> frame);
|
||||||
bool sendGroupCallAudio(int groupNum, const int16_t* pcm, size_t samples, uint8_t chans,
|
bool sendGroupCallAudio(int groupNum, const int16_t* pcm, size_t samples, uint8_t chans,
|
||||||
uint32_t rate) const;
|
uint32_t rate) const;
|
||||||
|
|
||||||
VideoSource* getVideoSourceFromCall(int callNumber) const;
|
VideoSource* getVideoSourceFromCall(int friendNum) const;
|
||||||
void sendNoVideo();
|
void sendNoVideo();
|
||||||
|
|
||||||
void joinGroupCall(const Group& group);
|
void joinGroupCall(const Group& group);
|
||||||
|
@ -103,7 +103,7 @@ signals:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
static void callCallback(ToxAV* toxAV, uint32_t friendNum, bool audio, bool video, void* self);
|
static void callCallback(ToxAV* toxAV, uint32_t friendNum, bool audio, bool video, void* self);
|
||||||
static void stateCallback(ToxAV*, uint32_t friendNum, uint32_t state, void* self);
|
static void stateCallback(ToxAV* toxAV, uint32_t friendNum, uint32_t state, void* self);
|
||||||
static void bitrateCallback(ToxAV* toxAV, uint32_t friendNum, uint32_t arate, uint32_t vrate,
|
static void bitrateCallback(ToxAV* toxAV, uint32_t friendNum, uint32_t arate, uint32_t vrate,
|
||||||
void* self);
|
void* self);
|
||||||
static void audioBitrateCallback(ToxAV* toxAV, uint32_t friendNum, uint32_t rate, void* self);
|
static void audioBitrateCallback(ToxAV* toxAV, uint32_t friendNum, uint32_t rate, void* self);
|
||||||
|
@ -118,8 +118,8 @@ private:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CoreAV(std::unique_ptr<ToxAV, ToxAVDeleter> tox_, CompatibleRecursiveMutex &toxCoreLock,
|
CoreAV(std::unique_ptr<ToxAV, ToxAVDeleter> toxav_, CompatibleRecursiveMutex &toxCoreLock,
|
||||||
IAudioSettings& audioSettings_, IGroupSettings& groupSettings_, CameraSource&);
|
IAudioSettings& audioSettings_, IGroupSettings& groupSettings_, CameraSource& cameraSource);
|
||||||
void connectCallbacks();
|
void connectCallbacks();
|
||||||
|
|
||||||
void process();
|
void process();
|
||||||
|
|
|
@ -76,12 +76,13 @@ CoreExt::Packet::Packet(
|
||||||
ToxExtensionMessages* toxExtMessages_,
|
ToxExtensionMessages* toxExtMessages_,
|
||||||
uint32_t friendId_,
|
uint32_t friendId_,
|
||||||
std::mutex* toxext_mutex_,
|
std::mutex* toxext_mutex_,
|
||||||
PacketPassKey)
|
PacketPassKey passKey)
|
||||||
: toxext_mutex(toxext_mutex_)
|
: toxext_mutex(toxext_mutex_)
|
||||||
, toxExtMessages(toxExtMessages_)
|
, toxExtMessages(toxExtMessages_)
|
||||||
, packetList(packetList_)
|
, packetList(packetList_)
|
||||||
, friendId(friendId_)
|
, friendId(friendId_)
|
||||||
{
|
{
|
||||||
|
std::ignore = passKey;
|
||||||
assert(toxext_mutex != nullptr);
|
assert(toxext_mutex != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ public:
|
||||||
ToxExtensionMessages* toxExtMessages,
|
ToxExtensionMessages* toxExtMessages,
|
||||||
uint32_t friendId,
|
uint32_t friendId,
|
||||||
std::mutex* toxext_mutex,
|
std::mutex* toxext_mutex,
|
||||||
PacketPassKey);
|
PacketPassKey passKey);
|
||||||
|
|
||||||
// Delete copy constructor, we shouldn't be able to copy
|
// Delete copy constructor, we shouldn't be able to copy
|
||||||
Packet(Packet const& other) = delete;
|
Packet(Packet const& other) = delete;
|
||||||
|
|
|
@ -396,9 +396,10 @@ void CoreFile::handleAvatarOffer(uint32_t friendId, uint32_t fileId, bool accept
|
||||||
addFile(friendId, fileId, file);
|
addFile(friendId, fileId, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreFile::onFileControlCallback(Tox*, uint32_t friendId, uint32_t fileId,
|
void CoreFile::onFileControlCallback(Tox* tox, uint32_t friendId, uint32_t fileId,
|
||||||
Tox_File_Control control, void* vCore)
|
Tox_File_Control control, void* vCore)
|
||||||
{
|
{
|
||||||
|
std::ignore = tox;
|
||||||
Core* core = static_cast<Core*>(vCore);
|
Core* core = static_cast<Core*>(vCore);
|
||||||
CoreFile* coreFile = core->getCoreFile();
|
CoreFile* coreFile = core->getCoreFile();
|
||||||
ToxFile* file = coreFile->findFile(friendId, fileId);
|
ToxFile* file = coreFile->findFile(friendId, fileId);
|
||||||
|
|
|
@ -117,11 +117,11 @@ CoreVideoSource* ToxCall::getVideoSource() const
|
||||||
return videoSource;
|
return videoSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
ToxFriendCall::ToxFriendCall(uint32_t FriendNum, bool VideoEnabled, CoreAV& av_,
|
ToxFriendCall::ToxFriendCall(uint32_t friendNum, bool VideoEnabled, CoreAV& av_,
|
||||||
IAudioControl& audio_, CameraSource& cameraSource_)
|
IAudioControl& audio_, CameraSource& cameraSource_)
|
||||||
: ToxCall(VideoEnabled, av_, audio_)
|
: ToxCall(VideoEnabled, av_, audio_)
|
||||||
, sink(audio_.makeSink())
|
, sink(audio_.makeSink())
|
||||||
, friendId{FriendNum}
|
, friendId{friendNum}
|
||||||
, cameraSource{cameraSource_}
|
, cameraSource{cameraSource_}
|
||||||
{
|
{
|
||||||
connect(audioSource.get(), &IAudioSource::frameAvailable, this,
|
connect(audioSource.get(), &IAudioSource::frameAvailable, this,
|
||||||
|
@ -144,8 +144,8 @@ ToxFriendCall::ToxFriendCall(uint32_t FriendNum, bool VideoEnabled, CoreAV& av_,
|
||||||
}
|
}
|
||||||
cameraSource.subscribe();
|
cameraSource.subscribe();
|
||||||
videoInConn = QObject::connect(&cameraSource, &VideoSource::frameAvailable,
|
videoInConn = QObject::connect(&cameraSource, &VideoSource::frameAvailable,
|
||||||
[&av_, FriendNum](std::shared_ptr<VideoFrame> frame) {
|
[&av_, friendNum](std::shared_ptr<VideoFrame> frame) {
|
||||||
av_.sendCallVideo(FriendNum, frame);
|
av_.sendCallVideo(friendNum, frame);
|
||||||
});
|
});
|
||||||
if (!videoInConn) {
|
if (!videoInConn) {
|
||||||
qDebug() << "Video connection not working";
|
qDebug() << "Video connection not working";
|
||||||
|
|
|
@ -92,7 +92,7 @@ class ToxFriendCall : public ToxCall
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ToxFriendCall() = delete;
|
ToxFriendCall() = delete;
|
||||||
ToxFriendCall(uint32_t friendId, bool VideoEnabled, CoreAV& av_, IAudioControl& audio_, CameraSource&);
|
ToxFriendCall(uint32_t friendNum, bool VideoEnabled, CoreAV& av_, IAudioControl& audio_, CameraSource& cameraSource);
|
||||||
ToxFriendCall(ToxFriendCall&& other) = delete;
|
ToxFriendCall(ToxFriendCall&& other) = delete;
|
||||||
ToxFriendCall& operator=(ToxFriendCall&& other) = delete;
|
ToxFriendCall& operator=(ToxFriendCall&& other) = delete;
|
||||||
~ToxFriendCall();
|
~ToxFriendCall();
|
||||||
|
|
|
@ -34,11 +34,11 @@ class Settings;
|
||||||
class FriendList
|
class FriendList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static Friend* addFriend(uint32_t friendId, const ToxPk& friendPk, Settings&);
|
static Friend* addFriend(uint32_t friendId, const ToxPk& friendPk, Settings& settings);
|
||||||
static Friend* findFriend(const ToxPk& friendPk);
|
static Friend* findFriend(const ToxPk& friendPk);
|
||||||
static const ToxPk& id2Key(uint32_t friendId);
|
static const ToxPk& id2Key(uint32_t friendId);
|
||||||
static QList<Friend*> getAllFriends();
|
static QList<Friend*> getAllFriends();
|
||||||
static void removeFriend(const ToxPk& friendPk, Settings&, bool fake = false);
|
static void removeFriend(const ToxPk& friendPk, Settings& settings, bool fake = false);
|
||||||
static void clear();
|
static void clear();
|
||||||
static QString decideNickname(const ToxPk& friendPk, const QString& origName);
|
static QString decideNickname(const ToxPk& friendPk, const QString& origName);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ class QString;
|
||||||
class GroupList
|
class GroupList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static Group* addGroup(Core& core, int groupId, const GroupId& persistentGroupId, const QString& name, bool isAvGroupchat, const QString& selfName);
|
static Group* addGroup(Core& core, int groupNum, const GroupId& persistentGroupId, const QString& name, bool isAvGroupchat, const QString& selfName);
|
||||||
static Group* findGroup(const GroupId& groupId);
|
static Group* findGroup(const GroupId& groupId);
|
||||||
static const GroupId& id2Key(uint32_t groupNum);
|
static const GroupId& id2Key(uint32_t groupNum);
|
||||||
static void removeGroup(const GroupId& groupId, bool fake = false);
|
static void removeGroup(const GroupId& groupId, bool fake = false);
|
||||||
|
|
|
@ -37,7 +37,7 @@ public:
|
||||||
Friend& operator=(const Friend& other) = delete;
|
Friend& operator=(const Friend& other) = delete;
|
||||||
|
|
||||||
void setName(const QString& name) override;
|
void setName(const QString& name) override;
|
||||||
void setAlias(const QString& name);
|
void setAlias(const QString& alias);
|
||||||
QString getDisplayedName() const override;
|
QString getDisplayedName() const override;
|
||||||
bool hasAlias() const;
|
bool hasAlias() const;
|
||||||
QString getUserName() const;
|
QString getUserName() const;
|
||||||
|
|
|
@ -63,9 +63,9 @@ private:
|
||||||
bool hideGroups = false;
|
bool hideGroups = false;
|
||||||
} filterParams;
|
} filterParams;
|
||||||
|
|
||||||
void removeAll(IFriendListItem*);
|
void removeAll(IFriendListItem* item);
|
||||||
bool cmpByName(const IFriendListItemPtr&, const IFriendListItemPtr&);
|
bool cmpByName(const IFriendListItemPtr& itemA, const IFriendListItemPtr& itemB);
|
||||||
bool cmpByActivity(const IFriendListItemPtr&, const IFriendListItemPtr&);
|
bool cmpByActivity(const IFriendListItemPtr& itemA, const IFriendListItemPtr& itemB);
|
||||||
|
|
||||||
bool byName = true;
|
bool byName = true;
|
||||||
bool hideCircles = false;
|
bool hideCircles = false;
|
||||||
|
|
|
@ -107,8 +107,9 @@ void FriendMessageDispatcher::onExtReceiptReceived(uint64_t receiptId)
|
||||||
* @brief Handles status change for friend
|
* @brief Handles status change for friend
|
||||||
* @note Parameters just to fit slot api
|
* @note Parameters just to fit slot api
|
||||||
*/
|
*/
|
||||||
void FriendMessageDispatcher::onFriendOnlineOfflineChanged(const ToxPk&, bool isOnline)
|
void FriendMessageDispatcher::onFriendOnlineOfflineChanged(const ToxPk& friendPk, bool isOnline)
|
||||||
{
|
{
|
||||||
|
std::ignore = friendPk;
|
||||||
if (isOnline) {
|
if (isOnline) {
|
||||||
auto messagesToResend = offlineMsgEngine.removeAllMessages();
|
auto messagesToResend = offlineMsgEngine.removeAllMessages();
|
||||||
for (auto const& message : messagesToResend) {
|
for (auto const& message : messagesToResend) {
|
||||||
|
|
|
@ -44,16 +44,16 @@ public:
|
||||||
std::pair<DispatchedMessageId, DispatchedMessageId> sendExtendedMessage(const QString& content, ExtensionSet extensions) override;
|
std::pair<DispatchedMessageId, DispatchedMessageId> sendExtendedMessage(const QString& content, ExtensionSet extensions) override;
|
||||||
void onMessageReceived(bool isAction, const QString& content);
|
void onMessageReceived(bool isAction, const QString& content);
|
||||||
void onReceiptReceived(ReceiptNum receipt);
|
void onReceiptReceived(ReceiptNum receipt);
|
||||||
void onExtMessageReceived(const QString& message);
|
void onExtMessageReceived(const QString& content);
|
||||||
void onExtReceiptReceived(uint64_t receiptId);
|
void onExtReceiptReceived(uint64_t receiptId);
|
||||||
void clearOutgoingMessages();
|
void clearOutgoingMessages();
|
||||||
private slots:
|
private slots:
|
||||||
void onFriendOnlineOfflineChanged(const ToxPk& key, bool isOnline);
|
void onFriendOnlineOfflineChanged(const ToxPk& friendPk, bool isOnline);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void sendProcessedMessage(Message const& msg, OfflineMsgEngine::CompletionFn fn);
|
void sendProcessedMessage(Message const& message, OfflineMsgEngine::CompletionFn onOfflineMsgComplete);
|
||||||
void sendExtendedProcessedMessage(Message const& msg, OfflineMsgEngine::CompletionFn fn);
|
void sendExtendedProcessedMessage(Message const& message, OfflineMsgEngine::CompletionFn onOfflineMsgComplete);
|
||||||
void sendCoreProcessedMessage(Message const& msg, OfflineMsgEngine::CompletionFn fn);
|
void sendCoreProcessedMessage(Message const& message, OfflineMsgEngine::CompletionFn onOfflineMsgComplete);
|
||||||
OfflineMsgEngine::CompletionFn getCompletionFn(DispatchedMessageId messageId);
|
OfflineMsgEngine::CompletionFn getCompletionFn(DispatchedMessageId messageId);
|
||||||
|
|
||||||
Friend& f;
|
Friend& f;
|
||||||
|
|
|
@ -36,7 +36,7 @@ class GroupMessageDispatcher : public IMessageDispatcher
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GroupMessageDispatcher(Group& group, MessageProcessor processor, ICoreIdHandler& idHandler,
|
GroupMessageDispatcher(Group& g_, MessageProcessor processor, ICoreIdHandler& idHandler,
|
||||||
ICoreGroupMessageSender& messageSender,
|
ICoreGroupMessageSender& messageSender,
|
||||||
const IGroupSettings& groupSettings);
|
const IGroupSettings& groupSettings);
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ public:
|
||||||
MessageProcessor(const SharedParams& sharedParams_);
|
MessageProcessor(const SharedParams& sharedParams_);
|
||||||
|
|
||||||
std::vector<Message> processOutgoingMessage(bool isAction, const QString& content, ExtensionSet extensions);
|
std::vector<Message> processOutgoingMessage(bool isAction, const QString& content, ExtensionSet extensions);
|
||||||
Message processIncomingCoreMessage(bool isAction, const QString& content);
|
Message processIncomingCoreMessage(bool isAction, const QString& message);
|
||||||
Message processIncomingExtMessage(const QString& content);
|
Message processIncomingExtMessage(const QString& content);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -34,7 +34,7 @@ class ProfileInfo : public QObject, public IProfileInfo
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ProfileInfo(Core* core_, Profile* profile_, Settings&);
|
ProfileInfo(Core* core_, Profile* profile_, Settings& settings);
|
||||||
|
|
||||||
bool setPassword(const QString& password) override;
|
bool setPassword(const QString& password) override;
|
||||||
bool deletePassword() override;
|
bool deletePassword() override;
|
||||||
|
|
|
@ -436,8 +436,9 @@ void SessionChatLog::onMessageComplete(DispatchedMessageId id)
|
||||||
emit itemUpdated(messageIt->first);
|
emit itemUpdated(messageIt->first);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SessionChatLog::onMessageBroken(DispatchedMessageId id, BrokenMessageReason)
|
void SessionChatLog::onMessageBroken(DispatchedMessageId id, BrokenMessageReason reason)
|
||||||
{
|
{
|
||||||
|
std::ignore = reason;
|
||||||
auto chatLogIdxIt = outgoingMessages.find(id);
|
auto chatLogIdxIt = outgoingMessages.find(id);
|
||||||
|
|
||||||
if (chatLogIdxIt == outgoingMessages.end()) {
|
if (chatLogIdxIt == outgoingMessages.end()) {
|
||||||
|
|
|
@ -37,9 +37,9 @@ public:
|
||||||
|
|
||||||
~SessionChatLog();
|
~SessionChatLog();
|
||||||
const ChatLogItem& at(ChatLogIdx idx) const override;
|
const ChatLogItem& at(ChatLogIdx idx) const override;
|
||||||
SearchResult searchForward(SearchPos startIdx, const QString& phrase,
|
SearchResult searchForward(SearchPos startPos, const QString& phrase,
|
||||||
const ParameterSearch& parameter) const override;
|
const ParameterSearch& parameter) const override;
|
||||||
SearchResult searchBackward(SearchPos startIdx, const QString& phrase,
|
SearchResult searchBackward(SearchPos startPos, const QString& phrase,
|
||||||
const ParameterSearch& parameter) const override;
|
const ParameterSearch& parameter) const override;
|
||||||
ChatLogIdx getFirstIdx() const override;
|
ChatLogIdx getFirstIdx() const override;
|
||||||
ChatLogIdx getNextIdx() const override;
|
ChatLogIdx getNextIdx() const override;
|
||||||
|
|
|
@ -186,7 +186,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
History(std::shared_ptr<RawDatabase> db, Settings&);
|
History(std::shared_ptr<RawDatabase> db, Settings& settings);
|
||||||
~History();
|
~History();
|
||||||
|
|
||||||
bool isValid();
|
bool isValid();
|
||||||
|
|
|
@ -46,9 +46,9 @@ class Profile : public QObject
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static Profile* loadProfile(const QString& name, const QString& password, Settings& settings,
|
static Profile* loadProfile(const QString& name, const QString& password, Settings& settings,
|
||||||
const QCommandLineParser* parser, CameraSource&);
|
const QCommandLineParser* parser, CameraSource& cameraSource);
|
||||||
static Profile* createProfile(const QString& name, const QString& password, Settings& settings,
|
static Profile* createProfile(const QString& name, const QString& password, Settings& settings,
|
||||||
const QCommandLineParser* parser, CameraSource&);
|
const QCommandLineParser* parser, CameraSource& cameraSource);
|
||||||
~Profile();
|
~Profile();
|
||||||
|
|
||||||
Core& getCore() const;
|
Core& getCore() const;
|
||||||
|
@ -74,11 +74,11 @@ public:
|
||||||
|
|
||||||
bool rename(QString newName);
|
bool rename(QString newName);
|
||||||
|
|
||||||
static const QStringList getAllProfileNames(Settings&);
|
static const QStringList getAllProfileNames(Settings& settings);
|
||||||
|
|
||||||
static bool exists(QString name, Paths&);
|
static bool exists(QString name, Paths& paths);
|
||||||
static bool isEncrypted(QString name, Paths&);
|
static bool isEncrypted(QString name, Paths& paths);
|
||||||
static QString getDbPath(const QString& profileName, Paths&);
|
static QString getDbPath(const QString& profileName, Paths& paths);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void selfAvatarChanged(const QPixmap& pixmap);
|
void selfAvatarChanged(const QPixmap& pixmap);
|
||||||
|
@ -109,7 +109,7 @@ private:
|
||||||
static QStringList getFilesByExt(QString extension, Settings& settings);
|
static QStringList getFilesByExt(QString extension, Settings& settings);
|
||||||
QString avatarPath(const ToxPk& owner, bool forceUnencrypted = false);
|
QString avatarPath(const ToxPk& owner, bool forceUnencrypted = false);
|
||||||
bool saveToxSave(QByteArray data);
|
bool saveToxSave(QByteArray data);
|
||||||
void initCore(const QByteArray& toxsave, Settings &s, bool isNewProfile, CameraSource&);
|
void initCore(const QByteArray& toxsave, Settings &s, bool isNewProfile, CameraSource& cameraSource);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<AvatarBroadcaster> avatarBroadcaster;
|
std::unique_ptr<AvatarBroadcaster> avatarBroadcaster;
|
||||||
|
|
|
@ -31,15 +31,15 @@ private:
|
||||||
ProfileLocker() = delete;
|
ProfileLocker() = delete;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static bool isLockable(QString profile, Paths&);
|
static bool isLockable(QString profile, Paths& paths);
|
||||||
static bool lock(QString profile, Paths&);
|
static bool lock(QString profile, Paths& paths);
|
||||||
static void unlock();
|
static void unlock();
|
||||||
static bool hasLock();
|
static bool hasLock();
|
||||||
static QString getCurLockName();
|
static QString getCurLockName();
|
||||||
static void assertLock(Paths&);
|
static void assertLock(Paths& paths);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static QString lockPathFromName(const QString& name, const Paths&);
|
static QString lockPathFromName(const QString& name, const Paths& paths);
|
||||||
static void deathByBrokenLock();
|
static void deathByBrokenLock();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -258,7 +258,7 @@ public:
|
||||||
void setLightTrayIcon(bool newValue);
|
void setLightTrayIcon(bool newValue);
|
||||||
|
|
||||||
QString getStyle() const;
|
QString getStyle() const;
|
||||||
void setStyle(const QString& newValue);
|
void setStyle(const QString& newStyle);
|
||||||
|
|
||||||
bool getShowSystemTray() const;
|
bool getShowSystemTray() const;
|
||||||
void setShowSystemTray(bool newValue);
|
void setShowSystemTray(bool newValue);
|
||||||
|
@ -290,7 +290,7 @@ public:
|
||||||
void setProxyAddr(const QString& address) override;
|
void setProxyAddr(const QString& address) override;
|
||||||
|
|
||||||
ICoreSettings::ProxyType getProxyType() const override;
|
ICoreSettings::ProxyType getProxyType() const override;
|
||||||
void setProxyType(ICoreSettings::ProxyType type) override;
|
void setProxyType(ICoreSettings::ProxyType newValue) override;
|
||||||
|
|
||||||
quint16 getProxyPort() const override;
|
quint16 getProxyPort() const override;
|
||||||
void setProxyPort(quint16 port) override;
|
void setProxyPort(quint16 port) override;
|
||||||
|
@ -434,7 +434,7 @@ public:
|
||||||
void setAutoAcceptCall(const ToxPk& id, AutoAcceptCallFlags accept) override;
|
void setAutoAcceptCall(const ToxPk& id, AutoAcceptCallFlags accept) override;
|
||||||
|
|
||||||
QString getGlobalAutoAcceptDir() const;
|
QString getGlobalAutoAcceptDir() const;
|
||||||
void setGlobalAutoAcceptDir(const QString& dir);
|
void setGlobalAutoAcceptDir(const QString& newValue);
|
||||||
|
|
||||||
size_t getMaxAutoAcceptSize() const;
|
size_t getMaxAutoAcceptSize() const;
|
||||||
void setMaxAutoAcceptSize(size_t size);
|
void setMaxAutoAcceptSize(size_t size);
|
||||||
|
@ -501,7 +501,7 @@ public:
|
||||||
void setFriendCircleID(const ToxPk& id, int circleID) override;
|
void setFriendCircleID(const ToxPk& id, int circleID) override;
|
||||||
|
|
||||||
QDateTime getFriendActivity(const ToxPk& id) const override;
|
QDateTime getFriendActivity(const ToxPk& id) const override;
|
||||||
void setFriendActivity(const ToxPk& id, const QDateTime& date) override;
|
void setFriendActivity(const ToxPk& id, const QDateTime& activity) override;
|
||||||
|
|
||||||
void saveFriendSettings(const ToxPk& id) override;
|
void saveFriendSettings(const ToxPk& id) override;
|
||||||
void removeFriendSettings(const ToxPk& id) override;
|
void removeFriendSettings(const ToxPk& id) override;
|
||||||
|
@ -513,7 +513,7 @@ public:
|
||||||
SIGNAL_IMPL(Settings, contactNoteChanged, const ToxPk& id, const QString& note)
|
SIGNAL_IMPL(Settings, contactNoteChanged, const ToxPk& id, const QString& note)
|
||||||
|
|
||||||
bool getCompactLayout() const;
|
bool getCompactLayout() const;
|
||||||
void setCompactLayout(bool compact);
|
void setCompactLayout(bool value);
|
||||||
|
|
||||||
FriendListSortingMode getFriendSortingMode() const;
|
FriendListSortingMode getFriendSortingMode() const;
|
||||||
void setFriendSortingMode(FriendListSortingMode mode);
|
void setFriendSortingMode(FriendListSortingMode mode);
|
||||||
|
|
|
@ -34,7 +34,7 @@ class SmileyPack : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SmileyPack(ISmileySettings&);
|
explicit SmileyPack(ISmileySettings& settings);
|
||||||
SmileyPack(SmileyPack&) = delete;
|
SmileyPack(SmileyPack&) = delete;
|
||||||
SmileyPack& operator=(const SmileyPack&) = delete;
|
SmileyPack& operator=(const SmileyPack&) = delete;
|
||||||
~SmileyPack() override;
|
~SmileyPack() override;
|
||||||
|
@ -44,7 +44,7 @@ public:
|
||||||
|
|
||||||
QString smileyfied(const QString& msg);
|
QString smileyfied(const QString& msg);
|
||||||
QList<QStringList> getEmoticons() const;
|
QList<QStringList> getEmoticons() const;
|
||||||
std::shared_ptr<QIcon> getAsIcon(const QString& key) const;
|
std::shared_ptr<QIcon> getAsIcon(const QString& emoticon) const;
|
||||||
static QString getAsRichText(const QString& key);
|
static QString getAsRichText(const QString& key);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
|
@ -26,7 +26,7 @@ class Settings;
|
||||||
class ToxSave
|
class ToxSave
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ToxSave(Settings&);
|
explicit ToxSave(Settings& settings);
|
||||||
bool handleToxSave(const QString& path);
|
bool handleToxSave(const QString& path);
|
||||||
static bool toxSaveEventHandler(const QByteArray& eventData, void* userData);
|
static bool toxSaveEventHandler(const QByteArray& eventData, void* userData);
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
|
|
||||||
class Settings;
|
class Settings;
|
||||||
namespace Platform {
|
namespace Platform {
|
||||||
bool setAutorun(const Settings&, bool on);
|
bool setAutorun(const Settings& settings, bool on);
|
||||||
bool getAutorun(const Settings&);
|
bool getAutorun(const Settings& settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // QTOX_PLATFORM_EXT
|
#endif // QTOX_PLATFORM_EXT
|
||||||
|
|
|
@ -34,7 +34,7 @@ class DesktopNotify : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit DesktopNotify(Settings&);
|
explicit DesktopNotify(Settings& settings);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void notifyMessage(const NotificationData& notificationData);
|
void notifyMessage(const NotificationData& notificationData);
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Settings;
|
||||||
class CameraDevice
|
class CameraDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static CameraDevice* open(Settings&, QString devName, VideoMode mode = VideoMode());
|
static CameraDevice* open(Settings& settings, QString devName, VideoMode mode = VideoMode());
|
||||||
void open();
|
void open();
|
||||||
bool close();
|
bool close();
|
||||||
|
|
||||||
|
@ -51,8 +51,8 @@ public:
|
||||||
static bool isScreen(const QString& devName);
|
static bool isScreen(const QString& devName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CameraDevice(const QString& devName_, AVFormatContext* context_, Settings&);
|
CameraDevice(const QString& devName_, AVFormatContext* context_, Settings& settings);
|
||||||
static CameraDevice* open(Settings&, QString devName, AVDictionary** options);
|
static CameraDevice* open(Settings& settings, QString devName, AVDictionary** options);
|
||||||
static bool getDefaultInputFormat();
|
static bool getDefaultInputFormat();
|
||||||
static QVector<QPair<QString, QString>> getRawDeviceListGeneric();
|
static QVector<QPair<QString, QString>> getRawDeviceListGeneric();
|
||||||
static QVector<VideoMode> getScreenModes();
|
static QVector<VideoMode> getScreenModes();
|
||||||
|
|
|
@ -37,7 +37,7 @@ class CameraSource : public VideoSource
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CameraSource(Settings&);
|
explicit CameraSource(Settings& settings);
|
||||||
~CameraSource();
|
~CameraSource();
|
||||||
void setupDefault();
|
void setupDefault();
|
||||||
bool isNone() const;
|
bool isNone() const;
|
||||||
|
|
|
@ -42,7 +42,7 @@ class NetCamView : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NetCamView(ToxPk friendPk_, CameraSource&, Settings&, QWidget* parent = nullptr);
|
NetCamView(ToxPk friendPk_, CameraSource& cameraSource, Settings& settings, QWidget* parent = nullptr);
|
||||||
~NetCamView();
|
~NetCamView();
|
||||||
|
|
||||||
virtual void show(VideoSource* source, const QString& title);
|
virtual void show(VideoSource* source, const QString& title);
|
||||||
|
|
|
@ -168,8 +168,9 @@ void VideoSurface::onSourceStopped()
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoSurface::paintEvent(QPaintEvent*)
|
void VideoSurface::paintEvent(QPaintEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
lock();
|
lock();
|
||||||
|
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
|
|
|
@ -37,7 +37,7 @@ class AboutFriendForm : public QDialog
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AboutFriendForm(std::unique_ptr<IAboutFriend> about, Settings&, QWidget* parent = nullptr);
|
AboutFriendForm(std::unique_ptr<IAboutFriend> about, Settings& settings, QWidget* parent = nullptr);
|
||||||
~AboutFriendForm();
|
~AboutFriendForm();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -34,7 +34,7 @@ class CategoryWidget : public GenericChatItemWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit CategoryWidget(bool compact_, Settings&, QWidget* parent = nullptr);
|
explicit CategoryWidget(bool compact_, Settings& settings, QWidget* parent = nullptr);
|
||||||
|
|
||||||
bool isExpanded() const;
|
bool isExpanded() const;
|
||||||
void setExpanded(bool isExpanded, bool save = true);
|
void setExpanded(bool isExpanded, bool save = true);
|
||||||
|
@ -71,8 +71,9 @@ private:
|
||||||
virtual void onExpand()
|
virtual void onExpand()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual void onAddFriendWidget(FriendWidget*)
|
virtual void onAddFriendWidget(FriendWidget* widget)
|
||||||
{
|
{
|
||||||
|
std::ignore = widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget* listWidget;
|
QWidget* listWidget;
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
AV = Audio | Video
|
AV = Audio | Video
|
||||||
};
|
};
|
||||||
|
|
||||||
ChatFormHeader(Settings&, QWidget* parent = nullptr);
|
ChatFormHeader(Settings& settings, QWidget* parent = nullptr);
|
||||||
~ChatFormHeader();
|
~ChatFormHeader();
|
||||||
|
|
||||||
void setName(const QString& newName);
|
void setName(const QString& newName);
|
||||||
|
|
|
@ -156,8 +156,9 @@ void CircleWidget::dragEnterEvent(QDragEnterEvent* event)
|
||||||
setContainerAttribute(Qt::WA_UnderMouse, true); // Simulate hover.
|
setContainerAttribute(Qt::WA_UnderMouse, true); // Simulate hover.
|
||||||
}
|
}
|
||||||
|
|
||||||
void CircleWidget::dragLeaveEvent(QDragLeaveEvent*)
|
void CircleWidget::dragLeaveEvent(QDragLeaveEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
setContainerAttribute(Qt::WA_UnderMouse, false);
|
setContainerAttribute(Qt::WA_UnderMouse, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ class CircleWidget final : public CategoryWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
CircleWidget(const Core& core_, FriendListWidget* parent, int id_, Settings&);
|
CircleWidget(const Core& core_, FriendListWidget* parent, int id_, Settings& settings);
|
||||||
~CircleWidget();
|
~CircleWidget();
|
||||||
|
|
||||||
void editName();
|
void editName();
|
||||||
|
|
|
@ -51,7 +51,7 @@ class ContentDialog : public ActivateDialog, public IDialogs
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ContentDialog(const Core& core, Settings&, QWidget* parent = nullptr);
|
ContentDialog(const Core& core, Settings& settings, QWidget* parent = nullptr);
|
||||||
~ContentDialog() override;
|
~ContentDialog() override;
|
||||||
|
|
||||||
FriendWidget* addFriend(std::shared_ptr<FriendChatroom> chatroom, GenericChatForm* form);
|
FriendWidget* addFriend(std::shared_ptr<FriendChatroom> chatroom, GenericChatForm* form);
|
||||||
|
@ -62,7 +62,7 @@ public:
|
||||||
void ensureSplitterVisible();
|
void ensureSplitterVisible();
|
||||||
void updateTitleAndStatusIcon();
|
void updateTitleAndStatusIcon();
|
||||||
|
|
||||||
void cycleChats(bool forward, bool loop = true);
|
void cycleChats(bool forward, bool inverse = true);
|
||||||
void onVideoShow(QSize size);
|
void onVideoShow(QSize size);
|
||||||
void onVideoHide();
|
void onVideoHide();
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public:
|
||||||
bool hasChat(const ChatId& chatId) const override;
|
bool hasChat(const ChatId& chatId) const override;
|
||||||
bool isChatActive(const ChatId& chatId) const override;
|
bool isChatActive(const ChatId& chatId) const override;
|
||||||
|
|
||||||
void focusChat(const ChatId& friendPk);
|
void focusChat(const ChatId& chatId);
|
||||||
void updateFriendStatus(const ToxPk& friendPk, Status::Status status);
|
void updateFriendStatus(const ToxPk& friendPk, Status::Status status);
|
||||||
void updateChatStatusLight(const ChatId& chatId);
|
void updateChatStatusLight(const ChatId& chatId);
|
||||||
|
|
||||||
|
|
|
@ -35,13 +35,13 @@ class ContentDialogManager : public QObject, public IDialogsManager
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ContentDialog* current();
|
ContentDialog* current();
|
||||||
bool chatWidgetExists(const ChatId& groupId);
|
bool chatWidgetExists(const ChatId& chatId);
|
||||||
void focusChat(const ChatId& chatId);
|
void focusChat(const ChatId& chatId);
|
||||||
void updateFriendStatus(const ToxPk& friendPk);
|
void updateFriendStatus(const ToxPk& friendPk);
|
||||||
void updateGroupStatus(const GroupId& friendPk);
|
void updateGroupStatus(const GroupId& groupId);
|
||||||
bool isChatActive(const ChatId& chatId);
|
bool isChatActive(const ChatId& chatId);
|
||||||
ContentDialog* getFriendDialog(const ToxPk& friendPk) const;
|
ContentDialog* getFriendDialog(const ToxPk& friendPk) const;
|
||||||
ContentDialog* getGroupDialog(const GroupId& friendPk) const;
|
ContentDialog* getGroupDialog(const GroupId& groupId) const;
|
||||||
|
|
||||||
IDialogs* getFriendDialogs(const ToxPk& friendPk) const;
|
IDialogs* getFriendDialogs(const ToxPk& friendPk) const;
|
||||||
IDialogs* getGroupDialogs(const GroupId& groupId) const;
|
IDialogs* getGroupDialogs(const GroupId& groupId) const;
|
||||||
|
|
|
@ -27,8 +27,8 @@ class Settings;
|
||||||
class ContentLayout : public QVBoxLayout
|
class ContentLayout : public QVBoxLayout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ContentLayout(Settings&);
|
ContentLayout(Settings& settings);
|
||||||
explicit ContentLayout(Settings&, QWidget* parent);
|
explicit ContentLayout(Settings& settings, QWidget* parent);
|
||||||
~ContentLayout();
|
~ContentLayout();
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
|
@ -155,8 +155,9 @@ void EmoticonsWidget::mouseReleaseEvent(QMouseEvent* ev)
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmoticonsWidget::mousePressEvent(QMouseEvent*)
|
void EmoticonsWidget::mousePressEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmoticonsWidget::wheelEvent(QWheelEvent* e)
|
void EmoticonsWidget::wheelEvent(QWheelEvent* e)
|
||||||
|
|
|
@ -34,7 +34,7 @@ class EmoticonsWidget : public QMenu
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
EmoticonsWidget(SmileyPack&, Settings&, QWidget* parent = nullptr);
|
EmoticonsWidget(SmileyPack& smileyPack, Settings& settings, QWidget* parent = nullptr);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void insertEmoticon(QString str);
|
void insertEmoticon(QString str);
|
||||||
|
|
|
@ -55,7 +55,7 @@ public:
|
||||||
int verticalSpacing() const;
|
int verticalSpacing() const;
|
||||||
Qt::Orientations expandingDirections() const;
|
Qt::Orientations expandingDirections() const;
|
||||||
bool hasHeightForWidth() const;
|
bool hasHeightForWidth() const;
|
||||||
int heightForWidth(int) const;
|
int heightForWidth(int width) const;
|
||||||
int count() const;
|
int count() const;
|
||||||
QLayoutItem* itemAt(int index) const;
|
QLayoutItem* itemAt(int index) const;
|
||||||
QSize minimumSize() const;
|
QSize minimumSize() const;
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
FriendRequest = 2
|
FriendRequest = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
AddFriendForm(ToxId ownId_, Settings&);
|
AddFriendForm(ToxId ownId_, Settings& settings);
|
||||||
AddFriendForm(const AddFriendForm&) = delete;
|
AddFriendForm(const AddFriendForm&) = delete;
|
||||||
AddFriendForm& operator=(const AddFriendForm&) = delete;
|
AddFriendForm& operator=(const AddFriendForm&) = delete;
|
||||||
~AddFriendForm();
|
~AddFriendForm();
|
||||||
|
|
|
@ -782,8 +782,10 @@ void ChatForm::hideNetcam()
|
||||||
netcam.reset();
|
netcam.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatForm::onSplitterMoved(int, int)
|
void ChatForm::onSplitterMoved(int pos, int index)
|
||||||
{
|
{
|
||||||
|
std::ignore = pos;
|
||||||
|
std::ignore = index;
|
||||||
if (netcam) {
|
if (netcam) {
|
||||||
netcam->setShowMessages(bodySplitter->sizes()[1] == 0);
|
netcam->setShowMessages(bodySplitter->sizes()[1] == 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,8 +51,8 @@ class ChatForm : public GenericChatForm
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ChatForm(Profile& profile, Friend* chatFriend, IChatLog& chatLog_,
|
ChatForm(Profile& profile, Friend* chatFriend, IChatLog& chatLog_,
|
||||||
IMessageDispatcher& messageDispatcher_, DocumentCache&, SmileyPack&,
|
IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache, SmileyPack& smileyPack,
|
||||||
CameraSource&, Settings&);
|
CameraSource& cameraSource, Settings& settings);
|
||||||
~ChatForm() override;
|
~ChatForm() override;
|
||||||
void setStatusMessage(const QString& newMessage);
|
void setStatusMessage(const QString& newMessage);
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ namespace FileTransferList
|
||||||
class Delegate : public QStyledItemDelegate
|
class Delegate : public QStyledItemDelegate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Delegate(Settings&, QWidget* parent = nullptr);
|
Delegate(Settings& settings, QWidget* parent = nullptr);
|
||||||
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
|
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
|
||||||
|
|
||||||
bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override;
|
bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override;
|
||||||
|
@ -100,7 +100,7 @@ namespace FileTransferList
|
||||||
class View : public QTableView
|
class View : public QTableView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
View(QAbstractItemModel* model, Settings&, QWidget* parent = nullptr);
|
View(QAbstractItemModel* model, Settings& settings, QWidget* parent = nullptr);
|
||||||
~View();
|
~View();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -111,7 +111,7 @@ class FilesForm : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FilesForm(CoreFile& coreFile, Settings&);
|
FilesForm(CoreFile& coreFile, Settings& settings);
|
||||||
~FilesForm();
|
~FilesForm();
|
||||||
|
|
||||||
bool isShown() const;
|
bool isShown() const;
|
||||||
|
@ -121,8 +121,8 @@ public slots:
|
||||||
void onFileUpdated(const ToxFile& file);
|
void onFileUpdated(const ToxFile& file);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onSentFileActivated(const QModelIndex& item);
|
void onSentFileActivated(const QModelIndex& index);
|
||||||
void onReceivedFileActivated(const QModelIndex& item);
|
void onReceivedFileActivated(const QModelIndex& index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct FileInfo
|
struct FileInfo
|
||||||
|
|
|
@ -384,8 +384,9 @@ void GenericChatForm::show(ContentLayout* contentLayout_)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericChatForm::showEvent(QShowEvent*)
|
void GenericChatForm::showEvent(QShowEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
msgEdit->setFocus();
|
msgEdit->setFocus();
|
||||||
headWidget->showCallConfirm();
|
headWidget->showCallConfirm();
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,8 +72,8 @@ class GenericChatForm : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GenericChatForm(const Core& core_, const Chat* chat, IChatLog& chatLog_,
|
GenericChatForm(const Core& core_, const Chat* chat, IChatLog& chatLog_,
|
||||||
IMessageDispatcher& messageDispatcher_, DocumentCache&,
|
IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache,
|
||||||
SmileyPack&, Settings&, QWidget* parent_ = nullptr);
|
SmileyPack& smileyPack, Settings& settings, QWidget* parent_ = nullptr);
|
||||||
~GenericChatForm() override;
|
~GenericChatForm() override;
|
||||||
|
|
||||||
void setName(const QString& newName);
|
void setName(const QString& newName);
|
||||||
|
@ -124,8 +124,8 @@ protected:
|
||||||
const QDateTime& datetime, bool isAction, bool isSent, bool colorizeName = false);
|
const QDateTime& datetime, bool isAction, bool isSent, bool colorizeName = false);
|
||||||
void adjustFileMenuPosition();
|
void adjustFileMenuPosition();
|
||||||
void hideEvent(QHideEvent* event) override;
|
void hideEvent(QHideEvent* event) override;
|
||||||
void showEvent(QShowEvent*) override;
|
void showEvent(QShowEvent* event) override;
|
||||||
bool event(QEvent*) final;
|
bool event(QEvent* event) final;
|
||||||
void resizeEvent(QResizeEvent* event) final;
|
void resizeEvent(QResizeEvent* event) final;
|
||||||
bool eventFilter(QObject* object, QEvent* event) final;
|
bool eventFilter(QObject* object, QEvent* event) final;
|
||||||
bool searchInText(const QString& phrase, const ParameterSearch& parameter, SearchDirection direction);
|
bool searchInText(const QString& phrase, const ParameterSearch& parameter, SearchDirection direction);
|
||||||
|
|
|
@ -44,7 +44,7 @@ class GroupChatForm : public GenericChatForm
|
||||||
public:
|
public:
|
||||||
GroupChatForm(Core& core_, Group* chatGroup, IChatLog& chatLog_,
|
GroupChatForm(Core& core_, Group* chatGroup, IChatLog& chatLog_,
|
||||||
IMessageDispatcher& messageDispatcher_, Settings& settings_,
|
IMessageDispatcher& messageDispatcher_, Settings& settings_,
|
||||||
DocumentCache&, SmileyPack&);
|
DocumentCache& documentCache, SmileyPack& smileyPack);
|
||||||
~GroupChatForm();
|
~GroupChatForm();
|
||||||
|
|
||||||
void peerAudioPlaying(ToxPk peerPk);
|
void peerAudioPlaying(ToxPk peerPk);
|
||||||
|
|
|
@ -42,7 +42,7 @@ class GroupInviteForm : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit GroupInviteForm(Settings&);
|
explicit GroupInviteForm(Settings& settings);
|
||||||
~GroupInviteForm();
|
~GroupInviteForm();
|
||||||
|
|
||||||
void show(ContentLayout* contentLayout);
|
void show(ContentLayout* contentLayout);
|
||||||
|
|
|
@ -33,7 +33,7 @@ class GroupInviteWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GroupInviteWidget(QWidget* parent, const GroupInvite& invite, Settings&);
|
GroupInviteWidget(QWidget* parent, const GroupInvite& invite, Settings& settings);
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
const GroupInvite getInviteInfo() const;
|
const GroupInvite getInviteInfo() const;
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,9 @@ signals:
|
||||||
void clicked();
|
void clicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mouseReleaseEvent(QMouseEvent*) final
|
void mouseReleaseEvent(QMouseEvent* event) final
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
emit clicked();
|
emit clicked();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -53,7 +54,7 @@ class ProfileForm : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ProfileForm(IProfileInfo* profileInfo_, Settings&, QWidget* parent = nullptr);
|
ProfileForm(IProfileInfo* profileInfo_, Settings& settings, QWidget* parent = nullptr);
|
||||||
~ProfileForm();
|
~ProfileForm();
|
||||||
void show(ContentLayout* contentLayout);
|
void show(ContentLayout* contentLayout);
|
||||||
bool isShown() const;
|
bool isShown() const;
|
||||||
|
|
|
@ -32,7 +32,7 @@ class SearchSettingsForm : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SearchSettingsForm(Settings&, QWidget *parent = nullptr);
|
explicit SearchSettingsForm(Settings& settings, QWidget *parent = nullptr);
|
||||||
~SearchSettingsForm();
|
~SearchSettingsForm();
|
||||||
|
|
||||||
ParameterSearch getParameterSearch();
|
ParameterSearch getParameterSearch();
|
||||||
|
|
|
@ -32,7 +32,7 @@ class AdvancedForm : public GenericForm
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit AdvancedForm(Settings&);
|
explicit AdvancedForm(Settings& settings);
|
||||||
~AdvancedForm();
|
~AdvancedForm();
|
||||||
QString getFormName() final
|
QString getFormName() final
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,7 +32,7 @@ class GeneralForm : public GenericForm
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit GeneralForm(SettingsWidget* parent, Settings&);
|
explicit GeneralForm(SettingsWidget* parent, Settings& settings);
|
||||||
~GeneralForm();
|
~GeneralForm();
|
||||||
QString getFormName() final
|
QString getFormName() final
|
||||||
{
|
{
|
||||||
|
|
|
@ -92,8 +92,9 @@ void PrivacyForm::on_nospamLineEdit_editingFinished()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrivacyForm::showEvent(QShowEvent*)
|
void PrivacyForm::showEvent(QShowEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
const Settings& s = settings;
|
const Settings& s = settings;
|
||||||
bodyUI->nospamLineEdit->setText(core->getSelfId().getNoSpamString());
|
bodyUI->nospamLineEdit->setText(core->getSelfId().getNoSpamString());
|
||||||
bodyUI->cbTypingNotification->setChecked(s.getTypingNotification());
|
bodyUI->cbTypingNotification->setChecked(s.getTypingNotification());
|
||||||
|
|
|
@ -32,7 +32,7 @@ class PrivacyForm : public GenericForm
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
PrivacyForm(Core* core_, Settings&);
|
PrivacyForm(Core* core_, Settings& settings);
|
||||||
~PrivacyForm();
|
~PrivacyForm();
|
||||||
QString getFormName() final
|
QString getFormName() final
|
||||||
{
|
{
|
||||||
|
@ -49,7 +49,7 @@ private slots:
|
||||||
void on_randomNosapamButton_clicked();
|
void on_randomNosapamButton_clicked();
|
||||||
void on_nospamLineEdit_textChanged();
|
void on_nospamLineEdit_textChanged();
|
||||||
void on_blackListTextEdit_textChanged();
|
void on_blackListTextEdit_textChanged();
|
||||||
void showEvent(QShowEvent*) final;
|
void showEvent(QShowEvent* event) final;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
|
|
|
@ -337,9 +337,8 @@ void UserInterfaceForm::on_cbShowIdenticons_stateChanged()
|
||||||
settings.setShowIdenticons(bodyUI->cbShowIdenticons->isChecked());
|
settings.setShowIdenticons(bodyUI->cbShowIdenticons->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserInterfaceForm::on_themeColorCBox_currentIndexChanged(int)
|
void UserInterfaceForm::on_themeColorCBox_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
int index = bodyUI->themeColorCBox->currentIndex();
|
|
||||||
settings.setThemeColor(index);
|
settings.setThemeColor(index);
|
||||||
Style::setThemeColor(settings, index);
|
Style::setThemeColor(settings, index);
|
||||||
Style::applyTheme();
|
Style::applyTheme();
|
||||||
|
|
|
@ -35,7 +35,7 @@ class UserInterfaceForm : public GenericForm
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
UserInterfaceForm(SmileyPack&, Settings&, SettingsWidget* myParent);
|
UserInterfaceForm(SmileyPack& smileyPack, Settings& settings, SettingsWidget* myParent);
|
||||||
~UserInterfaceForm();
|
~UserInterfaceForm();
|
||||||
QString getFormName() final
|
QString getFormName() final
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,7 @@ private slots:
|
||||||
void on_notify_stateChanged();
|
void on_notify_stateChanged();
|
||||||
void on_desktopNotify_stateChanged();
|
void on_desktopNotify_stateChanged();
|
||||||
void on_notifySound_stateChanged();
|
void on_notifySound_stateChanged();
|
||||||
void on_notifyHide_stateChanged(int);
|
void on_notifyHide_stateChanged(int value);
|
||||||
void on_busySound_stateChanged();
|
void on_busySound_stateChanged();
|
||||||
void on_showWindow_stateChanged();
|
void on_showWindow_stateChanged();
|
||||||
void on_groupOnlyNotfiyWhenMentioned_stateChanged();
|
void on_groupOnlyNotfiyWhenMentioned_stateChanged();
|
||||||
|
@ -61,10 +61,10 @@ private slots:
|
||||||
void on_cbSeparateWindow_stateChanged();
|
void on_cbSeparateWindow_stateChanged();
|
||||||
void on_cbDontGroupWindows_stateChanged();
|
void on_cbDontGroupWindows_stateChanged();
|
||||||
void on_cbGroupchatPosition_stateChanged();
|
void on_cbGroupchatPosition_stateChanged();
|
||||||
void on_themeColorCBox_currentIndexChanged(int);
|
void on_themeColorCBox_currentIndexChanged(int index);
|
||||||
void on_cbShowIdenticons_stateChanged();
|
void on_cbShowIdenticons_stateChanged();
|
||||||
void on_txtChatFont_currentFontChanged(const QFont& f);
|
void on_txtChatFont_currentFontChanged(const QFont& f);
|
||||||
void on_txtChatFontSize_valueChanged(int arg1);
|
void on_txtChatFontSize_valueChanged(int px);
|
||||||
void on_useNameColors_stateChanged(int value);
|
void on_useNameColors_stateChanged(int value);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -47,7 +47,7 @@ class SettingsWidget : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SettingsWidget(UpdateCheck* updateCheck, IAudioControl& audio, Core *core,
|
SettingsWidget(UpdateCheck* updateCheck, IAudioControl& audio, Core *core,
|
||||||
SmileyPack&, CameraSource&, Settings&, Widget* parent = nullptr);
|
SmileyPack& smileyPack, CameraSource& cameraSource, Settings& settings, Widget* parent = nullptr);
|
||||||
~SettingsWidget();
|
~SettingsWidget();
|
||||||
|
|
||||||
bool isShown() const;
|
bool isShown() const;
|
||||||
|
@ -60,7 +60,7 @@ public slots:
|
||||||
void onUpdateAvailable(void);
|
void onUpdateAvailable(void);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onTabChanged(int);
|
void onTabChanged(int index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
|
|
|
@ -45,7 +45,7 @@ class FriendListWidget : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
using SortingMode = Settings::FriendListSortingMode;
|
using SortingMode = Settings::FriendListSortingMode;
|
||||||
FriendListWidget(const Core&, Widget* parent, Settings&, bool groupsOnTop = true);
|
FriendListWidget(const Core& core, Widget* parent, Settings& settings, bool groupsOnTop = true);
|
||||||
~FriendListWidget();
|
~FriendListWidget();
|
||||||
void setMode(SortingMode mode);
|
void setMode(SortingMode mode);
|
||||||
SortingMode getMode() const;
|
SortingMode getMode() const;
|
||||||
|
@ -62,7 +62,7 @@ public:
|
||||||
|
|
||||||
void cycleChats(GenericChatroomWidget* activeChatroomWidget, bool forward);
|
void cycleChats(GenericChatroomWidget* activeChatroomWidget, bool forward);
|
||||||
|
|
||||||
void updateActivityTime(const QDateTime& date);
|
void updateActivityTime(const QDateTime& time);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void onCompactChanged(bool compact);
|
void onCompactChanged(bool compact);
|
||||||
|
|
|
@ -35,7 +35,7 @@ class FriendWidget : public GenericChatroomWidget, public IFriendListItem
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
FriendWidget(std::shared_ptr<FriendChatroom> chatform_, bool compact_, Settings&);
|
FriendWidget(std::shared_ptr<FriendChatroom> chatroom_, bool compact_, Settings& settings);
|
||||||
|
|
||||||
void contextMenuEvent(QContextMenuEvent* event) final;
|
void contextMenuEvent(QContextMenuEvent* event) final;
|
||||||
void setAsActiveChatroom() final;
|
void setAsActiveChatroom() final;
|
||||||
|
|
|
@ -56,8 +56,10 @@ GenericChatroomWidget::GenericChatroomWidget(bool compact_, Settings& settings_,
|
||||||
compactChange(isCompact());
|
compactChange(isCompact());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GenericChatroomWidget::eventFilter(QObject*, QEvent*)
|
bool GenericChatroomWidget::eventFilter(QObject* object, QEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = object;
|
||||||
|
std::ignore = event;
|
||||||
return true; // Disable all events.
|
return true; // Disable all events.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,8 +179,9 @@ void GenericChatroomWidget::mouseReleaseEvent(QMouseEvent* event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericChatroomWidget::enterEvent(QEvent*)
|
void GenericChatroomWidget::enterEvent(QEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
if (!active)
|
if (!active)
|
||||||
setBackgroundRole(QPalette::Highlight);
|
setBackgroundRole(QPalette::Highlight);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ class GenericChatroomWidget : public GenericChatItemWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit GenericChatroomWidget(bool compact, Settings&, QWidget* parent = nullptr);
|
explicit GenericChatroomWidget(bool compact, Settings& settings, QWidget* parent = nullptr);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void setAsActiveChatroom() = 0;
|
virtual void setAsActiveChatroom() = 0;
|
||||||
|
@ -54,7 +54,7 @@ public slots:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool eventFilter(QObject*, QEvent*) final;
|
bool eventFilter(QObject* object, QEvent* event) final;
|
||||||
|
|
||||||
bool isActive();
|
bool isActive();
|
||||||
|
|
||||||
|
|
|
@ -260,8 +260,9 @@ void GroupWidget::dragEnterEvent(QDragEnterEvent* ev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupWidget::dragLeaveEvent(QDragLeaveEvent*)
|
void GroupWidget::dragLeaveEvent(QDragLeaveEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
if (!active) {
|
if (!active) {
|
||||||
setBackgroundRole(QPalette::Window);
|
setBackgroundRole(QPalette::Window);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ class GroupWidget final : public GenericChatroomWidget, public IFriendListItem
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GroupWidget(std::shared_ptr<GroupChatroom> chatroom_, bool compact, Settings&);
|
GroupWidget(std::shared_ptr<GroupChatroom> chatroom_, bool compact, Settings& settings);
|
||||||
~GroupWidget();
|
~GroupWidget();
|
||||||
void setAsInactiveChatroom() final;
|
void setAsInactiveChatroom() final;
|
||||||
void setAsActiveChatroom() final;
|
void setAsActiveChatroom() final;
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
ImagePreviewButton& operator=(ImagePreviewButton&&) = delete;
|
ImagePreviewButton& operator=(ImagePreviewButton&&) = delete;
|
||||||
|
|
||||||
void setIconFromFile(const QString& filename);
|
void setIconFromFile(const QString& filename);
|
||||||
void setIconFromPixmap(const QPixmap& image);
|
void setIconFromPixmap(const QPixmap& pixmap);
|
||||||
private:
|
private:
|
||||||
void initialize(const QPixmap& image);
|
void initialize(const QPixmap& image);
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,7 +36,7 @@ class LoginScreen : public QDialog
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LoginScreen(Settings&, const QString& initialProfileName = QString(), QWidget* parent = nullptr);
|
LoginScreen(Settings& settings, const QString& initialProfileName = QString(), QWidget* parent = nullptr);
|
||||||
~LoginScreen();
|
~LoginScreen();
|
||||||
bool event(QEvent* event) final;
|
bool event(QEvent* event) final;
|
||||||
|
|
||||||
|
|
|
@ -90,8 +90,9 @@ void MaskablePixmapWidget::setSize(QSize size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaskablePixmapWidget::mousePressEvent(QMouseEvent*)
|
void MaskablePixmapWidget::mousePressEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
if (clickable) {
|
if (clickable) {
|
||||||
emit clicked();
|
emit clicked();
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ signals:
|
||||||
void clicked();
|
void clicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QMouseEvent*) final;
|
void mousePressEvent(QMouseEvent* event) final;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updatePixmap();
|
void updatePixmap();
|
||||||
|
|
|
@ -34,7 +34,7 @@ public:
|
||||||
Bottom
|
Bottom
|
||||||
};
|
};
|
||||||
|
|
||||||
NotificationEdgeWidget(Position position, Settings&, QWidget* parent = nullptr);
|
NotificationEdgeWidget(Position position, Settings& settings, QWidget* parent = nullptr);
|
||||||
void updateNotificationCount(int count);
|
void updateNotificationCount(int count);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
|
@ -73,16 +73,18 @@ void PasswordEdit::unregisterHandler()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PasswordEdit::showEvent(QShowEvent*)
|
void PasswordEdit::showEvent(QShowEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
#ifdef ENABLE_CAPSLOCK_INDICATOR
|
#ifdef ENABLE_CAPSLOCK_INDICATOR
|
||||||
action->setVisible(Platform::capsLockEnabled());
|
action->setVisible(Platform::capsLockEnabled());
|
||||||
#endif
|
#endif
|
||||||
registerHandler();
|
registerHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PasswordEdit::hideEvent(QHideEvent*)
|
void PasswordEdit::hideEvent(QHideEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
unregisterHandler();
|
unregisterHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,8 +103,8 @@ void PasswordEdit::EventHandler::updateActions()
|
||||||
{
|
{
|
||||||
bool caps = Platform::capsLockEnabled();
|
bool caps = Platform::capsLockEnabled();
|
||||||
|
|
||||||
for (QAction* action : actions)
|
for (QAction* actionIt : actions)
|
||||||
action->setVisible(caps);
|
actionIt->setVisible(caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PasswordEdit::EventHandler::eventFilter(QObject* obj, QEvent* event)
|
bool PasswordEdit::EventHandler::eventFilter(QObject* obj, QEvent* event)
|
||||||
|
|
|
@ -39,7 +39,7 @@ public:
|
||||||
Active = 2, // Red
|
Active = 2, // Red
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit SearchForm(Settings&, QWidget* parent = nullptr);
|
explicit SearchForm(Settings& settings, QWidget* parent = nullptr);
|
||||||
void removeSearchPhrase();
|
void removeSearchPhrase();
|
||||||
QString getSearchPhrase() const;
|
QString getSearchPhrase() const;
|
||||||
ParameterSearch getParameterSearch();
|
ParameterSearch getParameterSearch();
|
||||||
|
|
|
@ -76,21 +76,21 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
static QStringList getThemeColorNames();
|
static QStringList getThemeColorNames();
|
||||||
static const QString getStylesheet(const QString& filename, Settings&, const QFont& baseFont = QFont());
|
static const QString getStylesheet(const QString& filename, Settings& settings, const QFont& baseFont = QFont());
|
||||||
static const QString getImagePath(const QString& filename, Settings&);
|
static const QString getImagePath(const QString& filename, Settings& settings);
|
||||||
static QString getThemeFolder(Settings&);
|
static QString getThemeFolder(Settings& settings);
|
||||||
static QString getThemeName();
|
static QString getThemeName();
|
||||||
static QColor getColor(ColorPalette entry);
|
static QColor getColor(ColorPalette entry);
|
||||||
static QFont getFont(Font font);
|
static QFont getFont(Font font);
|
||||||
static const QString resolve(const QString& filename, Settings&, const QFont& baseFont = QFont());
|
static const QString resolve(const QString& filename, Settings& settings, const QFont& baseFont = QFont());
|
||||||
static void repolish(QWidget* w);
|
static void repolish(QWidget* w);
|
||||||
static void setThemeColor(Settings&, int color);
|
static void setThemeColor(Settings& settings, int color);
|
||||||
static void setThemeColor(const QColor& color);
|
static void setThemeColor(const QColor& color);
|
||||||
static void applyTheme();
|
static void applyTheme();
|
||||||
static QPixmap scaleSvgImage(const QString& path, uint32_t width, uint32_t height);
|
static QPixmap scaleSvgImage(const QString& path, uint32_t width, uint32_t height);
|
||||||
static void initPalette(Settings&);
|
static void initPalette(Settings& settings);
|
||||||
static void initDictColor();
|
static void initDictColor();
|
||||||
static QString getThemePath(Settings&);
|
static QString getThemePath(Settings& settings);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void themeChanged();
|
void themeChanged();
|
||||||
|
|
|
@ -141,8 +141,9 @@ void CallConfirmWidget::reposition()
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CallConfirmWidget::paintEvent(QPaintEvent*)
|
void CallConfirmWidget::paintEvent(QPaintEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
painter.setRenderHint(QPainter::Antialiasing);
|
painter.setRenderHint(QPainter::Antialiasing);
|
||||||
painter.setBrush(brush);
|
painter.setBrush(brush);
|
||||||
|
@ -152,8 +153,9 @@ void CallConfirmWidget::paintEvent(QPaintEvent*)
|
||||||
painter.drawPolygon(spikePoly);
|
painter.drawPolygon(spikePoly);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CallConfirmWidget::showEvent(QShowEvent*)
|
void CallConfirmWidget::showEvent(QShowEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
// Kriby: Legacy comment, is this still true?
|
// Kriby: Legacy comment, is this still true?
|
||||||
// If someone does show() from Widget or lower, the event will reach us
|
// If someone does show() from Widget or lower, the event will reach us
|
||||||
// because it's our parent, and we could show up in the wrong form.
|
// because it's our parent, and we could show up in the wrong form.
|
||||||
|
@ -163,16 +165,18 @@ void CallConfirmWidget::showEvent(QShowEvent*)
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CallConfirmWidget::hideEvent(QHideEvent*)
|
void CallConfirmWidget::hideEvent(QHideEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = event;
|
||||||
if (parentWidget())
|
if (parentWidget())
|
||||||
parentWidget()->removeEventFilter(this);
|
parentWidget()->removeEventFilter(this);
|
||||||
|
|
||||||
setParent(nullptr);
|
setParent(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CallConfirmWidget::eventFilter(QObject*, QEvent* event)
|
bool CallConfirmWidget::eventFilter(QObject* object, QEvent* event)
|
||||||
{
|
{
|
||||||
|
std::ignore = object;
|
||||||
if (event->type() == QEvent::Resize)
|
if (event->type() == QEvent::Resize)
|
||||||
reposition();
|
reposition();
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class CallConfirmWidget final : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit CallConfirmWidget(Settings&, const QWidget* anchor_);
|
explicit CallConfirmWidget(Settings& settings, const QWidget* anchor_);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void accepted();
|
void accepted();
|
||||||
|
@ -46,7 +46,7 @@ protected:
|
||||||
void paintEvent(QPaintEvent* event) final;
|
void paintEvent(QPaintEvent* event) final;
|
||||||
void showEvent(QShowEvent* event) final;
|
void showEvent(QShowEvent* event) final;
|
||||||
void hideEvent(QHideEvent* event) final;
|
void hideEvent(QHideEvent* event) final;
|
||||||
bool eventFilter(QObject*, QEvent* event) final;
|
bool eventFilter(QObject* object, QEvent* event) final;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QWidget* anchor;
|
const QWidget* anchor;
|
||||||
|
|
|
@ -27,7 +27,7 @@ class ProfileImporter : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ProfileImporter(Settings&, QWidget* parent = nullptr);
|
explicit ProfileImporter(Settings& settings, QWidget* parent = nullptr);
|
||||||
bool importProfile(const QString& path);
|
bool importProfile(const QString& path);
|
||||||
bool importProfile();
|
bool importProfile();
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,10 @@ void ScreenGrabberOverlayItem::mousePressEvent(QGraphicsSceneMouseEvent* event)
|
||||||
screnshootGrabber->beginRectChooser(event);
|
screnshootGrabber->beginRectChooser(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenGrabberOverlayItem::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*)
|
void ScreenGrabberOverlayItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
|
||||||
{
|
{
|
||||||
|
std::ignore = option;
|
||||||
|
std::ignore = widget;
|
||||||
painter->setBrush(brush());
|
painter->setBrush(brush());
|
||||||
painter->setPen(pen());
|
painter->setPen(pen());
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Translator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void translate(const QString& localeName);
|
static void translate(const QString& localeName);
|
||||||
static void registerHandler(const std::function<void()>&, void* owner);
|
static void registerHandler(const std::function<void()>& f, void* owner);
|
||||||
static void unregister(void* owner);
|
static void unregister(void* owner);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -82,8 +82,9 @@
|
||||||
#include "tool/removefrienddialog.h"
|
#include "tool/removefrienddialog.h"
|
||||||
#include "src/persistence/smileypack.h"
|
#include "src/persistence/smileypack.h"
|
||||||
|
|
||||||
bool toxActivateEventHandler(const QByteArray&, void* userData)
|
bool toxActivateEventHandler(const QByteArray& data, void* userData)
|
||||||
{
|
{
|
||||||
|
std::ignore = data;
|
||||||
std::ignore = userData;
|
std::ignore = userData;
|
||||||
Widget* widget = Nexus::getDesktopGUI();
|
Widget* widget = Nexus::getDesktopGUI();
|
||||||
if (!widget) {
|
if (!widget) {
|
||||||
|
@ -1083,9 +1084,9 @@ void Widget::cleanupNotificationSound()
|
||||||
audioNotification.reset();
|
audioNotification.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::incomingNotification(uint32_t friendnumber)
|
void Widget::incomingNotification(uint32_t friendNum)
|
||||||
{
|
{
|
||||||
const auto& friendId = FriendList::id2Key(friendnumber);
|
const auto& friendId = FriendList::id2Key(friendNum);
|
||||||
newFriendMessageAlert(friendId, {}, false);
|
newFriendMessageAlert(friendId, {}, false);
|
||||||
|
|
||||||
// loop until call answered or rejected
|
// loop until call answered or rejected
|
||||||
|
@ -1149,8 +1150,9 @@ void Widget::dispatchFile(ToxFile file)
|
||||||
filesForm->onFileUpdated(file);
|
filesForm->onFileUpdated(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::dispatchFileWithBool(ToxFile file, bool)
|
void Widget::dispatchFileWithBool(ToxFile file, bool pausedOrBroken)
|
||||||
{
|
{
|
||||||
|
std::ignore = pausedOrBroken;
|
||||||
dispatchFile(file);
|
dispatchFile(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1255,8 +1257,9 @@ void Widget::addFriend(uint32_t friendId, const ToxPk& friendPk)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::addFriendFailed(const ToxPk&, const QString& errorInfo)
|
void Widget::addFriendFailed(const ToxPk& userId, const QString& errorInfo)
|
||||||
{
|
{
|
||||||
|
std::ignore = userId;
|
||||||
QString info = QString(tr("Couldn't send friend request"));
|
QString info = QString(tr("Couldn't send friend request"));
|
||||||
if (!errorInfo.isEmpty()) {
|
if (!errorInfo.isEmpty()) {
|
||||||
info = info + QStringLiteral(": ") + errorInfo;
|
info = info + QStringLiteral(": ") + errorInfo;
|
||||||
|
@ -1452,7 +1455,7 @@ void Widget::onReceiptReceived(int friendId, ReceiptNum receipt)
|
||||||
friendMessageDispatchers[f->getPublicKey()]->onReceiptReceived(receipt);
|
friendMessageDispatchers[f->getPublicKey()]->onReceiptReceived(receipt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::onExtendedMessageSupport(uint32_t friendNumber, bool compatible)
|
void Widget::onExtendedMessageSupport(uint32_t friendNumber, bool supported)
|
||||||
{
|
{
|
||||||
const auto& friendKey = FriendList::id2Key(friendNumber);
|
const auto& friendKey = FriendList::id2Key(friendNumber);
|
||||||
Friend* f = FriendList::findFriend(friendKey);
|
Friend* f = FriendList::findFriend(friendKey);
|
||||||
|
@ -1460,7 +1463,7 @@ void Widget::onExtendedMessageSupport(uint32_t friendNumber, bool compatible)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
f->setExtendedMessageSupport(compatible);
|
f->setExtendedMessageSupport(supported);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::onFriendExtMessageReceived(uint32_t friendNumber, const QString& message)
|
void Widget::onFriendExtMessageReceived(uint32_t friendNumber, const QString& message)
|
||||||
|
@ -2227,9 +2230,9 @@ void Widget::onEmptyGroupCreated(uint32_t groupnumber, const GroupId& groupId, c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::onGroupJoined(int groupId, const GroupId& groupPersistentId)
|
void Widget::onGroupJoined(int groupNum, const GroupId& groupId)
|
||||||
{
|
{
|
||||||
createGroup(groupId, groupPersistentId);
|
createGroup(groupNum, groupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -118,7 +118,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Widget(Profile& profile_, IAudioControl& audio_, CameraSource&, Settings&,
|
Widget(Profile& profile_, IAudioControl& audio_, CameraSource& cameraSource, Settings& settings,
|
||||||
QWidget* parent = nullptr);
|
QWidget* parent = nullptr);
|
||||||
~Widget() override;
|
~Widget() override;
|
||||||
void init();
|
void init();
|
||||||
|
@ -226,7 +226,7 @@ private slots:
|
||||||
void setStatusOnline();
|
void setStatusOnline();
|
||||||
void setStatusAway();
|
void setStatusAway();
|
||||||
void setStatusBusy();
|
void setStatusBusy();
|
||||||
void onIconClick(QSystemTrayIcon::ActivationReason);
|
void onIconClick(QSystemTrayIcon::ActivationReason reason);
|
||||||
void onUserAwayCheck();
|
void onUserAwayCheck();
|
||||||
void onEventIconTick();
|
void onEventIconTick();
|
||||||
void onTryCreateTrayIcon();
|
void onTryCreateTrayIcon();
|
||||||
|
@ -239,11 +239,11 @@ private slots:
|
||||||
void onDialogShown(GenericChatroomWidget* widget);
|
void onDialogShown(GenericChatroomWidget* widget);
|
||||||
void outgoingNotification();
|
void outgoingNotification();
|
||||||
void onCallEnd();
|
void onCallEnd();
|
||||||
void incomingNotification(uint32_t friendId);
|
void incomingNotification(uint32_t friendNum);
|
||||||
void onRejectCall(uint32_t friendId);
|
void onRejectCall(uint32_t friendId);
|
||||||
void onStopNotification();
|
void onStopNotification();
|
||||||
void dispatchFile(ToxFile file);
|
void dispatchFile(ToxFile file);
|
||||||
void dispatchFileWithBool(ToxFile file, bool);
|
void dispatchFileWithBool(ToxFile file, bool pausedOrBroken);
|
||||||
void dispatchFileSendFailed(uint32_t friendId, const QString& fileName);
|
void dispatchFileSendFailed(uint32_t friendId, const QString& fileName);
|
||||||
void connectCircleWidget(CircleWidget& circleWidget);
|
void connectCircleWidget(CircleWidget& circleWidget);
|
||||||
void connectFriendWidget(FriendWidget& friendWidget);
|
void connectFriendWidget(FriendWidget& friendWidget);
|
||||||
|
|
|
@ -42,19 +42,19 @@ public:
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void setEnableIPv6(bool) override {}
|
void setEnableIPv6(bool enable) override { std::ignore = enable; }
|
||||||
|
|
||||||
bool getForceTCP() const override
|
bool getForceTCP() const override
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void setForceTCP(bool) override {}
|
void setForceTCP(bool force) override { std::ignore = force; }
|
||||||
|
|
||||||
bool getEnableLanDiscovery() const override
|
bool getEnableLanDiscovery() const override
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void setEnableLanDiscovery(bool) override {}
|
void setEnableLanDiscovery(bool enable) override { std::ignore = enable; }
|
||||||
|
|
||||||
QString getProxyAddr() const override
|
QString getProxyAddr() const override
|
||||||
{
|
{
|
||||||
|
|
|
@ -154,8 +154,9 @@ private slots:
|
||||||
receivedMessages.push_back(std::move(message));
|
receivedMessages.push_back(std::move(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
void onMessageBroken(DispatchedMessageId id, BrokenMessageReason)
|
void onMessageBroken(DispatchedMessageId id, BrokenMessageReason reason)
|
||||||
{
|
{
|
||||||
|
std::ignore = reason;
|
||||||
brokenMessages.insert(id);
|
brokenMessages.insert(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ private slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool initSucess{false};
|
bool initSucess{false};
|
||||||
void createSchemaAtVersion(std::shared_ptr<RawDatabase>, const std::vector<SqliteMasterEntry>& schema);
|
void createSchemaAtVersion(std::shared_ptr<RawDatabase> db, const std::vector<SqliteMasterEntry>& schema);
|
||||||
void verifyDb(std::shared_ptr<RawDatabase> db, const std::vector<SqliteMasterEntry>& expectedSql);
|
void verifyDb(std::shared_ptr<RawDatabase> db, const std::vector<SqliteMasterEntry>& expectedSql);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ private slots:
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
void completionFn(bool) {}
|
void completionFn(bool success) { std::ignore = success; }
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void TestOfflineMsgEngine::testReceiptBeforeMessage()
|
void TestOfflineMsgEngine::testReceiptBeforeMessage()
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user