forked from qt-creator/qt-creator
Revert ""Grayout" the background of the output window on re-run configuration"
This reverts commit cdf2f70c60
.
This new feature didn't belong in 1.3. It will remain on master.
This commit is contained in:
@@ -199,8 +199,7 @@ void OutputPane::createNewOutputWindow(RunControl *rc)
|
|||||||
delete old;
|
delete old;
|
||||||
m_outputWindows.remove(old);
|
m_outputWindows.remove(old);
|
||||||
OutputWindow *ow = static_cast<OutputWindow *>(m_tabWidget->widget(i));
|
OutputWindow *ow = static_cast<OutputWindow *>(m_tabWidget->widget(i));
|
||||||
ow->grayOutOldContent();
|
ow->appendOutput("");//New line
|
||||||
ow->verticalScrollBar()->setValue(ow->verticalScrollBar()->maximum());
|
|
||||||
m_outputWindows.insert(rc, ow);
|
m_outputWindows.insert(rc, ow);
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
@@ -243,15 +242,10 @@ void OutputPane::insertLine()
|
|||||||
|
|
||||||
void OutputPane::reRunRunControl()
|
void OutputPane::reRunRunControl()
|
||||||
{
|
{
|
||||||
int index = m_tabWidget->currentIndex();
|
RunControl *rc = runControlForTab(m_tabWidget->currentIndex());
|
||||||
RunControl *rc = runControlForTab(index);
|
if (rc->runConfiguration()->project() != 0)
|
||||||
if (rc->runConfiguration() && rc->runConfiguration()->project() != 0) {
|
|
||||||
OutputWindow *ow = static_cast<OutputWindow *>(m_tabWidget->widget(index));
|
|
||||||
ow->grayOutOldContent();
|
|
||||||
ow->verticalScrollBar()->setValue(ow->verticalScrollBar()->maximum());
|
|
||||||
rc->start();
|
rc->start();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void OutputPane::stopRunControl()
|
void OutputPane::stopRunControl()
|
||||||
{
|
{
|
||||||
@@ -463,22 +457,6 @@ void OutputWindow::insertLine()
|
|||||||
enableUndoRedo();
|
enableUndoRedo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputWindow::grayOutOldContent()
|
|
||||||
{
|
|
||||||
QTextCursor cursor = textCursor();
|
|
||||||
cursor.select(QTextCursor::Document);
|
|
||||||
QTextBlockFormat tbf;
|
|
||||||
const QColor bkgColor = palette().window().color();
|
|
||||||
const QColor fgdColor = palette().windowText().color();
|
|
||||||
tbf.setBackground(QColor((0.5 * bkgColor.red() + 0.5* fgdColor.red()),\
|
|
||||||
(0.5 * bkgColor.green() + 0.5* fgdColor.green()),\
|
|
||||||
(0.5 * bkgColor.blue() + 0.5* fgdColor.blue()) ));
|
|
||||||
cursor.mergeBlockFormat(tbf);
|
|
||||||
|
|
||||||
cursor.movePosition(QTextCursor::End);
|
|
||||||
cursor.insertBlock(QTextBlockFormat());
|
|
||||||
}
|
|
||||||
|
|
||||||
void OutputWindow::enableUndoRedo()
|
void OutputWindow::enableUndoRedo()
|
||||||
{
|
{
|
||||||
setMaximumBlockCount(0);
|
setMaximumBlockCount(0);
|
||||||
|
@@ -125,7 +125,6 @@ public:
|
|||||||
void appendOutput(const QString &out);
|
void appendOutput(const QString &out);
|
||||||
void appendOutputInline(const QString &out);
|
void appendOutputInline(const QString &out);
|
||||||
void insertLine();
|
void insertLine();
|
||||||
void grayOutOldContent();
|
|
||||||
|
|
||||||
void showEvent(QShowEvent *);
|
void showEvent(QShowEvent *);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user