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
Mick Sayson
c7efe320d2 refactor(filetransfer): Move file transfer progress into ToxFile
* Refactor/test ToxFileProgress to ensure that when it's moved it
  behaves well
* Notice problems with speed averaging. We were average speeds without
  keeping track of the times they were over. Adding samples of different
  lengths would result in incorrect speeds. Refactor whole class to correct
* Move ToxFileProgress to be a member of ToxFile
* Remove duplicated members between ToxFile and ToxFileProgress
* Move sample addition into CoreFile
2021-12-11 15:38:35 -08:00
Mick Sayson
3bc4aa52be fix(filetransfer): Fix UI inconsistencies with pause/resume 2021-12-11 13:56:08 -08:00
sudden6
3c58b992c6
perf: reduce repainting in animations
By profiling qTox using perf I discovered, that
NotificationIcon::updateGradient takes significant amount of CPU time
even though qTox is idle and no one is typing.

This commit fixes:

1) correctly determine visibility of NotificationIcon
2) only invalidate boundingRect in fixed intervals
3) apply the same fixes to Spinner since it has the same problem
2021-11-28 12:45:14 +01:00
Anthony Bilinski
54a2b8970b
chore(review): Copyright notice cleanup 2021-11-21 16:19:22 -08:00
Mick Sayson
ffef0e3796
refactor(chatlog): Rename ChatLog -> ChatWidget
* Makes the distinction between IChatLog (the model class) and
  ChatWidget (the view class) more clear
2021-11-21 16:18:45 -08:00
Mick Sayson
3757f733cc
refactor(chatlog): Remove unused getRow functions from ChatLine
* The getRow functions would not track correctly since the rows indexes
  cannot be fixed to the view anymore
2021-11-21 16:18:44 -08:00
Mick Sayson
b36a38e716
feat(chatlog): Re-implement sliding window ChatLog view
* Replace lines/messages with helper class to synchronize state between
  IChatLog and ChatLog more easily
* selection indexes have been replaced with ChatLine::Ptrs, this is to
  ensure consistency while the view slides around
    * This has another benefit of removing all the code that has to
      manually slide the selection boxes around
* Replaced all insertion/removal functions with single "insertAtIdx".
  This helps ensure that mappings between ChatLogIdx and position within
  the view are captured correctly as items in the view slide around
* workerTimeout replaced with more generic name "renderFinished" that is
  used in synchronous and asynchronous paths
* Removed unused function ChatForm::insertChatMessage
* Re-implemented "Go to current date" with new ChatLog APIs
* Removed unused GenericChatForm::addSystemDateMessage. This is handled
  by ChatLog now
* Resolves #6223
* Resolves #5878
* Resolves #5940
2021-11-21 16:18:44 -08:00
Mick Sayson
a9f7c0ca7e
refactor(chatlog): Store ChatLine::Ptr in messages instead of ChatMessage
* This simplifies future refactoring since the rest of ChatLog expects
  to be working with the base class
2021-11-21 16:18:40 -08:00
Mick Sayson
b7a88cde6e
refactor(chatlog): Move rendering of messages from GenericChatForm -> ChatLog
* Simplifies reasoning about who owns what functionality between
  GenericChatForm and ChatLog. GenericChatForm is now just a layout
  class and ChatLog handles all interactions with retrieving and
  displaying messages from the model
* Reasoning for work is described in more detail in #6223
2021-11-21 16:18:32 -08:00
Mick Sayson
dd7df35720
revert(chatlog): Revert cleanup
* Fix compilation issues caused by incorrect merges
2021-11-21 16:17:35 -08:00
Mick Sayson
00ab89c3ce
revert(chatlog): "feat: load messages from the database before date"
This reverts commit fb2957c5ee.
2021-11-21 16:17:35 -08:00
Anthony Bilinski
041b697e77
revert(chatlog): "load messages from the database after date"
This reverts commit b705ac8060.
2021-11-21 16:17:35 -08:00
Anthony Bilinski
31346423e1
revert(chatlog): "edit function "Load chat history""
This reverts commit 6de1173c17.
2021-11-21 16:17:34 -08:00
Mick Sayson
6c34fad9b6
fix(history): Fix qt deprecation warning
Qt 5.15 has QDateTime(QDate()) deprecated. Fix a usage of the deprecated
constructor introduced in parent commit
2021-11-21 16:17:15 -08:00
Anthony Bilinski
1104417022
revert(chatlog): "edit load history in search"
This reverts commit 8c4b1e00a1.
2021-11-21 16:17:10 -08:00
Anthony Bilinski
f29e948bed
revert(chatlog): "add action "Go to current date""
This reverts commit 2a9648d12c.
2021-11-21 16:17:10 -08:00
Anthony Bilinski
b9cf7f428d
revert(chatlog): "edit position chat after load history"
This reverts commit c2d5b422b3.
2021-11-21 16:17:10 -08:00
Anthony Bilinski
340496bd6e
revert(chatlog): "remove part messages from chat"
This reverts commit 4c7ecb6024.
2021-11-21 16:17:10 -08:00
Anthony Bilinski
bdbf1f61a8
revert(chatlog): "simple edit code"
This reverts commit b807998fe9.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
b0b74cfe92
revert(chatlog): "edit load history when scrolling"
This reverts commit 0a9e72020e.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
af3e0183b6
revert(chatlog): "prohibition to remove messages in group chat"
This reverts commit 5aeac56b76.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
db3eaa8872
revert(chatlog): "fix a crash when there are no messages to load"
This reverts commit 040c6b95ae.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
3a19eaddb5
revert(chatlog): "fix: data validation during the search"
This reverts commit acb91ed731.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
59efeeb3e7
revert(chatlog): "feat: check chat status before start a search"
This reverts commit ce570927b1.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
37b58ee8ee
revert(chatlog): "feat: save selected search text after scrolling up"
This reverts commit dbf880078e.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
db0656a92c
revert(chatlog): "optimize load messages during the search"
This reverts commit 6de307e6b9.
2021-11-21 16:17:08 -08:00
Anthony Bilinski
cf76ae0869
revert(chatlog): "update workerStb"
This reverts commit 177bf12f11.
2021-11-21 16:17:08 -08:00
Anthony Bilinski
335ce790e9
revert(chatlog): "scroll bar stuck to bottom (fix #5755)"
This reverts commit 38df897e02.
2021-11-21 16:17:08 -08:00
Anthony Bilinski
146d93e159
revert(chatlog): "add comments for functions that load history"
This reverts commit 5fc1afbab5.
2021-11-21 16:17:08 -08:00
Anthony Bilinski
5fc273da94
revert(chatlog): partially revert "prevent invalid history access"
This partially reverts commit e3e6e1d9c4.
2021-11-21 16:17:08 -08:00
Anthony Bilinski
e18725c966
revert(chatlog): "fix stick to bottom behavior"
This reverts commit f2fa601073.
2021-11-21 16:17:08 -08:00
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