Skip to content

Fix deprecated Qt APIs and a compiler warning for QT 6.8.0#1151

Merged
Trouffman merged 11 commits into
DistroAV:masterfrom
kaechele:fix-compiler-warnings
Aug 29, 2025
Merged

Fix deprecated Qt APIs and a compiler warning for QT 6.8.0#1151
Trouffman merged 11 commits into
DistroAV:masterfrom
kaechele:fix-compiler-warnings

Conversation

@kaechele

Copy link
Copy Markdown
Contributor

Got warned about these when building on Fedora 41 with Qt 6.8.0 and gcc version 14.2.1.

- QDateTime::setTimeSpec -> QDateTime::setTimeZone
- QCheckBox::stateChanged -> QCheckBox::checkStateChanged for Qt 6.7 and
  newer

Signed-off-by: Felix Kaechele <[email protected]>
This fixes the following compiler warning:

```
In file included from src/forms/update.cpp:305:
src/obs-support/remote-text.hpp: In constructor ‘RemoteTextThread::RemoteTextThread(std::string, std::vector<std::__cxx11::basic_string<char> >&&, std::string, std::string, int)’:
src/obs-support/remote-text.hpp:51:34: error: ‘RemoteTextThread::headers’ will be initialized after [-Werror=reorder]
   51 |         std::vector<std::string> headers;
      |                                  ^~~~~~~
src/obs-support/remote-text.hpp:42:13: error:   ‘int RemoteTextThread::timeoutSec’ [-Werror=reorder]
   42 |         int timeoutSec = 0;
      |             ^~~~~~~~~~
src/obs-support/remote-text.hpp:64:16: error:   when initialized here [-Werror=reorder]
   64 |         inline RemoteTextThread(std::string url_,
      |                ^~~~~~~~~~~~~~~~
```

Signed-off-by: Felix Kaechele <[email protected]>
@Trouffman Trouffman added this to the 6.1.0 milestone Dec 3, 2024
@Trouffman

Copy link
Copy Markdown
Collaborator

Thanks for the PR. This cannot be fixed until OBS 31 is out as the require QT version is not used yet.

This is because you are trying to build with QT6.8, the plugin-template for OBS plugin is based on Qt 6.6.3 (still) and some of the functions used to replace the deprecated one are not reliable Pre Qt 6.7.

Will keep his PR here for visibilty but will drop it as Draft.
Other similar PR / Issues to #1132 #1109

@Trouffman
Trouffman marked this pull request as draft December 3, 2024 23:42
@Trouffman Trouffman changed the title Fix deprecated Qt APIs and a compiler warning Fix deprecated Qt APIs and a compiler warning for OBS 31 Dec 3, 2024
@Trouffman Trouffman self-assigned this Dec 22, 2024
@Trouffman
Trouffman self-requested a review December 30, 2024 00:23
@Trouffman
Trouffman marked this pull request as ready for review December 30, 2024 00:23
@Trouffman Trouffman added Dependencies Relate to a dependency (package / version) Build relate to building issues (all platform) labels Dec 31, 2024
@Trouffman Trouffman changed the title Fix deprecated Qt APIs and a compiler warning for OBS 31 Fix deprecated Qt APIs and a compiler warning for QT 6.8.0 Feb 10, 2025
@Trouffman
Trouffman marked this pull request as draft February 10, 2025 02:51
@Trouffman

Copy link
Copy Markdown
Collaborator

This will most likely be merged/addressed as soon as we start using the latest OBS-deps.

This will impact more than just QT things.

See details on : #1251

@Trouffman

Copy link
Copy Markdown
Collaborator

This will be addressed as soon as we get #1251 done (might be part of it)

@Trouffman Trouffman modified the milestones: 6.1.0, 6.1.1 May 8, 2025
@Trouffman Trouffman modified the milestones: 6.1.1, 6.2.0 Jun 12, 2025
@Trouffman
Trouffman marked this pull request as ready for review August 29, 2025 13:17
Comment thread src/obs-support/remote-text.hpp
@Trouffman
Trouffman merged commit 36928ed into DistroAV:master Aug 29, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build relate to building issues (all platform) Dependencies Relate to a dependency (package / version)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants