"As a side note, if someone can explain me when the following line will be used in the patch ?
I don't think we will want to print the statement other than a string. (for which role== Qt::DisplayRole)"

"Most models provide at least a textual representation of item data for the Qt::DisplayRole, and well-behaved models should also provide valid information for the Qt::ToolTipRole and Qt::WhatsThisRole. Supporting these roles enables models to be used with standard Qt views. However, for some models that handle highly-specialized data, it may be appropriate to provide data only for user-defined roles."

I think what this means is that Qt entities like QTextEdit handle data in a general way where some of its features may want a tooltip representation of the data, or an icon representation of the data, etc. In this case Octave is being a bit incomplete in just putting and X for any other role other than displaying it, say, in a QTextEdit window.