forked from qt-creator/qt-creator
Always pass Core::Id by value.
Currently we pass in some places by value, elsewhere by const ref and for some weird reason also by const value in a lot of places. The latter is particularly annoying, as it is also used in interfaces and therefore forces all implementors to do the same, since leaving the "const" off is causing compiler warnings with MSVC. Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -900,7 +900,7 @@ void GitClient::stage(const QString &patch, bool revert)
|
||||
* existing instance and to reuse it (in case, say, 'git diff foo' is
|
||||
* already open). */
|
||||
VcsBase::VcsBaseEditorWidget *GitClient::createVcsEditor(
|
||||
const Core::Id &id,
|
||||
Core::Id id,
|
||||
QString title,
|
||||
const QString &source, // Source file or directory
|
||||
CodecType codecType,
|
||||
|
||||
@@ -360,7 +360,7 @@ private:
|
||||
const QString &dynamicPropertyValue) const;
|
||||
|
||||
enum CodecType { CodecSource, CodecLogOutput, CodecNone };
|
||||
VcsBase::VcsBaseEditorWidget *createVcsEditor(const Core::Id &kind,
|
||||
VcsBase::VcsBaseEditorWidget *createVcsEditor(Core::Id kind,
|
||||
QString title,
|
||||
const QString &source,
|
||||
CodecType codecType,
|
||||
|
||||
@@ -180,7 +180,7 @@ static const VcsBase::VcsBaseSubmitEditorParameters submitParameters = {
|
||||
ParameterActionCommandPair
|
||||
GitPlugin::createParameterAction(Core::ActionContainer *ac,
|
||||
const QString &defaultText, const QString ¶meterText,
|
||||
const Core::Id &id, const Core::Context &context,
|
||||
Core::Id id, const Core::Context &context,
|
||||
bool addToLocator)
|
||||
{
|
||||
Utils::ParameterAction *action = new Utils::ParameterAction(defaultText, parameterText,
|
||||
@@ -198,7 +198,7 @@ ParameterActionCommandPair
|
||||
ParameterActionCommandPair
|
||||
GitPlugin::createFileAction(Core::ActionContainer *ac,
|
||||
const QString &defaultText, const QString ¶meterText,
|
||||
const Core::Id &id, const Core::Context &context, bool addToLocator,
|
||||
Core::Id id, const Core::Context &context, bool addToLocator,
|
||||
const char *pluginSlot)
|
||||
{
|
||||
const ParameterActionCommandPair rc = createParameterAction(ac, defaultText, parameterText, id, context, addToLocator);
|
||||
@@ -211,7 +211,7 @@ ParameterActionCommandPair
|
||||
ParameterActionCommandPair
|
||||
GitPlugin::createProjectAction(Core::ActionContainer *ac,
|
||||
const QString &defaultText, const QString ¶meterText,
|
||||
const Core::Id &id, const Core::Context &context, bool addToLocator,
|
||||
Core::Id id, const Core::Context &context, bool addToLocator,
|
||||
const char *pluginSlot)
|
||||
{
|
||||
const ParameterActionCommandPair rc = createParameterAction(ac, defaultText, parameterText, id, context, addToLocator);
|
||||
@@ -223,7 +223,7 @@ ParameterActionCommandPair
|
||||
// Create an action to act on the repository
|
||||
ActionCommandPair
|
||||
GitPlugin::createRepositoryAction(Core::ActionContainer *ac,
|
||||
const QString &text, const Core::Id &id,
|
||||
const QString &text, Core::Id id,
|
||||
const Core::Context &context, bool addToLocator)
|
||||
{
|
||||
QAction *action = new QAction(text, this);
|
||||
@@ -239,7 +239,7 @@ ActionCommandPair
|
||||
// Create an action to act on the repository with slot
|
||||
ActionCommandPair
|
||||
GitPlugin::createRepositoryAction(Core::ActionContainer *ac,
|
||||
const QString &text, const Core::Id &id,
|
||||
const QString &text, Core::Id id,
|
||||
const Core::Context &context, bool addToLocator,
|
||||
const char *pluginSlot)
|
||||
{
|
||||
@@ -253,7 +253,7 @@ ActionCommandPair
|
||||
// taking the directory. Store the member function as data on the action.
|
||||
ActionCommandPair
|
||||
GitPlugin::createRepositoryAction(Core::ActionContainer *ac,
|
||||
const QString &text, const Core::Id &id,
|
||||
const QString &text, Core::Id id,
|
||||
const Core::Context &context, bool addToLocator,
|
||||
GitClientMemberFunc func)
|
||||
{
|
||||
|
||||
@@ -158,35 +158,35 @@ private:
|
||||
inline ParameterActionCommandPair
|
||||
createParameterAction(Core::ActionContainer *ac,
|
||||
const QString &defaultText, const QString ¶meterText,
|
||||
const Core::Id &id, const Core::Context &context, bool addToLocator);
|
||||
Core::Id id, const Core::Context &context, bool addToLocator);
|
||||
|
||||
inline ParameterActionCommandPair
|
||||
createFileAction(Core::ActionContainer *ac,
|
||||
const QString &defaultText, const QString ¶meterText,
|
||||
const Core::Id &id, const Core::Context &context, bool addToLocator,
|
||||
Core::Id id, const Core::Context &context, bool addToLocator,
|
||||
const char *pluginSlot);
|
||||
|
||||
inline ParameterActionCommandPair
|
||||
createProjectAction(Core::ActionContainer *ac,
|
||||
const QString &defaultText, const QString ¶meterText,
|
||||
const Core::Id &id, const Core::Context &context, bool addToLocator);
|
||||
Core::Id id, const Core::Context &context, bool addToLocator);
|
||||
|
||||
inline ParameterActionCommandPair
|
||||
createProjectAction(Core::ActionContainer *ac,
|
||||
const QString &defaultText, const QString ¶meterText,
|
||||
const Core::Id &id, const Core::Context &context, bool addToLocator,
|
||||
Core::Id id, const Core::Context &context, bool addToLocator,
|
||||
const char *pluginSlot);
|
||||
|
||||
|
||||
inline ActionCommandPair createRepositoryAction(Core::ActionContainer *ac,
|
||||
const QString &text, const Core::Id &id,
|
||||
const QString &text, Core::Id id,
|
||||
const Core::Context &context, bool addToLocator);
|
||||
inline ActionCommandPair createRepositoryAction(Core::ActionContainer *ac,
|
||||
const QString &text, const Core::Id &id,
|
||||
const QString &text, Core::Id id,
|
||||
const Core::Context &context,
|
||||
bool addToLocator, const char *pluginSlot);
|
||||
inline ActionCommandPair createRepositoryAction(Core::ActionContainer *ac,
|
||||
const QString &text, const Core::Id &id,
|
||||
const QString &text, Core::Id id,
|
||||
const Core::Context &context,
|
||||
bool addToLocator, GitClientMemberFunc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user