forked from qt-creator/qt-creator
OutputPane: Use setter for display name
Change-Id: I2e89fbd052330c9e7124272c2f2fa81a0db94de9 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -363,6 +363,7 @@ SearchResultWindow *SearchResultWindow::m_instance = nullptr;
|
||||
SearchResultWindow::SearchResultWindow(QWidget *newSearchPanel)
|
||||
: d(new SearchResultWindowPrivate(this, newSearchPanel))
|
||||
{
|
||||
setDisplayName(Tr::tr("Search Results"));
|
||||
m_instance = this;
|
||||
readSettings();
|
||||
}
|
||||
@@ -709,14 +710,6 @@ bool SearchResultWindow::canNavigate() const
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
QString SearchResultWindow::displayName() const
|
||||
{
|
||||
return Tr::tr("Search Results");
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
|
||||
@@ -114,7 +114,6 @@ public:
|
||||
QWidget *outputWidget(QWidget *) override;
|
||||
QList<QWidget*> toolBarWidgets() const override;
|
||||
|
||||
QString displayName() const override;
|
||||
int priorityInStatusBar() const override;
|
||||
void visibilityChanged(bool visible) override;
|
||||
bool hasFocus() const override;
|
||||
|
||||
@@ -49,12 +49,6 @@ namespace Core {
|
||||
Returns the toolbar widgets for the output pane.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QString IOutputPane::displayName() const
|
||||
|
||||
Returns the translated display name of the output pane.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn int IOutputPane::priorityInStatusBar() const
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
|
||||
virtual QWidget *outputWidget(QWidget *parent) = 0;
|
||||
virtual QList<QWidget *> toolBarWidgets() const;
|
||||
virtual QString displayName() const = 0;
|
||||
QString displayName() const;
|
||||
virtual const QList<OutputWindow *> outputWindows() const { return {}; }
|
||||
virtual void ensureWindowVisible(OutputWindow *) { }
|
||||
|
||||
@@ -81,6 +81,8 @@ signals:
|
||||
void fontChanged(const QFont &font);
|
||||
|
||||
protected:
|
||||
void setDisplayName(const QString &name);
|
||||
|
||||
void setupFilterUi(const Utils::Key &historyKey);
|
||||
QString filterText() const;
|
||||
bool filterUsesRegexp() const { return m_filterRegexp; }
|
||||
@@ -104,6 +106,7 @@ private:
|
||||
Utils::Id filterCaseSensitivityActionId() const;
|
||||
Utils::Id filterInvertedActionId() const;
|
||||
|
||||
QString m_displayName;
|
||||
Core::CommandButton * const m_zoomInButton;
|
||||
Core::CommandButton * const m_zoomOutButton;
|
||||
QAction *m_filterActionRegexp = nullptr;
|
||||
|
||||
@@ -20,6 +20,7 @@ const char zoomSettingsKey[] = "Core/MessageOutput/Zoom";
|
||||
|
||||
MessageOutputWindow::MessageOutputWindow()
|
||||
{
|
||||
setDisplayName(Tr::tr("General Messages"));
|
||||
m_widget = new OutputWindow(Context(Constants::C_GENERAL_OUTPUT_PANE), zoomSettingsKey);
|
||||
m_widget->setReadOnly(true);
|
||||
|
||||
@@ -65,11 +66,6 @@ QWidget *MessageOutputWindow::outputWidget(QWidget *parent)
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
QString MessageOutputWindow::displayName() const
|
||||
{
|
||||
return Tr::tr("General Messages");
|
||||
}
|
||||
|
||||
void MessageOutputWindow::append(const QString &text)
|
||||
{
|
||||
m_widget->appendMessage(text, Utils::GeneralMessageFormat);
|
||||
|
||||
@@ -20,7 +20,6 @@ public:
|
||||
|
||||
QWidget *outputWidget(QWidget *parent) override;
|
||||
|
||||
QString displayName() const override;
|
||||
int priorityInStatusBar() const override;
|
||||
void clearContents() override;
|
||||
|
||||
|
||||
@@ -103,6 +103,22 @@ QList<QWidget *> IOutputPane::toolBarWidgets() const
|
||||
return widgets << m_zoomInButton << m_zoomOutButton;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the translated display name of the output pane.
|
||||
*/
|
||||
QString IOutputPane::displayName() const
|
||||
{
|
||||
return m_displayName;
|
||||
}
|
||||
|
||||
/*!
|
||||
Sets the translated display name of the output pane to \a name.
|
||||
*/
|
||||
void IOutputPane::setDisplayName(const QString &name)
|
||||
{
|
||||
m_displayName = name;
|
||||
}
|
||||
|
||||
void IOutputPane::visibilityChanged(bool /*visible*/)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user