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:
Christian Kandeler
2014-07-01 11:08:26 +02:00
committed by hjk
parent 139449239c
commit 93304df038
208 changed files with 472 additions and 472 deletions

View File

@@ -473,7 +473,7 @@ int FunctionHintProposalModel::activeArgument(const QString &prefix) const
// -----------------------------
// QmlJSCompletionAssistProvider
// -----------------------------
bool QmlJSCompletionAssistProvider::supportsEditor(const Core::Id &editorId) const
bool QmlJSCompletionAssistProvider::supportsEditor(Core::Id editorId) const
{
return editorId == Constants::C_QMLJSEDITOR_ID;
}

View File

@@ -80,7 +80,7 @@ class QmlJSCompletionAssistProvider : public TextEditor::CompletionAssistProvide
Q_OBJECT
public:
bool supportsEditor(const Core::Id &editorId) const QTC_OVERRIDE;
bool supportsEditor(Core::Id editorId) const QTC_OVERRIDE;
TextEditor::IAssistProcessor *createProcessor() const QTC_OVERRIDE;
int activationCharSequenceLength() const QTC_OVERRIDE;

View File

@@ -299,7 +299,7 @@ void QmlJSEditorPlugin::showContextPane()
}
Core::Command *QmlJSEditorPlugin::addToolAction(QAction *a,
Core::Context &context, const Core::Id &id,
Core::Context &context, Core::Id id,
Core::ActionContainer *c1, const QString &keySequence)
{
Core::Command *command = Core::ActionManager::registerAction(a, id, context);

View File

@@ -96,7 +96,7 @@ private Q_SLOTS:
void checkCurrentEditorSemanticInfoUpToDate();
private:
Core::Command *addToolAction(QAction *a, Core::Context &context, const Core::Id &id,
Core::Command *addToolAction(QAction *a, Core::Context &context, Core::Id id,
Core::ActionContainer *c1, const QString &keySequence);
static QmlJSEditorPlugin *m_instance;

View File

@@ -96,7 +96,7 @@ bool QmlJSQuickFixAssistProvider::isAsynchronous() const
return false;
}
bool QmlJSQuickFixAssistProvider::supportsEditor(const Core::Id &editorId) const
bool QmlJSQuickFixAssistProvider::supportsEditor(Core::Id editorId) const
{
return editorId == Constants::C_QMLJSEDITOR_ID;
}

View File

@@ -78,7 +78,7 @@ public:
~QmlJSQuickFixAssistProvider();
bool isAsynchronous() const QTC_OVERRIDE;
bool supportsEditor(const Core::Id &editorId) const QTC_OVERRIDE;
bool supportsEditor(Core::Id editorId) const QTC_OVERRIDE;
TextEditor::IAssistProcessor *createProcessor() const QTC_OVERRIDE;
QList<TextEditor::QuickFixFactory *> quickFixFactories() const QTC_OVERRIDE;

View File

@@ -65,7 +65,7 @@ QmlTaskManager::QmlTaskManager(QObject *parent) :
SLOT(updateMessagesNow()));
}
static QList<ProjectExplorer::Task> convertToTasks(const QList<DiagnosticMessage> &messages, const Utils::FileName &fileName, const Core::Id &category)
static QList<ProjectExplorer::Task> convertToTasks(const QList<DiagnosticMessage> &messages, const Utils::FileName &fileName, Core::Id category)
{
QList<ProjectExplorer::Task> result;
foreach (const DiagnosticMessage &msg, messages) {
@@ -81,7 +81,7 @@ static QList<ProjectExplorer::Task> convertToTasks(const QList<DiagnosticMessage
return result;
}
static QList<ProjectExplorer::Task> convertToTasks(const QList<StaticAnalysis::Message> &messages, const Utils::FileName &fileName, const Core::Id &category)
static QList<ProjectExplorer::Task> convertToTasks(const QList<StaticAnalysis::Message> &messages, const Utils::FileName &fileName, Core::Id category)
{
QList<DiagnosticMessage> diagnostics;
foreach (const StaticAnalysis::Message &msg, messages)