QString getBlock(char_type c)
{
// store an educated guess for the next search
+ // FIXME THREAD
static int lastBlock = 0;
// "clever reset"
// guessing was wrong so far. do a real search.
int i = 0;
- while (c > unicode_blocks[i].end && i < no_blocks)
+ while (i < no_blocks && c > unicode_blocks[i].end)
++i;
if (i == no_blocks)
return QString();
{
public:
Model(GuiSymbols * parent)
- : QAbstractItemModel(parent), parent_(parent)
+ : QAbstractItemModel(parent)
{}
QModelIndex index(int row, int column, QModelIndex const &) const
static QString const strCharacter = qt_("Character: ");
static QString const strCodePoint = qt_("Code Point: ");
- static char codeName[10];
-
char_type c = symbols_.at(index.row());
if (role == Qt::TextAlignmentRole)
return toqstr(c);
if (role == Qt::ToolTipRole) {
+ // FIXME THREAD
+ static char codeName[10];
+
sprintf(codeName, "0x%04x", c);
return strCharacter + toqstr(c) + '\n'
+ strCodePoint + QLatin1String(codeName);
private:
friend class GuiSymbols;
- GuiSymbols * parent_;
-
+
QList<char_type> symbols_;
};