Fix memory leaks & data races in tests (#4772)
* Add a few pre-made sanitizer suppressions * Test Sanitization: Fix threading issues * Test Sanitization: Allow deletion of PubSub We still don't delete it in main code, but this allows us to try deleting it in tests. * Test Sanitization: Fix some memory leaks * fix gtest clang-tidy warning * const emojis test :-)
This commit is contained in:
@@ -33,6 +33,7 @@ inline QDebug operator<<(QDebug dbg, const ActionUser &user)
|
||||
}
|
||||
|
||||
struct PubSubAction {
|
||||
PubSubAction() = default;
|
||||
PubSubAction(const QJsonObject &data, const QString &_roomID);
|
||||
ActionUser source;
|
||||
|
||||
|
||||
@@ -77,8 +77,6 @@ public:
|
||||
|
||||
void setAccountData(QString token, QString userID);
|
||||
|
||||
~PubSub() = delete;
|
||||
|
||||
enum class State {
|
||||
Connected,
|
||||
Disconnected,
|
||||
|
||||
@@ -31,7 +31,8 @@ struct PubSubAutoModQueueMessage {
|
||||
QString senderUserDisplayName;
|
||||
QColor senderUserChatColor;
|
||||
|
||||
PubSubAutoModQueueMessage(const QJsonObject &root);
|
||||
PubSubAutoModQueueMessage() = default;
|
||||
explicit PubSubAutoModQueueMessage(const QJsonObject &root);
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -28,7 +28,8 @@ struct PubSubWhisperMessage {
|
||||
QString fromUserDisplayName;
|
||||
QColor fromUserColor;
|
||||
|
||||
PubSubWhisperMessage(const QJsonObject &root);
|
||||
PubSubWhisperMessage() = default;
|
||||
explicit PubSubWhisperMessage(const QJsonObject &root);
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user