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.cpp224
1 files changed, 112 insertions, 112 deletions
diff --git a/konq-plugins/rsync/rsyncplugin.cpp b/konq-plugins/rsync/rsyncplugin.cpp
index 3c4ae1a..81a5253 100644
--- a/konq-plugins/rsync/rsyncplugin.cpp
+++ b/konq-plugins/rsync/rsyncplugin.cpp
@@ -50,23 +50,23 @@
#include <util.h>
#endif
-#include <qfile.h>
-#include <qtimer.h>
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
-#include <qiconview.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
+#include <tqiconview.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -106,8 +106,8 @@ typedef KGenericFactory<RsyncPlugin> RsyncPluginFactory;
K_EXPORT_COMPONENT_FACTORY(librsyncplugin,
RsyncPluginFactory("rsyncplugin"))
-RsyncPlugin::RsyncPlugin (QObject* parent, const char* name,
- const QStringList&)
+RsyncPlugin::RsyncPlugin (TQObject* parent, const char* name,
+ const TQStringList&)
:KParts::Plugin (parent, name),
m_pSyncNow(0),
m_pSyncSetup(0)
@@ -125,10 +125,10 @@ RsyncPlugin::RsyncPlugin (QObject* parent, const char* name,
m_pSyncSetup->setIcon("remotesyncconfig");
m_pSyncNow->setEnabled (false);
- connect (m_part, SIGNAL(aboutToOpenURL()), SLOT(slotOpenURL()));
+ connect (m_part, TQT_SIGNAL(aboutToOpenURL()), TQT_SLOT(slotOpenURL()));
- connect(m_pSyncNow, SIGNAL(activated()), this, SLOT(slotSync()));
- connect(m_pSyncSetup, SIGNAL(activated()), this, SLOT(slotSetup()));
+ connect(m_pSyncNow, TQT_SIGNAL(activated()), this, TQT_SLOT(slotSync()));
+ connect(m_pSyncSetup, TQT_SIGNAL(activated()), this, TQT_SLOT(slotSetup()));
loadSettings();
@@ -221,10 +221,10 @@ close_master:
/**
creates the unidirectional sync subprocess
*/
-bool RsyncPlugin::syncUnidirectional(QString synccommand, QString syncflags, int parameter_order, QString localfolder, QString remotepath) {
+bool RsyncPlugin::syncUnidirectional(TQString synccommand, TQString syncflags, int parameter_order, TQString localfolder, TQString remotepath) {
int fd[2];
int rc, flags;
- thisFn = QString::null;
+ thisFn = TQString::null;
rc = open_pty_pair(fd);
if (rc == -1) {
@@ -242,12 +242,12 @@ bool RsyncPlugin::syncUnidirectional(QString synccommand, QString syncflags, int
}
if (childPid == 0) {
// Create the rsync command to run
- QString execstring;
+ TQString execstring;
if (parameter_order == 0) {
- execstring = synccommand + syncflags + localfolder + QString("/ ") + remotepath;
+ execstring = synccommand + syncflags + localfolder + TQString("/ ") + remotepath;
}
else {
- execstring = synccommand + syncflags + remotepath + QString("/ ") + localfolder;
+ execstring = synccommand + syncflags + remotepath + TQString("/ ") + localfolder;
}
// taken from konsole, see TEPty.C for details
@@ -358,10 +358,10 @@ bool RsyncPlugin::syncUnidirectional(QString synccommand, QString syncflags, int
/**
creates the bidirectional sync subprocess
*/
-bool RsyncPlugin::syncBidirectional(QString synccommand, QString syncflags, int parameter_order, QString localfolder, QString remotepath) {
+bool RsyncPlugin::syncBidirectional(TQString synccommand, TQString syncflags, int parameter_order, TQString localfolder, TQString remotepath) {
int fd[2];
int rc, flags;
- thisFn = QString::null;
+ thisFn = TQString::null;
// Check for and remove the trailing slash in localfolder
if (localfolder.endsWith("/")) {
@@ -384,8 +384,8 @@ bool RsyncPlugin::syncBidirectional(QString synccommand, QString syncflags, int
}
if (childPid == 0) {
// Create the rsync command to run
- QString execstring;
- execstring = synccommand + syncflags + localfolder + QString(" ") + remotepath;
+ TQString execstring;
+ execstring = synccommand + syncflags + localfolder + TQString(" ") + remotepath;
// taken from konsole, see TEPty.C for details
// note: if we're running on socket pairs,
@@ -498,7 +498,7 @@ writes one chunk of data to stdin of child process
void RsyncPlugin::writeChild(const char *buf, KIO::fileoffset_t len) {
if (outBufPos >= 0 && outBuf) {
#if 0
- QString debug;
+ TQString debug;
debug.setLatin1(outBuf,outBufLen);
if (len > 0) myDebug( << "write request while old one is pending, throwing away input (" << outBufLen << "," << outBufPos << "," << debug.left(10) << "...)" << endl);
#endif
@@ -513,7 +513,7 @@ void RsyncPlugin::writeChild(const char *buf, KIO::fileoffset_t len) {
manages initial communication setup including password queries
*/
int RsyncPlugin::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) {
- QString buf;
+ TQString buf;
buf.setLatin1(buffer,len);
int pos;
// Strip trailing whitespace
@@ -526,7 +526,7 @@ int RsyncPlugin::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) {
qApp->processEvents();
}
pos++;
- QString str = buf.left(pos);
+ TQString str = buf.left(pos);
buf = buf.mid(pos);
if (str == "\n")
continue;
@@ -544,7 +544,7 @@ int RsyncPlugin::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) {
m_progressDialog->setAutoClose(true);
m_progressDialog->progressBar()->setTotalSteps(2);
m_progressDialog->progressBar()->setValue(1);
- connect (m_progressDialog, SIGNAL(cancelClicked()), SLOT(slotRsyncCancelled()));
+ connect (m_progressDialog, TQT_SIGNAL(cancelClicked()), TQT_SLOT(slotRsyncCancelled()));
m_progressDialog->show();
m_progressDialogExists = true;
}
@@ -557,25 +557,25 @@ int RsyncPlugin::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) {
} else if (!connectionPassword.isEmpty()) {
myDebug( << "sending cpass" << endl);
connectionAuth.password = connectionPassword+"\n";
- connectionPassword = QString::null;
+ connectionPassword = TQString::null;
writeChild(connectionAuth.password.latin1(),connectionAuth.password.length());
} else {
myDebug( << "sending mpass" << endl);
connectionAuth.prompt = thisFn+buf;
- connectionAuth.password = QString::null; // don't prefill
- QCString thispass;
- if (KPasswordDialog::getPassword (thispass, i18n("Remote authorization required") + QString("\n") + i18n("Please input") + QString(" ") + QString(buf), NULL) != 1) {
+ connectionAuth.password = TQString::null; // don't prefill
+ TQCString thispass;
+ if (KPasswordDialog::getPassword (thispass, i18n("Remote authorization required") + TQString("\n") + i18n("Please input") + TQString(" ") + TQString(buf), NULL) != 1) {
shutdownConnection(true, false);
return -1;
}
else {
- connectionAuth.password = QString(thispass);
+ connectionAuth.password = TQString(thispass);
}
connectionAuth.password += "\n";
myDebug( << "sending pass" << endl);
writeChild(connectionAuth.password.latin1(),connectionAuth.password.length());
}
- thisFn = QString::null;
+ thisFn = TQString::null;
return 0;
}
else if (buf.endsWith("?")) {
@@ -585,7 +585,7 @@ int RsyncPlugin::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) {
} else {
writeChild("no\n",3);
}
- thisFn = QString::null;
+ thisFn = TQString::null;
return 0;
}
@@ -598,8 +598,8 @@ int RsyncPlugin::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) {
else {
if (str.contains(", to-check=")) {
// Parse the to-check output
- QString tocheck_out_cur;
- QString tocheck_out_tot;
+ TQString tocheck_out_cur;
+ TQString tocheck_out_tot;
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("/"));
@@ -620,8 +620,8 @@ int RsyncPlugin::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) {
/**
manages initial communication setup including password queries
*/
-int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len, QString localfolder, QString remotepath) {
- QString buf;
+int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len, TQString localfolder, TQString remotepath) {
+ TQString buf;
buf.setLatin1(buffer,len);
int pos;
// Strip trailing whitespace
@@ -634,7 +634,7 @@ int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len,
qApp->processEvents();
}
pos++;
- QString str = buf.left(pos);
+ TQString str = buf.left(pos);
buf = buf.mid(pos);
if (str == "\n")
continue;
@@ -651,7 +651,7 @@ int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len,
m_progressDialog->progressBar()->setFormat("%v / %m");
m_progressDialog->progressBar()->setTotalSteps(0);
m_progressDialog->setAutoClose(true);
- connect (m_progressDialog, SIGNAL(cancelClicked()), SLOT(slotUnisonCancelled()));
+ connect (m_progressDialog, TQT_SIGNAL(cancelClicked()), TQT_SLOT(slotUnisonCancelled()));
m_progressDialog->show();
m_progressDialogExists = true;
}
@@ -664,25 +664,25 @@ int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len,
} else if (!connectionPassword.isEmpty()) {
myDebug( << "sending cpass" << endl);
connectionAuth.password = connectionPassword+"\n";
- connectionPassword = QString::null;
+ connectionPassword = TQString::null;
writeChild(connectionAuth.password.latin1(),connectionAuth.password.length());
} else {
myDebug( << "sending mpass" << endl);
connectionAuth.prompt = thisFn+buf;
- connectionAuth.password = QString::null; // don't prefill
- QCString thispass;
- if (KPasswordDialog::getPassword (thispass, i18n("Remote authorization required") + QString("\n") + i18n("Please input") + QString(" ") + QString(buf), NULL) != 1) {
+ connectionAuth.password = TQString::null; // don't prefill
+ TQCString thispass;
+ if (KPasswordDialog::getPassword (thispass, i18n("Remote authorization required") + TQString("\n") + i18n("Please input") + TQString(" ") + TQString(buf), NULL) != 1) {
slotUnisonCancelled();
return -1;
}
else {
- connectionAuth.password = QString(thispass);
+ connectionAuth.password = TQString(thispass);
}
connectionAuth.password += "\n";
myDebug( << "sending pass" << endl);
writeChild(connectionAuth.password.latin1(),connectionAuth.password.length());
}
- thisFn = QString::null;
+ thisFn = TQString::null;
return 0;
}
else if (buf.endsWith("?") || buf.endsWith("? []")) {
@@ -703,7 +703,7 @@ int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len,
writeChild("no\n",3);
}
}
- thisFn = QString::null;
+ thisFn = TQString::null;
buf = "";
return 0;
}
@@ -715,13 +715,13 @@ int RsyncPlugin::establishConnectionUnison(char *buffer, KIO::fileoffset_t len,
currentPos = m_progressDialog->progressBar()->progress();
m_progressDialog->progressBar()->setProgress(++currentPos);
}
- QString file_name;
+ TQString file_name;
file_name = buf;
file_name.replace("[]", "");
- file_name.replace(QString("changed "), "");
+ 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, QMessageBox::Warning, QString("<b>") + i18n("WARNING: Both the local and remote file have been modified") + QString("</b><p>") + i18n("Local") + QString(": ") + localfolder + QString("/") + file_name + QString("<br>") + i18n("Remote") + QString(": ") + remotepath + QString("/") + file_name + QString("<p>") + i18n("Please select the file to duplicate (the other will be overwritten)") + QString("<br>") + i18n("Or, select Ignore to skip synchronization of this file for now"), QStringList(), QString::null, NULL, 1);
+ 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, NULL, 1);
if (rc == KDialogBase::Yes) {
writeChild(">\n",3);
}
@@ -794,11 +794,11 @@ void RsyncPlugin::saveSettings()
KConfig cfg ("rsyncrc", false, false);
cfg.setGroup ("General");
- QString longstring = QString("");
- for (QStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end();) {
+ TQString longstring = TQString("");
+ for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end();) {
longstring = longstring + (*i);
i++;
- longstring = longstring + QString(";");
+ longstring = longstring + TQString(";");
}
cfg.writeEntry("LocalFolders", longstring);
@@ -818,13 +818,13 @@ void RsyncPlugin::loadSettings()
m_bSettingsLoaded = true;
}
-QString RsyncPlugin::findLocalFolderByName(QString folderurl)
+TQString RsyncPlugin::findLocalFolderByName(TQString folderurl)
{
- QString folderurl_stripped;
+ TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.replace(QString("file://"), QString(""));
- for (QStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
- if (QString::compare((*i), folderurl_stripped) == 0) {
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
+ for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
+ if (TQString::compare((*i), folderurl_stripped) == 0) {
i++;
return (*i);
i++;
@@ -837,13 +837,13 @@ QString RsyncPlugin::findLocalFolderByName(QString folderurl)
return NULL;
}
-QString RsyncPlugin::findSyncMethodByName(QString folderurl)
+TQString RsyncPlugin::findSyncMethodByName(TQString folderurl)
{
- QString folderurl_stripped;
+ TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.replace(QString("file://"), QString(""));
- for (QStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
- if (QString::compare((*i), folderurl_stripped) == 0) {
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
+ for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
+ if (TQString::compare((*i), folderurl_stripped) == 0) {
i++;
i++;
return (*i);
@@ -856,13 +856,13 @@ QString RsyncPlugin::findSyncMethodByName(QString folderurl)
return NULL;
}
-QString RsyncPlugin::findLoginSyncEnabledByName(QString folderurl)
+TQString RsyncPlugin::findLoginSyncEnabledByName(TQString folderurl)
{
- QString folderurl_stripped;
+ TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.replace(QString("file://"), QString(""));
- for (QStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
- if (QString::compare((*i), folderurl_stripped) == 0) {
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
+ for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
+ if (TQString::compare((*i), folderurl_stripped) == 0) {
i++;
i++;
i++;
@@ -875,13 +875,13 @@ QString RsyncPlugin::findLoginSyncEnabledByName(QString folderurl)
return NULL;
}
-QString RsyncPlugin::findLogoutSyncEnabledByName(QString folderurl)
+TQString RsyncPlugin::findLogoutSyncEnabledByName(TQString folderurl)
{
- QString folderurl_stripped;
+ TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.replace(QString("file://"), QString(""));
- for (QStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
- if (QString::compare((*i), folderurl_stripped) == 0) {
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
+ for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
+ if (TQString::compare((*i), folderurl_stripped) == 0) {
i++;
i++;
i++;
@@ -894,13 +894,13 @@ QString RsyncPlugin::findLogoutSyncEnabledByName(QString folderurl)
return NULL;
}
-QString RsyncPlugin::findTimedSyncEnabledByName(QString folderurl)
+TQString RsyncPlugin::findTimedSyncEnabledByName(TQString folderurl)
{
- QString folderurl_stripped;
+ TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.replace(QString("file://"), QString(""));
- for (QStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
- if (QString::compare((*i), folderurl_stripped) == 0) {
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
+ for (TQStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
+ if (TQString::compare((*i), folderurl_stripped) == 0) {
i++;
i++;
i++;
@@ -913,13 +913,13 @@ QString RsyncPlugin::findTimedSyncEnabledByName(QString folderurl)
return NULL;
}
-int RsyncPlugin::deleteLocalFolderByName(QString folderurl)
+int RsyncPlugin::deleteLocalFolderByName(TQString folderurl)
{
- QString folderurl_stripped;
+ TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.replace(QString("file://"), QString(""));
- for (QStringList::Iterator i(cfgfolderlist.begin()); i != cfgfolderlist.end(); ++i) {
- if (QString::compare((*i), folderurl_stripped) == 0) {
+ 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);
i=cfgfolderlist.remove(i);
i=cfgfolderlist.remove(i);
@@ -933,11 +933,11 @@ int RsyncPlugin::deleteLocalFolderByName(QString folderurl)
return 1;
}
-int RsyncPlugin::addLocalFolderByName(QString folderurl, QString remoteurl, QString syncmethod, QString excludelist, QString sync_on_login, QString sync_on_logout, QString sync_timed_interval)
+int RsyncPlugin::addLocalFolderByName(TQString folderurl, TQString remoteurl, TQString syncmethod, TQString excludelist, TQString sync_on_login, TQString sync_on_logout, TQString sync_timed_interval)
{
- QString folderurl_stripped;
+ TQString folderurl_stripped;
folderurl_stripped = folderurl;
- folderurl_stripped.replace(QString("file://"), QString(""));
+ folderurl_stripped.replace(TQString("file://"), TQString(""));
cfgfolderlist.append(folderurl);
cfgfolderlist.append(remoteurl);
cfgfolderlist.append(syncmethod);
@@ -956,19 +956,19 @@ void RsyncPlugin::slotOpenURL ()
{
// See if this URL is "/", "/dev", or "/proc", and disable sync if so
// Also disable sync for non-"file://" URLs
- if ((url.directory(true, true) + QString("/") + url.fileName(true)) == "//") {
+ if ((url.directory(true, true) + TQString("/") + url.fileName(true)) == "//") {
m_pSyncSetup->setEnabled(false);
m_pSyncNow->setEnabled(false);
}
- else if (((url.directory(true, true) + QString("/") + url.fileName(true)).left(5) == "//dev") || ((url.directory(true, true) + QString("/") + url.fileName(true)).left(4) == "/dev")) {
+ else if (((url.directory(true, true) + TQString("/") + url.fileName(true)).left(5) == "//dev") || ((url.directory(true, true) + TQString("/") + url.fileName(true)).left(4) == "/dev")) {
m_pSyncSetup->setEnabled(false);
m_pSyncNow->setEnabled(false);
}
- else if (((url.directory(true, true) + QString("/") + url.fileName(true)).left(6) == "//proc") || ((url.directory(true, true) + QString("/") + url.fileName(true)).left(5) == "/proc")) {
+ else if (((url.directory(true, true) + TQString("/") + url.fileName(true)).left(6) == "//proc") || ((url.directory(true, true) + TQString("/") + url.fileName(true)).left(5) == "/proc")) {
m_pSyncSetup->setEnabled(false);
m_pSyncNow->setEnabled(false);
}
- else if (url.protocol() != QString("file")) {
+ else if (url.protocol() != TQString("file")) {
m_pSyncSetup->setEnabled(false);
m_pSyncNow->setEnabled(false);
}
@@ -976,7 +976,7 @@ void RsyncPlugin::slotOpenURL ()
m_pSyncSetup->setEnabled(true);
// See if this URL is in the list of rsync-able directories
- if (findLocalFolderByName(url.directory(true, true) + QString("/") + url.fileName(true)) != NULL) {
+ if (findLocalFolderByName(url.directory(true, true) + TQString("/") + url.fileName(true)) != NULL) {
m_pSyncNow->setEnabled (true);
}
else {
@@ -994,9 +994,9 @@ void RsyncPlugin::slotSetup()
m_pSyncSetup->setEnabled (false);
// Look up settings
- QString localfolder = url.directory(true, true) + QString("/") + url.fileName(true);
- QString remotefolder = findLocalFolderByName(url.directory(true, true) + QString("/") + url.fileName(true));
- QString syncmethod = findSyncMethodByName(url.directory(true, true) + QString("/") + url.fileName(true));
+ TQString localfolder = url.directory(true, true) + TQString("/") + url.fileName(true);
+ TQString remotefolder = findLocalFolderByName(url.directory(true, true) + TQString("/") + url.fileName(true));
+ TQString syncmethod = findSyncMethodByName(url.directory(true, true) + TQString("/") + url.fileName(true));
int syncint;
if (syncmethod == NULL) {
syncint = 1;
@@ -1014,8 +1014,8 @@ void RsyncPlugin::slotSetup()
m_configDialog = new RsyncConfigDialog(0, "rsyncConfig", i18n("Remote Folder Synchronization"), i18n("Configuring Remote Folder Synchronization"), localfolder, remotefolder, syncint, true);
m_configDialog->show();
- connect (m_configDialog, SIGNAL(okClicked()), SLOT(slotSetupOK()));
- connect (m_configDialog, SIGNAL(cancelClicked()), SLOT(slotSetupCancelled()));
+ connect (m_configDialog, TQT_SIGNAL(okClicked()), TQT_SLOT(slotSetupOK()));
+ connect (m_configDialog, TQT_SIGNAL(cancelClicked()), TQT_SLOT(slotSetupCancelled()));
}
void RsyncPlugin::slotSetupOK()
@@ -1026,11 +1026,11 @@ void RsyncPlugin::slotSetupOK()
KURL url = m_part->url();
// Look up settings
- QString localfolder = url.directory(true, true) + QString("/") + url.fileName(true);
- QString remotefolder = findLocalFolderByName(localfolder);
- QString remotefolder_new = m_configDialog->lineEdit()->text().ascii();
+ TQString localfolder = url.directory(true, true) + TQString("/") + url.fileName(true);
+ TQString remotefolder = findLocalFolderByName(localfolder);
+ TQString remotefolder_new = m_configDialog->lineEdit()->text().ascii();
int syncmethod = m_configDialog->getSyncMode();
- QString syncmethod_new = "";
+ TQString syncmethod_new = "";
if (syncmethod == 1) {
syncmethod_new = "rsync_upload";
}
@@ -1093,19 +1093,19 @@ void RsyncPlugin::slotSync()
m_pSyncNow->setEnabled (false);
- QString syncmethod = findSyncMethodByName(url.directory(true, true) + QString("/") + url.fileName(true));
+ TQString syncmethod = findSyncMethodByName(url.directory(true, true) + TQString("/") + url.fileName(true));
if (syncmethod == NULL) {
// Do nothing
}
else if (syncmethod == "rsync_upload") {
// Initiate rsync
- syncUnidirectional(QString("rsync"), QString(" -avtzAXE --delete --progress "), 0, url.directory(true, true) + QString("/") + url.fileName(true), findLocalFolderByName(url.directory(true, true) + QString("/") + url.fileName(true)));
+ syncUnidirectional(TQString("rsync"), TQString(" -avtzAXE --delete --progress "), 0, url.directory(true, true) + TQString("/") + url.fileName(true), findLocalFolderByName(url.directory(true, true) + TQString("/") + url.fileName(true)));
}
else if (syncmethod == "rsync_download") {
- syncUnidirectional(QString("rsync"), QString(" -avtzAXE --delete --progress "), 1, url.directory(true, true) + QString("/") + url.fileName(true), findLocalFolderByName(url.directory(true, true) + QString("/") + url.fileName(true)));
+ syncUnidirectional(TQString("rsync"), TQString(" -avtzAXE --delete --progress "), 1, url.directory(true, true) + TQString("/") + url.fileName(true), findLocalFolderByName(url.directory(true, true) + TQString("/") + url.fileName(true)));
}
else if (syncmethod == "rsync_bidirectional") {
- syncBidirectional(QString("unison"), QString(" -ui text -auto "), 1, url.directory(true, true) + QString("/") + url.fileName(true), findLocalFolderByName(url.directory(true, true) + QString("/") + url.fileName(true)));
+ syncBidirectional(TQString("unison"), TQString(" -ui text -auto "), 1, url.directory(true, true) + TQString("/") + url.fileName(true), findLocalFolderByName(url.directory(true, true) + TQString("/") + url.fileName(true)));
}
m_progressDialogExists = false;