forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -10,6 +10,11 @@
|
||||
<comment>Qt Project include file</comment>
|
||||
<glob pattern="*.pri"/>
|
||||
</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">
|
||||
<sub-class-of type="application/xml"/>
|
||||
<comment>message catalog</comment>
|
||||
|
||||
@@ -47,7 +47,8 @@ using namespace Qt4ProjectManager::Internal;
|
||||
|
||||
ProFileEditorFactory::ProFileEditorFactory(Qt4Manager *manager, TextEditor::TextEditorActionHandler *handler) :
|
||||
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_actionHandler(handler)
|
||||
{
|
||||
@@ -56,6 +57,8 @@ ProFileEditorFactory::ProFileEditorFactory(Qt4Manager *manager, TextEditor::Text
|
||||
QLatin1String("pro"));
|
||||
iconProvider->registerIconOverlayForSuffix(QIcon(":/qt4projectmanager/images/qt_project.png"),
|
||||
QLatin1String("pri"));
|
||||
iconProvider->registerIconOverlayForSuffix(QIcon(":/qt4projectmanager/images/qt_project.png"),
|
||||
QLatin1String("prf"));
|
||||
}
|
||||
|
||||
ProFileEditorFactory::~ProFileEditorFactory()
|
||||
|
||||
@@ -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_MIMETYPE = "application/vnd.nokia.qt.qmakeprofile";
|
||||
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_HEADER_MIMETYPE = "text/x-c++hdr";
|
||||
const char * const FORM_MIMETYPE = "application/x-designer";
|
||||
|
||||
Reference in New Issue
Block a user