Skip to content
Snippets Groups Projects
Commit 5892049d authored by con's avatar con
Browse files

Remove the unused complete this shortcut registered by the qml inspector.

It was conflicting with the normal completion shortcut, and it shouldn't
register a new command anyhow.

Reviewed-by: Lasse Holmstedt
parent 60b85986
No related branches found
No related tags found
No related merge requests found
...@@ -145,30 +145,6 @@ void ExpressionQueryWidget::setFontSettings() ...@@ -145,30 +145,6 @@ void ExpressionQueryWidget::setFontSettings()
m_lineEdit->setFont(fs.font()); m_lineEdit->setFont(fs.font());
} }
void ExpressionQueryWidget::createCommands(Core::IContext *context)
{
Core::ICore *core = Core::ICore::instance();
Core::ActionManager *am = core->actionManager();
// Add shortcut for invoking automatic completion
QShortcut *completionShortcut = new QShortcut(m_lineEdit);
completionShortcut->setWhatsThis(tr("Triggers a completion in this scope"));
// Make sure the shortcut still works when the completion widget is active
completionShortcut->setContext(Qt::ApplicationShortcut);
Core::Command *command = am->registerShortcut(completionShortcut, Qml::Constants::COMPLETE_THIS, context->context());
#ifndef Q_WS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Space")));
#else
command->setDefaultKeySequence(QKeySequence(tr("Meta+Space")));
#endif
connect(completionShortcut, SIGNAL(activated()), this, SLOT(invokeCompletion()));
}
void ExpressionQueryWidget::invokeCompletion()
{
qDebug() << "TODO autocomplete";
}
void ExpressionQueryWidget::setEngineDebug(QDeclarativeEngineDebug *client) void ExpressionQueryWidget::setEngineDebug(QDeclarativeEngineDebug *client)
{ {
m_client = client; m_client = client;
......
...@@ -68,7 +68,6 @@ public: ...@@ -68,7 +68,6 @@ public:
ExpressionQueryWidget(Mode mode = SeparateEntryMode, QDeclarativeEngineDebug *client = 0, QWidget *parent = 0); ExpressionQueryWidget(Mode mode = SeparateEntryMode, QDeclarativeEngineDebug *client = 0, QWidget *parent = 0);
void createCommands(Core::IContext *context);
void setEngineDebug(QDeclarativeEngineDebug *client); void setEngineDebug(QDeclarativeEngineDebug *client);
void clear(); void clear();
...@@ -85,7 +84,6 @@ private slots: ...@@ -85,7 +84,6 @@ private slots:
void clearTextEditor(); void clearTextEditor();
void executeExpression(); void executeExpression();
void showResult(); void showResult();
void invokeCompletion();
void changeContextHelpId(const QString &text); void changeContextHelpId(const QString &text);
private: private:
......
...@@ -397,8 +397,6 @@ void QmlInspector::createDockWidgets() ...@@ -397,8 +397,6 @@ void QmlInspector::createDockWidgets()
core->addContextObject(m_propWatcherContext); core->addContextObject(m_propWatcherContext);
core->addContextObject(m_context); core->addContextObject(m_context);
m_expressionWidget->createCommands(m_context);
connect(m_objectTreeWidget, SIGNAL(contextHelpIdChanged(QString)), m_context, connect(m_objectTreeWidget, SIGNAL(contextHelpIdChanged(QString)), m_context,
SLOT(setContextHelpId(QString))); SLOT(setContextHelpId(QString)));
connect(m_watchTableView, SIGNAL(contextHelpIdChanged(QString)), m_propWatcherContext, connect(m_watchTableView, SIGNAL(contextHelpIdChanged(QString)), m_propWatcherContext,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment