summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/oblique/query.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun-plugins/oblique/query.cpp')
-rw-r--r--noatun-plugins/oblique/query.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/noatun-plugins/oblique/query.cpp b/noatun-plugins/oblique/query.cpp
index 8c85b59..0727ca6 100644
--- a/noatun-plugins/oblique/query.cpp
+++ b/noatun-plugins/oblique/query.cpp
@@ -171,7 +171,7 @@ TQString QueryGroup::presentation(const File &file) const
uint len=counter.cap(1).length()-1;
// and half them, and remove one more
- format.replace(start-1, len/2+1, "");
+ format.tqreplace(start-1, len/2+1, "");
start=start-1+len/2+find.cap(1).length()+3;
continue;
}
@@ -186,7 +186,7 @@ TQString QueryGroup::presentation(const File &file) const
uint len=counter.cap(1).length();
// and half them
- format.replace(start, len/2, "");
+ format.tqreplace(start, len/2, "");
start=start+len/2;
}
@@ -250,12 +250,12 @@ TQString QueryGroup::presentation(const File &file) const
if (propval.length())
{
propval = prefix+propval+suffix;
- format.replace(start, i+2, propval);
+ format.tqreplace(start, i+2, propval);
start += propval.length();
}
else
{
- format.replace(start, i+2, "");
+ format.tqreplace(start, i+2, "");
}
}
return format;
@@ -283,10 +283,10 @@ Query &Query::operator =(const Query &copy)
if (&copy == this) return *this;
delete mGroupFirst;
mGroupFirst=0;
- if (const QueryGroup *parent = copy.firstChild())
+ if (const QueryGroup *tqparent = copy.firstChild())
{
- mGroupFirst = new QueryGroup(*parent);
- deepCopy(parent->firstChild(), mGroupFirst);
+ mGroupFirst = new QueryGroup(*tqparent);
+ deepCopy(tqparent->firstChild(), mGroupFirst);
}
return *this;
}
@@ -321,7 +321,7 @@ void Query::clear()
TQString Query::load(const TQString &filename)
{
TQFile file(filename);
- unless (file.open(IO_ReadOnly)) return TQString::null;
+ unless (file.open(IO_ReadOnly)) return TQString();
TQDomDocument doc;
doc.setContent(&file);
@@ -346,7 +346,7 @@ TQString Query::load(TQDomElement element)
}
else
{
- return TQString::null;
+ return TQString();
}
// for internationalization:
@@ -383,7 +383,7 @@ void Query::save(const TQString &name, const TQString &filename)
// scourge elimination
TQString data = doc.toString();
TQString old = data;
- while (data.replace(TQRegExp("([\n\r]+)(\t*) "), "\\1\\2\t") != old)
+ while (data.tqreplace(TQRegExp("([\n\r]+)(\t*) "), "\\1\\2\t") != old)
{
old = data;
}
@@ -422,8 +422,8 @@ static void dump(QueryGroup *item, int depth)
{
for (int d = 0; d < depth; d++)
std::cerr << " ";
- std::cerr << "prop: " << item->propertyName().utf8() << " pres: "
- << item->presentation().utf8() << std::endl;
+ std::cerr << "prop: " << item->propertyName().utf8().data() << " pres: "
+ << item->presentation().utf8().data() << std::endl;
dump(item->firstChild(), depth+1);
} while ((item = item->nextSibling()));
@@ -438,17 +438,17 @@ void Query::dump()
-void Query::loadGroup(TQDomElement element, QueryGroup *parent)
+void Query::loadGroup(TQDomElement element, QueryGroup *tqparent)
{
TQDomNode node = element.firstChild();
QueryGroup *group = new QueryGroup;
- if (parent)
+ if (tqparent)
{
- if (QueryGroup *last = parent->lastChild())
+ if (QueryGroup *last = tqparent->lastChild())
last->setNextSibling(group);
else
- parent->setFirstChild(group);
+ tqparent->setFirstChild(group);
}
else
{
@@ -487,7 +487,7 @@ void Query::loadGroup(TQDomElement element, QueryGroup *parent)
group->setOption(QueryGroup::Playable, true);
else if (e.tagName().lower() == "playable")
group->setOption(QueryGroup::Playable, true);
- else if (e.tagName().lower() == "childrenvisible")
+ else if (e.tagName().lower() == "tqchildrenvisible")
group->setOption(QueryGroup::ChildrenVisible, true);
else if (e.tagName().lower() == "autoopen")
group->setOption(QueryGroup::AutoOpen, true);
@@ -500,11 +500,11 @@ void Query::loadGroup(TQDomElement element, QueryGroup *parent)
}
}
-void Query::saveGroup(TQDomElement &parent, QueryGroup *group)
+void Query::saveGroup(TQDomElement &tqparent, QueryGroup *group)
{
- TQDomDocument doc = parent.ownerDocument();
+ TQDomDocument doc = tqparent.ownerDocument();
TQDomElement element = doc.createElement("group");
- parent.appendChild(element);
+ tqparent.appendChild(element);
TQDomElement childe;
TQDomText childtext;
@@ -534,7 +534,7 @@ void Query::saveGroup(TQDomElement &parent, QueryGroup *group)
if (group->option(QueryGroup::Playable))
childe.appendChild(doc.createElement("playable"));
if (group->option(QueryGroup::ChildrenVisible))
- childe.appendChild(doc.createElement("childrenvisible"));
+ childe.appendChild(doc.createElement("tqchildrenvisible"));
if (group->option(QueryGroup::AutoOpen))
childe.appendChild(doc.createElement("autoopen"));
}