From d49d205d76a277c8b06497e20888de696b4e40aa Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 1 Mar 2016 20:46:40 +0100 Subject: [PATCH] small fix --- alpm/manager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/alpm/manager.cpp b/alpm/manager.cpp index f758bfe..dd846a6 100644 --- a/alpm/manager.cpp +++ b/alpm/manager.cpp @@ -483,15 +483,15 @@ void Manager::initAlpmDataBases() if(localDatabase()) { QObject::connect(localDatabase(), &AlpmDatabase::initialized, bind(&Manager::computeRequiredBy, this, localDatabase())); } - for(auto &syncDbEntry : m_syncDbMap) { - QObject::connect(syncDbEntry.second, &AlpmDatabase::initialized, bind(&Manager::computeRequiredBy, this, syncDbEntry.second)); + for(auto &syncDb : m_syncDbs) { + QObject::connect(syncDb.get(), &AlpmDatabase::initialized, bind(&Manager::computeRequiredBy, this, syncDb.get())); } } else { if(localDatabase()) { QObject::connect(localDatabase(), &AlpmDatabase::initialized, this, &Manager::emitUpdatesAvailable); } - for(auto &syncDbEntry : m_syncDbMap) { - QObject::connect(syncDbEntry.second, &AlpmDatabase::initialized, this, &Manager::emitUpdatesAvailable); + for(auto &syncDb : m_syncDbs) { + QObject::connect(syncDb.get(), &AlpmDatabase::initialized, this, &Manager::emitUpdatesAvailable); } } @@ -527,7 +527,7 @@ void Manager::initAlpmDataBases() cerr << endl << shchar << "Unable to initialize ALPM database [" << loader->database()->name().toLocal8Bit().data() << "]" << endl; // TODO: print the cause of the problem } - delete loader; + //delete loader; the repo has ownership } } if(m_config.isVerbose() || m_config.runServer()) {