Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-22364

Escape pasted strings in C++ editor

    XMLWordPrintable

Details

    • Task
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • None
    • C/C++/Obj-C++ Support
    • None

    Description

      For example I'm editing some C/C++ code and have something like printf("");
      Now I want to insert some text between quotes from clipboard.
      If the clipboard text has quotes the resulting C++ string will be invalid. Instead it would be great if the string was automatically escaped on paste.

      The basically the task:

      1. detect if the insertion is done inside a C/C++/other_lang string
      2. escape inserted string by default in this case
      3. add menu entry to allow insertion without escaping and make it visible/enabled only when needed

      Another way to solve the problem is to add a menu tool to escape selected string. But it's not that intuitive.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            rion Rion
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes