Permalink
Browse files

Autoclear doesn't need clipboard

  • Loading branch information...
annejan committed Nov 17, 2015
1 parent 2f9c6f7 commit 76daccaa107ebf03a78a582bec8fdcef1df0f8b6
Showing with 13 additions and 11 deletions.
  1. +12 −11 mainwindow.cpp
  2. +1 −0 mainwindow.h
@@ -658,10 +658,6 @@ void MainWindow::readyRead(bool finished = false) {
clippedPass = tokens[0];
QTimer::singleShot(1000*autoclearSeconds, this, SLOT(clearClipboard()));
}
if (useAutoclearPanel) {
QTimer::singleShot(1000*autoclearPanelSeconds, this, SLOT(clearPanel()));
}
if (hidePassword && !useTemplate) {
tokens[0] = "***" + tr("Password hidden") + "***";
output = tokens.join("\n");
@@ -720,6 +716,10 @@ void MainWindow::readyRead(bool finished = false) {
}
ui->verticalLayoutPassword->setSpacing(0);
}
if (useAutoclearPanel) {
autoclearPass = output;
QTimer::singleShot(1000*autoclearPanelSeconds, this, SLOT(clearPanel()));
}
}
output.replace(QRegExp("<"), "&lt;");
output.replace(QRegExp(">"), "&gt;");
@@ -753,7 +753,6 @@ void MainWindow::readyRead(bool finished = false) {
/**
* @brief MainWindow::clearClipboard
* @TODO check clipboard content (only clear if contains the password)
*/
void MainWindow::clearClipboard()
{
@@ -772,13 +771,15 @@ void MainWindow::clearClipboard()
*/
void MainWindow::clearPanel()
{
while(ui->formLayout->count() > 0){
QLayoutItem *item = ui->formLayout->takeAt(0);
delete item->widget();
delete item;
if (true) { // TODO when ??
while(ui->formLayout->count() > 0){
QLayoutItem *item = ui->formLayout->takeAt(0);
delete item->widget();
delete item;
}
QString output = "***" + tr("Password and Content hidden") + "***";
ui->textBrowser->setHtml(output);
}
QString output = "***" + tr("Password and Content hidden") + "***";
ui->textBrowser->setHtml(output);
}
/**
@@ -106,6 +106,7 @@ private slots:
QString webDavPassword;
QProcess fusedav;
QString clippedPass;
QString autoclearPass;
actionType currentAction;
QString lastDecrypt;
bool wrapperRunning;

0 comments on commit 76dacca

Please sign in to comment.