Opened 18 years ago
Closed 17 years ago
#5311 closed task (invalid)
Write QString replacement
| Reported by: | danielk | Owned by: | danielk |
|---|---|---|---|
| Priority: | blocker | Milestone: | 0.22 |
| Component: | mythtv | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
Even in Qt4, QString is not thread-safe. We need to write an MString class with the capabilities of QString but without the constant segfaults.
Attachments (1)
Change History (11)
comment:1 by , 18 years ago
| Priority: | minor → blocker |
|---|
comment:2 by , 17 years ago
comment:3 by , 17 years ago
comment:4 by , 17 years ago
comment:5 by , 17 years ago
comment:7 by , 17 years ago
comment:9 by , 17 years ago
| Status: | new → assigned |
|---|---|
| Type: | defect → task |
comment:10 by , 17 years ago
| Resolution: | → invalid |
|---|---|
| Status: | assigned → closed |
After converting a large number of files to Qt4, I don't think we need to introduce a new thread safe string class anymore. Assignments in Qt4 are really atomic and the very unsafe ascii()/utf8()/latin1()/local8Bit() functions were causing most of the remaining segfaults (and are now removed from the class). The remaining bugs are specific to certain classes used by multiple threads using QStrings without a mutex protecting them (ChannelBase for instance). Those errors should be addressed on a case by case basis as those classes will probably unsafely use any number of other variables, not just strings.

(In [17846]) Refs #5311. Replaces most ascii()/utf8()/latin1() calls in libmyth with safer alternatives.