1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
Commit Graph

4027 Commits

Author SHA1 Message Date
sudden6
db205bea57
refactor(profile): remove some uses of Settings::getInstance() 2020-08-29 00:45:21 +02:00
Anthony Bilinski
4fab6faea6
Merge pull request #5934
TriKriSta (5):
      fix(ui): implement and connect reloadTheme in leaf classes
      refactor: delete classes that were used to reload theme
      refactor: save friendScroll as a class member
      refactor: reorder of includes
      fix: clear custom style before update style
2020-08-28 13:35:59 -07:00
TriKriSta
a97c53313a
fix: clear custom style before update style 2020-08-28 10:26:40 -07:00
TriKriSta
6b77446c82
refactor: reorder of includes 2020-08-28 10:26:38 -07:00
TriKriSta
14f4188401
refactor: save friendScroll as a class member 2020-08-28 10:26:34 -07:00
TriKriSta
b11a09d3e4
refactor: delete classes that were used to reload theme 2020-08-28 10:26:26 -07:00
TriKriSta
3bf3128a4f
fix(ui): implement and connect reloadTheme in leaf classes
This allows leaf classes to update independently when the GUI has changed themes, without
their parent having to call updateTheme() manually.

Fix #5924
Fix #5592
2020-08-28 10:19:53 -07:00
sudden6
9971bc3a1e
refactor(core): make construction independent of CoreAV
Allows to construct a Core object without also starting CoreAV.
2020-08-28 13:12:27 +02:00
Anthony Bilinski
0f5ba08fd2
fix(settings): Unlock Settings mutex before emitting setting changed signals
When a setting is set it locks the Settings mutex and emits a signal for that
setting. If a slot is connected to that signal and lives on the same thread as
Settings, it is executed immediately with the Settings mutex still locked. That
slot can then lock a series of other mutexes. During this time another thread
can lock a mutex and then try to read settings, which will cause a deadlock due
to the opposite order of multiple mutex locking. By always emitting signals
after unlocking the Settings mutex, we avoid holding the Settings mutex while
executing slots.

Fix #6218
2020-08-27 18:44:19 -07:00
Anthony Bilinski
6801098651
fix(settings): Emit correct signal when spellchecking is updated 2020-08-27 10:55:06 -07:00
Anthony Bilinski
cbead16742
feat(ui): Make auto-accept size 0 wording less ambiguous
0 disables the max size, but doesn't disable auto-accept in its entirety.
2020-08-26 03:42:21 -07:00
sudden6
85e9aeea2f
refactor(core): finally remove Core::getInstance
This makes Core completly independent of Nexus
2020-08-24 23:24:51 +02:00
sudden6
b0295b7c0a
refactor(chatlog): remove getInstance from ChatlogItem 2020-08-24 23:24:24 +02:00
sudden6
3612e94f5f
refactor: cleanup Widget 2020-08-16 21:32:05 +02:00
sudden6
5fdadadfb5
refactor: remove getInstance() from friendchatroom.cpp 2020-08-16 12:47:33 +02:00
sudden6
c5e21be0f8
refactor: remove getInstance() from groupchatroom.cpp 2020-08-16 12:47:33 +02:00
sudden6
040a833d56
refactor: remove getInstance from filetransferwidget.cpp 2020-08-16 12:47:30 +02:00
Anthony Bilinski
ede0418b4f
Merge pull request #6182
bodwok (2):
      refactor: connection to parent method in toxuri.cpp
      refactor: connection to parent method in toxuri.cpp
2020-07-04 16:52:36 -07:00
bodwok
06ff723c0d
refactor: connection to parent method in toxuri.cpp 2020-07-04 21:32:57 +03:00
bodwok
3c513e2c53
refactor: connection to parent method in toxuri.cpp 2020-07-03 18:13:08 +03:00
sudden6
f37813ff88
refactor: move translations to their own module 2020-07-03 15:46:07 +02:00
Anthony Bilinski
431fd7bfa2
Merge pull request #6073
Anthony Bilinski (1):
      fix(notification): hide snore warning log spam

Mick Sayson (2):
      feat(notification): Notification string generator for multiple messages
      feat(notification): Notifications now always replace the previous one
2020-07-02 01:34:34 -07:00
Anthony Bilinski
ca4f9df1ee
fix(notification): hide snore warning log spam
snorenotify logs this when we call requestCloseNotification correctly. The
behaviour still works, so we can just mask the warning for now. The issue has
been reported upstream:
https://github.com/qTox/qTox/pull/6073#pullrequestreview-420748519
2020-07-02 01:29:25 -07:00
Anthony Bilinski
535b01a841
fix(preview): handle libexif missing fields, don't accept 0-value orientation
Last fix was a hack when the error was actually us using the default 0 value of
orientation since the returned ExifData was null.
2020-07-01 12:52:47 -07:00
Anthony Bilinski
5dcea74db5
fix(core): read proxy type after personal settings are loaded
Profile is required to load personal settings, and Profile was creating the
bootstraplist using personal settings. Instead create the bootstraplist in
initCore, after personal settings have been loaded. This avoids using an
uninitialized proxy type on every profile load.
2020-07-01 12:49:24 -07:00
sudden6
811a754edd
refactor: remove getInstance from toxuri.cpp 2020-06-30 22:09:26 +02:00
sudden6
8768f6be37
refactor: remove unused OSX platform code 2020-06-22 01:12:35 +02:00
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
Anthony Bilinski
9da1e3bbdf
fix(preview): Don't log a warning on missing exif orientation metadata
libexif returns 0 for the orientation when orientation metadata isn't present.
Treat this the same as 1, i.e. no orientation change.
2020-05-27 22:17:29 -07:00
sudden6
0f4dc940ce
refactor: remove Core dependency from Group
Replace the direct call with a signal connection in Widget, this keeps
Group clean.
2020-05-27 10:39:02 +02:00
sudden6
445340a0e9
refactor: remove getInstance from ContentDialog
This UI element probably should never depend on Core, but this is to fix
for a later time.
2020-05-27 10:39:02 +02:00
sudden6
19f4a6c4e0
refactor: remove getInstance from AddFriendForm 2020-05-27 10:38:57 +02:00
bodwok
1bc97ef219
fix(chathistory): file transfers sometimes show wrong author name 2020-05-24 20:23:28 +03:00
sudden6
8e7ae808a3
Merge pull request #6079
bodwok (3):
      fix(ui): updating friends list color at runtime
      fix(ui): using a separate css file
      style: placing files in alphabetical order
2020-05-23 10:59:30 +02:00
Mick Sayson
6e163ca5ed
feat(notification): Notifications now always replace the previous one
This is a feature/fix to improve notification behavior when we receive
over 3 messages.

SnoreNotify prevents over 3 notifications from being displayed before a
user clears the notification. This is presumably to avoid infinite
notification spam.

Unfortunately this results in the notifications just coming in _after_
the user clears them. This means if there are 100s of messages built up
the user has to clear their notifications N messages / 3 times.

This feature/fix folds all notifications into a single notification
representing the current qTox notification state. See
notificationgenerator_test.cpp for what the new messages look like.
2020-05-17 00:00:53 -07:00
Mick Sayson
a9f6543e43
feat(notification): Notification string generator for multiple messages 2020-05-17 00:00:48 -07:00
Mick Sayson
99c1753a76 fix(preview): Fix exif orientations
Previous exif transformations were not valid. The exif spec defines the
orientations as where the 0th row and the 0th column should end. The
previous mappings used in qTox did not respect these mappings and needed
to be updated.
2020-05-16 16:53:14 -07:00
sudden6
a90f0762d9
refactor(cmake): change folder structure
The new folder structure will be like this:

/<module>/CMakeLists.txt
/<module>/src/file.cpp
/<module>/include/<module>/file.h
/<module>/<subdir>/<...>
2020-05-11 16:45:52 +02:00
sudden6
f3a10815ed
refactor: remove Core::getInstance from AvatarBroadcaster
During this process, make AvatarBroadcaster a non-static class.
2020-05-11 10:28:26 +02:00
sudden6
82e0852f3c
refactor: remove Core::getInstance from grouplist 2020-05-11 10:28:26 +02:00
Anthony Bilinski
365a452fb8
feat(core): use user editable bootstrap node list
Fix #5767
2020-05-10 21:40:04 -07:00
Anthony Bilinski
e5f33608c4
refactor(core): pass Paths into BootstrapNodeUpdater
In preparation of loading local bootstrap list files.
2020-05-10 21:40:04 -07:00
Anthony Bilinski
5a877d742b
refactor(core): pass bootstrap list interface to Core 2020-05-10 21:39:58 -07:00
Anthony Bilinski
5d56a3c039
refactor(paths): move Settings path functions into Paths 2020-05-10 18:03:47 -07:00
Anthony Bilinski
062ba03fb8
refactor(db): map foreign key dependency in db schema
Reorder deletion of history to avoid violating constraint.
2020-05-03 18:06:10 -07:00
Anthony Bilinski
f37f9a9492
refactor(history): enforce using PK instead of ToxId in history
We need to be lenient when reading from db because of ToxIds being saved in the
db from a bug introduced in e07d8d358f, which
used self ID rather than self Pk. Was subsequently fixed in
033f28e67e.
2020-05-03 16:22:12 -07:00
Anthony Bilinski
8abd4e47e9
refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
sudden6
9306e946f8
refactor: remove Core::getInstance() from ChatForm classes 2020-05-02 23:36:38 +02:00
sudden6
ea46c0caf2
refactor: remove Core::getInstance from AvForm 2020-05-02 20:08:11 +02:00
sudden6
ef18afcbf1
refactor: remove Core::getInstance from PrivacyForm 2020-05-02 20:08:11 +02:00