test: Add build system support and a main function for unit tests
[quassel.git] / src / core / coreignorelistmanager.cpp
index c6c3a7a..1dac961 100644 (file)
@@ -26,7 +26,7 @@
 CoreIgnoreListManager::CoreIgnoreListManager(CoreSession *parent)
     : IgnoreListManager(parent)
 {
-    CoreSession *session = qobject_cast<CoreSession *>(parent);
+    auto *session = qobject_cast<CoreSession *>(parent);
     if (!session) {
         qWarning() << "CoreIgnoreListManager: unable to load IgnoreList. Parent is not a Coresession!";
         //loadDefaults();
@@ -36,7 +36,7 @@ CoreIgnoreListManager::CoreIgnoreListManager(CoreSession *parent)
     initSetIgnoreList(Core::getUserSetting(session->user(), "IgnoreList").toMap());
 
     // we store our settings whenever they change
-    connect(this, SIGNAL(updatedRemotely()), SLOT(save()));
+    connect(this, &SyncableObject::updatedRemotely, this, &CoreIgnoreListManager::save);
 
     //if(isEmpty())
     //loadDefaults();
@@ -52,7 +52,7 @@ IgnoreListManager::StrictnessType CoreIgnoreListManager::match(const RawMessage
 
 void CoreIgnoreListManager::save() const
 {
-    CoreSession *session = qobject_cast<CoreSession *>(parent());
+    auto *session = qobject_cast<CoreSession *>(parent());
     if (!session) {
         qWarning() << "CoreIgnoreListManager: unable to save IgnoreList. Parent is not a Coresession!";
         return;