Commit Graph

7790 Commits

Author SHA1 Message Date
Davide Beatrici
de8a92ea53
Merge PR #3842: Fix deprecated QSslSocket::setDefaultCaCertificates 2019-10-12 10:41:23 +02:00
Davide Beatrici
9621bb16c7
Merge PR #3841: plugins: fix escape() warnings 2019-10-12 09:53:51 +02:00
Robert Adam
4e051fc0c9 removed redundant workaround for https://bugreports.qt.io/browse/QTBUG-6504 in debug-mode 2019-10-12 09:14:43 +02:00
Davide Beatrici
243ece3659 plugins/bf1: fix sizeof() bug
Found thanks to GCC's warning:

../mumble_plugin_utils.h: In function ‘int fetch(float*, float*, float*, float*, float*, float*, std::string&, std::wstring&)’:
../mumble_plugin_utils.h:35:16: warning: array subscript 99 is outside array bounds of ‘char [4]’ [-Warray-bounds]
   35 |  str[size - 1] = 0;
      |  ~~~~~~~~~~~~~~^~~
bf1.cpp:15:25: note: while referencing ‘team’
   15 |  char server_name[100], team[4];
      |                         ^~~~
2019-10-12 09:01:28 +02:00
Davide Beatrici
7779447ee4 mumble_plugin_utils.h: declare escape() as inline, minor improvements
Fixes the following warning:

../mumble_plugin_utils.h:33:13: error: 'void escape(char*, size_t)' defined but not used [-Werror=unused-function]
 static void escape(char *str, size_t size) {
             ^

It appeared after bb248cc, due to "ut99.cpp" not using escape().

This commit also:

- Changes the "size" argument so that it is passed as reference.
- Indents the function using tabs.
2019-10-12 09:01:00 +02:00
Davide Beatrici
b54351cfba
Merge PR #3511: plugins: compile plugins for Windows games also on Linux, for Proton/Wine support 2019-10-11 23:33:17 +02:00
Davide Beatrici
bb248ccf68 plugins.pro: compile plugins for Windows games also on Linux 2019-10-11 22:48:13 +02:00
Davide Beatrici
5db12321ac plugins: link to user32 in common project (only on Windows) 2019-10-11 22:48:06 +02:00
Davide Beatrici
ed6ff7ca9a plugins: convert UTF-16 to UTF-8 using C++11 features 2019-10-11 21:58:46 +02:00
Davide Beatrici
5e247f258c plugins: replace MSVC string functions with C++ ones 2019-10-11 21:58:39 +02:00
Davide Beatrici
d40fbe8c3b plugins: replace BYTE with uint8_t 2019-10-11 21:13:48 +02:00
Davide Beatrici
cf81dee47d
Merge PR #3827: Add setting to toggle 24-hour time format for the chat 2019-10-11 09:17:16 +02:00
Davide Beatrici
cf998824b0 Add setting to toggle 24-hour time format for the chat
By default QTime uses the 24-hour time format when converting to a string.

This commit adds a setting (a checkbox) which allows users to toggle the format.

The setting only applies for new messages, the already shown ones will retain the previous time format.
2019-10-11 08:38:37 +02:00
Davide Beatrici
909896d084
Merge PR #3826: Revamp JackAudio implementation 2019-10-10 06:33:40 +02:00
Davide Beatrici
76df34225e
Merge PR #3839: MurmurGRPCImpl.cpp: remove QAtomicInt compatibility layer 2019-10-10 05:10:25 +02:00
Davide Beatrici
7835c57083 MurmurGRPCImpl.cpp: remove QAtomicInt compatibility layer
I accidentally left it in 062fe2661d.
2019-10-10 04:35:02 +02:00
Davide Beatrici
df4ddb46f2
Merge PR #3602: Remove Qt 4 stuff 2019-10-10 03:56:43 +02:00
Davide Beatrici
1ac534915c Remove remaining Qt 4 stuff
For reference: https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5
2019-10-10 03:14:38 +02:00
Davide Beatrici
a50e572e2d Remove Qt 4 includes 2019-10-10 03:13:18 +02:00
Davide Beatrici
eea435d780 Remove Qt::escape() -> QString::toHtmlEscaped() compatibility layer
https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5#Qt::escape_is_deprecated
2019-10-10 03:09:39 +02:00
Davide Beatrici
062fe2661d Remove QAtomicInt compatibility layer
Qt 4: https://doc.qt.io/archives/qt-4.8/qatomicint.html
Qt 5: https://doc.qt.io/qt-5/qatomicint.html
2019-10-10 03:09:08 +02:00
Davide Beatrici
080015b842 Remove ServerResolver implementation for Qt 4
Qt 4 used a different implementation because QDnsLookup was introduced in Qt 5.

Unlike the complete implementation, the Qt 4 compatible one only supported simple lookups (e.g. hostname -> IP address).
2019-10-10 02:18:01 +02:00
Davide Beatrici
2f967b7ea4 qmake: remove Qt 4 logic 2019-10-10 02:17:51 +02:00
Davide Beatrici
91f16f17f1
Merge PR #3837: Set target macOS version to 10.9, fix deprecated stuff, restore Azure Pipelines build 2019-10-10 00:58:33 +02:00
Davide Beatrici
5094de66e0 Azure Pipelines: restore macOS build
It was removed in bb6416c013, due to the warnings appearing because of the deprecated stuff.
2019-10-10 00:11:24 +02:00
Davide Beatrici
ba217fd660 macx/osax: don't build for deprecated i386 architecture
https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
2019-10-10 00:11:24 +02:00
Davide Beatrici
e9029a904e Remove "compat", i386 is not supported anymore
"compat" was a very small and simple program; its purpose was to show a message informing the user that the Mumble binary is only for x86_64 processors.

The i386 architecture is not supported in Xcode 10, meaning that we cannot compile it anymore.

https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
2019-10-10 00:11:16 +02:00
Davide Beatrici
1571d91c0f overlay_gl/init_mac.c: remove code based on CGDisplayIsCaptured()
The function was removed and there is no replacement: https://developer.apple.com/documentation/coregraphics/1562061-cgdisplayiscaptured

Retrieving the resolution directly from OpenGL is probably better anyway.
2019-10-09 23:35:47 +02:00
Davide Beatrici
57a8f3e48b Overlay: replace deprecated GetFrontProcess() and GetProcessPID()
Both deprecated in macOS 10.9.

https://developer.apple.com/documentation/applicationservices/1501050-getfrontprocess
https://developer.apple.com/documentation/applicationservices/1500992-getprocesspid
2019-10-09 23:35:47 +02:00
Davide Beatrici
796eabaf17 GlobalShortcuts_macx.mm: replace deprecated GetProcessForPID() and CopyProcessName()
Both deprecated in macOS 10.9.

https://developer.apple.com/documentation/applicationservices/1501069-getprocessforpid
https://developer.apple.com/documentation/applicationservices/1501067-copyprocessname
2019-10-09 23:35:47 +02:00
Davide Beatrici
9ab5fe97b6 Set target macOS version to 10.9
"libstdc++" was deprecated with Xcode 8 and is not supported in Xcode 10.

The new library is "libc++", available with macOS 10.9+.

https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
2019-10-09 23:35:41 +02:00
Davide Beatrici
523d40c2b6
Merge PR #3828: Remove DirectSound implementation 2019-10-08 22:11:32 +02:00
Davide Beatrici
e774bd7f78
Merge PR #3835: Murmur.ice: add missing value to UserInfo 2019-10-08 19:59:53 +02:00
Davide Beatrici
83a88847f9 Murmur.ice: add missing value to UserInfo
Mumble.com kindly reported that the getRegistration() Ice method fails with an "enumerator out of range" error, due to a missing value in the "UserInfo" enum.

The value was added to Murmur in 813aceb854 and then renamed and moved in 5131d9e303.
2019-10-08 19:22:10 +02:00
Davide Beatrici
01b097d6ee Revamp JackAudio implementation
Some users were encountering issues such as the client taking ~8 seconds to start when "jackd" could not be run, due to the library attempting many times to connect to the JACK server (https://bugs.debian.org/941455).

While working on a fix I corrected the many warnings emitted by Clang-Tidy and I realized that there were many things that could be improved.

This commit almost entirely rewrites the implementation, but here are some of the changes:

- Mutexes are used everywhere, race conditions should not be possible anymore.
- The JACK client is not opened until it's required (i.e. "JackAudioInput" and/or "JackAudioOutput" start running). The initialization code has been moved to a dedicated function, the constructor doesn't execute it anymore. This is what fixes the issue mentioned above.
- The JACK client is deactivated and closed automatically when both "JackAudioInput" and "JackAudioOutput" are not running.
- Code specific to audio input or audio output has been moved from "JackAudioSystem" to the corresponding section ("JackAudioInput" or "JackAudioOutput").
- Some variables in "JackAudioSystem" have been replaced with functions which retrieve the corresponding value from the JACK server.
- Removed all instances of "delete", raw pointers have been replaced with "std::unique_ptr<>()".
- Replaced "NULL" with "nullptr".
2019-10-08 03:09:22 +02:00
Davide Beatrici
4e0706cbdb
Merge PR #3833: Fix dangling else warning in Server::msgACL() 2019-10-07 09:45:53 +02:00
Davide Beatrici
efb3c83512 Fix dangling else warning in Server::msgACL()
This commit fixes a warning encountered today on FreeBSD, probably because Clang was updated and now `-Wdangling-else` is enabled by default.

Messages.cpp:1330:5: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
                                foreach(int id, pg->members()) {
                                ^
2019-10-07 08:49:47 +02:00
Davide Beatrici
fc02822fb3
Merge PR #3832: Replace deprecated qSort() with std::sort() 2019-10-07 07:54:41 +02:00
Davide Beatrici
90c93fa7a5 Replace deprecated qSort() with std::sort()
5957f245c6

I accidentally forgot to search for "qSort" in files when I created 3132f993d8.

This commit replaces the qSort() instances I missed.
2019-10-07 06:27:52 +02:00
Davide Beatrici
49c33c5613
Merge PR #3829: Fix QPalette::Background is deprecated 2019-10-06 21:26:07 +02:00
Robert Adam
ff1591b64d Replace QPalette::Background with QPalette::Window in AudioNoiseWidget::paintEvent()
I just had a FreeBSD build fail because AudioStats.cpp is using QPalette::Background, which apparently has been declared deprecated.

AudioStats.cpp:213:45: error: 'Background' is deprecated: Use QPalette::Window instead [-Werror,-Wdeprecated-declarations]
        paint.fillRect(rect(), pal.color(QPalette::Background));
                                                   ^

The Qt docs advise to use QPalette::Window instead (see https://doc.qt.io/qt-5/qpalette.html), so I went ahead and changed the code accordingly.
2019-10-06 20:27:59 +02:00
Davide Beatrici
9aaf3ccb67
Merge PR #3830: Fix dangling else warning in ConnectDialog::OnSortChanged() 2019-10-06 20:27:29 +02:00
Davide Beatrici
0893c6c361 Fix dangling else warning in ConnectDialog::OnSortChanged()
This commit fixes a warning encountered today on FreeBSD, probably because Clang was updated and now '-Wdangling-else' is enabled by default.

ConnectDialog.cpp:1178:3: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
                foreach(ServerItem *si, qlItems)
                ^
2019-10-06 18:19:37 +02:00
Davide Beatrici
2a3e5f9317 Translation update
Updating 'mumble_en.ts'...
    Found 1717 source text(s) (14 new and 1703 already existing)
    Removed 15 obsolete entries
2019-10-05 08:10:58 +02:00
Davide Beatrici
66dd17bcf4 Settings: remove DirectSound stuff 2019-10-05 08:10:58 +02:00
Davide Beatrici
ad42a468d7 ASIOInput.cpp: remove reference to DirectSound 2019-10-05 08:10:58 +02:00
Davide Beatrici
26f3de467c main.cpp: remove reference to DirectSound 2019-10-05 08:10:58 +02:00
Davide Beatrici
01afd99fc4 INSTALL: undocument 'no-directsound' option 2019-10-05 08:10:58 +02:00
Davide Beatrici
7042572235 Remove references to DirectSound in UI
The suggestion to use DirectSound was valid only for Windows versions prior to Vista, because WASAPI was introduced with it.

Fortunately DirectSound didn't appear in the UI as an option in case WASAPI was detected, hopefully we didn't mislead users into thinking that DirectSound is better than WASAPI.

Also, the description was suggesting to use DirectSound on non-Windows operating systems.
2019-10-05 08:10:58 +02:00
Davide Beatrici
7977a5c465 Remove DirectSound implementation code
DirectSound was the first audio backend supported by Mumble, in 2005.

Windows Vista introduced a brand new audio stack called WASAPI, which entirely replaced DirectSound. Support for it was added in 9a018148bb, 6bef650e57 and 677a39951f.

This commit entirely removes our DirectSound implementation, not needed anymore because we are dropping support for Windows XP in 1.4.
2019-10-05 08:08:55 +02:00