Commit 4b366303 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

VCS: Make dark color schemes work with annotation highlighter



Task-number: QTCREATORBUG-6257

Change-Id: Ied01cf6773b5114100afccbac33f359cc72c0889
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 5e365686
......@@ -37,8 +37,9 @@ using namespace Bazaar::Internal;
using namespace Bazaar;
BazaarAnnotationHighlighter::BazaarAnnotationHighlighter(const ChangeNumbers &changeNumbers,
const QColor &bg,
QTextDocument *document)
: VcsBase::BaseAnnotationHighlighter(changeNumbers, document),
: VcsBase::BaseAnnotationHighlighter(changeNumbers, bg, document),
m_changeset(QLatin1String(Constants::CHANGESET_ID))
{
}
......
......@@ -42,7 +42,7 @@ namespace Internal {
class BazaarAnnotationHighlighter : public VcsBase::BaseAnnotationHighlighter
{
public:
explicit BazaarAnnotationHighlighter(const ChangeNumbers &changeNumbers,
explicit BazaarAnnotationHighlighter(const ChangeNumbers &changeNumbers, const QColor &bg,
QTextDocument *document = 0);
private:
......
......@@ -101,9 +101,10 @@ VcsBase::DiffHighlighter *BazaarEditor::createDiffHighlighter() const
return new VcsBase::DiffHighlighter(m_diffFileId);
}
VcsBase::BaseAnnotationHighlighter *BazaarEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
VcsBase::BaseAnnotationHighlighter *BazaarEditor::createAnnotationHighlighter(const QSet<QString> &changes,
const QColor &bg) const
{
return new BazaarAnnotationHighlighter(changes);
return new BazaarAnnotationHighlighter(changes, bg);
}
QString BazaarEditor::fileNameFromDiffSpecification(const QTextBlock &inBlock) const
......
......@@ -51,7 +51,7 @@ private:
virtual QSet<QString> annotationChanges() const;
virtual QString changeUnderCursor(const QTextCursor &cursor) const;
virtual VcsBase::DiffHighlighter *createDiffHighlighter() const;
virtual VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
virtual VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes, const QColor &bg) const;
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileSpec) const;
const QRegExp m_exactChangesetId;
......
......@@ -36,8 +36,9 @@ using namespace Cvs;
using namespace Cvs::Internal;
CvsAnnotationHighlighter::CvsAnnotationHighlighter(const ChangeNumbers &changeNumbers,
const QColor &bg,
QTextDocument *document) :
VcsBase::BaseAnnotationHighlighter(changeNumbers, document),
VcsBase::BaseAnnotationHighlighter(changeNumbers, bg, document),
m_blank(QLatin1Char(' '))
{
}
......
......@@ -44,7 +44,7 @@ class CvsAnnotationHighlighter : public VcsBase::BaseAnnotationHighlighter
Q_OBJECT
public:
explicit CvsAnnotationHighlighter(const ChangeNumbers &changeNumbers,
explicit CvsAnnotationHighlighter(const ChangeNumbers &changeNumbers, const QColor &bg,
QTextDocument *document = 0);
private:
......
......@@ -131,9 +131,10 @@ VcsBase::DiffHighlighter *CvsEditor::createDiffHighlighter() const
return new VcsBase::DiffHighlighter(filePattern);
}
VcsBase::BaseAnnotationHighlighter *CvsEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
VcsBase::BaseAnnotationHighlighter *CvsEditor::createAnnotationHighlighter(const QSet<QString> &changes,
const QColor &bg) const
{
return new CvsAnnotationHighlighter(changes);
return new CvsAnnotationHighlighter(changes, bg);
}
QString CvsEditor::fileNameFromDiffSpecification(const QTextBlock &inBlock) const
......
......@@ -52,7 +52,7 @@ private:
QSet<QString> annotationChanges() const;
QString changeUnderCursor(const QTextCursor &) const;
VcsBase::DiffHighlighter *createDiffHighlighter() const;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes, const QColor &bg) const;
QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const;
QStringList annotationPreviousVersions(const QString &revision) const;
......
......@@ -38,8 +38,9 @@ namespace Git {
namespace Internal {
GitAnnotationHighlighter::GitAnnotationHighlighter(const ChangeNumbers &changeNumbers,
QTextDocument *document) :
VcsBase::BaseAnnotationHighlighter(changeNumbers, document),
const QColor &bg,
QTextDocument *document) :
VcsBase::BaseAnnotationHighlighter(changeNumbers, bg, document),
m_blank(QLatin1Char(' '))
{
}
......
......@@ -43,7 +43,7 @@ class GitAnnotationHighlighter : public VcsBase::BaseAnnotationHighlighter
{
Q_OBJECT
public:
explicit GitAnnotationHighlighter(const ChangeNumbers &changeNumbers,
explicit GitAnnotationHighlighter(const ChangeNumbers &changeNumbers, const QColor &bg,
QTextDocument *document = 0);
private:
......
......@@ -116,9 +116,10 @@ VcsBase::DiffHighlighter *GitEditor::createDiffHighlighter() const
return new VcsBase::DiffHighlighter(filePattern);
}
VcsBase::BaseAnnotationHighlighter *GitEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
VcsBase::BaseAnnotationHighlighter *GitEditor::createAnnotationHighlighter(const QSet<QString> &changes,
const QColor &bg) const
{
return new GitAnnotationHighlighter(changes);
return new GitAnnotationHighlighter(changes, bg);
}
QString GitEditor::fileNameFromDiffSpecification(const QTextBlock &inBlock) const
......
......@@ -61,7 +61,7 @@ private:
virtual QSet<QString> annotationChanges() const;
virtual QString changeUnderCursor(const QTextCursor &) const;
virtual VcsBase::DiffHighlighter *createDiffHighlighter() const;
virtual VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
virtual VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes, const QColor &bg) const;
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const;
virtual QStringList annotationPreviousVersions(const QString &revision) const;
......
......@@ -37,8 +37,9 @@ using namespace Mercurial::Internal;
using namespace Mercurial;
MercurialAnnotationHighlighter::MercurialAnnotationHighlighter(const ChangeNumbers &changeNumbers,
const QColor &bg,
QTextDocument *document)
: VcsBase::BaseAnnotationHighlighter(changeNumbers, document),
: VcsBase::BaseAnnotationHighlighter(changeNumbers, bg, document),
changeset(QLatin1String(Constants::CHANGESETID12))
{
}
......
......@@ -42,7 +42,7 @@ namespace Internal {
class MercurialAnnotationHighlighter : public VcsBase::BaseAnnotationHighlighter
{
public:
explicit MercurialAnnotationHighlighter(const ChangeNumbers &changeNumbers,
explicit MercurialAnnotationHighlighter(const ChangeNumbers &changeNumbers, const QColor &bg,
QTextDocument *document = 0);
private:
......
......@@ -96,9 +96,10 @@ VcsBase::DiffHighlighter *MercurialEditor::createDiffHighlighter() const
return new VcsBase::DiffHighlighter(diffIdentifier);
}
VcsBase::BaseAnnotationHighlighter *MercurialEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
VcsBase::BaseAnnotationHighlighter *MercurialEditor::createAnnotationHighlighter(const QSet<QString> &changes,
const QColor &bg) const
{
return new MercurialAnnotationHighlighter(changes);
return new MercurialAnnotationHighlighter(changes, bg);
}
QString MercurialEditor::fileNameFromDiffSpecification(const QTextBlock &inBlock) const
......
......@@ -50,7 +50,7 @@ private:
virtual QSet<QString> annotationChanges() const;
virtual QString changeUnderCursor(const QTextCursor &cursor) const;
virtual VcsBase::DiffHighlighter *createDiffHighlighter() const;
virtual VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
virtual VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes, const QColor &bg) const;
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileSpec) const;
virtual QStringList annotationPreviousVersions(const QString &revision) const;
......
......@@ -36,8 +36,9 @@ namespace Perforce {
namespace Internal {
PerforceAnnotationHighlighter::PerforceAnnotationHighlighter(const ChangeNumbers &changeNumbers,
const QColor &bg,
QTextDocument *document) :
VcsBase::BaseAnnotationHighlighter(changeNumbers, document),
VcsBase::BaseAnnotationHighlighter(changeNumbers, bg, document),
m_colon(QLatin1Char(':'))
{
}
......
......@@ -44,6 +44,7 @@ class PerforceAnnotationHighlighter : public VcsBase::BaseAnnotationHighlighter
Q_OBJECT
public:
explicit PerforceAnnotationHighlighter(const ChangeNumbers &changeNumbers,
const QColor &bg,
QTextDocument *document = 0);
private:
......
......@@ -112,9 +112,10 @@ VcsBase::DiffHighlighter *PerforceEditor::createDiffHighlighter() const
return new VcsBase::DiffHighlighter(filePattern);
}
VcsBase::BaseAnnotationHighlighter *PerforceEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
VcsBase::BaseAnnotationHighlighter *PerforceEditor::createAnnotationHighlighter(const QSet<QString> &changes,
const QColor &bg) const
{
return new PerforceAnnotationHighlighter(changes);
return new PerforceAnnotationHighlighter(changes, bg);
}
QString PerforceEditor::fileNameFromDiffSpecification(const QTextBlock &inBlock) const
......
......@@ -54,7 +54,7 @@ private:
virtual QSet<QString> annotationChanges() const;
virtual QString changeUnderCursor(const QTextCursor &) const;
virtual VcsBase::DiffHighlighter *createDiffHighlighter() const;
virtual VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
virtual VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes, const QColor &bg) const;
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const;
virtual QStringList annotationPreviousVersions(const QString &v) const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment