summaryrefslogtreecommitdiffstats
path: root/konq-plugins/rsync/rsyncplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins/rsync/rsyncplugin.cpp')
-rw-r--r--konq-plugins/rsync/rsyncplugin.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/konq-plugins/rsync/rsyncplugin.cpp b/konq-plugins/rsync/rsyncplugin.cpp
index b223a93..a0987ff 100644
--- a/konq-plugins/rsync/rsyncplugin.cpp
+++ b/konq-plugins/rsync/rsyncplugin.cpp
@@ -521,7 +521,7 @@ int RsyncPlugin::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) {
buf.truncate(buf.length()-1);
myDebug( << "establishing: got " << buf << endl);
- while (childPid && ((pos = buf.tqfind('\n')) >= 0 || buf.endsWith(":") || buf.endsWith("?"))) {
+ while (childPid && ((pos = buf.find('\n')) >= 0 || buf.endsWith(":") || buf.endsWith("?"))) {
if (m_progressDialogExists == true) {
tqApp->processEvents();
}
@@ -530,8 +530,8 @@ int RsyncPlugin::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) {
buf = buf.mid(pos);
if (str == "\n")
continue;
- //if (str.tqcontains("rsync error:")) {
- if (str.tqcontains("rsync:") || str.tqcontains("failed.") || (str.tqcontains("Could not") && str.endsWith("."))) {
+ //if (str.contains("rsync error:")) {
+ if (str.contains("rsync:") || str.contains("failed.") || (str.contains("Could not") && str.endsWith("."))) {
KMessageBox::error(NULL, str);
}
else if (!str.isEmpty()) {
@@ -590,20 +590,20 @@ int RsyncPlugin::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) {
}
if (m_progressDialogExists == true) {
- if (str.tqcontains("exit()") && str.tqcontains("ICE default IO")) {
+ if (str.contains("exit()") && str.contains("ICE default IO")) {
if (m_progressDialogExists == true) {
m_progressDialog->progressBar()->setValue(m_progressDialog->progressBar()->totalSteps());
}
}
else {
- if (str.tqcontains(", to-check=")) {
+ if (str.contains(", to-check=")) {
// Parse the to-check output
TQString tocheck_out_cur;
TQString tocheck_out_tot;
- tocheck_out_cur = str.mid(str.tqfind(", to-check=") + 11, str.length());
- tocheck_out_tot = tocheck_out_cur.mid(tocheck_out_cur.tqfind("/") + 1, tocheck_out_cur.length());
- tocheck_out_cur = tocheck_out_cur.left(tocheck_out_cur.tqfind("/"));
- tocheck_out_tot = tocheck_out_tot.left(tocheck_out_tot.tqfind(")"));
+ tocheck_out_cur = str.mid(str.find(", to-check=") + 11, str.length());
+ tocheck_out_tot = tocheck_out_cur.mid(tocheck_out_cur.find("/") + 1, tocheck_out_cur.length());
+ tocheck_out_cur = tocheck_out_cur.left(tocheck_out_cur.find("/"));
+ tocheck_out_tot = tocheck_out_tot.left(tocheck_out_tot.find(")"));
m_progressDialog->progressBar()->setTotalSteps(tocheck_out_tot.toInt()-1);
m_progressDialog->progressBar()->setValue(tocheck_out_tot.toInt()-tocheck_out_cur.toInt()-2);
}
@@ -629,7 +629,7 @@ int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len,
buf.truncate(buf.length()-1);
myDebug( << "establishing: got " << buf << endl);
- while (childPid && (((pos = buf.tqfind('\n')) >= 0) || buf.endsWith(":") || buf.endsWith("?") || buf.endsWith("]"))) {
+ while (childPid && (((pos = buf.find('\n')) >= 0) || buf.endsWith(":") || buf.endsWith("?") || buf.endsWith("]"))) {
if (m_progressDialogExists == true) {
tqApp->processEvents();
}
@@ -638,8 +638,8 @@ int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len,
buf = buf.mid(pos);
if (str == "\n")
continue;
- //if (str.tqcontains("rsync error:")) {
- if (str.tqcontains("rsync:") || str.tqcontains("failed.") || (str.tqcontains("Could not") && str.endsWith("."))) {
+ //if (str.contains("rsync error:")) {
+ if (str.contains("rsync:") || str.contains("failed.") || (str.contains("Could not") && str.endsWith("."))) {
KMessageBox::error(NULL, str);
}
else if (!str.isEmpty()) {
@@ -686,7 +686,7 @@ int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len,
return 0;
}
else if (buf.endsWith("?") || buf.endsWith("? []")) {
- buf.tqreplace("[]", "");
+ buf.replace("[]", "");
if (buf.endsWith("? []")) {
int rc = KMessageBox::questionYesNo(NULL, buf);
if (rc == KMessageBox::Yes) {
@@ -717,8 +717,8 @@ int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len,
}
TQString file_name;
file_name = buf;
- file_name.tqreplace("[]", "");
- file_name.tqreplace(TQString("changed "), "");
+ file_name.replace("[]", "");
+ file_name.replace(TQString("changed "), "");
//file_name = file_name.simplifyWhiteSpace();
KDialogBase *dialog= new KDialogBase(i18n("User Intervention Required"), KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel, KDialogBase::Yes, KDialogBase::Cancel, NULL, "warningYesNoCancel", true, true, i18n("Use &Local File"), i18n("Use &Remote File"), i18n("&Ignore"));
int rc = KMessageBox::createKMessageBox(dialog, TQMessageBox::Warning, TQString("<b>") + i18n("WARNING: Both the local and remote file have been modified") + TQString("</b><p>") + i18n("Local") + TQString(": ") + localfolder + TQString("/") + file_name + TQString("<br>") + i18n("Remote") + TQString(": ") + remotepath + TQString("/") + file_name + TQString("<p>") + i18n("Please select the file to duplicate (the other will be overwritten)") + TQString("<br>") + i18n("Or, select Ignore to skip synchronization of this file for now"), TQStringList(), TQString(), NULL, 1);
@@ -735,7 +735,7 @@ int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len,
}
if (m_progressDialogExists == true) {
- if (str.tqcontains("exit()") && str.tqcontains("ICE default IO")) {
+ if (str.contains("exit()") && str.contains("ICE default IO")) {
if (m_progressDialogExists == true) {
m_progressDialog->progressBar()->setFormat("%v / %m");
m_progressDialog->progressBar()->setTotalSteps(2);
@@ -822,7 +822,7 @@ TQString RsyncPlugin::findLocalFolderByName(TQString folderurl)
{
TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.tqreplace(TQString("file://"), TQString(""));
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
if (TQString::compare((*i), folderurl_stripped) == 0) {
i++;
@@ -841,7 +841,7 @@ TQString RsyncPlugin::findSyncMethodByName(TQString folderurl)
{
TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.tqreplace(TQString("file://"), TQString(""));
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
if (TQString::compare((*i), folderurl_stripped) == 0) {
i++;
@@ -860,7 +860,7 @@ TQString RsyncPlugin::findLoginSyncEnabledByName(TQString folderurl)
{
TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.tqreplace(TQString("file://"), TQString(""));
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
if (TQString::compare((*i), folderurl_stripped) == 0) {
i++;
@@ -879,7 +879,7 @@ TQString RsyncPlugin::findLogoutSyncEnabledByName(TQString folderurl)
{
TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.tqreplace(TQString("file://"), TQString(""));
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
if (TQString::compare((*i), folderurl_stripped) == 0) {
i++;
@@ -898,7 +898,7 @@ TQString RsyncPlugin::findTimedSyncEnabledByName(TQString folderurl)
{
TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.tqreplace(TQString("file://"), TQString(""));
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
if (TQString::compare((*i), folderurl_stripped) == 0) {
i++;
@@ -917,7 +917,7 @@ int RsyncPlugin::deleteLocalFolderByName(TQString folderurl)
{
TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.tqreplace(TQString("file://"), TQString(""));
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
if (TQString::compare((*i), folderurl_stripped) == 0) {
i=cfgfolderlist.remove(i);
@@ -937,7 +937,7 @@ int RsyncPlugin::addLocalFolderByName(TQString folderurl, TQString remoteurl, TQ
{
TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.tqreplace(TQString("file://"), TQString(""));
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
cfgfolderlist.append(folderurl);
cfgfolderlist.append(remoteurl);
cfgfolderlist.append(syncmethod);