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
This commit is contained in:
con
2010-04-08 15:21:05 +02:00
parent 60b8598676
commit 5892049d65
3 changed files with 0 additions and 28 deletions

View File

@@ -145,30 +145,6 @@ void ExpressionQueryWidget::setFontSettings()
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)
{
m_client = client;

View File

@@ -68,7 +68,6 @@ public:
ExpressionQueryWidget(Mode mode = SeparateEntryMode, QDeclarativeEngineDebug *client = 0, QWidget *parent = 0);
void createCommands(Core::IContext *context);
void setEngineDebug(QDeclarativeEngineDebug *client);
void clear();
@@ -85,7 +84,6 @@ private slots:
void clearTextEditor();
void executeExpression();
void showResult();
void invokeCompletion();
void changeContextHelpId(const QString &text);
private:

View File

@@ -397,8 +397,6 @@ void QmlInspector::createDockWidgets()
core->addContextObject(m_propWatcherContext);
core->addContextObject(m_context);
m_expressionWidget->createCommands(m_context);
connect(m_objectTreeWidget, SIGNAL(contextHelpIdChanged(QString)), m_context,
SLOT(setContextHelpId(QString)));
connect(m_watchTableView, SIGNAL(contextHelpIdChanged(QString)), m_propWatcherContext,