Prevent creation of text codecs when the application is shutting down #143

Merged
MicheleC merged 1 commits from fix/issue/142 into master 11 months ago
Owner

The fix is relatively simple. When the application shuts down, it will destroy all codecs by calling TQTextCodec::deleteAllCodecs(). The code will remember that this happened and will not setup the codecs again if this is requested after the initial deletion. The rest of the changes are mostly renames/cosmetics + some extra locks every time the list of codecs is modified.
This resolves issue #142.

The fix is relatively simple. When the application shuts down, it will destroy all codecs by calling `TQTextCodec::deleteAllCodecs()`. The code will remember that this happened and will not setup the codecs again if this is requested after the initial deletion. The rest of the changes are mostly renames/cosmetics + some extra locks every time the list of codecs is modified. This resolves issue #142.
MicheleC added this to the R14.1.2 release milestone 11 months ago
MicheleC requested review from Core 11 months ago
MicheleC requested review from Owners 11 months ago
Collaborator

Hm... I don't really like that solution... I thought I were gonna make tqWarning() work rather than just print another message...

PS: And we definitely shouldn't use printf() for error reporting...

Hm... I don't really like that solution... I thought I were gonna make tqWarning() work rather than just print another message... PS: And we definitely shouldn't use `printf()` for error reporting...
Collaborator

I'd like to propose the alternative to this one: #144

I'd like to propose the alternative to this one: #144
MicheleC force-pushed fix/issue/142 from 157bc2b4ca to faabef99c0 11 months ago
Poster
Owner

Hm... I don't really like that solution... I thought I were gonna make tqWarning() work rather than just print another message...

PS: And we definitely shouldn't use printf() for error reporting...

See this comment on PR #144.

> Hm... I don't really like that solution... I thought I were gonna make tqWarning() work rather than just print another message... > > PS: And we definitely shouldn't use `printf()` for error reporting... See [this comment](https://mirror.git.trinitydesktop.org/gitea/TDE/tqt3/pulls/144#issuecomment-48883) on PR #144.
Poster
Owner

PR updated with additional comments for printf and explicit setting of localeMapper = 0 (see discussion on PR #144).

PR updated with additional comments for `printf` and explicit setting of `localeMapper = 0` (see discussion on PR #144).
SlavekB approved these changes 11 months ago
SlavekB left a comment
Owner

LGTM

LGTM
MicheleC force-pushed fix/issue/142 from faabef99c0 to 7563c4825f 11 months ago
MicheleC merged commit 7563c4825f into master 11 months ago
MicheleC deleted branch fix/issue/142 11 months ago

Reviewers

SlavekB approved these changes 11 months ago
TDE/Core was requested for review 11 months ago
The pull request has been merged as 7563c4825f.
Sign in to join this conversation.
No reviewers
TDE/Core
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tqt3#143
Loading…
There is no content yet.