Skip to content

Commit

Permalink
contactwriter: make SQL query compatible with Qt 5.12
Browse files Browse the repository at this point in the history
Under Qt 5.12 fields bound by index are anyway addressed by variable
name, so it's important that every variable has a different name (unless
it's really the same variable).
  • Loading branch information
mardy committed May 25, 2021
1 parent b89ddca commit 4722ba9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/engine/contactwriter.cpp
Expand Up @@ -4884,11 +4884,11 @@ ContactsDatabase::Query ContactWriter::bindContactDetails(const QContact &contac
" collectionId = :collectionId,"
" created = :created,"
" modified = :modified,"
" hasPhoneNumber = CASE WHEN :valueKnown = 1 THEN :value ELSE hasPhoneNumber END,"
" hasEmailAddress = CASE WHEN :valueKnown = 1 THEN :value ELSE hasEmailAddress END,"
" hasOnlineAccount = CASE WHEN :valueKnown = 1 THEN :value ELSE hasOnlineAccount END,"
" isOnline = CASE WHEN :valueKnown = 1 THEN :value ELSE isOnline END,"
" isDeactivated = CASE WHEN :valueKnown = 1 THEN :value ELSE isDeactivated END,"
" hasPhoneNumber = CASE WHEN :phoneKnown = 1 THEN :phone ELSE hasPhoneNumber END,"
" hasEmailAddress = CASE WHEN :emailKnown = 1 THEN :email ELSE hasEmailAddress END,"
" hasOnlineAccount = CASE WHEN :accountKnown = 1 THEN :account ELSE hasOnlineAccount END,"
" isOnline = CASE WHEN :onlineKnown = 1 THEN :online ELSE isOnline END,"
" isDeactivated = CASE WHEN :deactivatedKnown = 1 THEN :deactivated ELSE isDeactivated END,"
" changeFlags = %1,"
" unhandledChangeFlags = %2"
" WHERE contactId = :contactId;"
Expand Down

0 comments on commit 4722ba9

Please sign in to comment.