Skip to content

Commit

Permalink
Merge branch 'reminder' into 'master'
Browse files Browse the repository at this point in the history
[mkcal] Properly save alarm when using 0 offset. Fixes TJC#219642

See merge request mer-core/mkcal!33
  • Loading branch information
pvuorela committed Jan 3, 2020
2 parents 65a681c + dcf44d3 commit f20c086
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sqliteformat.cpp
Expand Up @@ -753,14 +753,14 @@ bool SqliteFormat::Private::modifyAlarm(int rowid, Alarm::Ptr alarm,
sqlite3_bind_int(stmt, index, 0);
}

if (alarm->startOffset().value()) {
if (alarm->hasStartOffset()) {
sqlite3_bind_int(stmt, index, alarm->startOffset().asSeconds());
relation = QString("startTriggerRelation").toUtf8();
sqlite3_bind_text(stmt, index, relation.constData(), relation.length(), SQLITE_STATIC);
sqlite3_bind_int(stmt, index, 0); // time
sqlite3_bind_int(stmt, index, 0); // localtime
sqlite3_bind_text(stmt, index, "", 0, SQLITE_STATIC);
} else if (alarm->endOffset().value()) {
} else if (alarm->hasEndOffset()) {
sqlite3_bind_int(stmt, index, alarm->endOffset().asSeconds());
relation = QString("endTriggerRelation").toUtf8();
sqlite3_bind_text(stmt, index, relation.constData(), relation.length(), SQLITE_STATIC);
Expand Down

0 comments on commit f20c086

Please sign in to comment.