Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-72865

Let QTextBlock to have many QTextBlockUserData in oder to allow modular programming

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.12.0
    • GUI: Text handling
    • None
    • All

    Description

      There are huge difficulties when I try to program modular (plugin based) text editor with Qt library. Problem is with QTextBlock which allow only one attached QTextBlockUserData derived object.
      This is wrong in my case:
      I want to use SyntaxHiglighter class from KSyntaxHighlighting from Kde. It already using QTextBlockUserData internally.
      I want to create plugins with text editor and separate plugin for syntax highlighting. I don't want to mess editor code with syntaxhiglighter code.
      I want in my editor bookmarks - in order to use it I have to use QTextBlockUserData.
      In C++ I can't use efectively class which derive from 2 classes my LineInfo and KSyntaxHighlighting::TextBlockUserData - I cant cast between these two classes. This aproach will be enough because in my syntax highligter plugin I can create such class without mess the text editor plugin.
      When I will have something like QTextBlock::addUserData(QTextBlockUserData *data); and QList<QTextBlockUserData *> QTextBlock::userData();
      Then I will be able to check what user data is mine by simple: dynamic_cast<LineInfo*>().

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            szykcech Szyk Cech
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes