VcsBase: URL and email support in log editors

URL and email addresses are recognized in log and annotate
editors so the user can interact with as it is usually done
with VCS change identifiers.
The design of "text cursor handlers" opens the path for
further support of other contents like bug id of the
form "QTCREATORBUG-XXXX".

Change-Id: I88f553cf8ac90678ace52144ba0b43604279a234
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Hugues Delorme
2012-01-17 16:59:40 +01:00
parent a936318830
commit b6a06105c5
2 changed files with 405 additions and 87 deletions

View File

@@ -49,7 +49,10 @@ namespace Core { class IVersionControl; }
namespace VcsBase {
namespace Internal { class VcsBaseEditorWidgetPrivate; }
namespace Internal {
class ChangeTextCursorHandler;
class VcsBaseEditorWidgetPrivate;
}
class DiffHighlighter;
class BaseAnnotationHighlighter;
@@ -221,13 +224,11 @@ public slots:
void setFontSettings(const TextEditor::FontSettings &);
private slots:
void describe();
void slotActivateAnnotation();
void slotPopulateDiffBrowser();
void slotDiffBrowse(int);
void slotDiffCursorPositionChanged();
void slotAnnotateRevision();
void slotCopyRevision();
void slotApplyDiffChunk();
void slotPaste();
@@ -260,10 +261,8 @@ private:
DiffChunk diffChunk(QTextCursor cursor) const;
void jumpToChangeFromDiff(QTextCursor cursor);
QAction *createDescribeAction(const QString &change);
QAction *createAnnotateAction(const QString &change, bool previous = false);
QAction *createCopyRevisionAction(const QString &change);
friend class Internal::ChangeTextCursorHandler;
Internal::VcsBaseEditorWidgetPrivate *const d;
};