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

97 Commits

Author SHA1 Message Date
Anthony Bilinski
da5c165f41
fix(appimage): Use external binary path when enabling autorun from appimage
Fix #6241
2021-09-23 21:05:27 -07:00
Anthony Bilinski
9688a1e82f fix(video): Close video device after checking V4L video modes
Fix #6346
2021-06-27 11:25:38 -07:00
Anthony Bilinski
65ff532a54
fix(macos): update deprecated AVFoundation API 2021-06-27 11:20:17 -07:00
Jamie Westell
98a818cbea fix(video): only list video devices with video capture capability
This change adds a check for the V4L2_CAP_VIDEO_CAPTURE capability of
the video device found on devfs. This will filter out 'metadata' device
nodes that may be present on devfs at some  /dev/videoN path.

Fixes #6276
2021-02-27 16:19:30 -08:00
Anthony Bilinski
431fd7bfa2
Merge pull request #6073
Anthony Bilinski (1):
      fix(notification): hide snore warning log spam

Mick Sayson (2):
      feat(notification): Notification string generator for multiple messages
      feat(notification): Notifications now always replace the previous one
2020-07-02 01:34:34 -07:00
sudden6
8768f6be37
refactor: remove unused OSX platform code 2020-06-22 01:12:35 +02:00
Mick Sayson
6e163ca5ed
feat(notification): Notifications now always replace the previous one
This is a feature/fix to improve notification behavior when we receive
over 3 messages.

SnoreNotify prevents over 3 notifications from being displayed before a
user clears the notification. This is presumably to avoid infinite
notification spam.

Unfortunately this results in the notifications just coming in _after_
the user clears them. This means if there are 100s of messages built up
the user has to clear their notifications N messages / 3 times.

This feature/fix folds all notifications into a single notification
representing the current qTox notification state. See
notificationgenerator_test.cpp for what the new messages look like.
2020-05-17 00:00:53 -07:00
Anthony Bilinski
8abd4e47e9
refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -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
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
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
jessica181920
11b34c84ef fix(i18n): Various English fixes
Consistency, typos, grammatical corrections, capitalization, punctuation,
etc.
2019-09-14 15:00:59 -04: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
Monsterovich
161a773dbb fix(ui): minor fix 2019-05-23 19:42:09 +02:00
Monsterovich
f8b54b39f3 fix(ui): apply requested changes 2019-05-23 15:30:31 +02:00
Monsterovich
4a6ebff63a fix(ui): minor fix 2019-05-23 00:50:04 +02:00
Monsterovich
3b305dd05a fix(ui): Added option to hide message sender and contents 2019-05-23 00:44:26 +02:00
Monsterovich
1bbe210c25 fix(ui): Improved notifications 2019-05-22 19:48:23 +02:00
sudden6
cd50376c2f
fix(notification): implement review comments 2019-03-24 11:58:10 +01:00
sudden6
4cb00957f3
feat(notify): integrate desktop notifications into settings 2019-03-24 11:58:10 +01:00
sudden6
66e2c01029
feat(notify): add desktop notifications using snorenotify
This commit adds very basic support for desktop notifications on friend
request, group invites, friend messages and group messages.
2019-03-24 11:58:09 +01:00
Teemu Ikonen
4c42e0ea5b fix(video): support UYVY camera pixel format
Fixes #5479.
2019-01-15 13:36:09 +02:00
yangfl
6d0885f396 chore(cmake): let CMake choose which platform dependent code to compile
Macros can be hard to manipulate and vary among different compilers and
platforms. For example, GNU Hurd has `__MACH__` defined but not
`__APPLE__`.

Let CMake choose them during configuration.
2018-12-03 16:06:33 +08:00
sudden6
3746bd13bc
fix(video): workaround for webcams that provide no fps value
fixes #5082
2018-09-29 18:42:31 +02:00
iphydf
52a5951d26
chore: Use nullptr instead of 0 for NULL pointer constants. 2018-09-07 21:38:59 +00:00
ezavod
847f155b7b
refactor(chatform): Use QStringList instead of QVector<QString>
This replaces QVector<QString> with QStringList consistently across all files.
2018-05-31 21:32:58 +02:00
Anthony Bilinski
5dc4e6de81
chore(legal): update copyright date to 2018 for all source files 2018-04-25 17:33:38 -07:00
sudden6
ff2fc18be1
fix(video): improve debug message
Distinguish between "invalid" pixel format and "unknown" pixel format
due to unsupported platform
2017-12-22 21:33:57 +01: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
5d6ae9ae37
fix(video): don't use pointers to temporary objects
fixes #4764
2017-11-12 13:10:35 +01:00
Vincas Dargis
729dc7740b fix(platform): use result to remove -Wunused-result warning
Check for write() and read() results and abort in case of unexpected
failure.
2017-10-04 19:11:52 +03:00
Diadlo
f790747f2a
fix: ATOMIC_FLAG_INIT can't be used inside braces initializer 2017-09-26 21:00:49 +03:00
Vincas Dargis
32b97cb927 fix(platform): handle terminating POSIX signals
Add PosixSignalNotifier utility class to covert POSIX signals to
Qt signals and allow qTox to quit appropriately on Linux, FreeBSD
and macOS.

Might protect from data corruption bugs when application is being
terminated during I/O.

Fixes: #4470
2017-09-09 17:19:51 +03:00
Yuri
ae5cb4bcc2 fix: Keep open and share X11 connection
This prevents opening and closing of X11 connection and associated files every 1 second.
X11 connection is used for userAutoAway feature and to read CapsLock status.
2017-07-23 14:41:04 -07:00
DX37
0fc3911318 fix: Fix incorrect headers order
Because of incorrect order, qTox on Windows can't be compiled properly.

Fixes #4220
2017-03-18 19:36:50 +06:00
Zetok Zalbavar
80f5de31b3
style: reformat current C++ codebase using clang-format 2017-02-26 11:52:45 +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
8d320ca3be
chore: Make building for FreeBSD easier
Add some patches from https://svnweb.freebsd.org/ports/head/net-im/qTox/
and make some things more platform independent.
2016-12-28 22:15:16 +01:00
Zetok Zalbavar
7b60a5dd36
chore: explicitly mention that copyright belongs to qTox contributors 2016-11-29 11:12:06 +00:00
Diadlo
b4a9f04f92
refactor: Added to include path and exclude it from all includes 2016-11-28 23:28:42 +03:00
Zetok Zalbavar
64bbc6cfbb
style: change postfix increment to prefix increment 2016-11-03 07:57:14 +00:00
bitok
2c03257700
refactor: fixes of static analyze warnings
There is many static analyze warnings for qTox. Fixed most dangerous and several simple.
2016-09-23 14:47:53 +01:00
iphydf
e20dffab07
chore: Make the windows code compatible with TCHAR.
This adds support for multi-byte builds. Users building qTox in
multi-byte instead of unicode mode would otherwise get compiler errors.
This is one step in the direction of making qTox a library with the UI
being just one application of it: it gives library users a choice of how
they build it.
2016-09-05 20:07:17 +01:00
Diadlo
72780e6c7a
docs(todo): Changed todo format 2016-08-19 00:20:24 +03:00
Diadlo
31d8e7eef0
docs: Replaced simple on doxygen tag 2016-08-19 00:20:23 +03:00
iphydf
e4d41acdc6
chore: Return a well-defined value from setAutorun.
There is no documentation about what this function is supposed to do or what it
should return, so I'm just guessing it's a success boolean, so it should be
returning true.
2016-08-11 12:36:03 +01:00
Diadlo
9471065feb
style(platform): Style fixes 2016-07-13 01:54:37 +03:00
Diadlo
504ad534e0
fix(directshow): Fixed problem with crosses initialization 2016-06-25 14:20:13 +03:00
Colomban Wendling
f9190734d7 fix(capslock_x11): properly release the X display handle
This fixes caps lock detection after a while, and removes the "Maximum
number of clients reached" message on stdout.
2016-06-15 18:44:12 +02:00
Diadlo
35a0e1fb6f
fix(platform): Added checkCapsLock OSX implementation 2016-06-07 11:27:58 +03:00