...
 
Commits (2)
......@@ -62,7 +62,7 @@ AkabeiLicense::LicenseType AkabeiLicense::type() const
*/
QString AkabeiLicense::text() const
{
QFile* licenseFile(0);
QFile* licenseFile(nullptr);
QString licensePath( LICENSE_DIR ); /* base path for all license files, set by cmake */
switch(m_type) {
......@@ -70,8 +70,7 @@ QString AkabeiLicense::text() const
licensePath += "GPL_V2";
licenseFile = new QFile(licensePath);
break;
}
}
default:
return QString();
}
......
......@@ -101,10 +101,10 @@ void QueryOperation::start()
}
if (operation == APM::ShowInstalledAsDeps) {
query = query + " InstallReason LIKE " + QString::number((int)Akabei::Package::InstalledAsDependencyReason);
query = query + " InstallReason LIKE " + QString::number(Akabei::Package::InstalledAsDependencyReason);
}
else {
query = query + " InstallReason LIKE " + QString::number((int)Akabei::Package::ExplicitlyInstalledReason);
query = query + " InstallReason LIKE " + QString::number(Akabei::Package::ExplicitlyInstalledReason);
}
showInstalledAs(localDatabase->queryPackages(query));
......@@ -467,7 +467,7 @@ void QueryOperation::showUpgradeable()
void QueryOperation::printFiles(Akabei::Package::List packages)
{
packages.removeAll(0);
packages.removeAll(nullptr);
if (packages.isEmpty()) {
QTextStream err(stderr);
err << QObject::tr("No package found!") << endl;
......
......@@ -54,6 +54,8 @@ void SyncOperation::start()
{
case APM::ForceUpdateDatabases: {
forceDbUpdate = true;
updateDatabases();
break;
}
case APM::UpdateDatabases: {
updateDatabases();
......@@ -299,7 +301,7 @@ void SyncOperation::searchResult(QUuid , QList< Akabei::Package* > packages)
void SyncOperation::listRepo(const QString &repo)
{
AkabeiClient::DatabaseHandler * db = 0;
AkabeiClient::DatabaseHandler * db = nullptr;
foreach (AkabeiClient::DatabaseHandler * database, AkabeiClient::Backend::instance()->databases()) {
if (database->name() == repo) {
db = database;
......
......@@ -28,7 +28,7 @@ void printPackageInformation(Akabei::Package * p, QTextStream &out, bool showLes
/* TODO: discover how to disable these features: reset() doesn't work */
out.setFieldAlignment(QTextStream::AlignLeft);
AkabeiClient::DatabaseHandler * db = 0;
AkabeiClient::DatabaseHandler * db = nullptr;
foreach (AkabeiClient::DatabaseHandler * database, AkabeiClient::Backend::instance()->databases()) {
if (database->database() == p->database()) {
db = database;
......