VCS[perforce,svn,vcs]: Use convenience to tag editors for reuse.

Introduce convenience to determine editor tags to avoid
crashes on empty files arguments, etc (VCSBaseEditor).
Add diff-whitespace handling and 'Revert chunk' to Perforce.

Task-number: QTCREATORBUG-4305
This commit is contained in:
Friedemann Kleint
2011-03-31 10:57:33 +02:00
parent 938dd71e1a
commit 4ed14a1f2c
6 changed files with 165 additions and 79 deletions

View File

@@ -186,6 +186,14 @@ public:
bool setConfigurationWidget(QWidget *w);
QWidget *configurationWidget() const;
/* Tagging editors: Sometimes, an editor should be re-used, for example, when showing
* a diff of the same file with different diff-options. In order to be able to find
* the editor, they get a 'tag' containing type and parameters (dynamic property string). */
static void tagEditor(Core::IEditor *e, const QString &tag);
static Core::IEditor* locateEditorByTag(const QString &tag);
static QString editorTag(EditorContentType t, const QString &workingDirectory, const QStringList &files,
const QString &revision = QString());
signals:
// These signals also exist in the opaque editable (IEditor) that is
// handled by the editor manager for convenience. They are emitted