summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libs/cplusplus/TypeOfExpression.cpp3
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp28
2 files changed, 16 insertions, 15 deletions
diff --git a/src/libs/cplusplus/TypeOfExpression.cpp b/src/libs/cplusplus/TypeOfExpression.cpp
index 2672bfb105..7dd669365f 100644
--- a/src/libs/cplusplus/TypeOfExpression.cpp
+++ b/src/libs/cplusplus/TypeOfExpression.cpp
@@ -91,7 +91,8 @@ Document::Ptr TypeOfExpression::documentForExpression(const QString &expression)
{
// create the expression's AST.
Document::Ptr doc = Document::create(QLatin1String("<completion>"));
- doc->setSource(expression.toUtf8());
+ const QByteArray bytes = expression.toUtf8();
+ doc->setSource(bytes);
doc->parse(Document::ParseExpression);
return doc;
}
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 0092513693..1593847ef8 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -74,20 +74,6 @@ using namespace Core::Internal;
enum { debugEditorManager=0 };
-QString EditorManager::defaultExternalEditor() const
-{
-#ifdef Q_OS_MAC
- return m_d->m_core->resourcePath()
- +QLatin1String("/runInTerminal.command vi %f %l %c %W %H %x %y");
-#elif defined(Q_OS_UNIX)
- return QLatin1String("xterm -geom %Wx%H+%x+%y -e vi %f +%l +\"normal %c|\"");
-#elif defined (Q_OS_WIN)
- return QLatin1String("notepad %f");
-#else
- return QString();
-#endif
-}
-
//===================EditorManager=====================
EditorManagerPlaceHolder *EditorManagerPlaceHolder::m_current = 0;
@@ -388,6 +374,20 @@ QSize EditorManager::minimumSizeHint() const
return QSize(400, 300);
}
+QString EditorManager::defaultExternalEditor() const
+{
+#ifdef Q_OS_MAC
+ return m_d->m_core->resourcePath()
+ +QLatin1String("/runInTerminal.command vi %f %l %c %W %H %x %y");
+#elif defined(Q_OS_UNIX)
+ return QLatin1String("xterm -geom %Wx%H+%x+%y -e vi %f +%l +\"normal %c|\"");
+#elif defined (Q_OS_WIN)
+ return QLatin1String("notepad %f");
+#else
+ return QString();
+#endif
+}
+
EditorSplitter *EditorManager::editorSplitter() const
{
return m_d->m_splitter;