The old file is delete, the modified file is inserted and the existing metadata is copied over. The added date is updated to avoid new matches during the update process.
Qt's database and query model requires that both the queries and the database
objects are out of scope before a database connection can safely be removed.
Solution: Properly encapsulate databases and queries in "{ }" and use a string
to cache the connection name for out-of-scope removal.