[Pkg-owncloud-commits] [owncloud-client] 62/211: JournalDb: Do not use static variable for path.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:26 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 46fd79604dea157d33494eb37360a19ad14a7897
Author: Klaas Freitag <freitag at owncloud.com>
Date: Mon Oct 13 14:49:53 2014 +0200
JournalDb: Do not use static variable for path.
---
src/mirall/socketapi.cpp | 4 ++--
src/mirall/syncjournaldb.cpp | 2 --
src/mirall/syncjournaldb.h | 4 ++--
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/mirall/socketapi.cpp b/src/mirall/socketapi.cpp
index e7bec61..05b70af 100644
--- a/src/mirall/socketapi.cpp
+++ b/src/mirall/socketapi.cpp
@@ -119,7 +119,7 @@ SyncJournalFileRecord dbFileRecord_capi( Folder *folder, QString fileName )
{
// FIXME: Check if this stat is really needed, or is it done in the caller?
- if( !folder ) {
+ if( !(folder && folder->journalDb()) ) {
return SyncJournalFileRecord();
}
@@ -128,7 +128,7 @@ SyncJournalFileRecord dbFileRecord_capi( Folder *folder, QString fileName )
fileName.remove(0, folder->path().length());
}
- QString dbFileName = SyncJournalDb::databaseFilePath();
+ QString dbFileName = folder->journalDb()->databaseFilePath();
sqlite3 *db = NULL;
sqlite3_stmt *stmt = NULL;
diff --git a/src/mirall/syncjournaldb.cpp b/src/mirall/syncjournaldb.cpp
index c33c1af..71dd849 100644
--- a/src/mirall/syncjournaldb.cpp
+++ b/src/mirall/syncjournaldb.cpp
@@ -30,8 +30,6 @@
namespace Mirall {
-QString SyncJournalDb::_dbFile;
-
SyncJournalDb::SyncJournalDb(const QString& path, QObject *parent) :
QObject(parent), _transaction(0), _possibleUpgradeFromMirall_1_5(false)
{
diff --git a/src/mirall/syncjournaldb.h b/src/mirall/syncjournaldb.h
index a4cab96..ad67f12 100644
--- a/src/mirall/syncjournaldb.h
+++ b/src/mirall/syncjournaldb.h
@@ -44,7 +44,7 @@ public:
int getFileRecordCount();
bool exists();
- static QString databaseFilePath();
+ QString databaseFilePath();
static qint64 getPHash(const QString& );
void updateBlacklistEntry( const SyncJournalBlacklistRecord& item );
@@ -118,7 +118,7 @@ private:
bool checkConnect();
QSqlDatabase _db;
- static QString _dbFile;
+ QString _dbFile;
QMutex _mutex; // Public functions are protected with the mutex.
int _transaction;
bool _possibleUpgradeFromMirall_1_5;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list