View Full Version : Spawn list sort order
codepig666
10-04-2002, 07:00 PM
I just installed Mandrake 9.0 and solved the QT missing class problem with a recompile.
The issue is that the Spawn List is not sorting correctly (well, not the way I want it to)
Example:
Old Sort Order (That I like): case sensitive. (#mobs first, all capital mobs next, lowercase mobs last)
New Sort Order (That I hate): case insensitve with #mobs last.
This happened to me once before in a version several months ago. I never found the cause. I have scoured the message boards and abused the search engine till my fingers bleed, so if I missed the answer feel free to /flame on but for christ's sake tell me the answer in your flame.
Thanks
Morannon
10-05-2002, 02:59 AM
Im getting the # ignored, and the mobs with that name sorted in with the rest of them...
mob1
Mob2
#mob3
MOB4
etc.
The cause is QT3.0.x - when I tried to build EQ under QT3 before I saw this sort order.
codepig666
10-05-2002, 10:10 AM
My error on my original post....the # is being ignored as you say.
I think it definitely is QT related. Your post poked my memory and I realized that it was when I had used QT3 that this had happened before.
Anyone out there know enough about QT to fix this?
fryfrog
10-05-2002, 10:22 AM
wget qt-2.3.2.tar.gz :)
codepig666
10-05-2002, 11:16 AM
Ok. I was feeling zesty and started surfing through the QT porting doc. Wham-o. there is was
they replaced the old QString::compare function with QString::localeAwareCompare.
In a nutshell the old was was a straight unicode compare, but the new way handles special foreign letters (accented and umlauted etc) in a more intelligent fashion.
To fix it back to unicode compare, modify the spawnlistcommon.h and spawnlistcommon.cpp files as shown here:
spawnlistcommon.h:
In the class definition add the following public declaration-
virtual int compare( QListViewItem *i, int col, bool ascending) const;
spawnlistcommon.cpp:
Add the following function override -
int SpawnListItem::compare( QListViewItem *i, int col, bool ascending) const
{
return key( col, ascending).compare( i->key(col, ascending) );
}
This is stolen directly from the QT docs. I am (obviously) not a developer.
If one of you wonderful, amazing, <insert random string of ass kissing compliments here> real developers wants to impliment this properly, I would love you forever.
Peace
Yep that is atleast part of the problem with sorting the spawnlist in qt3. I a reimplentation of QListViewItem::compare on the drawing board that should fix the sorting and performance problems.
fee
cybernerd
11-16-2002, 07:37 PM
I have tried to implement those codes listed since I use QT 3.0, but I cannot get the code to work anywhere. Where exactly do I add them? The change for spawnlistcommon.cpp is the real clencher.. I got the one for spawnlistcommon.h in the right place(i think). The problem is I'm a self taught c++ programmer.. so I don't really know what a 'function override' is.. can anyone help?
Thanks
Powered by vBulletin® Version 4.1.11 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.