diff options
author | mae <qt-info@nokia.com> | 2009-11-09 16:47:48 +0100 |
---|---|---|
committer | mae <qt-info@nokia.com> | 2009-11-09 17:36:17 +0100 |
commit | a0bb57f27adc761fab013196aa0354d039e3d306 (patch) | |
tree | f142bfc92aec089d34c445621a4be0c0adcabe67 | |
parent | 8ee769a3bc5b15226e09a78537ad4548cfe7a5e7 (diff) | |
download | qt-creator-a0bb57f27adc761fab013196aa0354d039e3d306.tar.gz |
remove run action in the scripteditor
the action is not needed and conflicts with Ctrl+R of the project
manager.
6 files changed, 8 insertions, 22 deletions
diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp index 413122224b..586e894ba9 100644 --- a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp @@ -104,6 +104,7 @@ bool Qt4RunConfiguration::isEnabled(ProjectExplorer::BuildConfiguration *configu && type != ProjectExplorer::ToolChain::RVCT_ARMV5 && type != ProjectExplorer::ToolChain::RVCT_ARMV6; #else + Q_UNUSED(configuration); return true; #endif } diff --git a/src/plugins/qtscripteditor/qtscripteditor.cpp b/src/plugins/qtscripteditor/qtscripteditor.cpp index 403571b14c..fbd91ab062 100644 --- a/src/plugins/qtscripteditor/qtscripteditor.cpp +++ b/src/plugins/qtscripteditor/qtscripteditor.cpp @@ -395,7 +395,7 @@ void ScriptEditor::createToolBar(ScriptEditorEditable *editable) void ScriptEditor::contextMenuEvent(QContextMenuEvent *e) { - QMenu *menu = createStandardContextMenu(); + QMenu *menu = new QMenu(); if (Core::ActionContainer *mcontext = Core::ICore::instance()->actionManager()->actionContainer(QtScriptEditor::Constants::M_CONTEXT)) { QMenu *contextMenu = mcontext->menu(); @@ -403,6 +403,7 @@ void ScriptEditor::contextMenuEvent(QContextMenuEvent *e) menu->addAction(action); } + appendStandardContextMenuActions(menu); menu->exec(e->globalPos()); delete menu; } diff --git a/src/plugins/qtscripteditor/qtscripteditoractionhandler.cpp b/src/plugins/qtscripteditor/qtscripteditoractionhandler.cpp index b00ac381eb..3c48ea9b25 100644 --- a/src/plugins/qtscripteditor/qtscripteditoractionhandler.cpp +++ b/src/plugins/qtscripteditor/qtscripteditoractionhandler.cpp @@ -40,6 +40,7 @@ #include <QtGui/QMainWindow> #include <QtGui/QMessageBox> +#if 0 static QAction *actionFromId(const QString &id) { Core::Command *cmd = Core::ICore::instance()->actionManager()->command(id); @@ -47,22 +48,20 @@ static QAction *actionFromId(const QString &id) return 0; return cmd->action(); } +#endif namespace QtScriptEditor { namespace Internal { QtScriptEditorActionHandler::QtScriptEditorActionHandler() : TextEditor::TextEditorActionHandler(QLatin1String(QtScriptEditor::Constants::C_QTSCRIPTEDITOR), - Format), - m_runAction(0) + Format) { } void QtScriptEditorActionHandler::createActions() { TextEditor::TextEditorActionHandler::createActions(); - m_runAction = actionFromId(QLatin1String(QtScriptEditor::Constants::RUN)); - connect(m_runAction, SIGNAL(triggered()), this, SLOT(run())); } diff --git a/src/plugins/qtscripteditor/qtscripteditoractionhandler.h b/src/plugins/qtscripteditor/qtscripteditoractionhandler.h index 3272a77c2f..8e94c2a454 100644 --- a/src/plugins/qtscripteditor/qtscripteditoractionhandler.h +++ b/src/plugins/qtscripteditor/qtscripteditoractionhandler.h @@ -47,9 +47,6 @@ private: private slots: void run(); - -private: - QAction *m_runAction; }; } // namespace Internal diff --git a/src/plugins/qtscripteditor/qtscripteditorconstants.h b/src/plugins/qtscripteditor/qtscripteditorconstants.h index 401697a814..0c7704ba0d 100644 --- a/src/plugins/qtscripteditor/qtscripteditorconstants.h +++ b/src/plugins/qtscripteditor/qtscripteditorconstants.h @@ -34,8 +34,6 @@ namespace QtScriptEditor { namespace Constants { const char * const M_CONTEXT = "Qt Script Editor.ContextMenu"; -const char * const RUN = "QtScriptEditor.Run"; -const char * const RUN_SEP = "QtScriptEditor.Run.Separator"; const char * const C_QTSCRIPTEDITOR = "Qt Script Editor"; const char * const C_QTSCRIPTEDITOR_MIMETYPE = "application/javascript"; diff --git a/src/plugins/qtscripteditor/qtscripteditorplugin.cpp b/src/plugins/qtscripteditor/qtscripteditorplugin.cpp index c3c06b7280..5ff65d9bc4 100644 --- a/src/plugins/qtscripteditor/qtscripteditorplugin.cpp +++ b/src/plugins/qtscripteditor/qtscripteditorplugin.cpp @@ -145,18 +145,8 @@ void QtScriptEditorPlugin::initializeEditor(QtScriptEditor::Internal::ScriptEdit void QtScriptEditorPlugin::registerActions() { - Core::ActionManager *am = Core::ICore::instance()->actionManager(); - Core::ActionContainer *mcontext = am->createMenu(QtScriptEditor::Constants::M_CONTEXT); - - QAction *action = new QAction(this); - action->setSeparator(true); - Core::Command *cmd = am->registerAction(action, QtScriptEditor::Constants::RUN_SEP, m_scriptcontext); - mcontext->addAction(cmd, Core::Constants::G_DEFAULT_THREE); - - action = new QAction(tr("Run"), this); - cmd = am->registerAction(action, QtScriptEditor::Constants::RUN, m_scriptcontext); - cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+R"))); - mcontext->addAction(cmd, Core::Constants::G_DEFAULT_THREE); +// Core::ActionManager *am = Core::ICore::instance()->actionManager(); +// Core::ActionContainer *mcontext = am->createMenu(QtScriptEditor::Constants::M_CONTEXT); } Q_EXPORT_PLUGIN(QtScriptEditorPlugin) |