summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2018-11-30 11:26:25 +0900
committerMichele Calgaro <[email protected]>2018-11-30 11:26:25 +0900
commit580ffcad3885e5d24e98a9dffe4962654753136e (patch)
treed9019fe61ba9d77465eed215e3aa607772d76d39
parent1d93eb1e7a39aae33ed852b61b490882e101432e (diff)
downloadtdeutils-580ffcad3885e5d24e98a9dffe4962654753136e.tar.gz
tdeutils-580ffcad3885e5d24e98a9dffe4962654753136e.zip
Adapted to new KPasswordEdit::password() signature. This relates to bug 2961.
Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r--ark/arch.h6
-rw-r--r--ark/arj.cpp6
-rw-r--r--ark/rar.cpp8
-rw-r--r--ark/sevenzip.cpp6
-rw-r--r--ark/tar.h1
-rw-r--r--ark/zip.cpp6
-rw-r--r--kgpg/kgpginterface.cpp33
-rw-r--r--kgpg/listkeys.cpp6
-rw-r--r--tdessh/sshdlg.cpp4
-rw-r--r--tdessh/sshdlg.h2
-rw-r--r--tdessh/tdessh.cpp6
11 files changed, 42 insertions, 42 deletions
diff --git a/ark/arch.h b/ark/arch.h
index 5592832..8d35252 100644
--- a/ark/arch.h
+++ b/ark/arch.h
@@ -1,6 +1,6 @@
/*
- ark -- archiver for the KDE project
+ ark -- archiver for the TDE project
Copyright (C)
@@ -152,7 +152,7 @@ class Arch : public TQObject
const TQString &filename,
const TQString &openAsMimeType = TQString() );
TQString password() { return m_password; }
- void setPassword(const TQString & pw) { m_password = pw.local8Bit(); }
+ void setPassword(const TQString & pw) { m_password = pw; }
virtual void createPassword() {}
protected slots:
@@ -206,7 +206,7 @@ class Arch : public TQObject
TQStringList *m_fileList;
TQString m_destDir;
bool m_viewFriendly;
- TQCString m_password;
+ TQString m_password;
};
// Columns
diff --git a/ark/arj.cpp b/ark/arj.cpp
index 4a9ab44..7022b24 100644
--- a/ark/arj.cpp
+++ b/ark/arj.cpp
@@ -108,7 +108,7 @@ void ArjArch::addFile( const TQStringList & urls )
*kp << "-r";
if ( !m_password.isEmpty() )
- *kp << "-g"+m_password;
+ *kp << "-g"+m_password.local8Bit();
*kp << m_filename;
@@ -221,7 +221,7 @@ void ArjArch::unarchFileInternal()
*kp << "x";
if ( !m_password.isEmpty() )
- *kp << "-g" + m_password;
+ *kp << "-g" + m_password.local8Bit();
if ( ArkSettings::extractOverwrite() )
*kp << "-jyo";
@@ -306,7 +306,7 @@ void ArjArch::test()
*kp << m_unarchiver_program << "t";
if ( !m_password.isEmpty() )
- *kp << "-g" + m_password;
+ *kp << "-g" + m_password.local8Bit();
*kp << m_filename;
diff --git a/ark/rar.cpp b/ark/rar.cpp
index 68aa604..3c5d8fa 100644
--- a/ark/rar.cpp
+++ b/ark/rar.cpp
@@ -205,7 +205,7 @@ void RarArch::open()
*kp << m_unarchiver_program << "v" << "-c-";
if ( !m_password.isEmpty() )
- *kp << "-p" + m_password;
+ *kp << "-p" + m_password.local8Bit();
else
*kp << "-p-";
@@ -283,7 +283,7 @@ void RarArch::addFile( const TQStringList & urls )
*kp << "-r";
if ( !m_password.isEmpty() )
- *kp << "-p"+m_password;
+ *kp << "-p"+m_password.local8Bit();
*kp << m_filename;
@@ -326,7 +326,7 @@ void RarArch::unarchFileInternal()
*kp << m_unarchiver_program << "x";
if ( !m_password.isEmpty() )
- *kp << "-p" + m_password;
+ *kp << "-p" + m_password.local8Bit();
else
*kp << "-p-";
@@ -414,7 +414,7 @@ void RarArch::test()
*kp << m_unarchiver_program << "t";
if ( !m_password.isEmpty() )
- *kp << "-p" + m_password;
+ *kp << "-p" + m_password.local8Bit();
*kp << m_filename;
diff --git a/ark/sevenzip.cpp b/ark/sevenzip.cpp
index 287ec3b..e6823c0 100644
--- a/ark/sevenzip.cpp
+++ b/ark/sevenzip.cpp
@@ -136,7 +136,7 @@ void SevenZipArch::addFile( const TQStringList & urls )
*kp << m_archiver_program << "a" ;
if ( !m_password.isEmpty() )
- *kp << "-p" + m_password;
+ *kp << "-p" + m_password.local8Bit();
KURL url( urls.first() );
TQDir::setCurrent( url.directory() );
@@ -232,7 +232,7 @@ void SevenZipArch::unarchFileInternal( )
*kp << "-y";
if ( !m_password.isEmpty() )
- *kp << "-p" + m_password;
+ *kp << "-p" + m_password.local8Bit();
*kp << m_filename;
@@ -401,7 +401,7 @@ void SevenZipArch::test()
*kp << m_unarchiver_program << "t";
if ( !m_password.isEmpty() )
- *kp << "-p" + m_password;
+ *kp << "-p" + m_password.local8Bit();
*kp << m_filename;
diff --git a/ark/tar.h b/ark/tar.h
index 4e7b7ec..63a6187 100644
--- a/ark/tar.h
+++ b/ark/tar.h
@@ -108,7 +108,6 @@ class TarArch : public Arch
void setHeaders();
void processDir( const KTarDirectory *tardir, const TQString & root );
void deleteOldFiles( const TQStringList &list, bool bAddOnlyNew );
- TQString getEntry( const TQString & filename );
private: // data
// if the tar is compressed, this is the temporary uncompressed tar.
diff --git a/ark/zip.cpp b/ark/zip.cpp
index 4227ae5..392cc5c 100644
--- a/ark/zip.cpp
+++ b/ark/zip.cpp
@@ -144,7 +144,7 @@ void ZipArch::addFile( const TQStringList &urls )
*kp << m_archiver_program;
if ( !m_password.isEmpty() )
- *kp << "-P" << m_password;
+ *kp << "-P" << m_password.local8Bit();
if ( ArkSettings::rarRecurseSubdirs() )
*kp << "-r";
@@ -202,7 +202,7 @@ void ZipArch::unarchFileInternal()
*kp << m_unarchiver_program;
if ( !m_password.isEmpty() )
- *kp << "-P" << m_password;
+ *kp << "-P" << m_password.local8Bit();
if ( ArkSettings::extractJunkPaths() && !m_viewFriendly )
*kp << "-j" ;
@@ -292,7 +292,7 @@ void ZipArch::test()
*kp << m_unarchiver_program << "-t";
if ( !m_password.isEmpty() )
- *kp << "-P" << m_password;
+ *kp << "-P" << m_password.local8Bit();
*kp << m_filename;
diff --git a/kgpg/kgpginterface.cpp b/kgpg/kgpginterface.cpp
index 0d15df2..9fb5cca 100644
--- a/kgpg/kgpginterface.cpp
+++ b/kgpg/kgpginterface.cpp
@@ -149,7 +149,7 @@ void KgpgInterface::readencprocess(KProcIO *p)
if (required.find("openfile.overwrite.okay")!=-1)
p->writeStdin(TQString("Yes"));
else if ((required.find("passphrase.enter")!=-1)) {
- TQCString passphrase;
+ TQString passphrase;
int code=KPasswordDialog::getNewPassword(passphrase,i18n("Enter passphrase for your file (symmetrical encryption):"));
if (code!=TQDialog::Accepted) {
p->deleteLater();
@@ -226,7 +226,7 @@ void KgpgInterface::readdecprocess(KProcIO *p)
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
userIDs.replace(TQRegExp("<"),"&lt;");
- TQCString passphrase;
+ TQString passphrase;
TQString passdlgmessage;
if (anonymous)
passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>");
@@ -313,7 +313,7 @@ void KgpgInterface::txtreadencprocess(KProcIO *p)
else
if ((required.find("passphrase.enter")!=-1))
{
- TQCString passphrase;
+ TQString passphrase;
TQString passdlgmessage=i18n("Enter passphrase (symmetrical encryption)");
int code=KPasswordDialog::getNewPassword(passphrase,passdlgmessage);
if (code!=TQDialog::Accepted)
@@ -409,7 +409,7 @@ void KgpgInterface::getCmdOutput(TDEProcess *p, char *data, int )
{
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
- TQCString passphrase;
+ TQString passphrase;
TQString passdlgmessage;
if (anonymous)
passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>");
@@ -424,7 +424,8 @@ void KgpgInterface::getCmdOutput(TDEProcess *p, char *data, int )
return;
}
passphrase.append("\n");
- p->writeStdin(passphrase,passphrase.length());
+ TQCString passphrase_local = passphrase.local8Bit();
+ p->writeStdin(passphrase_local, passphrase_local.length());
userIDs=TQString();
if (step>1) step--;
else step=3;
@@ -527,7 +528,7 @@ void KgpgInterface::txtsignprocess(KProcIO *p)
else step=3;
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
- TQCString passphrase;
+ TQString passphrase;
TQString passdlgmessage;
if (step<3)
passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").arg(step);
@@ -776,7 +777,7 @@ void KgpgInterface::readsignprocess(KProcIO *p)
else if ((required.find("passphrase.enter")!=-1)) {
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
- TQCString passphrase;
+ TQString passphrase;
TQString passdlgmessage;
if (step<3)
passdlgmessage=i18n("<b>Bad passphrase</b>. you have %1 tries left.<br>").arg(step);
@@ -958,7 +959,7 @@ void KgpgInterface::sigprocess(KProcIO *p)
}
if (required.find("passphrase.enter")!=-1) {
- TQCString signpass;
+ TQString signpass;
// kdDebug(2100) << k_funcinfo << "passphrase.enter" << endl;
TQApplication::restoreOverrideCursor();
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>%1 Enter passphrase for <b>%2</b>:</qt>")
@@ -1040,7 +1041,7 @@ void KgpgInterface::sigprocess(KProcIO *p)
if (required.find("passphrase.enter")!=-1) {
TQApplication::restoreOverrideCursor();
- TQCString signpass;
+ TQString signpass;
// kdDebug(2100) << k_funcinfo << "passphrase.enter" << endl;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>%1 Enter passphrase for <b>%2</b>:</qt>")
.arg(errMessage).arg(userIDs));
@@ -1269,7 +1270,7 @@ void KgpgInterface::expprocess(KProcIO *p)
}
if (required.find("passphrase.enter")!=-1) {
- TQCString signpass;
+ TQString signpass;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
if (code!=TQDialog::Accepted) {
expSuccess=3; ///// aborted by user mode
@@ -1438,7 +1439,7 @@ void KgpgInterface::passprocess(KProcIO *p)
userIDs.replace(TQRegExp("<"),"&lt;");
if (step==1) {
- TQCString passphrase;
+ TQString passphrase;
int code=KPasswordDialog::getPassword(passphrase,i18n("<qt>%1 Enter passphrase for <b>%2</b></qt>")
.arg(message).arg(userIDs));
if (code!=TQDialog::Accepted) {
@@ -1453,7 +1454,7 @@ void KgpgInterface::passprocess(KProcIO *p)
}
if (step==3) {
- TQCString passphrase;
+ TQString passphrase;
int code=KPasswordDialog::getNewPassword(passphrase,i18n("<qt>Enter new passphrase for <b>%1</b><br>If you forget this passphrase, all your encrypted files and messages will be lost !<br></qt>").arg(userIDs));
if (code!=TQDialog::Accepted) {
step=4;
@@ -1689,7 +1690,7 @@ void KgpgInterface::adduidprocess(KProcIO *p)
}
if (required.find("passphrase.enter")!=-1) {
- TQCString delpass;
+ TQString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>")
.arg(userIDs));
if (code!=TQDialog::Accepted) {
@@ -1819,7 +1820,7 @@ void KgpgInterface::delphotoprocess(KProcIO *p)
}
if (required.find("passphrase.enter")!=-1) {
- TQCString delpass;
+ TQString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
if (code!=TQDialog::Accepted) {
//deleteSuccess=false;
@@ -1897,7 +1898,7 @@ void KgpgInterface::addphotoprocess(KProcIO *p)
}
if (required.find("passphrase.enter")!=-1) {
- TQCString delpass;
+ TQString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
if (code!=TQDialog::Accepted) {
//deleteSuccess=false;
@@ -1991,7 +1992,7 @@ void KgpgInterface::revokeprocess(KProcIO *p)
if (required.find("passphrase.enter")!=-1) {
// kdDebug(2100) << k_funcinfo << " passphrase.enter " << endl;
- TQCString signpass;
+ TQString signpass;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
if (code!=TQDialog::Accepted) {
expSuccess=3; ///// aborted by user mode
diff --git a/kgpg/listkeys.cpp b/kgpg/listkeys.cpp
index 2c75853..ed1d7dc 100644
--- a/kgpg/listkeys.cpp
+++ b/kgpg/listkeys.cpp
@@ -2223,7 +2223,7 @@ void listKeys::slotgenkey()
delete genkey;
//genkey->delayedDestruct();
- TQCString password;
+ TQString password;
bool goodpass=false;
while (!goodpass)
{
@@ -2231,7 +2231,7 @@ void listKeys::slotgenkey()
if (code!=TQDialog::Accepted)
return;
if (password.length()<5)
- KMessageBox::sorry(this,i18n("This passphrase is not secure enough.\nMinimum length= 5 characters"));
+ KMessageBox::sorry(this,i18n("This passphrase is not secure enough.\nMinimum length = 5 characters"));
else
goodpass=true;
}
@@ -2283,7 +2283,7 @@ void listKeys::slotgenkey()
proc->writeStdin(TQString("Subkey-Type: ELG-E"));
proc->writeStdin(TQString("Subkey-Length:%1").arg(ksize));
}
- proc->writeStdin(TQString("Passphrase:%1").arg(password.data()));
+ proc->writeStdin(TQString("Passphrase:%1").arg(password));
proc->writeStdin(TQString("Key-Length:%1").arg(ksize));
proc->writeStdin(TQString("Name-Real:%1").arg(newKeyName));
if (!newKeyMail.isEmpty())
diff --git a/tdessh/sshdlg.cpp b/tdessh/sshdlg.cpp
index a43c9d0..df30045 100644
--- a/tdessh/sshdlg.cpp
+++ b/tdessh/sshdlg.cpp
@@ -41,12 +41,12 @@ TDEsshDialog::~TDEsshDialog()
}
-bool TDEsshDialog::checkPassword(const char *password)
+bool TDEsshDialog::checkPassword(const TQString &password)
{
SshProcess proc(m_Host, m_User);
proc.setStub(m_Stub);
- int ret = proc.checkInstall(password);
+ int ret = proc.checkInstall(password.local8Bit());
switch (ret)
{
case -1:
diff --git a/tdessh/sshdlg.h b/tdessh/sshdlg.h
index 79415ad..5f4f734 100644
--- a/tdessh/sshdlg.h
+++ b/tdessh/sshdlg.h
@@ -23,7 +23,7 @@ public:
~TDEsshDialog();
protected:
- bool checkPassword(const char *password);
+ bool checkPassword(const TQString &password);
private:
TQCString m_User, m_Host, m_Stub;
diff --git a/tdessh/tdessh.cpp b/tdessh/tdessh.cpp
index d178f4d..042302e 100644
--- a/tdessh/tdessh.cpp
+++ b/tdessh/tdessh.cpp
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
exit(1);
}
- TQCString password;
+ TQString password;
if (needpw != 0)
{
TDEsshDialog *dlg = new TDEsshDialog(host, user, stub,
@@ -188,14 +188,14 @@ int main(int argc, char *argv[])
if (keep && have_daemon)
{
client.setHost(host);
- client.setPass(password, timeout);
+ client.setPass(password.local8Bit(), timeout);
return client.exec(command, user);
} else
{
proc.setCommand(command);
proc.setTerminal(terminal);
proc.setErase(true);
- return proc.exec(password);
+ return proc.exec(password.local8Bit());
}
}