CVS commit by goutte: - use the technically correct term "Unicode code point" (Well, I still do not really know, it would be so easy if in Unicode "code value" would have not be a totally different meaning.) - show in the tooltip not only the code point in hexadecimal but also in decimal (can be useful sometimes) and the character of the codepoint (useful for fonts covering the code point but not defining it, so at least the user can see what that code point is supposed to be.) M +5 -4 kcharselect.cpp 1.37 [POSSIBLY UNSAFE: printf] --- kdelibs/kdeui/kcharselect.cpp #1.36:1.37 @@ -347,9 +347,10 @@ void KCharSelectTable::setToolTips() for( int j=0; j< numCols(); j++ ) { - QRect r( cellWidth()*j, cellHeight()*i, cellWidth(), cellHeight() ); + const QRect r( cellWidth()*j, cellHeight()*i, cellWidth(), cellHeight() ); QToolTip::remove(this,r); + const ushort uni = vTableNum * 256 + numCols()*i + j; QString s; - s.sprintf("%04X", vTableNum * 256 + numCols()*i + j); - QToolTip::add(this, r, i18n("Character code","Unicode code: U+%1").arg(s)); + s.sprintf( "%04X", uint( uni ) ); + QToolTip::add(this, r, i18n( "Character","Unicode code point: U+%1
(In decimal: %2)
(Character: %3)
" ).arg( s ).arg( uni ).arg( QChar( uni ) ) ); } } @@ -390,5 +391,5 @@ KCharSelect::KCharSelect( QWidget *paren connect( tableSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( tableChanged( int ) ) ); - QLabel *lUnicode = new QLabel( i18n( "&Unicode code:" ), bar ); + QLabel *lUnicode = new QLabel( i18n( "&Unicode code point:" ), bar ); lUnicode->resize( lUnicode->sizeHint() ); lUnicode->setAlignment( Qt::AlignRight | Qt::AlignVCenter );