AutoType: GUI connections,
Added French translation git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@71 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -60,9 +60,24 @@ switch(mods){
|
||||
}
|
||||
|
||||
|
||||
void AutoType::perform(const QString& string){
|
||||
QString str=string;
|
||||
//replace all {..} string templates
|
||||
void AutoType::perform(CEntry* entry, QString& err){
|
||||
QString str;
|
||||
int c=entry->Additional.count("Auto-Type:");
|
||||
if(c>1){
|
||||
err=tr("More than one 'Auto-Type:' key sequence found.\nAllowed is only one per entry.");
|
||||
return;}
|
||||
if(c==1){
|
||||
int start=entry->Additional.indexOf("Auto-Type:")+10;
|
||||
int len;
|
||||
if(entry->Additional.size()==10)return;
|
||||
for(len=0;len<entry->Additional.size();len++){
|
||||
if(entry->Additional.size()==(start+len))break;
|
||||
if(entry->Additional.at(start+len)==QChar('\n'))break;}
|
||||
if(!len)return;
|
||||
str=entry->Additional.mid(start,len);
|
||||
}
|
||||
else
|
||||
str="{USERNAME}{TAB}{PASSWORD}{ENTER}";
|
||||
|
||||
QList<Q_UINT16> Keys;
|
||||
for(int i=0;i<str.length();i++){
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#ifndef _AUTOTYPE_H_
|
||||
#define _AUTOTYPE_H_
|
||||
|
||||
#include <QObject>
|
||||
#include <QWidget>
|
||||
#include <QString>
|
||||
#ifdef Q_WS_X11
|
||||
@@ -30,16 +31,17 @@
|
||||
#include <X11/keysymdef.h>
|
||||
#include <X11/Xlib.h>
|
||||
#endif
|
||||
#include "Database.h"
|
||||
|
||||
typedef struct tKeysymMap{
|
||||
Q_UINT16 keysym;
|
||||
Q_UINT16 unicode;
|
||||
};
|
||||
|
||||
class AutoType{
|
||||
class AutoType:public QObject{
|
||||
public:
|
||||
static QWidget* MainWin;
|
||||
static void perform(const QString& KeePassAutoTypeString);
|
||||
static void perform(CEntry* entry,QString& errors);
|
||||
private:
|
||||
static tKeysymMap KeysymMap[];
|
||||
static Q_UINT16 getKeysym(const QChar& unicode);
|
||||
|
||||
Reference in New Issue
Block a user