forked from qt-creator/qt-creator
git: Reuse more code from vcsbase
Change-Id: I873d2caa2cead5c339eec887a5fcdef4d33bec24 Reviewed-on: http://codereview.qt-project.org/6071 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -33,49 +33,38 @@
|
||||
#ifndef GITSETTINGS_H
|
||||
#define GITSETTINGS_H
|
||||
|
||||
#include <QtCore/QStringList>
|
||||
#include <vcsbase/vcsbaseclientsettings.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSettings;
|
||||
QT_END_NAMESPACE
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
namespace Git {
|
||||
namespace Internal {
|
||||
|
||||
// Todo: Add user name and password?
|
||||
class GitSettings
|
||||
class GitSettings : public VCSBase::VCSBaseClientSettings
|
||||
{
|
||||
public:
|
||||
GitSettings();
|
||||
|
||||
void fromSettings(QSettings *);
|
||||
void toSettings(QSettings *) const;
|
||||
static const QLatin1String adoptPathKey;
|
||||
static const QLatin1String pathKey;
|
||||
static const QLatin1String pullRebaseKey;
|
||||
static const QLatin1String omitAnnotationDateKey;
|
||||
static const QLatin1String ignoreSpaceChangesInDiffKey;
|
||||
static const QLatin1String ignoreSpaceChangesInBlameKey;
|
||||
static const QLatin1String diffPatienceKey;
|
||||
static const QLatin1String winSetHomeEnvironmentKey;
|
||||
static const QLatin1String showPrettyFormatKey;
|
||||
static const QLatin1String gitkOptionsKey;
|
||||
|
||||
/** Return the full path to the git executable */
|
||||
QString gitBinaryPath(bool *ok = 0, QString *errorMessage = 0) const;
|
||||
|
||||
bool equals(const GitSettings &s) const;
|
||||
GitSettings &operator = (const GitSettings &s);
|
||||
|
||||
bool adoptPath;
|
||||
QString path;
|
||||
int logCount;
|
||||
int timeoutSeconds;
|
||||
bool pullRebase;
|
||||
bool promptToSubmit;
|
||||
bool omitAnnotationDate;
|
||||
bool ignoreSpaceChangesInDiff;
|
||||
bool ignoreSpaceChangesInBlame;
|
||||
bool diffPatience;
|
||||
bool winSetHomeEnvironment;
|
||||
int showPrettyFormat;
|
||||
QString gitkOptions;
|
||||
private:
|
||||
mutable QString m_binaryPath;
|
||||
};
|
||||
|
||||
inline bool operator==(const GitSettings &p1, const GitSettings &p2)
|
||||
{ return p1.equals(p2); }
|
||||
inline bool operator!=(const GitSettings &p1, const GitSettings &p2)
|
||||
{ return !p1.equals(p2); }
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Git
|
||||
|
||||
|
||||
Reference in New Issue
Block a user