[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kreport] src/wrtembed: Always save the interpreter as javascript if empty
From:       Adam Pigg <null () kde ! org>
Date:       2017-05-25 21:58:48
Message-ID: E1dE0mO-0007lG-Je () code ! kde ! org
[Download RAW message or body]

Git commit 108881ef2b2416835c390a2a499a7c5ed1b7efd1 by Adam Pigg.
Committed on 25/05/2017 at 21:56.
Pushed by piggz into branch 'master'.

Always save the interpreter as javascript if empty

Summary: On a new report, the old interpreter will not be set, so always save as javascript

Reviewers: staniek

Reviewed By: staniek

Tags: #kreport

Maniphest Tasks: T6183

Differential Revision: https://phabricator.kde.org/D5965

M  +3    -0    src/wrtembed/KReportDesigner.cpp

https://commits.kde.org/kreport/108881ef2b2416835c390a2a499a7c5ed1b7efd1

diff --git a/src/wrtembed/KReportDesigner.cpp b/src/wrtembed/KReportDesigner.cpp
index ca1ed01..f70981a 100644
--- a/src/wrtembed/KReportDesigner.cpp
+++ b/src/wrtembed/KReportDesigner.cpp
@@ -354,6 +354,9 @@ QDomElement KReportDesigner::document() const
     content.appendChild(propertyToElement(&doc, d->title));
 
 #ifdef KREPORT_SCRIPTING
+    if (d->originalInterpreter.isEmpty()) {
+        d->originalInterpreter = QLatin1String("javascript");
+    }
     saveInterpreter = d->originalInterpreter;
 
     if (!d->script->value().toString().isEmpty()) {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic