aboutsummaryrefslogtreecommitdiffstats
path: root/src/kvilib/irc/KviIdentityProfileSet.cpp
diff options
context:
space:
mode:
authorGravatar ctrlaltca2024-02-08 08:58:10 +0100
committerGravatar GitHub2024-02-08 08:58:10 +0100
commit5cbbeabcfd2321e42767063d617b71ae14b3b8c7 (patch)
tree02622afce182d44bc2463f3adb2e19609a7aa225 /src/kvilib/irc/KviIdentityProfileSet.cpp
parentFix #2597: moc may require the full KviMaskEntry declaration in the header fi... (diff)
downloadKVIrc-5cbbeabcfd2321e42767063d617b71ae14b3b8c7.tar.gz
KVIrc-5cbbeabcfd2321e42767063d617b71ae14b3b8c7.tar.bz2
KVIrc-5cbbeabcfd2321e42767063d617b71ae14b3b8c7.zip
Add support for sanitizers at compile time (and fix some issues) (#2599)
* Add an option to enable sanitizer at compile time * Fix singleton classes initialization * Revert r5378 - issue #1068 - to avoid having duplicate symbols exported by modules, that may cause a crash * Fix cast in KviTalIconAndRichTextItemDelegate (used by both QListWidget and QTreeWidget) * ScriptEditor: don't leak a timer for every script editor widget * Add support for memory and thread sanitizers * Fix sanitizer * KviSignalhandler: don't leak the whole object * Remove debug warning when a single message is longer than 512 bytes. As per https://ircv3.net/specs/extensions/message-tags.html#size-limit , message tags can prepend a whooping 8kbs of "tags" (header data) to each message. * Avoid initialization loop between KviLocale and KviMessageCatalogue. Assume all .po files are UTF8. This is already a requirement since about a decade. * KviInputEditor: don't leak the undo/redo stacks KviInputEditor: don't leak the undo/redo stacks - rework using smart pointers * Fix typo
Diffstat (limited to 'src/kvilib/irc/KviIdentityProfileSet.cpp')
-rw-r--r--src/kvilib/irc/KviIdentityProfileSet.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/kvilib/irc/KviIdentityProfileSet.cpp b/src/kvilib/irc/KviIdentityProfileSet.cpp
index 1c10e1c2c..686114066 100644
--- a/src/kvilib/irc/KviIdentityProfileSet.cpp
+++ b/src/kvilib/irc/KviIdentityProfileSet.cpp
@@ -26,7 +26,6 @@
#include "KviConfigurationFile.h"
KviIdentityProfileSet * KviIdentityProfileSet::m_pSelf = nullptr;
-unsigned int KviIdentityProfileSet::m_uCount = 0;
KviIdentityProfileSet::KviIdentityProfileSet()
: KviHeapObject()
@@ -49,18 +48,18 @@ KviIdentityProfileSet::~KviIdentityProfileSet()
void KviIdentityProfileSet::init()
{
- if((!m_pSelf) && (m_pSelf->count() == 0))
+ if(!m_pSelf)
{
m_pSelf = new KviIdentityProfileSet();
- m_uCount++;
}
}
void KviIdentityProfileSet::done()
{
- m_uCount--;
- if(m_pSelf->count() == 0)
+ if(m_pSelf) {
delete m_pSelf;
+ m_pSelf = nullptr;
+ }
}
void KviIdentityProfileSet::clear()