From 961530c1c588bfb955457f34677e81d378818a8a Mon Sep 17 00:00:00 2001 From: Erik Lander Date: Thu, 31 Dec 2015 13:33:51 +0100 Subject: [PATCH] qrand always generating the same sequence of passwords qrand fallback when not using pwgen would always generate the same sequence of passwords because qsrand was never called. --- mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index 8205209eb..8ba977015 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -51,6 +51,7 @@ MainWindow::MainWindow(QWidget *parent) setClippedPassword(""); QtPass = NULL; QTimer::singleShot(10, this, SLOT(focusInput())); + qsrand(QDateTime::currentDateTime().toTime_t()); } void MainWindow::focusInput() {