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

226 Commits

Author SHA1 Message Date
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
sudden6
a90f0762d9
refactor(cmake): change folder structure
The new folder structure will be like this:

/<module>/CMakeLists.txt
/<module>/src/file.cpp
/<module>/include/<module>/file.h
/<module>/<subdir>/<...>
2020-05-11 16:45:52 +02:00
Anthony Bilinski
8abd4e47e9
refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
iphydf
25a7817229
chore(videosurface): Use UNIX line endings. 2020-04-27 23:11:59 +00: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
ef8c2b7cb3
Merge branch 'v1.17-dev' 2020-03-28 01:43:40 -07:00
Anthony Bilinski
f373107f63
chore(cleanup): add Wunknown-pragmas, fix pragma typos
Fix #6035
2020-03-23 18:04:35 -07: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
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
981ecfcaeb
refactor(chatform): combine toggleVideoPreview implementations 2020-01-26 04:29:56 -08:00
Anthony Bilinski
89913e0f9a
refactor(netcam): remove GenericNetCamView, merge into NetCamview
Without GroupNetCamView, the split in arbitrary.
2020-01-26 04:29:55 -08:00
Anthony Bilinski
91bcd211a7
refactor(netcam): remove GroupNetCamView class
Fix #5918
2020-01-26 04:05:39 -08:00
Mick Sayson
3205c2c407
fix(groups): Correct color of labels in group call
Group calls are supposed to show the name of each member under their
avatars. The color of the text was previously fixed to white regardless
of the background ignoring the color of the background.

This fix ensures that the background color is not the same color as the
label text
2019-11-16 14:33:28 -08:00
Mick Sayson
ce9e820b37
fix(groups): Avoid segfault when resizing group audio window
Avatars for group members currently in a call are resized depending on
the area they are displayed in. Previously a scrollbar would appear and
disapear based on the size of the contents. This resulted in
oscillations that ended in a SIGSEGV.

This fix avoids the oscillations by fixing the scrollbar to always be
shown
2019-11-16 14:33:27 -08:00
sudden6
22787a7f3c
Merge pull request #5920
Mick Sayson (2):
      fix(groups): Avoid segfault when resizing group audio window
      fix(groups): Correct color of labels in group call
2019-11-15 21:51:54 +01:00
Mick Sayson
f27eb5b76c
fix(groups): Correct color of labels in group call
Group calls are supposed to show the name of each member under their
avatars. The color of the text was previously fixed to white regardless
of the background ignoring the color of the background.

This fix ensures that the background color is not the same color as the
label text
2019-11-12 02:44:42 -08:00
Mick Sayson
d4d4308e28
fix(groups): Avoid segfault when resizing group audio window
Avatars for group members currently in a call are resized depending on
the area they are displayed in. Previously a scrollbar would appear and
disapear based on the size of the contents. This resulted in
oscillations that ended in a SIGSEGV.

This fix avoids the oscillations by fixing the scrollbar to always be
shown
2019-11-12 02:44:42 -08: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
sudden6
0e3cd7fe6b
Merge pull request #5829
jessica181920 (1):
      fix(i18n): Various English fixes
2019-09-28 14:25:18 +02:00
jessica181920
20f948bc08 fix: Remove unnecessary null pointer check
Fixes #5785
2019-09-16 14:22:40 -04:00
jessica181920
11b34c84ef fix(i18n): Various English fixes
Consistency, typos, grammatical corrections, capitalization, punctuation,
etc.
2019-09-14 15:00:59 -04:00
jenli669
dfe75fb101
refactor(widget): replace screenGeometry() when using Qt 5.13 2019-07-14 20:10:00 +02: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
Anthony Bilinski
f7603c294b
refactor(id): use toxPk and groupId instead of core numbers
Allows creating classes for blocked friends which have toxPks but no
core number.
2019-04-16 00:44:16 -07:00
sudden6
5c1fe52010
fix(video): correctly align data passed to toxcore
fixes #5402

c-toxcore requires each plane to be aligned at 1 byte boundaries.
Because of this bug we alligned it at 32 byte boundaries if the height
and width were a multiple of 8.
2018-11-03 15:14:15 +01:00
Jimi Huotari
71d1fa6f24
refactor(themes): load css and images from themes folder
Original work by tox-user.

The default theme is now placed in a different path:
- C:\users\%username%\AppData\roaming\qtox\themes - for Windows
- ~/Library/Application Support/qtox/themes - for MacOS
- ~/.config/qtox/themes - for other Unix systems including GNU/Linux

Thanks to that it's no longer required to recompile the program to modify
the theme.

In addition to that the default theme is also included as a resource. If
the theme folder or some file inside it is missing, qTox will load it
from resource.
2018-10-24 14:04:03 +02:00
sudden6
9de40e5a97
fix(video): don't pass invalid pixel format strings to ffmpeg 2018-09-29 18:43:48 +02:00
Anthony Bilinski
0c757356d3
fix(avatar): set friend to identicon on empty avatar receipt
*All friend avatar changes and removals go through Profile, so that Profile can manage identicons
*Split the concept of "changed" and "removed" into "changed", "set", and "removed"

Fixes #4724
2018-09-17 02:30:45 -07:00
iphydf
52a5951d26
chore: Use nullptr instead of 0 for NULL pointer constants. 2018-09-07 21:38:59 +00:00
sudden6
24e7c4efd4
refactor(core): format code 2018-07-05 17:10:26 +02:00
sudden6
e5acc6726f
refactor(core): reimplement avatar transfers
In the process of this I used some ugly hacks, to finish this in time,
they should be changed as soon as possible.
2018-07-05 17:05:41 +02:00
tox-user
0d3f061ba8
fix: remove full screen btn from audio group chat
Fixes: #5202
2018-07-01 22:17:35 +00:00
sudden6
a00af08777
fix(audio): connect the correct audio callbacks 2018-07-01 10:39:33 +02:00
sudden6
50cee67f5f
chore: add more debugging when subscribing video 2018-05-15 20:29:42 +02:00
sudden6
4acf884fb9
refactor: use ToxPk as identifier
fixes #5116 and #5117
2018-05-11 20:35:24 +02:00
tox-user
d6df8883e3
feat(chat): full screen video chat
Implements #2922 and #2514.
This change adds:
- a button for enabling full screen mode
- a panel with buttons for controlling the chat in full screen mode
- a button to toggle video preview
- new icons

fix(chat): fix buttons in full screen video call
feat(chat): add hotkey for exiting full screen video
fix(chat): use screen res to position button panel
fix(chat): dont remove video widget on window close
2018-05-10 20:08:37 +00:00
Anthony Bilinski
5dc4e6de81
chore(legal): update copyright date to 2018 for all source files 2018-04-25 17:33:38 -07:00
Anthony Bilinski
7293151469
fix(ui): increase number of low res camera options
partially revert behaviour of 04ecfe3f34 to show any options that were shown before. Mentioned in comments of #5097.
2018-04-24 13:51:24 -07:00
sudden6
441931765f
fix(build): make qTox compile with ffmpeg 4.0 and newer 2018-04-23 19:31:58 +02:00
Anthony Bilinski
04ecfe3f34
feat(camera): add higher resolution camera options
Fix #5065
2018-04-12 11:37:55 -07:00
Anthony Bilinski
9216549d6e
refactor(call): Refactor toxcall and disconnect lambda on destruction
Fixes #3840

Move audio and video state into ToxCall which both ToxFriendCall and ToxGroupCall inherit from
2018-04-04 01:32:00 -07:00
sudden6
d01999814e
chore: fix some compiler warnings 2018-02-01 20:32:39 +01:00
Diadlo
7d5a59cf41
refactor: Use qFuzzyCompare to compare float values
Thanks @BiTOk for this tip
2018-01-22 17:13:09 +03:00
sudden6
a2927de27d
fix(video): use float framerates also for V4L2
also make -1 the default value for the framerate
2017-12-22 21:33:35 +01:00
sudden6
db7ee65d0e
fix(video): allow not integer framerates
Fix #4866 and #4764
2017-12-21 21:28:27 +01:00
Diadlo
8de8c14a76
fix(video): Fix square form of a video
Use right sign to compare NON-equal double numbers
2017-12-04 09:51:01 +03:00
Diadlo
91dabf11d3
fix: Use epsilon to compare float
Fix #2394 (5)
2017-11-27 01:20:09 +03:00
sudden6
5d6ae9ae37
fix(video): don't use pointers to temporary objects
fixes #4764
2017-11-12 13:10:35 +01:00
Diadlo
bc05d531a3
refactor(video): Add video settings interface 2017-11-10 23:27:06 +03:00
sudden6
fed7060270
fix(video): prevent segfault when ending videocall 2017-10-26 12:32:35 +02:00