Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
ceaa92ec
Commit
ceaa92ec
authored
Oct 13, 2009
by
dt
Browse files
Set correct mime type for C++ files.
parent
1653e287
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
ceaa92ec
...
...
@@ -67,6 +67,7 @@
#include
<coreplugin/actionmanager/actionmanager.h>
#include
<coreplugin/editormanager/ieditor.h>
#include
<coreplugin/editormanager/editormanager.h>
#include
<coreplugin/mimedatabase.h>
#include
<utils/uncommentselection.h>
#include
<extensionsystem/pluginmanager.h>
#include
<projectexplorer/projectexplorerconstants.h>
...
...
@@ -1751,6 +1752,13 @@ const char *CPPEditorEditable::kind() const
return
CppEditor
::
Constants
::
CPPEDITOR_KIND
;
}
bool
CPPEditorEditable
::
open
(
const
QString
&
fileName
)
{
bool
b
=
TextEditor
::
BaseTextEditorEditable
::
open
(
fileName
);
editor
()
->
setMimeType
(
Core
::
ICore
::
instance
()
->
mimeDatabase
()
->
findByFile
(
QFileInfo
(
fileName
)).
type
());
return
b
;
}
void
CPPEditor
::
setFontSettings
(
const
TextEditor
::
FontSettings
&
fs
)
{
TextEditor
::
BaseTextEditor
::
setFontSettings
(
fs
);
...
...
src/plugins/cppeditor/cppeditor.h
View file @
ceaa92ec
...
...
@@ -164,6 +164,7 @@ public:
const
char
*
kind
()
const
;
bool
isTemporary
()
const
{
return
false
;
}
virtual
bool
open
(
const
QString
&
fileName
);
private:
QList
<
int
>
m_context
;
...
...
src/plugins/cppeditor/cppplugin.cpp
View file @
ceaa92ec
...
...
@@ -97,7 +97,6 @@ Core::IEditor *CppEditorFactory::createEditor(QWidget *parent)
{
CPPEditor
*
editor
=
new
CPPEditor
(
parent
);
editor
->
setRevisionsVisible
(
true
);
editor
->
setMimeType
(
CppEditor
::
Constants
::
CPP_SOURCE_MIMETYPE
);
m_owner
->
initializeEditor
(
editor
);
return
editor
->
editableInterface
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment