forked from qt-creator/qt-creator
qmldesigner: add language to create scene command
and also save the last used language to settings Task-number: QDS-2218 Change-Id: Ib82f7bc755755661183452b32829be3d048d9947 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -40,7 +40,8 @@ CreateSceneCommand::CreateSceneCommand(const QVector<InstanceContainer> &instanc
|
||||
const QVector<AddImportContainer> &importVector,
|
||||
const QVector<MockupTypeContainer> &mockupTypeVector,
|
||||
const QUrl &fileUrl,
|
||||
const QHash<QString, QVariantMap> &edit3dToolStates)
|
||||
const QHash<QString, QVariantMap> &edit3dToolStates,
|
||||
const QString &language)
|
||||
: m_instanceVector(instanceContainer),
|
||||
m_reparentInstanceVector(reparentContainer),
|
||||
m_idVector(idVector),
|
||||
@@ -50,7 +51,8 @@ CreateSceneCommand::CreateSceneCommand(const QVector<InstanceContainer> &instanc
|
||||
m_importVector(importVector),
|
||||
m_mockupTypeVector(mockupTypeVector),
|
||||
m_fileUrl(fileUrl),
|
||||
m_edit3dToolStates(edit3dToolStates)
|
||||
m_edit3dToolStates(edit3dToolStates),
|
||||
m_language(language)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -104,6 +106,11 @@ QHash<QString, QVariantMap> CreateSceneCommand::edit3dToolStates() const
|
||||
return m_edit3dToolStates;
|
||||
}
|
||||
|
||||
QString CreateSceneCommand::language() const
|
||||
{
|
||||
return m_language;
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const CreateSceneCommand &command)
|
||||
{
|
||||
out << command.instances();
|
||||
@@ -116,6 +123,7 @@ QDataStream &operator<<(QDataStream &out, const CreateSceneCommand &command)
|
||||
out << command.mockupTypes();
|
||||
out << command.fileUrl();
|
||||
out << command.edit3dToolStates();
|
||||
out << command.language();
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -132,6 +140,7 @@ QDataStream &operator>>(QDataStream &in, CreateSceneCommand &command)
|
||||
in >> command.m_mockupTypeVector;
|
||||
in >> command.m_fileUrl;
|
||||
in >> command.m_edit3dToolStates;
|
||||
in >> command.m_language;
|
||||
|
||||
return in;
|
||||
}
|
||||
@@ -148,7 +157,8 @@ QDebug operator <<(QDebug debug, const CreateSceneCommand &command)
|
||||
<< "imports: " << command.imports() << ", "
|
||||
<< "mockupTypes: " << command.mockupTypes() << ", "
|
||||
<< "fileUrl: " << command.fileUrl() << ", "
|
||||
<< "edit3dToolStates: " << command.edit3dToolStates() << ")";
|
||||
<< "edit3dToolStates: " << command.edit3dToolStates() << ", "
|
||||
<< "language: " << command.language() << ")";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user