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/>.
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "audio/audio.h"
|
||||
#include "audio/iaudiosettings.h"
|
||||
#include "backend/openal.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
/**
|
||||
* @brief Select the audio backend
|
||||
* @param settings Audio settings to use
|
||||
|
|
|
@ -123,7 +123,7 @@ protected:
|
|||
|
||||
private:
|
||||
virtual bool initInput(const QString& deviceName);
|
||||
virtual bool initOutput(const QString& outDevDescr);
|
||||
virtual bool initOutput(const QString& deviceName);
|
||||
|
||||
void cleanupBuffers(uint sourceId);
|
||||
void cleanupSound();
|
||||
|
|
|
@ -35,32 +35,38 @@ int ChatLineContent::type() const
|
|||
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::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;
|
||||
}
|
||||
|
||||
|
@ -79,8 +85,9 @@ qreal ChatLineContent::getAscent() const
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
void ChatLineContent::visibilityChanged(bool)
|
||||
void ChatLineContent::visibilityChanged(bool visible)
|
||||
{
|
||||
std::ignore = visible;
|
||||
}
|
||||
|
||||
void ChatLineContent::reloadTheme()
|
||||
|
|
|
@ -50,22 +50,22 @@ public:
|
|||
ALERT,
|
||||
};
|
||||
|
||||
ChatMessage(DocumentCache&, Settings&);
|
||||
ChatMessage(DocumentCache& documentCache, Settings& settings);
|
||||
~ChatMessage();
|
||||
ChatMessage(const ChatMessage&) = default;
|
||||
ChatMessage(ChatMessage&&) = default;
|
||||
|
||||
static ChatMessage::Ptr createChatMessage(const QString& sender, const QString& rawMessage,
|
||||
MessageType type, bool isMe, MessageState state,
|
||||
const QDateTime& date, DocumentCache&,
|
||||
SmileyPack&, Settings&, bool colorizeName = false);
|
||||
const QDateTime& date, DocumentCache& documentCache,
|
||||
SmileyPack& smileyPack, Settings& settings, bool colorizeName = false);
|
||||
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,
|
||||
ToxFile file, bool isMe, const QDateTime& date,
|
||||
DocumentCache&, Settings&);
|
||||
static ChatMessage::Ptr createTypingNotification(DocumentCache&, Settings&);
|
||||
static ChatMessage::Ptr createBusyNotification(DocumentCache&, Settings&);
|
||||
DocumentCache& documentCache, Settings& settings);
|
||||
static ChatMessage::Ptr createTypingNotification(DocumentCache& documentCache, Settings& settings);
|
||||
static ChatMessage::Ptr createBusyNotification(DocumentCache& documentCache, Settings& settings);
|
||||
|
||||
void markAsDelivered(const QDateTime& time);
|
||||
void markAsBroken();
|
||||
|
|
|
@ -1304,8 +1304,9 @@ void ChatWidget::handleMultiClickEvent()
|
|||
}
|
||||
}
|
||||
|
||||
void ChatWidget::showEvent(QShowEvent*)
|
||||
void ChatWidget::showEvent(QShowEvent* event)
|
||||
{
|
||||
std::ignore = event;
|
||||
// Empty.
|
||||
// The default implementation calls centerOn - for some reason - causing
|
||||
// the scrollbar to move.
|
||||
|
|
|
@ -44,8 +44,8 @@ class ChatWidget : public QGraphicsView
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ChatWidget(IChatLog& chatLog_, const Core& core_, DocumentCache&, SmileyPack&,
|
||||
Settings&, QWidget* parent = nullptr);
|
||||
ChatWidget(IChatLog& chatLog_, const Core& core_, DocumentCache& documentCache,
|
||||
SmileyPack& smileyPack, Settings& settings, QWidget* parent = nullptr);
|
||||
virtual ~ChatWidget();
|
||||
|
||||
void insertChatlines(std::map<ChatLogIdx, ChatLine::Ptr> chatLines);
|
||||
|
@ -94,7 +94,7 @@ private slots:
|
|||
void renderMessage(ChatLogIdx idx);
|
||||
void renderMessages(ChatLogIdx begin, ChatLogIdx end);
|
||||
|
||||
void setRenderedWindowStart(ChatLogIdx start);
|
||||
void setRenderedWindowStart(ChatLogIdx begin);
|
||||
void setRenderedWindowEnd(ChatLogIdx end);
|
||||
|
||||
void onRenderFinished();
|
||||
|
@ -121,7 +121,7 @@ protected:
|
|||
void mouseMoveEvent(QMouseEvent* ev) final;
|
||||
void scrollContentsBy(int dx, int dy) final;
|
||||
void resizeEvent(QResizeEvent* ev) final;
|
||||
void showEvent(QShowEvent*) final;
|
||||
void showEvent(QShowEvent* event) final;
|
||||
void hideEvent(QHideEvent* event) final;
|
||||
void focusInEvent(QFocusEvent* ev) final;
|
||||
void focusOutEvent(QFocusEvent* ev) final;
|
||||
|
@ -133,7 +133,7 @@ protected:
|
|||
|
||||
ChatLine::Ptr findLineByPosY(qreal yPos) const;
|
||||
|
||||
void removeLines(ChatLogIdx being, ChatLogIdx end);
|
||||
void removeLines(ChatLogIdx begin, ChatLogIdx end);
|
||||
|
||||
private:
|
||||
void retranslateUi();
|
||||
|
|
|
@ -181,8 +181,9 @@ bool FileTransferWidget::drawButtonAreaNeeded() const
|
|||
&& !(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.
|
||||
QPainter painter(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
|
|
|
@ -40,7 +40,7 @@ class FileTransferWidget : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FileTransferWidget(QWidget* parent, CoreFile& _coreFile, ToxFile file, Settings&);
|
||||
FileTransferWidget(QWidget* parent, CoreFile& _coreFile, ToxFile file, Settings& settings);
|
||||
virtual ~FileTransferWidget();
|
||||
bool isActive() const;
|
||||
void onFileTransferUpdate(ToxFile file);
|
||||
|
@ -60,7 +60,7 @@ protected:
|
|||
|
||||
bool drawButtonAreaNeeded() const;
|
||||
|
||||
void paintEvent(QPaintEvent*) final;
|
||||
void paintEvent(QPaintEvent* event) final;
|
||||
|
||||
public slots:
|
||||
void reloadTheme();
|
||||
|
|
|
@ -31,7 +31,7 @@ class NotificationIcon : public ChatLineContent
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit NotificationIcon(Settings&, QSize size);
|
||||
explicit NotificationIcon(Settings& settings, QSize size);
|
||||
|
||||
QRectF boundingRect() const override;
|
||||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
#include <QTextFragment>
|
||||
|
||||
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)
|
||||
: rawText(rwText)
|
||||
: rawText(rawText_)
|
||||
, elide(enableElide)
|
||||
, defFont(font)
|
||||
, defStyleSheet(Style::getStylesheet(QStringLiteral("chatArea/innerStyle.css"), settings_, font))
|
||||
|
|
|
@ -40,9 +40,9 @@ public:
|
|||
CUSTOM
|
||||
};
|
||||
|
||||
Text(DocumentCache&, Settings&, const QString& txt = "", const QFont& font = QFont(),
|
||||
bool enableElide = false, const QString& rawText = QString(),
|
||||
const TextType& type = NORMAL,
|
||||
Text(DocumentCache& documentCache, Settings& settings, const QString& txt = "",
|
||||
const QFont& font = QFont(), bool enableElide = false,
|
||||
const QString& rawText = QString(), const TextType& type = NORMAL,
|
||||
const QColor& custom = Style::getColor(Style::ColorPalette::MainText));
|
||||
virtual ~Text();
|
||||
|
||||
|
@ -66,7 +66,7 @@ public:
|
|||
QRectF boundingRect() const final;
|
||||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) final;
|
||||
|
||||
void visibilityChanged(bool keepInMemory) final;
|
||||
void visibilityChanged(bool visible) final;
|
||||
void reloadTheme() final;
|
||||
|
||||
qreal getAscent() const final;
|
||||
|
|
|
@ -32,7 +32,7 @@ class Timestamp : public Text
|
|||
Q_OBJECT
|
||||
public:
|
||||
Timestamp(const QDateTime& time_, const QString& format, const QFont& font,
|
||||
DocumentCache&, Settings&);
|
||||
DocumentCache& documentCache, Settings& settings);
|
||||
QDateTime getTime();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -32,7 +32,7 @@ class CustomTextDocument : public QTextDocument
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CustomTextDocument(SmileyPack&, Settings&, QObject* parent = nullptr);
|
||||
CustomTextDocument(SmileyPack& smileyPack, Settings& settings, QObject* parent = nullptr);
|
||||
|
||||
protected:
|
||||
virtual QVariant loadResource(int type, const QUrl& name);
|
||||
|
|
|
@ -28,7 +28,7 @@ class Settings;
|
|||
class DocumentCache
|
||||
{
|
||||
public:
|
||||
DocumentCache(SmileyPack&, Settings&);
|
||||
DocumentCache(SmileyPack& smileyPack, Settings& settings);
|
||||
~DocumentCache();
|
||||
DocumentCache(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)
|
||||
{
|
||||
std::ignore = tox;
|
||||
ToxPk friendPk(cFriendPk);
|
||||
QString requestMessage = ToxString(cMessage, cMessageSize).getQString();
|
||||
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)
|
||||
{
|
||||
std::ignore = tox;
|
||||
bool isAction = (type == TOX_MESSAGE_TYPE_ACTION);
|
||||
QString msg = ToxString(cMessage, cMessageSize).getQString();
|
||||
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();
|
||||
// no saveRequest, this callback is called on every connection, not just on name change
|
||||
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);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
std::ignore = tox;
|
||||
QString message = ToxString(cMessage, cMessageSize).getQString();
|
||||
// no saveRequest, this callback is called on every connection, not just on name change
|
||||
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;
|
||||
switch (userstatus) {
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
Status::Status friendStatus = Status::Status::Offline;
|
||||
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)
|
||||
{
|
||||
std::ignore = tox;
|
||||
Core* core = static_cast<Core*>(vCore);
|
||||
bool isAction = type == TOX_MESSAGE_TYPE_ACTION;
|
||||
QString message = ToxString(cMessage, length).getQString();
|
||||
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);
|
||||
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
|
||||
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)
|
||||
{
|
||||
std::ignore = tox;
|
||||
const auto newName = ToxString(name, length).getQString();
|
||||
qDebug() << QString("Group %1, peer %2, name changed to %3").arg(groupId).arg(peerId).arg(newName);
|
||||
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);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
std::ignore = tox;
|
||||
Core* core = static_cast<Core*>(vCore);
|
||||
QString author;
|
||||
// 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
|
||||
*/
|
||||
void Core::onLosslessPacket(Tox*, uint32_t friendId,
|
||||
void Core::onLosslessPacket(Tox* tox, uint32_t friendId,
|
||||
const uint8_t* data, size_t length, void* vCore)
|
||||
{
|
||||
std::ignore = tox;
|
||||
Core* core = static_cast<Core*>(vCore);
|
||||
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});
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ public slots:
|
|||
QByteArray getToxSaveData();
|
||||
|
||||
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);
|
||||
int createGroup(uint8_t type = TOX_CONFERENCE_TYPE_AV);
|
||||
|
||||
|
@ -197,9 +197,9 @@ signals:
|
|||
void failedToRemoveFriend(uint32_t friendId);
|
||||
|
||||
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);
|
||||
static void onFriendMessage(Tox* tox, uint32_t friendId, Tox_Message_Type type,
|
||||
const uint8_t* cMessage, size_t cMessageSize, void* core);
|
||||
|
@ -216,8 +216,8 @@ private:
|
|||
const uint8_t* cookie, size_t length, void* vCore);
|
||||
static void onGroupMessage(Tox* tox, uint32_t groupId, uint32_t peerId, Tox_Message_Type type,
|
||||
const uint8_t* cMessage, size_t length, void* vCore);
|
||||
static void onGroupPeerListChange(Tox*, uint32_t groupId, void* core);
|
||||
static void onGroupPeerNameChange(Tox*, uint32_t groupId, uint32_t peerId, const uint8_t* name,
|
||||
static void onGroupPeerListChange(Tox* tox, uint32_t groupId, void* core);
|
||||
static void onGroupPeerNameChange(Tox* tox, uint32_t groupId, uint32_t peerId, const uint8_t* name,
|
||||
size_t length, void* core);
|
||||
static void onGroupTitleChange(Tox* tox, uint32_t groupId, uint32_t peerId,
|
||||
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.
|
||||
* @param groupId Id of group to leave
|
||||
*/
|
||||
void CoreAV::leaveGroupCall(int groupId)
|
||||
void CoreAV::leaveGroupCall(int groupNum)
|
||||
{
|
||||
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
|
||||
{
|
||||
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()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -595,7 +595,7 @@ bool CoreAV::sendGroupCallAudio(int groupId, const int16_t* pcm, size_t samples,
|
|||
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";
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
std::ignore = toxAV;
|
||||
CoreAV* self = static_cast<CoreAV*>(vSelf);
|
||||
// This callback should come from the CoreAV thread
|
||||
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);
|
||||
}
|
||||
|
||||
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,
|
||||
int32_t ystride, int32_t ustride, int32_t vstride, void* vSelf)
|
||||
{
|
||||
std::ignore = toxAV;
|
||||
auto self = static_cast<CoreAV*>(vSelf);
|
||||
// This callback should come from the CoreAV thread
|
||||
assert(QThread::currentThread() == self->coreavThread.get());
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
using CoreAVPtr = std::unique_ptr<CoreAV>;
|
||||
static CoreAVPtr makeCoreAV(Tox* core, CompatibleRecursiveMutex& toxCoreLock,
|
||||
IAudioSettings& audioSettings, IGroupSettings& groupSettings,
|
||||
CameraSource&);
|
||||
CameraSource& cameraSource);
|
||||
|
||||
void setAudio(IAudioControl& newAudio);
|
||||
IAudioControl* getAudio();
|
||||
|
@ -60,17 +60,17 @@ public:
|
|||
~CoreAV();
|
||||
|
||||
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 Group* g) 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;
|
||||
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,
|
||||
uint32_t rate) const;
|
||||
|
||||
VideoSource* getVideoSourceFromCall(int callNumber) const;
|
||||
VideoSource* getVideoSourceFromCall(int friendNum) const;
|
||||
void sendNoVideo();
|
||||
|
||||
void joinGroupCall(const Group& group);
|
||||
|
@ -103,7 +103,7 @@ signals:
|
|||
|
||||
private slots:
|
||||
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,
|
||||
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,
|
||||
IAudioSettings& audioSettings_, IGroupSettings& groupSettings_, CameraSource&);
|
||||
CoreAV(std::unique_ptr<ToxAV, ToxAVDeleter> toxav_, CompatibleRecursiveMutex &toxCoreLock,
|
||||
IAudioSettings& audioSettings_, IGroupSettings& groupSettings_, CameraSource& cameraSource);
|
||||
void connectCallbacks();
|
||||
|
||||
void process();
|
||||
|
|
|
@ -76,12 +76,13 @@ CoreExt::Packet::Packet(
|
|||
ToxExtensionMessages* toxExtMessages_,
|
||||
uint32_t friendId_,
|
||||
std::mutex* toxext_mutex_,
|
||||
PacketPassKey)
|
||||
PacketPassKey passKey)
|
||||
: toxext_mutex(toxext_mutex_)
|
||||
, toxExtMessages(toxExtMessages_)
|
||||
, packetList(packetList_)
|
||||
, friendId(friendId_)
|
||||
{
|
||||
std::ignore = passKey;
|
||||
assert(toxext_mutex != nullptr);
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
ToxExtensionMessages* toxExtMessages,
|
||||
uint32_t friendId,
|
||||
std::mutex* toxext_mutex,
|
||||
PacketPassKey);
|
||||
PacketPassKey passKey);
|
||||
|
||||
// Delete copy constructor, we shouldn't be able to copy
|
||||
Packet(Packet const& other) = delete;
|
||||
|
|
|
@ -396,9 +396,10 @@ void CoreFile::handleAvatarOffer(uint32_t friendId, uint32_t fileId, bool accept
|
|||
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)
|
||||
{
|
||||
std::ignore = tox;
|
||||
Core* core = static_cast<Core*>(vCore);
|
||||
CoreFile* coreFile = core->getCoreFile();
|
||||
ToxFile* file = coreFile->findFile(friendId, fileId);
|
||||
|
|
|
@ -117,11 +117,11 @@ CoreVideoSource* ToxCall::getVideoSource() const
|
|||
return videoSource;
|
||||
}
|
||||
|
||||
ToxFriendCall::ToxFriendCall(uint32_t FriendNum, bool VideoEnabled, CoreAV& av_,
|
||||
ToxFriendCall::ToxFriendCall(uint32_t friendNum, bool VideoEnabled, CoreAV& av_,
|
||||
IAudioControl& audio_, CameraSource& cameraSource_)
|
||||
: ToxCall(VideoEnabled, av_, audio_)
|
||||
, sink(audio_.makeSink())
|
||||
, friendId{FriendNum}
|
||||
, friendId{friendNum}
|
||||
, cameraSource{cameraSource_}
|
||||
{
|
||||
connect(audioSource.get(), &IAudioSource::frameAvailable, this,
|
||||
|
@ -144,8 +144,8 @@ ToxFriendCall::ToxFriendCall(uint32_t FriendNum, bool VideoEnabled, CoreAV& av_,
|
|||
}
|
||||
cameraSource.subscribe();
|
||||
videoInConn = QObject::connect(&cameraSource, &VideoSource::frameAvailable,
|
||||
[&av_, FriendNum](std::shared_ptr<VideoFrame> frame) {
|
||||
av_.sendCallVideo(FriendNum, frame);
|
||||
[&av_, friendNum](std::shared_ptr<VideoFrame> frame) {
|
||||
av_.sendCallVideo(friendNum, frame);
|
||||
});
|
||||
if (!videoInConn) {
|
||||
qDebug() << "Video connection not working";
|
||||
|
|
|
@ -92,7 +92,7 @@ class ToxFriendCall : public ToxCall
|
|||
Q_OBJECT
|
||||
public:
|
||||
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& operator=(ToxFriendCall&& other) = delete;
|
||||
~ToxFriendCall();
|
||||
|
|
|
@ -34,11 +34,11 @@ class Settings;
|
|||
class FriendList
|
||||
{
|
||||
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 const ToxPk& id2Key(uint32_t friendId);
|
||||
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 QString decideNickname(const ToxPk& friendPk, const QString& origName);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class QString;
|
|||
class GroupList
|
||||
{
|
||||
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 const GroupId& id2Key(uint32_t groupNum);
|
||||
static void removeGroup(const GroupId& groupId, bool fake = false);
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
Friend& operator=(const Friend& other) = delete;
|
||||
|
||||
void setName(const QString& name) override;
|
||||
void setAlias(const QString& name);
|
||||
void setAlias(const QString& alias);
|
||||
QString getDisplayedName() const override;
|
||||
bool hasAlias() const;
|
||||
QString getUserName() const;
|
||||
|
|
|
@ -63,9 +63,9 @@ private:
|
|||
bool hideGroups = false;
|
||||
} filterParams;
|
||||
|
||||
void removeAll(IFriendListItem*);
|
||||
bool cmpByName(const IFriendListItemPtr&, const IFriendListItemPtr&);
|
||||
bool cmpByActivity(const IFriendListItemPtr&, const IFriendListItemPtr&);
|
||||
void removeAll(IFriendListItem* item);
|
||||
bool cmpByName(const IFriendListItemPtr& itemA, const IFriendListItemPtr& itemB);
|
||||
bool cmpByActivity(const IFriendListItemPtr& itemA, const IFriendListItemPtr& itemB);
|
||||
|
||||
bool byName = true;
|
||||
bool hideCircles = false;
|
||||
|
|
|
@ -107,8 +107,9 @@ void FriendMessageDispatcher::onExtReceiptReceived(uint64_t receiptId)
|
|||
* @brief Handles status change for friend
|
||||
* @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) {
|
||||
auto messagesToResend = offlineMsgEngine.removeAllMessages();
|
||||
for (auto const& message : messagesToResend) {
|
||||
|
|
|
@ -44,16 +44,16 @@ public:
|
|||
std::pair<DispatchedMessageId, DispatchedMessageId> sendExtendedMessage(const QString& content, ExtensionSet extensions) override;
|
||||
void onMessageReceived(bool isAction, const QString& content);
|
||||
void onReceiptReceived(ReceiptNum receipt);
|
||||
void onExtMessageReceived(const QString& message);
|
||||
void onExtMessageReceived(const QString& content);
|
||||
void onExtReceiptReceived(uint64_t receiptId);
|
||||
void clearOutgoingMessages();
|
||||
private slots:
|
||||
void onFriendOnlineOfflineChanged(const ToxPk& key, bool isOnline);
|
||||
void onFriendOnlineOfflineChanged(const ToxPk& friendPk, bool isOnline);
|
||||
|
||||
private:
|
||||
void sendProcessedMessage(Message const& msg, OfflineMsgEngine::CompletionFn fn);
|
||||
void sendExtendedProcessedMessage(Message const& msg, OfflineMsgEngine::CompletionFn fn);
|
||||
void sendCoreProcessedMessage(Message const& msg, OfflineMsgEngine::CompletionFn fn);
|
||||
void sendProcessedMessage(Message const& message, OfflineMsgEngine::CompletionFn onOfflineMsgComplete);
|
||||
void sendExtendedProcessedMessage(Message const& message, OfflineMsgEngine::CompletionFn onOfflineMsgComplete);
|
||||
void sendCoreProcessedMessage(Message const& message, OfflineMsgEngine::CompletionFn onOfflineMsgComplete);
|
||||
OfflineMsgEngine::CompletionFn getCompletionFn(DispatchedMessageId messageId);
|
||||
|
||||
Friend& f;
|
||||
|
|
|
@ -36,7 +36,7 @@ class GroupMessageDispatcher : public IMessageDispatcher
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GroupMessageDispatcher(Group& group, MessageProcessor processor, ICoreIdHandler& idHandler,
|
||||
GroupMessageDispatcher(Group& g_, MessageProcessor processor, ICoreIdHandler& idHandler,
|
||||
ICoreGroupMessageSender& messageSender,
|
||||
const IGroupSettings& groupSettings);
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ public:
|
|||
MessageProcessor(const SharedParams& sharedParams_);
|
||||
|
||||
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);
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,7 +34,7 @@ class ProfileInfo : public QObject, public IProfileInfo
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ProfileInfo(Core* core_, Profile* profile_, Settings&);
|
||||
ProfileInfo(Core* core_, Profile* profile_, Settings& settings);
|
||||
|
||||
bool setPassword(const QString& password) override;
|
||||
bool deletePassword() override;
|
||||
|
|
|
@ -436,8 +436,9 @@ void SessionChatLog::onMessageComplete(DispatchedMessageId id)
|
|||
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);
|
||||
|
||||
if (chatLogIdxIt == outgoingMessages.end()) {
|
||||
|
|
|
@ -37,9 +37,9 @@ public:
|
|||
|
||||
~SessionChatLog();
|
||||
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;
|
||||
SearchResult searchBackward(SearchPos startIdx, const QString& phrase,
|
||||
SearchResult searchBackward(SearchPos startPos, const QString& phrase,
|
||||
const ParameterSearch& parameter) const override;
|
||||
ChatLogIdx getFirstIdx() const override;
|
||||
ChatLogIdx getNextIdx() const override;
|
||||
|
|
|
@ -186,7 +186,7 @@ public:
|
|||
};
|
||||
|
||||
public:
|
||||
History(std::shared_ptr<RawDatabase> db, Settings&);
|
||||
History(std::shared_ptr<RawDatabase> db, Settings& settings);
|
||||
~History();
|
||||
|
||||
bool isValid();
|
||||
|
|
|
@ -46,9 +46,9 @@ class Profile : public QObject
|
|||
|
||||
public:
|
||||
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,
|
||||
const QCommandLineParser* parser, CameraSource&);
|
||||
const QCommandLineParser* parser, CameraSource& cameraSource);
|
||||
~Profile();
|
||||
|
||||
Core& getCore() const;
|
||||
|
@ -74,11 +74,11 @@ public:
|
|||
|
||||
bool rename(QString newName);
|
||||
|
||||
static const QStringList getAllProfileNames(Settings&);
|
||||
static const QStringList getAllProfileNames(Settings& settings);
|
||||
|
||||
static bool exists(QString name, Paths&);
|
||||
static bool isEncrypted(QString name, Paths&);
|
||||
static QString getDbPath(const QString& profileName, Paths&);
|
||||
static bool exists(QString name, Paths& paths);
|
||||
static bool isEncrypted(QString name, Paths& paths);
|
||||
static QString getDbPath(const QString& profileName, Paths& paths);
|
||||
|
||||
signals:
|
||||
void selfAvatarChanged(const QPixmap& pixmap);
|
||||
|
@ -109,7 +109,7 @@ private:
|
|||
static QStringList getFilesByExt(QString extension, Settings& settings);
|
||||
QString avatarPath(const ToxPk& owner, bool forceUnencrypted = false);
|
||||
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:
|
||||
std::unique_ptr<AvatarBroadcaster> avatarBroadcaster;
|
||||
|
|
|
@ -31,15 +31,15 @@ private:
|
|||
ProfileLocker() = delete;
|
||||
|
||||
public:
|
||||
static bool isLockable(QString profile, Paths&);
|
||||
static bool lock(QString profile, Paths&);
|
||||
static bool isLockable(QString profile, Paths& paths);
|
||||
static bool lock(QString profile, Paths& paths);
|
||||
static void unlock();
|
||||
static bool hasLock();
|
||||
static QString getCurLockName();
|
||||
static void assertLock(Paths&);
|
||||
static void assertLock(Paths& paths);
|
||||
|
||||
private:
|
||||
static QString lockPathFromName(const QString& name, const Paths&);
|
||||
static QString lockPathFromName(const QString& name, const Paths& paths);
|
||||
static void deathByBrokenLock();
|
||||
|
||||
private:
|
||||
|
|
|
@ -258,7 +258,7 @@ public:
|
|||
void setLightTrayIcon(bool newValue);
|
||||
|
||||
QString getStyle() const;
|
||||
void setStyle(const QString& newValue);
|
||||
void setStyle(const QString& newStyle);
|
||||
|
||||
bool getShowSystemTray() const;
|
||||
void setShowSystemTray(bool newValue);
|
||||
|
@ -290,7 +290,7 @@ public:
|
|||
void setProxyAddr(const QString& address) override;
|
||||
|
||||
ICoreSettings::ProxyType getProxyType() const override;
|
||||
void setProxyType(ICoreSettings::ProxyType type) override;
|
||||
void setProxyType(ICoreSettings::ProxyType newValue) override;
|
||||
|
||||
quint16 getProxyPort() const override;
|
||||
void setProxyPort(quint16 port) override;
|
||||
|
@ -434,7 +434,7 @@ public:
|
|||
void setAutoAcceptCall(const ToxPk& id, AutoAcceptCallFlags accept) override;
|
||||
|
||||
QString getGlobalAutoAcceptDir() const;
|
||||
void setGlobalAutoAcceptDir(const QString& dir);
|
||||
void setGlobalAutoAcceptDir(const QString& newValue);
|
||||
|
||||
size_t getMaxAutoAcceptSize() const;
|
||||
void setMaxAutoAcceptSize(size_t size);
|
||||
|
@ -501,7 +501,7 @@ public:
|
|||
void setFriendCircleID(const ToxPk& id, int circleID) 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 removeFriendSettings(const ToxPk& id) override;
|
||||
|
@ -513,7 +513,7 @@ public:
|
|||
SIGNAL_IMPL(Settings, contactNoteChanged, const ToxPk& id, const QString& note)
|
||||
|
||||
bool getCompactLayout() const;
|
||||
void setCompactLayout(bool compact);
|
||||
void setCompactLayout(bool value);
|
||||
|
||||
FriendListSortingMode getFriendSortingMode() const;
|
||||
void setFriendSortingMode(FriendListSortingMode mode);
|
||||
|
|
|
@ -34,7 +34,7 @@ class SmileyPack : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SmileyPack(ISmileySettings&);
|
||||
explicit SmileyPack(ISmileySettings& settings);
|
||||
SmileyPack(SmileyPack&) = delete;
|
||||
SmileyPack& operator=(const SmileyPack&) = delete;
|
||||
~SmileyPack() override;
|
||||
|
@ -44,7 +44,7 @@ public:
|
|||
|
||||
QString smileyfied(const QString& msg);
|
||||
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);
|
||||
|
||||
private slots:
|
||||
|
|
|
@ -26,7 +26,7 @@ class Settings;
|
|||
class ToxSave
|
||||
{
|
||||
public:
|
||||
explicit ToxSave(Settings&);
|
||||
explicit ToxSave(Settings& settings);
|
||||
bool handleToxSave(const QString& path);
|
||||
static bool toxSaveEventHandler(const QByteArray& eventData, void* userData);
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
class Settings;
|
||||
namespace Platform {
|
||||
bool setAutorun(const Settings&, bool on);
|
||||
bool getAutorun(const Settings&);
|
||||
bool setAutorun(const Settings& settings, bool on);
|
||||
bool getAutorun(const Settings& settings);
|
||||
}
|
||||
|
||||
#endif // QTOX_PLATFORM_EXT
|
||||
|
|
|
@ -34,7 +34,7 @@ class DesktopNotify : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DesktopNotify(Settings&);
|
||||
explicit DesktopNotify(Settings& settings);
|
||||
|
||||
public slots:
|
||||
void notifyMessage(const NotificationData& notificationData);
|
||||
|
|
|
@ -36,7 +36,7 @@ class Settings;
|
|||
class CameraDevice
|
||||
{
|
||||
public:
|
||||
static CameraDevice* open(Settings&, QString devName, VideoMode mode = VideoMode());
|
||||
static CameraDevice* open(Settings& settings, QString devName, VideoMode mode = VideoMode());
|
||||
void open();
|
||||
bool close();
|
||||
|
||||
|
@ -51,8 +51,8 @@ public:
|
|||
static bool isScreen(const QString& devName);
|
||||
|
||||
private:
|
||||
CameraDevice(const QString& devName_, AVFormatContext* context_, Settings&);
|
||||
static CameraDevice* open(Settings&, QString devName, AVDictionary** options);
|
||||
CameraDevice(const QString& devName_, AVFormatContext* context_, Settings& settings);
|
||||
static CameraDevice* open(Settings& settings, QString devName, AVDictionary** options);
|
||||
static bool getDefaultInputFormat();
|
||||
static QVector<QPair<QString, QString>> getRawDeviceListGeneric();
|
||||
static QVector<VideoMode> getScreenModes();
|
||||
|
|
|
@ -37,7 +37,7 @@ class CameraSource : public VideoSource
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CameraSource(Settings&);
|
||||
explicit CameraSource(Settings& settings);
|
||||
~CameraSource();
|
||||
void setupDefault();
|
||||
bool isNone() const;
|
||||
|
|
|
@ -42,7 +42,7 @@ class NetCamView : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
NetCamView(ToxPk friendPk_, CameraSource&, Settings&, QWidget* parent = nullptr);
|
||||
NetCamView(ToxPk friendPk_, CameraSource& cameraSource, Settings& settings, QWidget* parent = nullptr);
|
||||
~NetCamView();
|
||||
|
||||
virtual void show(VideoSource* source, const QString& title);
|
||||
|
|
|
@ -168,8 +168,9 @@ void VideoSurface::onSourceStopped()
|
|||
update();
|
||||
}
|
||||
|
||||
void VideoSurface::paintEvent(QPaintEvent*)
|
||||
void VideoSurface::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
std::ignore = event;
|
||||
lock();
|
||||
|
||||
QPainter painter(this);
|
||||
|
|
|
@ -37,7 +37,7 @@ class AboutFriendForm : public QDialog
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AboutFriendForm(std::unique_ptr<IAboutFriend> about, Settings&, QWidget* parent = nullptr);
|
||||
AboutFriendForm(std::unique_ptr<IAboutFriend> about, Settings& settings, QWidget* parent = nullptr);
|
||||
~AboutFriendForm();
|
||||
|
||||
private:
|
||||
|
|
|
@ -34,7 +34,7 @@ class CategoryWidget : public GenericChatItemWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CategoryWidget(bool compact_, Settings&, QWidget* parent = nullptr);
|
||||
explicit CategoryWidget(bool compact_, Settings& settings, QWidget* parent = nullptr);
|
||||
|
||||
bool isExpanded() const;
|
||||
void setExpanded(bool isExpanded, bool save = true);
|
||||
|
@ -71,8 +71,9 @@ private:
|
|||
virtual void onExpand()
|
||||
{
|
||||
}
|
||||
virtual void onAddFriendWidget(FriendWidget*)
|
||||
virtual void onAddFriendWidget(FriendWidget* widget)
|
||||
{
|
||||
std::ignore = widget;
|
||||
}
|
||||
|
||||
QWidget* listWidget;
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
AV = Audio | Video
|
||||
};
|
||||
|
||||
ChatFormHeader(Settings&, QWidget* parent = nullptr);
|
||||
ChatFormHeader(Settings& settings, QWidget* parent = nullptr);
|
||||
~ChatFormHeader();
|
||||
|
||||
void setName(const QString& newName);
|
||||
|
|
|
@ -156,8 +156,9 @@ void CircleWidget::dragEnterEvent(QDragEnterEvent* event)
|
|||
setContainerAttribute(Qt::WA_UnderMouse, true); // Simulate hover.
|
||||
}
|
||||
|
||||
void CircleWidget::dragLeaveEvent(QDragLeaveEvent*)
|
||||
void CircleWidget::dragLeaveEvent(QDragLeaveEvent* event)
|
||||
{
|
||||
std::ignore = event;
|
||||
setContainerAttribute(Qt::WA_UnderMouse, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class CircleWidget final : public CategoryWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CircleWidget(const Core& core_, FriendListWidget* parent, int id_, Settings&);
|
||||
CircleWidget(const Core& core_, FriendListWidget* parent, int id_, Settings& settings);
|
||||
~CircleWidget();
|
||||
|
||||
void editName();
|
||||
|
|
|
@ -51,7 +51,7 @@ class ContentDialog : public ActivateDialog, public IDialogs
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ContentDialog(const Core& core, Settings&, QWidget* parent = nullptr);
|
||||
ContentDialog(const Core& core, Settings& settings, QWidget* parent = nullptr);
|
||||
~ContentDialog() override;
|
||||
|
||||
FriendWidget* addFriend(std::shared_ptr<FriendChatroom> chatroom, GenericChatForm* form);
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
void ensureSplitterVisible();
|
||||
void updateTitleAndStatusIcon();
|
||||
|
||||
void cycleChats(bool forward, bool loop = true);
|
||||
void cycleChats(bool forward, bool inverse = true);
|
||||
void onVideoShow(QSize size);
|
||||
void onVideoHide();
|
||||
|
||||
|
@ -72,7 +72,7 @@ public:
|
|||
bool hasChat(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 updateChatStatusLight(const ChatId& chatId);
|
||||
|
||||
|
|
|
@ -35,13 +35,13 @@ class ContentDialogManager : public QObject, public IDialogsManager
|
|||
Q_OBJECT
|
||||
public:
|
||||
ContentDialog* current();
|
||||
bool chatWidgetExists(const ChatId& groupId);
|
||||
bool chatWidgetExists(const ChatId& chatId);
|
||||
void focusChat(const ChatId& chatId);
|
||||
void updateFriendStatus(const ToxPk& friendPk);
|
||||
void updateGroupStatus(const GroupId& friendPk);
|
||||
void updateGroupStatus(const GroupId& groupId);
|
||||
bool isChatActive(const ChatId& chatId);
|
||||
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* getGroupDialogs(const GroupId& groupId) const;
|
||||
|
|
|
@ -27,8 +27,8 @@ class Settings;
|
|||
class ContentLayout : public QVBoxLayout
|
||||
{
|
||||
public:
|
||||
ContentLayout(Settings&);
|
||||
explicit ContentLayout(Settings&, QWidget* parent);
|
||||
ContentLayout(Settings& settings);
|
||||
explicit ContentLayout(Settings& settings, QWidget* parent);
|
||||
~ContentLayout();
|
||||
|
||||
void clear();
|
||||
|
|
|
@ -155,8 +155,9 @@ void EmoticonsWidget::mouseReleaseEvent(QMouseEvent* ev)
|
|||
hide();
|
||||
}
|
||||
|
||||
void EmoticonsWidget::mousePressEvent(QMouseEvent*)
|
||||
void EmoticonsWidget::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
std::ignore = event;
|
||||
}
|
||||
|
||||
void EmoticonsWidget::wheelEvent(QWheelEvent* e)
|
||||
|
|
|
@ -34,7 +34,7 @@ class EmoticonsWidget : public QMenu
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EmoticonsWidget(SmileyPack&, Settings&, QWidget* parent = nullptr);
|
||||
EmoticonsWidget(SmileyPack& smileyPack, Settings& settings, QWidget* parent = nullptr);
|
||||
|
||||
signals:
|
||||
void insertEmoticon(QString str);
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
int verticalSpacing() const;
|
||||
Qt::Orientations expandingDirections() const;
|
||||
bool hasHeightForWidth() const;
|
||||
int heightForWidth(int) const;
|
||||
int heightForWidth(int width) const;
|
||||
int count() const;
|
||||
QLayoutItem* itemAt(int index) const;
|
||||
QSize minimumSize() const;
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
FriendRequest = 2
|
||||
};
|
||||
|
||||
AddFriendForm(ToxId ownId_, Settings&);
|
||||
AddFriendForm(ToxId ownId_, Settings& settings);
|
||||
AddFriendForm(const AddFriendForm&) = delete;
|
||||
AddFriendForm& operator=(const AddFriendForm&) = delete;
|
||||
~AddFriendForm();
|
||||
|
|
|
@ -782,8 +782,10 @@ void ChatForm::hideNetcam()
|
|||
netcam.reset();
|
||||
}
|
||||
|
||||
void ChatForm::onSplitterMoved(int, int)
|
||||
void ChatForm::onSplitterMoved(int pos, int index)
|
||||
{
|
||||
std::ignore = pos;
|
||||
std::ignore = index;
|
||||
if (netcam) {
|
||||
netcam->setShowMessages(bodySplitter->sizes()[1] == 0);
|
||||
}
|
||||
|
|
|
@ -51,8 +51,8 @@ class ChatForm : public GenericChatForm
|
|||
Q_OBJECT
|
||||
public:
|
||||
ChatForm(Profile& profile, Friend* chatFriend, IChatLog& chatLog_,
|
||||
IMessageDispatcher& messageDispatcher_, DocumentCache&, SmileyPack&,
|
||||
CameraSource&, Settings&);
|
||||
IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache, SmileyPack& smileyPack,
|
||||
CameraSource& cameraSource, Settings& settings);
|
||||
~ChatForm() override;
|
||||
void setStatusMessage(const QString& newMessage);
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace FileTransferList
|
|||
class Delegate : public QStyledItemDelegate
|
||||
{
|
||||
public:
|
||||
Delegate(Settings&, QWidget* parent = nullptr);
|
||||
Delegate(Settings& settings, QWidget* parent = nullptr);
|
||||
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;
|
||||
|
@ -100,7 +100,7 @@ namespace FileTransferList
|
|||
class View : public QTableView
|
||||
{
|
||||
public:
|
||||
View(QAbstractItemModel* model, Settings&, QWidget* parent = nullptr);
|
||||
View(QAbstractItemModel* model, Settings& settings, QWidget* parent = nullptr);
|
||||
~View();
|
||||
|
||||
};
|
||||
|
@ -111,7 +111,7 @@ class FilesForm : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FilesForm(CoreFile& coreFile, Settings&);
|
||||
FilesForm(CoreFile& coreFile, Settings& settings);
|
||||
~FilesForm();
|
||||
|
||||
bool isShown() const;
|
||||
|
@ -121,8 +121,8 @@ public slots:
|
|||
void onFileUpdated(const ToxFile& file);
|
||||
|
||||
private slots:
|
||||
void onSentFileActivated(const QModelIndex& item);
|
||||
void onReceivedFileActivated(const QModelIndex& item);
|
||||
void onSentFileActivated(const QModelIndex& index);
|
||||
void onReceivedFileActivated(const QModelIndex& index);
|
||||
|
||||
private:
|
||||
struct FileInfo
|
||||
|
|
|
@ -384,8 +384,9 @@ void GenericChatForm::show(ContentLayout* contentLayout_)
|
|||
#endif
|
||||
}
|
||||
|
||||
void GenericChatForm::showEvent(QShowEvent*)
|
||||
void GenericChatForm::showEvent(QShowEvent* event)
|
||||
{
|
||||
std::ignore = event;
|
||||
msgEdit->setFocus();
|
||||
headWidget->showCallConfirm();
|
||||
}
|
||||
|
|
|
@ -72,8 +72,8 @@ class GenericChatForm : public QWidget
|
|||
Q_OBJECT
|
||||
public:
|
||||
GenericChatForm(const Core& core_, const Chat* chat, IChatLog& chatLog_,
|
||||
IMessageDispatcher& messageDispatcher_, DocumentCache&,
|
||||
SmileyPack&, Settings&, QWidget* parent_ = nullptr);
|
||||
IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache,
|
||||
SmileyPack& smileyPack, Settings& settings, QWidget* parent_ = nullptr);
|
||||
~GenericChatForm() override;
|
||||
|
||||
void setName(const QString& newName);
|
||||
|
@ -124,8 +124,8 @@ protected:
|
|||
const QDateTime& datetime, bool isAction, bool isSent, bool colorizeName = false);
|
||||
void adjustFileMenuPosition();
|
||||
void hideEvent(QHideEvent* event) override;
|
||||
void showEvent(QShowEvent*) override;
|
||||
bool event(QEvent*) final;
|
||||
void showEvent(QShowEvent* event) override;
|
||||
bool event(QEvent* event) final;
|
||||
void resizeEvent(QResizeEvent* event) final;
|
||||
bool eventFilter(QObject* object, QEvent* event) final;
|
||||
bool searchInText(const QString& phrase, const ParameterSearch& parameter, SearchDirection direction);
|
||||
|
|
|
@ -44,7 +44,7 @@ class GroupChatForm : public GenericChatForm
|
|||
public:
|
||||
GroupChatForm(Core& core_, Group* chatGroup, IChatLog& chatLog_,
|
||||
IMessageDispatcher& messageDispatcher_, Settings& settings_,
|
||||
DocumentCache&, SmileyPack&);
|
||||
DocumentCache& documentCache, SmileyPack& smileyPack);
|
||||
~GroupChatForm();
|
||||
|
||||
void peerAudioPlaying(ToxPk peerPk);
|
||||
|
|
|
@ -42,7 +42,7 @@ class GroupInviteForm : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GroupInviteForm(Settings&);
|
||||
explicit GroupInviteForm(Settings& settings);
|
||||
~GroupInviteForm();
|
||||
|
||||
void show(ContentLayout* contentLayout);
|
||||
|
|
|
@ -33,7 +33,7 @@ class GroupInviteWidget : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GroupInviteWidget(QWidget* parent, const GroupInvite& invite, Settings&);
|
||||
GroupInviteWidget(QWidget* parent, const GroupInvite& invite, Settings& settings);
|
||||
void retranslateUi();
|
||||
const GroupInvite getInviteInfo() const;
|
||||
|
||||
|
|
|
@ -43,8 +43,9 @@ signals:
|
|||
void clicked();
|
||||
|
||||
protected:
|
||||
void mouseReleaseEvent(QMouseEvent*) final
|
||||
void mouseReleaseEvent(QMouseEvent* event) final
|
||||
{
|
||||
std::ignore = event;
|
||||
emit clicked();
|
||||
}
|
||||
};
|
||||
|
@ -53,7 +54,7 @@ class ProfileForm : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ProfileForm(IProfileInfo* profileInfo_, Settings&, QWidget* parent = nullptr);
|
||||
ProfileForm(IProfileInfo* profileInfo_, Settings& settings, QWidget* parent = nullptr);
|
||||
~ProfileForm();
|
||||
void show(ContentLayout* contentLayout);
|
||||
bool isShown() const;
|
||||
|
|
|
@ -32,7 +32,7 @@ class SearchSettingsForm : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SearchSettingsForm(Settings&, QWidget *parent = nullptr);
|
||||
explicit SearchSettingsForm(Settings& settings, QWidget *parent = nullptr);
|
||||
~SearchSettingsForm();
|
||||
|
||||
ParameterSearch getParameterSearch();
|
||||
|
|
|
@ -32,7 +32,7 @@ class AdvancedForm : public GenericForm
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AdvancedForm(Settings&);
|
||||
explicit AdvancedForm(Settings& settings);
|
||||
~AdvancedForm();
|
||||
QString getFormName() final
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ class GeneralForm : public GenericForm
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GeneralForm(SettingsWidget* parent, Settings&);
|
||||
explicit GeneralForm(SettingsWidget* parent, Settings& settings);
|
||||
~GeneralForm();
|
||||
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;
|
||||
bodyUI->nospamLineEdit->setText(core->getSelfId().getNoSpamString());
|
||||
bodyUI->cbTypingNotification->setChecked(s.getTypingNotification());
|
||||
|
|
|
@ -32,7 +32,7 @@ class PrivacyForm : public GenericForm
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PrivacyForm(Core* core_, Settings&);
|
||||
PrivacyForm(Core* core_, Settings& settings);
|
||||
~PrivacyForm();
|
||||
QString getFormName() final
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ private slots:
|
|||
void on_randomNosapamButton_clicked();
|
||||
void on_nospamLineEdit_textChanged();
|
||||
void on_blackListTextEdit_textChanged();
|
||||
void showEvent(QShowEvent*) final;
|
||||
void showEvent(QShowEvent* event) final;
|
||||
|
||||
private:
|
||||
void retranslateUi();
|
||||
|
|
|
@ -337,9 +337,8 @@ void UserInterfaceForm::on_cbShowIdenticons_stateChanged()
|
|||
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);
|
||||
Style::setThemeColor(settings, index);
|
||||
Style::applyTheme();
|
||||
|
|
|
@ -35,7 +35,7 @@ class UserInterfaceForm : public GenericForm
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
UserInterfaceForm(SmileyPack&, Settings&, SettingsWidget* myParent);
|
||||
UserInterfaceForm(SmileyPack& smileyPack, Settings& settings, SettingsWidget* myParent);
|
||||
~UserInterfaceForm();
|
||||
QString getFormName() final
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ private slots:
|
|||
void on_notify_stateChanged();
|
||||
void on_desktopNotify_stateChanged();
|
||||
void on_notifySound_stateChanged();
|
||||
void on_notifyHide_stateChanged(int);
|
||||
void on_notifyHide_stateChanged(int value);
|
||||
void on_busySound_stateChanged();
|
||||
void on_showWindow_stateChanged();
|
||||
void on_groupOnlyNotfiyWhenMentioned_stateChanged();
|
||||
|
@ -61,10 +61,10 @@ private slots:
|
|||
void on_cbSeparateWindow_stateChanged();
|
||||
void on_cbDontGroupWindows_stateChanged();
|
||||
void on_cbGroupchatPosition_stateChanged();
|
||||
void on_themeColorCBox_currentIndexChanged(int);
|
||||
void on_themeColorCBox_currentIndexChanged(int index);
|
||||
void on_cbShowIdenticons_stateChanged();
|
||||
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);
|
||||
|
||||
private:
|
||||
|
|
|
@ -47,7 +47,7 @@ class SettingsWidget : public QWidget
|
|||
Q_OBJECT
|
||||
public:
|
||||
SettingsWidget(UpdateCheck* updateCheck, IAudioControl& audio, Core *core,
|
||||
SmileyPack&, CameraSource&, Settings&, Widget* parent = nullptr);
|
||||
SmileyPack& smileyPack, CameraSource& cameraSource, Settings& settings, Widget* parent = nullptr);
|
||||
~SettingsWidget();
|
||||
|
||||
bool isShown() const;
|
||||
|
@ -60,7 +60,7 @@ public slots:
|
|||
void onUpdateAvailable(void);
|
||||
|
||||
private slots:
|
||||
void onTabChanged(int);
|
||||
void onTabChanged(int index);
|
||||
|
||||
private:
|
||||
void retranslateUi();
|
||||
|
|
|
@ -45,7 +45,7 @@ class FriendListWidget : public QWidget
|
|||
Q_OBJECT
|
||||
public:
|
||||
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();
|
||||
void setMode(SortingMode mode);
|
||||
SortingMode getMode() const;
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
|
||||
void cycleChats(GenericChatroomWidget* activeChatroomWidget, bool forward);
|
||||
|
||||
void updateActivityTime(const QDateTime& date);
|
||||
void updateActivityTime(const QDateTime& time);
|
||||
|
||||
signals:
|
||||
void onCompactChanged(bool compact);
|
||||
|
|
|
@ -35,7 +35,7 @@ class FriendWidget : public GenericChatroomWidget, public IFriendListItem
|
|||
{
|
||||
Q_OBJECT
|
||||
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 setAsActiveChatroom() final;
|
||||
|
|
|
@ -56,8 +56,10 @@ GenericChatroomWidget::GenericChatroomWidget(bool compact_, Settings& settings_,
|
|||
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.
|
||||
}
|
||||
|
||||
|
@ -177,8 +179,9 @@ void GenericChatroomWidget::mouseReleaseEvent(QMouseEvent* event)
|
|||
}
|
||||
}
|
||||
|
||||
void GenericChatroomWidget::enterEvent(QEvent*)
|
||||
void GenericChatroomWidget::enterEvent(QEvent* event)
|
||||
{
|
||||
std::ignore = event;
|
||||
if (!active)
|
||||
setBackgroundRole(QPalette::Highlight);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class GenericChatroomWidget : public GenericChatItemWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GenericChatroomWidget(bool compact, Settings&, QWidget* parent = nullptr);
|
||||
explicit GenericChatroomWidget(bool compact, Settings& settings, QWidget* parent = nullptr);
|
||||
|
||||
public slots:
|
||||
virtual void setAsActiveChatroom() = 0;
|
||||
|
@ -54,7 +54,7 @@ public slots:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
bool eventFilter(QObject*, QEvent*) final;
|
||||
bool eventFilter(QObject* object, QEvent* event) final;
|
||||
|
||||
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) {
|
||||
setBackgroundRole(QPalette::Window);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ class GroupWidget final : public GenericChatroomWidget, public IFriendListItem
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GroupWidget(std::shared_ptr<GroupChatroom> chatroom_, bool compact, Settings&);
|
||||
GroupWidget(std::shared_ptr<GroupChatroom> chatroom_, bool compact, Settings& settings);
|
||||
~GroupWidget();
|
||||
void setAsInactiveChatroom() final;
|
||||
void setAsActiveChatroom() final;
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
ImagePreviewButton& operator=(ImagePreviewButton&&) = delete;
|
||||
|
||||
void setIconFromFile(const QString& filename);
|
||||
void setIconFromPixmap(const QPixmap& image);
|
||||
void setIconFromPixmap(const QPixmap& pixmap);
|
||||
private:
|
||||
void initialize(const QPixmap& image);
|
||||
};
|
||||
|
|
|
@ -36,7 +36,7 @@ class LoginScreen : public QDialog
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
LoginScreen(Settings&, const QString& initialProfileName = QString(), QWidget* parent = nullptr);
|
||||
LoginScreen(Settings& settings, const QString& initialProfileName = QString(), QWidget* parent = nullptr);
|
||||
~LoginScreen();
|
||||
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) {
|
||||
emit clicked();
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ signals:
|
|||
void clicked();
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent*) final;
|
||||
void mousePressEvent(QMouseEvent* event) final;
|
||||
|
||||
private:
|
||||
void updatePixmap();
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
Bottom
|
||||
};
|
||||
|
||||
NotificationEdgeWidget(Position position, Settings&, QWidget* parent = nullptr);
|
||||
NotificationEdgeWidget(Position position, Settings& settings, QWidget* parent = nullptr);
|
||||
void updateNotificationCount(int count);
|
||||
|
||||
signals:
|
||||
|
|
|
@ -73,16 +73,18 @@ void PasswordEdit::unregisterHandler()
|
|||
#endif
|
||||
}
|
||||
|
||||
void PasswordEdit::showEvent(QShowEvent*)
|
||||
void PasswordEdit::showEvent(QShowEvent* event)
|
||||
{
|
||||
std::ignore = event;
|
||||
#ifdef ENABLE_CAPSLOCK_INDICATOR
|
||||
action->setVisible(Platform::capsLockEnabled());
|
||||
#endif
|
||||
registerHandler();
|
||||
}
|
||||
|
||||
void PasswordEdit::hideEvent(QHideEvent*)
|
||||
void PasswordEdit::hideEvent(QHideEvent* event)
|
||||
{
|
||||
std::ignore = event;
|
||||
unregisterHandler();
|
||||
}
|
||||
|
||||
|
@ -101,8 +103,8 @@ void PasswordEdit::EventHandler::updateActions()
|
|||
{
|
||||
bool caps = Platform::capsLockEnabled();
|
||||
|
||||
for (QAction* action : actions)
|
||||
action->setVisible(caps);
|
||||
for (QAction* actionIt : actions)
|
||||
actionIt->setVisible(caps);
|
||||
}
|
||||
|
||||
bool PasswordEdit::EventHandler::eventFilter(QObject* obj, QEvent* event)
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
Active = 2, // Red
|
||||
};
|
||||
|
||||
explicit SearchForm(Settings&, QWidget* parent = nullptr);
|
||||
explicit SearchForm(Settings& settings, QWidget* parent = nullptr);
|
||||
void removeSearchPhrase();
|
||||
QString getSearchPhrase() const;
|
||||
ParameterSearch getParameterSearch();
|
||||
|
|
|
@ -76,21 +76,21 @@ public:
|
|||
};
|
||||
|
||||
static QStringList getThemeColorNames();
|
||||
static const QString getStylesheet(const QString& filename, Settings&, const QFont& baseFont = QFont());
|
||||
static const QString getImagePath(const QString& filename, Settings&);
|
||||
static QString getThemeFolder(Settings&);
|
||||
static const QString getStylesheet(const QString& filename, Settings& settings, const QFont& baseFont = QFont());
|
||||
static const QString getImagePath(const QString& filename, Settings& settings);
|
||||
static QString getThemeFolder(Settings& settings);
|
||||
static QString getThemeName();
|
||||
static QColor getColor(ColorPalette entry);
|
||||
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 setThemeColor(Settings&, int color);
|
||||
static void setThemeColor(Settings& settings, int color);
|
||||
static void setThemeColor(const QColor& color);
|
||||
static void applyTheme();
|
||||
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 QString getThemePath(Settings&);
|
||||
static QString getThemePath(Settings& settings);
|
||||
|
||||
signals:
|
||||
void themeChanged();
|
||||
|
|
|
@ -141,8 +141,9 @@ void CallConfirmWidget::reposition()
|
|||
update();
|
||||
}
|
||||
|
||||
void CallConfirmWidget::paintEvent(QPaintEvent*)
|
||||
void CallConfirmWidget::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
std::ignore = event;
|
||||
QPainter painter(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
painter.setBrush(brush);
|
||||
|
@ -152,8 +153,9 @@ void CallConfirmWidget::paintEvent(QPaintEvent*)
|
|||
painter.drawPolygon(spikePoly);
|
||||
}
|
||||
|
||||
void CallConfirmWidget::showEvent(QShowEvent*)
|
||||
void CallConfirmWidget::showEvent(QShowEvent* event)
|
||||
{
|
||||
std::ignore = event;
|
||||
// Kriby: Legacy comment, is this still true?
|
||||
// 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.
|
||||
|
@ -163,16 +165,18 @@ void CallConfirmWidget::showEvent(QShowEvent*)
|
|||
update();
|
||||
}
|
||||
|
||||
void CallConfirmWidget::hideEvent(QHideEvent*)
|
||||
void CallConfirmWidget::hideEvent(QHideEvent* event)
|
||||
{
|
||||
std::ignore = event;
|
||||
if (parentWidget())
|
||||
parentWidget()->removeEventFilter(this);
|
||||
|
||||
setParent(nullptr);
|
||||
}
|
||||
|
||||
bool CallConfirmWidget::eventFilter(QObject*, QEvent* event)
|
||||
bool CallConfirmWidget::eventFilter(QObject* object, QEvent* event)
|
||||
{
|
||||
std::ignore = object;
|
||||
if (event->type() == QEvent::Resize)
|
||||
reposition();
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class CallConfirmWidget final : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CallConfirmWidget(Settings&, const QWidget* anchor_);
|
||||
explicit CallConfirmWidget(Settings& settings, const QWidget* anchor_);
|
||||
|
||||
signals:
|
||||
void accepted();
|
||||
|
@ -46,7 +46,7 @@ protected:
|
|||
void paintEvent(QPaintEvent* event) final;
|
||||
void showEvent(QShowEvent* event) final;
|
||||
void hideEvent(QHideEvent* event) final;
|
||||
bool eventFilter(QObject*, QEvent* event) final;
|
||||
bool eventFilter(QObject* object, QEvent* event) final;
|
||||
|
||||
private:
|
||||
const QWidget* anchor;
|
||||
|
|
|
@ -27,7 +27,7 @@ class ProfileImporter : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ProfileImporter(Settings&, QWidget* parent = nullptr);
|
||||
explicit ProfileImporter(Settings& settings, QWidget* parent = nullptr);
|
||||
bool importProfile(const QString& path);
|
||||
bool importProfile();
|
||||
|
||||
|
|
|
@ -54,8 +54,10 @@ void ScreenGrabberOverlayItem::mousePressEvent(QGraphicsSceneMouseEvent* 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->setPen(pen());
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class Translator
|
|||
{
|
||||
public:
|
||||
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);
|
||||
|
||||
private:
|
||||
|
|
|
@ -82,8 +82,9 @@
|
|||
#include "tool/removefrienddialog.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;
|
||||
Widget* widget = Nexus::getDesktopGUI();
|
||||
if (!widget) {
|
||||
|
@ -1083,9 +1084,9 @@ void Widget::cleanupNotificationSound()
|
|||
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);
|
||||
|
||||
// loop until call answered or rejected
|
||||
|
@ -1149,8 +1150,9 @@ void Widget::dispatchFile(ToxFile file)
|
|||
filesForm->onFileUpdated(file);
|
||||
}
|
||||
|
||||
void Widget::dispatchFileWithBool(ToxFile file, bool)
|
||||
void Widget::dispatchFileWithBool(ToxFile file, bool pausedOrBroken)
|
||||
{
|
||||
std::ignore = pausedOrBroken;
|
||||
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"));
|
||||
if (!errorInfo.isEmpty()) {
|
||||
info = info + QStringLiteral(": ") + errorInfo;
|
||||
|
@ -1452,7 +1455,7 @@ void Widget::onReceiptReceived(int friendId, ReceiptNum 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);
|
||||
Friend* f = FriendList::findFriend(friendKey);
|
||||
|
@ -1460,7 +1463,7 @@ void Widget::onExtendedMessageSupport(uint32_t friendNumber, bool compatible)
|
|||
return;
|
||||
}
|
||||
|
||||
f->setExtendedMessageSupport(compatible);
|
||||
f->setExtendedMessageSupport(supported);
|
||||
}
|
||||
|
||||
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:
|
||||
Widget(Profile& profile_, IAudioControl& audio_, CameraSource&, Settings&,
|
||||
Widget(Profile& profile_, IAudioControl& audio_, CameraSource& cameraSource, Settings& settings,
|
||||
QWidget* parent = nullptr);
|
||||
~Widget() override;
|
||||
void init();
|
||||
|
@ -226,7 +226,7 @@ private slots:
|
|||
void setStatusOnline();
|
||||
void setStatusAway();
|
||||
void setStatusBusy();
|
||||
void onIconClick(QSystemTrayIcon::ActivationReason);
|
||||
void onIconClick(QSystemTrayIcon::ActivationReason reason);
|
||||
void onUserAwayCheck();
|
||||
void onEventIconTick();
|
||||
void onTryCreateTrayIcon();
|
||||
|
@ -239,11 +239,11 @@ private slots:
|
|||
void onDialogShown(GenericChatroomWidget* widget);
|
||||
void outgoingNotification();
|
||||
void onCallEnd();
|
||||
void incomingNotification(uint32_t friendId);
|
||||
void incomingNotification(uint32_t friendNum);
|
||||
void onRejectCall(uint32_t friendId);
|
||||
void onStopNotification();
|
||||
void dispatchFile(ToxFile file);
|
||||
void dispatchFileWithBool(ToxFile file, bool);
|
||||
void dispatchFileWithBool(ToxFile file, bool pausedOrBroken);
|
||||
void dispatchFileSendFailed(uint32_t friendId, const QString& fileName);
|
||||
void connectCircleWidget(CircleWidget& circleWidget);
|
||||
void connectFriendWidget(FriendWidget& friendWidget);
|
||||
|
|
|
@ -42,19 +42,19 @@ public:
|
|||
{
|
||||
return false;
|
||||
}
|
||||
void setEnableIPv6(bool) override {}
|
||||
void setEnableIPv6(bool enable) override { std::ignore = enable; }
|
||||
|
||||
bool getForceTCP() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
void setForceTCP(bool) override {}
|
||||
void setForceTCP(bool force) override { std::ignore = force; }
|
||||
|
||||
bool getEnableLanDiscovery() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
void setEnableLanDiscovery(bool) override {}
|
||||
void setEnableLanDiscovery(bool enable) override { std::ignore = enable; }
|
||||
|
||||
QString getProxyAddr() const override
|
||||
{
|
||||
|
|
|
@ -154,8 +154,9 @@ private slots:
|
|||
receivedMessages.push_back(std::move(message));
|
||||
}
|
||||
|
||||
void onMessageBroken(DispatchedMessageId id, BrokenMessageReason)
|
||||
void onMessageBroken(DispatchedMessageId id, BrokenMessageReason reason)
|
||||
{
|
||||
std::ignore = reason;
|
||||
brokenMessages.insert(id);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ private slots:
|
|||
|
||||
private:
|
||||
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);
|
||||
};
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ private slots:
|
|||
};
|
||||
|
||||
namespace {
|
||||
void completionFn(bool) {}
|
||||
void completionFn(bool success) { std::ignore = success; }
|
||||
} // namespace
|
||||
|
||||
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