tools/triage: set proper shuffle seed, less priority for results in tests
This commit is contained in:
parent
7c33207a72
commit
c26ae955ad
|
@ -17,7 +17,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
ui(new Ui::MainWindow)
|
ui(new Ui::MainWindow)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
qsrand(std::time(0));
|
std::srand(std::time(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
@ -55,6 +55,11 @@ void MainWindow::loadFile()
|
||||||
if (!url.isEmpty() && !errorMessage.isEmpty())
|
if (!url.isEmpty() && !errorMessage.isEmpty())
|
||||||
allErrors << (url + "\n" + errorMessage);
|
allErrors << (url + "\n" + errorMessage);
|
||||||
if (allErrors.size() > 100) {
|
if (allErrors.size() > 100) {
|
||||||
|
// remove items in /test/
|
||||||
|
for (int i = allErrors.size()-1; i >= 0 && allErrors.size() > 100; --i) {
|
||||||
|
if (allErrors[i].indexOf("test") > 0)
|
||||||
|
allErrors.removeAt(i);
|
||||||
|
}
|
||||||
std::random_shuffle(allErrors.begin(), allErrors.end());
|
std::random_shuffle(allErrors.begin(), allErrors.end());
|
||||||
ui->results->addItems(allErrors.mid(0,100));
|
ui->results->addItems(allErrors.mid(0,100));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue