Skip to content
Snippets Groups Projects
Commit 0afe76a6 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Open .prf files in the pro file editor

This fixes QTCREATORBUG-1434, but it's more of a workaround than a fix.
The problem was that the file was opened in the diff editor due to a
broken diff detection, and the diff editor in turn has a bug in that
it's kind of halfway read-only.

Reviewed-by: ossi
Task-number: QTCREATORBUG-1434
parent 74bd95d3
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
<comment>Qt Project include file</comment> <comment>Qt Project include file</comment>
<glob pattern="*.pri"/> <glob pattern="*.pri"/>
</mime-type> </mime-type>
<mime-type type="application/vnd.nokia.qt.qmakeprofeaturefile">
<sub-class-of type="text/plain"/>
<comment>Qt Project feature file</comment>
<glob pattern="*.prf"/>
</mime-type>
<mime-type type="application/x-linguist"> <mime-type type="application/x-linguist">
<sub-class-of type="application/xml"/> <sub-class-of type="application/xml"/>
<comment>message catalog</comment> <comment>message catalog</comment>
......
...@@ -47,7 +47,8 @@ using namespace Qt4ProjectManager::Internal; ...@@ -47,7 +47,8 @@ using namespace Qt4ProjectManager::Internal;
ProFileEditorFactory::ProFileEditorFactory(Qt4Manager *manager, TextEditor::TextEditorActionHandler *handler) : ProFileEditorFactory::ProFileEditorFactory(Qt4Manager *manager, TextEditor::TextEditorActionHandler *handler) :
m_mimeTypes(QStringList() << QLatin1String(Qt4ProjectManager::Constants::PROFILE_MIMETYPE) m_mimeTypes(QStringList() << QLatin1String(Qt4ProjectManager::Constants::PROFILE_MIMETYPE)
<< QLatin1String(Qt4ProjectManager::Constants::PROINCLUDEFILE_MIMETYPE)), << QLatin1String(Qt4ProjectManager::Constants::PROINCLUDEFILE_MIMETYPE)
<< QLatin1String(Qt4ProjectManager::Constants::PROFEATUREFILE_MIMETYPE)),
m_manager(manager), m_manager(manager),
m_actionHandler(handler) m_actionHandler(handler)
{ {
...@@ -56,6 +57,8 @@ ProFileEditorFactory::ProFileEditorFactory(Qt4Manager *manager, TextEditor::Text ...@@ -56,6 +57,8 @@ ProFileEditorFactory::ProFileEditorFactory(Qt4Manager *manager, TextEditor::Text
QLatin1String("pro")); QLatin1String("pro"));
iconProvider->registerIconOverlayForSuffix(QIcon(":/qt4projectmanager/images/qt_project.png"), iconProvider->registerIconOverlayForSuffix(QIcon(":/qt4projectmanager/images/qt_project.png"),
QLatin1String("pri")); QLatin1String("pri"));
iconProvider->registerIconOverlayForSuffix(QIcon(":/qt4projectmanager/images/qt_project.png"),
QLatin1String("prf"));
} }
ProFileEditorFactory::~ProFileEditorFactory() ProFileEditorFactory::~ProFileEditorFactory()
......
...@@ -45,6 +45,7 @@ const char * const PROFILE_EDITOR_ID = "Qt4.proFileEditor"; ...@@ -45,6 +45,7 @@ const char * const PROFILE_EDITOR_ID = "Qt4.proFileEditor";
const char * const PROFILE_EDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", ".pro File Editor"); const char * const PROFILE_EDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", ".pro File Editor");
const char * const PROFILE_MIMETYPE = "application/vnd.nokia.qt.qmakeprofile"; const char * const PROFILE_MIMETYPE = "application/vnd.nokia.qt.qmakeprofile";
const char * const PROINCLUDEFILE_MIMETYPE = "application/vnd.nokia.qt.qmakeproincludefile"; const char * const PROINCLUDEFILE_MIMETYPE = "application/vnd.nokia.qt.qmakeproincludefile";
const char * const PROFEATUREFILE_MIMETYPE = "application/vnd.nokia.qt.qmakeprofeaturefile";
const char * const CPP_SOURCE_MIMETYPE = "text/x-c++src"; const char * const CPP_SOURCE_MIMETYPE = "text/x-c++src";
const char * const CPP_HEADER_MIMETYPE = "text/x-c++hdr"; const char * const CPP_HEADER_MIMETYPE = "text/x-c++hdr";
const char * const FORM_MIMETYPE = "application/x-designer"; const char * const FORM_MIMETYPE = "application/x-designer";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment