+ // store an educated guess for the next search
+ static int lastBlock = 0;
+
+ // "clever reset"
+ if (c < 0x7f)
+ lastBlock = 0;
+
+ // off the end already
+ if (lastBlock == no_blocks)
+ return QString();
+
+ // c falls into a covered area, and we can guess which
+ if (c >= unicode_blocks[lastBlock].start
+ && c <= unicode_blocks[lastBlock].end)
+ return qt_(unicode_blocks[lastBlock].name);
+
+ // c falls into an uncovered area, but we can guess which
+ if (c > unicode_blocks[lastBlock].end
+ && c < unicode_blocks[lastBlock + 1].start)
+ return QString();
+
+ // guessing was wrong so far. do a real search.