ApplicationOutput: Tweak popup/flash behavior on output

- Change the option to switch between Flash and Popup on output
- Never popup on starting a application

Task-number: QTCREATORBUG-9120
Change-Id: If688822dad336e0f98a11bf2796483e79c0ae653
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Daniel Teske
2013-04-16 16:21:28 +02:00
parent 44c8924bd3
commit b55961d225
4 changed files with 42 additions and 11 deletions

View File

@@ -101,7 +101,7 @@ void TabWidget::slotContextMenuRequested(const QPoint &pos)
}
AppOutputPane::RunControlTab::RunControlTab(RunControl *rc, Core::OutputWindow *w) :
runControl(rc), window(w), asyncClosing(false)
runControl(rc), window(w), asyncClosing(false), behavivorOnOutput(Flash)
{
}
@@ -360,8 +360,16 @@ void AppOutputPane::updateFromSettings()
void AppOutputPane::appendMessage(RunControl *rc, const QString &out, Utils::OutputFormat format)
{
const int index = indexOf(rc);
if (index != -1)
m_runControlTabs.at(index).window->appendMessage(out, format);
if (index != -1) {
Core::OutputWindow *window = m_runControlTabs.at(index).window;
window->appendMessage(out, format);
if (format != Utils::NormalMessageFormat) {
if (m_runControlTabs.at(index).behavivorOnOutput == Flash)
flash();
else
popup(NoModeSwitch);
}
}
}
void AppOutputPane::showTabFor(RunControl *rc)
@@ -369,6 +377,13 @@ void AppOutputPane::showTabFor(RunControl *rc)
m_tabWidget->setCurrentIndex(tabWidgetIndexOf(indexOf(rc)));
}
void AppOutputPane::setBehaviorOnOutput(RunControl *rc, AppOutputPane::BehavivorOnOutput mode)
{
const int index = indexOf(rc);
if (index != -1)
m_runControlTabs[index].behavivorOnOutput = mode;
}
void AppOutputPane::reRunRunControl()
{
const int index = currentIndex();