summaryrefslogtreecommitdiff
path: root/src/plugins/vcsbase
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/vcsbase')
-rw-r--r--src/plugins/vcsbase/baseannotationhighlighter.cpp6
-rw-r--r--src/plugins/vcsbase/baseannotationhighlighter.h4
-rw-r--r--src/plugins/vcsbase/basecheckoutwizard.cpp8
-rw-r--r--src/plugins/vcsbase/basecheckoutwizard.h4
-rw-r--r--src/plugins/vcsbase/basecheckoutwizardpage.cpp8
-rw-r--r--src/plugins/vcsbase/basecheckoutwizardpage.h4
-rw-r--r--src/plugins/vcsbase/basecheckoutwizardpage.ui4
-rw-r--r--src/plugins/vcsbase/basevcseditorfactory.cpp36
-rw-r--r--src/plugins/vcsbase/basevcseditorfactory.h32
-rw-r--r--src/plugins/vcsbase/basevcssubmiteditorfactory.cpp28
-rw-r--r--src/plugins/vcsbase/basevcssubmiteditorfactory.h34
-rw-r--r--src/plugins/vcsbase/checkoutjobs.cpp18
-rw-r--r--src/plugins/vcsbase/checkoutjobs.h4
-rw-r--r--src/plugins/vcsbase/checkoutprogresswizardpage.cpp8
-rw-r--r--src/plugins/vcsbase/checkoutprogresswizardpage.h4
-rw-r--r--src/plugins/vcsbase/checkoutprogresswizardpage.ui4
-rw-r--r--src/plugins/vcsbase/checkoutwizarddialog.cpp8
-rw-r--r--src/plugins/vcsbase/checkoutwizarddialog.h4
-rw-r--r--src/plugins/vcsbase/cleandialog.cpp14
-rw-r--r--src/plugins/vcsbase/cleandialog.h4
-rw-r--r--src/plugins/vcsbase/cleandialog.ui8
-rw-r--r--src/plugins/vcsbase/command.cpp4
-rw-r--r--src/plugins/vcsbase/command.h4
-rw-r--r--src/plugins/vcsbase/commonsettingspage.cpp12
-rw-r--r--src/plugins/vcsbase/commonsettingspage.h8
-rw-r--r--src/plugins/vcsbase/commonsettingspage.ui4
-rw-r--r--src/plugins/vcsbase/commonvcssettings.cpp4
-rw-r--r--src/plugins/vcsbase/commonvcssettings.h4
-rw-r--r--src/plugins/vcsbase/corelistener.cpp10
-rw-r--r--src/plugins/vcsbase/corelistener.h10
-rw-r--r--src/plugins/vcsbase/diffhighlighter.cpp6
-rw-r--r--src/plugins/vcsbase/diffhighlighter.h4
-rw-r--r--src/plugins/vcsbase/nicknamedialog.cpp6
-rw-r--r--src/plugins/vcsbase/nicknamedialog.h4
-rw-r--r--src/plugins/vcsbase/nicknamedialog.ui8
-rw-r--r--src/plugins/vcsbase/submiteditorfile.cpp6
-rw-r--r--src/plugins/vcsbase/submiteditorfile.h4
-rw-r--r--src/plugins/vcsbase/submitfilemodel.cpp6
-rw-r--r--src/plugins/vcsbase/submitfilemodel.h4
-rw-r--r--src/plugins/vcsbase/vcsbaseclient.cpp182
-rw-r--r--src/plugins/vcsbase/vcsbaseclient.h46
-rw-r--r--src/plugins/vcsbase/vcsbaseclientsettings.cpp74
-rw-r--r--src/plugins/vcsbase/vcsbaseclientsettings.h28
-rw-r--r--src/plugins/vcsbase/vcsbaseconstants.h8
-rw-r--r--src/plugins/vcsbase/vcsbaseeditor.cpp210
-rw-r--r--src/plugins/vcsbase/vcsbaseeditor.h28
-rw-r--r--src/plugins/vcsbase/vcsbaseeditorparameterwidget.cpp56
-rw-r--r--src/plugins/vcsbase/vcsbaseeditorparameterwidget.h16
-rw-r--r--src/plugins/vcsbase/vcsbaseoptionspage.cpp16
-rw-r--r--src/plugins/vcsbase/vcsbaseoptionspage.h8
-rw-r--r--src/plugins/vcsbase/vcsbaseoutputwindow.cpp94
-rw-r--r--src/plugins/vcsbase/vcsbaseoutputwindow.h16
-rw-r--r--src/plugins/vcsbase/vcsbaseplugin.cpp218
-rw-r--r--src/plugins/vcsbase/vcsbaseplugin.h66
-rw-r--r--src/plugins/vcsbase/vcsbasesubmiteditor.cpp150
-rw-r--r--src/plugins/vcsbase/vcsbasesubmiteditor.h20
-rw-r--r--src/plugins/vcsbase/vcsbasetextdocument.cpp12
-rw-r--r--src/plugins/vcsbase/vcsbasetextdocument.h8
-rw-r--r--src/plugins/vcsbase/vcsconfigurationpage.cpp6
-rw-r--r--src/plugins/vcsbase/vcsconfigurationpage.h4
-rw-r--r--src/plugins/vcsbase/vcsconfigurationpage.ui4
-rw-r--r--src/plugins/vcsbase/vcsplugin.cpp36
-rw-r--r--src/plugins/vcsbase/vcsplugin.h16
63 files changed, 837 insertions, 837 deletions
diff --git a/src/plugins/vcsbase/baseannotationhighlighter.cpp b/src/plugins/vcsbase/baseannotationhighlighter.cpp
index 5b7764696b..4ebddc6a72 100644
--- a/src/plugins/vcsbase/baseannotationhighlighter.cpp
+++ b/src/plugins/vcsbase/baseannotationhighlighter.cpp
@@ -43,7 +43,7 @@
typedef QMap<QString, QTextCharFormat> ChangeNumberFormatMap;
/*!
- \class VCSBase::BaseAnnotationHighlighter
+ \class VcsBase::BaseAnnotationHighlighter
\brief Base for a highlighter for annotation lines of the form 'changenumber:XXXX'.
@@ -55,7 +55,7 @@ typedef QMap<QString, QTextCharFormat> ChangeNumberFormatMap;
\endcode
*/
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
class BaseAnnotationHighlighterPrivate
@@ -116,4 +116,4 @@ void BaseAnnotationHighlighter::highlightBlock(const QString &text)
setFormat(0, text.length(), it.value());
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/baseannotationhighlighter.h b/src/plugins/vcsbase/baseannotationhighlighter.h
index d5ee5c78dd..c28b4ca6ae 100644
--- a/src/plugins/vcsbase/baseannotationhighlighter.h
+++ b/src/plugins/vcsbase/baseannotationhighlighter.h
@@ -37,7 +37,7 @@
#include <texteditor/syntaxhighlighter.h>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
class BaseAnnotationHighlighterPrivate;
} // namespace Internal
@@ -63,6 +63,6 @@ private:
Internal::BaseAnnotationHighlighterPrivate *const d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // BASEANNOTATIONHIGHLIGHTER_H
diff --git a/src/plugins/vcsbase/basecheckoutwizard.cpp b/src/plugins/vcsbase/basecheckoutwizard.cpp
index f99fd2285e..3514613a17 100644
--- a/src/plugins/vcsbase/basecheckoutwizard.cpp
+++ b/src/plugins/vcsbase/basecheckoutwizard.cpp
@@ -44,7 +44,7 @@
#include <QtGui/QMessageBox>
/*!
- \class VCSBase::BaseCheckoutWizard
+ \class VcsBase::BaseCheckoutWizard
\brief A Core::IWizard implementing a wizard for initially checking out a project using
a version control system.
@@ -61,10 +61,10 @@
On success, the wizard tries to locate a project file
and open it.
- \sa VCSBase::BaseCheckoutWizardPage
+ \sa VcsBase::BaseCheckoutWizardPage
*/
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
class BaseCheckoutWizardPrivate
@@ -208,4 +208,4 @@ void BaseCheckoutWizard::slotProgressPageShown()
d->dialog->start(job);
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/basecheckoutwizard.h b/src/plugins/vcsbase/basecheckoutwizard.h
index 7665bedb42..57a0388781 100644
--- a/src/plugins/vcsbase/basecheckoutwizard.h
+++ b/src/plugins/vcsbase/basecheckoutwizard.h
@@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE
class QWizardPage;
QT_END_NAMESPACE
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
class BaseCheckoutWizardPrivate;
}
@@ -83,6 +83,6 @@ private:
Internal::BaseCheckoutWizardPrivate *const d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // BASECHECKOUTWIZARD_H
diff --git a/src/plugins/vcsbase/basecheckoutwizardpage.cpp b/src/plugins/vcsbase/basecheckoutwizardpage.cpp
index 2a00670162..33aca6bf3f 100644
--- a/src/plugins/vcsbase/basecheckoutwizardpage.cpp
+++ b/src/plugins/vcsbase/basecheckoutwizardpage.cpp
@@ -36,7 +36,7 @@
#include <QtGui/QIcon>
/*!
- \class VCSBase::BaseCheckoutWizardPage
+ \class VcsBase::BaseCheckoutWizardPage
\brief Base class for a parameter page of a checkout wizard.
@@ -44,10 +44,10 @@
the path. Contains a virtual to derive the checkout directory
from the repository as it is entered.
- \sa VCSBase::BaseCheckoutWizard
+ \sa VcsBase::BaseCheckoutWizard
*/
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
class BaseCheckoutWizardPagePrivate
@@ -260,4 +260,4 @@ void BaseCheckoutWizardPage::slotChanged()
}
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/basecheckoutwizardpage.h b/src/plugins/vcsbase/basecheckoutwizardpage.h
index b1efd7f9df..9b61b51e37 100644
--- a/src/plugins/vcsbase/basecheckoutwizardpage.h
+++ b/src/plugins/vcsbase/basecheckoutwizardpage.h
@@ -37,7 +37,7 @@
#include <QtGui/QWizardPage>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
class BaseCheckoutWizardPagePrivate;
@@ -111,6 +111,6 @@ private:
Internal::BaseCheckoutWizardPagePrivate *const d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSBASE_CHECKOUTWIZARDPAGE_H
diff --git a/src/plugins/vcsbase/basecheckoutwizardpage.ui b/src/plugins/vcsbase/basecheckoutwizardpage.ui
index 2cd0124ca8..2ae4b6e19d 100644
--- a/src/plugins/vcsbase/basecheckoutwizardpage.ui
+++ b/src/plugins/vcsbase/basecheckoutwizardpage.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>VCSBase::Internal::BaseCheckoutWizardPage</class>
- <widget class="QWizardPage" name="VCSBase::Internal::BaseCheckoutWizardPage">
+ <class>VcsBase::Internal::BaseCheckoutWizardPage</class>
+ <widget class="QWizardPage" name="VcsBase::Internal::BaseCheckoutWizardPage">
<property name="geometry">
<rect>
<x>0</x>
diff --git a/src/plugins/vcsbase/basevcseditorfactory.cpp b/src/plugins/vcsbase/basevcseditorfactory.cpp
index 59c3c453d6..47c284118f 100644
--- a/src/plugins/vcsbase/basevcseditorfactory.cpp
+++ b/src/plugins/vcsbase/basevcseditorfactory.cpp
@@ -41,29 +41,29 @@
#include <QtCore/QCoreApplication>
/*!
- \class VCSBase::BaseVCSEditorFactory
+ \class VcsBase::BaseVCSEditorFactory
- \brief Base class for editor factories creating instances of VCSBaseEditor subclasses.
+ \brief Base class for editor factories creating instances of VcsBaseEditor subclasses.
- \sa VCSBase::VCSBaseEditorWidget
+ \sa VcsBase::VcsBaseEditorWidget
*/
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
-class BaseVCSEditorFactoryPrivate
+class BaseVcsEditorFactoryPrivate
{
public:
- BaseVCSEditorFactoryPrivate(const VCSBaseEditorParameters *t);
+ BaseVcsEditorFactoryPrivate(const VcsBaseEditorParameters *t);
- const VCSBaseEditorParameters *m_type;
+ const VcsBaseEditorParameters *m_type;
const Core::Id m_id;
QString m_displayName;
const QStringList m_mimeTypes;
TextEditor::TextEditorActionHandler *m_editorHandler;
};
-BaseVCSEditorFactoryPrivate::BaseVCSEditorFactoryPrivate(const VCSBaseEditorParameters *t) :
+BaseVcsEditorFactoryPrivate::BaseVcsEditorFactoryPrivate(const VcsBaseEditorParameters *t) :
m_type(t),
m_id(t->id),
m_mimeTypes(QStringList(QLatin1String(t->mimeType))),
@@ -73,41 +73,41 @@ BaseVCSEditorFactoryPrivate::BaseVCSEditorFactoryPrivate(const VCSBaseEditorPara
} // namespace Internal
-BaseVCSEditorFactory::BaseVCSEditorFactory(const VCSBaseEditorParameters *t)
- : d(new Internal::BaseVCSEditorFactoryPrivate(t))
+BaseVcsEditorFactory::BaseVcsEditorFactory(const VcsBaseEditorParameters *t)
+ : d(new Internal::BaseVcsEditorFactoryPrivate(t))
{
d->m_displayName = QCoreApplication::translate("VCS", t->displayName);
}
-BaseVCSEditorFactory::~BaseVCSEditorFactory()
+BaseVcsEditorFactory::~BaseVcsEditorFactory()
{
delete d;
}
-QStringList BaseVCSEditorFactory::mimeTypes() const
+QStringList BaseVcsEditorFactory::mimeTypes() const
{
return d->m_mimeTypes;
}
-Core::Id BaseVCSEditorFactory::id() const
+Core::Id BaseVcsEditorFactory::id() const
{
return d->m_id;
}
-QString BaseVCSEditorFactory::displayName() const
+QString BaseVcsEditorFactory::displayName() const
{
return d->m_displayName;
}
-Core::IFile *BaseVCSEditorFactory::open(const QString &fileName)
+Core::IFile *BaseVcsEditorFactory::open(const QString &fileName)
{
Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
return iface ? iface->file() : 0;
}
-Core::IEditor *BaseVCSEditorFactory::createEditor(QWidget *parent)
+Core::IEditor *BaseVcsEditorFactory::createEditor(QWidget *parent)
{
- VCSBaseEditorWidget *vcsEditor = createVCSBaseEditor(d->m_type, parent);
+ VcsBaseEditorWidget *vcsEditor = createVcsBaseEditor(d->m_type, parent);
vcsEditor ->setMimeType(d->m_mimeTypes.front());
d->m_editorHandler->setupActions(vcsEditor);
@@ -120,4 +120,4 @@ Core::IEditor *BaseVCSEditorFactory::createEditor(QWidget *parent)
return vcsEditor->editor();
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/basevcseditorfactory.h b/src/plugins/vcsbase/basevcseditorfactory.h
index 01c381ae4f..dbfb188bd2 100644
--- a/src/plugins/vcsbase/basevcseditorfactory.h
+++ b/src/plugins/vcsbase/basevcseditorfactory.h
@@ -40,17 +40,17 @@
#include <QtCore/QStringList>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
-class BaseVCSEditorFactoryPrivate;
+class BaseVcsEditorFactoryPrivate;
} // namespace Internal
-class VCSBASE_EXPORT BaseVCSEditorFactory : public Core::IEditorFactory
+class VCSBASE_EXPORT BaseVcsEditorFactory : public Core::IEditorFactory
{
Q_OBJECT
public:
- explicit BaseVCSEditorFactory(const VCSBaseEditorParameters *type);
- ~BaseVCSEditorFactory();
+ explicit BaseVcsEditorFactory(const VcsBaseEditorParameters *type);
+ ~BaseVcsEditorFactory();
QStringList mimeTypes() const;
// IEditorFactory
@@ -63,44 +63,44 @@ public:
private:
// Implement to create and initialize (call init()) a
- // VCSBaseEditor subclass
- virtual VCSBaseEditorWidget *createVCSBaseEditor(const VCSBaseEditorParameters *type,
+ // VcsBaseEditor subclass
+ virtual VcsBaseEditorWidget *createVcsBaseEditor(const VcsBaseEditorParameters *type,
QWidget *parent) = 0;
- Internal::BaseVCSEditorFactoryPrivate *const d;
+ Internal::BaseVcsEditorFactoryPrivate *const d;
};
// Utility template to create an editor.
template <class Editor>
-class VCSEditorFactory : public BaseVCSEditorFactory
+class VcsEditorFactory : public BaseVcsEditorFactory
{
public:
- explicit VCSEditorFactory(const VCSBaseEditorParameters *type,
+ explicit VcsEditorFactory(const VcsBaseEditorParameters *type,
QObject *describeReceiver = 0,
const char *describeSlot = 0);
private:
- VCSBaseEditorWidget *createVCSBaseEditor(const VCSBaseEditorParameters *type,
+ VcsBaseEditorWidget *createVcsBaseEditor(const VcsBaseEditorParameters *type,
QWidget *parent);
QObject *m_describeReceiver;
const char *m_describeSlot;
};
template <class Editor>
-VCSEditorFactory<Editor>::VCSEditorFactory(const VCSBaseEditorParameters *type,
+VcsEditorFactory<Editor>::VcsEditorFactory(const VcsBaseEditorParameters *type,
QObject *describeReceiver,
const char *describeSlot) :
- BaseVCSEditorFactory(type),
+ BaseVcsEditorFactory(type),
m_describeReceiver(describeReceiver),
m_describeSlot(describeSlot)
{
}
template <class Editor>
-VCSBaseEditorWidget *VCSEditorFactory<Editor>::createVCSBaseEditor(const VCSBaseEditorParameters *type,
+VcsBaseEditorWidget *VcsEditorFactory<Editor>::createVcsBaseEditor(const VcsBaseEditorParameters *type,
QWidget *parent)
{
- VCSBaseEditorWidget *rc = new Editor(type, parent);
+ VcsBaseEditorWidget *rc = new Editor(type, parent);
rc->init();
if (m_describeReceiver)
connect(rc, SIGNAL(describeRequested(QString,QString)), m_describeReceiver, m_describeSlot);
@@ -108,7 +108,7 @@ VCSBaseEditorWidget *VCSEditorFactory<Editor>::createVCSBaseEditor(const VCSBase
}
-} // namespace VCSBase
+} // namespace VcsBase
#endif // BASEVCSEDITORFACTORY_H
diff --git a/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp b/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp
index b401b1e106..3ee50d03c8 100644
--- a/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp
+++ b/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp
@@ -35,22 +35,22 @@
#include <coreplugin/editormanager/editormanager.h>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
-class BaseVCSSubmitEditorFactoryPrivate
+class BaseVcsSubmitEditorFactoryPrivate
{
public:
- BaseVCSSubmitEditorFactoryPrivate(const VCSBaseSubmitEditorParameters *parameters);
+ BaseVcsSubmitEditorFactoryPrivate(const VcsBaseSubmitEditorParameters *parameters);
- const VCSBaseSubmitEditorParameters *m_parameters;
+ const VcsBaseSubmitEditorParameters *m_parameters;
const Core::Id m_id;
const QString m_displayName;
const QStringList m_mimeTypes;
};
-BaseVCSSubmitEditorFactoryPrivate::BaseVCSSubmitEditorFactoryPrivate(const VCSBaseSubmitEditorParameters *parameters) :
+BaseVcsSubmitEditorFactoryPrivate::BaseVcsSubmitEditorFactoryPrivate(const VcsBaseSubmitEditorParameters *parameters) :
m_parameters(parameters),
m_id(parameters->id),
m_displayName(parameters->displayName),
@@ -60,42 +60,42 @@ BaseVCSSubmitEditorFactoryPrivate::BaseVCSSubmitEditorFactoryPrivate(const VCSBa
} // namespace Internal
-BaseVCSSubmitEditorFactory::BaseVCSSubmitEditorFactory(const VCSBaseSubmitEditorParameters *parameters) :
- d(new Internal::BaseVCSSubmitEditorFactoryPrivate(parameters))
+BaseVcsSubmitEditorFactory::BaseVcsSubmitEditorFactory(const VcsBaseSubmitEditorParameters *parameters) :
+ d(new Internal::BaseVcsSubmitEditorFactoryPrivate(parameters))
{
}
-BaseVCSSubmitEditorFactory::~BaseVCSSubmitEditorFactory()
+BaseVcsSubmitEditorFactory::~BaseVcsSubmitEditorFactory()
{
delete d;
}
-Core::IEditor *BaseVCSSubmitEditorFactory::createEditor(QWidget *parent)
+Core::IEditor *BaseVcsSubmitEditorFactory::createEditor(QWidget *parent)
{
return createBaseSubmitEditor(d->m_parameters, parent);
}
-Core::Id BaseVCSSubmitEditorFactory::id() const
+Core::Id BaseVcsSubmitEditorFactory::id() const
{
return d->m_id;
}
-QString BaseVCSSubmitEditorFactory::displayName() const
+QString BaseVcsSubmitEditorFactory::displayName() const
{
return d->m_displayName;
}
-QStringList BaseVCSSubmitEditorFactory::mimeTypes() const
+QStringList BaseVcsSubmitEditorFactory::mimeTypes() const
{
return d->m_mimeTypes;
}
-Core::IFile *BaseVCSSubmitEditorFactory::open(const QString &fileName)
+Core::IFile *BaseVcsSubmitEditorFactory::open(const QString &fileName)
{
if (Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id()))
return iface->file();
return 0;
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/basevcssubmiteditorfactory.h b/src/plugins/vcsbase/basevcssubmiteditorfactory.h
index 85ad2486e5..a884d709ab 100644
--- a/src/plugins/vcsbase/basevcssubmiteditorfactory.h
+++ b/src/plugins/vcsbase/basevcssubmiteditorfactory.h
@@ -37,26 +37,26 @@
#include <coreplugin/editormanager/ieditorfactory.h>
-namespace VCSBase {
+namespace VcsBase {
-class VCSBaseSubmitEditor;
-class VCSBaseSubmitEditorParameters;
+class VcsBaseSubmitEditor;
+class VcsBaseSubmitEditorParameters;
namespace Internal {
-class BaseVCSSubmitEditorFactoryPrivate;
+class BaseVcsSubmitEditorFactoryPrivate;
} // namespace Internal
// Parametrizable base class for editor factories creating instances of
-// VCSBaseSubmitEditor subclasses.
-class VCSBASE_EXPORT BaseVCSSubmitEditorFactory : public Core::IEditorFactory
+// VcsBaseSubmitEditor subclasses.
+class VCSBASE_EXPORT BaseVcsSubmitEditorFactory : public Core::IEditorFactory
{
Q_OBJECT
protected:
- explicit BaseVCSSubmitEditorFactory(const VCSBaseSubmitEditorParameters *parameters);
+ explicit BaseVcsSubmitEditorFactory(const VcsBaseSubmitEditorParameters *parameters);
public:
- ~BaseVCSSubmitEditorFactory();
+ ~BaseVcsSubmitEditorFactory();
Core::IEditor *createEditor(QWidget *parent);
Core::Id id() const;
@@ -65,33 +65,33 @@ public:
Core::IFile *open(const QString &fileName);
private:
- virtual VCSBaseSubmitEditor
- *createBaseSubmitEditor(const VCSBaseSubmitEditorParameters *parameters,
+ virtual VcsBaseSubmitEditor
+ *createBaseSubmitEditor(const VcsBaseSubmitEditorParameters *parameters,
QWidget *parent) = 0;
- Internal::BaseVCSSubmitEditorFactoryPrivate *const d;
+ Internal::BaseVcsSubmitEditorFactoryPrivate *const d;
};
// Utility template to create an editor that has a constructor taking the
// parameter struct and a parent widget.
template <class Editor>
-class VCSSubmitEditorFactory : public BaseVCSSubmitEditorFactory
+class VcsSubmitEditorFactory : public BaseVcsSubmitEditorFactory
{
public:
- explicit VCSSubmitEditorFactory(const VCSBaseSubmitEditorParameters *parameters)
- : BaseVCSSubmitEditorFactory(parameters)
+ explicit VcsSubmitEditorFactory(const VcsBaseSubmitEditorParameters *parameters)
+ : BaseVcsSubmitEditorFactory(parameters)
{
}
private:
- VCSBaseSubmitEditor *createBaseSubmitEditor
- (const VCSBaseSubmitEditorParameters *parameters, QWidget *parent)
+ VcsBaseSubmitEditor *createBaseSubmitEditor
+ (const VcsBaseSubmitEditorParameters *parameters, QWidget *parent)
{
return new Editor(parameters, parent);
}
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSBASE_BASEEDITOR_H
diff --git a/src/plugins/vcsbase/checkoutjobs.cpp b/src/plugins/vcsbase/checkoutjobs.cpp
index cc98a88acc..c69b7ee5ec 100644
--- a/src/plugins/vcsbase/checkoutjobs.cpp
+++ b/src/plugins/vcsbase/checkoutjobs.cpp
@@ -44,15 +44,15 @@
enum { debug = 0 };
/*!
- \class VCSBase::AbstractCheckoutJob
+ \class VcsBase::AbstractCheckoutJob
\brief Abstract base class for a job creating an initial project checkout.
It should be something that runs in the background producing log messages.
- \sa VCSBase::BaseCheckoutWizard
+ \sa VcsBase::BaseCheckoutWizard
*/
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
@@ -60,7 +60,7 @@ namespace Internal {
static inline QSharedPointer<QProcess> createProcess()
{
unsigned flags = 0;
- if (VCSBasePlugin::isSshPromptConfigured())
+ if (VcsBasePlugin::isSshPromptConfigured())
flags = Utils::SynchronousProcess::UnixTerminalDisabled;
return Utils::SynchronousProcess::createProcess(flags);
}
@@ -104,9 +104,9 @@ AbstractCheckoutJob::AbstractCheckoutJob(QObject *parent) :
}
/*!
- \class VCSBase::ProcessCheckoutJob
+ \class VcsBase::ProcessCheckoutJob
- \brief Convenience implementation of a VCSBase::AbstractCheckoutJob using a QProcess.
+ \brief Convenience implementation of a VcsBase::AbstractCheckoutJob using a QProcess.
*/
ProcessCheckoutJob::ProcessCheckoutJob(QObject *parent) :
@@ -195,11 +195,11 @@ void ProcessCheckoutJob::slotNext()
// Set up SSH correctly.
QProcessEnvironment processEnv = step.environment;
- VCSBasePlugin::setProcessEnvironment(&processEnv, false);
+ VcsBasePlugin::setProcessEnvironment(&processEnv, false);
d->process->setProcessEnvironment(processEnv);
d->binary = step.binary;
- emit output(VCSBaseOutputWindow::msgExecutionLogEntry(step.workingDirectory, d->binary, step.arguments));
+ emit output(VcsBaseOutputWindow::msgExecutionLogEntry(step.workingDirectory, d->binary, step.arguments));
d->process->start(d->binary, step.arguments);
}
@@ -212,4 +212,4 @@ void ProcessCheckoutJob::cancel()
Utils::SynchronousProcess::stopProcess(*d->process);
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/checkoutjobs.h b/src/plugins/vcsbase/checkoutjobs.h
index d2d1446a8d..01ba08ec06 100644
--- a/src/plugins/vcsbase/checkoutjobs.h
+++ b/src/plugins/vcsbase/checkoutjobs.h
@@ -40,7 +40,7 @@
#include <QtCore/QProcess>
#include <QtCore/QProcessEnvironment>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal { class ProcessCheckoutJobPrivate; }
@@ -91,6 +91,6 @@ private:
Internal::ProcessCheckoutJobPrivate *const d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // CHECKOUTJOB_H
diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp
index 30ef57949a..f4ccce10d1 100644
--- a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp
+++ b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp
@@ -40,15 +40,15 @@
#include <QtGui/QCursor>
/*!
- \class VCSBase::CheckoutProgressWizardPage
+ \class VcsBase::CheckoutProgressWizardPage
\brief Page showing the progress of an initial project checkout. Turns complete when the job
succeeds.
- \sa VCSBase::BaseCheckoutWizard
+ \sa VcsBase::BaseCheckoutWizard
*/
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
CheckoutProgressWizardPage::CheckoutProgressWizardPage(QWidget *parent) :
@@ -136,4 +136,4 @@ void CheckoutProgressWizardPage::changeEvent(QEvent *e)
}
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.h b/src/plugins/vcsbase/checkoutprogresswizardpage.h
index adeb6fab4b..480bc5898a 100644
--- a/src/plugins/vcsbase/checkoutprogresswizardpage.h
+++ b/src/plugins/vcsbase/checkoutprogresswizardpage.h
@@ -36,7 +36,7 @@
#include <QtCore/QSharedPointer>
#include <QtGui/QWizardPage>
-namespace VCSBase {
+namespace VcsBase {
class AbstractCheckoutJob;
namespace Internal {
@@ -78,6 +78,6 @@ private:
};
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
#endif // CHECKOUTPROGRESSWIZARDPAGE_H
diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.ui b/src/plugins/vcsbase/checkoutprogresswizardpage.ui
index 02366375d0..c11ddbe46a 100644
--- a/src/plugins/vcsbase/checkoutprogresswizardpage.ui
+++ b/src/plugins/vcsbase/checkoutprogresswizardpage.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>VCSBase::Internal::CheckoutProgressWizardPage</class>
- <widget class="QWizardPage" name="VCSBase::Internal::CheckoutProgressWizardPage">
+ <class>VcsBase::Internal::CheckoutProgressWizardPage</class>
+ <widget class="QWizardPage" name="VcsBase::Internal::CheckoutProgressWizardPage">
<property name="geometry">
<rect>
<x>0</x>
diff --git a/src/plugins/vcsbase/checkoutwizarddialog.cpp b/src/plugins/vcsbase/checkoutwizarddialog.cpp
index 5d0c00eae9..f0dd7fd6ca 100644
--- a/src/plugins/vcsbase/checkoutwizarddialog.cpp
+++ b/src/plugins/vcsbase/checkoutwizarddialog.cpp
@@ -40,13 +40,13 @@
#include <QtGui/QPushButton>
/*!
- \class VCSBase::Internal::CheckoutWizardDialog
+ \class VcsBase::Internal::CheckoutWizardDialog
- Dialog used by \sa VCSBase::BaseCheckoutWizard. Overwrites reject() to first
+ Dialog used by \sa VcsBase::BaseCheckoutWizard. Overwrites reject() to first
kill the checkout and then close.
*/
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
CheckoutWizardDialog::CheckoutWizardDialog(const QList<QWizardPage *> &parameterPages,
@@ -95,4 +95,4 @@ void CheckoutWizardDialog::reject()
}
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/checkoutwizarddialog.h b/src/plugins/vcsbase/checkoutwizarddialog.h
index 6ed9c9c13f..e126e346e8 100644
--- a/src/plugins/vcsbase/checkoutwizarddialog.h
+++ b/src/plugins/vcsbase/checkoutwizarddialog.h
@@ -37,7 +37,7 @@
#include <QtCore/QList>
#include <utils/wizard.h>
-namespace VCSBase {
+namespace VcsBase {
class AbstractCheckoutJob;
namespace Internal {
@@ -67,6 +67,6 @@ private:
};
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
#endif // CHECKOUTWIZARDDIALOG_H
diff --git a/src/plugins/vcsbase/cleandialog.cpp b/src/plugins/vcsbase/cleandialog.cpp
index c2a1aaaba4..1e78fb3e84 100644
--- a/src/plugins/vcsbase/cleandialog.cpp
+++ b/src/plugins/vcsbase/cleandialog.cpp
@@ -52,7 +52,7 @@
#include <QtCore/QFuture>
#include <QtCore/QtConcurrentRun>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
enum { nameColumn, columnCount };
@@ -71,14 +71,14 @@ static void removeFileRecursion(const QFileInfo &f, QString *errorMessage)
removeFileRecursion(fi, errorMessage);
QDir parent = f.absoluteDir();
if (!parent.rmdir(f.fileName()))
- errorMessage->append(VCSBase::CleanDialog::tr("The directory %1 could not be deleted.").
+ errorMessage->append(VcsBase::CleanDialog::tr("The directory %1 could not be deleted.").
arg(QDir::toNativeSeparators(f.absoluteFilePath())));
return;
}
if (!QFile::remove(f.absoluteFilePath())) {
if (!errorMessage->isEmpty())
errorMessage->append(QLatin1Char('\n'));
- errorMessage->append(VCSBase::CleanDialog::tr("The file %1 could not be deleted.").
+ errorMessage->append(VcsBase::CleanDialog::tr("The file %1 could not be deleted.").
arg(QDir::toNativeSeparators(f.absoluteFilePath())));
}
}
@@ -145,7 +145,7 @@ CleanDialogPrivate::CleanDialogPrivate() :
} // namespace Internal
/*!
- \class VCSBase::CleanDialog
+ \class VcsBase::CleanDialog
\brief File selector dialog for files not under version control.
@@ -258,14 +258,14 @@ bool CleanDialog::promptToDelete()
// Remove in background
Internal::CleanFilesTask *cleanTask = new Internal::CleanFilesTask(d->m_workingDirectory, selectedFiles);
connect(cleanTask, SIGNAL(error(QString)),
- VCSBase::VCSBaseOutputWindow::instance(), SLOT(appendSilently(QString)),
+ VcsBase::VcsBaseOutputWindow::instance(), SLOT(appendSilently(QString)),
Qt::QueuedConnection);
QFuture<void> task = QtConcurrent::run(cleanTask, &Internal::CleanFilesTask::run);
const QString taskName = tr("Cleaning %1").
arg(QDir::toNativeSeparators(d->m_workingDirectory));
Core::ICore::instance()->progressManager()->addTask(task, taskName,
- QLatin1String("VCSBase.cleanRepository"));
+ QLatin1String("VcsBase.cleanRepository"));
return true;
}
@@ -291,6 +291,6 @@ void CleanDialog::changeEvent(QEvent *e)
}
}
-} // namespace VCSBase
+} // namespace VcsBase
#include "cleandialog.moc"
diff --git a/src/plugins/vcsbase/cleandialog.h b/src/plugins/vcsbase/cleandialog.h
index 7336214aa1..ceba34dda3 100644
--- a/src/plugins/vcsbase/cleandialog.h
+++ b/src/plugins/vcsbase/cleandialog.h
@@ -41,7 +41,7 @@ QT_BEGIN_NAMESPACE
class QModelIndex;
QT_END_NAMESPACE
-namespace VCSBase {
+namespace VcsBase {
namespace Internal { class CleanDialogPrivate; }
@@ -71,6 +71,6 @@ private:
Internal::CleanDialogPrivate *const d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // CLEANDIALOG_H
diff --git a/src/plugins/vcsbase/cleandialog.ui b/src/plugins/vcsbase/cleandialog.ui
index c61fec540d..dc679675e7 100644
--- a/src/plugins/vcsbase/cleandialog.ui
+++ b/src/plugins/vcsbase/cleandialog.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>VCSBase::Internal::CleanDialog</class>
- <widget class="QDialog" name="VCSBase::Internal::CleanDialog">
+ <class>VcsBase::Internal::CleanDialog</class>
+ <widget class="QDialog" name="VcsBase::Internal::CleanDialog">
<property name="geometry">
<rect>
<x>0</x>
@@ -40,7 +40,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
- <receiver>VCSBase::Internal::CleanDialog</receiver>
+ <receiver>VcsBase::Internal::CleanDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
@@ -56,7 +56,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
- <receiver>VCSBase::Internal::CleanDialog</receiver>
+ <receiver>VcsBase::Internal::CleanDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
diff --git a/src/plugins/vcsbase/command.cpp b/src/plugins/vcsbase/command.cpp
index 3edca50562..94d3f6b932 100644
--- a/src/plugins/vcsbase/command.cpp
+++ b/src/plugins/vcsbase/command.cpp
@@ -59,7 +59,7 @@ static QString msgTermination(int exitCode, const QString &binaryPath, const QSt
QCoreApplication::translate("VcsCommand", "\n'%1' completed (exit code %2).\n").arg(cmd).arg(exitCode);
}
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
class CommandPrivate
@@ -330,4 +330,4 @@ void Command::setCookie(const QVariant &cookie)
d->m_cookie = cookie;
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/command.h b/src/plugins/vcsbase/command.h
index 99293aa1d7..5fc26c92b8 100644
--- a/src/plugins/vcsbase/command.h
+++ b/src/plugins/vcsbase/command.h
@@ -40,7 +40,7 @@
#include <QtCore/QVariant>
#include <QtCore/QProcessEnvironment>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal { class CommandPrivate; }
@@ -105,6 +105,6 @@ private:
class Internal::CommandPrivate *const d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSBASE_COMMAND_H
diff --git a/src/plugins/vcsbase/commonsettingspage.cpp b/src/plugins/vcsbase/commonsettingspage.cpp
index f006c86b98..91768c7a24 100644
--- a/src/plugins/vcsbase/commonsettingspage.cpp
+++ b/src/plugins/vcsbase/commonsettingspage.cpp
@@ -43,10 +43,10 @@
#include <QtCore/QCoreApplication>
#include <QtGui/QMessageBox>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
-// ------------------ VCSBaseSettingsWidget
+// ------------------ VcsBaseSettingsWidget
CommonSettingsWidget::CommonSettingsWidget(QWidget *parent) :
QWidget(parent),
@@ -105,9 +105,9 @@ QString CommonSettingsWidget::searchKeyWordMatchString() const
return rc;
}
-// --------------- VCSBaseSettingsPage
+// --------------- VcsBaseSettingsPage
CommonOptionsPage::CommonOptionsPage(QObject *parent) :
- VCSBaseOptionsPage(parent)
+ VcsBaseOptionsPage(parent)
{
m_settings.fromSettings(Core::ICore::instance()->settings());
}
@@ -123,7 +123,7 @@ QString CommonOptionsPage::id() const
QString CommonOptionsPage::displayName() const
{
- return QCoreApplication::translate("VCSBase", Constants::VCS_COMMON_SETTINGS_NAME);
+ return QCoreApplication::translate("VcsBase", Constants::VCS_COMMON_SETTINGS_NAME);
}
QWidget *CommonOptionsPage::createPage(QWidget *parent)
@@ -153,4 +153,4 @@ bool CommonOptionsPage::matches(const QString &key) const
}
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/commonsettingspage.h b/src/plugins/vcsbase/commonsettingspage.h
index 5cd689f3c7..cae9d0cec4 100644
--- a/src/plugins/vcsbase/commonsettingspage.h
+++ b/src/plugins/vcsbase/commonsettingspage.h
@@ -40,7 +40,7 @@
#include <QtCore/QPointer>
#include <QtGui/QWidget>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
namespace Ui { class CommonSettingsPage; }
@@ -62,7 +62,7 @@ private:
Ui::CommonSettingsPage *m_ui;
};
-class CommonOptionsPage : public VCSBaseOptionsPage
+class CommonOptionsPage : public VcsBaseOptionsPage
{
Q_OBJECT
@@ -80,7 +80,7 @@ public:
CommonVcsSettings settings() const { return m_settings; }
signals:
- void settingsChanged(const VCSBase::Internal::CommonVcsSettings &s);
+ void settingsChanged(const VcsBase::Internal::CommonVcsSettings &s);
private:
void updateNickNames();
@@ -91,6 +91,6 @@ private:
};
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
#endif // COMMONOPTIONSPAGE_H
diff --git a/src/plugins/vcsbase/commonsettingspage.ui b/src/plugins/vcsbase/commonsettingspage.ui
index 1ab6270a77..b9e3e1a4d7 100644
--- a/src/plugins/vcsbase/commonsettingspage.ui
+++ b/src/plugins/vcsbase/commonsettingspage.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>VCSBase::Internal::CommonSettingsPage</class>
- <widget class="QWidget" name="VCSBase::Internal::CommonSettingsPage">
+ <class>VcsBase::Internal::CommonSettingsPage</class>
+ <widget class="QWidget" name="VcsBase::Internal::CommonSettingsPage">
<property name="geometry">
<rect>
<x>0</x>
diff --git a/src/plugins/vcsbase/commonvcssettings.cpp b/src/plugins/vcsbase/commonvcssettings.cpp
index 403eb30992..c317cc04dc 100644
--- a/src/plugins/vcsbase/commonvcssettings.cpp
+++ b/src/plugins/vcsbase/commonvcssettings.cpp
@@ -61,7 +61,7 @@ static inline QString sshPasswordPromptDefault()
#endif
}
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
CommonVcsSettings::CommonVcsSettings() :
@@ -128,4 +128,4 @@ QDebug operator<<(QDebug d,const CommonVcsSettings& s)
}
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/commonvcssettings.h b/src/plugins/vcsbase/commonvcssettings.h
index 6315b5a588..f8849516b6 100644
--- a/src/plugins/vcsbase/commonvcssettings.h
+++ b/src/plugins/vcsbase/commonvcssettings.h
@@ -40,7 +40,7 @@ class QSettings;
class QDebug;
QT_END_NAMESPACE
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
// Common VCS settings, message check script and user nick names.
@@ -74,6 +74,6 @@ inline bool operator!=(const CommonVcsSettings &s1, const CommonVcsSettings &s2)
QDebug operator<<(QDebug, const CommonVcsSettings &);
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
#endif // COMMONVCSSETTINGS_H
diff --git a/src/plugins/vcsbase/corelistener.cpp b/src/plugins/vcsbase/corelistener.cpp
index 4007108949..1d243f4045 100644
--- a/src/plugins/vcsbase/corelistener.cpp
+++ b/src/plugins/vcsbase/corelistener.cpp
@@ -34,17 +34,17 @@
#include "vcsbasesubmiteditor.h"
/*!
- \class VCSBase::Internal::CoreListener
+ \class VcsBase::Internal::CoreListener
\brief CoreListener catching closing of a submit editor.
Catch the closing of a submit editor to trigger the submit.
One instance of this class exists, connected to the instances
- of VCSBasePlugin, which dispatch if the editor kind matches theirs
+ of VcsBasePlugin, which dispatch if the editor kind matches theirs
(which is why the approach of passing the bool result was chosen).
*/
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
CoreListener::CoreListener(QObject *parent) :
@@ -56,10 +56,10 @@ bool CoreListener::editorAboutToClose(Core::IEditor *editor)
{
bool result = true;
if (editor)
- if (VCSBase::VCSBaseSubmitEditor *se = qobject_cast<VCSBase::VCSBaseSubmitEditor *>(editor))
+ if (VcsBase::VcsBaseSubmitEditor *se = qobject_cast<VcsBase::VcsBaseSubmitEditor *>(editor))
emit submitEditorAboutToClose(se, &result);
return result;
}
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/corelistener.h b/src/plugins/vcsbase/corelistener.h
index 597d77419f..ff40923b92 100644
--- a/src/plugins/vcsbase/corelistener.h
+++ b/src/plugins/vcsbase/corelistener.h
@@ -35,9 +35,9 @@
#include <coreplugin/icorelistener.h>
-namespace VCSBase {
+namespace VcsBase {
-class VCSBaseSubmitEditor;
+class VcsBaseSubmitEditor;
namespace Internal {
@@ -50,10 +50,10 @@ public:
bool editorAboutToClose(Core::IEditor *editor);
signals:
- void submitEditorAboutToClose(VCSBaseSubmitEditor *e, bool *result);
+ void submitEditorAboutToClose(VcsBaseSubmitEditor *e, bool *result);
};
-} // Internal
-} // VCSBase
+} // namespace Internal
+} // namespace VcsBase
#endif // CORELISTENER_H
diff --git a/src/plugins/vcsbase/diffhighlighter.cpp b/src/plugins/vcsbase/diffhighlighter.cpp
index 5c6eefb215..66b7267002 100644
--- a/src/plugins/vcsbase/diffhighlighter.cpp
+++ b/src/plugins/vcsbase/diffhighlighter.cpp
@@ -42,7 +42,7 @@
#include <QtGui/QBrush>
/*!
- \class VCSBase::DiffHighlighter
+ \class VcsBase::DiffHighlighter
\brief A highlighter for diffs.
@@ -67,7 +67,7 @@ static const int BASE_LEVEL = 0;
static const int FILE_LEVEL = 1;
static const int LOCATION_LEVEL = 2;
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
// Formats used by DiffHighlighter
@@ -264,4 +264,4 @@ QRegExp DiffHighlighter::filePattern() const
return d->m_filePattern;
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/diffhighlighter.h b/src/plugins/vcsbase/diffhighlighter.h
index e9311fa8dc..c8d9d22345 100644
--- a/src/plugins/vcsbase/diffhighlighter.h
+++ b/src/plugins/vcsbase/diffhighlighter.h
@@ -45,7 +45,7 @@ QT_END_NAMESPACE
namespace Core { class ICore; }
namespace TextEditor { class FontSettingsPage; }
-namespace VCSBase {
+namespace VcsBase {
namespace Internal { class DiffHighlighterPrivate; }
@@ -69,6 +69,6 @@ private:
Internal::DiffHighlighterPrivate *const d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // DIFFHIGHLIGHTER_H
diff --git a/src/plugins/vcsbase/nicknamedialog.cpp b/src/plugins/vcsbase/nicknamedialog.cpp
index f473fb62f4..37ae26b66b 100644
--- a/src/plugins/vcsbase/nicknamedialog.cpp
+++ b/src/plugins/vcsbase/nicknamedialog.cpp
@@ -45,7 +45,7 @@
enum { NickNameRole = Qt::UserRole + 1 };
/*!
- \class VCSBase::Internal::NickNameDialog
+ \class VcsBase::Internal::NickNameDialog
\brief Show users from mail cap file.
@@ -56,7 +56,7 @@ enum { NickNameRole = Qt::UserRole + 1 };
be preferred.
*/
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
// For code clarity, a struct representing the entries of a mail map file
@@ -278,4 +278,4 @@ QStringList NickNameDialog::nickNameList(const QStandardItemModel *model)
}
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/nicknamedialog.h b/src/plugins/vcsbase/nicknamedialog.h
index 9558fb1e5a..e37070eb3b 100644
--- a/src/plugins/vcsbase/nicknamedialog.h
+++ b/src/plugins/vcsbase/nicknamedialog.h
@@ -42,7 +42,7 @@ class QModelIndex;
class QPushButton;
QT_END_NAMESPACE
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
namespace Ui { class NickNameDialog; }
@@ -79,6 +79,6 @@ private:
};
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
#endif // NICKNAMEDIALOG_H
diff --git a/src/plugins/vcsbase/nicknamedialog.ui b/src/plugins/vcsbase/nicknamedialog.ui
index 9e0673e757..8cc4b2af45 100644
--- a/src/plugins/vcsbase/nicknamedialog.ui
+++ b/src/plugins/vcsbase/nicknamedialog.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>VCSBase::Internal::NickNameDialog</class>
- <widget class="QDialog" name="VCSBase::Internal::NickNameDialog">
+ <class>VcsBase::Internal::NickNameDialog</class>
+ <widget class="QDialog" name="VcsBase::Internal::NickNameDialog">
<property name="geometry">
<rect>
<x>0</x>
@@ -49,7 +49,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
- <receiver>VCSBase::Internal::NickNameDialog</receiver>
+ <receiver>VcsBase::Internal::NickNameDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
@@ -65,7 +65,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
- <receiver>VCSBase::Internal::NickNameDialog</receiver>
+ <receiver>VcsBase::Internal::NickNameDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
diff --git a/src/plugins/vcsbase/submiteditorfile.cpp b/src/plugins/vcsbase/submiteditorfile.cpp
index 0101e9e660..b2069ec8d7 100644
--- a/src/plugins/vcsbase/submiteditorfile.cpp
+++ b/src/plugins/vcsbase/submiteditorfile.cpp
@@ -32,11 +32,11 @@
#include "submiteditorfile.h"
-using namespace VCSBase;
-using namespace VCSBase::Internal;
+using namespace VcsBase;
+using namespace VcsBase::Internal;
/*!
- \class VCSBase::Internal::SubmitEditorFile
+ \class VcsBase::Internal::SubmitEditorFile
\brief A non-saveable IFile for submit editor files.
*/
diff --git a/src/plugins/vcsbase/submiteditorfile.h b/src/plugins/vcsbase/submiteditorfile.h
index 4390ab86f4..df177acd91 100644
--- a/src/plugins/vcsbase/submiteditorfile.h
+++ b/src/plugins/vcsbase/submiteditorfile.h
@@ -35,7 +35,7 @@
#include <coreplugin/ifile.h>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
class SubmitEditorFile : public Core::IFile
@@ -72,6 +72,6 @@ private:
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
#endif // SUBMITEDITORFILE_H
diff --git a/src/plugins/vcsbase/submitfilemodel.cpp b/src/plugins/vcsbase/submitfilemodel.cpp
index b7af1b1daa..71beb55699 100644
--- a/src/plugins/vcsbase/submitfilemodel.cpp
+++ b/src/plugins/vcsbase/submitfilemodel.cpp
@@ -39,7 +39,7 @@
#include <QtCore/QFileInfo>
#include <QtCore/QDebug>
-namespace VCSBase {
+namespace VcsBase {
// --------------------------------------------------------------------------
// Helpers:
@@ -66,7 +66,7 @@ static QList<QStandardItem *> createFileRow(const QString &fileName, const QStri
// --------------------------------------------------------------------------
/*!
- \class VCSBase::SubmitFileModel
+ \class VcsBase::SubmitFileModel
\brief A 2-column (checkable, state, file name) model to be used to list the files
in the submit editor. Provides header items and a convience to add files.
@@ -157,4 +157,4 @@ unsigned SubmitFileModel::filter(const QStringList &filter, int column)
return rc;
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/submitfilemodel.h b/src/plugins/vcsbase/submitfilemodel.h
index 0d590ae4e3..e51881e2d6 100644
--- a/src/plugins/vcsbase/submitfilemodel.h
+++ b/src/plugins/vcsbase/submitfilemodel.h
@@ -37,7 +37,7 @@
#include <QtGui/QStandardItemModel>
-namespace VCSBase {
+namespace VcsBase {
class VCSBASE_EXPORT SubmitFileModel : public QStandardItemModel
{
@@ -67,6 +67,6 @@ public:
unsigned filter(const QStringList &filter, int column);
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // SUBMITMODEL_H
diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp
index b64a77acd2..3e7c076ad4 100644
--- a/src/plugins/vcsbase/vcsbaseclient.cpp
+++ b/src/plugins/vcsbase/vcsbaseclient.cpp
@@ -58,13 +58,13 @@
#include <QtCore/QMetaType>
/*!
- \class VCSBase::VCSBaseClient
+ \class VcsBase::VcsBaseClient
\brief Base class for Mercurial and Bazaar 'clients'.
Provides base functionality for common commands (diff, log, etc).
- \sa VCSBase::VCSJobRunner
+ \sa VcsBase::VcsJobRunner
*/
Q_DECLARE_METATYPE(QVariant)
@@ -79,36 +79,36 @@ inline Core::IEditor *locateEditor(const Core::ICore *core, const char *property
namespace {
-VCSBase::VCSBaseOutputWindow *vcsOutputWindow()
+VcsBase::VcsBaseOutputWindow *vcsOutputWindow()
{
- return VCSBase::VCSBaseOutputWindow::instance();
+ return VcsBase::VcsBaseOutputWindow::instance();
}
}
-namespace VCSBase {
+namespace VcsBase {
-class VCSBaseClientPrivate
+class VcsBaseClientPrivate
{
public:
- VCSBaseClientPrivate(VCSBaseClient *client, VCSBaseClientSettings *settings);
+ VcsBaseClientPrivate(VcsBaseClient *client, VcsBaseClientSettings *settings);
void statusParser(QByteArray data);
void annotateRevision(QString source, QString change, int lineNumber);
void saveSettings();
- void bindCommandToEditor(Command *cmd, VCSBaseEditorWidget *editor);
+ void bindCommandToEditor(Command *cmd, VcsBaseEditorWidget *editor);
void commandFinishedGotoLine(QObject *editorObject);
Core::ICore *m_core;
- VCSBaseClientSettings *m_clientSettings;
+ VcsBaseClientSettings *m_clientSettings;
QSignalMapper *m_cmdFinishedMapper;
private:
- VCSBaseClient *m_client;
+ VcsBaseClient *m_client;
};
-VCSBaseClientPrivate::VCSBaseClientPrivate(VCSBaseClient *client, VCSBaseClientSettings *settings) :
+VcsBaseClientPrivate::VcsBaseClientPrivate(VcsBaseClient *client, VcsBaseClientSettings *settings) :
m_core(Core::ICore::instance()),
m_clientSettings(settings),
m_cmdFinishedMapper(new QSignalMapper(client)),
@@ -116,14 +116,14 @@ VCSBaseClientPrivate::VCSBaseClientPrivate(VCSBaseClient *client, VCSBaseClientS
{
}
-void VCSBaseClientPrivate::statusParser(QByteArray data)
+void VcsBaseClientPrivate::statusParser(QByteArray data)
{
- QList<VCSBaseClient::StatusItem> lineInfoList;
+ QList<VcsBaseClient::StatusItem> lineInfoList;
QStringList rawStatusList = QTextCodec::codecForLocale()->toUnicode(data).split(QLatin1Char('\n'));
foreach (const QString &string, rawStatusList) {
- const VCSBaseClient::StatusItem lineInfo = m_client->parseStatusLine(string);
+ const VcsBaseClient::StatusItem lineInfo = m_client->parseStatusLine(string);
if (!lineInfo.flags.isEmpty() && !lineInfo.file.isEmpty())
lineInfoList.append(lineInfo);
}
@@ -131,7 +131,7 @@ void VCSBaseClientPrivate::statusParser(QByteArray data)
emit m_client->parsedStatus(lineInfoList);
}
-void VCSBaseClientPrivate::annotateRevision(QString source, QString change, int lineNumber)
+void VcsBaseClientPrivate::annotateRevision(QString source, QString change, int lineNumber)
{
// This might be invoked with a verbose revision description
// "SHA1 author subject" from the annotation context menu. Strip the rest.
@@ -142,20 +142,20 @@ void VCSBaseClientPrivate::annotateRevision(QString source, QString change, int
m_client->annotate(fi.absolutePath(), fi.fileName(), change, lineNumber);
}
-void VCSBaseClientPrivate::saveSettings()
+void VcsBaseClientPrivate::saveSettings()
{
m_clientSettings->writeSettings(m_core->settings());
}
-void VCSBaseClientPrivate::bindCommandToEditor(Command *cmd, VCSBaseEditorWidget *editor)
+void VcsBaseClientPrivate::bindCommandToEditor(Command *cmd, VcsBaseEditorWidget *editor)
{
QObject::connect(cmd, SIGNAL(finished(bool,int,QVariant)), m_cmdFinishedMapper, SLOT(map()));
m_cmdFinishedMapper->setMapping(cmd, editor);
}
-void VCSBaseClientPrivate::commandFinishedGotoLine(QObject *editorObject)
+void VcsBaseClientPrivate::commandFinishedGotoLine(QObject *editorObject)
{
- VCSBase::VCSBaseEditorWidget *editor = qobject_cast<VCSBase::VCSBaseEditorWidget *>(editorObject);
+ VcsBase::VcsBaseEditorWidget *editor = qobject_cast<VcsBase::VcsBaseEditorWidget *>(editorObject);
Command *cmd = qobject_cast<Command *>(m_cmdFinishedMapper->mapping(editor));
if (editor && cmd) {
if (cmd->lastExecutionSuccess() && cmd->cookie().type() == QVariant::Int) {
@@ -167,25 +167,25 @@ void VCSBaseClientPrivate::commandFinishedGotoLine(QObject *editorObject)
}
}
-VCSBaseClient::StatusItem::StatusItem(const QString &s, const QString &f) :
+VcsBaseClient::StatusItem::StatusItem(const QString &s, const QString &f) :
flags(s), file(f)
{
}
-VCSBaseClient::VCSBaseClient(VCSBaseClientSettings *settings) :
- d(new VCSBaseClientPrivate(this, settings))
+VcsBaseClient::VcsBaseClient(VcsBaseClientSettings *settings) :
+ d(new VcsBaseClientPrivate(this, settings))
{
qRegisterMetaType<QVariant>();
connect(d->m_core, SIGNAL(saveSettingsRequested()), this, SLOT(saveSettings()));
connect(d->m_cmdFinishedMapper, SIGNAL(mapped(QObject*)), this, SLOT(commandFinishedGotoLine(QObject*)));
}
-VCSBaseClient::~VCSBaseClient()
+VcsBaseClient::~VcsBaseClient()
{
delete d;
}
-bool VCSBaseClient::synchronousCreateRepository(const QString &workingDirectory,
+bool VcsBaseClient::synchronousCreateRepository(const QString &workingDirectory,
const QStringList &extraOptions)
{
QStringList args(vcsCommandString(CreateRepositoryCommand));
@@ -202,7 +202,7 @@ bool VCSBaseClient::synchronousCreateRepository(const QString &workingDirectory,
return true;
}
-bool VCSBaseClient::synchronousClone(const QString &workingDir,
+bool VcsBaseClient::synchronousClone(const QString &workingDir,
const QString &srcLocation,
const QString &dstLocation,
const QStringList &extraOptions)
@@ -216,7 +216,7 @@ bool VCSBaseClient::synchronousClone(const QString &workingDir,
return cloneOk;
}
-bool VCSBaseClient::synchronousAdd(const QString &workingDir, const QString &filename,
+bool VcsBaseClient::synchronousAdd(const QString &workingDir, const QString &filename,
const QStringList &extraOptions)
{
QStringList args;
@@ -225,7 +225,7 @@ bool VCSBaseClient::synchronousAdd(const QString &workingDir, const QString &fil
return vcsFullySynchronousExec(workingDir, args, &stdOut);
}
-bool VCSBaseClient::synchronousRemove(const QString &workingDir, const QString &filename,
+bool VcsBaseClient::synchronousRemove(const QString &workingDir, const QString &filename,
const QStringList &extraOptions)
{
QStringList args;
@@ -234,7 +234,7 @@ bool VCSBaseClient::synchronousRemove(const QString &workingDir, const QString &
return vcsFullySynchronousExec(workingDir, args, &stdOut);
}
-bool VCSBaseClient::synchronousMove(const QString &workingDir,
+bool VcsBaseClient::synchronousMove(const QString &workingDir,
const QString &from, const QString &to,
const QStringList &extraOptions)
{
@@ -244,7 +244,7 @@ bool VCSBaseClient::synchronousMove(const QString &workingDir,
return vcsFullySynchronousExec(workingDir, args, &stdOut);
}
-bool VCSBaseClient::synchronousPull(const QString &workingDir,
+bool VcsBaseClient::synchronousPull(const QString &workingDir,
const QString &srcLocation,
const QStringList &extraOptions)
{
@@ -252,9 +252,9 @@ bool VCSBaseClient::synchronousPull(const QString &workingDir,
args << vcsCommandString(PullCommand) << extraOptions << srcLocation;
// Disable UNIX terminals to suppress SSH prompting
const unsigned flags =
- VCSBase::VCSBasePlugin::SshPasswordPrompt
- | VCSBase::VCSBasePlugin::ShowStdOutInLogWindow
- | VCSBase::VCSBasePlugin::ShowSuccessMessage;
+ VcsBase::VcsBasePlugin::SshPasswordPrompt
+ | VcsBase::VcsBasePlugin::ShowStdOutInLogWindow
+ | VcsBase::VcsBasePlugin::ShowSuccessMessage;
const Utils::SynchronousProcessResponse resp = vcsSynchronousExec(workingDir, args, flags);
const bool ok = resp.result == Utils::SynchronousProcessResponse::Finished;
if (ok)
@@ -262,7 +262,7 @@ bool VCSBaseClient::synchronousPull(const QString &workingDir,
return ok;
}
-bool VCSBaseClient::synchronousPush(const QString &workingDir,
+bool VcsBaseClient::synchronousPush(const QString &workingDir,
const QString &dstLocation,
const QStringList &extraOptions)
{
@@ -270,14 +270,14 @@ bool VCSBaseClient::synchronousPush(const QString &workingDir,
args << vcsCommandString(PushCommand) << extraOptions << dstLocation;
// Disable UNIX terminals to suppress SSH prompting
const unsigned flags =
- VCSBase::VCSBasePlugin::SshPasswordPrompt
- | VCSBase::VCSBasePlugin::ShowStdOutInLogWindow
- | VCSBase::VCSBasePlugin::ShowSuccessMessage;
+ VcsBase::VcsBasePlugin::SshPasswordPrompt
+ | VcsBase::VcsBasePlugin::ShowStdOutInLogWindow
+ | VcsBase::VcsBasePlugin::ShowSuccessMessage;
const Utils::SynchronousProcessResponse resp = vcsSynchronousExec(workingDir, args, flags);
return resp.result == Utils::SynchronousProcessResponse::Finished;
}
-bool VCSBaseClient::vcsFullySynchronousExec(const QString &workingDir,
+bool VcsBaseClient::vcsFullySynchronousExec(const QString &workingDir,
const QStringList &args,
QByteArray *output)
{
@@ -286,7 +286,7 @@ bool VCSBaseClient::vcsFullySynchronousExec(const QString &workingDir,
vcsProcess.setWorkingDirectory(workingDir);
vcsProcess.setProcessEnvironment(processEnvironment());
- const QString binary = settings()->stringValue(VCSBaseClientSettings::binaryPathKey);
+ const QString binary = settings()->stringValue(VcsBaseClientSettings::binaryPathKey);
::vcsOutputWindow()->appendCommand(workingDir, binary, args);
@@ -301,7 +301,7 @@ bool VCSBaseClient::vcsFullySynchronousExec(const QString &workingDir,
vcsProcess.closeWriteChannel();
QByteArray stdErr;
- const int timeoutSec = settings()->intValue(VCSBaseClientSettings::timeoutKey);
+ const int timeoutSec = settings()->intValue(VcsBaseClientSettings::timeoutKey);
if (!Utils::SynchronousProcess::readDataFromProcess(vcsProcess, timeoutSec * 1000,
output, &stdErr, true)) {
Utils::SynchronousProcess::stopProcess(vcsProcess);
@@ -315,19 +315,19 @@ bool VCSBaseClient::vcsFullySynchronousExec(const QString &workingDir,
return vcsProcess.exitStatus() == QProcess::NormalExit && vcsProcess.exitCode() == 0;
}
-Utils::SynchronousProcessResponse VCSBaseClient::vcsSynchronousExec(
+Utils::SynchronousProcessResponse VcsBaseClient::vcsSynchronousExec(
const QString &workingDirectory,
const QStringList &args,
unsigned flags,
QTextCodec *outputCodec)
{
- const QString binary = settings()->stringValue(VCSBaseClientSettings::binaryPathKey);
- const int timeoutSec = settings()->intValue(VCSBaseClientSettings::timeoutKey);
- return VCSBase::VCSBasePlugin::runVCS(workingDirectory, binary, args,
+ const QString binary = settings()->stringValue(VcsBaseClientSettings::binaryPathKey);
+ const int timeoutSec = settings()->intValue(VcsBaseClientSettings::timeoutKey);
+ return VcsBase::VcsBasePlugin::runVcs(workingDirectory, binary, args,
timeoutSec * 1000, flags, outputCodec);
}
-void VCSBaseClient::annotate(const QString &workingDir, const QString &file,
+void VcsBaseClient::annotate(const QString &workingDir, const QString &file,
const QString revision /* = QString() */,
int lineNumber /* = -1 */,
const QStringList &extraOptions)
@@ -337,11 +337,11 @@ void VCSBaseClient::annotate(const QString &workingDir, const QString &file,
QStringList args;
args << vcsCmdString << revisionSpec(revision) << extraOptions << file;
const QString kind = vcsEditorKind(AnnotateCommand);
- const QString id = VCSBase::VCSBaseEditorWidget::getSource(workingDir, QStringList(file));
+ const QString id = VcsBase::VcsBaseEditorWidget::getSource(workingDir, QStringList(file));
const QString title = vcsEditorTitle(vcsCmdString, id);
- const QString source = VCSBase::VCSBaseEditorWidget::getSource(workingDir, file);
+ const QString source = VcsBase::VcsBaseEditorWidget::getSource(workingDir, file);
- VCSBase::VCSBaseEditorWidget *editor = createVCSEditor(kind, title, source, true,
+ VcsBase::VcsBaseEditorWidget *editor = createVcsEditor(kind, title, source, true,
vcsCmdString.toLatin1().constData(), id);
Command *cmd = createCommand(workingDir, editor);
@@ -349,22 +349,22 @@ void VCSBaseClient::annotate(const QString &workingDir, const QString &file,
enqueueJob(cmd, args);
}
-void VCSBaseClient::diff(const QString &workingDir, const QStringList &files,
+void VcsBaseClient::diff(const QString &workingDir, const QStringList &files,
const QStringList &extraOptions)
{
const QString vcsCmdString = vcsCommandString(DiffCommand);
const QString kind = vcsEditorKind(DiffCommand);
- const QString id = VCSBase::VCSBaseEditorWidget::getTitleId(workingDir, files);
+ const QString id = VcsBase::VcsBaseEditorWidget::getTitleId(workingDir, files);
const QString title = vcsEditorTitle(vcsCmdString, id);
- const QString source = VCSBase::VCSBaseEditorWidget::getSource(workingDir, files);
- VCSBase::VCSBaseEditorWidget *editor = createVCSEditor(kind, title, source, true,
+ const QString source = VcsBase::VcsBaseEditorWidget::getSource(workingDir, files);
+ VcsBase::VcsBaseEditorWidget *editor = createVcsEditor(kind, title, source, true,
vcsCmdString.toLatin1().constData(), id);
editor->setRevertDiffChunkEnabled(true);
editor->setDiffBaseDirectory(workingDir);
- VCSBaseEditorParameterWidget *paramWidget = createDiffEditor(workingDir, files, extraOptions);
+ VcsBaseEditorParameterWidget *paramWidget = createDiffEditor(workingDir, files, extraOptions);
if (paramWidget != 0) {
- connect(editor, SIGNAL(diffChunkReverted(VCSBase::DiffChunk)),
+ connect(editor, SIGNAL(diffChunkReverted(VcsBase::DiffChunk)),
paramWidget, SLOT(executeCommand()));
editor->setConfigurationWidget(paramWidget);
}
@@ -375,21 +375,21 @@ void VCSBaseClient::diff(const QString &workingDir, const QStringList &files,
enqueueJob(createCommand(workingDir, editor), args);
}
-void VCSBaseClient::log(const QString &workingDir, const QStringList &files,
+void VcsBaseClient::log(const QString &workingDir, const QStringList &files,
const QStringList &extraOptions,
bool enableAnnotationContextMenu)
{
const QString vcsCmdString = vcsCommandString(LogCommand);
const QString kind = vcsEditorKind(LogCommand);
- const QString id = VCSBase::VCSBaseEditorWidget::getTitleId(workingDir, files);
+ const QString id = VcsBase::VcsBaseEditorWidget::getTitleId(workingDir, files);
const QString title = vcsEditorTitle(vcsCmdString, id);
- const QString source = VCSBase::VCSBaseEditorWidget::getSource(workingDir, files);
+ const QString source = VcsBase::VcsBaseEditorWidget::getSource(workingDir, files);
- VCSBase::VCSBaseEditorWidget *editor = createVCSEditor(kind, title, source, true,
+ VcsBase::VcsBaseEditorWidget *editor = createVcsEditor(kind, title, source, true,
vcsCmdString.toLatin1().constData(), id);
editor->setFileLogAnnotateEnabled(enableAnnotationContextMenu);
- VCSBaseEditorParameterWidget *paramWidget = createLogEditor(workingDir, files, extraOptions);
+ VcsBaseEditorParameterWidget *paramWidget = createLogEditor(workingDir, files, extraOptions);
if (paramWidget != 0)
editor->setConfigurationWidget(paramWidget);
@@ -399,7 +399,7 @@ void VCSBaseClient::log(const QString &workingDir, const QStringList &files,
enqueueJob(createCommand(workingDir, editor), args);
}
-void VCSBaseClient::revertFile(const QString &workingDir,
+void VcsBaseClient::revertFile(const QString &workingDir,
const QString &file,
const QString &revision,
const QStringList &extraOptions)
@@ -413,7 +413,7 @@ void VCSBaseClient::revertFile(const QString &workingDir,
enqueueJob(cmd, args);
}
-void VCSBaseClient::revertAll(const QString &workingDir, const QString &revision,
+void VcsBaseClient::revertAll(const QString &workingDir, const QString &revision,
const QStringList &extraOptions)
{
QStringList args(vcsCommandString(RevertCommand));
@@ -425,7 +425,7 @@ void VCSBaseClient::revertAll(const QString &workingDir, const QString &revision
enqueueJob(createCommand(workingDir), args);
}
-void VCSBaseClient::status(const QString &workingDir, const QString &file,
+void VcsBaseClient::status(const QString &workingDir, const QString &file,
const QStringList &extraOptions)
{
QStringList args(vcsCommandString(StatusCommand));
@@ -437,7 +437,7 @@ void VCSBaseClient::status(const QString &workingDir, const QString &file,
enqueueJob(cmd, args);
}
-void VCSBaseClient::emitParsedStatus(const QString &repository, const QStringList &extraOptions)
+void VcsBaseClient::emitParsedStatus(const QString &repository, const QStringList &extraOptions)
{
QStringList args(vcsCommandString(StatusCommand));
args << extraOptions;
@@ -446,7 +446,7 @@ void VCSBaseClient::emitParsedStatus(const QString &repository, const QStringLis
enqueueJob(cmd, args);
}
-QString VCSBaseClient::vcsCommandString(VCSCommand cmd) const
+QString VcsBaseClient::vcsCommandString(VcsCommand cmd) const
{
switch (cmd) {
case CreateRepositoryCommand: return QLatin1String("init");
@@ -468,7 +468,7 @@ QString VCSBaseClient::vcsCommandString(VCSCommand cmd) const
return QString();
}
-void VCSBaseClient::import(const QString &repositoryRoot, const QStringList &files,
+void VcsBaseClient::import(const QString &repositoryRoot, const QStringList &files,
const QStringList &extraOptions)
{
QStringList args(vcsCommandString(ImportCommand));
@@ -476,7 +476,7 @@ void VCSBaseClient::import(const QString &repositoryRoot, const QStringList &fil
enqueueJob(createCommand(repositoryRoot), args);
}
-void VCSBaseClient::view(const QString &source, const QString &id,
+void VcsBaseClient::view(const QString &source, const QString &id,
const QStringList &extraOptions)
{
QStringList args;
@@ -484,7 +484,7 @@ void VCSBaseClient::view(const QString &source, const QString &id,
const QString kind = vcsEditorKind(DiffCommand);
const QString title = vcsEditorTitle(vcsCommandString(LogCommand), id);
- VCSBase::VCSBaseEditorWidget *editor = createVCSEditor(kind, title, source,
+ VcsBase::VcsBaseEditorWidget *editor = createVcsEditor(kind, title, source,
true, "view", id);
const QFileInfo fi(source);
@@ -492,29 +492,29 @@ void VCSBaseClient::view(const QString &source, const QString &id,
enqueueJob(createCommand(workingDirPath, editor), args);
}
-void VCSBaseClient::update(const QString &repositoryRoot, const QString &revision,
+void VcsBaseClient::update(const QString &repositoryRoot, const QString &revision,
const QStringList &extraOptions)
{
QStringList args(vcsCommandString(UpdateCommand));
args << revisionSpec(revision) << extraOptions;
Command *cmd = createCommand(repositoryRoot);
cmd->setCookie(repositoryRoot);
- cmd->setUnixTerminalDisabled(VCSBase::VCSBasePlugin::isSshPromptConfigured());
+ cmd->setUnixTerminalDisabled(VcsBase::VcsBasePlugin::isSshPromptConfigured());
connect(cmd, SIGNAL(success(QVariant)), this, SIGNAL(changed(QVariant)), Qt::QueuedConnection);
enqueueJob(cmd, args);
}
-void VCSBaseClient::commit(const QString &repositoryRoot,
+void VcsBaseClient::commit(const QString &repositoryRoot,
const QStringList &files,
const QString &commitMessageFile,
const QStringList &extraOptions)
{
// Handling of commitMessageFile is a bit tricky :
- // VCSBaseClient cannot do something with it because it doesn't know which
+ // VcsBaseClient cannot do something with it because it doesn't know which
// option to use (-F ? but sub VCS clients might require a different option
// name like -l for hg ...)
//
- // So descendants of VCSBaseClient *must* redefine commit() and extend
+ // So descendants of VcsBaseClient *must* redefine commit() and extend
// extraOptions with the usage for commitMessageFile (see BazaarClient::commit()
// for example)
Q_UNUSED(commitMessageFile);
@@ -523,12 +523,12 @@ void VCSBaseClient::commit(const QString &repositoryRoot,
enqueueJob(createCommand(repositoryRoot), args);
}
-VCSBaseClientSettings *VCSBaseClient::settings() const
+VcsBaseClientSettings *VcsBaseClient::settings() const
{
return d->m_clientSettings;
}
-VCSBaseEditorParameterWidget *VCSBaseClient::createDiffEditor(const QString &workingDir,
+VcsBaseEditorParameterWidget *VcsBaseClient::createDiffEditor(const QString &workingDir,
const QStringList &files,
const QStringList &extraOptions)
{
@@ -538,7 +538,7 @@ VCSBaseEditorParameterWidget *VCSBaseClient::createDiffEditor(const QString &wor
return 0;
}
-VCSBaseEditorParameterWidget *VCSBaseClient::createLogEditor(const QString &workingDir,
+VcsBaseEditorParameterWidget *VcsBaseClient::createLogEditor(const QString &workingDir,
const QStringList &files,
const QStringList &extraOptions)
{
@@ -548,37 +548,37 @@ VCSBaseEditorParameterWidget *VCSBaseClient::createLogEditor(const QString &work
return 0;
}
-QString VCSBaseClient::vcsEditorTitle(const QString &vcsCmd, const QString &sourceId) const
+QString VcsBaseClient::vcsEditorTitle(const QString &vcsCmd, const QString &sourceId) const
{
- const QString binary = settings()->stringValue(VCSBaseClientSettings::binaryPathKey);
+ const QString binary = settings()->stringValue(VcsBaseClientSettings::binaryPathKey);
return QFileInfo(binary).baseName() +
QLatin1Char(' ') + vcsCmd + QLatin1Char(' ') +
QFileInfo(sourceId).fileName();
}
-VCSBase::VCSBaseEditorWidget *VCSBaseClient::createVCSEditor(const QString &kind, QString title,
+VcsBase::VcsBaseEditorWidget *VcsBaseClient::createVcsEditor(const QString &kind, QString title,
const QString &source, bool setSourceCodec,
const char *registerDynamicProperty,
const QString &dynamicPropertyValue) const
{
- VCSBase::VCSBaseEditorWidget *baseEditor = 0;
+ VcsBase::VcsBaseEditorWidget *baseEditor = 0;
Core::IEditor *outputEditor = locateEditor(d->m_core, registerDynamicProperty, dynamicPropertyValue);
const QString progressMsg = tr("Working...");
if (outputEditor) {
// Exists already
outputEditor->createNew(progressMsg);
- baseEditor = VCSBase::VCSBaseEditorWidget::getVcsBaseEditor(outputEditor);
+ baseEditor = VcsBase::VcsBaseEditorWidget::getVcsBaseEditor(outputEditor);
QTC_ASSERT(baseEditor, return 0);
} else {
outputEditor = d->m_core->editorManager()->openEditorWithContents(Core::Id(kind), &title, progressMsg);
outputEditor->file()->setProperty(registerDynamicProperty, dynamicPropertyValue);
- baseEditor = VCSBase::VCSBaseEditorWidget::getVcsBaseEditor(outputEditor);
+ baseEditor = VcsBase::VcsBaseEditorWidget::getVcsBaseEditor(outputEditor);
connect(baseEditor, SIGNAL(annotateRevisionRequested(QString,QString,int)),
this, SLOT(annotateRevision(QString,QString,int)));
QTC_ASSERT(baseEditor, return 0);
baseEditor->setSource(source);
if (setSourceCodec)
- baseEditor->setCodec(VCSBase::VCSBaseEditorWidget::getCodec(source));
+ baseEditor->setCodec(VcsBase::VcsBaseEditorWidget::getCodec(source));
}
baseEditor->setForceReadOnly(true);
@@ -586,20 +586,20 @@ VCSBase::VCSBaseEditorWidget *VCSBaseClient::createVCSEditor(const QString &kind
return baseEditor;
}
-QProcessEnvironment VCSBaseClient::processEnvironment() const
+QProcessEnvironment VcsBaseClient::processEnvironment() const
{
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
- VCSBase::VCSBasePlugin::setProcessEnvironment(&environment, false);
+ VcsBase::VcsBasePlugin::setProcessEnvironment(&environment, false);
return environment;
}
-Command *VCSBaseClient::createCommand(const QString &workingDirectory,
- VCSBase::VCSBaseEditorWidget *editor,
+Command *VcsBaseClient::createCommand(const QString &workingDirectory,
+ VcsBase::VcsBaseEditorWidget *editor,
JobOutputBindMode mode)
{
- Command *cmd = new Command(d->m_clientSettings->stringValue(VCSBaseClientSettings::binaryPathKey),
+ Command *cmd = new Command(d->m_clientSettings->stringValue(VcsBaseClientSettings::binaryPathKey),
workingDirectory, processEnvironment());
- cmd->setDefaultTimeout(d->m_clientSettings->intValue(VCSBaseClientSettings::timeoutKey));
+ cmd->setDefaultTimeout(d->m_clientSettings->intValue(VcsBaseClientSettings::timeoutKey));
if (editor)
d->bindCommandToEditor(cmd, editor);
if (mode == VcsWindowOutputBind) {
@@ -623,20 +623,20 @@ Command *VCSBaseClient::createCommand(const QString &workingDirectory,
return cmd;
}
-void VCSBaseClient::enqueueJob(Command *cmd, const QStringList &args)
+void VcsBaseClient::enqueueJob(Command *cmd, const QStringList &args)
{
- const QString binary = QFileInfo(d->m_clientSettings->stringValue(VCSBaseClientSettings::binaryPathKey)).baseName();
+ const QString binary = QFileInfo(d->m_clientSettings->stringValue(VcsBaseClientSettings::binaryPathKey)).baseName();
::vcsOutputWindow()->appendCommand(cmd->workingDirectory(), binary, args);
cmd->addJob(args);
cmd->execute();
}
-void VCSBaseClient::resetCachedVcsInfo(const QString &workingDir)
+void VcsBaseClient::resetCachedVcsInfo(const QString &workingDir)
{
Core::VcsManager *vcsManager = d->m_core->vcsManager();
vcsManager->resetVersionControlForDirectory(workingDir);
}
-} // namespace VCSBase
+} // namespace VcsBase
#include "moc_vcsbaseclient.cpp"
diff --git a/src/plugins/vcsbase/vcsbaseclient.h b/src/plugins/vcsbase/vcsbaseclient.h
index b8bf88da35..8cf6e1a87e 100644
--- a/src/plugins/vcsbase/vcsbaseclient.h
+++ b/src/plugins/vcsbase/vcsbaseclient.h
@@ -49,16 +49,16 @@ namespace Utils {
struct SynchronousProcessResponse;
}
-namespace VCSBase {
+namespace VcsBase {
class Command;
-class VCSBaseEditorWidget;
-class VCSBaseClientSettings;
-class VCSJob;
-class VCSBaseClientPrivate;
-class VCSBaseEditorParameterWidget;
+class VcsBaseEditorWidget;
+class VcsBaseClientSettings;
+class VcsJob;
+class VcsBaseClientPrivate;
+class VcsBaseEditorParameterWidget;
-class VCSBASE_EXPORT VCSBaseClient : public QObject
+class VCSBASE_EXPORT VcsBaseClient : public QObject
{
Q_OBJECT
@@ -72,8 +72,8 @@ public:
QString file;
};
- explicit VCSBaseClient(VCSBaseClientSettings *settings);
- ~VCSBaseClient();
+ explicit VcsBaseClient(VcsBaseClientSettings *settings);
+ ~VcsBaseClient();
virtual bool synchronousCreateRepository(const QString &workingDir,
const QStringList &extraOptions = QStringList());
virtual bool synchronousClone(const QString &workingDir,
@@ -120,11 +120,11 @@ public:
virtual QString findTopLevelForFile(const QFileInfo &file) const = 0;
- virtual VCSBaseClientSettings *settings() const;
+ virtual VcsBaseClientSettings *settings() const;
signals:
- void parsedStatus(const QList<VCSBase::VCSBaseClient::StatusItem> &statusList);
- // Passes on changed signals from VCSJob to Control
+ void parsedStatus(const QList<VcsBase::VcsBaseClient::StatusItem> &statusList);
+ // Passes on changed signals from VcsJob to Control
void changed(const QVariant &v);
public slots:
@@ -132,7 +132,7 @@ public slots:
const QStringList &extraOptions = QStringList());
protected:
- enum VCSCommand
+ enum VcsCommand
{
CreateRepositoryCommand,
CloneCommand,
@@ -150,14 +150,14 @@ protected:
LogCommand,
StatusCommand
};
- virtual QString vcsCommandString(VCSCommand cmd) const;
- virtual QString vcsEditorKind(VCSCommand cmd) const = 0;
+ virtual QString vcsCommandString(VcsCommand cmd) const;
+ virtual QString vcsEditorKind(VcsCommand cmd) const = 0;
virtual QStringList revisionSpec(const QString &revision) const = 0;
- virtual VCSBaseEditorParameterWidget *createDiffEditor(const QString &workingDir,
+ virtual VcsBaseEditorParameterWidget *createDiffEditor(const QString &workingDir,
const QStringList &files,
const QStringList &extraOptions);
- virtual VCSBaseEditorParameterWidget *createLogEditor(const QString &workingDir,
+ virtual VcsBaseEditorParameterWidget *createLogEditor(const QString &workingDir,
const QStringList &files,
const QStringList &extraOptions);
virtual StatusItem parseStatusLine(const QString &line) const = 0;
@@ -168,12 +168,12 @@ protected:
const QStringList &args,
QByteArray *output);
// Synchronous VCS execution using Utils::SynchronousProcess, with
- // log windows updating (using VCSBasePlugin::runVCS with flags)
+ // log windows updating (using VcsBasePlugin::runVcs with flags)
Utils::SynchronousProcessResponse vcsSynchronousExec(const QString &workingDir,
const QStringList &args,
unsigned flags = 0,
QTextCodec *outputCodec = 0);
- VCSBase::VCSBaseEditorWidget *createVCSEditor(const QString &kind, QString title,
+ VcsBase::VcsBaseEditorWidget *createVcsEditor(const QString &kind, QString title,
const QString &source, bool setSourceCodec,
const char *registerDynamicProperty,
const QString &dynamicPropertyValue) const;
@@ -185,15 +185,15 @@ protected:
VcsWindowOutputBind
};
Command *createCommand(const QString &workingDirectory,
- VCSBase::VCSBaseEditorWidget *editor = 0,
+ VcsBase::VcsBaseEditorWidget *editor = 0,
JobOutputBindMode mode = NoOutputBind);
void enqueueJob(Command *cmd, const QStringList &args);
void resetCachedVcsInfo(const QString &workingDir);
private:
- friend class VCSBaseClientPrivate;
- VCSBaseClientPrivate *d;
+ friend class VcsBaseClientPrivate;
+ VcsBaseClientPrivate *d;
Q_PRIVATE_SLOT(d, void statusParser(QByteArray))
Q_PRIVATE_SLOT(d, void annotateRevision(QString, QString, int))
@@ -201,6 +201,6 @@ private:
Q_PRIVATE_SLOT(d, void commandFinishedGotoLine(QObject *))
};
-} //namespace VCSBase
+} //namespace VcsBase
#endif // VCSBASECLIENT_H
diff --git a/src/plugins/vcsbase/vcsbaseclientsettings.cpp b/src/plugins/vcsbase/vcsbaseclientsettings.cpp
index ff1cee73d2..83afc19266 100644
--- a/src/plugins/vcsbase/vcsbaseclientsettings.cpp
+++ b/src/plugins/vcsbase/vcsbaseclientsettings.cpp
@@ -154,16 +154,16 @@ bool operator==(const SettingValue &lhs, const SettingValue &rhs)
} // Anonymous namespace
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
-class VCSBaseClientSettingsPrivate : public QSharedData
+class VcsBaseClientSettingsPrivate : public QSharedData
{
public:
- VCSBaseClientSettingsPrivate() {}
+ VcsBaseClientSettingsPrivate() {}
- VCSBaseClientSettingsPrivate(const VCSBaseClientSettingsPrivate &other) :
+ VcsBaseClientSettingsPrivate(const VcsBaseClientSettingsPrivate &other) :
QSharedData(other),
m_valueHash(other.m_valueHash),
m_defaultValueHash(other.m_defaultValueHash),
@@ -179,22 +179,22 @@ public:
} // namespace Internal
/*!
- \class VCSBase::VCSBaseClientSettings
+ \class VcsBase::VcsBaseClientSettings
- \brief Settings used in VCSBaseClient.
+ \brief Settings used in VcsBaseClient.
- \sa VCSBase::VCSBaseClient
+ \sa VcsBase::VcsBaseClient
*/
-const QLatin1String VCSBaseClientSettings::binaryPathKey("BinaryPath");
-const QLatin1String VCSBaseClientSettings::userNameKey("Username");
-const QLatin1String VCSBaseClientSettings::userEmailKey("UserEmail");
-const QLatin1String VCSBaseClientSettings::logCountKey("LogCount");
-const QLatin1String VCSBaseClientSettings::promptOnSubmitKey("PromptOnSubmit");
-const QLatin1String VCSBaseClientSettings::timeoutKey("Timeout");
+const QLatin1String VcsBaseClientSettings::binaryPathKey("BinaryPath");
+const QLatin1String VcsBaseClientSettings::userNameKey("Username");
+const QLatin1String VcsBaseClientSettings::userEmailKey("UserEmail");
+const QLatin1String VcsBaseClientSettings::logCountKey("LogCount");
+const QLatin1String VcsBaseClientSettings::promptOnSubmitKey("PromptOnSubmit");
+const QLatin1String VcsBaseClientSettings::timeoutKey("Timeout");
-VCSBaseClientSettings::VCSBaseClientSettings() :
- d(new Internal::VCSBaseClientSettingsPrivate)
+VcsBaseClientSettings::VcsBaseClientSettings() :
+ d(new Internal::VcsBaseClientSettingsPrivate)
{
declareKey(binaryPathKey, QLatin1String(""));
declareKey(userNameKey, QLatin1String(""));
@@ -204,23 +204,23 @@ VCSBaseClientSettings::VCSBaseClientSettings() :
declareKey(timeoutKey, 30);
}
-VCSBaseClientSettings::VCSBaseClientSettings(const VCSBaseClientSettings &other) :
+VcsBaseClientSettings::VcsBaseClientSettings(const VcsBaseClientSettings &other) :
d(other.d)
{
}
-VCSBaseClientSettings &VCSBaseClientSettings::operator=(const VCSBaseClientSettings &other)
+VcsBaseClientSettings &VcsBaseClientSettings::operator=(const VcsBaseClientSettings &other)
{
if (this != &other)
d = other.d;
return *this;
}
-VCSBaseClientSettings::~VCSBaseClientSettings()
+VcsBaseClientSettings::~VcsBaseClientSettings()
{
}
-void VCSBaseClientSettings::writeSettings(QSettings *settings) const
+void VcsBaseClientSettings::writeSettings(QSettings *settings) const
{
settings->beginGroup(settingsGroup());
foreach (const QString &key, keys())
@@ -228,7 +228,7 @@ void VCSBaseClientSettings::writeSettings(QSettings *settings) const
settings->endGroup();
}
-void VCSBaseClientSettings::readSettings(const QSettings *settings)
+void VcsBaseClientSettings::readSettings(const QSettings *settings)
{
const QString keyRoot = settingsGroup() + QLatin1Char('/');
foreach (const QString &key, keys()) {
@@ -251,66 +251,66 @@ void VCSBaseClientSettings::readSettings(const QSettings *settings)
}
}
-bool VCSBaseClientSettings::equals(const VCSBaseClientSettings &rhs) const
+bool VcsBaseClientSettings::equals(const VcsBaseClientSettings &rhs) const
{
if (this == &rhs)
return true;
return d->m_valueHash == rhs.d->m_valueHash;
}
-QStringList VCSBaseClientSettings::keys() const
+QStringList VcsBaseClientSettings::keys() const
{
return d->m_valueHash.keys();
}
-bool VCSBaseClientSettings::hasKey(const QString &key) const
+bool VcsBaseClientSettings::hasKey(const QString &key) const
{
return d->m_valueHash.contains(key);
}
-int *VCSBaseClientSettings::intPointer(const QString &key)
+int *VcsBaseClientSettings::intPointer(const QString &key)
{
if (hasKey(key))
return &(d->m_valueHash[key].m_comp.intValue);
return 0;
}
-bool *VCSBaseClientSettings::boolPointer(const QString &key)
+bool *VcsBaseClientSettings::boolPointer(const QString &key)
{
if (hasKey(key))
return &(d->m_valueHash[key].m_comp.boolValue);
return 0;
}
-QString *VCSBaseClientSettings::stringPointer(const QString &key)
+QString *VcsBaseClientSettings::stringPointer(const QString &key)
{
if (hasKey(key) && valueType(key) == QVariant::String)
return d->m_valueHash[key].m_comp.strPtr;
return 0;
}
-int VCSBaseClientSettings::intValue(const QString &key, int defaultValue) const
+int VcsBaseClientSettings::intValue(const QString &key, int defaultValue) const
{
if (hasKey(key) && valueType(key) == QVariant::Int)
return d->m_valueHash[key].m_comp.intValue;
return defaultValue;
}
-bool VCSBaseClientSettings::boolValue(const QString &key, bool defaultValue) const
+bool VcsBaseClientSettings::boolValue(const QString &key, bool defaultValue) const
{
if (hasKey(key) && valueType(key) == QVariant::Bool)
return d->m_valueHash[key].m_comp.boolValue;
return defaultValue;
}
-QString VCSBaseClientSettings::stringValue(const QString &key, const QString &defaultValue) const
+QString VcsBaseClientSettings::stringValue(const QString &key, const QString &defaultValue) const
{
if (hasKey(key))
return d->m_valueHash[key].stringValue(defaultValue);
return defaultValue;
}
-QVariant VCSBaseClientSettings::value(const QString &key) const
+QVariant VcsBaseClientSettings::value(const QString &key) const
{
switch (valueType(key)) {
case QVariant::Int:
@@ -326,30 +326,30 @@ QVariant VCSBaseClientSettings::value(const QString &key) const
}
}
-void VCSBaseClientSettings::setValue(const QString &key, const QVariant &v)
+void VcsBaseClientSettings::setValue(const QString &key, const QVariant &v)
{
if (SettingValue::isUsableVariantType(valueType(key)))
d->m_valueHash.insert(key, SettingValue(v));
}
-QVariant::Type VCSBaseClientSettings::valueType(const QString &key) const
+QVariant::Type VcsBaseClientSettings::valueType(const QString &key) const
{
if (hasKey(key))
return d->m_valueHash[key].type();
return QVariant::Invalid;
}
-QString VCSBaseClientSettings::settingsGroup() const
+QString VcsBaseClientSettings::settingsGroup() const
{
return d->m_settingsGroup;
}
-void VCSBaseClientSettings::setSettingsGroup(const QString &group)
+void VcsBaseClientSettings::setSettingsGroup(const QString &group)
{
d->m_settingsGroup = group;
}
-void VCSBaseClientSettings::declareKey(const QString &key, const QVariant &defaultValue)
+void VcsBaseClientSettings::declareKey(const QString &key, const QVariant &defaultValue)
{
if (SettingValue::isUsableVariantType(defaultValue.type())) {
d->m_valueHash.insert(key, SettingValue(defaultValue));
@@ -357,11 +357,11 @@ void VCSBaseClientSettings::declareKey(const QString &key, const QVariant &defau
}
}
-QVariant VCSBaseClientSettings::keyDefaultValue(const QString &key) const
+QVariant VcsBaseClientSettings::keyDefaultValue(const QString &key) const
{
if (d->m_defaultValueHash.contains(key))
return d->m_defaultValueHash.value(key);
return QVariant(valueType(key));
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/vcsbaseclientsettings.h b/src/plugins/vcsbase/vcsbaseclientsettings.h
index 4b4950323c..31f5445989 100644
--- a/src/plugins/vcsbase/vcsbaseclientsettings.h
+++ b/src/plugins/vcsbase/vcsbaseclientsettings.h
@@ -43,11 +43,11 @@ QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
-namespace VCSBase {
+namespace VcsBase {
-namespace Internal { class VCSBaseClientSettingsPrivate; }
+namespace Internal { class VcsBaseClientSettingsPrivate; }
-class VCSBASE_EXPORT VCSBaseClientSettings
+class VCSBASE_EXPORT VcsBaseClientSettings
{
public:
static const QLatin1String binaryPathKey;
@@ -57,15 +57,15 @@ public:
static const QLatin1String promptOnSubmitKey;
static const QLatin1String timeoutKey; // Seconds
- VCSBaseClientSettings();
- VCSBaseClientSettings(const VCSBaseClientSettings &other);
- VCSBaseClientSettings &operator=(const VCSBaseClientSettings &other);
- virtual ~VCSBaseClientSettings();
+ VcsBaseClientSettings();
+ VcsBaseClientSettings(const VcsBaseClientSettings &other);
+ VcsBaseClientSettings &operator=(const VcsBaseClientSettings &other);
+ virtual ~VcsBaseClientSettings();
void writeSettings(QSettings *settings) const;
void readSettings(const QSettings *settings);
- bool equals(const VCSBaseClientSettings &rhs) const;
+ bool equals(const VcsBaseClientSettings &rhs) const;
QStringList keys() const;
bool hasKey(const QString &key) const;
@@ -91,16 +91,16 @@ protected:
QVariant keyDefaultValue(const QString &key) const;
private:
- friend bool equals(const VCSBaseClientSettings &rhs);
- friend class VCSBaseClientSettingsPrivate;
- QSharedDataPointer<Internal::VCSBaseClientSettingsPrivate> d;
+ friend bool equals(const VcsBaseClientSettings &rhs);
+ friend class VcsBaseClientSettingsPrivate;
+ QSharedDataPointer<Internal::VcsBaseClientSettingsPrivate> d;
};
-inline bool operator==(const VCSBaseClientSettings &s1, const VCSBaseClientSettings &s2)
+inline bool operator==(const VcsBaseClientSettings &s1, const VcsBaseClientSettings &s2)
{ return s1.equals(s2); }
-inline bool operator!=(const VCSBaseClientSettings &s1, const VCSBaseClientSettings &s2)
+inline bool operator!=(const VcsBaseClientSettings &s1, const VcsBaseClientSettings &s2)
{ return !s1.equals(s2); }
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSBASECLIENTSETTINGS_H
diff --git a/src/plugins/vcsbase/vcsbaseconstants.h b/src/plugins/vcsbase/vcsbaseconstants.h
index cd6e36348b..2ba5cc3edf 100644
--- a/src/plugins/vcsbase/vcsbaseconstants.h
+++ b/src/plugins/vcsbase/vcsbaseconstants.h
@@ -35,14 +35,14 @@
#include <QtCore/QtGlobal>
-namespace VCSBase {
+namespace VcsBase {
namespace Constants {
const char VCS_SETTINGS_CATEGORY[] = "V.Version Control";
-const char VCS_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("VCSBase", "Version Control");
+const char VCS_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("VcsBase", "Version Control");
const char SETTINGS_CATEGORY_VCS_ICON[] = ":/core/images/category_vcs.png";
const char VCS_COMMON_SETTINGS_ID[] = "A.Common";
-const char VCS_COMMON_SETTINGS_NAME[] = QT_TRANSLATE_NOOP("VCSBase", "Common");
+const char VCS_COMMON_SETTINGS_NAME[] = QT_TRANSLATE_NOOP("VcsBase", "Common");
// Ids for sort order (wizards and preferences)
const char VCS_ID_BAZAAR[] = "B.Bazaar";
@@ -53,6 +53,6 @@ const char VCS_ID_PERFORCE[] = "P.Perforce";
const char VCS_ID_CVS[] = "Z.CVS";
} // namespace Constants
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSBASE_CONSTANTS_H
diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp
index d3a4e3fcaf..f737cd02ff 100644
--- a/src/plugins/vcsbase/vcsbaseeditor.cpp
+++ b/src/plugins/vcsbase/vcsbaseeditor.cpp
@@ -78,9 +78,9 @@
#include <QtGui/QMessageBox>
/*!
- \enum VCSBase::EditorContentType
+ \enum VcsBase::EditorContentType
- \brief Contents of a VCSBaseEditor and its interaction.
+ \brief Contents of a VcsBaseEditor and its interaction.
\value RegularCommandOutput No special handling.
\value LogOutput Log of a file under revision control. Provide 'click on change'
@@ -94,13 +94,13 @@
header and diffs. Interaction is 'double click in hunk' which
opens the file. Context menu offers 'Revert chunk'.
- \sa VCSBase::VCSBaseEditorWidget
+ \sa VcsBase::VcsBaseEditorWidget
*/
-namespace VCSBase {
+namespace VcsBase {
/*!
- \class VCSBase::DiffChunk
+ \class VcsBase::DiffChunk
\brief A diff chunk consisting of file name and chunk data.
*/
@@ -136,27 +136,27 @@ public:
};
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
-Q_DECLARE_METATYPE(VCSBase::Internal::DiffChunkAction)
+Q_DECLARE_METATYPE(VcsBase::Internal::DiffChunkAction)
-namespace VCSBase {
+namespace VcsBase {
/*!
- \class VCSBase::VCSBaseEditor
+ \class VcsBase::VcsBaseEditor
\brief An editor with no support for duplicates.
Creates a browse combo in the toolbar for diff output.
- It also mirrors the signals of the VCSBaseEditor since the editor
+ It also mirrors the signals of the VcsBaseEditor since the editor
manager passes the editor around.
*/
-class VCSBaseEditor : public TextEditor::BaseTextEditor
+class VcsBaseEditor : public TextEditor::BaseTextEditor
{
Q_OBJECT
public:
- VCSBaseEditor(VCSBaseEditorWidget *, const VCSBaseEditorParameters *type);
+ VcsBaseEditor(VcsBaseEditorWidget *, const VcsBaseEditorParameters *type);
bool duplicateSupported() const { return false; }
Core::IEditor *duplicate(QWidget * /*parent*/) { return 0; }
@@ -174,8 +174,8 @@ private:
bool m_temporary;
};
-VCSBaseEditor::VCSBaseEditor(VCSBaseEditorWidget *widget,
- const VCSBaseEditorParameters *type) :
+VcsBaseEditor::VcsBaseEditor(VcsBaseEditorWidget *widget,
+ const VcsBaseEditorParameters *type) :
BaseTextEditor(widget),
m_id(type->id),
m_temporary(false)
@@ -184,10 +184,10 @@ VCSBaseEditor::VCSBaseEditor(VCSBaseEditorWidget *widget,
}
// Diff editor: creates a browse combo in the toolbar for diff output.
-class VCSBaseDiffEditor : public VCSBaseEditor
+class VcsBaseDiffEditor : public VcsBaseEditor
{
public:
- VCSBaseDiffEditor(VCSBaseEditorWidget *, const VCSBaseEditorParameters *type);
+ VcsBaseDiffEditor(VcsBaseEditorWidget *, const VcsBaseEditorParameters *type);
QComboBox *diffFileBrowseComboBox() const { return m_diffFileBrowseComboBox; }
@@ -195,8 +195,8 @@ private:
QComboBox *m_diffFileBrowseComboBox;
};
-VCSBaseDiffEditor::VCSBaseDiffEditor(VCSBaseEditorWidget *w, const VCSBaseEditorParameters *type) :
- VCSBaseEditor(w, type),
+VcsBaseDiffEditor::VcsBaseDiffEditor(VcsBaseEditorWidget *w, const VcsBaseEditorParameters *type) :
+ VcsBaseEditor(w, type),
m_diffFileBrowseComboBox(new QComboBox)
{
m_diffFileBrowseComboBox->setMinimumContentsLength(20);
@@ -208,16 +208,16 @@ VCSBaseDiffEditor::VCSBaseDiffEditor(VCSBaseEditorWidget *w, const VCSBaseEditor
insertExtraToolBarWidget(Left, m_diffFileBrowseComboBox);
}
-// ----------- VCSBaseEditorPrivate
+// ----------- VcsBaseEditorPrivate
namespace Internal {
-class VCSBaseEditorWidgetPrivate
+class VcsBaseEditorWidgetPrivate
{
public:
- VCSBaseEditorWidgetPrivate(const VCSBaseEditorParameters *type);
+ VcsBaseEditorWidgetPrivate(const VcsBaseEditorParameters *type);
- const VCSBaseEditorParameters *m_parameters;
+ const VcsBaseEditorParameters *m_parameters;
QString m_currentChange;
QString m_source;
@@ -236,11 +236,11 @@ public:
bool m_mouseDragging;
};
-VCSBaseEditorWidgetPrivate::VCSBaseEditorWidgetPrivate(const VCSBaseEditorParameters *type) :
+VcsBaseEditorWidgetPrivate::VcsBaseEditorWidgetPrivate(const VcsBaseEditorParameters *type) :
m_parameters(type),
m_cursorLine(-1),
- m_annotateRevisionTextFormat(VCSBaseEditorWidget::tr("Annotate \"%1\"")),
- m_copyRevisionTextFormat(VCSBaseEditorWidget::tr("Copy \"%1\"")),
+ m_annotateRevisionTextFormat(VcsBaseEditorWidget::tr("Annotate \"%1\"")),
+ m_copyRevisionTextFormat(VcsBaseEditorWidget::tr("Copy \"%1\"")),
m_fileLogAnnotateEnabled(false),
m_editor(0),
m_configurationWidget(0),
@@ -252,17 +252,17 @@ VCSBaseEditorWidgetPrivate::VCSBaseEditorWidgetPrivate(const VCSBaseEditorParame
} // namespace Internal
/*!
- \struct VCSBase::VCSBaseEditorParameters
+ \struct VcsBase::VcsBaseEditorParameters
\brief Helper struct used to parametrize an editor with mime type, context
and id. The extension is currently only a suggestion when running
VCS commands with redirection.
- \sa VCSBase::VCSBaseEditorWidget, VCSBase::BaseVCSEditorFactory, VCSBase::EditorContentType
+ \sa VcsBase::VcsBaseEditorWidget, VcsBase::BaseVcsEditorFactory, VcsBase::EditorContentType
*/
/*!
- \class VCSBase::VCSBaseEditorWidget
+ \class VcsBase::VcsBaseEditorWidget
\brief Base class for editors showing version control system output
of the type enumerated by EditorContentType.
@@ -271,19 +271,19 @@ VCSBaseEditorWidgetPrivate::VCSBaseEditorWidgetPrivate(const VCSBaseEditorParame
refers to and will be emitted with describeRequested().
This is for VCS that need a current directory.
- \sa VCSBase::BaseVCSEditorFactory, VCSBase::VCSBaseEditorParameters, VCSBase::EditorContentType
+ \sa VcsBase::BaseVcsEditorFactory, VcsBase::VcsBaseEditorParameters, VcsBase::EditorContentType
*/
-VCSBaseEditorWidget::VCSBaseEditorWidget(const VCSBaseEditorParameters *type, QWidget *parent)
+VcsBaseEditorWidget::VcsBaseEditorWidget(const VcsBaseEditorParameters *type, QWidget *parent)
: BaseTextEditorWidget(parent),
- d(new Internal::VCSBaseEditorWidgetPrivate(type))
+ d(new Internal::VcsBaseEditorWidgetPrivate(type))
{
viewport()->setMouseTracking(true);
- setBaseTextDocument(new Internal::VCSBaseTextDocument);
+ setBaseTextDocument(new Internal::VcsBaseTextDocument);
setMimeType(QLatin1String(d->m_parameters->mimeType));
}
-void VCSBaseEditorWidget::init()
+void VcsBaseEditorWidget::init()
{
switch (d->m_parameters->type) {
case RegularCommandOutput:
@@ -305,94 +305,94 @@ void VCSBaseEditorWidget::init()
TextEditor::TextEditorSettings::instance()->initializeEditor(this);
}
-VCSBaseEditorWidget::~VCSBaseEditorWidget()
+VcsBaseEditorWidget::~VcsBaseEditorWidget()
{
delete d;
}
-void VCSBaseEditorWidget::setForceReadOnly(bool b)
+void VcsBaseEditorWidget::setForceReadOnly(bool b)
{
- Internal::VCSBaseTextDocument *vbd = qobject_cast<Internal::VCSBaseTextDocument*>(baseTextDocument());
- VCSBaseEditor *eda = qobject_cast<VCSBaseEditor *>(editor());
+ Internal::VcsBaseTextDocument *vbd = qobject_cast<Internal::VcsBaseTextDocument*>(baseTextDocument());
+ VcsBaseEditor *eda = qobject_cast<VcsBaseEditor *>(editor());
QTC_ASSERT(vbd != 0 && eda != 0, return);
setReadOnly(b);
vbd->setForceReadOnly(b);
eda->setTemporary(b);
}
-bool VCSBaseEditorWidget::isForceReadOnly() const
+bool VcsBaseEditorWidget::isForceReadOnly() const
{
- const Internal::VCSBaseTextDocument *vbd = qobject_cast<const Internal::VCSBaseTextDocument*>(baseTextDocument());
+ const Internal::VcsBaseTextDocument *vbd = qobject_cast<const Internal::VcsBaseTextDocument*>(baseTextDocument());
QTC_ASSERT(vbd, return false);
return vbd->isForceReadOnly();
}
-QString VCSBaseEditorWidget::source() const
+QString VcsBaseEditorWidget::source() const
{
return d->m_source;
}
-void VCSBaseEditorWidget::setSource(const QString &source)
+void VcsBaseEditorWidget::setSource(const QString &source)
{
d->m_source = source;
}
-QString VCSBaseEditorWidget::annotateRevisionTextFormat() const
+QString VcsBaseEditorWidget::annotateRevisionTextFormat() const
{
return d->m_annotateRevisionTextFormat;
}
-void VCSBaseEditorWidget::setAnnotateRevisionTextFormat(const QString &f)
+void VcsBaseEditorWidget::setAnnotateRevisionTextFormat(const QString &f)
{
d->m_annotateRevisionTextFormat = f;
}
-QString VCSBaseEditorWidget::annotatePreviousRevisionTextFormat() const
+QString VcsBaseEditorWidget::annotatePreviousRevisionTextFormat() const
{
return d->m_annotatePreviousRevisionTextFormat;
}
-void VCSBaseEditorWidget::setAnnotatePreviousRevisionTextFormat(const QString &f)
+void VcsBaseEditorWidget::setAnnotatePreviousRevisionTextFormat(const QString &f)
{
d->m_annotatePreviousRevisionTextFormat = f;
}
-QString VCSBaseEditorWidget::copyRevisionTextFormat() const
+QString VcsBaseEditorWidget::copyRevisionTextFormat() const
{
return d->m_copyRevisionTextFormat;
}
-void VCSBaseEditorWidget::setCopyRevisionTextFormat(const QString &f)
+void VcsBaseEditorWidget::setCopyRevisionTextFormat(const QString &f)
{
d->m_copyRevisionTextFormat = f;
}
-bool VCSBaseEditorWidget::isFileLogAnnotateEnabled() const
+bool VcsBaseEditorWidget::isFileLogAnnotateEnabled() const
{
return d->m_fileLogAnnotateEnabled;
}
-void VCSBaseEditorWidget::setFileLogAnnotateEnabled(bool e)
+void VcsBaseEditorWidget::setFileLogAnnotateEnabled(bool e)
{
d->m_fileLogAnnotateEnabled = e;
}
-QString VCSBaseEditorWidget::diffBaseDirectory() const
+QString VcsBaseEditorWidget::diffBaseDirectory() const
{
return d->m_diffBaseDirectory;
}
-void VCSBaseEditorWidget::setDiffBaseDirectory(const QString &bd)
+void VcsBaseEditorWidget::setDiffBaseDirectory(const QString &bd)
{
d->m_diffBaseDirectory = bd;
}
-QTextCodec *VCSBaseEditorWidget::codec() const
+QTextCodec *VcsBaseEditorWidget::codec() const
{
return const_cast<QTextCodec *>(baseTextDocument()->codec());
}
-void VCSBaseEditorWidget::setCodec(QTextCodec *c)
+void VcsBaseEditorWidget::setCodec(QTextCodec *c)
{
if (c) {
baseTextDocument()->setCodec(c);
@@ -401,27 +401,27 @@ void VCSBaseEditorWidget::setCodec(QTextCodec *c)
}
}
-EditorContentType VCSBaseEditorWidget::contentType() const
+EditorContentType VcsBaseEditorWidget::contentType() const
{
return d->m_parameters->type;
}
-bool VCSBaseEditorWidget::isModified() const
+bool VcsBaseEditorWidget::isModified() const
{
return false;
}
-TextEditor::BaseTextEditor *VCSBaseEditorWidget::createEditor()
+TextEditor::BaseTextEditor *VcsBaseEditorWidget::createEditor()
{
TextEditor::BaseTextEditor *editor = 0;
if (d->m_parameters->type == DiffOutput) {
// Diff: set up diff file browsing
- VCSBaseDiffEditor *de = new VCSBaseDiffEditor(this, d->m_parameters);
+ VcsBaseDiffEditor *de = new VcsBaseDiffEditor(this, d->m_parameters);
QComboBox *diffBrowseComboBox = de->diffFileBrowseComboBox();
connect(diffBrowseComboBox, SIGNAL(activated(int)), this, SLOT(slotDiffBrowse(int)));
editor = de;
} else {
- editor = new VCSBaseEditor(this, d->m_parameters);
+ editor = new VcsBaseEditor(this, d->m_parameters);
}
d->m_editor = editor;
@@ -433,9 +433,9 @@ TextEditor::BaseTextEditor *VCSBaseEditorWidget::createEditor()
return editor;
}
-void VCSBaseEditorWidget::slotPopulateDiffBrowser()
+void VcsBaseEditorWidget::slotPopulateDiffBrowser()
{
- VCSBaseDiffEditor *de = static_cast<VCSBaseDiffEditor*>(editor());
+ VcsBaseDiffEditor *de = static_cast<VcsBaseDiffEditor*>(editor());
QComboBox *diffBrowseComboBox = de->diffFileBrowseComboBox();
diffBrowseComboBox->clear();
d->m_diffSections.clear();
@@ -459,7 +459,7 @@ void VCSBaseEditorWidget::slotPopulateDiffBrowser()
}
}
-void VCSBaseEditorWidget::slotDiffBrowse(int index)
+void VcsBaseEditorWidget::slotDiffBrowse(int index)
{
// goto diffed file as indicated by index/line number
if (index < 0 || index >= d->m_diffSections.size())
@@ -489,7 +489,7 @@ static int sectionOfLine(int line, const QList<int> &sections)
return sectionCount - 1;
}
-void VCSBaseEditorWidget::slotDiffCursorPositionChanged()
+void VcsBaseEditorWidget::slotDiffCursorPositionChanged()
{
// Adapt diff file browse combo to new position
// if the cursor goes across a file line.
@@ -501,7 +501,7 @@ void VCSBaseEditorWidget::slotDiffCursorPositionChanged()
d->m_cursorLine = newCursorLine;
const int section = sectionOfLine(d->m_cursorLine, d->m_diffSections);
if (section != -1) {
- VCSBaseDiffEditor *de = static_cast<VCSBaseDiffEditor*>(editor());
+ VcsBaseDiffEditor *de = static_cast<VcsBaseDiffEditor*>(editor());
QComboBox *diffBrowseComboBox = de->diffFileBrowseComboBox();
if (diffBrowseComboBox->currentIndex() != section) {
const bool blocked = diffBrowseComboBox->blockSignals(true);
@@ -511,14 +511,14 @@ void VCSBaseEditorWidget::slotDiffCursorPositionChanged()
}
}
-QAction *VCSBaseEditorWidget::createDescribeAction(const QString &change)
+QAction *VcsBaseEditorWidget::createDescribeAction(const QString &change)
{
QAction *a = new QAction(tr("Describe change %1").arg(change), 0);
connect(a, SIGNAL(triggered()), this, SLOT(describe()));
return a;
}
-QAction *VCSBaseEditorWidget::createAnnotateAction(const QString &change, bool previous)
+QAction *VcsBaseEditorWidget::createAnnotateAction(const QString &change, bool previous)
{
// Use 'previous' format if desired and available, else default to standard.
const QString &format = previous && !d->m_annotatePreviousRevisionTextFormat.isEmpty() ?
@@ -529,7 +529,7 @@ QAction *VCSBaseEditorWidget::createAnnotateAction(const QString &change, bool p
return a;
}
-QAction *VCSBaseEditorWidget::createCopyRevisionAction(const QString &change)
+QAction *VcsBaseEditorWidget::createCopyRevisionAction(const QString &change)
{
QAction *a = new QAction(d->m_copyRevisionTextFormat.arg(change), 0);
a->setData(change);
@@ -537,7 +537,7 @@ QAction *VCSBaseEditorWidget::createCopyRevisionAction(const QString &change)
return a;
}
-void VCSBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e)
+void VcsBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e)
{
QMenu *menu = createStandardContextMenu();
// 'click on change-interaction'
@@ -602,7 +602,7 @@ void VCSBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e)
delete menu;
}
-void VCSBaseEditorWidget::mouseMoveEvent(QMouseEvent *e)
+void VcsBaseEditorWidget::mouseMoveEvent(QMouseEvent *e)
{
if (e->buttons()) {
d->m_mouseDragging = true;
@@ -638,7 +638,7 @@ void VCSBaseEditorWidget::mouseMoveEvent(QMouseEvent *e)
viewport()->setCursor(cursorShape);
}
-void VCSBaseEditorWidget::mouseReleaseEvent(QMouseEvent *e)
+void VcsBaseEditorWidget::mouseReleaseEvent(QMouseEvent *e)
{
const bool wasDragging = d->m_mouseDragging;
d->m_mouseDragging = false;
@@ -656,7 +656,7 @@ void VCSBaseEditorWidget::mouseReleaseEvent(QMouseEvent *e)
TextEditor::BaseTextEditorWidget::mouseReleaseEvent(e);
}
-void VCSBaseEditorWidget::mouseDoubleClickEvent(QMouseEvent *e)
+void VcsBaseEditorWidget::mouseDoubleClickEvent(QMouseEvent *e)
{
if (d->m_parameters->type == DiffOutput) {
if (e->button() == Qt::LeftButton &&!(e->modifiers() & Qt::ShiftModifier)) {
@@ -667,7 +667,7 @@ void VCSBaseEditorWidget::mouseDoubleClickEvent(QMouseEvent *e)
TextEditor::BaseTextEditorWidget::mouseDoubleClickEvent(e);
}
-void VCSBaseEditorWidget::keyPressEvent(QKeyEvent *e)
+void VcsBaseEditorWidget::keyPressEvent(QKeyEvent *e)
{
// Do not intercept return in editable patches.
if (d->m_parameters->type == DiffOutput && isReadOnly()
@@ -678,13 +678,13 @@ void VCSBaseEditorWidget::keyPressEvent(QKeyEvent *e)
BaseTextEditorWidget::keyPressEvent(e);
}
-void VCSBaseEditorWidget::describe()
+void VcsBaseEditorWidget::describe()
{
if (!d->m_currentChange.isEmpty())
emit describeRequested(d->m_source, d->m_currentChange);
}
-void VCSBaseEditorWidget::slotActivateAnnotation()
+void VcsBaseEditorWidget::slotActivateAnnotation()
{
// The annotation highlighting depends on contents (change number
// set with assigned colors)
@@ -741,7 +741,7 @@ static inline bool checkChunkLine(const QString &line, int *modifiedLineNumber)
return checkChunkLine(line, modifiedLineNumber, 3);
}
-void VCSBaseEditorWidget::jumpToChangeFromDiff(QTextCursor cursor)
+void VcsBaseEditorWidget::jumpToChangeFromDiff(QTextCursor cursor)
{
int chunkStart = 0;
int lineCount = -1;
@@ -782,7 +782,7 @@ void VCSBaseEditorWidget::jumpToChangeFromDiff(QTextCursor cursor)
}
// cut out chunk and determine file name.
-DiffChunk VCSBaseEditorWidget::diffChunk(QTextCursor cursor) const
+DiffChunk VcsBaseEditorWidget::diffChunk(QTextCursor cursor) const
{
QTC_ASSERT(d->m_parameters->type == DiffOutput, return DiffChunk(); )
DiffChunk rc;
@@ -821,7 +821,7 @@ DiffChunk VCSBaseEditorWidget::diffChunk(QTextCursor cursor) const
return rc;
}
-void VCSBaseEditorWidget::setPlainTextData(const QByteArray &data)
+void VcsBaseEditorWidget::setPlainTextData(const QByteArray &data)
{
if (data.size() > Core::EditorManager::maxTextFileSize()) {
setPlainText(msgTextTooLarge(data.size()));
@@ -830,7 +830,7 @@ void VCSBaseEditorWidget::setPlainTextData(const QByteArray &data)
}
}
-void VCSBaseEditorWidget::setFontSettings(const TextEditor::FontSettings &fs)
+void VcsBaseEditorWidget::setFontSettings(const TextEditor::FontSettings &fs)
{
TextEditor::BaseTextEditorWidget::setFontSettings(fs);
if (d->m_parameters->type == DiffOutput) {
@@ -849,7 +849,7 @@ void VCSBaseEditorWidget::setFontSettings(const TextEditor::FontSettings &fs)
}
}
-const VCSBaseEditorParameters *VCSBaseEditorWidget::findType(const VCSBaseEditorParameters *array,
+const VcsBaseEditorParameters *VcsBaseEditorWidget::findType(const VcsBaseEditorParameters *array,
int arraySize,
EditorContentType et)
{
@@ -895,7 +895,7 @@ static QTextCodec *findProjectCodec(const QString &dir)
return 0;
}
-QTextCodec *VCSBaseEditorWidget::getCodec(const QString &source)
+QTextCodec *VcsBaseEditorWidget::getCodec(const QString &source)
{
if (!source.isEmpty()) {
// Check file
@@ -911,22 +911,22 @@ QTextCodec *VCSBaseEditorWidget::getCodec(const QString &source)
return sys;
}
-QTextCodec *VCSBaseEditorWidget::getCodec(const QString &workingDirectory, const QStringList &files)
+QTextCodec *VcsBaseEditorWidget::getCodec(const QString &workingDirectory, const QStringList &files)
{
if (files.empty())
return getCodec(workingDirectory);
return getCodec(workingDirectory + QLatin1Char('/') + files.front());
}
-VCSBaseEditorWidget *VCSBaseEditorWidget::getVcsBaseEditor(const Core::IEditor *editor)
+VcsBaseEditorWidget *VcsBaseEditorWidget::getVcsBaseEditor(const Core::IEditor *editor)
{
if (const TextEditor::BaseTextEditor *be = qobject_cast<const TextEditor::BaseTextEditor *>(editor))
- return qobject_cast<VCSBaseEditorWidget *>(be->editorWidget());
+ return qobject_cast<VcsBaseEditorWidget *>(be->editorWidget());
return 0;
}
// Return line number of current editor if it matches.
-int VCSBaseEditorWidget::lineNumberOfCurrentEditor(const QString &currentFile)
+int VcsBaseEditorWidget::lineNumberOfCurrentEditor(const QString &currentFile)
{
Core::IEditor *ed = Core::EditorManager::instance()->currentEditor();
if (!ed)
@@ -942,7 +942,7 @@ int VCSBaseEditorWidget::lineNumberOfCurrentEditor(const QString &currentFile)
return eda->currentLine();
}
-bool VCSBaseEditorWidget::gotoLineOfEditor(Core::IEditor *e, int lineNumber)
+bool VcsBaseEditorWidget::gotoLineOfEditor(Core::IEditor *e, int lineNumber)
{
if (lineNumber >= 0 && e) {
if (TextEditor::BaseTextEditor *be = qobject_cast<TextEditor::BaseTextEditor*>(e)) {
@@ -955,7 +955,7 @@ bool VCSBaseEditorWidget::gotoLineOfEditor(Core::IEditor *e, int lineNumber)
// Return source file or directory string depending on parameters
// ('git diff XX' -> 'XX' , 'git diff XX file' -> 'XX/file').
-QString VCSBaseEditorWidget::getSource(const QString &workingDirectory,
+QString VcsBaseEditorWidget::getSource(const QString &workingDirectory,
const QString &fileName)
{
if (fileName.isEmpty())
@@ -969,7 +969,7 @@ QString VCSBaseEditorWidget::getSource(const QString &workingDirectory,
return rc;
}
-QString VCSBaseEditorWidget::getSource(const QString &workingDirectory,
+QString VcsBaseEditorWidget::getSource(const QString &workingDirectory,
const QStringList &fileNames)
{
return fileNames.size() == 1 ?
@@ -977,7 +977,7 @@ QString VCSBaseEditorWidget::getSource(const QString &workingDirectory,
workingDirectory;
}
-QString VCSBaseEditorWidget::getTitleId(const QString &workingDirectory,
+QString VcsBaseEditorWidget::getTitleId(const QString &workingDirectory,
const QStringList &fileNames,
const QString &revision)
{
@@ -1000,7 +1000,7 @@ QString VCSBaseEditorWidget::getTitleId(const QString &workingDirectory,
return rc;
}
-bool VCSBaseEditorWidget::setConfigurationWidget(QWidget *w)
+bool VcsBaseEditorWidget::setConfigurationWidget(QWidget *w)
{
if (!d->m_editor || d->m_configurationWidget)
return false;
@@ -1011,13 +1011,13 @@ bool VCSBaseEditorWidget::setConfigurationWidget(QWidget *w)
return true;
}
-QWidget *VCSBaseEditorWidget::configurationWidget() const
+QWidget *VcsBaseEditorWidget::configurationWidget() const
{
return d->m_configurationWidget;
}
// Find the complete file from a diff relative specification.
-QString VCSBaseEditorWidget::findDiffFile(const QString &f,
+QString VcsBaseEditorWidget::findDiffFile(const QString &f,
Core::IVersionControl *control /* = 0 */) const
{
// Check if file is absolute
@@ -1056,24 +1056,24 @@ QString VCSBaseEditorWidget::findDiffFile(const QString &f,
return QString();
}
-void VCSBaseEditorWidget::slotAnnotateRevision()
+void VcsBaseEditorWidget::slotAnnotateRevision()
{
if (const QAction *a = qobject_cast<const QAction *>(sender()))
emit annotateRevisionRequested(source(), a->data().toString(),
editor()->currentLine());
}
-void VCSBaseEditorWidget::slotCopyRevision()
+void VcsBaseEditorWidget::slotCopyRevision()
{
QApplication::clipboard()->setText(d->m_currentChange);
}
-QStringList VCSBaseEditorWidget::annotationPreviousVersions(const QString &) const
+QStringList VcsBaseEditorWidget::annotationPreviousVersions(const QString &) const
{
return QStringList();
}
-void VCSBaseEditorWidget::slotPaste()
+void VcsBaseEditorWidget::slotPaste()
{
// Retrieve service by soft dependency.
QObject *pasteService =
@@ -1087,17 +1087,17 @@ void VCSBaseEditorWidget::slotPaste()
}
}
-bool VCSBaseEditorWidget::isRevertDiffChunkEnabled() const
+bool VcsBaseEditorWidget::isRevertDiffChunkEnabled() const
{
return d->m_revertChunkEnabled;
}
-void VCSBaseEditorWidget::setRevertDiffChunkEnabled(bool e)
+void VcsBaseEditorWidget::setRevertDiffChunkEnabled(bool e)
{
d->m_revertChunkEnabled = e;
}
-bool VCSBaseEditorWidget::canApplyDiffChunk(const DiffChunk &dc) const
+bool VcsBaseEditorWidget::canApplyDiffChunk(const DiffChunk &dc) const
{
if (!dc.isValid())
return false;
@@ -1108,12 +1108,12 @@ bool VCSBaseEditorWidget::canApplyDiffChunk(const DiffChunk &dc) const
// Default implementation of revert: Apply a chunk by piping it into patch,
// (passing '-R' for revert), assuming we got absolute paths from the VCS plugins.
-bool VCSBaseEditorWidget::applyDiffChunk(const DiffChunk &dc, bool revert) const
+bool VcsBaseEditorWidget::applyDiffChunk(const DiffChunk &dc, bool revert) const
{
- return VCSBasePlugin::runPatch(dc.asPatch(), QString(), 0, revert);
+ return VcsBasePlugin::runPatch(dc.asPatch(), QString(), 0, revert);
}
-void VCSBaseEditorWidget::slotApplyDiffChunk()
+void VcsBaseEditorWidget::slotApplyDiffChunk()
{
const QAction *a = qobject_cast<QAction *>(sender());
QTC_ASSERT(a, return ; )
@@ -1134,7 +1134,7 @@ void VCSBaseEditorWidget::slotApplyDiffChunk()
}
// Tagging of editors for re-use.
-QString VCSBaseEditorWidget::editorTag(EditorContentType t,
+QString VcsBaseEditorWidget::editorTag(EditorContentType t,
const QString &workingDirectory,
const QStringList &files,
const QString &revision)
@@ -1154,14 +1154,14 @@ QString VCSBaseEditorWidget::editorTag(EditorContentType t,
return rc;
}
-static const char tagPropertyC[] = "_q_VCSBaseEditorTag";
+static const char tagPropertyC[] = "_q_VcsBaseEditorTag";
-void VCSBaseEditorWidget::tagEditor(Core::IEditor *e, const QString &tag)
+void VcsBaseEditorWidget::tagEditor(Core::IEditor *e, const QString &tag)
{
e->setProperty(tagPropertyC, QVariant(tag));
}
-Core::IEditor* VCSBaseEditorWidget::locateEditorByTag(const QString &tag)
+Core::IEditor* VcsBaseEditorWidget::locateEditorByTag(const QString &tag)
{
Core::IEditor *rc = 0;
foreach (Core::IEditor *ed, Core::EditorManager::instance()->openedEditors()) {
@@ -1174,6 +1174,6 @@ Core::IEditor* VCSBaseEditorWidget::locateEditorByTag(const QString &tag)
return rc;
}
-} // namespace VCSBase
+} // namespace VcsBase
#include "vcsbaseeditor.moc"
diff --git a/src/plugins/vcsbase/vcsbaseeditor.h b/src/plugins/vcsbase/vcsbaseeditor.h
index d703f8944a..ce9294e188 100644
--- a/src/plugins/vcsbase/vcsbaseeditor.h
+++ b/src/plugins/vcsbase/vcsbaseeditor.h
@@ -47,9 +47,9 @@ QT_END_NAMESPACE
namespace Core { class IVersionControl; }
-namespace VCSBase {
+namespace VcsBase {
-namespace Internal { class VCSBaseEditorWidgetPrivate; }
+namespace Internal { class VcsBaseEditorWidgetPrivate; }
class DiffHighlighter;
class BaseAnnotationHighlighter;
@@ -63,7 +63,7 @@ enum EditorContentType
DiffOutput
};
-class VCSBASE_EXPORT VCSBaseEditorParameters
+class VCSBASE_EXPORT VcsBaseEditorParameters
{
public:
EditorContentType type;
@@ -84,7 +84,7 @@ public:
QByteArray chunk;
};
-class VCSBASE_EXPORT VCSBaseEditorWidget : public TextEditor::BaseTextEditorWidget
+class VCSBASE_EXPORT VcsBaseEditorWidget : public TextEditor::BaseTextEditorWidget
{
Q_PROPERTY(QString source READ source WRITE setSource)
Q_PROPERTY(QString diffBaseDirectory READ diffBaseDirectory WRITE setDiffBaseDirectory)
@@ -98,12 +98,12 @@ class VCSBASE_EXPORT VCSBaseEditorWidget : public TextEditor::BaseTextEditorWidg
protected:
// Initialization requires calling init() (which in turns calls
// virtual functions).
- explicit VCSBaseEditorWidget(const VCSBaseEditorParameters *type,
+ explicit VcsBaseEditorWidget(const VcsBaseEditorParameters *type,
QWidget *parent);
public:
void init();
- ~VCSBaseEditorWidget();
+ ~VcsBaseEditorWidget();
/* Force read-only: Make it a read-only, temporary file.
* Should be set to true by version control views. It is not on
@@ -149,8 +149,8 @@ public:
EditorContentType contentType() const;
// Utility to find a parameter set by type in an array.
- static const VCSBaseEditorParameters *
- findType(const VCSBaseEditorParameters *array, int arraySize, EditorContentType et);
+ static const VcsBaseEditorParameters *
+ findType(const VcsBaseEditorParameters *array, int arraySize, EditorContentType et);
// Utility to find the codec for a source (file or directory), querying
// the editor manager and the project managers (defaults to system codec).
@@ -161,7 +161,7 @@ public:
// Utility to return the widget from the IEditor returned by the editor
// manager which is a BaseTextEditor.
- static VCSBaseEditorWidget *getVcsBaseEditor(const Core::IEditor *editor);
+ static VcsBaseEditorWidget *getVcsBaseEditor(const Core::IEditor *editor);
// Utility to find the line number of the current editor. Optionally,
// pass in the file name to match it. To be used when jumping to current
@@ -200,8 +200,8 @@ signals:
// for LogOutput/AnnotateOutput content types.
void describeRequested(const QString &source, const QString &change);
void annotateRevisionRequested(const QString &source, const QString &change, int lineNumber);
- void diffChunkApplied(const VCSBase::DiffChunk &dc);
- void diffChunkReverted(const VCSBase::DiffChunk &dc);
+ void diffChunkApplied(const VcsBase::DiffChunk &dc);
+ void diffChunkReverted(const VcsBase::DiffChunk &dc);
public slots:
// Convenience slot to set data read from stdout, will use the
@@ -264,11 +264,11 @@ private:
QAction *createAnnotateAction(const QString &change, bool previous = false);
QAction *createCopyRevisionAction(const QString &change);
- Internal::VCSBaseEditorWidgetPrivate *const d;
+ Internal::VcsBaseEditorWidgetPrivate *const d;
};
-} // namespace VCSBase
+} // namespace VcsBase
-Q_DECLARE_METATYPE(VCSBase::DiffChunk)
+Q_DECLARE_METATYPE(VcsBase::DiffChunk)
#endif // VCSBASE_BASEEDITOR_H
diff --git a/src/plugins/vcsbase/vcsbaseeditorparameterwidget.cpp b/src/plugins/vcsbase/vcsbaseeditorparameterwidget.cpp
index 423cdbcd95..22a4bd8ab8 100644
--- a/src/plugins/vcsbase/vcsbaseeditorparameterwidget.cpp
+++ b/src/plugins/vcsbase/vcsbaseeditorparameterwidget.cpp
@@ -38,7 +38,7 @@
#include <QtCore/QDebug>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
@@ -80,16 +80,16 @@ private:
Type m_type;
};
-class VCSBaseEditorParameterWidgetPrivate
+class VcsBaseEditorParameterWidgetPrivate
{
public:
- VCSBaseEditorParameterWidgetPrivate() :
+ VcsBaseEditorParameterWidgetPrivate() :
m_layout(0), m_comboBoxOptionTemplate(QLatin1String("%{option}=%{value}"))
{ }
QStringList m_baseArguments;
QHBoxLayout *m_layout;
- QList<VCSBaseEditorParameterWidget::OptionMapping> m_optionMappings;
+ QList<VcsBaseEditorParameterWidget::OptionMapping> m_optionMappings;
QHash<QWidget*, SettingMappingData> m_settingMapping;
QStringList m_comboBoxOptionTemplate;
};
@@ -97,9 +97,9 @@ public:
} // namespace Internal
/*!
- \class VCSBase::VCSBaseEditorParameterWidget
+ \class VcsBase::VcsBaseEditorParameterWidget
- \brief A toolbar-like widget for use with VCSBase::VCSBaseEditor::setConfigurationWidget()
+ \brief A toolbar-like widget for use with VcsBase::VcsBaseEditor::setConfigurationWidget()
influencing for example the generation of VCS diff output.
The widget maintains a list of command line arguments (starting from baseArguments())
@@ -107,15 +107,15 @@ public:
that should trigger the rerun of the VCS operation.
*/
-VCSBaseEditorParameterWidget::ComboBoxItem::ComboBoxItem(const QString &text,
+VcsBaseEditorParameterWidget::ComboBoxItem::ComboBoxItem(const QString &text,
const QVariant &val) :
displayText(text),
value(val)
{
}
-VCSBaseEditorParameterWidget::VCSBaseEditorParameterWidget(QWidget *parent) :
- QWidget(parent), d(new Internal::VCSBaseEditorParameterWidgetPrivate)
+VcsBaseEditorParameterWidget::VcsBaseEditorParameterWidget(QWidget *parent) :
+ QWidget(parent), d(new Internal::VcsBaseEditorParameterWidgetPrivate)
{
d->m_layout = new QHBoxLayout(this);
d->m_layout->setContentsMargins(3, 0, 3, 0);
@@ -123,22 +123,22 @@ VCSBaseEditorParameterWidget::VCSBaseEditorParameterWidget(QWidget *parent) :
connect(this, SIGNAL(argumentsChanged()), this, SLOT(handleArgumentsChanged()));
}
-VCSBaseEditorParameterWidget::~VCSBaseEditorParameterWidget()
+VcsBaseEditorParameterWidget::~VcsBaseEditorParameterWidget()
{
delete d;
}
-QStringList VCSBaseEditorParameterWidget::baseArguments() const
+QStringList VcsBaseEditorParameterWidget::baseArguments() const
{
return d->m_baseArguments;
}
-void VCSBaseEditorParameterWidget::setBaseArguments(const QStringList &b)
+void VcsBaseEditorParameterWidget::setBaseArguments(const QStringList &b)
{
d->m_baseArguments = b;
}
-QStringList VCSBaseEditorParameterWidget::arguments() const
+QStringList VcsBaseEditorParameterWidget::arguments() const
{
// Compile effective arguments
QStringList args = baseArguments();
@@ -147,7 +147,7 @@ QStringList VCSBaseEditorParameterWidget::arguments() const
return args;
}
-QToolButton *VCSBaseEditorParameterWidget::addToggleButton(const QString &option,
+QToolButton *VcsBaseEditorParameterWidget::addToggleButton(const QString &option,
const QString &label,
const QString &toolTip)
{
@@ -161,7 +161,7 @@ QToolButton *VCSBaseEditorParameterWidget::addToggleButton(const QString &option
return tb;
}
-QComboBox *VCSBaseEditorParameterWidget::addComboBox(const QString &option,
+QComboBox *VcsBaseEditorParameterWidget::addComboBox(const QString &option,
const QList<ComboBoxItem> &items)
{
QComboBox *cb = new QComboBox;
@@ -173,7 +173,7 @@ QComboBox *VCSBaseEditorParameterWidget::addComboBox(const QString &option,
return cb;
}
-void VCSBaseEditorParameterWidget::mapSetting(QToolButton *button, bool *setting)
+void VcsBaseEditorParameterWidget::mapSetting(QToolButton *button, bool *setting)
{
if (!d->m_settingMapping.contains(button) && button) {
d->m_settingMapping.insert(button, Internal::SettingMappingData(setting));
@@ -185,7 +185,7 @@ void VCSBaseEditorParameterWidget::mapSetting(QToolButton *button, bool *setting
}
}
-void VCSBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, QString *setting)
+void VcsBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, QString *setting)
{
if (!d->m_settingMapping.contains(comboBox) && comboBox) {
d->m_settingMapping.insert(comboBox, Internal::SettingMappingData(setting));
@@ -199,7 +199,7 @@ void VCSBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, QString *sett
}
}
-void VCSBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, int *setting)
+void VcsBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, int *setting)
{
if (d->m_settingMapping.contains(comboBox) || !comboBox)
return;
@@ -228,42 +228,42 @@ void VCSBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, int *setting)
QStringList() << "%{option}" << "%{value}"; // eg --file a.out (two distinct arguments)
\endcode
*/
-QStringList VCSBaseEditorParameterWidget::comboBoxOptionTemplate() const
+QStringList VcsBaseEditorParameterWidget::comboBoxOptionTemplate() const
{
return d->m_comboBoxOptionTemplate;
}
-void VCSBaseEditorParameterWidget::setComboBoxOptionTemplate(const QStringList &optTemplate) const
+void VcsBaseEditorParameterWidget::setComboBoxOptionTemplate(const QStringList &optTemplate) const
{
d->m_comboBoxOptionTemplate = optTemplate;
}
-void VCSBaseEditorParameterWidget::executeCommand()
+void VcsBaseEditorParameterWidget::executeCommand()
{
}
-void VCSBaseEditorParameterWidget::handleArgumentsChanged()
+void VcsBaseEditorParameterWidget::handleArgumentsChanged()
{
updateMappedSettings();
executeCommand();
}
-VCSBaseEditorParameterWidget::OptionMapping::OptionMapping() :
+VcsBaseEditorParameterWidget::OptionMapping::OptionMapping() :
widget(0)
{
}
-VCSBaseEditorParameterWidget::OptionMapping::OptionMapping(const QString &optName, QWidget *w) :
+VcsBaseEditorParameterWidget::OptionMapping::OptionMapping(const QString &optName, QWidget *w) :
optionName(optName), widget(w)
{
}
-const QList<VCSBaseEditorParameterWidget::OptionMapping> &VCSBaseEditorParameterWidget::optionMappings() const
+const QList<VcsBaseEditorParameterWidget::OptionMapping> &VcsBaseEditorParameterWidget::optionMappings() const
{
return d->m_optionMappings;
}
-QStringList VCSBaseEditorParameterWidget::argumentsForOption(const OptionMapping &mapping) const
+QStringList VcsBaseEditorParameterWidget::argumentsForOption(const OptionMapping &mapping) const
{
const QToolButton *tb = qobject_cast<const QToolButton *>(mapping.widget);
if (tb && tb->isChecked()) {
@@ -289,7 +289,7 @@ QStringList VCSBaseEditorParameterWidget::argumentsForOption(const OptionMapping
return QStringList();
}
-void VCSBaseEditorParameterWidget::updateMappedSettings()
+void VcsBaseEditorParameterWidget::updateMappedSettings()
{
foreach (const OptionMapping &optMapping, d->m_optionMappings) {
if (d->m_settingMapping.contains(optMapping.widget)) {
@@ -322,4 +322,4 @@ void VCSBaseEditorParameterWidget::updateMappedSettings()
}
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/vcsbaseeditorparameterwidget.h b/src/plugins/vcsbase/vcsbaseeditorparameterwidget.h
index d1682c0070..f3109c0468 100644
--- a/src/plugins/vcsbase/vcsbaseeditorparameterwidget.h
+++ b/src/plugins/vcsbase/vcsbaseeditorparameterwidget.h
@@ -44,18 +44,18 @@ class QComboBox;
class QToolButton;
QT_END_NAMESPACE
-namespace VCSBase {
+namespace VcsBase {
-namespace Internal { class VCSBaseEditorParameterWidgetPrivate; }
+namespace Internal { class VcsBaseEditorParameterWidgetPrivate; }
// Documentation->inside.
-class VCSBASE_EXPORT VCSBaseEditorParameterWidget : public QWidget
+class VCSBASE_EXPORT VcsBaseEditorParameterWidget : public QWidget
{
Q_OBJECT
public:
- explicit VCSBaseEditorParameterWidget(QWidget *parent = 0);
- ~VCSBaseEditorParameterWidget();
+ explicit VcsBaseEditorParameterWidget(QWidget *parent = 0);
+ ~VcsBaseEditorParameterWidget();
struct VCSBASE_EXPORT ComboBoxItem
{
@@ -104,10 +104,10 @@ protected:
void updateMappedSettings();
private:
- friend class Internal::VCSBaseEditorParameterWidgetPrivate;
- Internal::VCSBaseEditorParameterWidgetPrivate *const d;
+ friend class Internal::VcsBaseEditorParameterWidgetPrivate;
+ Internal::VcsBaseEditorParameterWidgetPrivate *const d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSBASE_VCSBASEEDITORPARAMETERWIDGET_H
diff --git a/src/plugins/vcsbase/vcsbaseoptionspage.cpp b/src/plugins/vcsbase/vcsbaseoptionspage.cpp
index 6deee9eb88..d8ab1d31e3 100644
--- a/src/plugins/vcsbase/vcsbaseoptionspage.cpp
+++ b/src/plugins/vcsbase/vcsbaseoptionspage.cpp
@@ -38,31 +38,31 @@
#include <QtGui/QIcon>
/*!
- \class VCSBase::VCSBaseOptionsPage
+ \class VcsBase::VcsBaseOptionsPage
\brief Base class for VCS options pages providing common category/icon.
*/
-namespace VCSBase {
+namespace VcsBase {
-VCSBaseOptionsPage::VCSBaseOptionsPage(QObject *parent) :
+VcsBaseOptionsPage::VcsBaseOptionsPage(QObject *parent) :
Core::IOptionsPage(parent)
{
}
-QString VCSBaseOptionsPage::category() const
+QString VcsBaseOptionsPage::category() const
{
return QLatin1String(Constants::VCS_SETTINGS_CATEGORY);
}
-QString VCSBaseOptionsPage::displayCategory() const
+QString VcsBaseOptionsPage::displayCategory() const
{
- return QCoreApplication::translate("VCSBase", Constants::VCS_SETTINGS_TR_CATEGORY);
+ return QCoreApplication::translate("VcsBase", Constants::VCS_SETTINGS_TR_CATEGORY);
}
-QIcon VCSBaseOptionsPage::categoryIcon() const
+QIcon VcsBaseOptionsPage::categoryIcon() const
{
return QIcon(QLatin1String(Constants::SETTINGS_CATEGORY_VCS_ICON));
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/vcsbaseoptionspage.h b/src/plugins/vcsbase/vcsbaseoptionspage.h
index f1648d005e..4218e84aab 100644
--- a/src/plugins/vcsbase/vcsbaseoptionspage.h
+++ b/src/plugins/vcsbase/vcsbaseoptionspage.h
@@ -37,20 +37,20 @@
#include <coreplugin/dialogs/ioptionspage.h>
-namespace VCSBase {
+namespace VcsBase {
-class VCSBASE_EXPORT VCSBaseOptionsPage : public Core::IOptionsPage
+class VCSBASE_EXPORT VcsBaseOptionsPage : public Core::IOptionsPage
{
Q_OBJECT
public:
- explicit VCSBaseOptionsPage(QObject *parent = 0);
+ explicit VcsBaseOptionsPage(QObject *parent = 0);
QString category() const;
QString displayCategory() const;
QIcon categoryIcon() const;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSBASEOPTIONSPAGE_H
diff --git a/src/plugins/vcsbase/vcsbaseoutputwindow.cpp b/src/plugins/vcsbase/vcsbaseoutputwindow.cpp
index 34a4882380..996fd76446 100644
--- a/src/plugins/vcsbase/vcsbaseoutputwindow.cpp
+++ b/src/plugins/vcsbase/vcsbaseoutputwindow.cpp
@@ -53,7 +53,7 @@
#include <QtCore/QFileInfo>
/*!
- \class VCSBase::VCSBaseOutputWindow
+ \class VcsBase::VcsBaseOutputWindow
\brief Output window for Version Control System command and other output (Singleton).
@@ -67,7 +67,7 @@
showing modified file names, allowing the user to open them.
*/
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
@@ -176,14 +176,14 @@ void OutputWindowPlainTextEdit::contextMenuEvent(QContextMenuEvent *event)
fi = QFileInfo(repository + QLatin1Char('/') + token);
if (fi.isFile()) {
menu->addSeparator();
- openAction = menu->addAction(VCSBaseOutputWindow::tr("Open \"%1\"").
+ openAction = menu->addAction(VcsBaseOutputWindow::tr("Open \"%1\"").
arg(QDir::toNativeSeparators(fi.fileName())));
openAction->setData(fi.absoluteFilePath());
}
}
// Add 'clear'
menu->addSeparator();
- QAction *clearAction = menu->addAction(VCSBaseOutputWindow::tr("Clear"));
+ QAction *clearAction = menu->addAction(VcsBaseOutputWindow::tr("Clear"));
// Run
QAction *action = menu->exec(event->globalPos());
@@ -245,10 +245,10 @@ void OutputWindowPlainTextEdit::appendCommand(const QString &text)
} // namespace Internal
-// ------------------- VCSBaseOutputWindowPrivate
-struct VCSBaseOutputWindowPrivate
+// ------------------- VcsBaseOutputWindowPrivate
+struct VcsBaseOutputWindowPrivate
{
- static VCSBaseOutputWindow *instance;
+ static VcsBaseOutputWindow *instance;
Internal::OutputWindowPlainTextEdit *plainTextEdit();
QPointer<Internal::OutputWindowPlainTextEdit> m_plainTextEdit;
@@ -258,28 +258,28 @@ struct VCSBaseOutputWindowPrivate
// Create log editor on demand. Some errors might be logged
// before CorePlugin::extensionsInitialized() pulls up the windows.
-Internal::OutputWindowPlainTextEdit *VCSBaseOutputWindowPrivate::plainTextEdit()
+Internal::OutputWindowPlainTextEdit *VcsBaseOutputWindowPrivate::plainTextEdit()
{
if (!m_plainTextEdit)
m_plainTextEdit = new Internal::OutputWindowPlainTextEdit();
return m_plainTextEdit;
}
-VCSBaseOutputWindow *VCSBaseOutputWindowPrivate::instance = 0;
+VcsBaseOutputWindow *VcsBaseOutputWindowPrivate::instance = 0;
-VCSBaseOutputWindow::VCSBaseOutputWindow() :
- d(new VCSBaseOutputWindowPrivate)
+VcsBaseOutputWindow::VcsBaseOutputWindow() :
+ d(new VcsBaseOutputWindowPrivate)
{
- VCSBaseOutputWindowPrivate::instance = this;
+ VcsBaseOutputWindowPrivate::instance = this;
}
-VCSBaseOutputWindow::~VCSBaseOutputWindow()
+VcsBaseOutputWindow::~VcsBaseOutputWindow()
{
- VCSBaseOutputWindowPrivate::instance = 0;
+ VcsBaseOutputWindowPrivate::instance = 0;
delete d;
}
-QWidget *VCSBaseOutputWindow::outputWidget(QWidget *parent)
+QWidget *VcsBaseOutputWindow::outputWidget(QWidget *parent)
{
if (d->m_plainTextEdit) {
if (parent != d->m_plainTextEdit->parent())
@@ -290,86 +290,86 @@ QWidget *VCSBaseOutputWindow::outputWidget(QWidget *parent)
return d->m_plainTextEdit;
}
-QWidgetList VCSBaseOutputWindow::toolBarWidgets() const
+QWidgetList VcsBaseOutputWindow::toolBarWidgets() const
{
return QWidgetList();
}
-QString VCSBaseOutputWindow::displayName() const
+QString VcsBaseOutputWindow::displayName() const
{
return tr("Version Control");
}
-int VCSBaseOutputWindow::priorityInStatusBar() const
+int VcsBaseOutputWindow::priorityInStatusBar() const
{
return -1;
}
-void VCSBaseOutputWindow::clearContents()
+void VcsBaseOutputWindow::clearContents()
{
if (d->m_plainTextEdit)
d->m_plainTextEdit->clear();
}
-void VCSBaseOutputWindow::visibilityChanged(bool visible)
+void VcsBaseOutputWindow::visibilityChanged(bool visible)
{
if (visible && d->m_plainTextEdit)
d->m_plainTextEdit->setFocus();
}
-void VCSBaseOutputWindow::setFocus()
+void VcsBaseOutputWindow::setFocus()
{
}
-bool VCSBaseOutputWindow::hasFocus() const
+bool VcsBaseOutputWindow::hasFocus() const
{
return false;
}
-bool VCSBaseOutputWindow::canFocus() const
+bool VcsBaseOutputWindow::canFocus() const
{
return false;
}
-bool VCSBaseOutputWindow::canNavigate() const
+bool VcsBaseOutputWindow::canNavigate() const
{
return false;
}
-bool VCSBaseOutputWindow::canNext() const
+bool VcsBaseOutputWindow::canNext() const
{
return false;
}
-bool VCSBaseOutputWindow::canPrevious() const
+bool VcsBaseOutputWindow::canPrevious() const
{
return false;
}
-void VCSBaseOutputWindow::goToNext()
+void VcsBaseOutputWindow::goToNext()
{
}
-void VCSBaseOutputWindow::goToPrev()
+void VcsBaseOutputWindow::goToPrev()
{
}
-void VCSBaseOutputWindow::setText(const QString &text)
+void VcsBaseOutputWindow::setText(const QString &text)
{
d->plainTextEdit()->setPlainText(text);
}
-void VCSBaseOutputWindow::setData(const QByteArray &data)
+void VcsBaseOutputWindow::setData(const QByteArray &data)
{
setText(QTextCodec::codecForLocale()->toUnicode(data));
}
-void VCSBaseOutputWindow::appendSilently(const QString &text)
+void VcsBaseOutputWindow::appendSilently(const QString &text)
{
d->plainTextEdit()->appendLines(text, d->repository);
}
-void VCSBaseOutputWindow::append(const QString &text)
+void VcsBaseOutputWindow::append(const QString &text)
{
appendSilently(text);
// Pop up without focus
@@ -377,14 +377,14 @@ void VCSBaseOutputWindow::append(const QString &text)
popup(false);
}
-void VCSBaseOutputWindow::appendError(const QString &text)
+void VcsBaseOutputWindow::appendError(const QString &text)
{
d->plainTextEdit()->appendError(text);
if (!d->plainTextEdit()->isVisible())
popup(false); // Pop up without focus
}
-void VCSBaseOutputWindow::appendWarning(const QString &text)
+void VcsBaseOutputWindow::appendWarning(const QString &text)
{
d->plainTextEdit()->appendWarning(text);
if (!d->plainTextEdit()->isVisible())
@@ -414,7 +414,7 @@ static inline QString formatArguments(const QStringList &args)
return rc;
}
-QString VCSBaseOutputWindow::msgExecutionLogEntry(const QString &workingDir,
+QString VcsBaseOutputWindow::msgExecutionLogEntry(const QString &workingDir,
const QString &executable,
const QStringList &arguments)
{
@@ -426,12 +426,12 @@ QString VCSBaseOutputWindow::msgExecutionLogEntry(const QString &workingDir,
arg(QDir::toNativeSeparators(workingDir), nativeExecutable, args);
}
-void VCSBaseOutputWindow::appendCommand(const QString &text)
+void VcsBaseOutputWindow::appendCommand(const QString &text)
{
d->plainTextEdit()->appendCommand(text);
}
-void VCSBaseOutputWindow::appendCommand(const QString &workingDirectory,
+void VcsBaseOutputWindow::appendCommand(const QString &workingDirectory,
const QString &binary,
const QStringList &args)
{
@@ -439,40 +439,40 @@ void VCSBaseOutputWindow::appendCommand(const QString &workingDirectory,
}
-void VCSBaseOutputWindow::appendData(const QByteArray &data)
+void VcsBaseOutputWindow::appendData(const QByteArray &data)
{
appendDataSilently(data);
if (!d->plainTextEdit()->isVisible())
popup(false); // Pop up without focus
}
-void VCSBaseOutputWindow::appendDataSilently(const QByteArray &data)
+void VcsBaseOutputWindow::appendDataSilently(const QByteArray &data)
{
appendSilently(QTextCodec::codecForLocale()->toUnicode(data));
}
-VCSBaseOutputWindow *VCSBaseOutputWindow::instance()
+VcsBaseOutputWindow *VcsBaseOutputWindow::instance()
{
- if (!VCSBaseOutputWindowPrivate::instance) {
- VCSBaseOutputWindow *w = new VCSBaseOutputWindow;
+ if (!VcsBaseOutputWindowPrivate::instance) {
+ VcsBaseOutputWindow *w = new VcsBaseOutputWindow;
Q_UNUSED(w)
}
- return VCSBaseOutputWindowPrivate::instance;
+ return VcsBaseOutputWindowPrivate::instance;
}
-QString VCSBaseOutputWindow::repository() const
+QString VcsBaseOutputWindow::repository() const
{
return d->repository;
}
-void VCSBaseOutputWindow::setRepository(const QString &r)
+void VcsBaseOutputWindow::setRepository(const QString &r)
{
d->repository = r;
}
-void VCSBaseOutputWindow::clearRepository()
+void VcsBaseOutputWindow::clearRepository()
{
d->repository.clear();
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/vcsbaseoutputwindow.h b/src/plugins/vcsbase/vcsbaseoutputwindow.h
index 4d483bc880..5722d99e9b 100644
--- a/src/plugins/vcsbase/vcsbaseoutputwindow.h
+++ b/src/plugins/vcsbase/vcsbaseoutputwindow.h
@@ -37,17 +37,17 @@
#include <coreplugin/ioutputpane.h>
-namespace VCSBase {
+namespace VcsBase {
-struct VCSBaseOutputWindowPrivate;
+struct VcsBaseOutputWindowPrivate;
-class VCSBASE_EXPORT VCSBaseOutputWindow : public Core::IOutputPane
+class VCSBASE_EXPORT VcsBaseOutputWindow : public Core::IOutputPane
{
Q_OBJECT
Q_PROPERTY(QString repository READ repository WRITE setRepository)
public:
- ~VCSBaseOutputWindow();
+ ~VcsBaseOutputWindow();
QWidget *outputWidget(QWidget *parent);
QList<QWidget *> toolBarWidgets() const;
@@ -68,7 +68,7 @@ public:
void goToNext();
void goToPrev();
- static VCSBaseOutputWindow *instance();
+ static VcsBaseOutputWindow *instance();
QString repository() const;
@@ -114,11 +114,11 @@ public slots:
const QStringList &args);
private:
- VCSBaseOutputWindow();
+ VcsBaseOutputWindow();
- VCSBaseOutputWindowPrivate *d;
+ VcsBaseOutputWindowPrivate *d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSBASEOUTPUTWINDOW_H
diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp
index e5bcfcd13e..f7ed1f6a4e 100644
--- a/src/plugins/vcsbase/vcsbaseplugin.cpp
+++ b/src/plugins/vcsbase/vcsbaseplugin.cpp
@@ -69,25 +69,25 @@ using namespace Utils;
enum { debug = 0, debugRepositorySearch = 0, debugExecution = 0 };
/*!
- \namespace VCSBase
- \brief VCSBase plugin namespace
+ \namespace VcsBase
+ \brief VcsBase plugin namespace
*/
/*!
- \namespace VCSBase::Internal
- \brief Internal namespace of the VCSBase plugin
+ \namespace VcsBase::Internal
+ \brief Internal namespace of the VcsBase plugin
\internal
*/
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
/*!
- \struct VCSBase::Internal::State
+ \struct VcsBase::Internal::State
- \brief Internal state created by the state listener and VCSBasePluginState.
+ \brief Internal state created by the state listener and VcsBasePluginState.
- Aggregated in the QSharedData of VCSBase::VCSBasePluginState.
+ Aggregated in the QSharedData of VcsBase::VcsBasePluginState.
*/
struct State
@@ -184,7 +184,7 @@ QDebug operator<<(QDebug in, const State &state)
}
/*!
- \class VCSBase::Internal::StateListener
+ \class VcsBase::Internal::StateListener
\brief Connects to the relevant signals of Qt Creator, tries to find version
controls and emits signals to the plugin instances.
@@ -200,7 +200,7 @@ public:
explicit StateListener(QObject *parent);
signals:
- void stateChanged(const VCSBase::Internal::State &s, Core::IVersionControl *vc);
+ void stateChanged(const VcsBase::Internal::State &s, Core::IVersionControl *vc);
public slots:
void slotStateChanged();
@@ -307,14 +307,14 @@ void StateListener::slotStateChanged()
} // namespace Internal
-class VCSBasePluginStateData : public QSharedData
+class VcsBasePluginStateData : public QSharedData
{
public:
Internal::State m_state;
};
/*!
- \class VCSBase::VCSBasePluginState
+ \class VcsBase::VcsBasePluginState
\brief Relevant state information of the VCS plugins
@@ -325,80 +325,80 @@ public:
\o Current project and it's version system control/top level
\endlist
- \sa VCSBase::VCSBasePlugin
+ \sa VcsBase::VcsBasePlugin
*/
-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::operator=(const VCSBasePluginState &rhs)
+VcsBasePluginState &VcsBasePluginState::operator=(const VcsBasePluginState &rhs)
{
if (this != &rhs)
data.operator=(rhs.data);
return *this;
}
-VCSBasePluginState::~VCSBasePluginState()
+VcsBasePluginState::~VcsBasePluginState()
{
}
-QString VCSBasePluginState::currentFile() const
+QString VcsBasePluginState::currentFile() const
{
return data->m_state.currentFile;
}
-QString VCSBasePluginState::currentFileName() const
+QString VcsBasePluginState::currentFileName() const
{
return data->m_state.currentFileName;
}
-QString VCSBasePluginState::currentFileTopLevel() const
+QString VcsBasePluginState::currentFileTopLevel() const
{
return data->m_state.currentFileTopLevel;
}
-QString VCSBasePluginState::currentFileDirectory() const
+QString VcsBasePluginState::currentFileDirectory() const
{
return data->m_state.currentFileDirectory;
}
-QString VCSBasePluginState::relativeCurrentFile() const
+QString VcsBasePluginState::relativeCurrentFile() const
{
QTC_ASSERT(hasFile(), return QString())
return QDir(data->m_state.currentFileTopLevel).relativeFilePath(data->m_state.currentFile);
}
-QString VCSBasePluginState::currentPatchFile() const
+QString VcsBasePluginState::currentPatchFile() const
{
return data->m_state.currentPatchFile;
}
-QString VCSBasePluginState::currentPatchFileDisplayName() const
+QString VcsBasePluginState::currentPatchFileDisplayName() const
{
return data->m_state.currentPatchFileDisplayName;
}
-QString VCSBasePluginState::currentProjectPath() const
+QString VcsBasePluginState::currentProjectPath() const
{
return data->m_state.currentProjectPath;
}
-QString VCSBasePluginState::currentProjectName() const
+QString VcsBasePluginState::currentProjectName() const
{
return data->m_state.currentProjectName;
}
-QString VCSBasePluginState::currentProjectTopLevel() const
+QString VcsBasePluginState::currentProjectTopLevel() const
{
return data->m_state.currentProjectTopLevel;
}
-QStringList VCSBasePluginState::relativeCurrentProject() const
+QStringList VcsBasePluginState::relativeCurrentProject() const
{
QStringList rc;
QTC_ASSERT(hasProject(), return rc)
@@ -407,64 +407,64 @@ QStringList VCSBasePluginState::relativeCurrentProject() const
return rc;
}
-bool VCSBasePluginState::hasTopLevel() const
+bool VcsBasePluginState::hasTopLevel() const
{
return data->m_state.hasFile() || data->m_state.hasProject();
}
-QString VCSBasePluginState::topLevel() const
+QString VcsBasePluginState::topLevel() const
{
return hasFile() ? data->m_state.currentFileTopLevel : data->m_state.currentProjectTopLevel;
}
-bool VCSBasePluginState::equals(const Internal::State &rhs) const
+bool VcsBasePluginState::equals(const Internal::State &rhs) const
{
return data->m_state.equals(rhs);
}
-bool VCSBasePluginState::equals(const VCSBasePluginState &rhs) const
+bool VcsBasePluginState::equals(const VcsBasePluginState &rhs) const
{
return equals(rhs.data->m_state);
}
-void VCSBasePluginState::clear()
+void VcsBasePluginState::clear()
{
data->m_state.clear();
}
-void VCSBasePluginState::setState(const Internal::State &s)
+void VcsBasePluginState::setState(const Internal::State &s)
{
data->m_state = s;
}
-bool VCSBasePluginState::isEmpty() const
+bool VcsBasePluginState::isEmpty() const
{
return data->m_state.isEmpty();
}
-bool VCSBasePluginState::hasFile() const
+bool VcsBasePluginState::hasFile() const
{
return data->m_state.hasFile();
}
-bool VCSBasePluginState::hasPatchFile() const
+bool VcsBasePluginState::hasPatchFile() const
{
return !data->m_state.currentPatchFile.isEmpty();
}
-bool VCSBasePluginState::hasProject() const
+bool VcsBasePluginState::hasProject() const
{
return data->m_state.hasProject();
}
-VCSBASE_EXPORT QDebug operator<<(QDebug in, const VCSBasePluginState &state)
+VCSBASE_EXPORT QDebug operator<<(QDebug in, const VcsBasePluginState &state)
{
in << state.data->m_state;
return in;
}
/*!
- \class VCSBase::VCSBasePlugin
+ \class VcsBase::VcsBasePlugin
\brief Base class for all version control plugins.
@@ -491,15 +491,15 @@ VCSBASE_EXPORT QDebug operator<<(QDebug in, const VCSBasePluginState &state)
the virtual submitEditorAboutToClose() to trigger the submit process.
*/
-struct VCSBasePluginPrivate
+struct VcsBasePluginPrivate
{
- explicit VCSBasePluginPrivate(const QString &submitEditorId);
+ explicit VcsBasePluginPrivate(const QString &submitEditorId);
inline bool supportsRepositoryCreation() const;
const Core::Id m_submitEditorId;
Core::IVersionControl *m_versionControl;
- VCSBasePluginState m_state;
+ VcsBasePluginState m_state;
int m_actionState;
QAction *m_testSnapshotAction;
QAction *m_testListSnapshotsAction;
@@ -510,7 +510,7 @@ struct VCSBasePluginPrivate
static Internal::StateListener *m_listener;
};
-VCSBasePluginPrivate::VCSBasePluginPrivate(const QString &submitEditorId) :
+VcsBasePluginPrivate::VcsBasePluginPrivate(const QString &submitEditorId) :
m_submitEditorId(submitEditorId),
m_versionControl(0),
m_actionState(-1),
@@ -521,47 +521,47 @@ VCSBasePluginPrivate::VCSBasePluginPrivate(const QString &submitEditorId) :
{
}
-bool VCSBasePluginPrivate::supportsRepositoryCreation() const
+bool VcsBasePluginPrivate::supportsRepositoryCreation() const
{
return m_versionControl && m_versionControl->supportsOperation(Core::IVersionControl::CreateRepositoryOperation);
}
-Internal::StateListener *VCSBasePluginPrivate::m_listener = 0;
+Internal::StateListener *VcsBasePluginPrivate::m_listener = 0;
-VCSBasePlugin::VCSBasePlugin(const QString &submitEditorId) :
- d(new VCSBasePluginPrivate(submitEditorId))
+VcsBasePlugin::VcsBasePlugin(const QString &submitEditorId) :
+ d(new VcsBasePluginPrivate(submitEditorId))
{
}
-VCSBasePlugin::~VCSBasePlugin()
+VcsBasePlugin::~VcsBasePlugin()
{
delete d;
}
-void VCSBasePlugin::initializeVcs(Core::IVersionControl *vc)
+void VcsBasePlugin::initializeVcs(Core::IVersionControl *vc)
{
d->m_versionControl = vc;
addAutoReleasedObject(vc);
- Internal::VCSPlugin *plugin = Internal::VCSPlugin::instance();
- connect(plugin->coreListener(), SIGNAL(submitEditorAboutToClose(VCSBaseSubmitEditor*,bool*)),
- this, SLOT(slotSubmitEditorAboutToClose(VCSBaseSubmitEditor*,bool*)));
+ Internal::VcsPlugin *plugin = Internal::VcsPlugin::instance();
+ connect(plugin->coreListener(), SIGNAL(submitEditorAboutToClose(VcsBaseSubmitEditor*,bool*)),
+ this, SLOT(slotSubmitEditorAboutToClose(VcsBaseSubmitEditor*,bool*)));
// First time: create new listener
- if (!VCSBasePluginPrivate::m_listener)
- VCSBasePluginPrivate::m_listener = new Internal::StateListener(plugin);
- connect(VCSBasePluginPrivate::m_listener,
- SIGNAL(stateChanged(VCSBase::Internal::State, Core::IVersionControl*)),
+ if (!VcsBasePluginPrivate::m_listener)
+ VcsBasePluginPrivate::m_listener = new Internal::StateListener(plugin);
+ connect(VcsBasePluginPrivate::m_listener,
+ SIGNAL(stateChanged(VcsBase::Internal::State, Core::IVersionControl*)),
this,
- SLOT(slotStateChanged(VCSBase::Internal::State,Core::IVersionControl*)));
+ SLOT(slotStateChanged(VcsBase::Internal::State,Core::IVersionControl*)));
}
-void VCSBasePlugin::extensionsInitialized()
+void VcsBasePlugin::extensionsInitialized()
{
// Initialize enable menus.
- VCSBasePluginPrivate::m_listener->slotStateChanged();
+ VcsBasePluginPrivate::m_listener->slotStateChanged();
}
-void VCSBasePlugin::slotSubmitEditorAboutToClose(VCSBaseSubmitEditor *submitEditor, bool *result)
+void VcsBasePlugin::slotSubmitEditorAboutToClose(VcsBaseSubmitEditor *submitEditor, bool *result)
{
if (debug)
qDebug() << this << d->m_submitEditorId.name() << "Closing submit editor" << submitEditor << submitEditor->id().name();
@@ -569,51 +569,51 @@ void VCSBasePlugin::slotSubmitEditorAboutToClose(VCSBaseSubmitEditor *submitEdit
*result = submitEditorAboutToClose(submitEditor);
}
-Core::IVersionControl *VCSBasePlugin::versionControl() const
+Core::IVersionControl *VcsBasePlugin::versionControl() const
{
return d->m_versionControl;
}
-void VCSBasePlugin::slotStateChanged(const VCSBase::Internal::State &newInternalState, Core::IVersionControl *vc)
+void VcsBasePlugin::slotStateChanged(const VcsBase::Internal::State &newInternalState, Core::IVersionControl *vc)
{
if (vc == d->m_versionControl) {
// We are directly affected: Change state
if (!d->m_state.equals(newInternalState)) {
d->m_state.setState(newInternalState);
- updateActions(VCSEnabled);
+ updateActions(VcsEnabled);
}
} else {
// Some other VCS plugin or state changed: Reset us to empty state.
- const ActionState newActionState = vc ? OtherVCSEnabled : NoVCSEnabled;
+ const ActionState newActionState = vc ? OtherVcsEnabled : NoVcsEnabled;
if (d->m_actionState != newActionState || !d->m_state.isEmpty()) {
d->m_actionState = newActionState;
- const VCSBasePluginState emptyState;
+ const VcsBasePluginState emptyState;
d->m_state = emptyState;
updateActions(newActionState);
}
}
}
-const VCSBasePluginState &VCSBasePlugin::currentState() const
+const VcsBasePluginState &VcsBasePlugin::currentState() const
{
return d->m_state;
}
-bool VCSBasePlugin::enableMenuAction(ActionState as, QAction *menuAction) const
+bool VcsBasePlugin::enableMenuAction(ActionState as, QAction *menuAction) const
{
if (debug)
qDebug() << "enableMenuAction" << menuAction->text() << as;
switch (as) {
- case VCSBase::VCSBasePlugin::NoVCSEnabled: {
+ case VcsBase::VcsBasePlugin::NoVcsEnabled: {
const bool supportsCreation = d->supportsRepositoryCreation();
menuAction->setVisible(supportsCreation);
menuAction->setEnabled(supportsCreation);
return supportsCreation;
}
- case VCSBase::VCSBasePlugin::OtherVCSEnabled:
+ case VcsBase::VcsBasePlugin::OtherVcsEnabled:
menuAction->setVisible(false);
return false;
- case VCSBase::VCSBasePlugin::VCSEnabled:
+ case VcsBase::VcsBasePlugin::VcsEnabled:
menuAction->setVisible(true);
menuAction->setEnabled(true);
break;
@@ -621,9 +621,9 @@ bool VCSBasePlugin::enableMenuAction(ActionState as, QAction *menuAction) const
return true;
}
-void VCSBasePlugin::promptToDeleteCurrentFile()
+void VcsBasePlugin::promptToDeleteCurrentFile()
{
- const VCSBasePluginState state = currentState();
+ const VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasFile(), return)
const bool rc = Core::ICore::instance()->vcsManager()->promptToDelete(versionControl(), state.currentFile());
if (!rc)
@@ -640,7 +640,7 @@ static inline bool ask(QWidget *parent, const QString &title, const QString &que
return QMessageBox::question(parent, title, question, QMessageBox::Yes|QMessageBox::No, defaultButton) == QMessageBox::Yes;
}
-void VCSBasePlugin::createRepository()
+void VcsBasePlugin::createRepository()
{
QTC_ASSERT(d->m_versionControl->supportsOperation(Core::IVersionControl::CreateRepositoryOperation), return);
// Find current starting directory
@@ -677,7 +677,7 @@ void VCSBasePlugin::createRepository()
}
// For internal tests: Create actions driving IVersionControl's snapshot interface.
-QList<QAction*> VCSBasePlugin::createSnapShotTestActions()
+QList<QAction*> VcsBasePlugin::createSnapShotTestActions()
{
if (!d->m_testSnapshotAction) {
d->m_testSnapshotAction = new QAction(QLatin1String("Take snapshot"), this);
@@ -695,40 +695,40 @@ QList<QAction*> VCSBasePlugin::createSnapShotTestActions()
return rc;
}
-void VCSBasePlugin::slotTestSnapshot()
+void VcsBasePlugin::slotTestSnapshot()
{
QTC_ASSERT(currentState().hasTopLevel(), return)
d->m_testLastSnapshot = versionControl()->vcsCreateSnapshot(currentState().topLevel());
qDebug() << "Snapshot " << d->m_testLastSnapshot;
- VCSBaseOutputWindow::instance()->append(QLatin1String("Snapshot: ") + d->m_testLastSnapshot);
+ VcsBaseOutputWindow::instance()->append(QLatin1String("Snapshot: ") + d->m_testLastSnapshot);
if (!d->m_testLastSnapshot.isEmpty())
d->m_testRestoreSnapshotAction->setText(QLatin1String("Restore snapshot ") + d->m_testLastSnapshot);
}
-void VCSBasePlugin::slotTestListSnapshots()
+void VcsBasePlugin::slotTestListSnapshots()
{
QTC_ASSERT(currentState().hasTopLevel(), return)
const QStringList snapshots = versionControl()->vcsSnapshots(currentState().topLevel());
qDebug() << "Snapshots " << snapshots;
- VCSBaseOutputWindow::instance()->append(QLatin1String("Snapshots: ") + snapshots.join(QLatin1String(", ")));
+ VcsBaseOutputWindow::instance()->append(QLatin1String("Snapshots: ") + snapshots.join(QLatin1String(", ")));
}
-void VCSBasePlugin::slotTestRestoreSnapshot()
+void VcsBasePlugin::slotTestRestoreSnapshot()
{
QTC_ASSERT(currentState().hasTopLevel() && !d->m_testLastSnapshot.isEmpty(), return)
const bool ok = versionControl()->vcsRestoreSnapshot(currentState().topLevel(), d->m_testLastSnapshot);
const QString msg = d->m_testLastSnapshot+ (ok ? QLatin1String(" restored") : QLatin1String(" failed"));
qDebug() << msg;
- VCSBaseOutputWindow::instance()->append(msg);
+ VcsBaseOutputWindow::instance()->append(msg);
}
-void VCSBasePlugin::slotTestRemoveSnapshot()
+void VcsBasePlugin::slotTestRemoveSnapshot()
{
QTC_ASSERT(currentState().hasTopLevel() && !d->m_testLastSnapshot.isEmpty(), return)
const bool ok = versionControl()->vcsRemoveSnapshot(currentState().topLevel(), d->m_testLastSnapshot);
const QString msg = d->m_testLastSnapshot+ (ok ? QLatin1String(" removed") : QLatin1String(" failed"));
qDebug() << msg;
- VCSBaseOutputWindow::instance()->append(msg);
+ VcsBaseOutputWindow::instance()->append(msg);
d->m_testLastSnapshot.clear();
}
@@ -739,11 +739,11 @@ void VCSBasePlugin::slotTestRemoveSnapshot()
// AutoFS is used (due its automatically creating mountpoints when querying
// a directory). In addition, bail out when reaching the home directory
// of the user or root (generally avoid '/', where mountpoints are created).
-QString VCSBasePlugin::findRepositoryForDirectory(const QString &dirS,
+QString VcsBasePlugin::findRepositoryForDirectory(const QString &dirS,
const QString &checkFile)
{
if (debugRepositorySearch)
- qDebug() << ">VCSBasePlugin::findRepositoryForDirectory" << dirS << checkFile;
+ qDebug() << ">VcsBasePlugin::findRepositoryForDirectory" << dirS << checkFile;
QTC_ASSERT(!dirS.isEmpty() && !checkFile.isEmpty(), return QString());
const QString root = QDir::rootPath();
@@ -757,27 +757,27 @@ QString VCSBasePlugin::findRepositoryForDirectory(const QString &dirS,
if (QFileInfo(directory, checkFile).isFile()) {
if (debugRepositorySearch)
- qDebug() << "<VCSBasePlugin::findRepositoryForDirectory> " << absDirPath;
+ qDebug() << "<VcsBasePlugin::findRepositoryForDirectory> " << absDirPath;
return absDirPath;
}
} while (directory.cdUp());
if (debugRepositorySearch)
- qDebug() << "<VCSBasePlugin::findRepositoryForDirectory bailing out at " << directory.absolutePath();
+ qDebug() << "<VcsBasePlugin::findRepositoryForDirectory bailing out at " << directory.absolutePath();
return QString();
}
// Is SSH prompt configured?
static inline QString sshPrompt()
{
- return VCSBase::Internal::VCSPlugin::instance()->settings().sshPasswordPrompt;
+ return VcsBase::Internal::VcsPlugin::instance()->settings().sshPasswordPrompt;
}
-bool VCSBasePlugin::isSshPromptConfigured()
+bool VcsBasePlugin::isSshPromptConfigured()
{
return !sshPrompt().isEmpty();
}
-void VCSBasePlugin::setProcessEnvironment(QProcessEnvironment *e, bool forceCLocale)
+void VcsBasePlugin::setProcessEnvironment(QProcessEnvironment *e, bool forceCLocale)
{
if (forceCLocale)
e->insert(QLatin1String("LANG"), QString(QLatin1Char('C')));
@@ -787,7 +787,7 @@ void VCSBasePlugin::setProcessEnvironment(QProcessEnvironment *e, bool forceCLoc
}
// Run a process fully synchronously, returning Utils::SynchronousProcessResponse
-// response struct and using the VCSBasePlugin flags as applicable
+// response struct and using the VcsBasePlugin flags as applicable
static SynchronousProcessResponse runVcsFullySynchronously(const QString &workingDir,
const QString &binary,
const QStringList &arguments,
@@ -796,17 +796,17 @@ static SynchronousProcessResponse runVcsFullySynchronously(const QString &workin
unsigned flags,
QTextCodec *outputCodec = 0)
{
- VCSBase::VCSBaseOutputWindow *outputWindow = VCSBase::VCSBaseOutputWindow::instance();
+ VcsBase::VcsBaseOutputWindow *outputWindow = VcsBase::VcsBaseOutputWindow::instance();
// Set up process
unsigned processFlags = 0;
- if (VCSBasePlugin::isSshPromptConfigured() && (flags & VCSBasePlugin::SshPasswordPrompt))
+ if (VcsBasePlugin::isSshPromptConfigured() && (flags & VcsBasePlugin::SshPasswordPrompt))
processFlags |= SynchronousProcess::UnixTerminalDisabled;
QSharedPointer<QProcess> process = SynchronousProcess::createProcess(processFlags);
if (!workingDir.isEmpty())
process->setWorkingDirectory(workingDir);
process->setProcessEnvironment(env);
- if (flags & VCSBasePlugin::MergeOutputChannels)
+ if (flags & VcsBasePlugin::MergeOutputChannels)
process->setProcessChannelMode(QProcess::MergedChannels);
// Start
@@ -827,14 +827,14 @@ static SynchronousProcessResponse runVcsFullySynchronously(const QString &workin
if (!stdErr.isEmpty()) {
response.stdErr = QString::fromLocal8Bit(stdErr).remove('\r');
- if (!(flags & VCSBasePlugin::SuppressStdErrInLogWindow))
+ if (!(flags & VcsBasePlugin::SuppressStdErrInLogWindow))
outputWindow->append(response.stdErr);
}
if (!stdOut.isEmpty()) {
response.stdOut = (outputCodec ? outputCodec->toUnicode(stdOut) : QString::fromLocal8Bit(stdOut))
.remove('\r');
- if (flags & VCSBasePlugin::ShowStdOutInLogWindow)
+ if (flags & VcsBasePlugin::ShowStdOutInLogWindow)
outputWindow->append(response.stdOut);
}
@@ -852,7 +852,7 @@ static SynchronousProcessResponse runVcsFullySynchronously(const QString &workin
}
-SynchronousProcessResponse VCSBasePlugin::runVCS(const QString &workingDir,
+SynchronousProcessResponse VcsBasePlugin::runVcs(const QString &workingDir,
const QString &binary,
const QStringList &arguments,
int timeOutMS,
@@ -860,11 +860,11 @@ SynchronousProcessResponse VCSBasePlugin::runVCS(const QString &workingDir,
QTextCodec *outputCodec)
{
const QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
- return runVCS(workingDir, binary, arguments, timeOutMS, env,
+ return runVcs(workingDir, binary, arguments, timeOutMS, env,
flags, outputCodec);
}
-SynchronousProcessResponse VCSBasePlugin::runVCS(const QString &workingDir,
+SynchronousProcessResponse VcsBasePlugin::runVcs(const QString &workingDir,
const QString &binary,
const QStringList &arguments,
int timeOutMS,
@@ -872,15 +872,15 @@ SynchronousProcessResponse VCSBasePlugin::runVCS(const QString &workingDir,
unsigned flags,
QTextCodec *outputCodec)
{
- VCSBase::VCSBaseOutputWindow *outputWindow = VCSBase::VCSBaseOutputWindow::instance();
+ VcsBase::VcsBaseOutputWindow *outputWindow = VcsBase::VcsBaseOutputWindow::instance();
if (!(flags & SuppressCommandLogging))
outputWindow->appendCommand(workingDir, binary, arguments);
- const bool sshPromptConfigured = VCSBasePlugin::isSshPromptConfigured();
+ const bool sshPromptConfigured = VcsBasePlugin::isSshPromptConfigured();
if (debugExecution) {
QDebug nsp = qDebug().nospace();
- nsp << "VCSBasePlugin::runVCS" << workingDir << binary << arguments
+ nsp << "VcsBasePlugin::runVcs" << workingDir << binary << arguments
<< timeOutMS;
if (flags & ShowStdOutInLogWindow)
nsp << "stdout";
@@ -902,7 +902,7 @@ SynchronousProcessResponse VCSBasePlugin::runVCS(const QString &workingDir,
nsp << " Codec: " << outputCodec->name();
}
- VCSBase::VCSBasePlugin::setProcessEnvironment(&env, (flags & ForceCLocale));
+ VcsBase::VcsBasePlugin::setProcessEnvironment(&env, (flags & ForceCLocale));
SynchronousProcessResponse response;
@@ -958,7 +958,7 @@ SynchronousProcessResponse VCSBasePlugin::runVCS(const QString &workingDir,
return response;
}
-bool VCSBasePlugin::runFullySynchronous(const QString &workingDirectory,
+bool VcsBasePlugin::runFullySynchronous(const QString &workingDirectory,
const QString &binary,
const QStringList &arguments,
const QProcessEnvironment &env,
@@ -967,7 +967,7 @@ bool VCSBasePlugin::runFullySynchronous(const QString &workingDirectory,
int timeoutMS,
bool logCommandToWindow)
{
- VCSBase::VCSBaseOutputWindow *outputWindow = VCSBase::VCSBaseOutputWindow::instance();
+ VcsBase::VcsBaseOutputWindow *outputWindow = VcsBase::VcsBaseOutputWindow::instance();
if (logCommandToWindow)
outputWindow->appendCommand(workingDirectory, binary, arguments);
@@ -997,11 +997,11 @@ bool VCSBasePlugin::runFullySynchronous(const QString &workingDirectory,
return process.exitStatus() == QProcess::NormalExit && process.exitCode() == 0;
}
-bool VCSBasePlugin::runPatch(const QByteArray &input, const QString &workingDirectory,
+bool VcsBasePlugin::runPatch(const QByteArray &input, const QString &workingDirectory,
int strip, bool reverse)
{
- VCSBaseOutputWindow *ow = VCSBaseOutputWindow::instance();
- const QString patch = Internal::VCSPlugin::instance()->settings().patchCommand;
+ VcsBaseOutputWindow *ow = VcsBaseOutputWindow::instance();
+ const QString patch = Internal::VcsPlugin::instance()->settings().patchCommand;
if (patch.isEmpty()) {
ow->appendError(tr("There is no patch-command configured in the common 'Version Control' settings."));
return false;
@@ -1045,6 +1045,6 @@ bool VCSBasePlugin::runPatch(const QByteArray &input, const QString &workingDire
return true;
}
-} // namespace VCSBase
+} // namespace VcsBase
#include "vcsbaseplugin.moc"
diff --git a/src/plugins/vcsbase/vcsbaseplugin.h b/src/plugins/vcsbase/vcsbaseplugin.h
index 5c163ffd8c..34c56d89f7 100644
--- a/src/plugins/vcsbase/vcsbaseplugin.h
+++ b/src/plugins/vcsbase/vcsbaseplugin.h
@@ -50,23 +50,23 @@ namespace Utils { struct SynchronousProcessResponse; }
namespace Core { class IVersionControl; }
-namespace VCSBase {
+namespace VcsBase {
namespace Internal { struct State; }
-class VCSBaseSubmitEditor;
-struct VCSBasePluginPrivate;
-class VCSBasePluginStateData;
-class VCSBasePlugin;
+class VcsBaseSubmitEditor;
+struct VcsBasePluginPrivate;
+class VcsBasePluginStateData;
+class VcsBasePlugin;
// Documentation inside.
-class VCSBASE_EXPORT VCSBasePluginState
+class VCSBASE_EXPORT VcsBasePluginState
{
public:
- VCSBasePluginState();
- VCSBasePluginState(const VCSBasePluginState &);
- VCSBasePluginState &operator=(const VCSBasePluginState &);
- ~VCSBasePluginState();
+ VcsBasePluginState();
+ VcsBasePluginState(const VcsBasePluginState &);
+ VcsBasePluginState &operator=(const VcsBasePluginState &);
+ ~VcsBasePluginState();
void clear();
@@ -102,39 +102,39 @@ public:
// the file one.
QString topLevel() const;
- bool equals(const VCSBasePluginState &rhs) const;
+ bool equals(const VcsBasePluginState &rhs) const;
- friend VCSBASE_EXPORT QDebug operator<<(QDebug in, const VCSBasePluginState &state);
+ friend VCSBASE_EXPORT QDebug operator<<(QDebug in, const VcsBasePluginState &state);
private:
- friend class VCSBasePlugin;
+ friend class VcsBasePlugin;
bool equals(const Internal::State &s) const;
void setState(const Internal::State &s);
- QSharedDataPointer<VCSBasePluginStateData> data;
+ QSharedDataPointer<VcsBasePluginStateData> data;
};
-VCSBASE_EXPORT QDebug operator<<(QDebug in, const VCSBasePluginState &state);
+VCSBASE_EXPORT QDebug operator<<(QDebug in, const VcsBasePluginState &state);
-inline bool operator==(const VCSBasePluginState &s1, const VCSBasePluginState &s2)
+inline bool operator==(const VcsBasePluginState &s1, const VcsBasePluginState &s2)
{ return s1.equals(s2); }
-inline bool operator!=(const VCSBasePluginState &s1, const VCSBasePluginState &s2)
+inline bool operator!=(const VcsBasePluginState &s1, const VcsBasePluginState &s2)
{ return !s1.equals(s2); }
-class VCSBASE_EXPORT VCSBasePlugin : public ExtensionSystem::IPlugin
+class VCSBASE_EXPORT VcsBasePlugin : public ExtensionSystem::IPlugin
{
Q_OBJECT
protected:
- explicit VCSBasePlugin(const QString &submitEditorId);
+ explicit VcsBasePlugin(const QString &submitEditorId);
void initializeVcs(Core::IVersionControl *vc);
virtual void extensionsInitialized();
public:
- virtual ~VCSBasePlugin();
+ virtual ~VcsBasePlugin();
- const VCSBasePluginState &currentState() const;
+ const VcsBasePluginState &currentState() const;
Core::IVersionControl *versionControl() const;
// For internal tests: Create actions driving IVersionControl's snapshot interface.
@@ -155,7 +155,7 @@ public:
static bool isSshPromptConfigured();
// Convenience to synchronously run VCS commands
- enum RunVCSFlags {
+ enum RunVcsFlags {
ShowStdOutInLogWindow = 0x1, // Append standard output to VCS output window.
MergeOutputChannels = 0x2, // see QProcess: Merge stderr/stdout.
SshPasswordPrompt = 0x4, // Disable terminal on UNIX to force graphical prompt.
@@ -168,7 +168,7 @@ public:
// triggered by file watchers).
};
- static Utils::SynchronousProcessResponse runVCS(const QString &workingDir,
+ static Utils::SynchronousProcessResponse runVcs(const QString &workingDir,
const QString &binary,
const QStringList &arguments,
int timeOutMS,
@@ -176,7 +176,7 @@ public:
unsigned flags = 0,
QTextCodec *outputCodec = 0);
- static Utils::SynchronousProcessResponse runVCS(const QString &workingDir,
+ static Utils::SynchronousProcessResponse runVcs(const QString &workingDir,
const QString &binary,
const QStringList &arguments,
int timeOutMS,
@@ -197,39 +197,39 @@ public:
public slots:
// Convenience slot for "Delete current file" action. Prompts to
- // delete the file via VCSManager.
+ // delete the file via VcsManager.
void promptToDeleteCurrentFile();
// Prompt to initialize version control in a directory, initially
// pointing to the current project.
void createRepository();
protected:
- enum ActionState { NoVCSEnabled, OtherVCSEnabled, VCSEnabled };
+ enum ActionState { NoVcsEnabled, OtherVcsEnabled, VcsEnabled };
// Implement to enable the plugin menu actions according to state.
virtual void updateActions(ActionState as) = 0;
// Implement to start the submit process.
- virtual bool submitEditorAboutToClose(VCSBaseSubmitEditor *submitEditor) = 0;
+ virtual bool submitEditorAboutToClose(VcsBaseSubmitEditor *submitEditor) = 0;
// A helper to enable the VCS menu action according to state:
- // NoVCSEnabled -> visible, enabled if repository creation is supported
- // OtherVCSEnabled -> invisible
+ // NoVcsEnabled -> visible, enabled if repository creation is supported
+ // OtherVcsEnabled -> invisible
// Else: -> fully enabled.
// Returns whether actions should be set up further.
bool enableMenuAction(ActionState as, QAction *in) const;
private slots:
- void slotSubmitEditorAboutToClose(VCSBaseSubmitEditor *submitEditor, bool *result);
- void slotStateChanged(const VCSBase::Internal::State &s, Core::IVersionControl *vc);
+ void slotSubmitEditorAboutToClose(VcsBaseSubmitEditor *submitEditor, bool *result);
+ void slotStateChanged(const VcsBase::Internal::State &s, Core::IVersionControl *vc);
void slotTestSnapshot();
void slotTestListSnapshots();
void slotTestRestoreSnapshot();
void slotTestRemoveSnapshot();
private:
- VCSBasePluginPrivate *d;
+ VcsBasePluginPrivate *d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSBASEPLUGIN_H
diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp
index 07e6645e63..6976057ad7 100644
--- a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp
+++ b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp
@@ -115,13 +115,13 @@ static const char *belongingClassName(const CPlusPlus::Function *function)
}
/*!
- \struct VCSBase::VCSBaseSubmitEditorParameters
+ \struct VcsBase::VcsBaseSubmitEditorParameters
- \brief Utility struct to parametrize a VCSBaseSubmitEditor.
+ \brief Utility struct to parametrize a VcsBaseSubmitEditor.
*/
/*!
- \class VCSBase::VCSBaseSubmitEditor
+ \class VcsBase::VcsBaseSubmitEditor
\brief Base class for a submit editor based on the Utils::SubmitEditorWidget.
@@ -148,25 +148,25 @@ static const char *belongingClassName(const CPlusPlus::Function *function)
current editor in the editor manager.
*/
-namespace VCSBase {
+namespace VcsBase {
using namespace Internal;
using namespace Utils;
static inline QString submitMessageCheckScript()
{
- return VCSPlugin::instance()->settings().submitMessageCheckScript;
+ return VcsPlugin::instance()->settings().submitMessageCheckScript;
}
-struct VCSBaseSubmitEditorPrivate
+struct VcsBaseSubmitEditorPrivate
{
- VCSBaseSubmitEditorPrivate(const VCSBaseSubmitEditorParameters *parameters,
+ VcsBaseSubmitEditorPrivate(const VcsBaseSubmitEditorParameters *parameters,
SubmitEditorWidget *editorWidget,
QObject *q);
SubmitEditorWidget *m_widget;
QToolBar *m_toolWidget;
- const VCSBaseSubmitEditorParameters *m_parameters;
+ const VcsBaseSubmitEditorParameters *m_parameters;
QString m_displayName;
QString m_checkScriptWorkingDirectory;
SubmitEditorFile *m_file;
@@ -177,7 +177,7 @@ struct VCSBaseSubmitEditorPrivate
NickNameDialog *m_nickNameDialog;
};
-VCSBaseSubmitEditorPrivate::VCSBaseSubmitEditorPrivate(const VCSBaseSubmitEditorParameters *parameters,
+VcsBaseSubmitEditorPrivate::VcsBaseSubmitEditorPrivate(const VcsBaseSubmitEditorParameters *parameters,
SubmitEditorWidget *editorWidget,
QObject *q) :
m_widget(editorWidget),
@@ -193,9 +193,9 @@ VCSBaseSubmitEditorPrivate::VCSBaseSubmitEditorPrivate(const VCSBaseSubmitEditor
m_widget->descriptionEdit()->setCompletionLengthThreshold(4);
}
-VCSBaseSubmitEditor::VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *parameters,
+VcsBaseSubmitEditor::VcsBaseSubmitEditor(const VcsBaseSubmitEditorParameters *parameters,
SubmitEditorWidget *editorWidget) :
- d(new VCSBaseSubmitEditorPrivate(parameters, editorWidget, this))
+ d(new VcsBaseSubmitEditorPrivate(parameters, editorWidget, this))
{
setContext(Core::Context(parameters->context));
setWidget(d->m_widget);
@@ -212,10 +212,10 @@ VCSBaseSubmitEditor::VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *pa
connect(d->m_file, SIGNAL(saveMe(QString*,QString,bool)),
this, SLOT(save(QString*,QString,bool)));
- connect(d->m_widget, SIGNAL(diffSelected(QStringList)), this, SLOT(slotDiffSelectedVCSFiles(QStringList)));
+ connect(d->m_widget, SIGNAL(diffSelected(QStringList)), this, SLOT(slotDiffSelectedVcsFiles(QStringList)));
connect(d->m_widget->descriptionEdit(), SIGNAL(textChanged()), this, SLOT(slotDescriptionChanged()));
- const CommonVcsSettings settings = VCSPlugin::instance()->settings();
+ const CommonVcsSettings settings = VcsPlugin::instance()->settings();
// Add additional context menu settings
if (!settings.submitMessageCheckScript.isEmpty() || !settings.nickNameMailMap.isEmpty()) {
QAction *sep = new QAction(this);
@@ -240,23 +240,23 @@ VCSBaseSubmitEditor::VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *pa
// wrapping. etc
slotUpdateEditorSettings(settings);
- connect(VCSPlugin::instance(),
- SIGNAL(settingsChanged(VCSBase::Internal::CommonVcsSettings)),
- this, SLOT(slotUpdateEditorSettings(VCSBase::Internal::CommonVcsSettings)));
+ connect(VcsPlugin::instance(),
+ SIGNAL(settingsChanged(VcsBase::Internal::CommonVcsSettings)),
+ this, SLOT(slotUpdateEditorSettings(VcsBase::Internal::CommonVcsSettings)));
Aggregation::Aggregate *aggregate = new Aggregation::Aggregate;
aggregate->add(new Find::BaseTextFind(d->m_widget->descriptionEdit()));
aggregate->add(this);
}
-VCSBaseSubmitEditor::~VCSBaseSubmitEditor()
+VcsBaseSubmitEditor::~VcsBaseSubmitEditor()
{
delete d->m_toolWidget;
delete d->m_widget;
delete d;
}
-void VCSBaseSubmitEditor::slotUpdateEditorSettings(const CommonVcsSettings &s)
+void VcsBaseSubmitEditor::slotUpdateEditorSettings(const CommonVcsSettings &s)
{
setLineWrapWidth(s.lineWrapWidth);
setLineWrap(s.lineWrap);
@@ -275,7 +275,7 @@ static inline QStringList fieldTexts(const QString &fileContents)
return rc;
}
-void VCSBaseSubmitEditor::createUserFields(const QString &fieldConfigFile)
+void VcsBaseSubmitEditor::createUserFields(const QString &fieldConfigFile)
{
Utils::FileReader reader;
if (!reader.fetch(fieldConfigFile, QIODevice::Text, Core::ICore::instance()->mainWindow()))
@@ -285,7 +285,7 @@ void VCSBaseSubmitEditor::createUserFields(const QString &fieldConfigFile)
if (fields.empty())
return;
// Create a completer on user names
- const QStandardItemModel *nickNameModel = VCSPlugin::instance()->nickNameModel();
+ const QStandardItemModel *nickNameModel = VcsPlugin::instance()->nickNameModel();
QCompleter *completer = new QCompleter(NickNameDialog::nickNameList(nickNameModel), this);
SubmitFieldWidget *fieldWidget = new SubmitFieldWidget;
@@ -298,7 +298,7 @@ void VCSBaseSubmitEditor::createUserFields(const QString &fieldConfigFile)
d->m_widget->addSubmitFieldWidget(fieldWidget);
}
-void VCSBaseSubmitEditor::registerActions(QAction *editorUndoAction, QAction *editorRedoAction,
+void VcsBaseSubmitEditor::registerActions(QAction *editorUndoAction, QAction *editorRedoAction,
QAction *submitAction, QAction *diffAction)
{
d->m_widget->registerActions(editorUndoAction, editorRedoAction, submitAction, diffAction);
@@ -306,74 +306,74 @@ void VCSBaseSubmitEditor::registerActions(QAction *editorUndoAction, QAction *ed
d->m_submitAction = submitAction;
}
-void VCSBaseSubmitEditor::unregisterActions(QAction *editorUndoAction, QAction *editorRedoAction,
+void VcsBaseSubmitEditor::unregisterActions(QAction *editorUndoAction, QAction *editorRedoAction,
QAction *submitAction, QAction *diffAction)
{
d->m_widget->unregisterActions(editorUndoAction, editorRedoAction, submitAction, diffAction);
d->m_diffAction = d->m_submitAction = 0;
}
-int VCSBaseSubmitEditor::fileNameColumn() const
+int VcsBaseSubmitEditor::fileNameColumn() const
{
return d->m_widget->fileNameColumn();
}
-void VCSBaseSubmitEditor::setFileNameColumn(int c)
+void VcsBaseSubmitEditor::setFileNameColumn(int c)
{
d->m_widget->setFileNameColumn(c);
}
-QAbstractItemView::SelectionMode VCSBaseSubmitEditor::fileListSelectionMode() const
+QAbstractItemView::SelectionMode VcsBaseSubmitEditor::fileListSelectionMode() const
{
return d->m_widget->fileListSelectionMode();
}
-void VCSBaseSubmitEditor::setFileListSelectionMode(QAbstractItemView::SelectionMode sm)
+void VcsBaseSubmitEditor::setFileListSelectionMode(QAbstractItemView::SelectionMode sm)
{
d->m_widget->setFileListSelectionMode(sm);
}
-bool VCSBaseSubmitEditor::isEmptyFileListEnabled() const
+bool VcsBaseSubmitEditor::isEmptyFileListEnabled() const
{
return d->m_widget->isEmptyFileListEnabled();
}
-void VCSBaseSubmitEditor::setEmptyFileListEnabled(bool e)
+void VcsBaseSubmitEditor::setEmptyFileListEnabled(bool e)
{
d->m_widget->setEmptyFileListEnabled(e);
}
-bool VCSBaseSubmitEditor::lineWrap() const
+bool VcsBaseSubmitEditor::lineWrap() const
{
return d->m_widget->lineWrap();
}
-void VCSBaseSubmitEditor::setLineWrap(bool w)
+void VcsBaseSubmitEditor::setLineWrap(bool w)
{
d->m_widget->setLineWrap(w);
}
-int VCSBaseSubmitEditor::lineWrapWidth() const
+int VcsBaseSubmitEditor::lineWrapWidth() const
{
return d->m_widget->lineWrapWidth();
}
-void VCSBaseSubmitEditor::setLineWrapWidth(int w)
+void VcsBaseSubmitEditor::setLineWrapWidth(int w)
{
d->m_widget->setLineWrapWidth(w);
}
-void VCSBaseSubmitEditor::slotDescriptionChanged()
+void VcsBaseSubmitEditor::slotDescriptionChanged()
{
}
-bool VCSBaseSubmitEditor::createNew(const QString &contents)
+bool VcsBaseSubmitEditor::createNew(const QString &contents)
{
setFileContents(contents);
return true;
}
-bool VCSBaseSubmitEditor::open(QString *errorString, const QString &fileName, const QString &realFileName)
+bool VcsBaseSubmitEditor::open(QString *errorString, const QString &fileName, const QString &realFileName)
{
if (fileName.isEmpty())
return false;
@@ -391,45 +391,45 @@ bool VCSBaseSubmitEditor::open(QString *errorString, const QString &fileName, co
return true;
}
-Core::IFile *VCSBaseSubmitEditor::file()
+Core::IFile *VcsBaseSubmitEditor::file()
{
return d->m_file;
}
-QString VCSBaseSubmitEditor::displayName() const
+QString VcsBaseSubmitEditor::displayName() const
{
if (d->m_displayName.isEmpty())
d->m_displayName = QCoreApplication::translate("VCS", d->m_parameters->displayName);
return d->m_displayName;
}
-void VCSBaseSubmitEditor::setDisplayName(const QString &title)
+void VcsBaseSubmitEditor::setDisplayName(const QString &title)
{
d->m_displayName = title;
emit changed();
}
-QString VCSBaseSubmitEditor::checkScriptWorkingDirectory() const
+QString VcsBaseSubmitEditor::checkScriptWorkingDirectory() const
{
return d->m_checkScriptWorkingDirectory;
}
-void VCSBaseSubmitEditor::setCheckScriptWorkingDirectory(const QString &s)
+void VcsBaseSubmitEditor::setCheckScriptWorkingDirectory(const QString &s)
{
d->m_checkScriptWorkingDirectory = s;
}
-bool VCSBaseSubmitEditor::duplicateSupported() const
+bool VcsBaseSubmitEditor::duplicateSupported() const
{
return false;
}
-Core::IEditor *VCSBaseSubmitEditor::duplicate(QWidget * /*parent*/)
+Core::IEditor *VcsBaseSubmitEditor::duplicate(QWidget * /*parent*/)
{
return 0;
}
-Core::Id VCSBaseSubmitEditor::id() const
+Core::Id VcsBaseSubmitEditor::id() const
{
return d->m_parameters->id;
}
@@ -450,7 +450,7 @@ static QToolBar *createToolBar(const QWidget *someWidget, QAction *submitAction,
return toolBar;
}
-QWidget *VCSBaseSubmitEditor::toolBar()
+QWidget *VcsBaseSubmitEditor::toolBar()
{
if (!wantToolBar)
return 0;
@@ -466,22 +466,22 @@ QWidget *VCSBaseSubmitEditor::toolBar()
return d->m_toolWidget;
}
-QByteArray VCSBaseSubmitEditor::saveState() const
+QByteArray VcsBaseSubmitEditor::saveState() const
{
return QByteArray();
}
-bool VCSBaseSubmitEditor::restoreState(const QByteArray &/*state*/)
+bool VcsBaseSubmitEditor::restoreState(const QByteArray &/*state*/)
{
return true;
}
-QStringList VCSBaseSubmitEditor::checkedFiles() const
+QStringList VcsBaseSubmitEditor::checkedFiles() const
{
return d->m_widget->checkedFiles();
}
-void VCSBaseSubmitEditor::setFileModel(QAbstractItemModel *m, const QString &repositoryDirectory)
+void VcsBaseSubmitEditor::setFileModel(QAbstractItemModel *m, const QString &repositoryDirectory)
{
d->m_widget->setFileModel(m);
@@ -534,17 +534,17 @@ void VCSBaseSubmitEditor::setFileModel(QAbstractItemModel *m, const QString &rep
}
}
-QAbstractItemModel *VCSBaseSubmitEditor::fileModel() const
+QAbstractItemModel *VcsBaseSubmitEditor::fileModel() const
{
return d->m_widget->fileModel();
}
-void VCSBaseSubmitEditor::slotDiffSelectedVCSFiles(const QStringList &rawList)
+void VcsBaseSubmitEditor::slotDiffSelectedVcsFiles(const QStringList &rawList)
{
emit diffSelectedFiles(rawList);
}
-bool VCSBaseSubmitEditor::save(QString *errorString, const QString &fileName, bool autoSave)
+bool VcsBaseSubmitEditor::save(QString *errorString, const QString &fileName, bool autoSave)
{
const QString fName = fileName.isEmpty() ? d->m_file->fileName() : fileName;
Utils::FileSaver saver(fName, QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text);
@@ -559,12 +559,12 @@ bool VCSBaseSubmitEditor::save(QString *errorString, const QString &fileName, bo
return true;
}
-QByteArray VCSBaseSubmitEditor::fileContents() const
+QByteArray VcsBaseSubmitEditor::fileContents() const
{
return d->m_widget->descriptionText().toLocal8Bit();
}
-bool VCSBaseSubmitEditor::setFileContents(const QString &contents)
+bool VcsBaseSubmitEditor::setFileContents(const QString &contents)
{
d->m_widget->setDescriptionText(contents);
return true;
@@ -572,8 +572,8 @@ bool VCSBaseSubmitEditor::setFileContents(const QString &contents)
enum { checkDialogMinimumWidth = 500 };
-VCSBaseSubmitEditor::PromptSubmitResult
- VCSBaseSubmitEditor::promptSubmit(const QString &title,
+VcsBaseSubmitEditor::PromptSubmitResult
+ VcsBaseSubmitEditor::promptSubmit(const QString &title,
const QString &question,
const QString &checkFailureQuestion,
bool *promptSetting,
@@ -581,7 +581,7 @@ VCSBaseSubmitEditor::PromptSubmitResult
bool canCommitOnFailure) const
{
SubmitEditorWidget *submitWidget =
- static_cast<SubmitEditorWidget *>(const_cast<VCSBaseSubmitEditor *>(this)->widget());
+ static_cast<SubmitEditorWidget *>(const_cast<VcsBaseSubmitEditor *>(this)->widget());
raiseSubmitEditor();
@@ -644,23 +644,23 @@ VCSBaseSubmitEditor::PromptSubmitResult
return SubmitCanceled;
}
-QString VCSBaseSubmitEditor::promptForNickName()
+QString VcsBaseSubmitEditor::promptForNickName()
{
if (!d->m_nickNameDialog)
- d->m_nickNameDialog = new NickNameDialog(VCSPlugin::instance()->nickNameModel(), d->m_widget);
+ d->m_nickNameDialog = new NickNameDialog(VcsPlugin::instance()->nickNameModel(), d->m_widget);
if (d->m_nickNameDialog->exec() == QDialog::Accepted)
return d->m_nickNameDialog->nickName();
return QString();
}
-void VCSBaseSubmitEditor::slotInsertNickName()
+void VcsBaseSubmitEditor::slotInsertNickName()
{
const QString nick = promptForNickName();
if (!nick.isEmpty())
d->m_widget->descriptionEdit()->textCursor().insertText(nick);
}
-void VCSBaseSubmitEditor::slotSetFieldNickName(int i)
+void VcsBaseSubmitEditor::slotSetFieldNickName(int i)
{
if (SubmitFieldWidget *sfw = d->m_widget->submitFieldWidgets().front()) {
const QString nick = promptForNickName();
@@ -669,7 +669,7 @@ void VCSBaseSubmitEditor::slotSetFieldNickName(int i)
}
}
-void VCSBaseSubmitEditor::slotCheckSubmitMessage()
+void VcsBaseSubmitEditor::slotCheckSubmitMessage()
{
QString errorMessage;
if (!checkSubmitMessage(&errorMessage)) {
@@ -680,7 +680,7 @@ void VCSBaseSubmitEditor::slotCheckSubmitMessage()
}
}
-bool VCSBaseSubmitEditor::checkSubmitMessage(QString *errorMessage) const
+bool VcsBaseSubmitEditor::checkSubmitMessage(QString *errorMessage) const
{
const QString checkScript = submitMessageCheckScript();
if (checkScript.isEmpty())
@@ -695,12 +695,12 @@ static inline QString msgCheckScript(const QString &workingDir, const QString &c
{
const QString nativeCmd = QDir::toNativeSeparators(cmd);
return workingDir.isEmpty() ?
- VCSBaseSubmitEditor::tr("Executing %1").arg(nativeCmd) :
- VCSBaseSubmitEditor::tr("Executing [%1] %2").
+ VcsBaseSubmitEditor::tr("Executing %1").arg(nativeCmd) :
+ VcsBaseSubmitEditor::tr("Executing [%1] %2").
arg(QDir::toNativeSeparators(workingDir), nativeCmd);
}
-bool VCSBaseSubmitEditor::runSubmitMessageCheckScript(const QString &checkScript, QString *errorMessage) const
+bool VcsBaseSubmitEditor::runSubmitMessageCheckScript(const QString &checkScript, QString *errorMessage) const
{
// Write out message
QString tempFilePattern = QDir::tempPath();
@@ -712,7 +712,7 @@ bool VCSBaseSubmitEditor::runSubmitMessageCheckScript(const QString &checkScript
if (!saver.finalize(errorMessage))
return false;
// Run check process
- VCSBaseOutputWindow *outputWindow = VCSBaseOutputWindow::instance();
+ VcsBaseOutputWindow *outputWindow = VcsBaseOutputWindow::instance();
outputWindow->appendCommand(msgCheckScript(d->m_checkScriptWorkingDirectory, checkScript));
QProcess checkProcess;
if (!d->m_checkScriptWorkingDirectory.isEmpty())
@@ -754,18 +754,18 @@ bool VCSBaseSubmitEditor::runSubmitMessageCheckScript(const QString &checkScript
return true;
}
-QIcon VCSBaseSubmitEditor::diffIcon()
+QIcon VcsBaseSubmitEditor::diffIcon()
{
return QIcon(QLatin1String(":/vcsbase/images/diff.png"));
}
-QIcon VCSBaseSubmitEditor::submitIcon()
+QIcon VcsBaseSubmitEditor::submitIcon()
{
return QIcon(QLatin1String(":/vcsbase/images/submit.png"));
}
// Compile a list if files in the current projects. TODO: Recurse down qrc files?
-QStringList VCSBaseSubmitEditor::currentProjectFiles(bool nativeSeparators, QString *name)
+QStringList VcsBaseSubmitEditor::currentProjectFiles(bool nativeSeparators, QString *name)
{
if (name)
name->clear();
@@ -788,11 +788,11 @@ QStringList VCSBaseSubmitEditor::currentProjectFiles(bool nativeSeparators, QStr
// Reduce a list of untracked files reported by a VCS down to the files
// that are actually part of the current project(s).
-void VCSBaseSubmitEditor::filterUntrackedFilesOfProject(const QString &repositoryDirectory, QStringList *untrackedFiles)
+void VcsBaseSubmitEditor::filterUntrackedFilesOfProject(const QString &repositoryDirectory, QStringList *untrackedFiles)
{
if (untrackedFiles->empty())
return;
- const QStringList nativeProjectFiles = VCSBaseSubmitEditor::currentProjectFiles(true);
+ const QStringList nativeProjectFiles = VcsBaseSubmitEditor::currentProjectFiles(true);
if (nativeProjectFiles.empty())
return;
const QDir repoDir(repositoryDirectory);
@@ -807,16 +807,16 @@ void VCSBaseSubmitEditor::filterUntrackedFilesOfProject(const QString &repositor
}
// Helper to raise an already open submit editor to prevent opening twice.
-bool VCSBaseSubmitEditor::raiseSubmitEditor()
+bool VcsBaseSubmitEditor::raiseSubmitEditor()
{
Core::EditorManager *em = Core::EditorManager::instance();
// Nothing to do?
if (Core::IEditor *ce = em->currentEditor())
- if (qobject_cast<VCSBaseSubmitEditor*>(ce))
+ if (qobject_cast<VcsBaseSubmitEditor*>(ce))
return true;
// Try to activate a hidden one
foreach (Core::IEditor *e, em->openedEditors()) {
- if (qobject_cast<VCSBaseSubmitEditor*>(e)) {
+ if (qobject_cast<VcsBaseSubmitEditor*>(e)) {
em->activateEditor(e, Core::EditorManager::IgnoreNavigationHistory | Core::EditorManager::ModeSwitch);
return true;
}
@@ -824,4 +824,4 @@ bool VCSBaseSubmitEditor::raiseSubmitEditor()
return false;
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.h b/src/plugins/vcsbase/vcsbasesubmiteditor.h
index 404131c2ea..98b26f2df6 100644
--- a/src/plugins/vcsbase/vcsbasesubmiteditor.h
+++ b/src/plugins/vcsbase/vcsbasesubmiteditor.h
@@ -47,13 +47,13 @@ QT_END_NAMESPACE
namespace Utils { class SubmitEditorWidget; }
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
class CommonVcsSettings;
}
-struct VCSBaseSubmitEditorPrivate;
+struct VcsBaseSubmitEditorPrivate;
-class VCSBASE_EXPORT VCSBaseSubmitEditorParameters
+class VCSBASE_EXPORT VcsBaseSubmitEditorParameters
{
public:
const char *mimeType;
@@ -62,7 +62,7 @@ public:
const char *context;
};
-class VCSBASE_EXPORT VCSBaseSubmitEditor : public Core::IEditor
+class VCSBASE_EXPORT VcsBaseSubmitEditor : public Core::IEditor
{
Q_OBJECT
Q_PROPERTY(int fileNameColumn READ fileNameColumn WRITE setFileNameColumn DESIGNABLE false)
@@ -73,7 +73,7 @@ class VCSBASE_EXPORT VCSBaseSubmitEditor : public Core::IEditor
Q_PROPERTY(bool emptyFileListEnabled READ isEmptyFileListEnabled WRITE setEmptyFileListEnabled DESIGNABLE true)
protected:
- explicit VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *parameters,
+ explicit VcsBaseSubmitEditor(const VcsBaseSubmitEditorParameters *parameters,
Utils::SubmitEditorWidget *editorWidget);
public:
@@ -83,7 +83,7 @@ public:
void unregisterActions(QAction *editorUndoAction, QAction *editorRedoAction,
QAction *submitAction = 0, QAction *diffAction = 0);
- ~VCSBaseSubmitEditor();
+ ~VcsBaseSubmitEditor();
// A utility routine to be called when closing a submit editor.
// Runs checks on the message and prompts according to configuration.
@@ -157,13 +157,13 @@ signals:
void diffSelectedFiles(const QStringList &files);
private slots:
- void slotDiffSelectedVCSFiles(const QStringList &rawList);
+ void slotDiffSelectedVcsFiles(const QStringList &rawList);
bool save(QString *errorString, const QString &fileName, bool autoSave);
void slotDescriptionChanged();
void slotCheckSubmitMessage();
void slotInsertNickName();
void slotSetFieldNickName(int);
- void slotUpdateEditorSettings(const VCSBase::Internal::CommonVcsSettings &);
+ void slotUpdateEditorSettings(const VcsBase::Internal::CommonVcsSettings &);
protected:
/* These hooks allow for modifying the contents that goes to
@@ -178,9 +178,9 @@ private:
bool runSubmitMessageCheckScript(const QString &script, QString *errorMessage) const;
QString promptForNickName();
- VCSBaseSubmitEditorPrivate *d;
+ VcsBaseSubmitEditorPrivate *d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSBASE_SUBMITEDITOR_H
diff --git a/src/plugins/vcsbase/vcsbasetextdocument.cpp b/src/plugins/vcsbase/vcsbasetextdocument.cpp
index 35bc8817fa..c3c695b6b5 100644
--- a/src/plugins/vcsbase/vcsbasetextdocument.cpp
+++ b/src/plugins/vcsbase/vcsbasetextdocument.cpp
@@ -32,33 +32,33 @@
#include "vcsbasetextdocument.h"
-using namespace VCSBase::Internal;
+using namespace VcsBase::Internal;
-VCSBaseTextDocument::VCSBaseTextDocument() :
+VcsBaseTextDocument::VcsBaseTextDocument() :
m_forceReadOnly(false)
{
}
-bool VCSBaseTextDocument::isReadOnly() const
+bool VcsBaseTextDocument::isReadOnly() const
{
return m_forceReadOnly ?
true :
TextEditor::BaseTextDocument::isReadOnly();
}
-bool VCSBaseTextDocument::isModified() const
+bool VcsBaseTextDocument::isModified() const
{
return m_forceReadOnly ?
false :
TextEditor::BaseTextDocument::isModified();
}
-void VCSBaseTextDocument::setForceReadOnly(bool b)
+void VcsBaseTextDocument::setForceReadOnly(bool b)
{
m_forceReadOnly = b;
}
-bool VCSBaseTextDocument::isForceReadOnly() const
+bool VcsBaseTextDocument::isForceReadOnly() const
{
return m_forceReadOnly;
}
diff --git a/src/plugins/vcsbase/vcsbasetextdocument.h b/src/plugins/vcsbase/vcsbasetextdocument.h
index 67ada98b85..a010757a14 100644
--- a/src/plugins/vcsbase/vcsbasetextdocument.h
+++ b/src/plugins/vcsbase/vcsbasetextdocument.h
@@ -35,16 +35,16 @@
#include <texteditor/basetextdocument.h>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
// A read-only text document.
-class VCSBaseTextDocument : public TextEditor::BaseTextDocument
+class VcsBaseTextDocument : public TextEditor::BaseTextDocument
{
Q_OBJECT
public:
- VCSBaseTextDocument();
+ VcsBaseTextDocument();
bool isReadOnly() const;
bool isModified() const;
@@ -57,6 +57,6 @@ private:
};
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSBASETEXTDOCUMENT_H
diff --git a/src/plugins/vcsbase/vcsconfigurationpage.cpp b/src/plugins/vcsbase/vcsconfigurationpage.cpp
index 44546af633..03b7a45e3f 100644
--- a/src/plugins/vcsbase/vcsconfigurationpage.cpp
+++ b/src/plugins/vcsbase/vcsconfigurationpage.cpp
@@ -40,7 +40,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/iversioncontrol.h>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
class VcsConfigurationPagePrivate
@@ -93,7 +93,7 @@ bool VcsConfigurationPage::isComplete() const
void VcsConfigurationPage::openConfiguration()
{
Core::ICore *core = Core::ICore::instance();
- core->showOptionsDialog(VCSBase::Constants::VCS_SETTINGS_CATEGORY, d->m_versionControl->id());
+ core->showOptionsDialog(VcsBase::Constants::VCS_SETTINGS_CATEGORY, d->m_versionControl->id());
}
-} // namespace VCSBase
+} // namespace VcsBase
diff --git a/src/plugins/vcsbase/vcsconfigurationpage.h b/src/plugins/vcsbase/vcsconfigurationpage.h
index b5de9330cd..71e9d2be7c 100644
--- a/src/plugins/vcsbase/vcsconfigurationpage.h
+++ b/src/plugins/vcsbase/vcsconfigurationpage.h
@@ -39,7 +39,7 @@
namespace Core { class IVersionControl; }
-namespace VCSBase {
+namespace VcsBase {
namespace Internal { class VcsConfigurationPagePrivate; }
@@ -60,6 +60,6 @@ private:
Internal::VcsConfigurationPagePrivate *const d;
};
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSCONFIGURATIONPAGE_H
diff --git a/src/plugins/vcsbase/vcsconfigurationpage.ui b/src/plugins/vcsbase/vcsconfigurationpage.ui
index 7d0efca266..1bb6237879 100644
--- a/src/plugins/vcsbase/vcsconfigurationpage.ui
+++ b/src/plugins/vcsbase/vcsconfigurationpage.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>VCSBase::Internal::VcsConfigurationPage</class>
- <widget class="QWizardPage" name="VCSBase::Internal::VcsConfigurationPage">
+ <class>VcsBase::Internal::VcsConfigurationPage</class>
+ <widget class="QWizardPage" name="VcsBase::Internal::VcsConfigurationPage">
<property name="geometry">
<rect>
<x>0</x>
diff --git a/src/plugins/vcsbase/vcsplugin.cpp b/src/plugins/vcsbase/vcsplugin.cpp
index 4fad0d30c2..29c2cb8693 100644
--- a/src/plugins/vcsbase/vcsplugin.cpp
+++ b/src/plugins/vcsbase/vcsplugin.cpp
@@ -45,12 +45,12 @@
#include <QtCore/QtPlugin>
#include <QtCore/QDebug>
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
-VCSPlugin *VCSPlugin::m_instance = 0;
+VcsPlugin *VcsPlugin::m_instance = 0;
-VCSPlugin::VCSPlugin() :
+VcsPlugin::VcsPlugin() :
m_settingsPage(0),
m_nickNameModel(0),
m_coreListener(0)
@@ -58,12 +58,12 @@ VCSPlugin::VCSPlugin() :
m_instance = this;
}
-VCSPlugin::~VCSPlugin()
+VcsPlugin::~VcsPlugin()
{
m_instance = 0;
}
-bool VCSPlugin::initialize(const QStringList &arguments, QString *errorMessage)
+bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
{
Q_UNUSED(arguments)
@@ -76,36 +76,36 @@ bool VCSPlugin::initialize(const QStringList &arguments, QString *errorMessage)
m_settingsPage = new CommonOptionsPage;
addAutoReleasedObject(m_settingsPage);
- addAutoReleasedObject(VCSBaseOutputWindow::instance());
- connect(m_settingsPage, SIGNAL(settingsChanged(VCSBase::Internal::CommonVcsSettings)),
- this, SIGNAL(settingsChanged(VCSBase::Internal::CommonVcsSettings)));
- connect(m_settingsPage, SIGNAL(settingsChanged(VCSBase::Internal::CommonVcsSettings)),
+ addAutoReleasedObject(VcsBaseOutputWindow::instance());
+ connect(m_settingsPage, SIGNAL(settingsChanged(VcsBase::Internal::CommonVcsSettings)),
+ this, SIGNAL(settingsChanged(VcsBase::Internal::CommonVcsSettings)));
+ connect(m_settingsPage, SIGNAL(settingsChanged(VcsBase::Internal::CommonVcsSettings)),
this, SLOT(slotSettingsChanged()));
slotSettingsChanged();
return true;
}
-void VCSPlugin::extensionsInitialized()
+void VcsPlugin::extensionsInitialized()
{
}
-VCSPlugin *VCSPlugin::instance()
+VcsPlugin *VcsPlugin::instance()
{
return m_instance;
}
-CoreListener *VCSPlugin::coreListener() const
+CoreListener *VcsPlugin::coreListener() const
{
return m_coreListener;
}
-CommonVcsSettings VCSPlugin::settings() const
+CommonVcsSettings VcsPlugin::settings() const
{
return m_settingsPage->settings();
}
/* Delayed creation/update of the nick name model. */
-QStandardItemModel *VCSPlugin::nickNameModel()
+QStandardItemModel *VcsPlugin::nickNameModel()
{
if (!m_nickNameModel) {
m_nickNameModel = NickNameDialog::createModel(this);
@@ -114,7 +114,7 @@ QStandardItemModel *VCSPlugin::nickNameModel()
return m_nickNameModel;
}
-void VCSPlugin::populateNickNameModel()
+void VcsPlugin::populateNickNameModel()
{
QString errorMessage;
if (!NickNameDialog::populateModelFromMailCapFile(settings().nickNameMailMap,
@@ -124,13 +124,13 @@ void VCSPlugin::populateNickNameModel()
}
}
-void VCSPlugin::slotSettingsChanged()
+void VcsPlugin::slotSettingsChanged()
{
if (m_nickNameModel)
populateNickNameModel();
}
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
-Q_EXPORT_PLUGIN(VCSBase::Internal::VCSPlugin)
+Q_EXPORT_PLUGIN(VcsBase::Internal::VcsPlugin)
diff --git a/src/plugins/vcsbase/vcsplugin.h b/src/plugins/vcsbase/vcsplugin.h
index f92b50fa6b..bc064a6b66 100644
--- a/src/plugins/vcsbase/vcsplugin.h
+++ b/src/plugins/vcsbase/vcsplugin.h
@@ -41,26 +41,26 @@ QT_BEGIN_NAMESPACE
class QStandardItemModel;
QT_END_NAMESPACE
-namespace VCSBase {
+namespace VcsBase {
namespace Internal {
class CommonVcsSettings;
class CommonOptionsPage;
class CoreListener;
-class VCSPlugin : public ExtensionSystem::IPlugin
+class VcsPlugin : public ExtensionSystem::IPlugin
{
Q_OBJECT
public:
- VCSPlugin();
- ~VCSPlugin();
+ VcsPlugin();
+ ~VcsPlugin();
bool initialize(const QStringList &arguments, QString *errorMessage);
void extensionsInitialized();
- static VCSPlugin *instance();
+ static VcsPlugin *instance();
CoreListener *coreListener() const;
@@ -72,7 +72,7 @@ public:
QStandardItemModel *nickNameModel();
signals:
- void settingsChanged(const VCSBase::Internal::CommonVcsSettings &s);
+ void settingsChanged(const VcsBase::Internal::CommonVcsSettings &s);
private slots:
void slotSettingsChanged();
@@ -80,13 +80,13 @@ private slots:
private:
void populateNickNameModel();
- static VCSPlugin *m_instance;
+ static VcsPlugin *m_instance;
CommonOptionsPage *m_settingsPage;
QStandardItemModel *m_nickNameModel;
CoreListener *m_coreListener;
};
} // namespace Internal
-} // namespace VCSBase
+} // namespace VcsBase
#endif // VCSPLUGIN_H