Refactoring. Add additional constructor for class QSettings.
This commit is contained in:
parent
f978db470d
commit
4ce51e2662
|
@ -238,6 +238,11 @@ VCommonSettings::VCommonSettings(Format format, Scope scope, const QString &orga
|
|||
:QSettings(format, scope, organization, application, parent)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VCommonSettings::VCommonSettings(const QString &fileName, QSettings::Format format, QObject *parent)
|
||||
:QSettings(fileName, format, parent)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VCommonSettings::SharePath(const QString &shareItem)
|
||||
{
|
||||
|
|
|
@ -44,6 +44,7 @@ class VCommonSettings : public QSettings
|
|||
public:
|
||||
VCommonSettings(Format format, Scope scope, const QString &organization, const QString &application = QString(),
|
||||
QObject *parent = nullptr);
|
||||
VCommonSettings(const QString &fileName, Format format, QObject *parent = nullptr);
|
||||
|
||||
static QString SharePath(const QString &shareItem);
|
||||
static QString MultisizeTablesPath();
|
||||
|
|
|
@ -137,6 +137,13 @@ VSettings::VSettings(Format format, Scope scope, const QString &organization, co
|
|||
qRegisterMetaTypeStreamOperators<QMarginsF>("QMarginsF");
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VSettings::VSettings(const QString &fileName, QSettings::Format format, QObject *parent)
|
||||
:VCommonSettings(fileName, format, parent)
|
||||
{
|
||||
qRegisterMetaTypeStreamOperators<QMarginsF>("QMarginsF");
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template <class T>
|
||||
inline T VSettings::ValueOrDef(const QString &setting, const T &defValue) const
|
||||
|
|
|
@ -45,6 +45,7 @@ class VSettings : public VCommonSettings
|
|||
public:
|
||||
VSettings(Format format, Scope scope, const QString &organization, const QString &application = QString(),
|
||||
QObject *parent = nullptr);
|
||||
VSettings(const QString &fileName, Format format, QObject *parent = nullptr);
|
||||
|
||||
QString GetLabelLanguage() const;
|
||||
void SetLabelLanguage(const QString &value);
|
||||
|
|
Loading…
Reference in New Issue
Block a user