All public function must lock the mutex. And therefore none of the journal
function may call public function because the mutex is already locked.
So have a public commit that lock the mutex, and a private commitInternal
that assume the mutex is locked
Such as:
Error opening the db: "Driver not loaded Driver not loaded"
or
QSqlDatabasePrivate::removeDatabase: connection '...' is still in use, all queries will cease to wor
We need to clear the QSqlDatabase _db handle before calling removeDatabase.
And we also need to give a different name to different folder database, just to be sure
Since we use a database with the non default name, we need to do that,
otherwise the query is initialized on the default db which is not open
in our case.
I got those warnings for the latter sync runs:
11-19 10:58:15:997 QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries will cease to work.
11-19 10:58:15:997 QSqlDatabasePrivate::addDatabase: duplicate connection name 'qt_sql_default_connection', old connection removed.
If the QSqlQuery class is called with a query in the constructor, the query
is executed immediately. In fact, we executed each query twice before.
Later on we might want to implement a wrapper clas around the query.
As the csync updater opens the database itself, it is cleaner to close
the db before and open it again after csync has finished.
Added a close method to the journal class.
QSettings automatically does escaping. When UTF-8 was set, I
got all kind of problems with the QByteArray for the geometry
and the umlaut in my name for the proxy user.
Normally, the fileid comes with the PUT or the GET.
If it did not comes with the PUT, it means the server do not support
fileid, we should not query it with a useless HEAD.
Also, in case the fileid changes (which it should not) update anyway
to the new fileid in the db
We don't want to fetch the file id in the propagator.
Revert "Put item member variable to base class."
This reverts commit f7aa2aa348.
Revert "Add isValidFileId and getFileIdPropget methods."
This reverts commit ccd254abba.