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