CVS: Modernize

* Use pragma once
* Use some more overrides
* Tiny clean-ups here and there

Change-Id: I951afa8ed31c5f414d4ae872c79f80db19909ee0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Tobias Hunger
2016-02-04 13:07:35 +01:00
parent bc9c57756b
commit eb07fd92b2
19 changed files with 42 additions and 165 deletions

View File

@@ -23,26 +23,22 @@
**
****************************************************************************/
#ifndef CVSUTILS_H
#define CVSUTILS_H
#pragma once
#include "cvssubmiteditor.h"
#include <QString>
#include <QList>
QT_BEGIN_NAMESPACE
class QDebug;
QT_END_NAMESPACE
namespace Cvs {
namespace Internal {
// Utilities to parse output of a CVS log.
// A revision of a file.
struct CvsRevision
class CvsRevision
{
public:
CvsRevision(const QString &rev);
QString revision;
@@ -51,16 +47,15 @@ struct CvsRevision
};
// A log entry consisting of the file and its revisions.
struct CvsLogEntry
class CvsLogEntry
{
public:
CvsLogEntry(const QString &file);
QString file;
QList<CvsRevision> revisions;
};
QDebug operator<<(QDebug d, const CvsLogEntry &);
// Parse. Pass on a directory to obtain full paths when
// running from the repository directory.
QList<CvsLogEntry> parseLogEntries(const QString &output,
@@ -83,5 +78,3 @@ bool isFirstRevision(const QString &r);
} // namespace Internal
} // namespace Cvs
#endif // CVSUTILS_H