This repository was archived by the owner on Mar 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ const QLoggingCategory &Defaults::loggingCategory() const
3333 return d->logCat ;
3434}
3535
36+ QString Defaults::setupName () const
37+ {
38+ return d->setupName ;
39+ }
40+
3641QDir Defaults::storageDir () const
3742{
3843 return d->storageDir ;
@@ -74,6 +79,7 @@ void Defaults::releaseDatabase()
7479
7580
7681QtDataSync::DefaultsPrivate::DefaultsPrivate (const QString &setupName, const QDir &storageDir) :
82+ setupName(setupName),
7783 storageDir(storageDir),
7884 dbRefCounter(0 ),
7985 catName(" qtdatasync." + setupName.toUtf8()),
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ class Q_DATASYNC_EXPORT Defaults : public QObject
2929 // ! A logging category for this setup
3030 const QLoggingCategory &loggingCategory () const ;
3131
32+ // ! Returns the name of the current setup
33+ QString setupName () const ;
3234 // ! Returns the storage directory
3335 QDir storageDir () const ;
3436 // ! Returns an instance of QSettings owned by defaults
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class Q_DATASYNC_EXPORT DefaultsPrivate
1515
1616 DefaultsPrivate (const QString &setupName, const QDir &storageDir);
1717
18+ QString setupName;
1819 QDir storageDir;
1920 quint64 dbRefCounter;
2021 QByteArray catName;
You can’t perform that action at this time.
0 commit comments