summaryrefslogtreecommitdiffstats
path: root/quanta/utility/tagaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/utility/tagaction.cpp')
-rw-r--r--quanta/utility/tagaction.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/quanta/utility/tagaction.cpp b/quanta/utility/tagaction.cpp
index 3030d661..a4a58a43 100644
--- a/quanta/utility/tagaction.cpp
+++ b/quanta/utility/tagaction.cpp
@@ -332,16 +332,16 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, TQt::Butto
TQString fname = w->url().url();
if ( w->url().protocol() == "file")
fname = w->url().path();
- command.tqreplace("%f", fname );
+ command.replace("%f", fname );
}
pid_t pid = ::getpid();
if (kapp->inherits("KUniqueApplication"))
{
- command.tqreplace("%pid", TQString("unique %1").tqarg(pid));
+ command.replace("%pid", TQString("unique %1").tqarg(pid));
} else
{
- command.tqreplace("%pid", TQString("%1").tqarg(pid));
+ command.replace("%pid", TQString("%1").tqarg(pid));
}
TQString buffer;
TQString inputType = script.attribute("input","none");
@@ -352,9 +352,9 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, TQt::Butto
if ( inputType == "selected" && w->selectionIf) {
buffer = w->selectionIf->selection();
}
- command.tqreplace("%input", buffer);
+ command.replace("%input", buffer);
command = command.stripWhiteSpace();
- int pos = command.tqfind(' ');
+ int pos = command.find(' ');
TQString args;
if (pos != -1)
{
@@ -374,46 +374,46 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, TQt::Butto
pos = 0;
while (pos != -1 )
{
- pos = args.tqfind("%scriptdir");
+ pos = args.find("%scriptdir");
TQString scriptname;
if (pos != -1)
{
- int begin = args.tqfindRev('"', pos);
+ int begin = args.findRev('"', pos);
int end = -1;
if (begin == -1)
{
- begin = args.tqfindRev('\'', pos);
+ begin = args.findRev('\'', pos);
if (begin != -1)
- end = args.tqfind('\'', pos);
+ end = args.find('\'', pos);
} else
{
- end = args.tqfind('"', pos);
+ end = args.find('"', pos);
}
if (begin == -1 || end != -1)
{
- begin = args.tqfindRev(' ', pos);
+ begin = args.findRev(' ', pos);
if (begin == -1)
begin = 0;
- end = args.tqfind(' ', pos);
+ end = args.find(' ', pos);
if (end == -1)
end = args.length();
}
scriptname = args.mid(begin, end - begin).stripWhiteSpace();
- scriptname.tqreplace("%scriptdir","scripts");
+ scriptname.replace("%scriptdir","scripts");
// kdDebug(24000) << "Script name is: |" << scriptname << "|" << endl;
scriptname = " " + locate("appdata", scriptname);
// kdDebug(24000) << "Script found at: " << scriptname << endl;
- args.tqreplace(begin, end - begin, scriptname);
+ args.replace(begin, end - begin, scriptname);
// kdDebug(24000) << "Modified argument list: " << args << endl;
}
}
- int pos = args.tqfind("%projectbase");
+ int pos = args.find("%projectbase");
if (pos != -1)
{
TQString s;
if (Project::ref()->hasProject())
s = Project::ref()->projectBaseURL().url();
- args.tqreplace("%projectbase", s);
+ args.replace("%projectbase", s);
}
TQStringList argsList1 = TQStringList::split(' ', args);
TQStringList argsList;
@@ -586,16 +586,16 @@ bool TagAction::slotActionActivated()
TQString fname = w->url().url();
if ( w->url().protocol() == "file")
fname = w->url().path();
- command.tqreplace("%f", fname );
+ command.replace("%f", fname );
}
pid_t pid = ::getpid();
if (kapp->inherits("KUniqueApplication"))
{
- command.tqreplace("%pid", TQString("unique %1").tqarg(pid));
+ command.replace("%pid", TQString("unique %1").tqarg(pid));
} else
{
- command.tqreplace("%pid", TQString("%1").tqarg(pid));
+ command.replace("%pid", TQString("%1").tqarg(pid));
}
TQString buffer;
TQString inputType = script.attribute("input","none");
@@ -606,9 +606,9 @@ bool TagAction::slotActionActivated()
if ( inputType == "selected" && w->selectionIf) {
buffer = w->selectionIf->selection();
}
- command.tqreplace("%input", buffer);
+ command.replace("%input", buffer);
command = command.stripWhiteSpace();
- int pos = command.tqfind(' ');
+ int pos = command.find(' ');
TQString args;
if (pos != -1)
{
@@ -628,46 +628,46 @@ bool TagAction::slotActionActivated()
pos = 0;
while (pos != -1 )
{
- pos = args.tqfind("%scriptdir");
+ pos = args.find("%scriptdir");
TQString scriptname;
if (pos != -1)
{
- int begin = args.tqfindRev('"', pos);
+ int begin = args.findRev('"', pos);
int end = -1;
if (begin == -1)
{
- begin = args.tqfindRev('\'', pos);
+ begin = args.findRev('\'', pos);
if (begin != -1)
- end = args.tqfind('\'', pos);
+ end = args.find('\'', pos);
} else
{
- end = args.tqfind('"', pos);
+ end = args.find('"', pos);
}
if (begin == -1 || end != -1)
{
- begin = args.tqfindRev(' ', pos);
+ begin = args.findRev(' ', pos);
if (begin == -1)
begin = 0;
- end = args.tqfind(' ', pos);
+ end = args.find(' ', pos);
if (end == -1)
end = args.length();
}
scriptname = args.mid(begin, end - begin).stripWhiteSpace();
- scriptname.tqreplace("%scriptdir","scripts");
+ scriptname.replace("%scriptdir","scripts");
// kdDebug(24000) << "Script name is: |" << scriptname << "|" << endl;
scriptname = " " + locate("appdata", scriptname);
// kdDebug(24000) << "Script found at: " << scriptname << endl;
- args.tqreplace(begin, end - begin, scriptname);
+ args.replace(begin, end - begin, scriptname);
// kdDebug(24000) << "Modified argument list: " << args << endl;
}
}
- int pos = args.tqfind("%projectbase");
+ int pos = args.find("%projectbase");
if (pos != -1)
{
TQString s;
if (Project::ref()->hasProject())
s = Project::ref()->projectBaseURL().url();
- args.tqreplace("%projectbase", s);
+ args.replace("%projectbase", s);
}
TQStringList argsList1 = TQStringList::split(' ', args);
TQStringList argsList;
@@ -767,7 +767,7 @@ void TagAction::slotGetScriptOutput( KProcess *, char *buffer, int buflen )
}
w->insertTag( text );
} else
- if ( scriptOutputDest == "tqreplace" )
+ if ( scriptOutputDest == "replace" )
{
if ( firstOutput )
w->editIf->clear();
@@ -827,7 +827,7 @@ void TagAction::slotGetScriptError( KProcess *, char *buffer, int buflen )
}
w->insertTag( text );
} else
- if ( scriptErrorDest == "tqreplace" )
+ if ( scriptErrorDest == "replace" )
{
if ( firstError )
w->editIf->clear();
@@ -874,7 +874,7 @@ void TagAction::setInputFileName(const TQString& fileName)
TQString TagAction::actionText()
{
TQString t = tag.attribute("text");
- int pos = t.tqfind('&');
+ int pos = t.find('&');
if (pos < (int)t.length()-1 && t[pos+1] != '&')
return t.remove(pos, 1);
else