Opened 16 years ago
Closed 15 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 Changed 16 years ago by
Priority: | minor → blocker |
---|
comment:2 Changed 16 years ago by
comment:3 Changed 16 years ago by
comment:4 Changed 16 years ago by
comment:5 Changed 16 years ago by
comment:7 Changed 16 years ago by
Changed 15 years ago by
Attachment: | mstring.diff added |
---|
MString, a thread-safe replacement for QString
comment:9 Changed 15 years ago by
Status: | new → assigned |
---|---|
Type: | defect → task |
comment:10 Changed 15 years ago by
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.