Browse Source

implemented settings core code

except the translator feature
pull/2/head
Skycoder42 7 years ago
parent
commit
e2e8efc74f
  1. 5
      examples/mvvmcore/SampleCore/drawerviewmodel.cpp
  2. 6
      examples/mvvmcore/SampleCore/sampleviewmodel.cpp
  3. 2
      examples/mvvmcore/SampleCore/sampleviewmodel.h
  4. 2
      examples/mvvmquick/SampleQuick/SampleQuick.pro
  5. 2
      examples/mvvmwidgets/SampleWidgets/SampleWidgets.pro
  6. 2
      src/mvvmcore/translations/qtmvvmcore_de.ts
  7. 2
      src/mvvmcore/translations/qtmvvmcore_template.ts
  8. 4
      src/mvvmsettingscore/mvvmsettingscore.pro
  9. 1
      src/mvvmsettingscore/qtmvvmsettingscore_global.cpp
  10. 11
      src/mvvmsettingscore/settingssetup.h
  11. 52
      src/mvvmsettingscore/settingssetuploader.cpp
  12. 37
      src/mvvmsettingscore/settingssetuploader_p.h
  13. 65
      src/mvvmsettingscore/settingsviewmodel.cpp
  14. 24
      src/mvvmsettingscore/settingsviewmodel.h
  15. 7
      src/mvvmsettingscore/settingsviewmodel_p.h
  16. 30
      src/mvvmsettingscore/translations/qtmvvsettingsmcore_de.ts
  17. 30
      src/mvvmsettingscore/translations/qtmvvsettingsmcore_template.ts
  18. 4
      src/mvvmwidgets/translations/qtmvvmwidgets_de.ts
  19. 4
      src/mvvmwidgets/translations/qtmvvmwidgets_template.ts
  20. 5
      sync.profile

5
examples/mvvmcore/SampleCore/drawerviewmodel.cpp

@ -1,4 +1,5 @@
#include "drawerviewmodel.h"
#include <QtMvvmSettingsCore/SettingsViewModel>
#include "sampleviewmodel.h"
#include "tabviewmodel.h"
@ -9,6 +10,7 @@ DrawerViewModel::DrawerViewModel(QObject *parent) :
{
_navModel->appendRow(new QStandardItem(tr("Main Sample")));
_navModel->appendRow(new QStandardItem(tr("Tab Sample")));
_navModel->appendRow(new QStandardItem(tr("Settings")));
}
DrawerViewModel::~DrawerViewModel()
@ -30,6 +32,9 @@ void DrawerViewModel::open(int index)
case 1:
show<TabViewModel>();
break;
case 2:
show<QtMvvm::SettingsViewModel>();
break;
default:
break;
}

6
examples/mvvmcore/SampleCore/sampleviewmodel.cpp

@ -1,6 +1,7 @@
#include "sampleviewmodel.h"
#include <QDebug>
#include <QtMvvmCore/Messages>
#include <QtMvvmSettingsCore/SettingsViewModel>
#include "resultviewmodel.h"
#include "tabviewmodel.h"
@ -70,6 +71,11 @@ void SampleViewModel::showTabs()
show<TabViewModel>();
}
void SampleViewModel::showSettings()
{
show<QtMvvm::SettingsViewModel>();
}
void SampleViewModel::getInput()
{
QtMvvm::getInput<int>(tr("Random input"),

2
examples/mvvmcore/SampleCore/sampleviewmodel.h

@ -33,6 +33,8 @@ public Q_SLOTS:
void setActive(bool active);
void showTabs();
void showSettings();
void getInput();
void getFiles();
void getResult();

2
examples/mvvmquick/SampleQuick/SampleQuick.pro

@ -1,6 +1,6 @@
TEMPLATE = app
QT += core gui qml quick mvvmquick widgets
QT += core gui qml quick mvvmquick widgets mvvmsettingscore
TARGET = SampleQuick

2
examples/mvvmwidgets/SampleWidgets/SampleWidgets.pro

@ -1,6 +1,6 @@
TEMPLATE = app
QT += core gui widgets mvvmwidgets
QT += core gui widgets mvvmwidgets mvvmsettingscore
TARGET = SampleWidgets

2
src/mvvmcore/translations/qtmvvmcore_de.ts

@ -4,7 +4,7 @@
<context>
<name>MessageConfig</name>
<message>
<location filename="../message.cpp" line="+372"/>
<location filename="../message.cpp" line="+402"/>
<source>%1 Version %2</source>
<translation type="unfinished"></translation>
</message>

2
src/mvvmcore/translations/qtmvvmcore_template.ts

@ -4,7 +4,7 @@
<context>
<name>MessageConfig</name>
<message>
<location filename="../message.cpp" line="+372"/>
<location filename="../message.cpp" line="+402"/>
<source>%1 Version %2</source>
<translation type="unfinished"></translation>
</message>

4
src/mvvmsettingscore/mvvmsettingscore.pro

@ -6,12 +6,12 @@ HEADERS += qtmvvmsettingscore_global.h \
settingsviewmodel.h \
settingssetup.h \
settingssetuploader_p.h \
settingsviewmodel_p.h
settingsviewmodel_p.h
SOURCES += \
settingsviewmodel.cpp \
settingssetuploader.cpp \
qtmvvmsettingscore_global.cpp
qtmvvmsettingscore_global.cpp
TRANSLATIONS += \
translations/qtmvvsettingsmcore_de.ts \

1
src/mvvmsettingscore/qtmvvmsettingscore_global.cpp

@ -11,6 +11,7 @@ namespace {
void qtMvvmSettingsCoreStartup()
{
QtMvvm::registerInterfaceConverter<ISettingsSetupLoader>();
try {
ServiceRegistry::instance()->registerInterface<ISettingsSetupLoader, SettingsSetupLoader>(true);
} catch(ServiceExistsException &e) {

11
src/mvvmsettingscore/settingssetup.h

@ -6,11 +6,14 @@
#include <QtCore/qurl.h>
#include <QtCore/qobject.h>
#include <QtCore/qfileselector.h>
#include <QtCore/qexception.h>
#include "QtMvvmSettingsCore/qtmvvmsettingscore_global.h"
namespace QtMvvm {
namespace SettingsElements {
struct SettingsEntry
{
QString key;
@ -28,6 +31,7 @@ struct SettingsEntry
struct SettingsGroup
{
QString title;
QString tooltip;
QList<SettingsEntry> entries;
@ -67,17 +71,22 @@ struct SettingsSetup
QList<SettingsCategory> categories;
};
}
class SettingsLoaderException : public QException {};
class ISettingsSetupLoader
{
public:
virtual inline ~ISettingsSetupLoader() = default;
virtual SettingsSetup loadSetup(const QString &platform, const QFileSelector *selector, const QString &filePath) const = 0;
virtual SettingsElements::SettingsSetup loadSetup(const QString &filePath, const QString &frontend, const QFileSelector *selector) const = 0;
};
}
#define QtMvvm_ISettingsSetupLoaderIid "de.skycoder42.qtmvvm.settings.core.ISettingsSetupLoader"
Q_DECLARE_INTERFACE(QtMvvm::ISettingsSetupLoader, QtMvvm_ISettingsSetupLoaderIid)
Q_DECLARE_METATYPE(QtMvvm::ISettingsSetupLoader*)
#endif // QTMVVM_SETTINGSSETUP_H

52
src/mvvmsettingscore/settingssetuploader.cpp

@ -1,5 +1,7 @@
#include "settingssetuploader_p.h"
#include <QtCore/QCoreApplication>
using namespace QtMvvm;
using namespace QtMvvm::SettingsElements;
#define throwXmlError(...) throw SettingsXmlException(__VA_ARGS__)
#define throwAttrib(reader, attrib) throwXmlError(reader, "Attribute \"" attrib "\" is required, but was not set!")
@ -11,6 +13,8 @@ using namespace QtMvvm;
#define stringValue(key) attributes().value(QStringLiteral(key)).toString()
#define boolValue(key) attributes().value(QStringLiteral(key)) == QStringLiteral("true")
#define trctx(x) QCoreApplication::translate("qtmvvm_settings_xml", qUtf8Printable(x))
QUrl SettingsSetupLoader::defaultIcon(QStringLiteral("qrc:/qtmvvm/icons/settings.svg"));
SettingsSetupLoader::SettingsSetupLoader(QObject *parent) :
@ -18,7 +22,7 @@ SettingsSetupLoader::SettingsSetupLoader(QObject *parent) :
_cache()
{}
SettingsSetup SettingsSetupLoader::loadSetup(const QString &platform, const QFileSelector *selector, const QString &filePath) const
SettingsSetup SettingsSetupLoader::loadSetup(const QString &filePath, const QString &frontend, const QFileSelector *selector) const
{
SettingsSetup setup;
if(!_cache.contains(filePath)) {
@ -49,10 +53,23 @@ SettingsSetup SettingsSetupLoader::loadSetup(const QString &platform, const QFil
} else
setup = *(_cache.object(filePath));
//todo platform/selector
clearSetup(setup, frontend, selector->allSelectors());
return setup;
}
bool SettingsSetupLoader::event(QEvent *event)
{
//reset the loaded cache on language changes
switch(event->type()) {
case QEvent::LanguageChange:
case QEvent::LocaleChange:
_cache.clear();
break;
default:
break;
}
return setup;
return QObject::event(event);
}
SettingsCategory SettingsSetupLoader::readCategory(QXmlStreamReader &reader) const
@ -64,11 +81,11 @@ SettingsCategory SettingsSetupLoader::readCategory(QXmlStreamReader &reader) con
auto category = createDefaultCategory();
if(reader.hasValue("title"))
category.title = reader.stringValue("title");
category.title = trctx(reader.stringValue("title"));
if(reader.hasValue("icon"))
category.icon = reader.stringValue("icon");
if(reader.hasValue("tooltip"))
category.tooltip = reader.stringValue("tooltip");
category.tooltip = trctx(reader.stringValue("tooltip"));
category.frontends = reader.stringValue("frontends");
category.selectors = reader.stringValue("selectors");
@ -109,11 +126,11 @@ SettingsSection SettingsSetupLoader::readSection(QXmlStreamReader &reader) const
auto section = createDefaultSection();
if(reader.hasValue("title"))
section.title = reader.stringValue("title");
section.title = trctx(reader.stringValue("title"));
if(reader.hasValue("icon"))
section.icon = reader.stringValue("icon");
if(reader.hasValue("tooltip"))
section.tooltip = reader.stringValue("tooltip");
section.tooltip = trctx(reader.stringValue("tooltip"));
section.frontends = reader.stringValue("frontends");
section.selectors = reader.stringValue("selectors");
@ -154,7 +171,9 @@ SettingsGroup SettingsSetupLoader::readGroup(QXmlStreamReader &reader) const
SettingsGroup group;
if(reader.hasValue("title"))
group.title = reader.stringValue("title");
group.title = trctx(reader.stringValue("title"));
if(reader.hasValue("tooltip"))
group.tooltip = trctx(reader.stringValue("tooltip"));
group.frontends = reader.stringValue("frontends");
group.selectors = reader.stringValue("selectors");
@ -200,15 +219,15 @@ SettingsEntry SettingsSetupLoader::readEntry(QXmlStreamReader &reader) const
entry.type = reader.stringValue("type").toLatin1();
if(!reader.hasValue("title"))
throwAttrib(reader, "title");
entry.title = reader.stringValue("title");
entry.tooltip = reader.stringValue("tooltip");
entry.defaultValue = reader.stringValue("default");
entry.title = trctx(reader.stringValue("title"));
entry.tooltip = trctx(reader.stringValue("tooltip"));
entry.defaultValue = trctx(reader.stringValue("default"));
entry.frontends = reader.stringValue("frontends");
entry.selectors = reader.stringValue("selectors");
while(reader.readNextStartElement()) {
if(reader.name() == QStringLiteral("SearchKey"))
entry.searchKeys.append(reader.readElementText());
entry.searchKeys.append(trctx(reader.readElementText()));
else if(reader.name() == QStringLiteral("Property")) {
auto prop = readProperty(reader);
entry.properties.insert(std::get<0>(prop), std::get<1>(prop));
@ -279,7 +298,11 @@ QVariant SettingsSetupLoader::readElement(QXmlStreamReader &reader) const
auto typeId = QMetaType::type(qUtf8Printable(type));
if(typeId == QMetaType::UnknownType)
throwXmlError(reader, "Unknown type: " + type.toUtf8());
QVariant mVariant = reader.readElementText();
QVariant mVariant;
if(reader.boolValue("tr"))
mVariant = trctx(reader.readElementText());
else
mVariant = reader.readElementText();
if(!mVariant.convert(typeId))
throwXmlError(reader, "Failed to convert element data to type: " + type.toUtf8());
@ -358,6 +381,7 @@ bool SettingsSetupLoader::isUsable(const T &configElement, const QString &fronte
SettingsXmlException::SettingsXmlException(const QXmlStreamReader &reader) :
SettingsLoaderException(),
_what(QStringLiteral("XML Error at %1:%2. Error: %3")
.arg(reader.lineNumber())
.arg(reader.columnNumber())
@ -374,6 +398,7 @@ SettingsXmlException::SettingsXmlException(QXmlStreamReader &reader, const QByte
{}
SettingsXmlException::SettingsXmlException(const QFile &fileError) :
SettingsLoaderException(),
_what(QStringLiteral("Failed to open file \"%1\" with error: %2")
.arg(fileError.fileName())
.arg(fileError.errorString())
@ -381,6 +406,7 @@ SettingsXmlException::SettingsXmlException(const QFile &fileError) :
{}
SettingsXmlException::SettingsXmlException(const SettingsXmlException * const other) :
SettingsLoaderException(),
_what(other->_what)
{}

37
src/mvvmsettingscore/settingssetuploader_p.h

@ -7,7 +7,6 @@
#include <QtCore/QIODevice>
#include <QtCore/QCache>
#include <QtCore/QXmlStreamReader>
#include <QtCore/QException>
#include <QtCore/QFile>
#include "qtmvvmsettingscore_global.h"
@ -21,43 +20,45 @@ class SettingsSetupLoader : public QObject, public ISettingsSetupLoader
Q_INTERFACES(QtMvvm::ISettingsSetupLoader)
public:
SettingsSetupLoader(QObject *parent = nullptr);
Q_INVOKABLE SettingsSetupLoader(QObject *parent = nullptr);
SettingsSetup loadSetup(const QString &platform, const QFileSelector *selector, const QString &filePath) const override;
SettingsElements::SettingsSetup loadSetup(const QString &filePath, const QString &frontend, const QFileSelector *selector) const final;
bool event(QEvent *event) override;
private:
static QUrl defaultIcon;
mutable QCache<QString, SettingsSetup> _cache;
mutable QCache<QString, SettingsElements::SettingsSetup> _cache;
//functions to read the settings XML
SettingsCategory readCategory(QXmlStreamReader &reader) const;
SettingsCategory readDefaultCategory(QXmlStreamReader &reader) const;
SettingsElements::SettingsCategory readCategory(QXmlStreamReader &reader) const;
SettingsElements::SettingsCategory readDefaultCategory(QXmlStreamReader &reader) const;
SettingsSection readSection(QXmlStreamReader &reader) const;
SettingsSection readDefaultSection(QXmlStreamReader &reader) const;
SettingsElements::SettingsSection readSection(QXmlStreamReader &reader) const;
SettingsElements::SettingsSection readDefaultSection(QXmlStreamReader &reader) const;
SettingsGroup readGroup(QXmlStreamReader &reader) const;
SettingsGroup readDefaultGroup(QXmlStreamReader &reader) const;
SettingsElements::SettingsGroup readGroup(QXmlStreamReader &reader) const;
SettingsElements::SettingsGroup readDefaultGroup(QXmlStreamReader &reader) const;
SettingsEntry readEntry(QXmlStreamReader &reader) const;
SettingsElements::SettingsEntry readEntry(QXmlStreamReader &reader) const;
SettingsCategory createDefaultCategory() const;
SettingsSection createDefaultSection() const;
SettingsElements::SettingsCategory createDefaultCategory() const;
SettingsElements::SettingsSection createDefaultSection() const;
std::tuple<QString, QVariant> readProperty(QXmlStreamReader &reader) const;
QVariant readElement(QXmlStreamReader &reader) const;
//Functions to filter the elements
void clearSetup(SettingsSetup &setup, const QString &frontend, const QStringList &selectors) const;
void clearCategory(SettingsCategory &category, const QString &frontend, const QStringList &selectors) const;
void clearSection(SettingsSection &section, const QString &frontend, const QStringList &selectors) const;
void clearGroup(SettingsGroup &group, const QString &frontend, const QStringList &selectors) const;
void clearSetup(SettingsElements::SettingsSetup &setup, const QString &frontend, const QStringList &selectors) const;
void clearCategory(SettingsElements::SettingsCategory &category, const QString &frontend, const QStringList &selectors) const;
void clearSection(SettingsElements::SettingsSection &section, const QString &frontend, const QStringList &selectors) const;
void clearGroup(SettingsElements::SettingsGroup &group, const QString &frontend, const QStringList &selectors) const;
template <typename T>
bool isUsable(const T &configElement, const QString &frontend, const QStringList &selectors) const;
};
class SettingsXmlException : public QException
class SettingsXmlException : public SettingsLoaderException
{
public:
SettingsXmlException(const QXmlStreamReader &reader);

65
src/mvvmsettingscore/settingsviewmodel.cpp

@ -7,6 +7,9 @@
using namespace QtMvvm;
const QString SettingsViewModel::paramSettings(QStringLiteral("settings"));
const QString SettingsViewModel::paramSetupFile(QStringLiteral("setupFile"));
SettingsViewModel::SettingsViewModel(QObject *parent) :
ViewModel(parent),
d(new SettingsViewModelPrivate())
@ -14,24 +17,59 @@ SettingsViewModel::SettingsViewModel(QObject *parent) :
SettingsViewModel::~SettingsViewModel() {}
void SettingsViewModel::showSettings(ViewModel *parent)
QVariantHash SettingsViewModel::showParams(QSettings *settings, const QString &setupFile)
{
showSettings(nullptr, {}, parent);
return {
{paramSettings, QVariant::fromValue(settings)},
{paramSetupFile, setupFile}
};
}
void SettingsViewModel::showSettings(QSettings *settings, const QString &setupFile, ViewModel *parent)
bool SettingsViewModel::canRestoreDefaults() const
{
return true;
}
bool SettingsViewModel::canRestoreDefaults() const
MessageConfig SettingsViewModel::restoreConfig() const
{
return true;
MessageConfig config;
config.setType(MessageConfig::TypeMessageBox);
config.setSubType(MessageConfig::SubTypeWarning);
config.setTitle(tr("Restore Defaults?"));
config.setText(tr("All custom changes will be deleted and the defaults restored. <i>This cannot be undone!</i>"));
config.setButtons(MessageConfig::Yes | MessageConfig::No);
return config;
}
ISettingsSetupLoader *SettingsViewModel::settingsSetupLoader() const
{
return d->settingsSetupLoader;
return d->setupLoader;
}
SettingsElements::SettingsSetup SettingsViewModel::loadSetup(const QString &frontend) const
{
QFileSelector selector;
return d->setupLoader->loadSetup(d->setupFile, frontend, &selector);
}
QSettings *SettingsViewModel::settings() const
{
return d->settings;
}
QVariant SettingsViewModel::loadValue(const QString &key, const QVariant &defaultValue) const
{
return d->settings->value(key, defaultValue);
}
void SettingsViewModel::saveValue(const QString &key, const QVariant &value)
{
d->settings->setValue(key, value);
}
void SettingsViewModel::resetValue(const QString &key)
{
d->settings->remove(key);
}
void SettingsViewModel::callAction(const QString &entryId)
@ -41,14 +79,21 @@ void SettingsViewModel::callAction(const QString &entryId)
void SettingsViewModel::setSettingsSetupLoader(ISettingsSetupLoader *settingsSetupLoader)
{
if (d->settingsSetupLoader == settingsSetupLoader)
if (d->setupLoader == settingsSetupLoader)
return;
d->settingsSetupLoader = settingsSetupLoader;
emit settingsSetupLoaderChanged(d->settingsSetupLoader);
d->setupLoader = settingsSetupLoader;
emit settingsSetupLoaderChanged(d->setupLoader);
}
void SettingsViewModel::onInit(const QVariantHash &params)
{
Q_ASSERT_X(d->setupLoader, Q_FUNC_INFO, "settingsSetupLoader must not be null");
d->settings = params.value(paramSettings).value<QSettings*>();
if(!d->settings)
d->settings = new QSettings(this);
d->setupFile = params.value(paramSetupFile).toString();
if(d->setupFile.isEmpty())
d->setupFile = QStringLiteral(":/etc/settings.xml");
}

24
src/mvvmsettingscore/settingsviewmodel.h

@ -5,32 +5,44 @@
#include <QtCore/qscopedpointer.h>
#include <QtMvvmCore/viewmodel.h>
#include <QtMvvmCore/message.h>
#include "QtMvvmSettingsCore/qtmvvmsettingscore_global.h"
#include "QtMvvmSettingsCore/settingssetuploader.h"
#include "QtMvvmSettingsCore/settingssetup.h"
namespace QtMvvm {
class SettingsViewModelPrivate;
class SettingsViewModel : public ViewModel
class Q_MVVMSETTINGSCORE_EXPORT SettingsViewModel : public ViewModel //TODO create qml binding
{
Q_OBJECT
Q_PROPERTY(bool canRestoreDefaults READ canRestoreDefaults CONSTANT)
Q_PROPERTY(QtMvvm::MessageConfig restoreConfig READ restoreConfig CONSTANT)
Q_PROPERTY(QtMvvm::ISettingsSetupLoader* settingsSetupLoader READ settingsSetupLoader WRITE setSettingsSetupLoader NOTIFY settingsSetupLoaderChanged)
QTMVVM_INJECT(QtMvvm::ISettingsSetupLoader*, settingsSetupLoader)
public:
static const QString paramSettings;
static const QString paramSetupFile;
static QVariantHash showParams(QSettings *settings = nullptr, const QString &setupFile = {});
Q_INVOKABLE explicit SettingsViewModel(QObject *parent = nullptr);
~SettingsViewModel();
static void showSettings(ViewModel *parent);
static void showSettings(QSettings *settings = nullptr, const QString &setupFile = {}, ViewModel *parent = nullptr);
virtual bool canRestoreDefaults() const;
virtual QtMvvm::MessageConfig restoreConfig() const;
ISettingsSetupLoader* settingsSetupLoader() const;
SettingsElements::SettingsSetup loadSetup(const QString &frontend) const;
QSettings *settings() const;
QtMvvm::ISettingsSetupLoader* settingsSetupLoader() const;
Q_INVOKABLE virtual QVariant loadValue(const QString &key, const QVariant &defaultValue = {}) const;
Q_INVOKABLE virtual void saveValue(const QString &key, const QVariant &value);
Q_INVOKABLE virtual void resetValue(const QString &key);
public Q_SLOTS:
virtual void callAction(const QString &entryId);

7
src/mvvmsettingscore/settingsviewmodel_p.h

@ -9,7 +9,12 @@ namespace QtMvvm {
class SettingsViewModelPrivate
{
public:
ISettingsSetupLoader *settingsSetupLoader = nullptr;
ISettingsSetupLoader *setupLoader = nullptr;
QSettings *settings = nullptr;
QString setupFile;
SettingsElements::SettingsSetup currentSetup;
};
}

30
src/mvvmsettingscore/translations/qtmvvsettingsmcore_de.ts

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de_DE">
<context>
<name>QtMvvm::SettingsSetupLoader</name>
<message>
<location filename="../settingssetuploader.cpp" line="+244"/>
<source>General Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+8"/>
<source>General</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QtMvvm::SettingsViewModel</name>
<message>
<location filename="../settingsviewmodel.cpp" line="+38"/>
<source>Restore Defaults?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>All custom changes will be deleted and the defaults restored. &lt;i&gt;This cannot be undone!&lt;/i&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

30
src/mvvmsettingscore/translations/qtmvvsettingsmcore_template.ts

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>QtMvvm::SettingsSetupLoader</name>
<message>
<location filename="../settingssetuploader.cpp" line="+244"/>
<source>General Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+8"/>
<source>General</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QtMvvm::SettingsViewModel</name>
<message>
<location filename="../settingsviewmodel.cpp" line="+38"/>
<source>Restore Defaults?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>All custom changes will be deleted and the defaults restored. &lt;i&gt;This cannot be undone!&lt;/i&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

4
src/mvvmwidgets/translations/qtmvvmwidgets_de.ts

@ -4,12 +4,12 @@
<context>
<name>QtMvvm::WidgetsPresenter</name>
<message>
<location filename="../widgetspresenter.cpp" line="+214"/>
<location filename="../widgetspresenter.cpp" line="+213"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+16"/>
<location line="+17"/>
<source>About &amp;Qt</source>
<translation type="unfinished"></translation>
</message>

4
src/mvvmwidgets/translations/qtmvvmwidgets_template.ts

@ -4,12 +4,12 @@
<context>
<name>QtMvvm::WidgetsPresenter</name>
<message>
<location filename="../widgetspresenter.cpp" line="+214"/>
<location filename="../widgetspresenter.cpp" line="+213"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+16"/>
<location line="+17"/>
<source>About &amp;Qt</source>
<translation type="unfinished"></translation>
</message>

5
sync.profile

@ -6,8 +6,9 @@
);
# Force generation of camel case headers for classes inside QtDataSync namespaces
$publicclassregexp = "QtMvvm::(?!__helpertypes).+";
$publicclassregexp = "QtMvvm::(?!__helpertypes|SettingsElements).+";
%classnames = (
"message.h" => "Messages"
"message.h" => "Messages",
"settingssetup.h" => "SettingsElements"
);

Loading…
Cancel
Save