summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-07-01 11:08:26 +0200
committerhjk <hjk121@nokiamail.com>2014-07-01 11:52:08 +0200
commit93304df0381cbeabf4c8435aec0ad55fbc7f8fe7 (patch)
tree7cbe348b1e3f88041b7e159aa335031e2c41bfc8 /src/plugins/texteditor
parent139449239c7cd63ab933d13e20b37cd717a45fe7 (diff)
downloadqt-creator-93304df0381cbeabf4c8435aec0ad55fbc7f8fe7.tar.gz
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>
Diffstat (limited to 'src/plugins/texteditor')
-rw-r--r--src/plugins/texteditor/basetexteditor.cpp4
-rw-r--r--src/plugins/texteditor/basetexteditor.h2
-rw-r--r--src/plugins/texteditor/circularclipboardassist.cpp2
-rw-r--r--src/plugins/texteditor/circularclipboardassist.h2
-rw-r--r--src/plugins/texteditor/codeassist/codeassistant.cpp2
-rw-r--r--src/plugins/texteditor/codeassist/iassistprovider.cpp2
-rw-r--r--src/plugins/texteditor/codeassist/iassistprovider.h2
-rw-r--r--src/plugins/texteditor/texteditoractionhandler.cpp2
-rw-r--r--src/plugins/texteditor/texteditoractionhandler.h2
9 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index 6c6b70b972..7e5671bd87 100644
--- a/src/plugins/texteditor/basetexteditor.cpp
+++ b/src/plugins/texteditor/basetexteditor.cpp
@@ -4484,7 +4484,7 @@ void BaseTextEditorWidget::dragEnterEvent(QDragEnterEvent *e)
QPlainTextEdit::dragEnterEvent(e);
}
-static void appendMenuActionsFromContext(QMenu *menu, const Core::Id menuContextId)
+static void appendMenuActionsFromContext(QMenu *menu, Core::Id menuContextId)
{
Core::ActionContainer *mcontext = Core::ActionManager::actionContainer(menuContextId);
QMenu *contextMenu = mcontext->menu();
@@ -4493,7 +4493,7 @@ static void appendMenuActionsFromContext(QMenu *menu, const Core::Id menuContext
menu->addAction(action);
}
-void BaseTextEditorWidget::showDefaultContextMenu(QContextMenuEvent *e, const Core::Id menuContextId)
+void BaseTextEditorWidget::showDefaultContextMenu(QContextMenuEvent *e, Core::Id menuContextId)
{
QMenu menu;
appendMenuActionsFromContext(&menu, menuContextId);
diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h
index 18b8bfb250..0fe282b03b 100644
--- a/src/plugins/texteditor/basetexteditor.h
+++ b/src/plugins/texteditor/basetexteditor.h
@@ -454,7 +454,7 @@ protected:
void dragEnterEvent(QDragEnterEvent *e);
- void showDefaultContextMenu(QContextMenuEvent *e, const Core::Id menuContextId);
+ void showDefaultContextMenu(QContextMenuEvent *e, Core::Id menuContextId);
public:
struct Link
diff --git a/src/plugins/texteditor/circularclipboardassist.cpp b/src/plugins/texteditor/circularclipboardassist.cpp
index 2b3b0a4362..e188f527ab 100644
--- a/src/plugins/texteditor/circularclipboardassist.cpp
+++ b/src/plugins/texteditor/circularclipboardassist.cpp
@@ -120,7 +120,7 @@ bool ClipboardAssistProvider::isAsynchronous() const
return false;
}
-bool ClipboardAssistProvider::supportsEditor(const Core::Id &/*editorId*/) const
+bool ClipboardAssistProvider::supportsEditor(Core::Id /*editorId*/) const
{
return true;
}
diff --git a/src/plugins/texteditor/circularclipboardassist.h b/src/plugins/texteditor/circularclipboardassist.h
index ac1abfee79..9a997e663b 100644
--- a/src/plugins/texteditor/circularclipboardassist.h
+++ b/src/plugins/texteditor/circularclipboardassist.h
@@ -41,7 +41,7 @@ class ClipboardAssistProvider: public IAssistProvider
{
public:
bool isAsynchronous() const;
- bool supportsEditor(const Core::Id &editorId) const QTC_OVERRIDE;
+ bool supportsEditor(Core::Id editorId) const QTC_OVERRIDE;
IAssistProcessor *createProcessor() const QTC_OVERRIDE;
};
diff --git a/src/plugins/texteditor/codeassist/codeassistant.cpp b/src/plugins/texteditor/codeassist/codeassistant.cpp
index c4b8ac0d07..a7c9d1b21d 100644
--- a/src/plugins/texteditor/codeassist/codeassistant.cpp
+++ b/src/plugins/texteditor/codeassist/codeassistant.cpp
@@ -56,7 +56,7 @@ using namespace Internal;
namespace {
template <class T>
-void filterEditorSpecificProviders(QList<T *> *providers, const Core::Id &editorId)
+void filterEditorSpecificProviders(QList<T *> *providers, Core::Id editorId)
{
typename QList<T *>::iterator it = providers->begin();
while (it != providers->end()) {
diff --git a/src/plugins/texteditor/codeassist/iassistprovider.cpp b/src/plugins/texteditor/codeassist/iassistprovider.cpp
index 5b36f39e85..ca7d6912a4 100644
--- a/src/plugins/texteditor/codeassist/iassistprovider.cpp
+++ b/src/plugins/texteditor/codeassist/iassistprovider.cpp
@@ -56,7 +56,7 @@ using namespace TextEditor;
*/
/*!
- \fn bool TextEditor::IAssistProvider::supportsEditor(const Core::Id &editorId) const
+ \fn bool TextEditor::IAssistProvider::supportsEditor(Core::Id editorId) const
Returns whether this provider supports the editor which has the \a editorId.
*/
diff --git a/src/plugins/texteditor/codeassist/iassistprovider.h b/src/plugins/texteditor/codeassist/iassistprovider.h
index 0a867e2672..e61892a18e 100644
--- a/src/plugins/texteditor/codeassist/iassistprovider.h
+++ b/src/plugins/texteditor/codeassist/iassistprovider.h
@@ -47,7 +47,7 @@ public:
IAssistProvider() {}
virtual bool isAsynchronous() const = 0;
- virtual bool supportsEditor(const Core::Id &editorId) const = 0;
+ virtual bool supportsEditor(Core::Id editorId) const = 0;
virtual IAssistProcessor *createProcessor() const = 0;
};
diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp
index 5ea1d31e05..941b87ede0 100644
--- a/src/plugins/texteditor/texteditoractionhandler.cpp
+++ b/src/plugins/texteditor/texteditoractionhandler.cpp
@@ -382,7 +382,7 @@ void TextEditorActionHandler::createActions()
m_unfoldAllAction->setEnabled(m_optionalActions & UnCollapseAll);
}
-QAction *TextEditorActionHandler::registerAction(const Core::Id &id,
+QAction *TextEditorActionHandler::registerAction(Core::Id id,
const char *slot,
bool scriptable,
const QString &title,
diff --git a/src/plugins/texteditor/texteditoractionhandler.h b/src/plugins/texteditor/texteditoractionhandler.h
index 5359401811..292eafe068 100644
--- a/src/plugins/texteditor/texteditoractionhandler.h
+++ b/src/plugins/texteditor/texteditoractionhandler.h
@@ -72,7 +72,7 @@ protected:
virtual BaseTextEditorWidget *resolveTextEditorWidget(Core::IEditor *editor) const;
private:
- QAction *registerAction(const Core::Id &id,
+ QAction *registerAction(Core::Id id,
const char *slot,
bool scriptable = false,
const QString &title = QString(),