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

4094 Commits

Author SHA1 Message Date
Brandon Mosher
1438f8f766 refactor: Provide a Virtual Method Anchor for Classes in Headers
Define at least one virtual method in polymorphic class cpp files to
improve link efficiency. Do so by defining a defaulted destructor or
another overridden virtual method in the class cpp file.
Also add explicitly defaulted copy/move constructors and assignment
operators to follow the rule of five and to avoid compiler suppression
of these functions due to the addition of a user-provided destructor.
Where neccessary, create new cpp files and add them to CMakeLists and
Testing.cmake. Set the -Wweak-vtables by default when compiling with
clang to issue warnings for new classes that do not comply with this
pattern.

See http://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers.

Fixes #6036.
2021-10-26 16:47:40 +00:00
woxcab
d621d74511
fix(ui): reorder the window title 2021-10-24 23:30:30 -07:00
Anthony Bilinski
26f021e8bd
Merge pull request #6388
bodwok (1):
      fix(ui): contact list optimization
2021-10-24 22:29:14 -07:00
Mick Sayson
7c218b389d
feat(chatlog): Add image preview on paste
Reuse code from the file transfer widget to provide an image preview
on paste/grab. This prevents users from accidentally sending images they
did not mean to when their clipboard is not in the state they thought it
was.

Implementation exposes the genericchatlog vbox to the child classes and
chatform injects the imagepreview into it.
2021-10-24 22:06:58 -07:00
Anthony Bilinski
8462207a58
Merge pull request #6387
Jimi Huotari (2):
      fix(build): don't connect UpdateCheck when -DUPDATE_CHECK=OFF
      fix(UI): hide update related elements when -DUPDATE_CHECK=OFF
2021-10-24 20:45:52 -07:00
Anthony Bilinski
552cb0dc74
Merge pull request #6391
Mick Sayson (1):
      fix(toxext): Protect use of toxext modifying functions
2021-10-24 19:45:09 -07:00
Anthony Bilinski
69cd33b733
fix(chatform): Scroll to bottom on load, broken on refactor
Fix #6314
2021-10-24 16:42:46 -07:00
Anthony Bilinski
06195c0caf
Merge pull request #6311
Mick Sayson (1):
      feat(history): Save/load system messages to history
2021-10-24 05:37:44 -07:00
Anthony Bilinski
0d3be5aab3
Merge pull request #6310
Mick Sayson (1):
      feat(chatlog): Add SystemMessages to SessionChatLog
2021-10-24 05:35:22 -07:00
Mick Sayson
18109b2f7f feat(history): Save/load system messages to history 2021-10-16 14:29:57 -07:00
Mick Sayson
916834fb9c feat(chatlog): Add SystemMessages to SessionChatLog
* Rendering of system messages consolidated into single place
* API added to ichatlog to insert a system message at current location
* System messages are now used as type + args which will fit nicely with
  the work in #6221
2021-10-16 14:29:57 -07:00
Mick Sayson
5ddb8caa97 fix(toxext): Protect use of toxext modifying functions
When running with -DASAN on and a mod to send 10k messages in quick
succession I was seeing memory corruption within toxext. This was caused
by a race between toxext_iterate and toxext_send being called from
different threads.

Protect the use of functions coming from different threads with a mutex
2021-10-10 15:16:22 -07:00
bodwok
45b69519c4
fix(ui): contact list optimization 2021-10-05 01:04:06 +03:00
Jimi Huotari
db8af0561d fix(UI): hide update related elements when -DUPDATE_CHECK=OFF 2021-10-03 02:25:06 +03:00
Jimi Huotari
50063f76ab fix(build): don't connect UpdateCheck when -DUPDATE_CHECK=OFF 2021-10-03 02:24:48 +03:00
Anthony Bilinski
da5c165f41
fix(appimage): Use external binary path when enabling autorun from appimage
Fix #6241
2021-09-23 21:05:27 -07:00
sudden6
bde6dc0df0
fix: change color equation for groupchat names 2021-08-29 01:04:43 +02:00
sudden6
c95057283e
fix: correctly destroy on group remove 2021-08-28 00:26:45 +02:00
Anthony Bilinski
a24f99df0d
Merge pull request #6347
bodwok (4):
      refactor(ui): separation of responsibility for sorting the contact list
      fix(build): include QVector type
      refactor(ui): code improvement
      refactor(ui): code improvement
2021-06-30 09:35:10 -07:00
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