forked from qt-creator/qt-creator
VcsBase: Modernize headers
* Use pragma once * Use override * Remove Q_DECLARE_PRIVATE as that makes no sense for QtCreator Change-Id: Ic31d4868c172a0b8fcb50cc9a71a6e95639cf84c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -51,43 +51,31 @@ namespace VcsBase {
|
|||||||
|
|
||||||
class BaseAnnotationHighlighterPrivate
|
class BaseAnnotationHighlighterPrivate
|
||||||
{
|
{
|
||||||
BaseAnnotationHighlighter *q_ptr;
|
|
||||||
Q_DECLARE_PUBLIC(BaseAnnotationHighlighter)
|
|
||||||
public:
|
public:
|
||||||
enum Formats {
|
enum Formats {
|
||||||
BackgroundFormat // C_TEXT
|
BackgroundFormat // C_TEXT
|
||||||
};
|
};
|
||||||
|
|
||||||
BaseAnnotationHighlighterPrivate();
|
BaseAnnotationHighlighterPrivate(BaseAnnotationHighlighter *q_) : q(q_) { }
|
||||||
|
|
||||||
void updateOtherFormats();
|
void updateOtherFormats();
|
||||||
|
|
||||||
ChangeNumberFormatMap m_changeNumberMap;
|
ChangeNumberFormatMap m_changeNumberMap;
|
||||||
QColor m_background;
|
QColor m_background;
|
||||||
|
BaseAnnotationHighlighter *const q;
|
||||||
};
|
};
|
||||||
|
|
||||||
BaseAnnotationHighlighterPrivate::BaseAnnotationHighlighterPrivate()
|
|
||||||
: q_ptr(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void BaseAnnotationHighlighterPrivate::updateOtherFormats()
|
void BaseAnnotationHighlighterPrivate::updateOtherFormats()
|
||||||
{
|
{
|
||||||
Q_Q(BaseAnnotationHighlighter);
|
|
||||||
m_background = q->formatForCategory(BackgroundFormat).brushProperty(QTextFormat::BackgroundBrush).color();
|
m_background = q->formatForCategory(BackgroundFormat).brushProperty(QTextFormat::BackgroundBrush).color();
|
||||||
q->setChangeNumbers(m_changeNumberMap.keys().toSet());
|
q->setChangeNumbers(m_changeNumberMap.keys().toSet());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BaseAnnotationHighlighter::BaseAnnotationHighlighter(const ChangeNumbers &changeNumbers,
|
BaseAnnotationHighlighter::BaseAnnotationHighlighter(const ChangeNumbers &changeNumbers,
|
||||||
QTextDocument *document) :
|
QTextDocument *document) :
|
||||||
TextEditor::SyntaxHighlighter(document),
|
TextEditor::SyntaxHighlighter(document),
|
||||||
d_ptr(new BaseAnnotationHighlighterPrivate())
|
d(new BaseAnnotationHighlighterPrivate(this))
|
||||||
{
|
{
|
||||||
d_ptr->q_ptr = this;
|
|
||||||
|
|
||||||
Q_D(BaseAnnotationHighlighter);
|
|
||||||
|
|
||||||
static QVector<TextEditor::TextStyle> categories;
|
static QVector<TextEditor::TextStyle> categories;
|
||||||
if (categories.isEmpty())
|
if (categories.isEmpty())
|
||||||
categories << TextEditor::C_TEXT;
|
categories << TextEditor::C_TEXT;
|
||||||
@@ -100,11 +88,11 @@ BaseAnnotationHighlighter::BaseAnnotationHighlighter(const ChangeNumbers &change
|
|||||||
|
|
||||||
BaseAnnotationHighlighter::~BaseAnnotationHighlighter()
|
BaseAnnotationHighlighter::~BaseAnnotationHighlighter()
|
||||||
{
|
{
|
||||||
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseAnnotationHighlighter::setChangeNumbers(const ChangeNumbers &changeNumbers)
|
void BaseAnnotationHighlighter::setChangeNumbers(const ChangeNumbers &changeNumbers)
|
||||||
{
|
{
|
||||||
Q_D(BaseAnnotationHighlighter);
|
|
||||||
d->m_changeNumberMap.clear();
|
d->m_changeNumberMap.clear();
|
||||||
if (!changeNumbers.isEmpty()) {
|
if (!changeNumbers.isEmpty()) {
|
||||||
// Assign a color gradient to annotation change numbers. Give
|
// Assign a color gradient to annotation change numbers. Give
|
||||||
@@ -125,7 +113,6 @@ void BaseAnnotationHighlighter::setChangeNumbers(const ChangeNumbers &changeNumb
|
|||||||
|
|
||||||
void BaseAnnotationHighlighter::highlightBlock(const QString &text)
|
void BaseAnnotationHighlighter::highlightBlock(const QString &text)
|
||||||
{
|
{
|
||||||
Q_D(BaseAnnotationHighlighter);
|
|
||||||
if (text.isEmpty() || d->m_changeNumberMap.empty())
|
if (text.isEmpty() || d->m_changeNumberMap.empty())
|
||||||
return;
|
return;
|
||||||
const QString change = changeNumber(text);
|
const QString change = changeNumber(text);
|
||||||
@@ -136,7 +123,6 @@ void BaseAnnotationHighlighter::highlightBlock(const QString &text)
|
|||||||
|
|
||||||
void BaseAnnotationHighlighter::setFontSettings(const TextEditor::FontSettings &fontSettings)
|
void BaseAnnotationHighlighter::setFontSettings(const TextEditor::FontSettings &fontSettings)
|
||||||
{
|
{
|
||||||
Q_D(BaseAnnotationHighlighter);
|
|
||||||
SyntaxHighlighter::setFontSettings(fontSettings);
|
SyntaxHighlighter::setFontSettings(fontSettings);
|
||||||
d->updateOtherFormats();
|
d->updateOtherFormats();
|
||||||
}
|
}
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef BASEANNOTATIONHIGHLIGHTER_H
|
#pragma once
|
||||||
#define BASEANNOTATIONHIGHLIGHTER_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -36,27 +35,26 @@ class BaseAnnotationHighlighterPrivate;
|
|||||||
class VCSBASE_EXPORT BaseAnnotationHighlighter : public TextEditor::SyntaxHighlighter
|
class VCSBASE_EXPORT BaseAnnotationHighlighter : public TextEditor::SyntaxHighlighter
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DECLARE_PRIVATE(BaseAnnotationHighlighter)
|
|
||||||
public:
|
public:
|
||||||
typedef QSet<QString> ChangeNumbers;
|
typedef QSet<QString> ChangeNumbers;
|
||||||
|
|
||||||
explicit BaseAnnotationHighlighter(const ChangeNumbers &changeNumbers,
|
explicit BaseAnnotationHighlighter(const ChangeNumbers &changeNumbers,
|
||||||
QTextDocument *document = 0);
|
QTextDocument *document = 0);
|
||||||
virtual ~BaseAnnotationHighlighter();
|
~BaseAnnotationHighlighter() override;
|
||||||
|
|
||||||
void setChangeNumbers(const ChangeNumbers &changeNumbers);
|
void setChangeNumbers(const ChangeNumbers &changeNumbers);
|
||||||
|
|
||||||
virtual void highlightBlock(const QString &text);
|
virtual void highlightBlock(const QString &text) override;
|
||||||
|
|
||||||
virtual void setFontSettings(const TextEditor::FontSettings &fontSettings);
|
virtual void setFontSettings(const TextEditor::FontSettings &fontSettings) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Implement this to return the change number of a line
|
// Implement this to return the change number of a line
|
||||||
virtual QString changeNumber(const QString &block) const = 0;
|
virtual QString changeNumber(const QString &block) const = 0;
|
||||||
|
|
||||||
QScopedPointer<BaseAnnotationHighlighterPrivate> d_ptr;
|
BaseAnnotationHighlighterPrivate *const d;
|
||||||
|
friend class BaseAnnotationHighlighterPrivate;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // BASEANNOTATIONHIGHLIGHTER_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef BASEVCSEDITORFACTORY_H
|
#pragma once
|
||||||
#define BASEVCSEDITORFACTORY_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -48,6 +47,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // BASEVCSEDITORFACTORY_H
|
|
||||||
|
|
||||||
|
@@ -37,10 +37,6 @@ VcsSubmitEditorFactory::VcsSubmitEditorFactory
|
|||||||
addMimeType(parameters->mimeType);
|
addMimeType(parameters->mimeType);
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsSubmitEditorFactory::~VcsSubmitEditorFactory()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Core::IEditor *VcsSubmitEditorFactory::createEditor()
|
Core::IEditor *VcsSubmitEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
return m_editorCreator();
|
return m_editorCreator();
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef BASEVCSSUBMITEDITORFACTORY_H
|
#pragma once
|
||||||
#define BASEVCSSUBMITEDITORFACTORY_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -46,14 +45,11 @@ public:
|
|||||||
typedef std::function<VcsBaseSubmitEditor *()> EditorCreator;
|
typedef std::function<VcsBaseSubmitEditor *()> EditorCreator;
|
||||||
|
|
||||||
VcsSubmitEditorFactory(const VcsBaseSubmitEditorParameters *parameters, const EditorCreator &editorCreator);
|
VcsSubmitEditorFactory(const VcsBaseSubmitEditorParameters *parameters, const EditorCreator &editorCreator);
|
||||||
~VcsSubmitEditorFactory();
|
|
||||||
|
|
||||||
Core::IEditor *createEditor();
|
Core::IEditor *createEditor() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EditorCreator m_editorCreator;
|
EditorCreator m_editorCreator;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // BASEVCSSUBMITEDITORFACTORY_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CLEANDIALOG_H
|
#pragma once
|
||||||
#define CLEANDIALOG_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -44,19 +43,19 @@ class VCSBASE_EXPORT CleanDialog : public QDialog
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CleanDialog(QWidget *parent = 0);
|
explicit CleanDialog(QWidget *parent = 0);
|
||||||
~CleanDialog();
|
~CleanDialog() override;
|
||||||
|
|
||||||
void setFileList(const QString &workingDirectory, const QStringList &files, const QStringList &ignoredFiles);
|
void setFileList(const QString &workingDirectory, const QStringList &files,
|
||||||
|
const QStringList &ignoredFiles);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void accept();
|
void accept() override;
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void slotDoubleClicked(const QModelIndex &);
|
void slotDoubleClicked(const QModelIndex &);
|
||||||
void selectAllItems(bool checked);
|
void selectAllItems(bool checked);
|
||||||
void updateSelectAllCheckBox();
|
void updateSelectAllCheckBox();
|
||||||
|
|
||||||
private:
|
|
||||||
QStringList checkedFiles() const;
|
QStringList checkedFiles() const;
|
||||||
bool promptToDelete();
|
bool promptToDelete();
|
||||||
void addFile(const QString &workingDirectory, QString fileName, bool checked);
|
void addFile(const QString &workingDirectory, QString fileName, bool checked);
|
||||||
@@ -65,5 +64,3 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // CLEANDIALOG_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef COMMONSETTINGSPAGE_H
|
#pragma once
|
||||||
#define COMMONSETTINGSPAGE_H
|
|
||||||
|
|
||||||
#include "commonvcssettings.h"
|
#include "commonvcssettings.h"
|
||||||
|
|
||||||
@@ -44,15 +43,14 @@ class CommonSettingsWidget : public QWidget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CommonSettingsWidget(QWidget *parent = 0);
|
explicit CommonSettingsWidget(QWidget *parent = 0);
|
||||||
~CommonSettingsWidget();
|
~CommonSettingsWidget() override;
|
||||||
|
|
||||||
CommonVcsSettings settings() const;
|
CommonVcsSettings settings() const;
|
||||||
void setSettings(const CommonVcsSettings &s);
|
void setSettings(const CommonVcsSettings &s);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void updatePath();
|
void updatePath();
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::CommonSettingsPage *m_ui;
|
Ui::CommonSettingsPage *m_ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -63,9 +61,9 @@ class CommonOptionsPage : public VcsBaseOptionsPage
|
|||||||
public:
|
public:
|
||||||
explicit CommonOptionsPage(QObject *parent = 0);
|
explicit CommonOptionsPage(QObject *parent = 0);
|
||||||
|
|
||||||
QWidget *widget();
|
QWidget *widget() override;
|
||||||
void apply();
|
void apply() override;
|
||||||
void finish();
|
void finish() override;
|
||||||
|
|
||||||
CommonVcsSettings settings() const { return m_settings; }
|
CommonVcsSettings settings() const { return m_settings; }
|
||||||
|
|
||||||
@@ -79,5 +77,3 @@ private:
|
|||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // COMMONSETTINGSPAGE_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef COMMONVCSSETTINGS_H
|
#pragma once
|
||||||
#define COMMONVCSSETTINGS_H
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
@@ -66,5 +65,3 @@ QDebug operator<<(QDebug, const CommonVcsSettings &);
|
|||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // COMMONVCSSETTINGS_H
|
|
||||||
|
@@ -97,14 +97,25 @@ static inline QTextCharFormat invertedColorFormat(const QTextCharFormat &in)
|
|||||||
// --- DiffAndLogHighlighterPrivate
|
// --- DiffAndLogHighlighterPrivate
|
||||||
class DiffAndLogHighlighterPrivate
|
class DiffAndLogHighlighterPrivate
|
||||||
{
|
{
|
||||||
DiffAndLogHighlighter *q_ptr;
|
|
||||||
Q_DECLARE_PUBLIC(DiffAndLogHighlighter)
|
|
||||||
public:
|
public:
|
||||||
DiffAndLogHighlighterPrivate(const QRegExp &filePattern, const QRegExp &changePattern);
|
DiffAndLogHighlighterPrivate(DiffAndLogHighlighter *q_, const QRegExp &filePattern,
|
||||||
|
const QRegExp &changePattern) :
|
||||||
|
q(q_),
|
||||||
|
m_filePattern(filePattern),
|
||||||
|
m_changePattern(changePattern),
|
||||||
|
m_locationIndicator(QLatin1String("@@")),
|
||||||
|
m_diffInIndicator(QLatin1Char('+')),
|
||||||
|
m_diffOutIndicator(QLatin1Char('-')),
|
||||||
|
m_foldingState(Internal::StartOfFile)
|
||||||
|
{
|
||||||
|
QTC_CHECK(filePattern.isValid());
|
||||||
|
}
|
||||||
|
|
||||||
Internal::DiffFormats analyzeLine(const QString &block) const;
|
Internal::DiffFormats analyzeLine(const QString &block) const;
|
||||||
void updateOtherFormats();
|
void updateOtherFormats();
|
||||||
|
|
||||||
|
DiffAndLogHighlighter *const q;
|
||||||
|
|
||||||
mutable QRegExp m_filePattern;
|
mutable QRegExp m_filePattern;
|
||||||
mutable QRegExp m_changePattern;
|
mutable QRegExp m_changePattern;
|
||||||
const QString m_locationIndicator;
|
const QString m_locationIndicator;
|
||||||
@@ -115,18 +126,6 @@ public:
|
|||||||
Internal::FoldingState m_foldingState;
|
Internal::FoldingState m_foldingState;
|
||||||
};
|
};
|
||||||
|
|
||||||
DiffAndLogHighlighterPrivate::DiffAndLogHighlighterPrivate(const QRegExp &filePattern, const QRegExp &changePattern) :
|
|
||||||
q_ptr(0),
|
|
||||||
m_filePattern(filePattern),
|
|
||||||
m_changePattern(changePattern),
|
|
||||||
m_locationIndicator(QLatin1String("@@")),
|
|
||||||
m_diffInIndicator(QLatin1Char('+')),
|
|
||||||
m_diffOutIndicator(QLatin1Char('-')),
|
|
||||||
m_foldingState(Internal::StartOfFile)
|
|
||||||
{
|
|
||||||
QTC_CHECK(filePattern.isValid());
|
|
||||||
}
|
|
||||||
|
|
||||||
Internal::DiffFormats DiffAndLogHighlighterPrivate::analyzeLine(const QString &text) const
|
Internal::DiffFormats DiffAndLogHighlighterPrivate::analyzeLine(const QString &text) const
|
||||||
{
|
{
|
||||||
// Do not match on git "--- a/" as a deleted line, check
|
// Do not match on git "--- a/" as a deleted line, check
|
||||||
@@ -146,7 +145,6 @@ Internal::DiffFormats DiffAndLogHighlighterPrivate::analyzeLine(const QString &t
|
|||||||
|
|
||||||
void DiffAndLogHighlighterPrivate::updateOtherFormats()
|
void DiffAndLogHighlighterPrivate::updateOtherFormats()
|
||||||
{
|
{
|
||||||
Q_Q(DiffAndLogHighlighter);
|
|
||||||
m_addedTrailingWhiteSpaceFormat =
|
m_addedTrailingWhiteSpaceFormat =
|
||||||
invertedColorFormat(q->formatForCategory(Internal::DiffInFormat));
|
invertedColorFormat(q->formatForCategory(Internal::DiffInFormat));
|
||||||
|
|
||||||
@@ -155,11 +153,8 @@ void DiffAndLogHighlighterPrivate::updateOtherFormats()
|
|||||||
// --- DiffAndLogHighlighter
|
// --- DiffAndLogHighlighter
|
||||||
DiffAndLogHighlighter::DiffAndLogHighlighter(const QRegExp &filePattern, const QRegExp &changePattern) :
|
DiffAndLogHighlighter::DiffAndLogHighlighter(const QRegExp &filePattern, const QRegExp &changePattern) :
|
||||||
TextEditor::SyntaxHighlighter(static_cast<QTextDocument *>(0)),
|
TextEditor::SyntaxHighlighter(static_cast<QTextDocument *>(0)),
|
||||||
d_ptr(new DiffAndLogHighlighterPrivate(filePattern, changePattern))
|
d(new DiffAndLogHighlighterPrivate(this, filePattern, changePattern))
|
||||||
{
|
{
|
||||||
d_ptr->q_ptr = this;
|
|
||||||
Q_D(DiffAndLogHighlighter);
|
|
||||||
|
|
||||||
static QVector<TextEditor::TextStyle> categories;
|
static QVector<TextEditor::TextStyle> categories;
|
||||||
if (categories.isEmpty()) {
|
if (categories.isEmpty()) {
|
||||||
categories << TextEditor::C_TEXT
|
categories << TextEditor::C_TEXT
|
||||||
@@ -175,6 +170,7 @@ DiffAndLogHighlighter::DiffAndLogHighlighter(const QRegExp &filePattern, const Q
|
|||||||
|
|
||||||
DiffAndLogHighlighter::~DiffAndLogHighlighter()
|
DiffAndLogHighlighter::~DiffAndLogHighlighter()
|
||||||
{
|
{
|
||||||
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check trailing spaces
|
// Check trailing spaces
|
||||||
@@ -194,7 +190,6 @@ static inline int trimmedLength(const QString &in)
|
|||||||
*/
|
*/
|
||||||
void DiffAndLogHighlighter::highlightBlock(const QString &text)
|
void DiffAndLogHighlighter::highlightBlock(const QString &text)
|
||||||
{
|
{
|
||||||
Q_D(DiffAndLogHighlighter);
|
|
||||||
if (text.isEmpty())
|
if (text.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -274,7 +269,6 @@ void DiffAndLogHighlighter::highlightBlock(const QString &text)
|
|||||||
|
|
||||||
void DiffAndLogHighlighter::setFontSettings(const TextEditor::FontSettings &fontSettings)
|
void DiffAndLogHighlighter::setFontSettings(const TextEditor::FontSettings &fontSettings)
|
||||||
{
|
{
|
||||||
Q_D(DiffAndLogHighlighter);
|
|
||||||
SyntaxHighlighter::setFontSettings(fontSettings);
|
SyntaxHighlighter::setFontSettings(fontSettings);
|
||||||
d->updateOtherFormats();
|
d->updateOtherFormats();
|
||||||
}
|
}
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef DIFFANDLOGHIGHLIGHTER_H
|
#pragma once
|
||||||
#define DIFFANDLOGHIGHLIGHTER_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -45,19 +44,18 @@ class DiffAndLogHighlighterPrivate;
|
|||||||
class VCSBASE_EXPORT DiffAndLogHighlighter : public TextEditor::SyntaxHighlighter
|
class VCSBASE_EXPORT DiffAndLogHighlighter : public TextEditor::SyntaxHighlighter
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DECLARE_PRIVATE(DiffAndLogHighlighter)
|
|
||||||
public:
|
public:
|
||||||
explicit DiffAndLogHighlighter(const QRegExp &filePattern, const QRegExp &changePattern);
|
explicit DiffAndLogHighlighter(const QRegExp &filePattern, const QRegExp &changePattern);
|
||||||
~DiffAndLogHighlighter();
|
~DiffAndLogHighlighter() override;
|
||||||
|
|
||||||
void highlightBlock(const QString &text);
|
void highlightBlock(const QString &text) override;
|
||||||
|
|
||||||
virtual void setFontSettings(const TextEditor::FontSettings &fontSettings);
|
virtual void setFontSettings(const TextEditor::FontSettings &fontSettings) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<DiffAndLogHighlighterPrivate> d_ptr;
|
friend class DiffAndLogHighlighterPrivate;
|
||||||
|
DiffAndLogHighlighterPrivate *const d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // DIFFANDLOGHIGHLIGHTER_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef NICKNAMEDIALOG_H
|
#pragma once
|
||||||
#define NICKNAMEDIALOG_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
@@ -46,7 +45,7 @@ class NickNameDialog : public QDialog
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit NickNameDialog(QStandardItemModel *model, QWidget *parent = 0);
|
explicit NickNameDialog(QStandardItemModel *model, QWidget *parent = 0);
|
||||||
virtual ~NickNameDialog();
|
~NickNameDialog() override;
|
||||||
|
|
||||||
QString nickName() const;
|
QString nickName() const;
|
||||||
|
|
||||||
@@ -59,11 +58,10 @@ public:
|
|||||||
// Return a list for a completer on the field line edits
|
// Return a list for a completer on the field line edits
|
||||||
static QStringList nickNameList(const QStandardItemModel *model);
|
static QStringList nickNameList(const QStandardItemModel *model);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void slotCurrentItemChanged(const QModelIndex &);
|
void slotCurrentItemChanged(const QModelIndex &);
|
||||||
void slotActivated(const QModelIndex &);
|
void slotActivated(const QModelIndex &);
|
||||||
|
|
||||||
private:
|
|
||||||
QPushButton *okButton() const;
|
QPushButton *okButton() const;
|
||||||
|
|
||||||
Ui::NickNameDialog *m_ui;
|
Ui::NickNameDialog *m_ui;
|
||||||
@@ -73,5 +71,3 @@ private:
|
|||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // NICKNAMEDIALOG_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef SUBMITEDITORFILE_H
|
#pragma once
|
||||||
#define SUBMITEDITORFILE_H
|
|
||||||
|
|
||||||
#include "vcsbasesubmiteditor.h"
|
#include "vcsbasesubmiteditor.h"
|
||||||
|
|
||||||
@@ -60,8 +59,5 @@ private:
|
|||||||
VcsBaseSubmitEditor *m_editor;
|
VcsBaseSubmitEditor *m_editor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // SUBMITEDITORFILE_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef SUBMITEDITORWIDGET_H
|
#pragma once
|
||||||
#define SUBMITEDITORWIDGET_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -54,7 +53,7 @@ class VCSBASE_EXPORT SubmitEditorWidget : public QWidget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
SubmitEditorWidget();
|
SubmitEditorWidget();
|
||||||
~SubmitEditorWidget();
|
~SubmitEditorWidget() override;
|
||||||
|
|
||||||
// Register/Unregister actions that are managed by ActionManager with this widget.
|
// Register/Unregister actions that are managed by ActionManager with this widget.
|
||||||
// The submit action should have Core::Command::CA_UpdateText set as its text will
|
// The submit action should have Core::Command::CA_UpdateText set as its text will
|
||||||
@@ -101,18 +100,15 @@ public:
|
|||||||
void setUpdateInProgress(bool value);
|
void setUpdateInProgress(bool value);
|
||||||
bool updateInProgress() const;
|
bool updateInProgress() const;
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void updateSubmitAction();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void diffSelected(const QList<int> &);
|
void diffSelected(const QList<int> &);
|
||||||
void fileSelectionChanged(bool someFileSelected);
|
void fileSelectionChanged(bool someFileSelected);
|
||||||
void submitActionTextChanged(const QString &);
|
void submitActionTextChanged(const QString &);
|
||||||
void submitActionEnabledChanged(bool);
|
void submitActionEnabledChanged(bool);
|
||||||
|
|
||||||
private slots:
|
|
||||||
void updateCheckAllComboBox();
|
|
||||||
void checkAllToggled();
|
|
||||||
void checkAll();
|
|
||||||
void uncheckAll();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QString cleanupDescription(const QString &) const;
|
virtual QString cleanupDescription(const QString &) const;
|
||||||
virtual QString commitName() const;
|
virtual QString commitName() const;
|
||||||
@@ -124,10 +120,12 @@ protected:
|
|||||||
protected slots:
|
protected slots:
|
||||||
void descriptionTextChanged();
|
void descriptionTextChanged();
|
||||||
|
|
||||||
public slots:
|
private:
|
||||||
void updateSubmitAction();
|
void updateCheckAllComboBox();
|
||||||
|
void checkAllToggled();
|
||||||
|
void checkAll();
|
||||||
|
void uncheckAll();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void triggerDiffSelected();
|
void triggerDiffSelected();
|
||||||
void diffActivated(const QModelIndex &index);
|
void diffActivated(const QModelIndex &index);
|
||||||
void diffActivatedDelayed();
|
void diffActivatedDelayed();
|
||||||
@@ -136,7 +134,6 @@ private slots:
|
|||||||
void editorCustomContextMenuRequested(const QPoint &);
|
void editorCustomContextMenuRequested(const QPoint &);
|
||||||
void fileListCustomContextMenuRequested(const QPoint & pos);
|
void fileListCustomContextMenuRequested(const QPoint & pos);
|
||||||
|
|
||||||
private:
|
|
||||||
bool hasSelection() const;
|
bool hasSelection() const;
|
||||||
int checkedFilesCount() const;
|
int checkedFilesCount() const;
|
||||||
void wrapDescription();
|
void wrapDescription();
|
||||||
@@ -146,5 +143,3 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // SUBMITEDITORWIDGET_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef SUBMITFIELDWIDGET_H
|
#pragma once
|
||||||
#define SUBMITFIELDWIDGET_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -47,7 +46,7 @@ class VCSBASE_EXPORT SubmitFieldWidget : public QWidget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SubmitFieldWidget(QWidget *parent = 0);
|
explicit SubmitFieldWidget(QWidget *parent = 0);
|
||||||
virtual ~SubmitFieldWidget();
|
~SubmitFieldWidget() override;
|
||||||
|
|
||||||
QStringList fields() const;
|
QStringList fields() const;
|
||||||
void setFields(const QStringList&);
|
void setFields(const QStringList&);
|
||||||
@@ -70,12 +69,11 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void browseButtonClicked(int pos, const QString &field);
|
void browseButtonClicked(int pos, const QString &field);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void slotRemove();
|
void slotRemove();
|
||||||
void slotComboIndexChanged(int);
|
void slotComboIndexChanged(int);
|
||||||
void slotBrowseButtonClicked();
|
void slotBrowseButtonClicked();
|
||||||
|
|
||||||
private:
|
|
||||||
void removeField(int index);
|
void removeField(int index);
|
||||||
bool comboIndexChange(int fieldNumber, int index);
|
bool comboIndexChange(int fieldNumber, int index);
|
||||||
void createField(const QString &f);
|
void createField(const QString &f);
|
||||||
@@ -84,5 +82,3 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // SUBMITFIELDWIDGET_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSBASEGLOBAL_H
|
#pragma once
|
||||||
#define VCSBASEGLOBAL_H
|
|
||||||
|
|
||||||
#include <qglobal.h>
|
#include <qglobal.h>
|
||||||
|
|
||||||
@@ -33,5 +32,3 @@
|
|||||||
#else
|
#else
|
||||||
# define VCSBASE_EXPORT Q_DECL_IMPORT
|
# define VCSBASE_EXPORT Q_DECL_IMPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // VCSBASEGLOBAL_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSBASECLIENT_H
|
#pragma once
|
||||||
#define VCSBASECLIENT_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -46,7 +45,7 @@ namespace Core { class Id; }
|
|||||||
namespace Utils {
|
namespace Utils {
|
||||||
struct SynchronousProcessResponse;
|
struct SynchronousProcessResponse;
|
||||||
class ExitCodeInterpreter;
|
class ExitCodeInterpreter;
|
||||||
}
|
} // namespace Utils
|
||||||
|
|
||||||
namespace VcsBase {
|
namespace VcsBase {
|
||||||
|
|
||||||
@@ -64,7 +63,7 @@ class VCSBASE_EXPORT VcsBaseClientImpl : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit VcsBaseClientImpl(VcsBaseClientSettings *settings);
|
explicit VcsBaseClientImpl(VcsBaseClientSettings *settings);
|
||||||
~VcsBaseClientImpl();
|
~VcsBaseClientImpl() override;
|
||||||
|
|
||||||
VcsBaseClientSettings &settings() const;
|
VcsBaseClientSettings &settings() const;
|
||||||
|
|
||||||
@@ -137,14 +136,14 @@ public:
|
|||||||
class VCSBASE_EXPORT StatusItem
|
class VCSBASE_EXPORT StatusItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StatusItem() {}
|
StatusItem() = default;
|
||||||
StatusItem(const QString &s, const QString &f);
|
StatusItem(const QString &s, const QString &f);
|
||||||
QString flags;
|
QString flags;
|
||||||
QString file;
|
QString file;
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit VcsBaseClient(VcsBaseClientSettings *settings);
|
explicit VcsBaseClient(VcsBaseClientSettings *settings);
|
||||||
~VcsBaseClient();
|
~VcsBaseClient() override;
|
||||||
virtual bool synchronousCreateRepository(const QString &workingDir,
|
virtual bool synchronousCreateRepository(const QString &workingDir,
|
||||||
const QStringList &extraOptions = QStringList());
|
const QStringList &extraOptions = QStringList());
|
||||||
virtual bool synchronousClone(const QString &workingDir,
|
virtual bool synchronousClone(const QString &workingDir,
|
||||||
@@ -164,9 +163,9 @@ public:
|
|||||||
virtual bool synchronousPush(const QString &workingDir,
|
virtual bool synchronousPush(const QString &workingDir,
|
||||||
const QString &dstLocation,
|
const QString &dstLocation,
|
||||||
const QStringList &extraOptions = QStringList());
|
const QStringList &extraOptions = QStringList());
|
||||||
virtual void annotate(const QString &workingDir, const QString &file,
|
void annotate(const QString &workingDir, const QString &file,
|
||||||
const QString &revision = QString(), int lineNumber = -1,
|
const QString &revision = QString(), int lineNumber = -1,
|
||||||
const QStringList &extraOptions = QStringList());
|
const QStringList &extraOptions = QStringList()) override;
|
||||||
virtual void diff(const QString &workingDir, const QStringList &files = QStringList(),
|
virtual void diff(const QString &workingDir, const QStringList &files = QStringList(),
|
||||||
const QStringList &extraOptions = QStringList());
|
const QStringList &extraOptions = QStringList());
|
||||||
virtual void log(const QString &workingDir, const QStringList &files = QStringList(),
|
virtual void log(const QString &workingDir, const QStringList &files = QStringList(),
|
||||||
@@ -241,5 +240,3 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} //namespace VcsBase
|
} //namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSBASECLIENT_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSBASECLIENTSETTINGS_H
|
#pragma once
|
||||||
#define VCSBASECLIENTSETTINGS_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -103,5 +102,3 @@ inline bool operator!=(const VcsBaseClientSettings &s1, const VcsBaseClientSetti
|
|||||||
{ return !s1.equals(s2); }
|
{ return !s1.equals(s2); }
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSBASECLIENTSETTINGS_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSBASE_CONSTANTS_H
|
#pragma once
|
||||||
#define VCSBASE_CONSTANTS_H
|
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
@@ -51,5 +50,3 @@ const char VAR_VCS_TOPLEVELPATH[] = "CurrentProject:VcsTopLevelPath";
|
|||||||
|
|
||||||
} // namespace Constants
|
} // namespace Constants
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSBASE_CONSTANTS_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSBASEEDITOR_H
|
#pragma once
|
||||||
#define VCSBASEEDITOR_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -43,7 +42,7 @@ namespace VcsBase {
|
|||||||
namespace Internal {
|
namespace Internal {
|
||||||
class ChangeTextCursorHandler;
|
class ChangeTextCursorHandler;
|
||||||
class VcsBaseEditorWidgetPrivate;
|
class VcsBaseEditorWidgetPrivate;
|
||||||
}
|
} // namespace Internal
|
||||||
|
|
||||||
class BaseAnnotationHighlighter;
|
class BaseAnnotationHighlighter;
|
||||||
class VcsBaseEditorWidget;
|
class VcsBaseEditorWidget;
|
||||||
@@ -83,11 +82,11 @@ class VCSBASE_EXPORT VcsBaseEditor : public TextEditor::BaseTextEditor
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit VcsBaseEditor();
|
VcsBaseEditor();
|
||||||
|
|
||||||
// Utility to find a parameter set by type in an array.
|
// Utility to find a parameter set by type in an array.
|
||||||
static const VcsBaseEditorParameters *
|
static const VcsBaseEditorParameters *
|
||||||
findType(const VcsBaseEditorParameters *array, int arraySize, EditorContentType et);
|
findType(const VcsBaseEditorParameters *array, int arraySize, EditorContentType et);
|
||||||
|
|
||||||
// Utility to find the codec for a source (file or directory), querying
|
// Utility to find the codec for a source (file or directory), querying
|
||||||
// the editor manager and the project managers (defaults to system codec).
|
// the editor manager and the project managers (defaults to system codec).
|
||||||
@@ -231,19 +230,6 @@ protected:
|
|||||||
void mouseDoubleClickEvent(QMouseEvent *e) override;
|
void mouseDoubleClickEvent(QMouseEvent *e) override;
|
||||||
void keyPressEvent(QKeyEvent *) override;
|
void keyPressEvent(QKeyEvent *) override;
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotActivateAnnotation();
|
|
||||||
void slotPopulateDiffBrowser();
|
|
||||||
void slotPopulateLogBrowser();
|
|
||||||
void slotJumpToEntry(int);
|
|
||||||
void slotCursorPositionChanged() override;
|
|
||||||
void slotAnnotateRevision();
|
|
||||||
void slotApplyDiffChunk();
|
|
||||||
void slotPaste();
|
|
||||||
void showProgressIndicator();
|
|
||||||
void hideProgressIndicator();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
/* A helper that can be used to locate a file in a diff in case it
|
/* A helper that can be used to locate a file in a diff in case it
|
||||||
* is relative. Tries to derive the directory from base directory,
|
* is relative. Tries to derive the directory from base directory,
|
||||||
* source and version control. */
|
* source and version control. */
|
||||||
@@ -275,6 +261,17 @@ protected:
|
|||||||
virtual QString revisionSubject(const QTextBlock &inBlock) const;
|
virtual QString revisionSubject(const QTextBlock &inBlock) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void slotActivateAnnotation();
|
||||||
|
void slotPopulateDiffBrowser();
|
||||||
|
void slotPopulateLogBrowser();
|
||||||
|
void slotJumpToEntry(int);
|
||||||
|
void slotCursorPositionChanged() override;
|
||||||
|
void slotAnnotateRevision();
|
||||||
|
void slotApplyDiffChunk();
|
||||||
|
void slotPaste();
|
||||||
|
void showProgressIndicator();
|
||||||
|
void hideProgressIndicator();
|
||||||
|
|
||||||
bool canApplyDiffChunk(const DiffChunk &dc) const;
|
bool canApplyDiffChunk(const DiffChunk &dc) const;
|
||||||
// Revert a patch chunk. Default implementation uses patch.exe
|
// Revert a patch chunk. Default implementation uses patch.exe
|
||||||
bool applyDiffChunk(const DiffChunk &dc, bool revert = false) const;
|
bool applyDiffChunk(const DiffChunk &dc, bool revert = false) const;
|
||||||
@@ -302,5 +299,3 @@ public:
|
|||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(VcsBase::DiffChunk)
|
Q_DECLARE_METATYPE(VcsBase::DiffChunk)
|
||||||
|
|
||||||
#endif // VCSBASEEDITOR_H
|
|
||||||
|
@@ -226,11 +226,6 @@ void VcsBaseEditorParameterWidget::executeCommand()
|
|||||||
emit commandExecutionRequested();
|
emit commandExecutionRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBaseEditorParameterWidget::OptionMapping::OptionMapping() :
|
|
||||||
widget(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
VcsBaseEditorParameterWidget::OptionMapping::OptionMapping(const QString &option, QWidget *w) :
|
VcsBaseEditorParameterWidget::OptionMapping::OptionMapping(const QString &option, QWidget *w) :
|
||||||
widget(w)
|
widget(w)
|
||||||
{
|
{
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSBASE_VCSBASEEDITORPARAMETERWIDGET_H
|
#pragma once
|
||||||
#define VCSBASE_VCSBASEEDITORPARAMETERWIDGET_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -48,11 +47,12 @@ class VCSBASE_EXPORT VcsBaseEditorParameterWidget : public QWidget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit VcsBaseEditorParameterWidget(QWidget *parent = 0);
|
explicit VcsBaseEditorParameterWidget(QWidget *parent = 0);
|
||||||
~VcsBaseEditorParameterWidget();
|
~VcsBaseEditorParameterWidget() override;
|
||||||
|
|
||||||
struct VCSBASE_EXPORT ComboBoxItem
|
class VCSBASE_EXPORT ComboBoxItem
|
||||||
{
|
{
|
||||||
ComboBoxItem() {}
|
public:
|
||||||
|
ComboBoxItem() = default;
|
||||||
ComboBoxItem(const QString &text, const QVariant &val);
|
ComboBoxItem(const QString &text, const QVariant &val);
|
||||||
QString displayText;
|
QString displayText;
|
||||||
QVariant value;
|
QVariant value;
|
||||||
@@ -85,13 +85,14 @@ signals:
|
|||||||
void argumentsChanged();
|
void argumentsChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct OptionMapping
|
class OptionMapping
|
||||||
{
|
{
|
||||||
OptionMapping();
|
public:
|
||||||
|
OptionMapping() = default;
|
||||||
OptionMapping(const QString &option, QWidget *w);
|
OptionMapping(const QString &option, QWidget *w);
|
||||||
OptionMapping(const QStringList &optionList, QWidget *w);
|
OptionMapping(const QStringList &optionList, QWidget *w);
|
||||||
QStringList options;
|
QStringList options;
|
||||||
QWidget *widget;
|
QWidget *widget = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
const QList<OptionMapping> &optionMappings() const;
|
const QList<OptionMapping> &optionMappings() const;
|
||||||
@@ -104,5 +105,3 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSBASE_VCSBASEEDITORPARAMETERWIDGET_H
|
|
||||||
|
@@ -51,9 +51,6 @@ VcsBaseOptionsPage::VcsBaseOptionsPage(QObject *parent) : Core::IOptionsPage(par
|
|||||||
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_VCS_ICON));
|
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_VCS_ICON));
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBaseOptionsPage::~VcsBaseOptionsPage()
|
|
||||||
{ }
|
|
||||||
|
|
||||||
VcsClientOptionsPageWidget::VcsClientOptionsPageWidget(QWidget *parent) : QWidget(parent)
|
VcsClientOptionsPageWidget::VcsClientOptionsPageWidget(QWidget *parent) : QWidget(parent)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSBASEOPTIONSPAGE_H
|
#pragma once
|
||||||
#define VCSBASEOPTIONSPAGE_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -44,7 +43,6 @@ class VCSBASE_EXPORT VcsBaseOptionsPage : public Core::IOptionsPage
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit VcsBaseOptionsPage(QObject *parent = 0);
|
explicit VcsBaseOptionsPage(QObject *parent = 0);
|
||||||
~VcsBaseOptionsPage();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class VcsBaseClientImpl;
|
class VcsBaseClientImpl;
|
||||||
@@ -69,9 +67,9 @@ public:
|
|||||||
|
|
||||||
explicit VcsClientOptionsPage(Core::IVersionControl *control, VcsBaseClientImpl *client, QObject *parent = 0);
|
explicit VcsClientOptionsPage(Core::IVersionControl *control, VcsBaseClientImpl *client, QObject *parent = 0);
|
||||||
|
|
||||||
VcsClientOptionsPageWidget *widget();
|
VcsClientOptionsPageWidget *widget() override;
|
||||||
virtual void apply();
|
virtual void apply() override;
|
||||||
virtual void finish();
|
virtual void finish() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void settingsChanged();
|
void settingsChanged();
|
||||||
@@ -86,5 +84,3 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSBASEOPTIONSPAGE_H
|
|
||||||
|
@@ -353,12 +353,13 @@ public:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
VcsBasePluginState::VcsBasePluginState() : data(new VcsBasePluginStateData)
|
VcsBasePluginState::VcsBasePluginState() : data(new VcsBasePluginStateData)
|
||||||
{
|
{ }
|
||||||
}
|
|
||||||
|
|
||||||
VcsBasePluginState::VcsBasePluginState(const VcsBasePluginState &rhs) : data(rhs.data)
|
VcsBasePluginState::VcsBasePluginState(const VcsBasePluginState &rhs) : data(rhs.data)
|
||||||
{
|
{ }
|
||||||
}
|
|
||||||
|
VcsBasePluginState::~VcsBasePluginState() = default;
|
||||||
|
|
||||||
VcsBasePluginState &VcsBasePluginState::operator=(const VcsBasePluginState &rhs)
|
VcsBasePluginState &VcsBasePluginState::operator=(const VcsBasePluginState &rhs)
|
||||||
{
|
{
|
||||||
@@ -367,10 +368,6 @@ VcsBasePluginState &VcsBasePluginState::operator=(const VcsBasePluginState &rhs)
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBasePluginState::~VcsBasePluginState()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QString VcsBasePluginState::currentFile() const
|
QString VcsBasePluginState::currentFile() const
|
||||||
{
|
{
|
||||||
return data->m_state.currentFile;
|
return data->m_state.currentFile;
|
||||||
@@ -546,8 +543,7 @@ Internal::StateListener *VcsBasePluginPrivate::m_listener = 0;
|
|||||||
|
|
||||||
VcsBasePlugin::VcsBasePlugin() :
|
VcsBasePlugin::VcsBasePlugin() :
|
||||||
d(new VcsBasePluginPrivate())
|
d(new VcsBasePluginPrivate())
|
||||||
{
|
{ }
|
||||||
}
|
|
||||||
|
|
||||||
VcsBasePlugin::~VcsBasePlugin()
|
VcsBasePlugin::~VcsBasePlugin()
|
||||||
{
|
{
|
||||||
|
@@ -23,16 +23,15 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSBASEPLUGIN_H
|
#pragma once
|
||||||
#define VCSBASEPLUGIN_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
#include <extensionsystem/iplugin.h>
|
#include <extensionsystem/iplugin.h>
|
||||||
|
|
||||||
#include <QSharedDataPointer>
|
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QProcessEnvironment>
|
#include <QProcessEnvironment>
|
||||||
|
#include <QSharedDataPointer>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QAction;
|
class QAction;
|
||||||
@@ -131,10 +130,10 @@ protected:
|
|||||||
explicit VcsBasePlugin();
|
explicit VcsBasePlugin();
|
||||||
|
|
||||||
void initializeVcs(Core::IVersionControl *vc, const Core::Context &context);
|
void initializeVcs(Core::IVersionControl *vc, const Core::Context &context);
|
||||||
void extensionsInitialized();
|
void extensionsInitialized() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~VcsBasePlugin();
|
~VcsBasePlugin() override;
|
||||||
|
|
||||||
const VcsBasePluginState ¤tState() const;
|
const VcsBasePluginState ¤tState() const;
|
||||||
Core::IVersionControl *versionControl() const;
|
Core::IVersionControl *versionControl() const;
|
||||||
@@ -202,14 +201,11 @@ protected:
|
|||||||
// Returns whether actions should be set up further.
|
// Returns whether actions should be set up further.
|
||||||
bool enableMenuAction(ActionState as, QAction *in) const;
|
bool enableMenuAction(ActionState as, QAction *in) const;
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void slotSubmitEditorAboutToClose(VcsBaseSubmitEditor *submitEditor, bool *result);
|
void slotSubmitEditorAboutToClose(VcsBaseSubmitEditor *submitEditor, bool *result);
|
||||||
void slotStateChanged(const VcsBase::Internal::State &s, Core::IVersionControl *vc);
|
void slotStateChanged(const VcsBase::Internal::State &s, Core::IVersionControl *vc);
|
||||||
|
|
||||||
private:
|
|
||||||
VcsBasePluginPrivate *d;
|
VcsBasePluginPrivate *d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSBASEPLUGIN_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSBASE_SUBMITEDITOR_H
|
#pragma once
|
||||||
#define VCSBASE_SUBMITEDITOR_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -33,8 +32,8 @@
|
|||||||
#include <QAbstractItemView>
|
#include <QAbstractItemView>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QIcon;
|
|
||||||
class QAction;
|
class QAction;
|
||||||
|
class QIcon;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace ProjectExplorer { class Project; }
|
namespace ProjectExplorer { class Project; }
|
||||||
@@ -44,6 +43,7 @@ namespace Internal {
|
|||||||
class CommonVcsSettings;
|
class CommonVcsSettings;
|
||||||
class SubmitEditorFile;
|
class SubmitEditorFile;
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
class SubmitEditorWidget;
|
class SubmitEditorWidget;
|
||||||
class SubmitFileModel;
|
class SubmitFileModel;
|
||||||
class VcsBaseSubmitEditorPrivate;
|
class VcsBaseSubmitEditorPrivate;
|
||||||
@@ -132,13 +132,6 @@ signals:
|
|||||||
void diffSelectedRows(const QList<int> &rows);
|
void diffSelectedRows(const QList<int> &rows);
|
||||||
void fileContentsChanged();
|
void fileContentsChanged();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotDiffSelectedVcsFiles(const QList<int> &rawList);
|
|
||||||
void slotCheckSubmitMessage();
|
|
||||||
void slotInsertNickName();
|
|
||||||
void slotSetFieldNickName(int);
|
|
||||||
void slotUpdateEditorSettings(const VcsBase::Internal::CommonVcsSettings &);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* These hooks allow for modifying the contents that goes to
|
/* These hooks allow for modifying the contents that goes to
|
||||||
* the file. The default implementation uses the text
|
* the file. The default implementation uses the text
|
||||||
@@ -153,6 +146,12 @@ protected:
|
|||||||
bool isDescriptionMandatory() const;
|
bool isDescriptionMandatory() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void slotDiffSelectedVcsFiles(const QList<int> &rawList);
|
||||||
|
void slotCheckSubmitMessage();
|
||||||
|
void slotInsertNickName();
|
||||||
|
void slotSetFieldNickName(int);
|
||||||
|
void slotUpdateEditorSettings(const VcsBase::Internal::CommonVcsSettings &);
|
||||||
|
|
||||||
void createUserFields(const QString &fieldConfigFile);
|
void createUserFields(const QString &fieldConfigFile);
|
||||||
bool checkSubmitMessage(QString *errorMessage) const;
|
bool checkSubmitMessage(QString *errorMessage) const;
|
||||||
bool runSubmitMessageCheckScript(const QString &script, QString *errorMessage) const;
|
bool runSubmitMessageCheckScript(const QString &script, QString *errorMessage) const;
|
||||||
@@ -164,5 +163,3 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSBASE_SUBMITEDITOR_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSBASE_COMMAND_H
|
#pragma once
|
||||||
#define VCSBASE_COMMAND_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -44,25 +43,23 @@ public:
|
|||||||
|
|
||||||
VcsCommand(const QString &defaultWorkingDirectory, const QProcessEnvironment &environment);
|
VcsCommand(const QString &defaultWorkingDirectory, const QProcessEnvironment &environment);
|
||||||
|
|
||||||
const QProcessEnvironment processEnvironment() const;
|
const QProcessEnvironment processEnvironment() const override;
|
||||||
|
|
||||||
Utils::SynchronousProcessResponse runCommand(const Utils::FileName &binary,
|
Utils::SynchronousProcessResponse runCommand(const Utils::FileName &binary,
|
||||||
const QStringList &arguments, int timeoutS,
|
const QStringList &arguments, int timeoutS,
|
||||||
const QString &workDirectory = QString(),
|
const QString &workDirectory = QString(),
|
||||||
Utils::ExitCodeInterpreter *interpreter = 0);
|
Utils::ExitCodeInterpreter *interpreter = 0) override;
|
||||||
|
|
||||||
bool runFullySynchronous(const Utils::FileName &binary, const QStringList &arguments,
|
bool runFullySynchronous(const Utils::FileName &binary, const QStringList &arguments,
|
||||||
int timeoutS, QByteArray *outputData, QByteArray *errorData,
|
int timeoutS, QByteArray *outputData, QByteArray *errorData,
|
||||||
const QString &workingDirectory = QString());
|
const QString &workingDirectory = QString()) override;
|
||||||
private:
|
private:
|
||||||
unsigned processFlags() const;
|
unsigned processFlags() const override;
|
||||||
void emitRepositoryChanged(const QString &workingDirectory);
|
void emitRepositoryChanged(const QString &workingDirectory);
|
||||||
|
|
||||||
void coreAboutToClose();
|
void coreAboutToClose() override;
|
||||||
|
|
||||||
bool m_preventRepositoryChanged;
|
bool m_preventRepositoryChanged;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSBASE_COMMAND_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSOUTPUTWINDOW_H
|
#pragma once
|
||||||
#define VCSOUTPUTWINDOW_H
|
|
||||||
|
|
||||||
#include "vcsbase_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
@@ -39,26 +38,26 @@ class VCSBASE_EXPORT VcsOutputWindow : public Core::IOutputPane
|
|||||||
Q_PROPERTY(QString repository READ repository WRITE setRepository)
|
Q_PROPERTY(QString repository READ repository WRITE setRepository)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~VcsOutputWindow();
|
~VcsOutputWindow() override;
|
||||||
|
|
||||||
QWidget *outputWidget(QWidget *parent);
|
QWidget *outputWidget(QWidget *parent) override;
|
||||||
QList<QWidget *> toolBarWidgets() const;
|
QList<QWidget *> toolBarWidgets() const override;
|
||||||
QString displayName() const;
|
QString displayName() const override;
|
||||||
|
|
||||||
int priorityInStatusBar() const;
|
int priorityInStatusBar() const override;
|
||||||
|
|
||||||
void clearContents();
|
void clearContents() override;
|
||||||
void visibilityChanged(bool visible);
|
void visibilityChanged(bool visible) override;
|
||||||
|
|
||||||
void setFocus();
|
void setFocus() override;
|
||||||
bool hasFocus() const;
|
bool hasFocus() const override;
|
||||||
bool canFocus() const;
|
bool canFocus() const override;
|
||||||
|
|
||||||
bool canNavigate() const;
|
bool canNavigate() const override;
|
||||||
bool canNext() const;
|
bool canNext() const override;
|
||||||
bool canPrevious() const;
|
bool canPrevious() const override;
|
||||||
void goToNext();
|
void goToNext() override;
|
||||||
void goToPrev();
|
void goToPrev() override;
|
||||||
|
|
||||||
static VcsOutputWindow *instance();
|
static VcsOutputWindow *instance();
|
||||||
|
|
||||||
@@ -120,5 +119,3 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSOUTPUTWINDOW_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSPLUGIN_H
|
#pragma once
|
||||||
#define VCSPLUGIN_H
|
|
||||||
|
|
||||||
#include <extensionsystem/iplugin.h>
|
#include <extensionsystem/iplugin.h>
|
||||||
|
|
||||||
@@ -49,11 +48,11 @@ class VcsPlugin : public ExtensionSystem::IPlugin
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
VcsPlugin();
|
VcsPlugin();
|
||||||
~VcsPlugin();
|
~VcsPlugin() override;
|
||||||
|
|
||||||
bool initialize(const QStringList &arguments, QString *errorMessage);
|
bool initialize(const QStringList &arguments, QString *errorMessage) override;
|
||||||
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized() override;
|
||||||
|
|
||||||
static VcsPlugin *instance();
|
static VcsPlugin *instance();
|
||||||
|
|
||||||
@@ -68,10 +67,9 @@ signals:
|
|||||||
void settingsChanged(const VcsBase::Internal::CommonVcsSettings &s);
|
void settingsChanged(const VcsBase::Internal::CommonVcsSettings &s);
|
||||||
void submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *e, bool *result);
|
void submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *e, bool *result);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void slotSettingsChanged();
|
void slotSettingsChanged();
|
||||||
|
|
||||||
private:
|
|
||||||
void populateNickNameModel();
|
void populateNickNameModel();
|
||||||
|
|
||||||
static VcsPlugin *m_instance;
|
static VcsPlugin *m_instance;
|
||||||
@@ -81,5 +79,3 @@ private:
|
|||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSPLUGIN_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSBASE_PROJECTCACHE_H
|
#pragma once
|
||||||
#define VCSBASE_PROJECTCACHE_H
|
|
||||||
|
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
|
|
||||||
@@ -44,7 +43,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
VcsProjectCache();
|
VcsProjectCache();
|
||||||
~VcsProjectCache();
|
~VcsProjectCache() override;
|
||||||
|
|
||||||
static void invalidate();
|
static void invalidate();
|
||||||
static ProjectExplorer::Project *projectForToplevel(const Utils::FileName &vcsTopLevel);
|
static ProjectExplorer::Project *projectForToplevel(const Utils::FileName &vcsTopLevel);
|
||||||
@@ -69,5 +68,3 @@ private:
|
|||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSBASE_PROJECTCACHE_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSCOMMANDPAGE_H
|
#pragma once
|
||||||
#define VCSCOMMANDPAGE_H
|
|
||||||
|
|
||||||
#include "../vcsbase_global.h"
|
#include "../vcsbase_global.h"
|
||||||
|
|
||||||
@@ -45,8 +44,8 @@ public:
|
|||||||
VcsCommandPageFactory();
|
VcsCommandPageFactory();
|
||||||
|
|
||||||
Utils::WizardPage *create(ProjectExplorer::JsonWizard *wizard, Core::Id typeId,
|
Utils::WizardPage *create(ProjectExplorer::JsonWizard *wizard, Core::Id typeId,
|
||||||
const QVariant &data);
|
const QVariant &data) override;
|
||||||
bool validateData(Core::Id typeId, const QVariant &data, QString *errorMessage);
|
bool validateData(Core::Id typeId, const QVariant &data, QString *errorMessage) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class VcsCommandPage : public Utils::ShellCommandPage
|
class VcsCommandPage : public Utils::ShellCommandPage
|
||||||
@@ -56,7 +55,7 @@ class VcsCommandPage : public Utils::ShellCommandPage
|
|||||||
public:
|
public:
|
||||||
VcsCommandPage();
|
VcsCommandPage();
|
||||||
|
|
||||||
void initializePage();
|
void initializePage() override;
|
||||||
|
|
||||||
void setCheckoutData(const QString &repo, const QString &baseDir, const QString &name,
|
void setCheckoutData(const QString &repo, const QString &baseDir, const QString &name,
|
||||||
const QStringList &args);
|
const QStringList &args);
|
||||||
@@ -92,5 +91,3 @@ private:
|
|||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSCOMMANDPAGE_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSCONFIGURATIONPAGE_H
|
#pragma once
|
||||||
#define VCSCONFIGURATIONPAGE_H
|
|
||||||
|
|
||||||
#include "../vcsbase_global.h"
|
#include "../vcsbase_global.h"
|
||||||
|
|
||||||
@@ -36,17 +35,17 @@ namespace Core { class IVersionControl; }
|
|||||||
|
|
||||||
namespace VcsBase {
|
namespace VcsBase {
|
||||||
|
|
||||||
namespace Internal { class VcsConfigurationPagePrivate; }
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
class VcsConfigurationPagePrivate;
|
||||||
|
|
||||||
class VcsConfigurationPageFactory : public ProjectExplorer::JsonWizardPageFactory
|
class VcsConfigurationPageFactory : public ProjectExplorer::JsonWizardPageFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VcsConfigurationPageFactory();
|
VcsConfigurationPageFactory();
|
||||||
|
|
||||||
Utils::WizardPage *create(ProjectExplorer::JsonWizard *wizard, Core::Id typeId, const QVariant &data);
|
Utils::WizardPage *create(ProjectExplorer::JsonWizard *wizard, Core::Id typeId,
|
||||||
bool validateData(Core::Id typeId, const QVariant &data, QString *errorMessage);
|
const QVariant &data) override;
|
||||||
|
bool validateData(Core::Id typeId, const QVariant &data, QString *errorMessage) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
@@ -57,21 +56,18 @@ class VCSBASE_EXPORT VcsConfigurationPage : public Utils::WizardPage
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
VcsConfigurationPage();
|
VcsConfigurationPage();
|
||||||
~VcsConfigurationPage();
|
~VcsConfigurationPage() override;
|
||||||
|
|
||||||
void setVersionControl(const Core::IVersionControl *vc);
|
void setVersionControl(const Core::IVersionControl *vc);
|
||||||
void setVersionControlId(const QString &id);
|
void setVersionControlId(const QString &id);
|
||||||
|
|
||||||
void initializePage();
|
void initializePage() override;
|
||||||
bool isComplete() const;
|
bool isComplete() const override;
|
||||||
|
|
||||||
private slots:
|
|
||||||
void openConfiguration();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void openConfiguration();
|
||||||
|
|
||||||
Internal::VcsConfigurationPagePrivate *const d;
|
Internal::VcsConfigurationPagePrivate *const d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSCONFIGURATIONPAGE_H
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef VCSJSEXTENSION_H
|
#pragma once
|
||||||
#define VCSJSEXTENSION_H
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
@@ -42,5 +41,3 @@ public:
|
|||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // VCSJSEXTENSION_H
|
|
||||||
|
Reference in New Issue
Block a user