summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2022-02-04 21:42:47 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2022-02-04 22:58:08 +0900
commita7fd7623e104a599316c3b06b6ad048baa95835d (patch)
tree3bf9ffe5e9abdbb810e9a753aa66310758736a58
parent582c4c4d677108c19c4d68778d2c6e914b720fd2 (diff)
downloadkoffice-a7fd7623e104a599316c3b06b6ad048baa95835d.tar.gz
koffice-a7fd7623e104a599316c3b06b6ad048baa95835d.zip
kexi: replace includehints with includes in .ui files.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 07ad9d5a17eb91bd3d14f3289474aa83888c869e)
-rw-r--r--kexi/formeditor/formIO.cpp20
-rw-r--r--kexi/formeditor/formIO.h2
2 files changed, 12 insertions, 10 deletions
diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp
index 3d6fc8cab..510965ffc 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 ////////
diff --git a/kexi/formeditor/formIO.h b/kexi/formeditor/formIO.h
index fbadde7fc..9717c0305 100644
--- a/kexi/formeditor/formIO.h
+++ b/kexi/formeditor/formIO.h
@@ -204,7 +204,7 @@ class KFORMEDITOR_EXPORT FormIO : public TQObject
static void readChildNodes(ObjectTreeItem *tree, Container *container,
const TQDomElement &el, TQWidget *w);
- /*! Adds an include file name to be saved in the "includehints" part of .ui file,
+ /*! Adds an include file name to be saved in the "includes" part of .ui file,
which is needed by uic. */
static void addIncludeFileName(const TQString &include, TQDomDocument &domDoc);