summaryrefslogtreecommitdiffstats
path: root/quanta/utility/quantacommon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/utility/quantacommon.cpp')
-rw-r--r--quanta/utility/quantacommon.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/quanta/utility/quantacommon.cpp b/quanta/utility/quantacommon.cpp
index 93421764..6b709ca3 100644
--- a/quanta/utility/quantacommon.cpp
+++ b/quanta/utility/quantacommon.cpp
@@ -41,7 +41,7 @@
#include <ktempdir.h>
#include <ktempfile.h>
-//remove the below ones when KQPasteAction is removed
+//remove the below ones when KTQPasteAction is removed
#include <dcopclient.h>
#include <kdebug.h>
#include <kpopupmenu.h>
@@ -60,7 +60,7 @@
//#include "resource.h"
-QConfig qConfig; //holds the main configuration settings
+TQConfig qConfig; //holds the main configuration settings
TQString tmpDir;
TQRegExp scriptBeginRx;
@@ -144,11 +144,11 @@ bool QuantaCommon::isSingleTag(const TQString& dtdName, const TQString& tag)
if(tag.lower() == "!doctype" || tag.lower() == "?xml")
return true;
- const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName);
if (dtd && !tag.isEmpty())
{
TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
- QTag* qtag = dtd->tagsList->find(searchForTag);
+ TQTag* qtag = dtd->tagsList->tqfind(searchForTag);
if (qtag)
single = qtag->isSingle();
}
@@ -161,11 +161,11 @@ bool QuantaCommon::isOptionalTag(const TQString& dtdName, const TQString& tag)
{
bool optional = false;
- const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName);
if (dtd && !tag.isEmpty())
{
TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
- QTag* qtag = dtd->tagsList->find(searchForTag);
+ TQTag* qtag = dtd->tagsList->tqfind(searchForTag);
if (qtag)
optional = qtag->isOptional();
}
@@ -177,11 +177,11 @@ bool QuantaCommon::isKnownTag(const TQString& dtdName, const TQString& tag)
{
bool known = false;
- const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName);
if (dtd && !tag.isEmpty())
{
TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
- if (dtd->tagsList->find(searchForTag))
+ if (dtd->tagsList->tqfind(searchForTag))
known = true;
}
@@ -192,11 +192,11 @@ AttributeList* QuantaCommon::tagAttributes(const TQString& dtdName, const TQStri
{
AttributeList* attrs = 0L;
- const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName);
if (dtd && !tag.isEmpty())
{
TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
- QTag* qtag = dtd->tagsList->find(searchForTag);
+ TQTag* qtag = dtd->tagsList->tqfind(searchForTag);
if (qtag)
attrs = qtag->attributes();
}
@@ -204,28 +204,28 @@ AttributeList* QuantaCommon::tagAttributes(const TQString& dtdName, const TQStri
return attrs;
}
-/** Returns the QTag object for the tag "tag" from the DTD named "dtdname". */
-QTag* QuantaCommon::tagFromDTD(const TQString& dtdName, const TQString& tag)
+/** Returns the TQTag object for the tag "tag" from the DTD named "dtdname". */
+TQTag* QuantaCommon::tagFromDTD(const TQString& dtdName, const TQString& tag)
{
- const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName);
return tagFromDTD(dtd, tag);
}
-/** Returns the QTag object for the tag "tag" from the DTD. */
-QTag* QuantaCommon::tagFromDTD(const DTDStruct *dtd, const TQString& tag)
+/** Returns the TQTag object for the tag "tag" from the DTD. */
+TQTag* QuantaCommon::tagFromDTD(const DTDStruct *dtd, const TQString& tag)
{
- QTag *qtag = 0;
+ TQTag *qtag = 0;
if (dtd && !tag.isEmpty())
{
TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
- qtag = dtd->tagsList->find(searchForTag);
+ qtag = dtd->tagsList->tqfind(searchForTag);
}
return qtag;
}
-/** Returns the QTag object for the node "node" from node's DTD. */
-QTag* QuantaCommon::tagFromDTD(Node *node)
+/** Returns the TQTag object for the node "node" from node's DTD. */
+TQTag* QuantaCommon::tagFromDTD(Node *node)
{
if(!node || !node->tag)
return 0L;
@@ -311,7 +311,7 @@ bool QuantaCommon::checkMimeGroup(const KURL& url, const TQString& group)
mimetype = mimetype.section('/',-1);
for ( it = list.begin(); it != list.end(); ++it )
{
- if ( ((*it)->name().contains(group)) && ((*it)->name().find(mimetype) != -1)
+ if ( ((*it)->name().tqcontains(group)) && ((*it)->name().tqfind(mimetype) != -1)
) {
status = true;
break;
@@ -381,9 +381,9 @@ TQString QuantaCommon::qUrl(const KURL &url)
/** No descriptions */
void QuantaCommon::dirCreationError(TQWidget *widget, const KURL& url)
{
- KMessageBox::error(widget, i18n("<qt>Cannot create folder<br><b>%1</b>.<br>Check that you have write permission in the parent folder or that the connection to<br><b>%2</b><br> is valid.</qt>")
- .arg(url.prettyURL(0, KURL::StripFileProtocol))
- .arg(url.protocol()+"://"+url.user()+"@"+url.host()));}
+ KMessageBox::error(widget, i18n("<qt>Cannot create folder<br><b>%1</b>.<br>Check that you have write permission in the tqparent folder or that the connection to<br><b>%2</b><br> is valid.</qt>")
+ .tqarg(url.prettyURL(0, KURL::StripFileProtocol))
+ .tqarg(url.protocol()+"://"+url.user()+"@"+url.host()));}
/**
Adds the backslash before the special chars (like ?, *, . ) so the returned
@@ -410,7 +410,7 @@ TQString QuantaCommon::makeRxCompatible(const TQString& s)
TQString str = s;
for (uint i = 0; i < max - 1; i++)
{
- str.replace(rxs[i], strs[i]);
+ str.tqreplace(rxs[i], strs[i]);
}
return str;
@@ -488,7 +488,7 @@ void QuantaCommon::removeCommentsAndQuotes(TQString &str, const DTDStruct *dtd)
} else
{
s = dtd->comments[s];
- l = str.find(s, pos);
+ l = str.tqfind(s, pos);
l = (l == -1) ? str.length() : l;
for (int i = pos; i < l ; i++)
{
@@ -554,7 +554,7 @@ bool QuantaCommon::insideCommentsOrQuotes(int position, const TQString &string,
} else
{
s = dtd->comments[s];
- l = str.find(s, pos);
+ l = str.tqfind(s, pos);
l = (l == -1) ? str.length() : l;
for (int i = pos; i < l ; i++)
{
@@ -596,7 +596,7 @@ DCOPReply QuantaCommon::callDCOPMethod(const TQString& interface, const TQString
if (!kapp->inherits("KUniqueApplication"))
{
pid_t pid = ::getpid();
- app += TQString("-%1").arg(pid);
+ app += TQString("-%1").tqarg(pid);
}
DCOPRef quantaRef(app.utf8(), interface.utf8());
DCOPReply reply;
@@ -633,12 +633,12 @@ void QuantaCommon::normalizeStructure(TQString f,TQStringList& l)
f.remove("\n");
f.remove("\r");
- while(f.contains("<"))
+ while(f.tqcontains("<"))
{
TQString z(f);
- z.truncate(z.find(">")+1);
- z.remove(0,z.find("<"));
- f.remove(0,f.find(">")+1);
+ z.truncate(z.tqfind(">")+1);
+ z.remove(0,z.tqfind("<"));
+ f.remove(0,f.tqfind(">")+1);
l.append(z);
}
}
@@ -704,10 +704,10 @@ bool QuantaCommon::checkOverwrite(const KURL& url, TQWidget *window)
{
bool result = true;
- if (QExtFileInfo::exists(url, false, window))
+ if (TQExtFileInfo::exists(url, false, window))
{
if (KMessageBox::warningContinueCancel(window,
- i18n( "<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>" ).arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString::null, i18n("Overwrite")) == KMessageBox::Cancel)
+ i18n( "<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>" ).tqarg(url.prettyURL(0, KURL::StripFileProtocol)), TQString(), i18n("Overwrite")) == KMessageBox::Cancel)
result = false;
}
@@ -723,7 +723,7 @@ TQStringList QuantaCommon::readPathListEntry(KConfig *config, const TQString &pK
KURL u = KURL::fromPathOrURL(*it);
if (u.isValid() && u.isLocalFile())
{
- u.setPath(QExtFileInfo::canonicalPath(u.path()));
+ u.setPath(TQExtFileInfo::canonicalPath(u.path()));
*it = u.url();
}
}
@@ -736,7 +736,7 @@ TQString QuantaCommon::readPathEntry(KConfig *config, const TQString &pKey)
KURL u = KURL::fromPathOrURL(path);
if (u.isValid() && u.isLocalFile())
{
- u.setPath(QExtFileInfo::canonicalPath(u.path()));
+ u.setPath(TQExtFileInfo::canonicalPath(u.path()));
path = u.url();
}
return path;
@@ -745,9 +745,9 @@ TQString QuantaCommon::readPathEntry(KConfig *config, const TQString &pKey)
TQString QuantaCommon::encodedChar(uint code)
{
- if (replacementMap.contains(code))
- return TQString("%1;").arg(replacementMap[code]);
+ if (replacementMap.tqcontains(code))
+ return TQString("%1;").tqarg(replacementMap[code]);
else
- return TQString("&#%1;").arg(code);
+ return TQString("&#%1;").tqarg(code);
}