Permalink
Browse files

reset the timer, should I (needlessly) do this for the clipboard too?

  • Loading branch information...
annejan committed Nov 17, 2015
1 parent 76dacca commit 1fa596dc105cec6bb8fc88a335704d1f47128426
Showing with 12 additions and 1 deletion.
  1. +10 −1 mainwindow.cpp
  2. +2 −0 mainwindow.h
@@ -49,6 +49,7 @@ MainWindow::MainWindow(QWidget *parent) :
QApplication::quit();
}
QtPass = NULL;
autoclearTimer = NULL;
QTimer::singleShot(10, this, SLOT(focusInput()));
}
@@ -718,7 +719,15 @@ void MainWindow::readyRead(bool finished = false) {
}
if (useAutoclearPanel) {
autoclearPass = output;
QTimer::singleShot(1000*autoclearPanelSeconds, this, SLOT(clearPanel()));
if (autoclearTimer != NULL) {
autoclearTimer->stop();
}
autoclearTimer = new QTimer(this);
autoclearTimer->setSingleShot(true);
autoclearTimer->setInterval(1000*autoclearPanelSeconds);
connect(autoclearTimer, SIGNAL(timeout()), this, SLOT(clearPanel()));
autoclearTimer->start();
}
}
output.replace(QRegExp("<"), "&lt;");
@@ -7,6 +7,7 @@
#include <QProcess>
#include <QQueue>
#include <QSettings>
#include <QTimer>
#include "storemodel.h"
#include "trayicon.h"
#if SINGLE_APP
@@ -107,6 +108,7 @@ private slots:
QProcess fusedav;
QString clippedPass;
QString autoclearPass;
QTimer *autoclearTimer;
actionType currentAction;
QString lastDecrypt;
bool wrapperRunning;

0 comments on commit 1fa596d

Please sign in to comment.