more file cosmetics

This commit is contained in:
hjk
2008-12-02 15:08:31 +01:00
parent 2ef79dca1c
commit df7aacd637
209 changed files with 895 additions and 689 deletions

View File

@@ -30,7 +30,9 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "annotationhighlighter.h"
#include <QtCore/QDebug>
namespace Git {
@@ -49,5 +51,5 @@ QString GitAnnotationHighlighter::changeNumber(const QString &block) const
return pos > 1 ? block.left(pos) : QString();
}
}
}
} // namespace Internal
} // namespace Git

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef ANNOTATIONHIGHLIGHTER_H
#define ANNOTATIONHIGHLIGHTER_H
@@ -52,7 +53,7 @@ private:
const QChar m_blank;
};
} //namespace Git
} //namespace Internal
} // namespace Internal
} // namespace Git
#endif
#endif // ANNOTATIONHIGHLIGHTER_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "changeselectiondialog.h"
#include <QtGui/QFileDialog>

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef CHANGESELECTIONDIALOG_H
#define CHANGESELECTIONDIALOG_H
@@ -40,7 +41,7 @@
namespace Git {
namespace Internal {
class GitPlugin;
class GitPlugin;
class ChangeSelectionDialog : public QDialog
{
@@ -57,7 +58,7 @@ private:
};
} //namespace Internal
} //namespace Git
} // namespace Internal
} // namespace Git
#endif // CHANGESELECTIONDIALOG_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "commitdata.h"
#include <QtCore/QDebug>
@@ -92,5 +93,5 @@ QDebug operator<<(QDebug d, const CommitData &data)
return d;
}
}
}
} // namespace Internal
} // namespace Git

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef COMMITDATA_H
#define COMMITDATA_H
@@ -42,40 +43,43 @@ QT_END_NAMESPACE
namespace Git {
namespace Internal {
// Read-only
struct GitSubmitEditorPanelInfo {
void clear();
QString repository;
QString description;
QString branch;
};
// Read-only
struct GitSubmitEditorPanelInfo
{
void clear();
QString repository;
QString description;
QString branch;
};
QDebug operator<<(QDebug d, const GitSubmitEditorPanelInfo &);
QDebug operator<<(QDebug d, const GitSubmitEditorPanelInfo &);
struct GitSubmitEditorPanelData {
void clear();
// Format as "John Doe <jdoe@foobar.com>"
QString authorString() const;
struct GitSubmitEditorPanelData
{
void clear();
// Format as "John Doe <jdoe@foobar.com>"
QString authorString() const;
QString author;
QString email;
};
QString author;
QString email;
};
QDebug operator<<(QDebug d, const GitSubmitEditorPanelData &);
QDebug operator<<(QDebug d, const GitSubmitEditorPanelData &);
struct CommitData {
void clear();
GitSubmitEditorPanelInfo panelInfo;
GitSubmitEditorPanelData panelData;
QStringList commitFiles;
QStringList notUpdatedFiles;
QStringList untrackedFiles;
};
struct CommitData
{
void clear();
GitSubmitEditorPanelInfo panelInfo;
GitSubmitEditorPanelData panelData;
QStringList commitFiles;
QStringList notUpdatedFiles;
QStringList untrackedFiles;
};
QDebug operator<<(QDebug d, const CommitData &);
QDebug operator<<(QDebug d, const CommitData &);
}
}
} // namespace Internal
} // namespace Git
#endif
#endif // COMMITDATA_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "gitclient.h"
#include "gitplugin.h"
#include "gitconstants.h"

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef GITCLIENT_H
#define GITCLIENT_H
@@ -64,62 +65,53 @@ struct GitSubmitEditorPanelData;
class GitClient : public Core::IVersionControl
{
Q_OBJECT
public:
explicit GitClient(GitPlugin *plugin, Core::ICore *core);
~GitClient();
bool vcsOpen(const QString &fileName);
bool vcsAdd(const QString&) {return false;}
bool vcsDelete(const QString&) {return false;}
bool managesDirectory(const QString&) const {return false;}
QString findTopLevelForDirectory(const QString&) const {return QString();}
GitClient(GitPlugin *plugin, Core::ICore *core);
~GitClient();
static QString findRepositoryForFile(const QString &fileName);
static QString findRepositoryForDirectory(const QString &dir);
bool vcsOpen(const QString &fileName);
bool vcsAdd(const QString &) { return false; }
bool vcsDelete(const QString &) { return false; }
bool managesDirectory(const QString &) const { return false; }
QString findTopLevelForDirectory(const QString &) const { return QString(); }
void diff(const QString &workingDirectory,
const QString &fileName);
void diff(const QString &workingDirectory,
const QStringList &fileNames);
static QString findRepositoryForFile(const QString &fileName);
static QString findRepositoryForDirectory(const QString &dir);
void status(const QString &workingDirectory);
void log(const QString &workingDirectory
, const QString &fileName);
void blame(const QString &workingDirectory
, const QString &fileName);
void showCommit(const QString &workingDirectory
, const QString &commit);
void checkout(const QString &workingDirectory
, const QString &file);
void hardReset(const QString &workingDirectory
, const QString &commit);
void addFile(const QString &workingDirectory
, const QString &fileName);
bool synchronousAdd(const QString &workingDirectory,
const QStringList &files);
void pull(const QString &workingDirectory);
void push(const QString &workingDirectory);
void diff(const QString &workingDirectory, const QString &fileName);
void diff(const QString &workingDirectory, const QStringList &fileNames);
QString readConfig(const QString &workingDirectory
, const QStringList &configVar);
void status(const QString &workingDirectory);
void log(const QString &workingDirectory, const QString &fileName);
void blame(const QString &workingDirectory, const QString &fileName);
void showCommit(const QString &workingDirectory, const QString &commit);
void checkout(const QString &workingDirectory, const QString &file);
void hardReset(const QString &workingDirectory, const QString &commit);
void addFile(const QString &workingDirectory, const QString &fileName);
bool synchronousAdd(const QString &workingDirectory, const QStringList &files);
void pull(const QString &workingDirectory);
void push(const QString &workingDirectory);
QString readConfigValue(const QString &workingDirectory,
const QString &configVar);
QString readConfig(const QString &workingDirectory, const QStringList &configVar);
bool getCommitData(const QString &workingDirectory,
QString *commitTemplate,
CommitData *d,
QString *errorMessage);
QString readConfigValue(const QString &workingDirectory, const QString &configVar);
bool addAndCommit(const QString &workingDirectory,
const GitSubmitEditorPanelData &data,
const QString &messageFile,
const QStringList &files);
bool getCommitData(const QString &workingDirectory,
QString *commitTemplate,
CommitData *d,
QString *errorMessage);
bool addAndCommit(const QString &workingDirectory,
const GitSubmitEditorPanelData &data,
const QString &messageFile,
const QStringList &files);
public slots:
void show(const QString &source, const QString &id);
private:
VCSBase::VCSBaseEditor *createVCSEditor(const QString &kind,
VCSBase::VCSBaseEditor *createVCSEditor(const QString &kind,
QString title,
const QString &source,
bool setSourceCodec,
@@ -127,20 +119,20 @@ private:
const QString &dynamicPropertyValue) const;
void executeGit(const QString &workingDirectory
, const QStringList &arguments
, GitOutputWindow *outputWindow
, VCSBase::VCSBaseEditor* editor = 0
, bool outputToWindow = false);
void executeGit(const QString &workingDirectory,
const QStringList &arguments,
GitOutputWindow *outputWindow,
VCSBase::VCSBaseEditor* editor = 0,
bool outputToWindow = false);
bool synchronousGit(const QString &workingDirectory
, const QStringList &arguments
, QByteArray* outputText = 0
, QByteArray* errorText = 0);
bool synchronousGit(const QString &workingDirectory,
const QStringList &arguments,
QByteArray* outputText = 0,
QByteArray* errorText = 0);
const QString m_msgWait;
GitPlugin *m_plugin;
Core::ICore *m_core;
const QString m_msgWait;
GitPlugin *m_plugin;
Core::ICore *m_core;
};
class GitCommand : public QObject
@@ -149,12 +141,12 @@ class GitCommand : public QObject
public:
GitCommand();
~GitCommand();
void execute(const QStringList &arguments
, const QString &workingDirectory
, const ProjectExplorer::Environment &environment);
void run(const QStringList &arguments
, const QString &workingDirectory
, const ProjectExplorer::Environment &environment);
void execute(const QStringList &arguments,
const QString &workingDirectory,
const ProjectExplorer::Environment &environment);
void run(const QStringList &arguments,
const QString &workingDirectory,
const ProjectExplorer::Environment &environment);
Q_SIGNALS:
void outputData(const QByteArray&);
@@ -162,7 +154,7 @@ Q_SIGNALS:
void errorText(const QString&);
};
}
}
} // namespace Internal
} // namespace Git
#endif // GITCLIENT_H

View File

@@ -30,29 +30,32 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef GIT_CONSTANTS_H
#define GIT_CONSTANTS_H
namespace Git {
namespace Constants {
const char * const GIT_COMMAND_LOG_EDITOR_KIND = "Git Command Log Editor";
const char * const GIT_LOG_EDITOR_KIND = "Git File Log Editor";
const char * const GIT_BLAME_EDITOR_KIND = "Git Annotation Editor";
const char * const GIT_DIFF_EDITOR_KIND = "Git Diff Editor";
namespace Constants {
const char * const C_GITSUBMITEDITOR = "Git Submit Editor";
const char * const GITSUBMITEDITOR_KIND = "Git Submit Editor";
const char * const SUBMIT_CURRENT = "Nokia.Git.SubmitCurrentLog";
const char * const DIFF_SELECTED = "Nokia.Git.DiffSelectedFilesInLog";
const char * const SUBMIT_MIMETYPE = "application/vnd.nokia.text.git.submit";
const char * const GIT_COMMAND_LOG_EDITOR_KIND = "Git Command Log Editor";
const char * const GIT_LOG_EDITOR_KIND = "Git File Log Editor";
const char * const GIT_BLAME_EDITOR_KIND = "Git Annotation Editor";
const char * const GIT_DIFF_EDITOR_KIND = "Git Diff Editor";
// TODO: For the moment, trust p4 is loaded...
const char * const ICON_SUBMIT = ":/trolltech.perforce/images/submit.png";
const char * const ICON_DIFF = ":/trolltech.perforce/images/diff.png";
const char * const C_GITSUBMITEDITOR = "Git Submit Editor";
const char * const GITSUBMITEDITOR_KIND = "Git Submit Editor";
const char * const SUBMIT_CURRENT = "Nokia.Git.SubmitCurrentLog";
const char * const DIFF_SELECTED = "Nokia.Git.DiffSelectedFilesInLog";
const char * const SUBMIT_MIMETYPE = "application/vnd.nokia.text.git.submit";
const char * const DIFF_FILE_INDICATOR = "--- ";
enum { debug = 0 };
}
}
// TODO: For the moment, trust p4 is loaded...
const char * const ICON_SUBMIT = ":/trolltech.perforce/images/submit.png";
const char * const ICON_DIFF = ":/trolltech.perforce/images/diff.png";
const char * const DIFF_FILE_INDICATOR = "--- ";
enum { debug = 0 };
} // namespace Constants
} // namespace Git
#endif // GIT_CONSTANTS_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "giteditor.h"
#include "annotationhighlighter.h"
#include "gitconstants.h"
@@ -141,5 +142,5 @@ QString GitEditor::fileNameFromDiffSpecification(const QTextBlock &inBlock) cons
return QString();
}
}
}
} // namespace Internal
} // namespace Git

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef GITEDITOR_H
#define GITEDITOR_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "gitoutputwindow.h"
#include <QtCore/QTextCodec>

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef GITOUTPUTWINDOW_H
#define GITOUTPUTWINDOW_H
@@ -42,7 +43,6 @@
namespace Git {
namespace Internal {
class GitOutputWindow : public Core::IOutputPane
{
Q_OBJECT
@@ -52,7 +52,7 @@ public:
~GitOutputWindow();
QWidget *outputWidget(QWidget *parent);
QList<QWidget*> toolBarWidgets(void) const { return QList<QWidget *>(); }
QList<QWidget*> toolBarWidgets() const { return QList<QWidget *>(); }
QString name() const;
int priorityInStatusBar() const;
@@ -76,4 +76,4 @@ private:
} // namespace Internal
} // namespace Git
#endif
#endif // GITOUTPUTWINDOW_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "gitplugin.h"
#include "gitclient.h"
#include "giteditor.h"

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef GITPLUGIN_H
#define GITPLUGIN_H
@@ -160,4 +161,4 @@ private:
} // namespace Git
} // namespace Internal
#endif
#endif // GITPLUGIN_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "gitsubmiteditor.h"
#include "gitsubmiteditorwidget.h"
#include "gitconstants.h"
@@ -88,5 +89,6 @@ QString GitSubmitEditor::fileFromChangeLine(const QString &line)
rc.remove(0, 1);
return rc;
}
}
}
} // namespace Internal
} // namespace Git

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef GITSUBMITEDITOR_H
#define GITSUBMITEDITOR_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "gitsubmiteditorwidget.h"
#include "commitdata.h"
@@ -65,5 +66,5 @@ void GitSubmitEditorWidget::setPanelData(const GitSubmitEditorPanelData &data)
m_gitSubmitPanelUi.emailLineEdit->setText(data.email);
}
}
}
} // namespace Internal
} // namespace Git

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef GITSUBMITEDITORWIDGET_H
#define GITSUBMITEDITORWIDGET_H

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "settingspage.h"
#include <coreplugin/icore.h>

View File

@@ -30,6 +30,7 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef SETTINGSPAGE_H
#define SETTINGSPAGE_H
@@ -76,7 +77,7 @@ private:
int m_logCount;
};
} //namespace Internal
} //namespace Git
} // namespace Internal
} // namespace Git
#endif
#endif // SETTINGSPAGE_H