View Single Post
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#8
Originally Posted by Jaso333 View Post
like i said, the messagebox is insignificant, the whole comparison is going wrong.
right, I was offering a troubleshooting technique to actually see what it's comparing. Maybe "text" isn't what you think it is, etc.

We are missing code in your excerpt. My thoughts are the variables are not the right types, or are simply returning something you're not expecting.

I don't have access to coding QT in C right at the moment; so I did this in python:

Code:
text = QString("C")
temp = QStringList( [ "org.freedesktop.DBus", "org.freedesktop.Notifications", "cat" ] )
current = QString("")

for s in temp:
    current = QString(s)
    if not current.startsWith(text, Qt.CaseInsensitive):
         print "no match"
     else:
         print "match"
Code:
~/test $python temp.py
no match
no match
match
Works fine. So either Python fixed the problem, or there's something in your code we're missing - but that's about as direct a port from C to python of the code you have provided I can get.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!