small fix

This commit is contained in:
Martchus 2016-03-01 20:46:40 +01:00
parent b7dc98aefa
commit d49d205d76
1 changed files with 5 additions and 5 deletions

View File

@ -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()) {