It's easy.

First open gui/text/qtextcontrol.cpp and search for "QUnicode" and comment these three lines out:

Qt Code:
  1. menu->addSeparator();
  2. QUnicodeControlCharacterMenu *ctrlCharacterMenu = new QUnicodeControlCharacterMenu(this, menu);
  3. menu->addMenu(ctrlCharacterMenu);
To copy to clipboard, switch view to plain text mode 

Now open gui/widgets/qlineedit.cpp and there's a similar code which you need to comment out:

Qt Code:
  1. popup->addSeparator();
  2. QUnicodeControlCharacterMenu *ctrlCharacterMenu = new QUnicodeControlCharacterMenu(this, popup);
  3. popup->addMenu(ctrlCharacterMenu);
To copy to clipboard, switch view to plain text mode 

Now simply recompile QtGui and you're done