Skip to content
  • Ahmad Samir's avatar
    FileFilter: add line/column numbers to file urls; also match absolute paths · 923f8d14
    Ahmad Samir authored and Kurt Hindenburg's avatar Kurt Hindenburg committed
    Since there is no universal way to tell a text editor about line/column
    on the cli (each editor seems to have its own scheme), there is a profile
    option to let the user specify the command to use to open local text files,
    e.g.:
    /usr/bin/kate PATH:LINE:COLUMN
    /usr/bin/gedit +LINE:COLUMN PATH
    
    then we replace PATH LINE and COLUMN to create the cmd to pass on
    to KIO::ApplicationLauncherJob.
    
    Current use cases, opening a file at:
     - specific line, from the ouput of "grep -n":   "path/to/some/file:123"
     - specific line/column, from the output of gcc compiler errors:
       "/path/to/file:123:123"
     - specific line, from the ouput of ctest, when there is a compilation error:
       "[/path/to/some/file(123)]"
    
    Change the regex to also match absolute file paths, this is useful in
    general and also compilation errors usually use absolute file paths.
    
    Tweak the regex matching text between two single/double quotes so that it
    doesn't match newline characters.
    
    Refactor the UI file to use QBoxLayouts, this way each related set of
    options can be put together, which makes future changes slightly easier.
    923f8d14