forked from qt-creator/qt-creator
OutputFormatter: De-virtualize the clear() function
... and make it also clear the text edit. Change-Id: Ifd073167b8afc27f3adafca1bdaf95316be7fdaa Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -147,6 +147,7 @@ void OutputFormatter::handleLink(const QString &href)
|
|||||||
void OutputFormatter::clear()
|
void OutputFormatter::clear()
|
||||||
{
|
{
|
||||||
d->prependCarriageReturn = false;
|
d->prependCarriageReturn = false;
|
||||||
|
plainTextEdit()->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputFormatter::setBoldFontEnabled(bool enabled)
|
void OutputFormatter::setBoldFontEnabled(bool enabled)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
void appendMessage(const QString &text, OutputFormat format);
|
void appendMessage(const QString &text, OutputFormat format);
|
||||||
|
|
||||||
virtual void handleLink(const QString &href);
|
virtual void handleLink(const QString &href);
|
||||||
virtual void clear();
|
void clear();
|
||||||
void setBoldFontEnabled(bool enabled);
|
void setBoldFontEnabled(bool enabled);
|
||||||
static QTextCharFormat linkFormat(const QTextCharFormat &inputFormat, const QString &href);
|
static QTextCharFormat linkFormat(const QTextCharFormat &inputFormat, const QString &href);
|
||||||
|
|
||||||
|
|||||||
@@ -436,10 +436,8 @@ void AndroidSdkManagerWidget::cancelPendingOperations()
|
|||||||
|
|
||||||
void AndroidSdkManagerWidget::switchView(AndroidSdkManagerWidget::View view)
|
void AndroidSdkManagerWidget::switchView(AndroidSdkManagerWidget::View view)
|
||||||
{
|
{
|
||||||
if (m_currentView == PackageListing) {
|
if (m_currentView == PackageListing)
|
||||||
m_formatter->clear();
|
m_formatter->clear();
|
||||||
m_ui->outputEdit->clear();
|
|
||||||
}
|
|
||||||
m_currentView = view;
|
m_currentView = view;
|
||||||
if (m_currentView == PackageListing)
|
if (m_currentView == PackageListing)
|
||||||
emit updatingSdkFinished();
|
emit updatingSdkFinished();
|
||||||
|
|||||||
@@ -445,7 +445,6 @@ QMimeData *OutputWindow::createMimeDataFromSelection() const
|
|||||||
|
|
||||||
void OutputWindow::clear()
|
void OutputWindow::clear()
|
||||||
{
|
{
|
||||||
QPlainTextEdit::clear();
|
|
||||||
d->formatter->clear();
|
d->formatter->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user