Git: Modernize

* pragma once
* member initialization
* s/struct/class/
* Introduce a static GitPlugin::client() method and use it

Change-Id: Ifdcac86dd16f3cdba11d564d03e9a15f00a6afdb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Tobias Hunger
2016-02-10 11:19:27 +01:00
parent 7db0023e8c
commit b4195d5174
47 changed files with 229 additions and 419 deletions

View File

@@ -23,39 +23,34 @@
**
****************************************************************************/
#ifndef COMMITDATA_H
#define COMMITDATA_H
#pragma once
#include "gitsettings.h" // CommitType
#include <QStringList>
#include <QPair>
QT_BEGIN_NAMESPACE
class QDebug;
QT_END_NAMESPACE
namespace Git {
namespace Internal {
// Read-only
struct GitSubmitEditorPanelInfo
class GitSubmitEditorPanelInfo
{
public:
void clear();
QString repository;
QString branch;
};
QDebug operator<<(QDebug d, const GitSubmitEditorPanelInfo &);
enum PushAction {
NoPush,
NormalPush,
PushToGerrit
};
struct GitSubmitEditorPanelData
class GitSubmitEditorPanelData
{
public:
void clear();
// Format as "John Doe <jdoe@foobar.com>"
QString authorString() const;
@@ -66,8 +61,6 @@ struct GitSubmitEditorPanelData
PushAction pushAction;
};
QDebug operator<<(QDebug d, const GitSubmitEditorPanelData &);
enum FileState {
EmptyFileState = 0x00,
@@ -132,5 +125,3 @@ bool operator<(const CommitData::StateFilePair &a,
} // namespace Internal
} // namespace Git
#endif // COMMITDATA_H