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

118 Commits

Author SHA1 Message Date
Anthony Bilinski
24e4ec3751
fix(model): take QObject receiver argument to interface signal connection macro
receiver QObject is used by Qt to automatically deregister the connection when
the receiver is destroyed. Forward it on to Qt's connect.
2020-02-06 16:48:56 -08:00
Anthony Bilinski
82a4f1b412
fix(model): stop interfaces from inheriting from QObject
Qt doesn't support QObject multiple inheritance, so use our existing interface
macros to declare signals in the interface without QObject, and implement them
in child classes.
2020-02-06 16:48:56 -08:00
Anthony Bilinski
41b2b35ce3
fix(model): return connection from interface macro
connection is normally returned from Qt's connect, and the caller may want to
track the connection to manually disconnect it.
2020-02-06 16:48:56 -08:00
Anthony Bilinski
f252816f55
Merge branch 'v1.17-dev' 2019-12-02 08:46:04 -08:00
Anthony Bilinski
479b39f536
fix(offlingmsg): only dipatch offline messages on friend online change
Before if the new status was online, we would dipsatch, which could cause
double sends in the case of a friend going from e.g. busy -> away
2019-11-25 20:52:06 -08:00
Anthony Bilinski
239dfdc65c
refactor(status): move isOnline into Status from Friend
Allows checking if a status if equivalent to Online without needing a Friend
class.
2019-11-25 20:52:06 -08:00
Anthony Bilinski
f7d82a425d
Merge branch 'v1.17-dev' 2019-10-21 23:49:36 -07:00
Anthony Bilinski
1a726b54cd
fix(history): display broken messages UI with error icon
Allows users to still see their broken messages in the chatlog, but in a way
that's clear that they haven't been delivered and won't be sent.
2019-10-20 02:34:48 -07:00
Anthony Bilinski
527c7d2d3c
refactor(history): represent message state as enum class
ensures that only one state is set at a time, avoids managing multiple bools
2019-10-20 02:34:48 -07:00
Anthony Bilinski
f6a15366ef
fix(history): select broken messages from History, track in ChatLogMessage 2019-10-20 02:34:48 -07:00
Anthony Bilinski
cd75618e38
refactor(history): rename pending message variables
"Sent" to "Delivered", since that's what we're tracking also rename "isOffline"
to "isPending", which is boolean the same, but "isOffline" was opposite of its
correct value before, so boolean reverse the assignment.
2019-10-20 02:34:47 -07:00
Mick Sayson
dbef0b7508
fix(offlinemsg): fix offline message dispatching on history load
* Fix callback hookup order in ChatHistory
* Add correct call to SessionChatLog to insert an unfinished message
* Fix incorrect logic in parsing History database response
2019-10-20 02:34:47 -07:00
Anthony Bilinski
1ad561ca4c
refactor(style): use only one of override, virtual, or final
following https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-override

virtual means exactly and only "this is a new virtual function."
override means exactly and only "this is a non-final overrider."
final means exactly and only "this is a final overrider."

Nothing was changed from e.g. override to final, just reduced duplication of
these labels.
2019-10-19 12:26:50 -07:00
Mick Sayson
4b691f9392 fix(chatlog): Remove invalid usages of raw chatlog indexes
ChatLogIdx is a strong type where the underlying data is only supposed
to be used in very rare circumstances. The ChatLog providing the indexes
provides no guarantees about what the first ChatLogIdx or last
ChatLogIdx will be. This commit removes unnecessary casts to underlying
data and fixes assumptions made about the underlying data
2019-09-21 14:26:14 -07:00
TriKriSta
dbf880078e
feat: save selected search text after scrolling up 2019-08-28 14:26:08 -07:00
TriKriSta
acb91ed731
fix: data validation during the search (fix: #5791, #5723) 2019-08-28 14:25:57 -07:00
sudden6
834baff556
Merge pull request #5793
TriKriSta (5):
      fix: data validation during the search (fix: #5791, #5723)
      feat: check chat status before start a search
      feat: save selected search text after scrolling up
      refactor: optimize load messages during the search
      fix: update workerStb
2019-08-28 21:13:38 +02:00
sudden6
db802822f3
fix: empty username causes mention on ever message
This fixes #2119 and additionally introduces the possibility to mention
users by their public key.
2019-08-26 23:22:17 -07:00
sudden6
641fba3553
fix: empty username causes mention on ever message
This fixes #2119 and additionally introduces the possibility to mention
users by their public key.
2019-08-26 19:08:34 +02:00
TriKriSta
a6a0481ddc feat: save selected search text after scrolling up 2019-08-22 15:11:18 +03:00
TriKriSta
e3c35c9153 fix: data validation during the search (fix: #5791, #5723) 2019-08-21 15:26:18 +03:00
TriKriSta
5aeac56b76 feat: prohibition to remove messages in group chat 2019-07-22 21:16:26 +03:00
TriKriSta
0a9e72020e refactor: edit load history when scrolling 2019-07-22 21:16:26 +03:00
TriKriSta
b807998fe9 refactor: simple edit code 2019-07-22 21:16:26 +03:00
TriKriSta
2a9648d12c feat: add action "Go to current date" 2019-07-22 21:16:26 +03:00
bodwok
77d55d5d7d
fix(search): application crash when starting a search 2019-07-02 12:29:00 +03:00
jenli669
04a9bc46f4
docs(copyright): update and add copyright info
zealously updates and adds qTox copyright information.

Fixes #5713
2019-06-28 01:18:26 +02:00
jenli669
72b39adb75
refactor(startup): clang-format changes to edited files 2019-06-25 10:18:22 +02:00
jenli669
a7df4bfddb
refactor(startup): display last used profile when logging out 2019-06-25 10:17:14 +02:00
Mick Sayson
ed514d7166 refactor(chatform): Remove message handling logic from gui path
Functional changes
* Offline messages are still sent when the chat log is cleared
* Spinner now does not wait for history to be complete, just a receipt
  from our friend
* Export chat and load chat history are now available in group chats
* Merged save chat log and export chat log
  * Note that we lost the info messages in the process

NonFunctional Changes
* FileTransferWidget slots only called for correct file
* Settings::getEnableGroupChatsColor now embedded in
GenericChatForm::colorizeNames
  * Settings::setEnableGroupChatscolor now emits signal connected to
GenericChatForm::setColorizedNames to keep state in sync
* Chatlog history not reloaded on setPassword()
  * I am pretty sure this had no purpose
* Removed a lot of responsibility from ChatForm
  * History moved to ChatHistory implementation of IChatLog
  * OfflineMsgEngine moved to FriendMessageDispatcher
  * Export chat and load chat history moved to GenericChatLog
    * Backed by IChatLog so can be used generically
  * Message processing moved to FriendMessageDispatcher
  * The action of sending files to coreFile is still handled by
  ChatForm, but displaying of the sent messages is done through IChatLog
  -> GenericChatForm
  * Search moved to ChatHistory/SessionChatLog
  * All insertion of chat log elements should be handled by
  GenericChatForm now
* Removed overlapping responsibilities from GroupChatForm
  * Search and message sending goes through ichatlog/messagedispatcher
  too
  * Lots of search functionality pushed down into IChatLog
* Some of the file logic was moved into Widget. This is mostly to avoid
  scope increase of this PR even further.
* History APIs removed that were no longer used
2019-06-21 11:01:35 -07:00
Mick Sayson
e607e6ecb4 refactor(chatlog): Add a class to manage history through the IChatLog interface 2019-06-21 11:01:35 -07:00
Mick Sayson
71f8220925 refactor(chatlog): Add class to manage underlying chatlog state 2019-06-21 11:01:35 -07:00
Mick Sayson
c779d52aef refactor(messages): Replace QRegExp with QRegularExpression 2019-06-21 11:01:10 -07:00
Mick Sayson
fef89d70f9 fix(messages): Fix broken sanitized name for notifications/alert messages
* Note that this fix will not take effect until the message processor is
hooked up to widget and chatform
2019-06-21 11:01:10 -07:00
Mick Sayson
f0d840002a refactor(messages): Create class to manage sending/receiving group messages from core 2019-06-21 11:01:10 -07:00
Mick Sayson
3fd4ce5952 refactor(core): Remove length parameter from splitMessages
* From the archeology I managed, MAX_GROUP_MESSAGE_LEN was a workaround
for an old toxcore bug. Testing removal of this parameter and replacing it
with tox_max_message_length() seems to work fine.
2019-06-21 11:01:10 -07:00
Mick Sayson
22a4c38bfd refactor(messages): Create class to manage sending/receiving friend messages from core 2019-06-21 11:01:10 -07:00
Diadlo
0b9b538601 refactor: Inject DialogsManager in chatrooms 2019-06-19 12:34:06 +03:00
Diadlo
ac36ed8180 refactor: Create interfaces for ContentDialog and ContenDialogManager 2019-06-19 12:34:03 +03:00
jenli669
a1a3749700
fix(group): fix logic oversight and code style 2019-06-15 00:34:02 +02:00
jenli669
c772db3baa
fix(group): always retain own name when updating group peer list
Adds special case for updating our own PK in regeneratePeerList
Format according to format-code.sh

Fixes #5686
2019-06-14 23:46:41 +02:00
Mick Sayson
e5016337bb refactor(offlinemsg): Decouple OfflineMsgEngine from other components 2019-05-26 15:33:51 -07:00
Anthony Bilinski
b7bd7c6215
refactor(group): move peer tracking logic to Group from GroupChatForm
* increase signal granularity
* reduce state in GroupChatForm
* remove differentiation of "joined" and "online" peers, it doesn't exist in toxcore and can't be tracked reliably in qTox
* add system message when peer name changes, even if due to alias
* add system message when self name changes, for clarity
2019-05-15 12:00:44 -07:00
Anthony Bilinski
ef554496fa
refactor(group): rename class members 2019-05-15 11:54:10 -07:00
Anthony Bilinski
04f1ccda35
fix(group): treat empty peer names like empty friend names, by showing pk
Fix #5660
2019-05-15 11:52:27 -07:00
Anthony Bilinski
08839b7052
refactor(group): remove redundant updatePeer API 2019-05-15 00:13:55 -07:00
Anthony Bilinski
6801298e96
fix(groups): don't add friend alias to groups they aren't in
Fix #5657
2019-05-13 23:58:24 -07:00
Anthony Bilinski
881aa3083a
fix(status): use enum as UI property instead of untranslated string
Translation of getStatusTitle introduced in 15d72a9610, breaking asset path from string.
2019-04-24 10:35:17 -07:00
Anthony Bilinski
e1876a2691
refactor(status): remove Status::getFromString and Status::getIconPixmap
getFromString is unused and incompatible with translated UI names, getIconPixmap is unused and completely generic.
2019-04-24 10:35:16 -07:00
Anthony Bilinski
dd007877a9
refactor(status): move Status out of Widget 2019-04-24 10:35:15 -07:00