work on Auto-Type feature,

the save attachment file dialog now adopts the entry.BinaryDesc string as default filename

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@74 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
tariq
2006-04-10 10:21:56 +00:00
parent ca29e4a7bb
commit e281b7c514
3 changed files with 31 additions and 5 deletions

View File

@@ -79,6 +79,27 @@ if(c==1){
else
str="{USERNAME}{TAB}{PASSWORD}{ENTER}";
/*
KeePass/Win template compatibility:
only supported syntax is:{TEMPLATE-NAME}
%TEMPLATE-NAME% syntax is not supported!
*/
str.replace("{TITLE}",entry->Title,Qt::CaseInsensitive);
str.replace("{USERNAME}",entry->UserName,Qt::CaseInsensitive);
entry->Password.unlock();
str.replace("{PASSWORD}",entry->Password.string(),Qt::CaseInsensitive);
entry->Password.lock();
str.replace("{URL}",entry->URL,Qt::CaseInsensitive);
str.replace("{SPACE}",QString(" "),Qt::CaseInsensitive);
str.replace("{ADD}",QString("+"),Qt::CaseInsensitive);
str.replace("{SUBTRACT}",QString("-"),Qt::CaseInsensitive);
str.replace("{DIVIDE}",QString("/"),Qt::CaseInsensitive);
str.replace("{MULTIPLY}",QString("*"),Qt::CaseInsensitive);
str.replace("{PLUS}",QString("+"),Qt::CaseInsensitive);
QList<Q_UINT16> Keys;
for(int i=0;i<str.length();i++){
Keys << getKeysym(str.at(i));