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

3987 Commits

Author SHA1 Message Date
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
Anthony Bilinski
6105af8279
fix(ipc): allow IPC under windows by not using std::random_device with mingw
https://en.cppreference.com/w/cpp/numeric/random/random_device
"A notable implementation where std::random_device is deterministic is old
versions of MinGW (bug 338, fixed since GCC 9.2)."

Although time is less random off Windows, we don't need a strongly random
number for this, and using time avoids having to use platform specific code.

Fix #2917
2020-04-30 19:26:18 -07:00
Anthony Bilinski
82547263f8
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
2020-04-28 03:58:18 -07:00
iphydf
25a7817229
chore(videosurface): Use UNIX line endings. 2020-04-27 23:11:59 +00:00
Anthony Bilinski
00d08d9887
Merge branch 'v1.17-dev' 2020-04-24 18:37:27 -07:00
Anthony Bilinski
c748b5a8d0
Merge branch 'v1.17-dev' 2020-04-24 18:35:00 -07:00
iphydf
58b4c19709
chore: remove extra ;
These are misleading in some cases, or at least not useful in others.
Most cases of Q_UNUSED in qtox don't have a ;, so this seems acceptable.
2020-04-22 23:55:51 +00:00
Anthony Bilinski
2c59c92030
fix(db): Support opening and upgrading to any of three SQLCipher params
Fix #5952
2020-04-18 14:39:41 -07:00
iphydf
e71225268f
chore: Various code cleanups.
* Reorder class data members and/or constructor initialisers to match,
  reducing confusion about when members will be initialised.
* Remove (most) unused variables. Not removed: some global variables with
  `TODO(sudden6)` on them for using them in the future. I don't know how
  far into the future sudden6 wants to use them, so I left them there for
  now.
* Distinguish different bootstrap nodes in the logs by index in the
  bootstrap node list. Originally, we used to log the address/port of the
  node we're bootstrapping to. This was removed out of privacy concerns
  (even though the bootstrap nodes are public). This made the logs much
  less useful when debugging why the client isn't connecting. Having
  indices makes it easier to see that different nodes are being selected,
  and makes it possible to determine which node was selected.
* Explicitly cast unused results of Tox API functions to `void` when all
  we want is to know whether the function succeeds or not.
* Don't try to `#include <unistd.h>` on Windows. It does not exist on
  MSVC.
* Remove extra `;` after function definitions.
* Remove reference indirection of QJsonValueRef, since a copy of that ref
  (small pointer-like object) has to be made anyway when iterating over
  QJsonArrays.
* Make some file-scope global state `static`.
* Use `nullptr` instead of `NULL`.
* Add `#if DESKTOP_NOTIFICATIONS` around the code that implements desktop
  notifications, so it becomes a bit easier to compile everything with a
  single compiler command - useful for manually running static analysers.
* Fix an error on MSVC where `disconnect` is looked up to be a non-static
  member function and the `this` capture is missing.
* Consistently use `struct` and `class` tags for types.
* Use references in ranged-for where it reduces copies.
* Move private static data members out of the Style class and into
  file-local scope. There is no need for them to be in the class. Also
  marked them `const` where possible.
* Removed unused lambda capture.
* Ensure qTox can compile under NDEBUG with `-Wunused-variable` by
  inlining the unused variable into the `assert` that was its only
  target.
* Minor reformatting in core_test.cpp.
2020-04-16 19:07:40 +00:00
Anthony Bilinski
deb7fbb67c
fix(db): Add half-upgraded cipher params
Our previous SQLCiper upgrade code attempted to set SQLCipher 4.0
default params. If SQLCipher 3.x was used at that time, it would result
in only half upgrading the params, since SQLCipher 3.x doesn't support
PRAGMA cipher_hmac_algorithm or PRAGMA cipher_kdf_algorithm. This means
that our databases could be saved with any of three sets of SQLCipher
params.
2020-04-14 23:38:44 -07:00
Anthony Bilinski
2fe1918083
feat(ipc): make IPC user specific
This allows multiple users on a system each running qTox to use IPC at once.

Fix #6076
2020-04-14 20:32:12 -07:00
Anthony Bilinski
d028f9e394
chore(cleanup): replace remaining deprecated toxcore enums
Some were missed in 5ae738f818.

Fix #5997
2020-04-13 09:25:20 -07:00
TriKriSta
c13ede85df
fix(ui): add vertical spacer to profileform 2020-04-13 00:56:39 -07:00
Anthony Bilinski
7b7950e7f7
revert(chatlog): "load messages from the database after date"
This reverts commit b705ac8060.
2020-04-12 22:40:11 -07:00
Anthony Bilinski
c75d8c8d3e
revert(chatlog): "edit function "Load chat history""
This reverts commit 6de1173c17.
2020-04-12 22:40:11 -07:00
Anthony Bilinski
8e03aa4b17
revert(chatlog): "edit load history in search"
This reverts commit 8c4b1e00a1.
2020-04-12 22:40:10 -07:00
Anthony Bilinski
5efb0ba020
revert(chatlog): "add action "Go to current date""
This reverts commit 2a9648d12c.
2020-04-12 22:40:10 -07:00
Anthony Bilinski
8c3f3199ef
revert(chatlog): "edit position chat after load history"
This reverts commit c2d5b422b3.
2020-04-12 22:40:10 -07:00
Anthony Bilinski
ccc7107f92
revert(chatlog): "remove part messages from chat"
This reverts commit 4c7ecb6024.
2020-04-12 22:40:10 -07:00
Anthony Bilinski
3f36b31f8b
revert(chatlog): "simple edit code"
This reverts commit b807998fe9.
2020-04-12 22:40:10 -07:00
Anthony Bilinski
8f167f45a3
revert(chatlog): "edit load history when scrolling"
This reverts commit 0a9e72020e.
2020-04-12 22:40:10 -07:00
Anthony Bilinski
bd0ef5de82
revert(chatlog): "prohibition to remove messages in group chat"
This reverts commit 5aeac56b76.
2020-04-12 22:40:09 -07:00
Anthony Bilinski
3ac6b578df
revert(chatlog): "fix a crash when there are no messages to load"
This reverts commit 040c6b95ae.
2020-04-12 22:40:09 -07:00
Anthony Bilinski
35c5e77a8a
revert(chatlog): "fix: data validation during the search"
This reverts commit acb91ed731.
2020-04-12 22:40:09 -07:00
Anthony Bilinski
6395ce3aae
revert(chatlog): "feat: check chat status before start a search"
This reverts commit ce570927b1.
2020-04-12 22:40:09 -07:00
Anthony Bilinski
c1d0624b5d
revert(chatlog): "feat: save selected search text after scrolling up"
This reverts commit dbf880078e.
2020-04-12 22:40:09 -07:00
Anthony Bilinski
83d5863bbe
revert(chatlog): "optimize load messages during the search"
This reverts commit 6de307e6b9.
2020-04-12 22:40:09 -07:00
Anthony Bilinski
306bbb424e
revert(chatlog): "update workerStb"
This reverts commit 177bf12f11.
2020-04-12 22:40:08 -07:00
Anthony Bilinski
4cd443ae7b
revert(chatlog): "scroll bar stuck to bottom (fix #5755)"
This reverts commit 38df897e02.
2020-04-12 22:40:08 -07:00
Anthony Bilinski
efff8d53c9
revert(chatlog): "add comments for functions that load history"
This reverts commit 5fc1afbab5.
2020-04-12 22:40:08 -07:00
Anthony Bilinski
5d44cd773f
revert(chatlog): partially revert "prevent invalid history access"
This partially reverts commit e3e6e1d9c4.
2020-04-12 22:40:08 -07:00
Anthony Bilinski
b04639c6d0
revert(chatlog): "fix stick to bottom behavior"
This reverts commit f2fa601073.
2020-04-12 22:40:08 -07:00
Anthony Bilinski
5da1e4b9a8
revert(chatlog): "enable dynamic view range in chatlog with history disabled"
This reverts commit a7f3495956.
2020-04-12 22:40:08 -07:00
Anthony Bilinski
6e2ac12d84
fix(avatar): reject avatars that are larger than 64KB
This will prevent qTox from auto-accepting arbitrarily large avatars. Avatars
are already limited by TCS 2.2.4 to 64KB, so we would only receive larger
avatars from badly behaving clients.
2020-04-10 15:32:35 -07:00
bodwok
1aad91944e
fix(chatlog): fixed rendering of new messages when scrolling up 2020-04-07 19:58:00 +03:00
Jimi Huotari
6a59f0fe4d 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
2020-04-03 00:39:46 +03:00
Anthony Bilinski
ef8c2b7cb3
Merge branch 'v1.17-dev' 2020-03-28 01:43:40 -07:00