Hide contents of search field while database is locked (closes #1923554)

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@193 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 17 years ago
parent d26d0e8f96
commit b0289a8b3c
  1. 8
      src/mainwindow.cpp

@ -491,6 +491,7 @@ bool KeepassMainWindow::closeDatabase(bool lock){
if (!lock){ if (!lock){
setWindowTitle(APP_DISPLAY_NAME); setWindowTitle(APP_DISPLAY_NAME);
currentFile.clear(); currentFile.clear();
QuickSearchEdit->setText("");
} }
return true; return true;
} }
@ -1181,7 +1182,8 @@ void KeepassMainWindow::OnUnLockWorkspace(){
} }
} }
InUnLock = false; InUnLock = false;
} else { }
else {
QTreeWidgetItem* item = GroupView->currentItem(); QTreeWidgetItem* item = GroupView->currentItem();
bool root = false; bool root = false;
while (item!=NULL){ while (item!=NULL){
@ -1209,6 +1211,7 @@ void KeepassMainWindow::OnLockClose(){
} }
void KeepassMainWindow::setLock(){ void KeepassMainWindow::setLock(){
QuickSearchEdit->setEchoMode(QLineEdit::NoEcho);
NormalCentralWidget->setVisible(false); NormalCentralWidget->setVisible(false);
NormalCentralWidget->setParent(NULL); NormalCentralWidget->setParent(NULL);
setCentralWidget(LockedCentralWidget); setCentralWidget(LockedCentralWidget);
@ -1221,6 +1224,9 @@ void KeepassMainWindow::setLock(){
} }
void KeepassMainWindow::resetLock(){ void KeepassMainWindow::resetLock(){
if (!InUnLock)
QuickSearchEdit->setText("");
QuickSearchEdit->setEchoMode(QLineEdit::Normal);
LockedCentralWidget->setVisible(false); LockedCentralWidget->setVisible(false);
LockedCentralWidget->setParent(NULL); LockedCentralWidget->setParent(NULL);
setCentralWidget(NormalCentralWidget); setCentralWidget(NormalCentralWidget);