diff options
| author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 | 
|---|---|---|
| committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 | 
| commit | 36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 (patch) | |
| tree | 629d3942958745660e36c30b0d6139af9459c0f8 /quanta/utility/tagaction.cpp | |
| parent | 929d7ae4f69d62b8f1f6d3506adf75f017753935 (diff) | |
| download | tdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.tar.gz tdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.zip  | |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/utility/tagaction.cpp')
| -rw-r--r-- | quanta/utility/tagaction.cpp | 70 | 
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  | 
