CVS commit by metz: allow limiting the maximum length in password dialog, icq and maybe other protocols need that M +3 -1 kopeteaccount.cpp 1.42 M +4 -2 kopeteaccount.h 1.31 --- kdenonbeta/kopete/libkopete/kopeteaccount.cpp #1.41:1.42 @@ -185,5 +185,5 @@ void KopeteAccount::loaded() } -QString KopeteAccount::getPassword( bool error, bool *ok ) +QString KopeteAccount::getPassword( bool error, bool *ok, unsigned int maxLength ) { if(ok) *ok=true; @@ -215,4 +215,6 @@ QString KopeteAccount::getPassword( bool view->m_login->setText(d->id); view->m_autologin->setChecked( d->autologin ); + if(maxLength!=0) + view->m_password->setMaxLength(maxLength); view->adjustSize(); --- kdenonbeta/kopete/libkopete/kopeteaccount.h #1.30:1.31 @@ -101,7 +101,9 @@ public: * dialog saying that the password was wrong * @param ok is set to false if the user returned cancel + * @param maxLength maximum length for a password, restricts the password + * lineedit accordingly, the default is no limit at all * @return The password or QString::null if the user has canceled */ - QString getPassword( bool error = false, bool *ok =0L ); + QString getPassword( bool error = false, bool *ok =0L, unsigned int maxLength=0 ); /** * Set the password for this account.