diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-02-04 21:42:47 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-02-04 22:32:58 +0900 |
commit | 07ad9d5a17eb91bd3d14f3289474aa83888c869e (patch) | |
tree | a58bff10679fea3f938075b4200bc5f50d534d08 /kexi/formeditor/formIO.cpp | |
parent | 4b35f6531983dd1ebc9cd776977667331bbb38b9 (diff) | |
download | koffice-07ad9d5a17eb91bd3d14f3289474aa83888c869e.tar.gz koffice-07ad9d5a17eb91bd3d14f3289474aa83888c869e.zip |
kexi: replace includehints with includes in .ui files.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kexi/formeditor/formIO.cpp')
-rw-r--r-- | kexi/formeditor/formIO.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp index ced41a09..503814d5 100644 --- a/kexi/formeditor/formIO.cpp +++ b/kexi/formeditor/formIO.cpp @@ -1105,9 +1105,9 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &do void FormIO::cleanClipboard(TQDomElement &uiElement) { - // remove includehints element not needed - if(!uiElement.namedItem("includehints").isNull()) - uiElement.removeChild(uiElement.namedItem("includehints")); + // remove includes element not needed + if(!uiElement.namedItem("includes").isNull()) + uiElement.removeChild(uiElement.namedItem("includes")); // and ensure images and connection are at the end if(!uiElement.namedItem("connections").isNull()) uiElement.insertAfter(uiElement.namedItem("connections"), TQDomNode()); @@ -1484,13 +1484,13 @@ FormIO::addIncludeFileName(const TQString &include, TQDomDocument &domDoc) TQDomElement includes; TQDomElement uiEl = domDoc.namedItem("UI").toElement(); - if(uiEl.namedItem("includehints").isNull()) + if(uiEl.namedItem("includes").isNull()) { - includes = domDoc.createElement("includehints"); + includes = domDoc.createElement("includes"); uiEl.appendChild(includes); } else - includes = uiEl.namedItem("includehints").toElement(); + includes = uiEl.namedItem("includes").toElement(); // Check if this include has already been saved, and return if it is the case for(TQDomNode n = includes.firstChild(); !n.isNull(); n = n.nextSibling()) @@ -1499,10 +1499,12 @@ FormIO::addIncludeFileName(const TQString &include, TQDomDocument &domDoc) return; } - TQDomElement includeHint = domDoc.createElement("includehint"); - includes.appendChild(includeHint); + TQDomElement includeElement = domDoc.createElement("include"); + includes.appendChild(includeElement); + includeElement.setAttribute("location", "global"); + includeElement.setAttribute("impldecl", "in implementation"); TQDomText includeText = domDoc.createTextNode(include); - includeHint.appendChild(includeText); + includeElement.appendChild(includeText); } //////// TQt Designer code: these two functions were copied (and adapted) from TQt Designer for compatibility //////// |