Commit 1b30734e authored by Adrian Chaves's avatar Adrian Chaves

Fix bad usage of QDateTime.addDays()

The issue was detected by the compiler. addDays() was returning a value that
was being ignored.

According to the Qt documentation, addDays() does not modify the QDateTime
instance where it is called, but instead it returns the QDateTime instance
resulting from the specified change.
parent ff67452a
......@@ -79,14 +79,14 @@ void AkabeiPolkitSQLiteConnectionTest::simpleTest()
const QByteArray md5sum = "balbablsdf323434523534";
const QUrl url("http://foo.com/bar.html");
QDateTime buildDate;
buildDate.addDays(100);
buildDate = buildDate.addDays(100);
const QString arch("i686");
const QString packager("John Doe");
const int flags = 1;
const QUrl screenshot("http://foo.com/bar.jpg");
const Akabei::Package::InstallReason reason = Akabei::Package::ExplicitlyInstalledReason;
QDateTime installDate;
installDate.addDays(200);
installDate = installDate.addDays(200);
try {
// That's gonna be long.
......
......@@ -79,14 +79,14 @@ void AkabeiSQLiteTest::test()
const QByteArray md5sum = "balbablsdf323434523534";
const QUrl url("http://foo.com/bar.html");
QDateTime buildDate;
buildDate.addDays(100);
buildDate = buildDate.addDays(100);
const QString arch("i686");
const QString packager("John Doe");
const int flags = 1;
const QUrl screenshot("http://foo.com/bar.jpg");
const Akabei::Package::InstallReason reason = Akabei::Package::ExplicitlyInstalledReason;
QDateTime installDate;
installDate.addDays(200);
installDate = installDate.addDays(200);
try {
// That's gonna be long.
......
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