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

272 Commits

Author SHA1 Message Date
Diadlo
3b2352a0ee
refactor: Rename methods in CameraSource
To make the method more correctly reflect the essence
2017-07-05 23:53:17 +03:00
Diadlo
3c21af200c
revert: "refactor(core): Remove unused Core::reset method"
This reverts commit 4664c6249a.
2017-07-05 23:53:06 +03:00
Diadlo
efcad35fd5
fix: Fix warning about stack protection
Replace local array on stack with dynamic size on QByteArray with
dynamic size
2017-06-12 13:46:42 +03:00
Diadlo
8e93af7fca
refactor: Add copy and move assignment operator to toxid and toxpk
Add assignment operator to classes which has copy constructor
2017-06-12 13:46:42 +03:00
Diadlo
7895bcdaa0
refactor: Remove useless check
uint32_t always greater of equal 0
2017-06-12 12:42:54 +03:00
Diadlo
65b1463933
refactor(core): Move setAvatar to profile from core 2017-05-24 19:43:47 +03:00
Diadlo
4664c6249a
refactor(core): Remove unused Core::reset method 2017-05-24 19:43:47 +03:00
sudden6
50768abbab
Merge pull request #4394
Yuri (1):
      fix(message size): Replaced TOX_MAX_*_LENGTH with API calls.
2017-05-14 12:53:41 +02:00
Maxim Biro
4e5b191553 fix(core): use correct byte representation when bootstrapping
Revert a bug introduced in d126b18d76
where qTox calls tox_bootstrap() and tox_add_relay() with an invalid
argument, which results in qTox not connecting to the bootstrap nodes
from its list of bootsrap nodes and therefore failing to connect to the
Tox DHT network in the case when that list is the only source of nodes
to connect to. The invalid argument is node's public key, which is
non-nullable but is passed a null due to invalid ToxPk object being
constructed. ToxPk's constructor expects the QByteArray argument to be
the byte representation of a public key, but a textual representation
is passed to it instead, which creats an invalid ToxPk that resolves to
null when queried for public key's bytes for calls to  tox_bootstrap()
and tox_add_relay().

Fixes #4385
2017-05-11 17:19:28 -04:00
Yuri
3963d3c150 fix(message size): Replaced TOX_MAX_*_LENGTH with API calls.
It is good for flexibility to have fewer hardcoded values.
2017-05-11 09:24:54 -07:00
Diadlo
b126d21922
refactor(core): Merge friendAdded and friendshipChanged 2017-05-08 22:12:14 +03:00
Diadlo
49e9eb8de2
refactor(core): Move saving request to history to Profile 2017-05-08 22:12:14 +03:00
Diadlo
b25f5b5ed6
fix(core): Add action message with friend request text 2017-05-08 22:12:14 +03:00
sudden6
407413c65b
fix(core): add missing nullptr check
fix #4324
2017-05-07 01:03:35 +02:00
noavarice
532e05cb0f fix: fixed segfault after accepting group invite
Fix #4327
Description:
  - QString::arg call with mulpiple arguments replaced with chained
    QString::arg calls;
  - dynamic memory allocation for array of names replaced with
    allocation on the stack, unfortunately I do not notice this while
    making Core refactoring.
Also code style is formatted with script
2017-04-12 22:57:31 +03:00
Yuri
e597d391fc fix(includes): Added missing #include <ctime>
time(3) requires this include. Found when qTox failed to build on the FreeBSD due to the missing include.
2017-04-11 00:04:48 -07:00
sudden6
20db8b740b
fix(core): don't continue when the tox file is corrupted 2017-04-04 11:43:24 +02:00
noavarice
c1e01710b4 refactor: returned correct code format 2017-04-03 21:05:25 +03:00
noavarice
931e5803cd refactor: next part of Core refactoring
Changes:
  - several parts of code extracted into single methods;
  - fixed several TODO's
2017-04-03 16:13:56 +03:00
noavarice
d126b18d76 refactor: Core refactoring
Brief list of changes:
  - removed unnecessary headers from core.h and core.cpp;
  - added missing brackets and aligned long lists of parameters;
  - some other small changes.
2017-04-03 16:13:56 +03:00
sudden6
aeb9df0750
refactor(core): reduce line lenghts 2017-03-28 21:57:14 +02:00
sudden6
3e50757ddb
refactor(profile): reduce code duplication 2017-03-28 21:57:13 +02:00
Diadlo
add8d51a29
refactor: ContentDialog refactoring 2017-03-21 01:38:03 +03:00
sudden6
4e548662d7
refactor(core): remove CString 2017-03-09 11:01:43 +01:00
sudden6
25c279c320
refactor(core): replace CString with ToxString 2017-03-09 11:01:43 +01:00
sudden6
1f0467bb1b
refactor(core): add new class for easy string conversion 2017-03-09 11:01:34 +01:00
Diadlo
ea50eaaef7
fix(core): Ignore online connection status
Fix #4010.

qTox use status system, where offline is one of the status, but toxcore
use two different meaning: 'connection' and 'user status'. To correct
qTox status handling we should ignore online connection status.
2017-03-08 08:55:17 +03:00
sudden6
aabf34ebad
refactor: remove unused file 2017-03-05 12:05:41 +01:00
Zetok Zalbavar
80f5de31b3
style: reformat current C++ codebase using clang-format 2017-02-26 11:52:45 +00:00
tux3
c75ee8a661
fix: Various IPC event handling and related bugs on startup
Fixes #1926 : When an IPC event was processed locally, if the window was closed before the core could start, the event handler would be forever stuck in the background waiting for the core to start. We fix this by substituting QApplication::quit() by a Nexus::quit() function and a Nexus::isRunning() function, which gives us a condition for exiting blocking processEvents() loops. We cannot simply use QApplication::quit(), because this function has no effect before the start of the event loop.

The problem was further exacerbated by the Tox URI event handler being (incorrectly) blocking. The IPC owner would block in this event handler, and the sender of the event would give up waiting and process the event itself a second time, potentially triggering the first bug. We fix the event handlers accordingly to be (mostly) non-blocking.

Also fixes a related deadlock between ~Core and ~Profile in the case of an early exit
2017-02-17 17:18:52 +01:00
sudden6
14ee8af3cd
fix(toxencrypt): return the plaintext after decryption
fix #4162
2017-02-10 22:33:57 +01:00
sudden6
01b9327827
Merge pull request #4146
agrecascino (1):
      fix(audio): alternate audio fix implementation from #4139
2017-02-08 13:34:22 +01:00
agrecascino
62ac480171 fix(audio): alternate audio fix implementation from #4139 2017-02-07 15:44:35 -05:00
sudden6
7cd800374a
refactor(encryption): move everything to ToxEncrypt
This commit removes coreencryption.cpp and replaces it with ToxEncrypt.
2017-02-07 20:05:32 +01:00
Diadlo
f5c0d61ae6
feat(toxpk): Add 'ToxPk::getPkSize()' method 2017-02-07 20:10:44 +03:00
sudden6
a5955c67ed
feat(toxencrypt): add function to get min length for isEncrypted() to
succeed

Also improve documentation
2017-02-06 11:09:59 +01:00
sudden6
38cecdc780
refactor(history): remove deprecated historykeeper
This commit removes historykeeper and code only used by it.

BREAKING CHANGE:
qTox can't open old historykeeper chatlogs after this commit. Use
previous versions to migrate to the new database.
2017-02-05 22:20:12 +01:00
sudden6
5c5dce4d33
refactor(core): use factory methods for ToxEncrypt 2017-01-29 13:48:48 +01:00
sudden6
d07d0cfbf0
refactor(core): Introduce new class ToxEncrypt to interface with toxencryptsave 2017-01-29 13:48:43 +01:00
Diadlo
320099faf8
fix(chatform): Add ability to cancel call
Fix #4016.
2017-01-29 00:37:31 +03:00
Diadlo
29bb319025
refactor(friend): Small refactoring
Method renamed to be same with `Group` i.e. `getGroupId`, changed Friend
eventFlag type on bool
2017-01-05 00:56:32 +03:00
sudden6
e07d8d358f
feat(toxid): reduce passing Tox IDs around
reasons:
- most of the time we don't even know the Tox ID but only the Public Key
- use well defined objects instead of strings that could be anything
2017-01-04 00:20:24 +01:00
sudden6
2f4e8dc3e8
refactor(toxpk): add class representing a Tox Public Key 2017-01-02 22:58:05 +01:00
sudden6
0b2f22d521
refactor(toxid): improve checks for valid ToxIDs 2016-12-30 15:54:56 +01:00
Zetok Zalbavar
541bc0e174
refactor(core): simplify code for tox interval during file transfer
Also some style changes.
2016-12-30 13:57:55 +00:00
Zetok Zalbavar
d4ac13dbf4
revert: "refactor: Added to include path and exclude it from all includes"
Revert needed, since otherwise there is no way to do automatic sorting
of includes.
Also reverted change to the docs, as leaving it would make incorrect
docs.

In case of conflicts, includes were sorted according to the coding
standards from #3839.

This reverts commit b4a9f04f92.
This reverts commit 5921122960.
2016-12-29 16:10:53 +00:00
sudden6
d196611ffe
feat(toxid): Improve validation of Tox IDs 2016-12-29 13:37:01 +01:00
sudden6
3d0938a3c6
refactor(toxid): improve code clarity and documentation 2016-12-29 13:37:01 +01:00
sudden6
152c134a4b
refactor(toxid): drop the cData class in favour of ToxId 2016-12-29 13:37:01 +01:00
sudden6
94ec5614f2
feat(toxid): Improve the ToxId class 2016-12-29 13:36:56 +01:00