Commit decf6c64 authored by Lisa's avatar Lisa

Merge branch 'master' of ssh://git.chakraos.org/akabeicore

parents 71e8dd8c 03eb31e1
......@@ -762,11 +762,11 @@ QStringList Package::hooks()
return d->hooks;
}
//TODO: recheck if this method really has the intended behaviour
bool Package::isValid() const
{
Q_D(const Package);
QReadLocker locker(d->mutex);
return d;
return d != nullptr;
}
bool Package::isInstalled() const
......
......@@ -62,13 +62,13 @@ void AkabeiVersionTest::test()
Akabei::Package::Version v1(version1.toUtf8(), epoch1);
Akabei::Package::Version v2(version2.toUtf8(), epoch2);
bool isDifferent = isMinor | isMajor;
bool isDifferent = isMinor || isMajor;
bool isEqual = !isDifferent;
QCOMPARE(v1 < v2, isMinor);
QCOMPARE(v1 <= v2, isMinor | isEqual);
QCOMPARE(v1 <= v2, isMinor || isEqual);
QCOMPARE(v1 > v2, isMajor);
QCOMPARE(v1 >= v2, isMajor | isEqual);
QCOMPARE(v1 >= v2, isMajor || isEqual);
QCOMPARE(v1 == v2, isEqual);
QCOMPARE(v1 != v2, isDifferent);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment