1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
qTox/src/widget
Maxim Biro f5f42233ca
fix: Usage of random
- Seed random in Core Thread. Core Thread didn't seed random, resulting
  in always using the same bootstrap nodes, even when you restart qTox
  or change profiles.

- Use QDateTime::currentMSecsSinceEpoch() for seeding random. It
  provides a bigger range of numbers than QTime::currentTime().msec()
  does, and the latter somehow managed to result in approximately the
  same first random number being generated, within a certain range.

- Use something a it more sensible than a mod operation to bound random
  numbers within a range. It's not perfect either, but a lot better.
  Using mod on random skews its distribution too much.

- Use QRandomGenerator's bounded() function to generate random values
  within a range.

- Enable QRandomGenerator's usage starting with Qt 5.10.0.
  QRandomGenerator is present since Qt 5.10.0, not 5.15.0.

- Bootstrap off every 5th node instead of two consecutive nodes. It's
  likely that two consecutive nodes will have the same owner, which
  makes some attacks more likely. The node selection algorithm should be
  scraped and redone from scratch to be honest though.
2020-06-04 15:58:17 -04:00
..
about refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
form fix: Usage of random 2020-06-04 15:58:17 -04:00
tool refactor(paths): move Settings path functions into Paths 2020-05-10 18:03:47 -07:00
categorywidget.cpp chore: remove extra ; 2020-04-22 23:55:51 +00:00
categorywidget.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
chatformheader.cpp fix(ui): fix reversed mute/unmute hover text 2019-11-18 13:56:56 -08:00
chatformheader.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
circlewidget.cpp refactor: remove getInstance from ContentDialog 2020-05-27 10:39:02 +02:00
circlewidget.h refactor: remove getInstance from ContentDialog 2020-05-27 10:39:02 +02:00
contentdialog.cpp refactor: remove getInstance from ContentDialog 2020-05-27 10:39:02 +02:00
contentdialog.h refactor: remove getInstance from ContentDialog 2020-05-27 10:39:02 +02:00
contentdialogmanager.cpp fix(chatform): crash after opening chat in new window 2019-07-29 15:51:45 +03:00
contentdialogmanager.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
contentlayout.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
contentlayout.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
emoticonswidget.cpp refactor(Qt): fix build with Qt 5.15 2020-03-17 13:31:36 +02:00
emoticonswidget.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
flowlayout.cpp refactor(Qt): fix build with Qt 5.15 2020-03-17 13:31:36 +02:00
flowlayout.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
friendlistlayout.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
friendlistlayout.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
friendlistwidget.cpp refactor: remove getInstance from ContentDialog 2020-05-27 10:39:02 +02:00
friendlistwidget.h refactor: remove getInstance from ContentDialog 2020-05-27 10:39:02 +02:00
friendwidget.cpp chore: Various code cleanups. 2020-04-16 19:07:40 +00:00
friendwidget.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
genericchatitemlayout.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
genericchatitemlayout.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
genericchatitemwidget.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
genericchatitemwidget.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
genericchatroomwidget.cpp fix(ui): using a separate css file 2020-04-18 20:51:51 +03:00
genericchatroomwidget.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
groupwidget.cpp chore: remove extra ; 2020-04-22 23:55:51 +00:00
groupwidget.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
gui.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
gui.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
loginscreen.cpp Merge branch 'v1.17-dev' 2019-10-21 23:49:36 -07:00
loginscreen.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
maskablepixmapwidget.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
maskablepixmapwidget.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
notificationedgewidget.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
notificationedgewidget.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
notificationscrollarea.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
notificationscrollarea.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
passwordedit.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
passwordedit.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
qrwidget.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
qrwidget.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
searchform.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
searchform.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
searchtypes.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
splitterrestorer.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
splitterrestorer.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
style.cpp chore: Various code cleanups. 2020-04-16 19:07:40 +00:00
style.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
translator.cpp docs(copyright): update and add copyright info 2019-06-28 01:18:26 +02:00
translator.h refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
widget.cpp refactor: remove Core dependency from Group 2020-05-27 10:39:02 +02:00
widget.h refactor(cmake): change folder structure 2020-05-11 16:45:52 +02:00