Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 38030 Details for
Bug 61400
broken xpm color spec handling in qt
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
bug report to qt-bugs@trolltech.com
foo (text/plain), 1.08 KB, created by
splite
on 2004-08-23 10:17:42 UTC
(
hide
)
Description:
bug report to qt-bugs@trolltech.com
Filename:
MIME Type:
Creator:
splite
Created:
2004-08-23 10:17:42 UTC
Size:
1.08 KB
patch
obsolete
>Date: Mon, 23 Aug 2004 12:06:41 -0500 >To: qt-bugs@trolltech.com >Subject: bug in xpm color spec handling > >This bug is present in Qt 3.3.3 and in qt-x11-free-3.3.4-snapshot-20040822. >In src/kernel/image.cpp: > >static int nextColorSpec(const QCString & buf) >{ > int i = buf.find(" c "); > if (i < 0) > i = buf.find(" g "); > if (i < 0) > i = buf.find(" g4 "); > if (i < 0) > i = buf.find(" m "); > if (i < 0) > i = buf.find(" s "); > return i; >} > >This function assumes a particular order of the color specs in an XPM file >that is not required by the XPM standard. Given the color line: > >". c black m black g black g4 black s Legs ", > >The nextColorSpec call in: > > buf = buf.mid( i+3 ); > // Strip any other colorspec > int end = nextColorSpec(buf); > if (end != -1) > buf.truncate(end); > >will match on " g " instead of " m ", resulting in a color name of "black m " >being passed to QColor::setNamedColor. > >Suggest replacing the sequence of buf.find's in nextColorSpec with a >single buf.find using an appropriate QRegExp.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 61400
: 38030