rem: virtual QString key( int column, bool  ) const { if (column == mPaintInfo->dateCol) { if (mPaintInfo->orderOfArrival) return mSortArrival;
add: virtual QString key( int column, bool  ) const { KMHeaders *headers =  static_cast<KMHeaders*>(listView()); const KMPaintInfo *paintInfo = headers->paintInfo(); KMMsgBase *mMsgBase = headers->folder()->getMsgBase( mMsgId ); QString sortArrival = QString( "%1" ).arg( mMsgId, 8, 36 ); time_t mDate = mMsgBase->date(); const int dateLength = 30; char cDate[dateLength + 1]; strftime( cDate, dateLength, "%Y:%j:%H:%M:%S", gmtime( &mDate )); QString sortDate = cDate + sortArrival; if (column == paintInfo->dateCol) { if (paintInfo->orderOfArrival) return sortArrival;
context:   virtual QString key( int column, bool /*ascending*/ ) const {    if (column == mPaintInfo->dateCol) {      if (mPaintInfo->orderOfArrival)	return mSortArrival;      else	return mSortDate;    }    else if (column == mPaintInfo->senderCol)      return text(mPaintInfo->senderCol).lower() + " " + mSortArrival;    else if (column == mPaintInfo->subCol) {      if (mPaintInfo->status)	return QString( QChar( (char)mFolder->getMsgBase( mMsgId )->status() ));      else	return KMMsgBase::skipKeyword( text(mPaintInfo->subCol).lower() )	  + " " + mSortArrival;    }    else if (column == mPaintInfo->sizeCol) {      KMMsgBase *mMsgBase = mFolder->getMsgBase( mMsgId );      if(mMsgBase==NULL)	return text(column);      return QString( "%1" ).arg( mMsgBase->msgSize(), 9 );    }    else      return text(column);  }