forked from qt-creator/qt-creator
Move SubmitEditorWidget from Utils to VcsBase
It belongs there Change-Id: I4b4cdacf32b0eab299d4b2d5258cd4d91a759907 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -40,12 +40,10 @@ SOURCES += $$PWD/environment.cpp \
|
|||||||
$$PWD/fancylineedit.cpp \
|
$$PWD/fancylineedit.cpp \
|
||||||
$$PWD/qtcolorbutton.cpp \
|
$$PWD/qtcolorbutton.cpp \
|
||||||
$$PWD/savedaction.cpp \
|
$$PWD/savedaction.cpp \
|
||||||
$$PWD/submiteditorwidget.cpp \
|
|
||||||
$$PWD/synchronousprocess.cpp \
|
$$PWD/synchronousprocess.cpp \
|
||||||
$$PWD/savefile.cpp \
|
$$PWD/savefile.cpp \
|
||||||
$$PWD/fileutils.cpp \
|
$$PWD/fileutils.cpp \
|
||||||
$$PWD/textfileformat.cpp \
|
$$PWD/textfileformat.cpp \
|
||||||
$$PWD/submitfieldwidget.cpp \
|
|
||||||
$$PWD/consoleprocess.cpp \
|
$$PWD/consoleprocess.cpp \
|
||||||
$$PWD/uncommentselection.cpp \
|
$$PWD/uncommentselection.cpp \
|
||||||
$$PWD/parameteraction.cpp \
|
$$PWD/parameteraction.cpp \
|
||||||
@@ -123,14 +121,12 @@ HEADERS += \
|
|||||||
$$PWD/fancylineedit.h \
|
$$PWD/fancylineedit.h \
|
||||||
$$PWD/qtcolorbutton.h \
|
$$PWD/qtcolorbutton.h \
|
||||||
$$PWD/savedaction.h \
|
$$PWD/savedaction.h \
|
||||||
$$PWD/submiteditorwidget.h \
|
|
||||||
$$PWD/consoleprocess.h \
|
$$PWD/consoleprocess.h \
|
||||||
$$PWD/consoleprocess_p.h \
|
$$PWD/consoleprocess_p.h \
|
||||||
$$PWD/synchronousprocess.h \
|
$$PWD/synchronousprocess.h \
|
||||||
$$PWD/savefile.h \
|
$$PWD/savefile.h \
|
||||||
$$PWD/fileutils.h \
|
$$PWD/fileutils.h \
|
||||||
$$PWD/textfileformat.h \
|
$$PWD/textfileformat.h \
|
||||||
$$PWD/submitfieldwidget.h \
|
|
||||||
$$PWD/uncommentselection.h \
|
$$PWD/uncommentselection.h \
|
||||||
$$PWD/parameteraction.h \
|
$$PWD/parameteraction.h \
|
||||||
$$PWD/treewidgetcolumnstretcher.h \
|
$$PWD/treewidgetcolumnstretcher.h \
|
||||||
@@ -174,7 +170,6 @@ HEADERS += \
|
|||||||
|
|
||||||
FORMS += $$PWD/filewizardpage.ui \
|
FORMS += $$PWD/filewizardpage.ui \
|
||||||
$$PWD/projectintropage.ui \
|
$$PWD/projectintropage.ui \
|
||||||
$$PWD/newclasswidget.ui \
|
$$PWD/newclasswidget.ui
|
||||||
$$PWD/submiteditorwidget.ui
|
|
||||||
|
|
||||||
RESOURCES += $$PWD/utils.qrc
|
RESOURCES += $$PWD/utils.qrc
|
||||||
|
|||||||
@@ -152,11 +152,6 @@ QtcLibrary {
|
|||||||
"styledbar.h",
|
"styledbar.h",
|
||||||
"stylehelper.cpp",
|
"stylehelper.cpp",
|
||||||
"stylehelper.h",
|
"stylehelper.h",
|
||||||
"submiteditorwidget.cpp",
|
|
||||||
"submiteditorwidget.h",
|
|
||||||
"submiteditorwidget.ui",
|
|
||||||
"submitfieldwidget.cpp",
|
|
||||||
"submitfieldwidget.h",
|
|
||||||
"synchronousprocess.cpp",
|
"synchronousprocess.cpp",
|
||||||
"synchronousprocess.h",
|
"synchronousprocess.h",
|
||||||
"tcpportsgatherer.cpp",
|
"tcpportsgatherer.cpp",
|
||||||
@@ -178,7 +173,6 @@ QtcLibrary {
|
|||||||
"images/crumblepath-segment-selected-end.png",
|
"images/crumblepath-segment-selected-end.png",
|
||||||
"images/crumblepath-segment-selected.png",
|
"images/crumblepath-segment-selected.png",
|
||||||
"images/crumblepath-segment.png",
|
"images/crumblepath-segment.png",
|
||||||
"images/removesubmitfield.png",
|
|
||||||
"images/triangle_vert.png",
|
"images/triangle_vert.png",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/utils">
|
<qresource prefix="/utils">
|
||||||
<file>images/removesubmitfield.png</file>
|
|
||||||
<file>images/arrow.png</file>
|
<file>images/arrow.png</file>
|
||||||
<file>images/crumblepath-segment.png</file>
|
<file>images/crumblepath-segment.png</file>
|
||||||
<file>images/crumblepath-segment-end.png</file>
|
<file>images/crumblepath-segment-end.png</file>
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ void BazaarSubmitHighlighter::highlightBlock(const QString &text)
|
|||||||
|
|
||||||
|
|
||||||
BazaarCommitWidget::BazaarCommitWidget(QWidget *parent) :
|
BazaarCommitWidget::BazaarCommitWidget(QWidget *parent) :
|
||||||
Utils::SubmitEditorWidget(parent),
|
VcsBase::SubmitEditorWidget(parent),
|
||||||
m_bazaarCommitPanel(new QWidget)
|
m_bazaarCommitPanel(new QWidget)
|
||||||
{
|
{
|
||||||
m_bazaarCommitPanelUi.setupUi(m_bazaarCommitPanel);
|
m_bazaarCommitPanelUi.setupUi(m_bazaarCommitPanel);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "ui_bazaarcommitpanel.h"
|
#include "ui_bazaarcommitpanel.h"
|
||||||
|
|
||||||
#include <utils/submiteditorwidget.h>
|
#include <vcsbase/submiteditorwidget.h>
|
||||||
|
|
||||||
namespace Bazaar {
|
namespace Bazaar {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -42,7 +42,7 @@ class BranchInfo;
|
|||||||
Some extra fields have been added to the standard SubmitEditorWidget,
|
Some extra fields have been added to the standard SubmitEditorWidget,
|
||||||
to help to conform to the commit style that is used by both git and Bazaar*/
|
to help to conform to the commit style that is used by both git and Bazaar*/
|
||||||
|
|
||||||
class BazaarCommitWidget : public Utils::SubmitEditorWidget
|
class BazaarCommitWidget : public VcsBase::SubmitEditorWidget
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#include "clearcasesubmiteditor.h"
|
#include "clearcasesubmiteditor.h"
|
||||||
#include "clearcasesubmiteditorwidget.h"
|
#include "clearcasesubmiteditorwidget.h"
|
||||||
|
|
||||||
#include <utils/submiteditorwidget.h>
|
#include <vcsbase/submiteditorwidget.h>
|
||||||
#include <vcsbase/submitfilemodel.h>
|
#include <vcsbase/submitfilemodel.h>
|
||||||
|
|
||||||
using namespace ClearCase::Internal;
|
using namespace ClearCase::Internal;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
using namespace ClearCase::Internal;
|
using namespace ClearCase::Internal;
|
||||||
|
|
||||||
ClearCaseSubmitEditorWidget::ClearCaseSubmitEditorWidget(QWidget *parent) :
|
ClearCaseSubmitEditorWidget::ClearCaseSubmitEditorWidget(QWidget *parent) :
|
||||||
Utils::SubmitEditorWidget(parent),
|
VcsBase::SubmitEditorWidget(parent),
|
||||||
m_actSelector(0)
|
m_actSelector(0)
|
||||||
{
|
{
|
||||||
setDescriptionMandatory(false);
|
setDescriptionMandatory(false);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#ifndef CLEARCASESUBMITEDITORWIDGET_H
|
#ifndef CLEARCASESUBMITEDITORWIDGET_H
|
||||||
#define CLEARCASESUBMITEDITORWIDGET_H
|
#define CLEARCASESUBMITEDITORWIDGET_H
|
||||||
|
|
||||||
#include <utils/submiteditorwidget.h>
|
#include <vcsbase/submiteditorwidget.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
@@ -43,7 +43,7 @@ namespace Internal {
|
|||||||
|
|
||||||
class ActivitySelector;
|
class ActivitySelector;
|
||||||
|
|
||||||
class ClearCaseSubmitEditorWidget : public Utils::SubmitEditorWidget
|
class ClearCaseSubmitEditorWidget : public VcsBase::SubmitEditorWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "cvssubmiteditor.h"
|
#include "cvssubmiteditor.h"
|
||||||
|
|
||||||
#include <utils/submiteditorwidget.h>
|
#include <vcsbase/submiteditorwidget.h>
|
||||||
#include <vcsbase/submitfilemodel.h>
|
#include <vcsbase/submitfilemodel.h>
|
||||||
|
|
||||||
using namespace Cvs::Internal;
|
using namespace Cvs::Internal;
|
||||||
@@ -38,7 +38,7 @@ using namespace VcsBase;
|
|||||||
|
|
||||||
CvsSubmitEditor::CvsSubmitEditor(const VcsBaseSubmitEditorParameters *parameters,
|
CvsSubmitEditor::CvsSubmitEditor(const VcsBaseSubmitEditorParameters *parameters,
|
||||||
QWidget *parentWidget) :
|
QWidget *parentWidget) :
|
||||||
VcsBaseSubmitEditor(parameters, new Utils::SubmitEditorWidget(parentWidget)),
|
VcsBaseSubmitEditor(parameters, new VcsBase::SubmitEditorWidget(parentWidget)),
|
||||||
m_msgAdded(tr("Added")),
|
m_msgAdded(tr("Added")),
|
||||||
m_msgRemoved(tr("Removed")),
|
m_msgRemoved(tr("Removed")),
|
||||||
m_msgModified(tr("Modified"))
|
m_msgModified(tr("Modified"))
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ void GitSubmitHighlighter::highlightBlock(const QString &text)
|
|||||||
|
|
||||||
// ------------------
|
// ------------------
|
||||||
GitSubmitEditorWidget::GitSubmitEditorWidget(QWidget *parent) :
|
GitSubmitEditorWidget::GitSubmitEditorWidget(QWidget *parent) :
|
||||||
Utils::SubmitEditorWidget(parent),
|
VcsBase::SubmitEditorWidget(parent),
|
||||||
m_gitSubmitPanel(new QWidget),
|
m_gitSubmitPanel(new QWidget),
|
||||||
m_hasUnmerged(false)
|
m_hasUnmerged(false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include "ui_gitsubmitpanel.h"
|
#include "ui_gitsubmitpanel.h"
|
||||||
|
|
||||||
#include <utils/submiteditorwidget.h>
|
#include <vcsbase/submiteditorwidget.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QValidator;
|
class QValidator;
|
||||||
@@ -52,7 +52,7 @@ struct GitSubmitEditorPanelData;
|
|||||||
* remaining un-added and untracked files will be added 'unchecked' for the
|
* remaining un-added and untracked files will be added 'unchecked' for the
|
||||||
* user to click. */
|
* user to click. */
|
||||||
|
|
||||||
class GitSubmitEditorWidget : public Utils::SubmitEditorWidget
|
class GitSubmitEditorWidget : public VcsBase::SubmitEditorWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ void MercurialSubmitHighlighter::highlightBlock(const QString &text)
|
|||||||
|
|
||||||
|
|
||||||
MercurialCommitWidget::MercurialCommitWidget(QWidget *parent) :
|
MercurialCommitWidget::MercurialCommitWidget(QWidget *parent) :
|
||||||
Utils::SubmitEditorWidget(parent),
|
VcsBase::SubmitEditorWidget(parent),
|
||||||
mercurialCommitPanel(new QWidget)
|
mercurialCommitPanel(new QWidget)
|
||||||
{
|
{
|
||||||
mercurialCommitPanelUi.setupUi(mercurialCommitPanel);
|
mercurialCommitPanelUi.setupUi(mercurialCommitPanel);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include "ui_mercurialcommitpanel.h"
|
#include "ui_mercurialcommitpanel.h"
|
||||||
|
|
||||||
#include <utils/submiteditorwidget.h>
|
#include <vcsbase/submiteditorwidget.h>
|
||||||
|
|
||||||
namespace Mercurial {
|
namespace Mercurial {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -41,7 +41,7 @@ namespace Internal {
|
|||||||
Some extra fields have been added to the standard SubmitEditorWidget,
|
Some extra fields have been added to the standard SubmitEditorWidget,
|
||||||
to help to conform to the commit style that is used by both git and Mercurial*/
|
to help to conform to the commit style that is used by both git and Mercurial*/
|
||||||
|
|
||||||
class MercurialCommitWidget : public Utils::SubmitEditorWidget
|
class MercurialCommitWidget : public VcsBase::SubmitEditorWidget
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace Perforce {
|
|||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
PerforceSubmitEditorWidget::PerforceSubmitEditorWidget(QWidget *parent) :
|
PerforceSubmitEditorWidget::PerforceSubmitEditorWidget(QWidget *parent) :
|
||||||
Utils::SubmitEditorWidget(parent),
|
VcsBase::SubmitEditorWidget(parent),
|
||||||
m_submitPanel(new QGroupBox)
|
m_submitPanel(new QGroupBox)
|
||||||
{
|
{
|
||||||
m_submitPanelUi.setupUi(m_submitPanel);
|
m_submitPanelUi.setupUi(m_submitPanel);
|
||||||
|
|||||||
@@ -31,14 +31,14 @@
|
|||||||
#define PERFORCESUBMITEDITORWIDGET_H
|
#define PERFORCESUBMITEDITORWIDGET_H
|
||||||
|
|
||||||
#include "ui_submitpanel.h"
|
#include "ui_submitpanel.h"
|
||||||
#include <utils/submiteditorwidget.h>
|
#include <vcsbase/submiteditorwidget.h>
|
||||||
|
|
||||||
namespace Perforce {
|
namespace Perforce {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
/* Submit editor widget with additional information pane
|
/* Submit editor widget with additional information pane
|
||||||
* at the top. */
|
* at the top. */
|
||||||
class PerforceSubmitEditorWidget : public Utils::SubmitEditorWidget
|
class PerforceSubmitEditorWidget : public VcsBase::SubmitEditorWidget
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -30,14 +30,14 @@
|
|||||||
|
|
||||||
#include "subversionsubmiteditor.h"
|
#include "subversionsubmiteditor.h"
|
||||||
|
|
||||||
#include <utils/submiteditorwidget.h>
|
#include <vcsbase/submiteditorwidget.h>
|
||||||
#include <vcsbase/submitfilemodel.h>
|
#include <vcsbase/submitfilemodel.h>
|
||||||
|
|
||||||
using namespace Subversion::Internal;
|
using namespace Subversion::Internal;
|
||||||
|
|
||||||
SubversionSubmitEditor::SubversionSubmitEditor(const VcsBase::VcsBaseSubmitEditorParameters *parameters,
|
SubversionSubmitEditor::SubversionSubmitEditor(const VcsBase::VcsBaseSubmitEditorParameters *parameters,
|
||||||
QWidget *parentWidget) :
|
QWidget *parentWidget) :
|
||||||
VcsBase::VcsBaseSubmitEditor(parameters, new Utils::SubmitEditorWidget(parentWidget))
|
VcsBase::VcsBaseSubmitEditor(parameters, new VcsBase::SubmitEditorWidget(parentWidget))
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Subversion Submit"));
|
setDisplayName(tr("Subversion Submit"));
|
||||||
setDescriptionMandatory(false);
|
setDescriptionMandatory(false);
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 578 B |
@@ -49,7 +49,7 @@ enum { defaultLineWidth = 72 };
|
|||||||
enum { checkableColumn = 0 };
|
enum { checkableColumn = 0 };
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Utils::SubmitEditorWidget
|
\class VcsBase::SubmitEditorWidget
|
||||||
|
|
||||||
\brief Presents a VCS commit message in a text editor and a
|
\brief Presents a VCS commit message in a text editor and a
|
||||||
checkable list of modified files in a list window.
|
checkable list of modified files in a list window.
|
||||||
@@ -71,7 +71,7 @@ enum { checkableColumn = 0 };
|
|||||||
editor closes.
|
editor closes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Utils {
|
namespace VcsBase {
|
||||||
|
|
||||||
// QActionPushButton: A push button tied to an action
|
// QActionPushButton: A push button tied to an action
|
||||||
// (similar to a QToolButton)
|
// (similar to a QToolButton)
|
||||||
@@ -466,7 +466,7 @@ QStringList SubmitEditorWidget::checkedFiles() const
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
CompletingTextEdit *SubmitEditorWidget::descriptionEdit() const
|
Utils::CompletingTextEdit *SubmitEditorWidget::descriptionEdit() const
|
||||||
{
|
{
|
||||||
return d->m_ui.description;
|
return d->m_ui.description;
|
||||||
}
|
}
|
||||||
@@ -714,6 +714,6 @@ void SubmitEditorWidget::setEmptyFileListEnabled(bool e)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Utils
|
} // namespace VcsBase
|
||||||
|
|
||||||
#include "submiteditorwidget.moc"
|
#include "submiteditorwidget.moc"
|
||||||
@@ -30,8 +30,9 @@
|
|||||||
#ifndef SUBMITEDITORWIDGET_H
|
#ifndef SUBMITEDITORWIDGET_H
|
||||||
#define SUBMITEDITORWIDGET_H
|
#define SUBMITEDITORWIDGET_H
|
||||||
|
|
||||||
#include "utils_global.h"
|
#include "vcsbase_global.h"
|
||||||
#include "completingtextedit.h"
|
|
||||||
|
#include <utils/completingtextedit.h>
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QAbstractItemView>
|
#include <QAbstractItemView>
|
||||||
@@ -44,12 +45,12 @@ class QModelIndex;
|
|||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Utils {
|
namespace VcsBase {
|
||||||
|
|
||||||
class SubmitFieldWidget;
|
class SubmitFieldWidget;
|
||||||
struct SubmitEditorWidgetPrivate;
|
struct SubmitEditorWidgetPrivate;
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT SubmitEditorWidget : public QWidget
|
class VCSBASE_EXPORT SubmitEditorWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QString descriptionText READ descriptionText WRITE setDescriptionText DESIGNABLE true)
|
Q_PROPERTY(QString descriptionText READ descriptionText WRITE setDescriptionText DESIGNABLE true)
|
||||||
@@ -103,7 +104,7 @@ public:
|
|||||||
// Selected files for diff
|
// Selected files for diff
|
||||||
QStringList selectedFiles() const;
|
QStringList selectedFiles() const;
|
||||||
|
|
||||||
CompletingTextEdit *descriptionEdit() const;
|
Utils::CompletingTextEdit *descriptionEdit() const;
|
||||||
|
|
||||||
void addDescriptionEditContextMenuAction(QAction *a);
|
void addDescriptionEditContextMenuAction(QAction *a);
|
||||||
void insertDescriptionEditContextMenuAction(int pos, QAction *a);
|
void insertDescriptionEditContextMenuAction(int pos, QAction *a);
|
||||||
@@ -151,6 +152,6 @@ private:
|
|||||||
SubmitEditorWidgetPrivate *d;
|
SubmitEditorWidgetPrivate *d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Utils
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // SUBMITEDITORWIDGET_H
|
#endif // SUBMITEDITORWIDGET_H
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>Utils::SubmitEditorWidget</class>
|
<class>VcsBase::SubmitEditorWidget</class>
|
||||||
<widget class="QWidget" name="Utils::SubmitEditorWidget">
|
<widget class="QWidget" name="VcsBase::SubmitEditorWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
<customwidget>
|
<customwidget>
|
||||||
<class>Utils::CompletingTextEdit</class>
|
<class>Utils::CompletingTextEdit</class>
|
||||||
<extends>QTextEdit</extends>
|
<extends>QTextEdit</extends>
|
||||||
<header>utils/completingtextedit.h</header>
|
<header location="global">utils/completingtextedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
@@ -52,7 +52,7 @@ static void inline setComboBlocked(QComboBox *cb, int index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Utils::SubmitFieldWidget
|
\class VcsBase::SubmitFieldWidget
|
||||||
\brief A widget for editing submit message fields like "reviewed-by:",
|
\brief A widget for editing submit message fields like "reviewed-by:",
|
||||||
"signed-off-by:".
|
"signed-off-by:".
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ static void inline setComboBlocked(QComboBox *cb, int index)
|
|||||||
completer can be added.
|
completer can be added.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Utils {
|
namespace VcsBase {
|
||||||
|
|
||||||
// Field/Row entry
|
// Field/Row entry
|
||||||
struct FieldEntry {
|
struct FieldEntry {
|
||||||
@@ -142,7 +142,7 @@ struct SubmitFieldWidgetPrivate {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SubmitFieldWidgetPrivate::SubmitFieldWidgetPrivate() :
|
SubmitFieldWidgetPrivate::SubmitFieldWidgetPrivate() :
|
||||||
removeFieldIcon(QLatin1String(":/utils/images/removesubmitfield.png")),
|
removeFieldIcon(QLatin1String(":/vcsbase/images/removesubmitfield.png")),
|
||||||
completer(0),
|
completer(0),
|
||||||
hasBrowseButton(false),
|
hasBrowseButton(false),
|
||||||
allowDuplicateFields(false),
|
allowDuplicateFields(false),
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
#ifndef SUBMITFIELDWIDGET_H
|
#ifndef SUBMITFIELDWIDGET_H
|
||||||
#define SUBMITFIELDWIDGET_H
|
#define SUBMITFIELDWIDGET_H
|
||||||
|
|
||||||
#include "utils_global.h"
|
#include "vcsbase_global.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
@@ -38,11 +38,11 @@ QT_BEGIN_NAMESPACE
|
|||||||
class QCompleter;
|
class QCompleter;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Utils {
|
namespace VcsBase {
|
||||||
|
|
||||||
struct SubmitFieldWidgetPrivate;
|
struct SubmitFieldWidgetPrivate;
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT SubmitFieldWidget : public QWidget
|
class VCSBASE_EXPORT SubmitFieldWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QStringList fields READ fields WRITE setFields DESIGNABLE true)
|
Q_PROPERTY(QStringList fields READ fields WRITE setFields DESIGNABLE true)
|
||||||
@@ -87,6 +87,6 @@ private:
|
|||||||
SubmitFieldWidgetPrivate *d;
|
SubmitFieldWidgetPrivate *d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Utils
|
} // namespace VcsBase
|
||||||
|
|
||||||
#endif // SUBMITFIELDWIDGET_H
|
#endif // SUBMITFIELDWIDGET_H
|
||||||
@@ -31,7 +31,9 @@ HEADERS += vcsbase_global.h \
|
|||||||
command.h \
|
command.h \
|
||||||
vcsbaseclient.h \
|
vcsbaseclient.h \
|
||||||
vcsbaseclientsettings.h \
|
vcsbaseclientsettings.h \
|
||||||
vcsbaseeditorparameterwidget.h
|
vcsbaseeditorparameterwidget.h \
|
||||||
|
submitfieldwidget.h \
|
||||||
|
submiteditorwidget.h
|
||||||
|
|
||||||
SOURCES += vcsplugin.cpp \
|
SOURCES += vcsplugin.cpp \
|
||||||
vcsbaseplugin.cpp \
|
vcsbaseplugin.cpp \
|
||||||
@@ -59,7 +61,9 @@ SOURCES += vcsplugin.cpp \
|
|||||||
command.cpp \
|
command.cpp \
|
||||||
vcsbaseclient.cpp \
|
vcsbaseclient.cpp \
|
||||||
vcsbaseclientsettings.cpp \
|
vcsbaseclientsettings.cpp \
|
||||||
vcsbaseeditorparameterwidget.cpp
|
vcsbaseeditorparameterwidget.cpp \
|
||||||
|
submitfieldwidget.cpp \
|
||||||
|
submiteditorwidget.cpp
|
||||||
|
|
||||||
RESOURCES += vcsbase.qrc
|
RESOURCES += vcsbase.qrc
|
||||||
|
|
||||||
@@ -67,5 +71,6 @@ FORMS += commonsettingspage.ui \
|
|||||||
nicknamedialog.ui \
|
nicknamedialog.ui \
|
||||||
checkoutprogresswizardpage.ui \
|
checkoutprogresswizardpage.ui \
|
||||||
basecheckoutwizardpage.ui \
|
basecheckoutwizardpage.ui \
|
||||||
cleandialog.ui
|
cleandialog.ui \
|
||||||
|
submiteditorwidget.ui
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ QtcPlugin {
|
|||||||
"nicknamedialog.ui",
|
"nicknamedialog.ui",
|
||||||
"submiteditorfile.cpp",
|
"submiteditorfile.cpp",
|
||||||
"submiteditorfile.h",
|
"submiteditorfile.h",
|
||||||
|
"submiteditorwidget.cpp",
|
||||||
|
"submiteditorwidget.h",
|
||||||
|
"submiteditorwidget.ui",
|
||||||
|
"submitfieldwidget.cpp",
|
||||||
|
"submitfieldwidget.h",
|
||||||
"submitfilemodel.cpp",
|
"submitfilemodel.cpp",
|
||||||
"submitfilemodel.h",
|
"submitfilemodel.h",
|
||||||
"vcsbase.qrc",
|
"vcsbase.qrc",
|
||||||
@@ -79,6 +84,7 @@ QtcPlugin {
|
|||||||
"vcsplugin.cpp",
|
"vcsplugin.cpp",
|
||||||
"vcsplugin.h",
|
"vcsplugin.h",
|
||||||
"images/diff.png",
|
"images/diff.png",
|
||||||
|
"images/removesubmitfield.png",
|
||||||
"images/submit.png",
|
"images/submit.png",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<qresource prefix="/vcsbase" >
|
<qresource prefix="/vcsbase" >
|
||||||
<file>VcsBase.mimetypes.xml</file>
|
<file>VcsBase.mimetypes.xml</file>
|
||||||
<file>images/diff.png</file>
|
<file>images/diff.png</file>
|
||||||
|
<file>images/removesubmitfield.png</file>
|
||||||
<file>images/submit.png</file>
|
<file>images/submit.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -30,10 +30,12 @@
|
|||||||
#include "vcsbasesubmiteditor.h"
|
#include "vcsbasesubmiteditor.h"
|
||||||
|
|
||||||
#include "commonvcssettings.h"
|
#include "commonvcssettings.h"
|
||||||
#include "vcsbaseoutputwindow.h"
|
|
||||||
#include "vcsplugin.h"
|
|
||||||
#include "nicknamedialog.h"
|
#include "nicknamedialog.h"
|
||||||
#include "submiteditorfile.h"
|
#include "submiteditorfile.h"
|
||||||
|
#include "submiteditorwidget.h"
|
||||||
|
#include "submitfieldwidget.h"
|
||||||
|
#include "vcsbaseoutputwindow.h"
|
||||||
|
#include "vcsplugin.h"
|
||||||
|
|
||||||
#include <aggregation/aggregate.h>
|
#include <aggregation/aggregate.h>
|
||||||
#include <cplusplus/Control.h>
|
#include <cplusplus/Control.h>
|
||||||
@@ -51,10 +53,8 @@
|
|||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
#include <coreplugin/actionmanager/actionmanager.h>
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
#include <utils/completingtextedit.h>
|
#include <utils/completingtextedit.h>
|
||||||
#include <utils/submiteditorwidget.h>
|
|
||||||
#include <utils/checkablemessagebox.h>
|
#include <utils/checkablemessagebox.h>
|
||||||
#include <utils/synchronousprocess.h>
|
#include <utils/synchronousprocess.h>
|
||||||
#include <utils/submitfieldwidget.h>
|
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
#include <find/basetextfind.h>
|
#include <find/basetextfind.h>
|
||||||
#include <texteditor/fontsettings.h>
|
#include <texteditor/fontsettings.h>
|
||||||
@@ -119,7 +119,7 @@ static const char *belongingClassName(const CPlusPlus::Function *function)
|
|||||||
/*!
|
/*!
|
||||||
\class VcsBase::VcsBaseSubmitEditor
|
\class VcsBase::VcsBaseSubmitEditor
|
||||||
|
|
||||||
\brief Base class for a submit editor based on the Utils::SubmitEditorWidget.
|
\brief Base class for a submit editor based on the SubmitEditorWidget.
|
||||||
|
|
||||||
Presents the commit message in a text editor and an
|
Presents the commit message in a text editor and an
|
||||||
checkable list of modified files in a list window. The user can delete
|
checkable list of modified files in a list window. The user can delete
|
||||||
|
|||||||
@@ -42,13 +42,12 @@ class QAbstractItemModel;
|
|||||||
class QAction;
|
class QAction;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Utils { class SubmitEditorWidget; }
|
|
||||||
|
|
||||||
namespace VcsBase {
|
namespace VcsBase {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class CommonVcsSettings;
|
class CommonVcsSettings;
|
||||||
}
|
}
|
||||||
struct VcsBaseSubmitEditorPrivate;
|
struct VcsBaseSubmitEditorPrivate;
|
||||||
|
class SubmitEditorWidget;
|
||||||
|
|
||||||
class VCSBASE_EXPORT VcsBaseSubmitEditorParameters
|
class VCSBASE_EXPORT VcsBaseSubmitEditorParameters
|
||||||
{
|
{
|
||||||
@@ -71,7 +70,7 @@ class VCSBASE_EXPORT VcsBaseSubmitEditor : public Core::IEditor
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit VcsBaseSubmitEditor(const VcsBaseSubmitEditorParameters *parameters,
|
explicit VcsBaseSubmitEditor(const VcsBaseSubmitEditorParameters *parameters,
|
||||||
Utils::SubmitEditorWidget *editorWidget);
|
SubmitEditorWidget *editorWidget);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Register the actions with the submit editor widget.
|
// Register the actions with the submit editor widget.
|
||||||
|
|||||||
Reference in New Issue
Block a user