Adapted to new KPasswordEdit::password() signature. This relates to bug 2961.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 5 years ago
parent 25c9b22503
commit f2b042c804
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -97,11 +97,11 @@ KisPDFImport::ConversionStatus KisPDFImport::convert(const TQCString& , const TQ
while( pdoc->isLocked() )
{
TQCString password;
TQString password;
int result = KPasswordDialog::getPassword(password, i18n("A password is required to read that pdf"));
if (result == KPasswordDialog::Accepted)
{
pdoc->unlock(password);
pdoc->unlock(password.utf8());
} else {
kdDebug(41008) << "Password canceled" << endl;
return KoFilter::StorageCreationError;

@ -176,7 +176,7 @@ KexiDBPasswordDialog::~KexiDBPasswordDialog()
void KexiDBPasswordDialog::done(int r)
{
if (r == TQDialog::Accepted) {
m_cdata->password = TQString::fromLatin1(password());
m_cdata->password = password();
}
// if (d->showConnectionDetailsExecuted || ret == TQDialog::Accepted) {
/* } else {
@ -330,11 +330,11 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (qstrcmp("--password",argv[i])==0
|| qstrcmp("-password",argv[i])==0)
{
TQCString pwd(argv[i+1]);
TQString pwd(argv[i+1]);
if (!pwd.isEmpty()) {
pwd.fill(' ');
pwd[0]='x';
qstrcpy(argv[i+1], (const char*)pwd);
qstrcpy(argv[i+1], (const char*)pwd.utf8().data());
}
break;
}
@ -394,7 +394,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (d->passwordDialog->showConnectionDetailsRequested() || ret == TQDialog::Accepted) {
// if ( ret == TQDialog::Accepted ) {
// if (TQDialog::Accepted == KPasswordDialog::getPassword(pwd, msg)) {
//moved cdata.password = TQString(pwd);
//moved cdata.password = pwd;
// }
} else {
m_action = Exit;

@ -5148,10 +5148,10 @@ void View::toggleProtectDoc( bool mode )
if ( !doc() || !doc()->map() )
return;
TQCString passwd;
TQString password;
if ( mode )
{
int result = KPasswordDialog::getNewPassword( passwd, i18n( "Protect Document" ) );
int result = KPasswordDialog::getNewPassword( password, i18n( "Protect Document" ) );
if ( result != KPasswordDialog::Accepted )
{
d->actions->protectDoc->setChecked( false );
@ -5159,14 +5159,13 @@ void View::toggleProtectDoc( bool mode )
}
TQCString hash( "" );
TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );
doc()->map()->setProtected( hash );
}
else
{
int result = KPasswordDialog::getPassword( passwd, i18n( "Unprotect Document" ) );
int result = KPasswordDialog::getPassword( password, i18n( "Unprotect Document" ) );
if ( result != KPasswordDialog::Accepted )
{
d->actions->protectDoc->setChecked( true );
@ -5174,7 +5173,6 @@ void View::toggleProtectDoc( bool mode )
}
TQCString hash( "" );
TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );
if ( !doc()->map()->checkPassword( hash ) )
@ -5196,10 +5194,10 @@ void View::toggleProtectSheet( bool mode )
if ( !d->activeSheet )
return;
TQCString passwd;
TQString password;
if ( mode )
{
int result = KPasswordDialog::getNewPassword( passwd, i18n( "Protect Sheet" ) );
int result = KPasswordDialog::getNewPassword( password, i18n( "Protect Sheet" ) );
if ( result != KPasswordDialog::Accepted )
{
d->actions->protectSheet->setChecked( false );
@ -5207,7 +5205,6 @@ void View::toggleProtectSheet( bool mode )
}
TQCString hash( "" );
TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );
@ -5215,7 +5212,7 @@ void View::toggleProtectSheet( bool mode )
}
else
{
int result = KPasswordDialog::getPassword( passwd, i18n( "Unprotect Sheet" ) );
int result = KPasswordDialog::getPassword( password, i18n( "Unprotect Sheet" ) );
if ( result != KPasswordDialog::Accepted )
{
d->actions->protectSheet->setChecked( true );
@ -5223,7 +5220,6 @@ void View::toggleProtectSheet( bool mode )
}
TQCString hash( "" );
TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );

@ -75,7 +75,7 @@ bool KWQtSqlSerialDataSourceBase::showConfigDialog(TQWidget *par,int action)
bool KWQtSqlSerialDataSourceBase::openDatabase()
{
TQCString pwd;
TQString pwd;
TQSqlDatabase::removeDatabase(DataBaseConnection);
database=TQSqlDatabase::addDatabase(driver,DataBaseConnection);
if (database)

Loading…
Cancel
Save