summaryrefslogtreecommitdiffstats
path: root/kpdf
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-12-02 00:21:56 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2018-12-02 00:21:56 +0900
commit358d9e899a115389549ab081f0f3571e703cc519 (patch)
treef3d443c66a5d76eced7a385011306f682e8ce3bb /kpdf
parentd65b672dceb41a2813f7e5a8dc00b494bea04bd0 (diff)
downloadtdegraphics-358d9e899a115389549ab081f0f3571e703cc519.tar.gz
tdegraphics-358d9e899a115389549ab081f0f3571e703cc519.zip
Adapted to new KPasswordEdit::password() signature. This relates to bug 2961.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kpdf')
-rw-r--r--kpdf/core/generator_pdf/generator_pdf.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/kpdf/core/generator_pdf/generator_pdf.cpp b/kpdf/core/generator_pdf/generator_pdf.cpp
index 3e309fc5..12e7fd0b 100644
--- a/kpdf/core/generator_pdf/generator_pdf.cpp
+++ b/kpdf/core/generator_pdf/generator_pdf.cpp
@@ -114,7 +114,7 @@ bool PDFGenerator::loadDocument( const TQString & filePath, TQValueVector<KPDFPa
int keep = 1;
while ( !pdfdoc->isOk() && pdfdoc->getErrorCode() == errEncrypted )
{
- TQCString password;
+ TQString password;
// 1.A. try to retrieve the first password from the kde wallet system
if ( !triedWallet )
@@ -131,7 +131,7 @@ bool PDFGenerator::loadDocument( const TQString & filePath, TQValueVector<KPDFPa
// look for the pass in that folder
TQString retrievedPass;
if ( !wallet->readPassword( filePath.section('/', -1, -1), retrievedPass ) )
- password = retrievedPass.local8Bit();
+ password = retrievedPass;
}
triedWallet = true;
}
@@ -152,7 +152,7 @@ bool PDFGenerator::loadDocument( const TQString & filePath, TQValueVector<KPDFPa
}
// 2. reopen the document using the password
- GString * pwd2 = new GString( TQString(TQString::fromLocal8Bit(password.data())).latin1() );
+ GString * pwd2 = new GString( password.utf8() );
delete pdfdoc;
pdfdoc = new PDFDoc( new GString( TQFile::encodeName( filePath ) ), pwd2, pwd2 );
delete pwd2;
@@ -160,7 +160,7 @@ bool PDFGenerator::loadDocument( const TQString & filePath, TQValueVector<KPDFPa
// 3. if the password is correct and the user chose to remember it, store it to the wallet
if ( pdfdoc->isOk() && wallet && /*safety check*/ wallet->isOpen() && keep > 0 )
{
- TQString goodPass = TQString::fromLocal8Bit( password.data() );
+ TQString goodPass = password;
wallet->writePassword( filePath.section('/', -1, -1), goodPass );
}
}