modernize: Use auto where the type is clear from context
[quassel.git] / src / client / clienttransfermanager.cpp
index 81ca2de..5cd4d07 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2016 by the Quassel Project                        *
+ *   Copyright (C) 2005-2018 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 #include "client.h"
 #include "clienttransfer.h"
 
-INIT_SYNCABLE_OBJECT(ClientTransferManager)
+void ClientTransferManager::setTransferIds(const QList<QUuid> &transferIds)
+{
+    for(auto &&id : transferIds) {
+        onCoreTransferAdded(id);
+    }
+}
+
 
 void ClientTransferManager::onCoreTransferAdded(const QUuid &uuid)
 {
@@ -40,7 +46,7 @@ void ClientTransferManager::onCoreTransferAdded(const QUuid &uuid)
 
 void ClientTransferManager::onTransferInitDone()
 {
-    Transfer *transfer = qobject_cast<Transfer *>(sender());
+    auto *transfer = qobject_cast<Transfer *>(sender());
     Q_ASSERT(transfer);
     addTransfer(transfer);
 }