@@ -658,10 +658,6 @@ void MainWindow::readyRead(bool finished = false) {
658
658
clippedPass = tokens[0 ];
659
659
QTimer::singleShot (1000 *autoclearSeconds, this , SLOT (clearClipboard ()));
660
660
}
661
- if (useAutoclearPanel) {
662
- QTimer::singleShot (1000 *autoclearPanelSeconds, this , SLOT (clearPanel ()));
663
- }
664
-
665
661
if (hidePassword && !useTemplate) {
666
662
tokens[0 ] = " ***" + tr (" Password hidden" ) + " ***" ;
667
663
output = tokens.join (" \n " );
@@ -720,6 +716,10 @@ void MainWindow::readyRead(bool finished = false) {
720
716
}
721
717
ui->verticalLayoutPassword ->setSpacing (0 );
722
718
}
719
+ if (useAutoclearPanel) {
720
+ autoclearPass = output;
721
+ QTimer::singleShot (1000 *autoclearPanelSeconds, this , SLOT (clearPanel ()));
722
+ }
723
723
}
724
724
output.replace (QRegExp (" <" ), " <" );
725
725
output.replace (QRegExp (" >" ), " >" );
@@ -753,7 +753,6 @@ void MainWindow::readyRead(bool finished = false) {
753
753
754
754
/* *
755
755
* @brief MainWindow::clearClipboard
756
- * @TODO check clipboard content (only clear if contains the password)
757
756
*/
758
757
void MainWindow::clearClipboard ()
759
758
{
@@ -772,13 +771,15 @@ void MainWindow::clearClipboard()
772
771
*/
773
772
void MainWindow::clearPanel ()
774
773
{
775
- while (ui->formLayout ->count () > 0 ){
776
- QLayoutItem *item = ui->formLayout ->takeAt (0 );
777
- delete item->widget ();
778
- delete item;
774
+ if (true ) { // TODO when ??
775
+ while (ui->formLayout ->count () > 0 ){
776
+ QLayoutItem *item = ui->formLayout ->takeAt (0 );
777
+ delete item->widget ();
778
+ delete item;
779
+ }
780
+ QString output = " ***" + tr (" Password and Content hidden" ) + " ***" ;
781
+ ui->textBrowser ->setHtml (output);
779
782
}
780
- QString output = " ***" + tr (" Password and Content hidden" ) + " ***" ;
781
- ui->textBrowser ->setHtml (output);
782
783
}
783
784
784
785
/* *
0 commit comments