rem: virtual QString key( int column, bool  ) const { KMHeaders *headers = static_cast<KMHeaders*>(listView()); int sortOrder = column; if (headers->mPaintInfo.orderOfArrival) sortOrder |= (1 << 6); if (headers->mPaintInfo.status) sortOrder |= (1 << 5);   if(mKey.isEmpty() || mKey[0] != (char)sortOrder) { KMHeaders *headers = static_cast<KMHeaders*>(listView()); return ((KMHeaderItem *)this)->mKey = generate_key(mMsgId, headers, headers->folder()->getMsgBase( mMsgId ), headers->paintInfo(), sortOrder); } return mKey; }
add: const QString &key() const { return mKey; }
context:   virtual QString key( int column, bool /*ascending*/ ) const  {    KMHeaders *headers = static_cast<KMHeaders*>(listView());    int sortOrder = column;    if (headers->mPaintInfo.orderOfArrival)      sortOrder |= (1 << 6);    if (headers->mPaintInfo.status)      sortOrder |= (1 << 5);    //This code should stay pretty much like this, if you are adding new    //columns put them in generate_key    if(mKey.isEmpty() || mKey[0] != (char)sortOrder) {      KMHeaders *headers = static_cast<KMHeaders*>(listView());      return ((KMHeaderItem *)this)->mKey =        generate_key(mMsgId, headers, headers->folder()->getMsgBase( mMsgId ),                     headers->paintInfo(), sortOrder);    }    return mKey;  }