~ubuntu-sdk-team/qtcreator-plugin-remotelinux/trunk

« back to all changes in this revision

Viewing changes to src/qnx/bardescriptoreditorfactory.cpp

  • Committer: CI bot
  • Author(s): Benjamin Zeller
  • Date: 2014-06-16 10:28:43 UTC
  • mfrom: (4.2.4 remotelinux)
  • Revision ID: ps-jenkins@lists.canonical.com-20140616102843-8juvmjvzwlzsboyw
Migrating to Qt5.3 and QtC 3.1 

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include "bardescriptoreditorfactory.h"
33
33
 
34
34
#include "qnxconstants.h"
 
35
#include "bardescriptoreditor.h"
35
36
#include "bardescriptoreditorwidget.h"
36
37
 
37
38
#include <coreplugin/editormanager/editormanager.h>
44
45
class BarDescriptorActionHandler : public TextEditor::TextEditorActionHandler
45
46
{
46
47
public:
47
 
    BarDescriptorActionHandler()
48
 
        : TextEditor::TextEditorActionHandler(Constants::QNX_BAR_DESCRIPTOR_EDITOR_CONTEXT)
 
48
    BarDescriptorActionHandler(QObject *parent)
 
49
        : TextEditor::TextEditorActionHandler(parent, Constants::QNX_BAR_DESCRIPTOR_EDITOR_CONTEXT)
49
50
    {
50
51
    }
51
52
protected:
58
59
 
59
60
BarDescriptorEditorFactory::BarDescriptorEditorFactory(QObject *parent)
60
61
    : Core::IEditorFactory(parent)
61
 
    , m_actionHandler(new BarDescriptorActionHandler)
62
62
{
63
63
    setId(Constants::QNX_BAR_DESCRIPTOR_EDITOR_ID);
64
64
    setDisplayName(tr("Bar descriptor editor"));
65
65
    addMimeType(Constants::QNX_BAR_DESCRIPTOR_MIME_TYPE);
66
 
}
67
 
 
68
 
BarDescriptorEditorFactory::~BarDescriptorEditorFactory()
69
 
{
70
 
    delete m_actionHandler;
71
 
}
72
 
 
73
 
Core::IEditor *BarDescriptorEditorFactory::createEditor(QWidget *parent)
74
 
{
75
 
    BarDescriptorEditorWidget *editorWidget = new BarDescriptorEditorWidget(parent, m_actionHandler);
76
 
    return editorWidget->editor();
 
66
    new BarDescriptorActionHandler(this);
 
67
}
 
68
 
 
69
Core::IEditor *BarDescriptorEditorFactory::createEditor()
 
70
{
 
71
    BarDescriptorEditor *editor = new BarDescriptorEditor();
 
72
    return editor;
77
73
}