summaryrefslogtreecommitdiff
path: root/src/plugins/qmljseditor
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-02-15 13:39:41 +0100
committerRoberto Raggi <roberto.raggi@nokia.com>2010-02-15 13:39:41 +0100
commitd22610c724eaac331d1fac14536723ea508798bb (patch)
treecb018e6f514ff4ff32c40d4812be4c997dfdc90e /src/plugins/qmljseditor
parentd55e2707615c88078827381db0a234c6322e10e2 (diff)
downloadqt-creator-d22610c724eaac331d1fac14536723ea508798bb.tar.gz
Renamed qmlcodecompletion.
Diffstat (limited to 'src/plugins/qmljseditor')
-rw-r--r--src/plugins/qmljseditor/qmljscodecompletion.cpp (renamed from src/plugins/qmljseditor/qmlcodecompletion.cpp)38
-rw-r--r--src/plugins/qmljseditor/qmljscodecompletion.h (renamed from src/plugins/qmljseditor/qmlcodecompletion.h)12
-rw-r--r--src/plugins/qmljseditor/qmljseditor.pro4
-rw-r--r--src/plugins/qmljseditor/qmljseditorplugin.cpp4
-rw-r--r--src/plugins/qmljseditor/qmljseditorplugin.h4
5 files changed, 31 insertions, 31 deletions
diff --git a/src/plugins/qmljseditor/qmlcodecompletion.cpp b/src/plugins/qmljseditor/qmljscodecompletion.cpp
index 82f322472f..b7fcd8797b 100644
--- a/src/plugins/qmljseditor/qmlcodecompletion.cpp
+++ b/src/plugins/qmljseditor/qmljscodecompletion.cpp
@@ -27,7 +27,7 @@
**
**************************************************************************/
-#include "qmlcodecompletion.h"
+#include "qmljscodecompletion.h"
#include "qmlexpressionundercursor.h"
#include "qmljseditor.h"
#include "qmlmodelmanagerinterface.h"
@@ -508,7 +508,7 @@ void FunctionArgumentWidget::updateHintText()
} } // end of namespace QmlJSEditor::Internal
-QmlCodeCompletion::QmlCodeCompletion(QmlModelManagerInterface *modelManager, QObject *parent)
+CodeCompletion::CodeCompletion(QmlModelManagerInterface *modelManager, QObject *parent)
: TextEditor::ICompletionCollector(parent),
m_modelManager(modelManager),
m_editor(0),
@@ -518,25 +518,25 @@ QmlCodeCompletion::QmlCodeCompletion(QmlModelManagerInterface *modelManager, QOb
Q_ASSERT(modelManager);
}
-QmlCodeCompletion::~QmlCodeCompletion()
+CodeCompletion::~CodeCompletion()
{ }
-Qt::CaseSensitivity QmlCodeCompletion::caseSensitivity() const
+Qt::CaseSensitivity CodeCompletion::caseSensitivity() const
{ return m_caseSensitivity; }
-void QmlCodeCompletion::setCaseSensitivity(Qt::CaseSensitivity caseSensitivity)
+void CodeCompletion::setCaseSensitivity(Qt::CaseSensitivity caseSensitivity)
{ m_caseSensitivity = caseSensitivity; }
-TextEditor::ITextEditable *QmlCodeCompletion::editor() const
+TextEditor::ITextEditable *CodeCompletion::editor() const
{ return m_editor; }
-int QmlCodeCompletion::startPosition() const
+int CodeCompletion::startPosition() const
{ return m_startPosition; }
-bool QmlCodeCompletion::shouldRestartCompletion()
+bool CodeCompletion::shouldRestartCompletion()
{ return false; }
-bool QmlCodeCompletion::supportsEditor(TextEditor::ITextEditable *editor)
+bool CodeCompletion::supportsEditor(TextEditor::ITextEditable *editor)
{
if (qobject_cast<QmlJSTextEditor *>(editor->widget()))
return true;
@@ -544,7 +544,7 @@ bool QmlCodeCompletion::supportsEditor(TextEditor::ITextEditable *editor)
return false;
}
-bool QmlCodeCompletion::triggersCompletion(TextEditor::ITextEditable *editor)
+bool CodeCompletion::triggersCompletion(TextEditor::ITextEditable *editor)
{
if (maybeTriggersCompletion(editor)) {
// check the token under cursor
@@ -574,7 +574,7 @@ bool QmlCodeCompletion::triggersCompletion(TextEditor::ITextEditable *editor)
return false;
}
-bool QmlCodeCompletion::maybeTriggersCompletion(TextEditor::ITextEditable *editor)
+bool CodeCompletion::maybeTriggersCompletion(TextEditor::ITextEditable *editor)
{
const int cursorPosition = editor->position();
const QChar ch = editor->characterAt(cursorPosition - 1);
@@ -607,7 +607,7 @@ bool QmlCodeCompletion::maybeTriggersCompletion(TextEditor::ITextEditable *edito
return false;
}
-bool QmlCodeCompletion::isDelimiter(const QChar &ch) const
+bool CodeCompletion::isDelimiter(const QChar &ch) const
{
switch (ch.unicode()) {
case '{':
@@ -627,7 +627,7 @@ bool QmlCodeCompletion::isDelimiter(const QChar &ch) const
}
}
-int QmlCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
+int CodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
{
m_editor = editor;
@@ -755,7 +755,7 @@ int QmlCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
return -1;
}
-void QmlCodeCompletion::completions(QList<TextEditor::CompletionItem> *completions)
+void CodeCompletion::completions(QList<TextEditor::CompletionItem> *completions)
{
const int length = m_editor->position() - m_startPosition;
@@ -768,7 +768,7 @@ void QmlCodeCompletion::completions(QList<TextEditor::CompletionItem> *completio
}
}
-void QmlCodeCompletion::complete(const TextEditor::CompletionItem &item)
+void CodeCompletion::complete(const TextEditor::CompletionItem &item)
{
QString toInsert = item.text;
@@ -792,7 +792,7 @@ void QmlCodeCompletion::complete(const TextEditor::CompletionItem &item)
m_editor->replace(length, toInsert);
}
-bool QmlCodeCompletion::partiallyComplete(const QList<TextEditor::CompletionItem> &completionItems)
+bool CodeCompletion::partiallyComplete(const QList<TextEditor::CompletionItem> &completionItems)
{
if (completionItems.count() == 1) {
const TextEditor::CompletionItem item = completionItems.first();
@@ -806,7 +806,7 @@ bool QmlCodeCompletion::partiallyComplete(const QList<TextEditor::CompletionItem
return TextEditor::ICompletionCollector::partiallyComplete(completionItems);
}
-void QmlCodeCompletion::cleanup()
+void CodeCompletion::cleanup()
{
m_editor = 0;
m_startPosition = 0;
@@ -814,7 +814,7 @@ void QmlCodeCompletion::cleanup()
}
-void QmlCodeCompletion::updateSnippets()
+void CodeCompletion::updateSnippets()
{
QString qmlsnippets = Core::ICore::instance()->resourcePath() + QLatin1String("/snippets/qml.xml");
if (!QFile::exists(qmlsnippets))
@@ -891,7 +891,7 @@ static bool qmlCompletionItemLessThan(const TextEditor::CompletionItem &l, const
return l.text < r.text;
}
-QList<TextEditor::CompletionItem> QmlCodeCompletion::getCompletions()
+QList<TextEditor::CompletionItem> CodeCompletion::getCompletions()
{
QList<TextEditor::CompletionItem> completionItems;
diff --git a/src/plugins/qmljseditor/qmlcodecompletion.h b/src/plugins/qmljseditor/qmljscodecompletion.h
index e5e5d95962..34f5a0ee3f 100644
--- a/src/plugins/qmljseditor/qmlcodecompletion.h
+++ b/src/plugins/qmljseditor/qmljscodecompletion.h
@@ -27,8 +27,8 @@
**
**************************************************************************/
-#ifndef QMLCODECOMPLETION_H
-#define QMLCODECOMPLETION_H
+#ifndef QMLJSCODECOMPLETION_H
+#define QMLJSCODECOMPLETION_H
#include <qmljs/qmljsdocument.h>
#include <texteditor/icompletioncollector.h>
@@ -47,13 +47,13 @@ namespace Internal {
class FunctionArgumentWidget;
-class QmlCodeCompletion: public TextEditor::ICompletionCollector
+class CodeCompletion: public TextEditor::ICompletionCollector
{
Q_OBJECT
public:
- QmlCodeCompletion(QmlModelManagerInterface *modelManager, QObject *parent = 0);
- virtual ~QmlCodeCompletion();
+ CodeCompletion(QmlModelManagerInterface *modelManager, QObject *parent = 0);
+ virtual ~CodeCompletion();
Qt::CaseSensitivity caseSensitivity() const;
void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity);
@@ -92,4 +92,4 @@ private:
} // end of namespace Internal
} // end of namespace QmlJSEditor
-#endif // QMLCODECOMPLETION_H
+#endif // QMLJSCODECOMPLETION_H
diff --git a/src/plugins/qmljseditor/qmljseditor.pro b/src/plugins/qmljseditor/qmljseditor.pro
index f6c39877ea..c1d3292a75 100644
--- a/src/plugins/qmljseditor/qmljseditor.pro
+++ b/src/plugins/qmljseditor/qmljseditor.pro
@@ -9,7 +9,7 @@ DEFINES += \
QT_CREATOR
HEADERS += \
- qmlcodecompletion.h \
+ qmljscodecompletion.h \
qmljseditor.h \
qmljseditor_global.h \
qmljseditoractionhandler.h \
@@ -24,7 +24,7 @@ HEADERS += \
qmlmodelmanagerinterface.h
SOURCES += \
- qmlcodecompletion.cpp \
+ qmljscodecompletion.cpp \
qmljseditor.cpp \
qmljseditoractionhandler.cpp \
qmljseditorfactory.cpp \
diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp
index 38cb76457f..ad592f3cec 100644
--- a/src/plugins/qmljseditor/qmljseditorplugin.cpp
+++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp
@@ -33,7 +33,7 @@
#include "qmljseditor.h"
#include "qmljseditorconstants.h"
#include "qmljseditorfactory.h"
-#include "qmlcodecompletion.h"
+#include "qmljscodecompletion.h"
#include "qmlhoverhandler.h"
#include "qmlmodelmanager.h"
#include "qmlfilewizard.h"
@@ -131,7 +131,7 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e
cmd = am->command(TextEditor::Constants::UN_COMMENT_SELECTION);
contextMenu->addAction(cmd);
- m_completion = new QmlCodeCompletion(m_modelManager);
+ m_completion = new CodeCompletion(m_modelManager);
addAutoReleasedObject(m_completion);
addAutoReleasedObject(new QmlHoverHandler());
diff --git a/src/plugins/qmljseditor/qmljseditorplugin.h b/src/plugins/qmljseditor/qmljseditorplugin.h
index 700842898b..dbdcfce77f 100644
--- a/src/plugins/qmljseditor/qmljseditorplugin.h
+++ b/src/plugins/qmljseditor/qmljseditorplugin.h
@@ -44,7 +44,7 @@ class QmlFileWizard;
namespace Internal {
class QmlJSEditorFactory;
-class QmlCodeCompletion;
+class CodeCompletion;
class QmlJSTextEditor;
class QmlJSEditorPlugin : public ExtensionSystem::IPlugin
@@ -74,7 +74,7 @@ private:
QmlFileWizard *m_wizard;
QmlJSEditorFactory *m_editor;
TextEditor::TextEditorActionHandler *m_actionHandler;
- QmlCodeCompletion *m_completion;
+ CodeCompletion *m_completion;
};
} // namespace Internal