Automatically try to unlock db when global auto-type key has been pressed
Fixed gcc 4.2 compiler warning git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@199 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
parent
1219467c91
commit
d3259227f1
|
@ -476,7 +476,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void Twofish_fatal(char* msg){
|
void Twofish_fatal(const char* msg){
|
||||||
qCritical("Twofish: Fatal Error: %s",msg);
|
qCritical("Twofish: Fatal Error: %s",msg);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,11 @@ void AutoType::perform(IEntryHandle* entry, QString& err,bool hideWindow,int nr)
|
||||||
|
|
||||||
#ifdef GLOBAL_AUTOTYPE
|
#ifdef GLOBAL_AUTOTYPE
|
||||||
void AutoType::performGlobal(){
|
void AutoType::performGlobal(){
|
||||||
if (MainWin->db==NULL) return;
|
if (MainWin->isLocked())
|
||||||
|
MainWin->OnUnLockWorkspace();
|
||||||
|
|
||||||
|
if (!MainWin->isOpened())
|
||||||
|
return;
|
||||||
|
|
||||||
Display* d = QX11Info::display();
|
Display* d = QX11Info::display();
|
||||||
Window w;
|
Window w;
|
||||||
|
|
|
@ -34,6 +34,11 @@ class KeepassMainWindow : public QMainWindow, private Ui_MainWindow{
|
||||||
public:
|
public:
|
||||||
KeepassMainWindow (const QString& ArgFile,bool ArgMin,bool ArgLock,QWidget *parent=0, Qt::WFlags flags=0);
|
KeepassMainWindow (const QString& ArgFile,bool ArgMin,bool ArgLock,QWidget *parent=0, Qt::WFlags flags=0);
|
||||||
IDatabase* db;
|
IDatabase* db;
|
||||||
|
inline bool isLocked() { return IsLocked; };
|
||||||
|
inline bool isOpened() { return FileOpen; };
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void OnUnLockWorkspace();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void entryChanged();
|
void entryChanged();
|
||||||
|
@ -76,7 +81,6 @@ class KeepassMainWindow : public QMainWindow, private Ui_MainWindow{
|
||||||
void OnImport(QAction*);
|
void OnImport(QAction*);
|
||||||
void OnExport(QAction*);
|
void OnExport(QAction*);
|
||||||
void OnDetailViewUrlClicked(const QUrl& url);
|
void OnDetailViewUrlClicked(const QUrl& url);
|
||||||
void OnUnLockWorkspace();
|
|
||||||
void OnLockClose();
|
void OnLockClose();
|
||||||
void OnInactivityTimer();
|
void OnInactivityTimer();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue