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

4125 Commits

Author SHA1 Message Date
Anthony Bilinski
9688a1e82f fix(video): Close video device after checking V4L video modes
Fix #6346
2021-06-27 11:25:38 -07:00
Anthony Bilinski
65ff532a54
fix(macos): update deprecated AVFoundation API 2021-06-27 11:20:17 -07:00
bodwok
35244db50e
refactor(ui): code improvement 2021-06-22 21:26:17 +03:00
bodwok
1d5dd8063e
refactor(ui): code improvement 2021-06-17 19:13:32 +03:00
bodwok
89fa7db90a
fix(build): include QVector type 2021-06-14 11:23:56 +03:00
bodwok
18b34b325f
refactor(ui): separation of responsibility for sorting the contact list 2021-06-13 20:11:19 +03:00
Anthony Bilinski
55fb28b08b
fix(core): extend RAII locker lifetime until end of function
Before it was being constructed then destroyed immediately, not
actually keeping the mutex locked.
2021-06-06 14:34:57 -07:00
Anthony Bilinski
f3f1f08afb
refactor(ui): using the isCompact function 2021-06-06 03:25:21 -07:00
Anthony Bilinski
e6bc355bc7
fix(ui): passing arguments from the CircleWidget constructor 2021-06-06 03:25:17 -07:00
Anthony Bilinski
8276141ef9
fix: Replace deprecated QMutex::Recursive with QRecursiveMutex 2021-06-06 01:29:44 -07:00
sudden6
8c34fa8f7d
Merge pull request #6290
Mick Sayson (1):
      feat(chatlog): Upgrade db schema to support system messages
2021-05-03 08:50:46 +02:00
Mick Sayson
e9131d33aa
feat(chatlog): Upgrade db schema to support system messages
* Resolves #6221
* System message schema designed to take enum of message base + args
* New table layout required many updates to the queries executed by
  history
* Bonus reduction of history signals/slots by issuing some file transfer
  insertions directly when possible
2021-05-02 03:26:04 -07:00
Anthony Bilinski
479cd90f9c
chore(i18n): Add new languages
Language codes: BER, GL, KN, SI, SQ
2021-03-04 05:31:02 -08:00
Jamie Westell
98a818cbea fix(video): only list video devices with video capture capability
This change adds a check for the V4L2_CAP_VIDEO_CAPTURE capability of
the video device found on devfs. This will filter out 'metadata' device
nodes that may be present on devfs at some  /dev/videoN path.

Fixes #6276
2021-02-27 16:19:30 -08:00
bodwok
b98801f42f
fix(ui): add group widgets on start with "Activity" mode 2021-02-19 19:13:51 +03:00
Waris Boonyasiriwat
034d7671a5 fix(smileys): fix flag emojis
Fix two small problems that break flag emojis

(1) Multi-char emojis are accidentally grouped together with emoticons
(such as : smile :). This is fixed by using a more robust isAscii(...) function
(2) Smiley regexp construction is undeterministic, causing multi-char to
sometimes be processed first, sometimes last. This is fixed by explicitly
inserting multi-char patterns first.

Issue: #5147
2021-02-16 09:29:21 -08:00
Mick Sayson
d338ed97d9
refactor(chatform): Move typing notification creation into ChatLog
* Part of attempt to reduce interdependencies between
  ChatForm<->ChatLog.
2021-02-01 05:09:26 -08:00
Anthony Bilinski
fe421d11a1
Merge pull request #6294
Mick Sayson (1):
      refactor(chatform): Use IChatLog to get date in GenericChatForm
2021-01-31 00:57:01 -08:00
Mick Sayson
d0f4c336ba
refactor(chatform): Use IChatLog to get date in GenericChatForm
* Allows for deletion of APIs returning ChatLine::Ptr from ChatLog
* Bonus removal of unused "getFirstTime" function from GenericChatForm
2021-01-30 22:35:31 -08:00
Mick Sayson
26701283cd
feat(extensions): Split messages on extended messages
v0.0.2 of toxext_extended_messages brought in a user configurable max
message size. This changeset implements the minimum work required for
qTox to work sanely under the new API.

* Hardcode a max message size for all friends
* If a friend negotiates a max message size below the hardcoded value
  pretend they do not have the extension
* Move splitMessage out of Core to MessageProcessor
* Updates to allow for extended messages to be split
2021-01-30 18:15:49 -08:00
Mick Sayson
b715815011
feat(extensions): UI updates for extension support
Added a UI element to indicate extension support of the chatroom. For
all groups it will always be red since we do not support extensions in
groups. In a 1-1 chat the indicator will either be green/yellow/red
depending on if the friend has support for all/some/none of qTox's
desired extension set.
2021-01-30 12:52:07 -08:00
Mick Sayson
5f5f612841
feat(messages): History and offline message support for extended messages
* Added new negotiating friend state to allow delayed sending of offline
messages
* Added ability to flag currently outgoing message as broken in UI
* Reworked OfflineMsgEngine to support multiple receipt types
    * Moved resending logic out of the OfflineMsgEngine
    * Moved coordination of receipt and DispatchedMessageId into helper
    class usable for both ExtensionReceiptNum and ReceiptNum
    * Resending logic now has a failure case when the friend's extension
    set is lower than the required extensions needed for the message
    * When a user is known to be offline we do not allow use of any
    extensions
* Added DB support for broken message reasons
* Added DB support to tie an faux_offline_pending message to a required
extension set
2021-01-30 12:52:06 -08:00
Mick Sayson
7474c6d8ac
feat(messages): Multipacket message support
* Introduced ToxExt and CoreExt abstraction
    * Along with interfaces for mocking and unit testing
* Add "supportedExtensions" concept to Friend
* Dispatch messages to CoreExt instead of Core when friend supports
extended messages
    * Only split messages for core when extended messages are unavailable
* Offline message engine/History not altered. Currently only valid for
an existing session after extension negotiation has completed
2021-01-30 12:52:06 -08:00
Anthony Bilinski
5d26901840
Merge pull request #6288
Mick Sayson (1):
      refactor(history): Remove peerId caching from history
2021-01-24 17:19:09 -08:00
Mick Sayson
13b8bc207b refactor(history): Remove peerId caching from history
In history we cache peers to avoid extra DB lookups, this code is not
pretty and seems to provide little benefit. This reduces the cognitive
load when trying to reason about history.

* Removed peerId table from history
* Replaced peerId lookups with generated select statement
* Benchmarked on a profile with ~100 peers in the db and saw no
  noticible change in transaction time (6-30 ms both before and after
  the changes)
2021-01-24 11:48:16 -08:00
Anthony Bilinski
5bb89f3e0b
Merge pull request #6274
begasus (2):
      feat(haiku): Don't use fstack-protector on Haiku
      feat(haiku): Haiku doesn't use sys/errno.h
2021-01-23 19:38:32 -08:00
Anthony Bilinski
ce1ecb4234
fix(settings): Initialize gain slider to correct position
Fix #6285
2021-01-23 06:23:24 -08:00
begasus
36463f6f9d
feat(haiku): Haiku doesn't use sys/errno.h 2021-01-23 05:44:02 -08:00
Anthony Bilinski
7a683fa5c2
chore: log self and friends network connection type 2021-01-23 04:11:26 -08:00
sudden6
ef47c00c8d
Merge pull request #6271
tWido (1):
      refactor(core): use STL random implementation insted of Qt
2020-12-28 11:30:39 +01:00
tWido
33162c9674 refactor(core): use STL random implementation insted of Qt
use STL <random> libs to reduce version specific code

Closes #6017
2020-12-22 16:37:05 +01:00
powerjungle
640493477d
refactor(ui): change unstable version warning message 2020-12-15 16:30:06 +02:00
powerjungle
f9f85febea
refactor(log): change unstable version warning message 2020-12-15 16:28:41 +02:00
powerjungle
b51e46683e
feat(ui): add warning in GUI when running unstable version
Add warning in about window in settings when running a version that isn't
tagged. Also print current running version in log.
2020-12-06 12:56:38 +02:00
sudden6
9c4ebaa238
Merge pull request #6256
powerjungle (1):
      fix(ui): move update elements in about
2020-11-25 00:14:49 +01:00
powerjungle
6527fd4fca
fix(ui): system translation not being updated
This commit fixes an issue when switching from any language back to English,
the system translations remain to be the last language even if the application
translations have switched back to English.
2020-11-24 12:57:48 +02:00
powerjungle
31de0eaf08
fix(ui): move update elements in about
In some languages the "up to date" text can get over the qTox version text, so
this commit moves "up to date" above. The commit also moves the "Update
available" button above and stretches it.
2020-11-24 12:56:36 +02:00
Anthony Bilinski
425e3f6518
Merge branch 'v1.17-dev' 2020-11-23 09:53:13 -08:00
Anthony Bilinski
b42b1f5e15
fix(osx): Update deprecated QDateTime and QProcess APIs 2020-11-22 20:06:33 -08:00
Anthony Bilinski
9e99db51d9
fix(ui): don't notify of available update if local version is newer
This could happen between the time when the release tag is pushed and the time
when the release binaries are published.

Fix #6112

(cherry picked from commit 82547263f8)
2020-11-22 19:57:47 -08:00
Jimi Huotari
ab5a1ce007
refactor(Qt): fix build with Qt 5.15 again
A deprecated function was previously replaced with an overload that
also got recently deprecated [1].

1. https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.15&id=46ebd11e

(cherry picked from commit 6a59f0fe4d)
2020-11-22 19:57:42 -08:00
Jimi Huotari
d9c3279c40
refactor(Qt): fix build with Qt 5.15
This fixes compile-time warnings about deprecated functions when
building with Qt 5.15.

(cherry picked from commit 6d51971c6f)
2020-11-22 19:56:59 -08:00
sudden6
5a46d3c28e
Merge pull request #6253
powerjungle (2):
      fix(translation): match text to translation files
      fix(translation): match text to translation files part 2
2020-11-18 23:58:35 +01:00
powerjungle
98976547fe
fix(translation): match text to translation files part 2
Fixes various issues around the tree.
2020-11-17 14:07:32 +02:00
powerjungle
251beb5b70
fix(translation): match text to translation files
For "Search Contacts" and "By Name".
2020-11-17 11:07:07 +02:00
powerjungle
54d8c35b82
refactor(logging): change VERSION_REGEX_STRING to a const 2020-11-15 15:55:52 +02:00
powerjungle
0ee37a7a09
fix(logging): check if version is stable before other checks
Because the other checks will exit the function before it reaches that if.
2020-11-15 15:23:50 +02:00
powerjungle
90cc962802
feat(logging): check if current code is tagged
This commit adds a new define called "GIT_DESCRIBE_EXACT" through cmake.
It is checked with a regex in "updatecheck.cpp" for a version number after the
check for new updates. If there is no version number,
a warning is output to log.

The reason for the new define is to avoid doing too much regex on
"GET_DESCRIBE", since "GIT_DESCRIBE_EXACT" will not contain a version number if
the code is not tagged.
2020-11-14 12:36:26 +02:00
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
sudden6
2809cd91f5
refactor: remove Core::getInstance from SettingsWidget 2020-05-02 20:08:11 +02:00
sudden6
c1ec6bc649
refactor(widget): remove usage of Core::getInstance 2020-05-02 20:08:06 +02:00