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

Creator removes bookmarks in reloaded file after external change

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • Qt Creator 1.3.83 (2.0.0-beta), Qt Creator 1.3.85 (2.0.0-rc1)
    • Editors
    • None
    • 76020b61527db086e7b13fdad63ee5b43ff5f2b8

      When QtCreator realizes that file has been changed externally, it asks user if he wants to reload file. And if user agrees, Creator reloads file removing all bookmarks associated with it (In the same way as if user explicitly removed file contents with Ctrl-A, delete).

      Since reloaded file will be with high probability close to original one (for example, git checkout changed file) and there is no way to undelete automatically removed bookmarks, I consider current behavior as a bug: Creator should try to retain bookmarks.

      Kick-ass solution would be deriving where bookmark should move by running diff, but simply holding bookmarks on lines they were before is enough (for me).

      Here is how I solved it for myself:
      http://qt.gitorious.org/~igogo/qt-creator/igogos-qt-creator/commit/a493c77c7366c7e6ab5bef4e7f0f12090ffe7f89

      The solution is not very elegant, but maybe it'll help you to find right way .

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

            lindeije Thorbjørn Lindeijer (closed Nokia identity) (Inactive)
            igogo Alexey Semenko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes