Commit 1afae90c authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents 07bd36b6 c358a685
......@@ -225,7 +225,6 @@ void CppPlugin::writeSettings()
void CppPlugin::extensionsInitialized()
{
m_actionHandler->initializeActions();
}
void CppPlugin::shutdown()
......
......@@ -73,7 +73,7 @@ QWidget *CompletionSettingsPage::createPage(QWidget *parent)
m_page->setupUi(w);
m_page->caseSensitive->setChecked(m_completion->caseSensitivity() == Qt::CaseSensitive);
m_page->autoInsertBraces->setChecked(m_completion->autoInsertBraces());
m_page->autoInsertBrackets->setChecked(m_completion->autoInsertBrackets());
m_page->partiallyComplete->setChecked(m_completion->isPartialCompletionEnabled());
return w;
......@@ -83,6 +83,6 @@ void CompletionSettingsPage::apply()
{
m_completion->setCaseSensitivity(
m_page->caseSensitive->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive);
m_completion->setAutoInsertBraces(m_page->autoInsertBraces->isChecked());
m_completion->setAutoInsertBrackets(m_page->autoInsertBrackets->isChecked());
m_completion->setPartialCompletionEnabled(m_page->partiallyComplete->isChecked());
}
......@@ -31,12 +31,12 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="autoInsertBraces">
<widget class="QCheckBox" name="autoInsertBrackets">
<property name="toolTip">
<string>Automatically insert (, ) and ; when appropriate.</string>
</property>
<property name="text">
<string>&amp;Automatically insert braces</string>
<string>&amp;Automatically insert brackets</string>
</property>
<property name="checked">
<bool>true</bool>
......
......@@ -414,7 +414,7 @@ CppCodeCompletion::CppCodeCompletion(CppModelManager *manager)
: ICompletionCollector(manager),
m_manager(manager),
m_caseSensitivity(Qt::CaseSensitive),
m_autoInsertBraces(true),
m_autoInsertBrackets(true),
m_forcedCompletion(false),
m_completionOperator(T_EOF_SYMBOL)
{
......@@ -435,14 +435,14 @@ void CppCodeCompletion::setCaseSensitivity(Qt::CaseSensitivity caseSensitivity)
m_caseSensitivity = caseSensitivity;
}
bool CppCodeCompletion::autoInsertBraces() const
bool CppCodeCompletion::autoInsertBrackets() const
{
return m_autoInsertBraces;
return m_autoInsertBrackets;
}
void CppCodeCompletion::setAutoInsertBraces(bool autoInsertBraces)
void CppCodeCompletion::setAutoInsertBrackets(bool autoInsertBrackets)
{
m_autoInsertBraces = autoInsertBraces;
m_autoInsertBrackets = autoInsertBrackets;
}
bool CppCodeCompletion::isPartialCompletionEnabled() const
......@@ -1230,7 +1230,7 @@ void CppCodeCompletion::complete(const TextEditor::CompletionItem &item)
//qDebug() << "current symbol:" << overview.prettyName(symbol->name())
//<< overview.prettyType(symbol->type());
if (m_autoInsertBraces && symbol && symbol->type()) {
if (m_autoInsertBrackets && symbol && symbol->type()) {
QString extraChars;
if (Function *function = symbol->type()->asFunctionType()) {
......
......@@ -72,8 +72,8 @@ public:
Qt::CaseSensitivity caseSensitivity() const;
void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity);
bool autoInsertBraces() const;
void setAutoInsertBraces(bool autoInsertBraces);
bool autoInsertBrackets() const;
void setAutoInsertBrackets(bool autoInsertBrackets);
bool isPartialCompletionEnabled() const;
void setPartialCompletionEnabled(bool partialCompletionEnabled);
......@@ -125,7 +125,7 @@ private:
CppModelManager *m_manager;
Qt::CaseSensitivity m_caseSensitivity;
bool m_autoInsertBraces;
bool m_autoInsertBrackets;
bool m_partialCompletionEnabled;
bool m_forcedCompletion;
......
......@@ -119,7 +119,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
settings->beginGroup(QLatin1String("Completion"));
const bool caseSensitive = settings->value(QLatin1String("CaseSensitive"), true).toBool();
m_completion->setCaseSensitivity(caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive);
m_completion->setAutoInsertBraces(settings->value(QLatin1String("AutoInsertBraces"), true).toBool());
m_completion->setAutoInsertBrackets(settings->value(QLatin1String("AutoInsertBraces"), true).toBool());
m_completion->setPartialCompletionEnabled(settings->value(QLatin1String("PartiallyComplete"), true).toBool());
settings->endGroup();
settings->endGroup();
......@@ -143,7 +143,7 @@ void CppToolsPlugin::shutdown()
settings->beginGroup(QLatin1String("CppTools"));
settings->beginGroup(QLatin1String("Completion"));
settings->setValue(QLatin1String("CaseSensitive"), m_completion->caseSensitivity() == Qt::CaseSensitive);
settings->setValue(QLatin1String("AutoInsertBraces"), m_completion->autoInsertBraces());
settings->setValue(QLatin1String("AutoInsertBraces"), m_completion->autoInsertBrackets());
settings->setValue(QLatin1String("PartiallyComplete"), m_completion->isPartialCompletionEnabled());
settings->endGroup();
settings->endGroup();
......
......@@ -131,7 +131,6 @@ bool DuiEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
void DuiEditorPlugin::extensionsInitialized()
{
m_actionHandler->initializeActions();
}
void DuiEditorPlugin::initializeEditor(DuiEditor::Internal::ScriptEditor *editor)
......
......@@ -85,8 +85,3 @@ QStringList ProFileEditorFactory::mimeTypes() const
{
return m_mimeTypes;
}
void ProFileEditorFactory::initializeActions()
{
m_actionHandler->initializeActions();
}
......@@ -63,8 +63,6 @@ public:
inline Qt4Manager *qt4ProjectManager() const { return m_manager; }
void initializeActions();
private:
const QString m_kind;
const QStringList m_mimeTypes;
......
......@@ -185,7 +185,6 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
void Qt4ProjectManagerPlugin::extensionsInitialized()
{
m_qt4ProjectManager->init();
m_proFileEditorFactory->initializeActions();
}
void Qt4ProjectManagerPlugin::updateContextMenu(Project *project,
......
......@@ -128,7 +128,6 @@ bool QtScriptEditorPlugin::initialize(const QStringList & /*arguments*/, QString
void QtScriptEditorPlugin::extensionsInitialized()
{
m_actionHandler->initializeActions();
}
void QtScriptEditorPlugin::initializeEditor(QtScriptEditor::Internal::ScriptEditor *editor)
......
......@@ -992,7 +992,7 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
QTextCursor cursor = textCursor();
const QString text = e->text();
cursor.insertText(text);
indent(document(), cursor, QChar::Null);
indent(document(), cursor, text.at(0));
#if 0
TextEditDocumentLayout *documentLayout = qobject_cast<TextEditDocumentLayout*>(document()->documentLayout());
QTC_ASSERT(documentLayout, return);
......
......@@ -52,42 +52,41 @@ using namespace TextEditor::Internal;
TextEditorActionHandler::TextEditorActionHandler(const QString &context,
uint optionalActions)
: QObject(Core::ICore::instance()),
m_undoAction(0),
m_redoAction(0),
m_copyAction(0),
m_cutAction(0),
m_pasteAction(0),
m_selectAllAction(0),
m_gotoAction(0),
m_printAction(0),
m_formatAction(0),
m_visualizeWhitespaceAction(0),
m_cleanWhitespaceAction(0),
m_textWrappingAction(0),
m_unCommentSelectionAction(0),
m_unCollapseAllAction(0),
m_collapseAction(0),
m_expandAction(0),
m_cutLineAction(0),
m_deleteLineAction(0),
m_selectEncodingAction(0),
m_increaseFontSizeAction(0),
m_decreaseFontSizeAction(0),
m_gotoBlockStartAction(0),
m_gotoBlockEndAction(0),
m_gotoBlockStartWithSelectionAction(0),
m_gotoBlockEndWithSelectionAction(0),
m_selectBlockUpAction(0),
m_selectBlockDownAction(0),
m_moveLineUpAction(0),
m_moveLineDownAction(0),
m_copyLineUpAction(0),
m_copyLineDownAction(0),
m_optionalActions(optionalActions),
m_currentEditor(0),
m_initialized(false)
{
m_undoAction = 0;
m_redoAction = 0;
m_copyAction = 0;
m_cutAction = 0;
m_pasteAction = 0;
m_selectAllAction = 0;
m_gotoAction = 0;
m_printAction = 0;
m_formatAction = 0;
m_visualizeWhitespaceAction = 0;
m_cleanWhitespaceAction = 0;
m_textWrappingAction = 0;
m_unCommentSelectionAction = 0;
m_unCollapseAllAction = 0;
m_collapseAction = 0;
m_expandAction = 0;
m_cutLineAction = 0;
m_deleteLineAction = 0;
m_selectEncodingAction = 0;
m_increaseFontSizeAction = 0;
m_decreaseFontSizeAction = 0;
m_gotoBlockStartAction = 0;
m_gotoBlockStartWithSelectionAction = 0;
m_gotoBlockEndAction = 0;
m_gotoBlockEndWithSelectionAction = 0;
m_selectBlockUpAction = 0;
m_selectBlockDownAction = 0;
m_moveLineUpAction = 0;
m_moveLineDownAction = 0;
m_copyLineUpAction = 0;
m_copyLineDownAction = 0;
m_contextId << Core::UniqueIDManager::instance()->uniqueIdentifier(context);
connect(Core::ICore::instance()->editorManager(), SIGNAL(currentEditorChanged(Core::IEditor*)),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment