diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-04-16 16:46:36 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-05-09 11:19:43 +0000 |
commit | e0d38ae4140d6101b483fde25158fc94b34a3a64 (patch) | |
tree | 9137897e6cc85c195ff76ebedc9de0d9a447a168 /src/plugins/designer | |
parent | 0c5837a1114ef526727748a0db956f0758597350 (diff) |
Export Wizard values to JavaScript macro
Registers a new function "value('name')", available to the wizard json
files, which returns the value of the variable "name" as a JavaScript
object. So, variables with a string value are actual JavaScript strings,
booleans are booleans, lists are lists, and dictionaries are
dictionaries.
The patch also makes it actually possible to assign JSON lists and
dictionaries to values.
This removes some hacks involving creating complex JavaScript objects
through string substitution.
Change-Id: I4ac6da22bc5bccc9fadee97694c2fa14d44c9307
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/designer')
-rw-r--r-- | src/plugins/designer/formtemplatewizardpage.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/designer/formtemplatewizardpage.cpp b/src/plugins/designer/formtemplatewizardpage.cpp index ce5f3ddb8c2..fb01ddc5f43 100644 --- a/src/plugins/designer/formtemplatewizardpage.cpp +++ b/src/plugins/designer/formtemplatewizardpage.cpp @@ -117,7 +117,7 @@ bool FormTemplateWizardPage::validatePage() QMessageBox::critical(this, tr("%1 - Error").arg(title()), errorMessage); return false; } - wizard()->setProperty("FormContents", m_templateContents.split('\n')); + wizard()->setProperty("FormContents", m_templateContents); return true; } |