forked from qt-creator/qt-creator
TextEditor: Move toolbar widgets from *Editor to *Widget
Lifetime is coupled to the widgets, not the editor. Change-Id: I01560bbdd6c399376d3a4184f0eb83e4153f830e Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -277,8 +277,8 @@ void CppEditorWidget::createToolBar(CPPEditor *editor)
|
|||||||
connect(cmd, SIGNAL(keySequenceChanged()), this, SLOT(updatePreprocessorButtonTooltip()));
|
connect(cmd, SIGNAL(keySequenceChanged()), this, SLOT(updatePreprocessorButtonTooltip()));
|
||||||
updatePreprocessorButtonTooltip();
|
updatePreprocessorButtonTooltip();
|
||||||
connect(d->m_preprocessorButton, SIGNAL(clicked()), this, SLOT(showPreProcessorWidget()));
|
connect(d->m_preprocessorButton, SIGNAL(clicked()), this, SLOT(showPreProcessorWidget()));
|
||||||
editor->insertExtraToolBarWidget(TextEditor::BaseTextEditor::Left, d->m_preprocessorButton);
|
insertExtraToolBarWidget(TextEditor::BaseTextEditorWidget::Left, d->m_preprocessorButton);
|
||||||
editor->insertExtraToolBarWidget(TextEditor::BaseTextEditor::Left, d->m_cppEditorOutline->widget());
|
insertExtraToolBarWidget(TextEditor::BaseTextEditorWidget::Left, d->m_cppEditorOutline->widget());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppEditorWidget::paste()
|
void CppEditorWidget::paste()
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ void GlslEditorWidget::createToolBar(GlslEditor *editor)
|
|||||||
policy.setHorizontalPolicy(QSizePolicy::Expanding);
|
policy.setHorizontalPolicy(QSizePolicy::Expanding);
|
||||||
m_outlineCombo->setSizePolicy(policy);
|
m_outlineCombo->setSizePolicy(policy);
|
||||||
|
|
||||||
editor->insertExtraToolBarWidget(TextEditor::BaseTextEditor::Left, m_outlineCombo);
|
insertExtraToolBarWidget(TextEditor::BaseTextEditorWidget::Left, m_outlineCombo);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlslEditorWidget::updateDocument()
|
void GlslEditorWidget::updateDocument()
|
||||||
|
|||||||
@@ -578,7 +578,7 @@ void QmlJSTextEditorWidget::createToolBar(QmlJSEditor *editor)
|
|||||||
|
|
||||||
connect(this, SIGNAL(cursorPositionChanged()), m_updateOutlineIndexTimer, SLOT(start()));
|
connect(this, SIGNAL(cursorPositionChanged()), m_updateOutlineIndexTimer, SLOT(start()));
|
||||||
|
|
||||||
editor->insertExtraToolBarWidget(TextEditor::BaseTextEditor::Left, m_outlineCombo);
|
editor->editorWidget()->insertExtraToolBarWidget(TextEditor::BaseTextEditorWidget::Left, m_outlineCombo);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditor::BaseTextEditorWidget::Link QmlJSTextEditorWidget::findLinkAt(const QTextCursor &cursor,
|
TextEditor::BaseTextEditorWidget::Link QmlJSTextEditorWidget::findLinkAt(const QTextCursor &cursor,
|
||||||
|
|||||||
@@ -195,12 +195,6 @@ public:
|
|||||||
// Note: This is always a copy of IContext::m_widget.
|
// Note: This is always a copy of IContext::m_widget.
|
||||||
BaseTextEditorWidget *m_editorWidget;
|
BaseTextEditorWidget *m_editorWidget;
|
||||||
|
|
||||||
QToolBar *m_toolBar;
|
|
||||||
QWidget *m_stretchWidget;
|
|
||||||
QAction *m_cursorPositionLabelAction;
|
|
||||||
Utils::LineColumnLabel *m_cursorPositionLabel;
|
|
||||||
QAction *m_fileEncodingLabelAction;
|
|
||||||
Utils::LineColumnLabel *m_fileEncodingLabel;
|
|
||||||
CommentDefinition m_commentDefinition;
|
CommentDefinition m_commentDefinition;
|
||||||
std::function<CompletionAssistProvider *()> m_completionAssistProvider;
|
std::function<CompletionAssistProvider *()> m_completionAssistProvider;
|
||||||
QScopedPointer<AutoCompleter> m_autoCompleter;
|
QScopedPointer<AutoCompleter> m_autoCompleter;
|
||||||
@@ -210,6 +204,7 @@ class BaseTextEditorWidgetPrivate : public QObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BaseTextEditorWidgetPrivate(BaseTextEditorWidget *parent);
|
BaseTextEditorWidgetPrivate(BaseTextEditorWidget *parent);
|
||||||
|
~BaseTextEditorWidgetPrivate() { delete m_toolBar; }
|
||||||
|
|
||||||
// FIXME: Remove after relevant members have been moved to BaseTextEditorPrivate
|
// FIXME: Remove after relevant members have been moved to BaseTextEditorPrivate
|
||||||
BaseTextEditorPrivate *dd() { return q->editor()->d; }
|
BaseTextEditorPrivate *dd() { return q->editor()->d; }
|
||||||
@@ -274,6 +269,8 @@ public:
|
|||||||
void highlightSearchResultsSlot(const QString &txt, Core::FindFlags findFlags);
|
void highlightSearchResultsSlot(const QString &txt, Core::FindFlags findFlags);
|
||||||
void setFindScope(const QTextCursor &start, const QTextCursor &end, int, int);
|
void setFindScope(const QTextCursor &start, const QTextCursor &end, int, int);
|
||||||
|
|
||||||
|
void updateCursorPosition();
|
||||||
|
|
||||||
// parentheses matcher
|
// parentheses matcher
|
||||||
void _q_matchParentheses();
|
void _q_matchParentheses();
|
||||||
void _q_highlightBlocks();
|
void _q_highlightBlocks();
|
||||||
@@ -283,6 +280,13 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
BaseTextEditorWidget *q;
|
BaseTextEditorWidget *q;
|
||||||
|
QToolBar *m_toolBar;
|
||||||
|
QWidget *m_stretchWidget;
|
||||||
|
Utils::LineColumnLabel *m_cursorPositionLabel;
|
||||||
|
Utils::LineColumnLabel *m_fileEncodingLabel;
|
||||||
|
QAction *m_cursorPositionLabelAction;
|
||||||
|
QAction *m_fileEncodingLabelAction;
|
||||||
|
|
||||||
bool m_contentsChanged;
|
bool m_contentsChanged;
|
||||||
bool m_lastCursorChangeWasInteresting;
|
bool m_lastCursorChangeWasInteresting;
|
||||||
|
|
||||||
@@ -400,6 +404,12 @@ public:
|
|||||||
|
|
||||||
BaseTextEditorWidgetPrivate::BaseTextEditorWidgetPrivate(BaseTextEditorWidget *parent)
|
BaseTextEditorWidgetPrivate::BaseTextEditorWidgetPrivate(BaseTextEditorWidget *parent)
|
||||||
: q(parent),
|
: q(parent),
|
||||||
|
m_toolBar(0),
|
||||||
|
m_stretchWidget(0),
|
||||||
|
m_cursorPositionLabel(0),
|
||||||
|
m_fileEncodingLabel(0),
|
||||||
|
m_cursorPositionLabelAction(0),
|
||||||
|
m_fileEncodingLabelAction(0),
|
||||||
m_contentsChanged(false),
|
m_contentsChanged(false),
|
||||||
m_lastCursorChangeWasInteresting(false),
|
m_lastCursorChangeWasInteresting(false),
|
||||||
m_parenthesesMatchingEnabled(false),
|
m_parenthesesMatchingEnabled(false),
|
||||||
@@ -452,7 +462,32 @@ BaseTextEditorWidgetPrivate::BaseTextEditorWidgetPrivate(BaseTextEditorWidget *p
|
|||||||
this, &BaseTextEditorWidgetPrivate::setFindScope);
|
this, &BaseTextEditorWidgetPrivate::setFindScope);
|
||||||
aggregate->add(baseTextFind);
|
aggregate->add(baseTextFind);
|
||||||
aggregate->add(q);
|
aggregate->add(q);
|
||||||
|
|
||||||
|
m_stretchWidget = new QWidget;
|
||||||
|
m_stretchWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||||
|
m_toolBar = new QToolBar;
|
||||||
|
m_toolBar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
|
||||||
|
m_toolBar->addWidget(m_stretchWidget);
|
||||||
|
|
||||||
|
m_cursorPositionLabel = new Utils::LineColumnLabel;
|
||||||
|
const int spacing = q->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2;
|
||||||
|
m_cursorPositionLabel->setContentsMargins(spacing, 0, spacing, 0);
|
||||||
|
|
||||||
|
m_fileEncodingLabel = new Utils::LineColumnLabel;
|
||||||
|
m_fileEncodingLabel->setContentsMargins(spacing, 0, spacing, 0);
|
||||||
|
|
||||||
|
m_cursorPositionLabelAction = m_toolBar->addWidget(m_cursorPositionLabel);
|
||||||
|
m_fileEncodingLabelAction = m_toolBar->addWidget(m_fileEncodingLabel);
|
||||||
|
|
||||||
|
connect(m_cursorPositionLabel, &LineColumnLabel::clicked, [this] {
|
||||||
|
Core::EditorManager::activateEditor(q->editor(), Core::EditorManager::IgnoreNavigationHistory);
|
||||||
|
if (Core::Command *cmd = Core::ActionManager::command(Core::Constants::GOTO)) {
|
||||||
|
if (QAction *act = cmd->action())
|
||||||
|
act->trigger();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
class TextEditExtraArea : public QWidget
|
class TextEditExtraArea : public QWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -582,6 +617,9 @@ void BaseTextEditorWidgetPrivate::ctor(const QSharedPointer<BaseTextDocument> &d
|
|||||||
QObject::connect(q, &QPlainTextEdit::cursorPositionChanged,
|
QObject::connect(q, &QPlainTextEdit::cursorPositionChanged,
|
||||||
q, &BaseTextEditorWidget::slotCursorPositionChanged);
|
q, &BaseTextEditorWidget::slotCursorPositionChanged);
|
||||||
|
|
||||||
|
QObject::connect(q, &QPlainTextEdit::cursorPositionChanged,
|
||||||
|
this, &BaseTextEditorWidgetPrivate::updateCursorPosition);
|
||||||
|
|
||||||
QObject::connect(q, &QPlainTextEdit::updateRequest,
|
QObject::connect(q, &QPlainTextEdit::updateRequest,
|
||||||
this, &BaseTextEditorWidgetPrivate::slotUpdateRequest);
|
this, &BaseTextEditorWidgetPrivate::slotUpdateRequest);
|
||||||
|
|
||||||
@@ -871,7 +909,8 @@ void BaseTextEditorWidget::selectEncoding()
|
|||||||
|
|
||||||
void BaseTextEditorWidget::updateTextCodecLabel()
|
void BaseTextEditorWidget::updateTextCodecLabel()
|
||||||
{
|
{
|
||||||
editor()->setFileEncodingLabelText(QString::fromLatin1(d->m_document->codec()->name()));
|
QString text = QString::fromLatin1(d->m_document->codec()->name());
|
||||||
|
d->m_fileEncodingLabel->setText(text, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString BaseTextEditorWidget::msgTextTooLarge(quint64 size)
|
QString BaseTextEditorWidget::msgTextTooLarge(quint64 size)
|
||||||
@@ -919,8 +958,8 @@ bool BaseTextEditorWidget::open(QString *errorString, const QString &fileName, c
|
|||||||
if (d->m_document->open(errorString, fileName, realFileName)) {
|
if (d->m_document->open(errorString, fileName, realFileName)) {
|
||||||
moveCursor(QTextCursor::Start);
|
moveCursor(QTextCursor::Start);
|
||||||
d->updateCannotDecodeInfo();
|
d->updateCannotDecodeInfo();
|
||||||
if (editor()->fileEncodingLabel()) {
|
if (d->m_fileEncodingLabel) {
|
||||||
connect(editor()->fileEncodingLabel(), SIGNAL(clicked()), this,
|
connect(d->m_fileEncodingLabel, SIGNAL(clicked()), this,
|
||||||
SLOT(selectEncoding()), Qt::UniqueConnection);
|
SLOT(selectEncoding()), Qt::UniqueConnection);
|
||||||
connect(d->m_document->document(), SIGNAL(modificationChanged(bool)), this,
|
connect(d->m_document->document(), SIGNAL(modificationChanged(bool)), this,
|
||||||
SLOT(updateTextCodecLabel()), Qt::UniqueConnection);
|
SLOT(updateTextCodecLabel()), Qt::UniqueConnection);
|
||||||
@@ -6000,7 +6039,7 @@ void BaseTextEditorWidget::setDisplaySettings(const DisplaySettings &ds)
|
|||||||
setHighlightCurrentLine(ds.m_highlightCurrentLine);
|
setHighlightCurrentLine(ds.m_highlightCurrentLine);
|
||||||
setRevisionsVisible(ds.m_markTextChanges);
|
setRevisionsVisible(ds.m_markTextChanges);
|
||||||
setCenterOnScroll(ds.m_centerCursorOnScroll);
|
setCenterOnScroll(ds.m_centerCursorOnScroll);
|
||||||
editor()->setFileEncodingLabelVisible(ds.m_displayFileEncoding);
|
d->m_fileEncodingLabelAction->setVisible(ds.m_displayFileEncoding);
|
||||||
|
|
||||||
if (d->m_displaySettings.m_visualizeWhitespace != ds.m_visualizeWhitespace) {
|
if (d->m_displaySettings.m_visualizeWhitespace != ds.m_visualizeWhitespace) {
|
||||||
if (SyntaxHighlighter *highlighter = baseTextDocument()->syntaxHighlighter())
|
if (SyntaxHighlighter *highlighter = baseTextDocument()->syntaxHighlighter())
|
||||||
@@ -6473,36 +6512,11 @@ BaseTextEditor::BaseTextEditor(BaseTextEditorWidget *widget)
|
|||||||
setWidget(widget);
|
setWidget(widget);
|
||||||
d->m_editorWidget = widget;
|
d->m_editorWidget = widget;
|
||||||
|
|
||||||
d->m_cursorPositionLabel = new Utils::LineColumnLabel;
|
|
||||||
const int spacing = widget->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2;
|
|
||||||
d->m_cursorPositionLabel->setContentsMargins(spacing, 0, spacing, 0);
|
|
||||||
|
|
||||||
d->m_fileEncodingLabel = new Utils::LineColumnLabel;
|
|
||||||
d->m_fileEncodingLabel->setContentsMargins(spacing, 0, spacing, 0);
|
|
||||||
|
|
||||||
d->m_stretchWidget = new QWidget;
|
|
||||||
d->m_stretchWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
|
||||||
|
|
||||||
d->m_toolBar = new QToolBar;
|
|
||||||
d->m_toolBar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
|
|
||||||
d->m_toolBar->addWidget(d->m_stretchWidget);
|
|
||||||
d->m_cursorPositionLabelAction = d->m_toolBar->addWidget(d->m_cursorPositionLabel);
|
|
||||||
d->m_fileEncodingLabelAction = d->m_toolBar->addWidget(d->m_fileEncodingLabel);
|
|
||||||
|
|
||||||
d->m_completionAssistProvider = [] () -> CompletionAssistProvider * { return 0; };
|
d->m_completionAssistProvider = [] () -> CompletionAssistProvider * { return 0; };
|
||||||
|
|
||||||
setFileEncodingLabelVisible(widget->displaySettings().m_displayFileEncoding);
|
|
||||||
|
|
||||||
connect(widget, &QPlainTextEdit::cursorPositionChanged,
|
|
||||||
this, &BaseTextEditor::updateCursorPosition);
|
|
||||||
|
|
||||||
connect(d->m_cursorPositionLabel, &LineColumnLabel::clicked,
|
|
||||||
this, &BaseTextEditor::openGotoLocator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseTextEditor::~BaseTextEditor()
|
BaseTextEditor::~BaseTextEditor()
|
||||||
{
|
{
|
||||||
delete d->m_toolBar;
|
|
||||||
delete d->m_editorWidget;
|
delete d->m_editorWidget;
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
@@ -6519,10 +6533,10 @@ IDocument *BaseTextEditor::document()
|
|||||||
|
|
||||||
QWidget *BaseTextEditor::toolBar()
|
QWidget *BaseTextEditor::toolBar()
|
||||||
{
|
{
|
||||||
return d->m_toolBar;
|
return d->m_editorWidget->d->m_toolBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseTextEditor::insertExtraToolBarWidget(BaseTextEditor::Side side,
|
void BaseTextEditorWidget::insertExtraToolBarWidget(BaseTextEditorWidget::Side side,
|
||||||
QWidget *widget)
|
QWidget *widget)
|
||||||
{
|
{
|
||||||
if (widget->sizePolicy().horizontalPolicy() & QSizePolicy::ExpandFlag) {
|
if (widget->sizePolicy().horizontalPolicy() & QSizePolicy::ExpandFlag) {
|
||||||
@@ -6648,45 +6662,21 @@ void BaseTextEditor::setCompletionAssistProvider(const std::function<CompletionA
|
|||||||
d->m_completionAssistProvider = provider;
|
d->m_completionAssistProvider = provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
QObject *BaseTextEditor::fileEncodingLabel() const
|
void BaseTextEditorWidgetPrivate::updateCursorPosition()
|
||||||
{
|
{
|
||||||
return d->m_fileEncodingLabel;
|
const QTextCursor cursor = q->textCursor();
|
||||||
}
|
|
||||||
|
|
||||||
void BaseTextEditor::updateCursorPosition()
|
|
||||||
{
|
|
||||||
const QTextCursor cursor = d->m_editorWidget->textCursor();
|
|
||||||
const QTextBlock block = cursor.block();
|
const QTextBlock block = cursor.block();
|
||||||
const int line = block.blockNumber() + 1;
|
const int line = block.blockNumber() + 1;
|
||||||
const int column = cursor.position() - block.position();
|
const int column = cursor.position() - block.position();
|
||||||
d->m_cursorPositionLabel->setText(tr("Line: %1, Col: %2").arg(line)
|
m_cursorPositionLabel->show();
|
||||||
.arg(baseTextDocument()->tabSettings().columnAt(block.text(),
|
m_cursorPositionLabel->setText(tr("Line: %1, Col: %2").arg(line)
|
||||||
|
.arg(q->baseTextDocument()->tabSettings().columnAt(block.text(),
|
||||||
column)+1),
|
column)+1),
|
||||||
tr("Line: 9999, Col: 999"));
|
tr("Line: 9999, Col: 999"));
|
||||||
m_contextHelpId.clear();
|
q->editor()->m_contextHelpId.clear();
|
||||||
|
|
||||||
if (!block.isVisible())
|
if (!block.isVisible())
|
||||||
d->m_editorWidget->ensureCursorVisible();
|
q->ensureCursorVisible();
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void BaseTextEditor::openGotoLocator()
|
|
||||||
{
|
|
||||||
Core::EditorManager::activateEditor(this, Core::EditorManager::IgnoreNavigationHistory);
|
|
||||||
if (Core::Command *cmd = Core::ActionManager::command(Core::Constants::GOTO)) {
|
|
||||||
if (QAction *act = cmd->action())
|
|
||||||
act->trigger();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void BaseTextEditor::setFileEncodingLabelVisible(bool visible)
|
|
||||||
{
|
|
||||||
d->m_fileEncodingLabelAction->setVisible(visible);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BaseTextEditor::setFileEncodingLabelText(const QString &text)
|
|
||||||
{
|
|
||||||
d->m_fileEncodingLabel->setText(text, text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString BaseTextEditor::contextHelpId() const
|
QString BaseTextEditor::contextHelpId() const
|
||||||
|
|||||||
@@ -143,9 +143,6 @@ public:
|
|||||||
bool restoreState(const QByteArray &state);
|
bool restoreState(const QByteArray &state);
|
||||||
QWidget *toolBar();
|
QWidget *toolBar();
|
||||||
|
|
||||||
enum Side { Left, Right };
|
|
||||||
void insertExtraToolBarWidget(Side side, QWidget *widget);
|
|
||||||
|
|
||||||
QString contextHelpId() const; // from IContext
|
QString contextHelpId() const; // from IContext
|
||||||
|
|
||||||
int currentLine() const;
|
int currentLine() const;
|
||||||
@@ -192,8 +189,6 @@ public:
|
|||||||
// There should be something simpler.
|
// There should be something simpler.
|
||||||
void setCompletionAssistProvider(const std::function<CompletionAssistProvider *()> &provider);
|
void setCompletionAssistProvider(const std::function<CompletionAssistProvider *()> &provider);
|
||||||
|
|
||||||
QObject *fileEncodingLabel() const; // FIXME: Remove
|
|
||||||
|
|
||||||
void setAutoCompleter(AutoCompleter *autoCompleter);
|
void setAutoCompleter(AutoCompleter *autoCompleter);
|
||||||
AutoCompleter *autoCompleter() const;
|
AutoCompleter *autoCompleter() const;
|
||||||
|
|
||||||
@@ -205,12 +200,6 @@ signals:
|
|||||||
void markTooltipRequested(TextEditor::BaseTextEditor *editor, const QPoint &globalPos, int line);
|
void markTooltipRequested(TextEditor::BaseTextEditor *editor, const QPoint &globalPos, int line);
|
||||||
void contextHelpIdRequested(TextEditor::BaseTextEditor *editor, int position);
|
void contextHelpIdRequested(TextEditor::BaseTextEditor *editor, int position);
|
||||||
|
|
||||||
private slots:
|
|
||||||
void updateCursorPosition();
|
|
||||||
void openGotoLocator();
|
|
||||||
void setFileEncodingLabelVisible(bool visible);
|
|
||||||
void setFileEncodingLabelText(const QString &text);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class Internal::BaseTextEditorWidgetPrivate;
|
friend class Internal::BaseTextEditorWidgetPrivate;
|
||||||
friend class BaseTextEditorWidget;
|
friend class BaseTextEditorWidget;
|
||||||
@@ -372,6 +361,9 @@ public:
|
|||||||
void setIfdefedOutBlocks(const QList<BlockRange> &blocks);
|
void setIfdefedOutBlocks(const QList<BlockRange> &blocks);
|
||||||
bool isMissingSyntaxDefinition() const;
|
bool isMissingSyntaxDefinition() const;
|
||||||
|
|
||||||
|
enum Side { Left, Right };
|
||||||
|
void insertExtraToolBarWidget(Side side, QWidget *widget);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void copy();
|
virtual void copy();
|
||||||
virtual void paste();
|
virtual void paste();
|
||||||
|
|||||||
@@ -614,7 +614,8 @@ QComboBox *VcsBaseEditorWidgetPrivate::entriesComboBox()
|
|||||||
policy.setHorizontalPolicy(QSizePolicy::Expanding);
|
policy.setHorizontalPolicy(QSizePolicy::Expanding);
|
||||||
m_entriesComboBox->setSizePolicy(policy);
|
m_entriesComboBox->setSizePolicy(policy);
|
||||||
|
|
||||||
m_editor->insertExtraToolBarWidget(TextEditor::BaseTextEditor::Left, m_entriesComboBox);
|
m_editor->editorWidget()->insertExtraToolBarWidget
|
||||||
|
(TextEditor::BaseTextEditorWidget::Left, m_entriesComboBox);
|
||||||
return m_entriesComboBox;
|
return m_entriesComboBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1337,7 +1338,7 @@ bool VcsBaseEditorWidget::setConfigurationWidget(VcsBaseEditorParameterWidget *w
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
d->m_configurationWidget = w;
|
d->m_configurationWidget = w;
|
||||||
d->m_editor->insertExtraToolBarWidget(TextEditor::BaseTextEditor::Right, w);
|
d->m_editor->editorWidget()->insertExtraToolBarWidget(TextEditor::BaseTextEditorWidget::Right, w);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user