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

7539 Commits

Author SHA1 Message Date
Douglas Rhine
442850ac59
chore(flatpak): update runtime to 5.14 2020-04-20 15:08:50 +01:00
sudden6
9e7f2a67dc
Merge pull request #6093
iphydf (1):
      fix(osx): OSX updater dependency moved.
2020-04-19 17:04:06 +02:00
sudden6
1bd5e94edd
Merge pull request #6094
iphydf (1):
      chore: Various code cleanups.
2020-04-19 16:57:08 +02:00
sudden6
0f338f749c
Merge pull request #6092
iphydf (1):
      fix(osx): Add camera and microphone usage description.
2020-04-17 00:42:46 +02: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
iphydf
6d99e9099f
fix(osx): OSX updater dependency moved. 2020-04-16 15:47:51 +00:00
iphydf
5f1338dd78
fix(osx): Add camera and microphone usage description.
NSCameraUsageDescription and NSMicrophoneUsageDescription are needed on
newer macOS versions (10.14+) to get access to camera/microphone. This
text is shown to the user when they need to press the "allow" button.
2020-04-16 15:46:50 +00: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
Anthony Bilinski
35f89612ff
chore(cleanup): don't add semicolon to Q_DECLARE_METATYPE
Remove missed cases from ad042b09e0.

Fix #6007
2020-04-13 01:06:30 -07:00
Anthony Bilinski
bd339d2cb6
chore(build): stop using removed cmake options
Options were removed in https://github.com/qTox/qTox/pull/5888
2020-04-12 01:52:06 -07:00
Anthony Bilinski
b2b2fa149e
Merge pull request #6074
bodwok (1):
      fix(chatlog): fixed rendering of new messages when scrolling up
2020-04-12 00:02:23 -07:00
bodwok
1aad91944e
fix(chatlog): fixed rendering of new messages when scrolling up 2020-04-07 19:58:00 +03:00
sudden6
f6daafe914
Merge pull request #6064
Piraty (1):
      fix(build): make pkg-config verbose about why it fails
2020-04-04 00:54:21 +02:00
sudden6
bd35cdde00
Merge pull request #6062
Jimi Huotari (1):
      refactor(Qt): fix build with Qt 5.15 again
2020-04-04 00:53:38 +02:00
Piraty
e4c7d81ab2 fix(build): make pkg-config verbose about why it fails
Switch from `pkg_search_module` to `pkg_check_modules` to find .pc and
evaluate .pc files of dependencies. Now, in case of any errors, a clear
message is issued about what is wrong, making it obvious what to do.

As of c-toxcore-0.2.11, my system's toxcore.pc file contains this line:
```
Requires.private: libsodium opus vpx
```

Previously, with opus missing, cmake/Dependencies.cmake through an error
about toxcore not being found, but never actually told why (also it was
misleading, because opus was missing, not toxcore).

Before:
```
<...>
-- Checking for one of the modules 'toxcore'
-- TOXCORE not found
-- Checking for one of the modules 'toxav'
-- TOXAV not found
<...>
```

After:
```
<...>
-- Checking for module 'toxcore'
--   Package 'opus', required by 'toxcore', not found
-- TOXCORE not found
-- Checking for module 'toxav'
--   No package 'toxav' found
-- TOXAV not found
<...>
```
2020-04-03 19:53:24 +02: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
sudden6
da0bae5430
chore(nodes): update bootstrap nodes and tools
Add a script to update bootstrap nodes from nodes.tox.chat.
Update maintainer instructions for release.
2020-03-29 19:30:44 +02:00
Anthony Bilinski
ef8c2b7cb3
Merge branch 'v1.17-dev' 2020-03-28 01:43:40 -07:00
Anthony Bilinski
4f7056385f
refactor: remove dependency on libfilteraudio
The audio filtering/echo compensation didn't ever work reliably, so just
remove it.
2020-03-23 18:24:23 -07:00
Anthony Bilinski
ad042b09e0
chore(cleanup): don't add semicolon to Q_DECLARE_METATYPE
It is uneeded and prevents enabling of warnings for uneeded semicolons after
classes or namespaces

Fix #6007
2020-03-23 18:21:14 -07:00
Anthony Bilinski
5ae738f818
chore(cleanup): replace remaining deprecated toxcore enums with newer versions
Fix #5997
2020-03-23 18:20:39 -07:00
Anthony Bilinski
f373107f63
chore(cleanup): add Wunknown-pragmas, fix pragma typos
Fix #6035
2020-03-23 18:04:35 -07:00
sudden6
7c59ffb24b
chore(deps): update c-toxcore to v0.2.11 2020-03-23 21:09:23 +01:00
sudden6
d77c41814f
chore: update libsodium for CI builds 2020-03-23 21:09:23 +01:00
sudden6
c4233afc4f
chore: update sqlite to 4.3.0 2020-03-23 21:09:23 +01:00
Anthony Bilinski
715794f664
chore(build): fix implicit narrowing warning by making it explicit
Exact accuracy isn't needed for the normalized value, being off by one part per
quadrillion is ok.

Fix #6000
2020-03-22 04:06:45 -07:00
sudden6
be80fcf6f3
Merge pull request #5855
Vincas Dargis (3):
      feat(apparmor): Add AppArmor 2.13.3 profile
      feat(apparmor): Update AppArmor 2.13.3 profile
      docs(apparmor): Update AppArmor documentation.
2020-03-22 12:04:39 +01:00
Anthony Bilinski
2b981d88a2
fix(interface): use virtual destructors for all interfaces
Avoids memory leak if derived classes are deleted through interface pointer.

Fix #6006
2020-03-22 01:59:24 -07:00
Anthony Bilinski
f53e44b62c
chore(cleanup): don't std::move for return statement
std::moveing prevents RVO, and even in cases where RVO can't take place, move
will be used if possible.

Fix #6011
2020-03-22 01:39:10 -07:00
sudden6
205bfa56ca
chore(l10n): update translations from Weblate
Alexander Ritter (1):
      feat(l10n): update German translation from Weblate

Allan Nordhøy (2):
      feat(l10n): update Norwegian Bokmål translation from Weblate
      feat(l10n): update Norwegian Bokmål translation from Weblate

Andrey (1):
      feat(l10n): update Russian translation from Weblate

Branko Kovačević (1):
      feat(l10n): update Serbian (latin) translation from Weblate

Dan Baeza (4):
      feat(l10n): update Portuguese (Brazil) translation from Weblate
      feat(l10n): update Italian translation from Weblate
      feat(l10n): update Spanish translation from Weblate
      feat(l10n): update French translation from Weblate

Deleted User (1):
      feat(l10n): update German translation from Weblate

Kristjan Räts (1):
      feat(l10n): update Estonian translation from Weblate

Milo Ivir (1):
      feat(l10n): update Croatian translation from Weblate

Moo (1):
      feat(l10n): update Lithuanian translation from Weblate

Oguz Ersen (1):
      feat(l10n): update Turkish translation from Weblate

Vladimir Studinsky (1):
      feat(l10n): update German translation from Weblate

Xoronic (5):
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate

Zarko Gjurov (1):
      feat(l10n): update Macedonian translation from Weblate

anonymous (5):
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate

kak mi (1):
      feat(l10n): update Chinese (Simplified) translation from Weblate

zaefarani (1):
      feat(l10n): update Persian translation from Weblate

Åke Engelbrektson (1):
      feat(l10n): update Swedish translation from Weblate
2020-03-21 23:31:15 -07:00
Anthony Bilinski
70824729ff
chore(cleanup): don't use 0 as nullptr
Don't add Wzero-as-null-pointer-constant by default, since on older Qt
versions that we stil support and that our CI runs agains, Qt API themselves
cause warnings which lead to build errors all over the place.

Fix #6008
2020-03-21 23:20:03 -07:00
Anthony Bilinski
f756dbae2a
chore(cleanup): don't explicitly initialize std::unique_ptr to nullptr
Fix #6009
2020-03-21 22:15:03 -07:00
Anthony Bilinski
2c1a86482a
chore(style): remove old style casts and cross sign comparisons
Enable warnings for both. Favour casting to signed rather than casting to
unsigend for comparisons. Per isocpp's core guidelines ES.102, signed
arithmetic gives more expected results. If we need one extra bit of range,
using longer signed types achives that.

Fix #6010
Fix #6012
2020-03-21 20:29:10 -07:00
Anthony Bilinski
a7f3495956
fix(chatlog): enable dynamic view range in chatlog with history disabled
Message caching is handled by SessionChatLog in memory even when history is
disabled. ChatLog doesn't need to worry about how the messages its rendering
are being stored. Dynamic loading up and down in chatlog is sitll functional.
2020-03-21 19:41:22 -07:00
Anthony Bilinski
c906cdf57b
fix(history): check history settings when getting initial chatlog idx
Checking if history pointer is valid is not sufficient, the setting must also
be checked. This caused asserts in history when history was disabled in
settings.
2020-03-21 01:45:46 -07:00
sudden6
f13ba3f972
chore(l10n): update translations from Weblate
Alexander Ritter (1):
      feat(l10n): update German translation from Weblate

Allan Nordhøy (2):
      feat(l10n): update Norwegian Bokmål translation from Weblate
      feat(l10n): update Norwegian Bokmål translation from Weblate

Andrey (1):
      feat(l10n): update Russian translation from Weblate

Branko Kovačević (1):
      feat(l10n): update Serbian (latin) translation from Weblate

Dan Baeza (4):
      feat(l10n): update Portuguese (Brazil) translation from Weblate
      feat(l10n): update Italian translation from Weblate
      feat(l10n): update Spanish translation from Weblate
      feat(l10n): update French translation from Weblate

Deleted User (1):
      feat(l10n): update German translation from Weblate

Kristjan Räts (1):
      feat(l10n): update Estonian translation from Weblate

Milo Ivir (1):
      feat(l10n): update Croatian translation from Weblate

Moo (1):
      feat(l10n): update Lithuanian translation from Weblate

Oguz Ersen (1):
      feat(l10n): update Turkish translation from Weblate

Vladimir Studinsky (1):
      feat(l10n): update German translation from Weblate

Xoronic (5):
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate

Zarko Gjurov (1):
      feat(l10n): update Macedonian translation from Weblate

anonymous (5):
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate
      feat(l10n): update Dutch translation from Weblate

kak mi (1):
      feat(l10n): update Chinese (Simplified) translation from Weblate

zaefarani (1):
      feat(l10n): update Persian translation from Weblate

Åke Engelbrektson (1):
      feat(l10n): update Swedish translation from Weblate
2020-03-20 23:50:57 +01:00
sudden6
b5785a1b0c
fix: add missing type for Qt slot
(cherry picked from commit ad139d67c2)
2020-03-20 02:26:22 -07:00
sudden6
df7fe22398
fix(toxcall): move ToxCall ownership to correct Thread
Makes the CoreAV thread own all ToxCalls in order to prevent signals
from being emitted via a Direct connection from Audio to CoreAV.

(cherry picked from commit 6b468e41fa)
2020-03-20 02:26:18 -07:00
Mick Sayson
caf4f59fb2
feat(groups): Allow being in group call if only member
In other applications chatrooms allow you to idle in a call and have
people hop in and out as desired. If a user is the only one presently
online in a group but knows someone will be joining shortly they should
be able to join the call ahead of time.

(cherry picked from commit 46d57c6864)
2020-03-20 02:26:08 -07:00
Anthony Bilinski
9d68be7003
chore: update wording of CI job restart instructions
The tool isn't confused in this case, just cleaning up.

(cherry picked from commit 871b363b6d)
2020-03-20 02:08:01 -07:00
sudden6
f02943c191
fix(toxcall): handle Null sink correctly
This was introduced in 82a4f1b412

(cherry picked from commit bf3921ce94)
2020-03-20 02:07:57 -07:00
sudden6
19e1728495
chore: add instructions to restart nigthly builds
(cherry picked from commit 3d2dbb63b2)
2020-03-20 02:07:53 -07:00
Anthony Bilinski
3a5e28fffb
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.

(cherry picked from commit 24e4ec3751)
2020-03-20 02:07:20 -07:00
Anthony Bilinski
b7062b2518
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.

(cherry picked from commit 82a4f1b412)
2020-03-20 02:07:20 -07:00
Anthony Bilinski
40e43586f1
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.

(cherry picked from commit 41b2b35ce3)
2020-03-20 02:07:19 -07:00
sudden6
dfeca3e906
fix(coreav): prevent racy access to call variable
(cherry picked from commit c507d2665d)
2020-03-20 02:07:19 -07:00
sudden6
26fcea0639
fix(coreav): change some lock to write locks
I missed some cases where data was written.

(cherry picked from commit dfcfb7d5e0)
2020-03-20 02:07:19 -07:00
sudden6
e340688b94
fix(coreav): fix assert because c-toxcore calls from unexpected thread
c-toxcore calls the groupCallCallback from it's main thread instead of
the ToxAV thread as expected, this was triggering an assertion.

Aditionally the destructors of Core and CoreAV were fixed, because they
now either crashed or deadlocked qTox when it was closed while a group
call was still running.

(cherry picked from commit 141cbf8870)
2020-03-20 02:07:18 -07:00
sudden6
723a8e5dc7
fix(coreav): avoid deadlock between CoreAV, main and Audio thread
This actually fixes two problems:

1) CoreAV and Audio thread both locked the callsLock and audioLock in
different orders, resulting in a deadlock of both threads. This fixed by
using a ReadWriteLock in the CoreAV thread.

2) Multiple functions were emitting signals while holding a lock. This
is unsafe, because the connected slot may acquire any other lock. This
is fixed by releasing the locks before emitting signals.

(cherry picked from commit 4b9e4a571d)
2020-03-20 02:07:18 -07:00