Througout the initial review the singleton was transformed into an
ordinary class, but a error was introduced: The "reference" file was
incorrectly assumed to be the editors file, which is wrong, since
it should be the declaration file.
Change-Id: Iad3e25a690fa8bd07a18184b24b10f8dea965332
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This patch introduces a priority-based mechanism when searching for certains
symbols in the snapshot. The priority corresponds to how similar the file path
from the "reference" symbol is to the file path from the "candidate" symbol.
This solves a variety of issues when matching "equivalent" symbols but that
are in another file/project, such as when following a function declaration,
a forward class declaration, or adding a definition through a quickfix.
There's now a symbol finder which will compute the "best" search order and cache
the most recent results. A consequence is that following symbols in some cases
is slower, but not apparently significatly.
Note: The "find" functions were moved from the Snapshot to the new SymbolFinder
class.
Task-number: QTCREATORBUG-6697
Task-number: QTCREATORBUG-6792
Change-Id: Ia518f014275fec1f4d0cb3224bd4e06a9df6d557
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Previously RefactoringFiles were usually passed around by value.
However, since a RefactoringFile may sometimes own a QTextDocument
(when it was read from a file), that's not great and caused the
file to be reread after every copy.
With this change RefactoringFile becomes noncopyable and is always
owned by a shared pointer.
This change also allowed having const RefactoringFiles which is
useful because they can be safely used from other threads. See
CppRefactoringChanges::fileNoEditor.
Change-Id: I9045921d6d0f6349f9558ff2a3d8317ea172193b
Reviewed-on: http://codereview.qt.nokia.com/3084
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
preferably (there was a bug when source file of the same
name existed in several folders of the project).
Task-number: QTCREATORBUG-1880
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
So that now when you do "Go to slot" for "valueChanged(QString)"
signal the newly created slot will get (const QString &) decoration.
RevBy: Friedemann Kleint <qtc-committer@nokia.com>
to be used for the promoted widgets dialog.
See also 00e954ca817f89958a8a8777d93d3843252dc88c in Qt 4.8.
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Task-number: QTCREATORBUG-163
Re-introduce FormWindowEditor as IEditor used for
Designer. Use SharedTools::WidgetHost directly
for embedding into FormEditorStack, doing the
geometry-changed handling in there as well.
- Remove shared subwindow reparenting from EditorWidget, make EditorWidget
inherit FancyMainWindow. and use just once instance of it instead of
per-editor ones.
- Embedded FormEditorStack into EditorWidget as a centralwidget.
- Changed FormWindowEditor's base class from IEditor to SharedTools::FormWindowHost
(Widget) to be embedded into FormEditorStack (no need to be an IEditor),
Remove Designer::Internal::FormWindowHost which had little functionality.
- Add Design Mode widget to FormEditorW which has FakeToolBar and EditorWidget
(single instance) in a vertical layout.
- Removed ProxyAction class handling dock view toggle actions of several EditorWidgets
(no longer necessary since there is just once instance). Moved "View menu" to bottom.
- Started to make FakeToolBar work as a single instance listening on changing
xml editors
- Include-file/slot connection clean-up.
...making use of the new code model features. Move code to
separate file. Make it possible to obtain path to generated
header file from project manager.