Commit 34db64c7 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

Move SubmitEditorWidget from Utils to VcsBase

It belongs there

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