forked from qt-creator/qt-creator
Make IOutputPane behaviour more granular
The commit looks big, but it's mostly trivial. Also any build/run related popups are now "flashes" if the current mode has no placeholder. Task-number: QTCREATORBUG-7875 Change-Id: I3af40557f7af01798f905c0d1829423c80058cb6 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -75,21 +75,22 @@ public:
|
|||||||
virtual void goToNext() = 0;
|
virtual void goToNext() = 0;
|
||||||
virtual void goToPrev() = 0;
|
virtual void goToPrev() = 0;
|
||||||
|
|
||||||
|
enum Flag { NoModeSwitch = 0, ModeSwitch = 1, WithFocus = 2, EnsureSizeHint = 4};
|
||||||
|
Q_DECLARE_FLAGS(Flags, Flag)
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void popup() { popup(true, false); }
|
void popup(int flags) { emit showPage(flags); }
|
||||||
void popup(bool withFocus) { popup(withFocus, false); }
|
|
||||||
void popup(bool withFocus, bool ensureSizeHint) { emit showPage(withFocus, ensureSizeHint); }
|
|
||||||
void hide() { emit hidePage(); }
|
void hide() { emit hidePage(); }
|
||||||
void toggle() { toggle(true); }
|
void toggle(int flags) { emit togglePage(flags); }
|
||||||
void toggle(bool withFocusIfShown) { emit togglePage(withFocusIfShown); }
|
|
||||||
void navigateStateChanged() { emit navigateStateUpdate(); }
|
void navigateStateChanged() { emit navigateStateUpdate(); }
|
||||||
void flash() { emit flashButton(); }
|
void flash() { emit flashButton(); }
|
||||||
void setIconBadgeNumber(int number) { emit setBadgeNumber(number); }
|
void setIconBadgeNumber(int number) { emit setBadgeNumber(number); }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void showPage(bool withFocus, bool ensureSizeHint);
|
void showPage(int flags);
|
||||||
void hidePage();
|
void hidePage();
|
||||||
void togglePage(bool withFocusIfShown);
|
void togglePage(int flags);
|
||||||
void navigateStateUpdate();
|
void navigateStateUpdate();
|
||||||
void flashButton();
|
void flashButton();
|
||||||
void setBadgeNumber(int number);
|
void setBadgeNumber(int number);
|
||||||
@@ -97,4 +98,6 @@ signals:
|
|||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|
||||||
|
Q_DECLARE_OPERATORS_FOR_FLAGS(Core::IOutputPane::Flags)
|
||||||
|
|
||||||
#endif // IOUTPUTPANE_H
|
#endif // IOUTPUTPANE_H
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ void MessageManager::init()
|
|||||||
void MessageManager::showOutputPane()
|
void MessageManager::showOutputPane()
|
||||||
{
|
{
|
||||||
if (m_messageOutputWindow)
|
if (m_messageOutputWindow)
|
||||||
m_messageOutputWindow->popup(false);
|
m_messageOutputWindow->popup(IOutputPane::ModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageManager::printToOutputPane(const QString &text, bool bringToForeground)
|
void MessageManager::printToOutputPane(const QString &text, bool bringToForeground)
|
||||||
@@ -73,7 +73,7 @@ void MessageManager::printToOutputPane(const QString &text, bool bringToForegrou
|
|||||||
if (!m_messageOutputWindow)
|
if (!m_messageOutputWindow)
|
||||||
return;
|
return;
|
||||||
if (bringToForeground)
|
if (bringToForeground)
|
||||||
m_messageOutputWindow->popup(false);
|
m_messageOutputWindow->popup(IOutputPane::ModeSwitch);
|
||||||
m_messageOutputWindow->append(text + QLatin1Char('\n'));
|
m_messageOutputWindow->append(text + QLatin1Char('\n'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -257,9 +257,9 @@ void OutputPaneManager::init()
|
|||||||
const int idx = m_outputWidgetPane->addWidget(outPane->outputWidget(this));
|
const int idx = m_outputWidgetPane->addWidget(outPane->outputWidget(this));
|
||||||
QTC_CHECK(idx == i);
|
QTC_CHECK(idx == i);
|
||||||
|
|
||||||
connect(outPane, SIGNAL(showPage(bool,bool)), this, SLOT(showPage(bool,bool)));
|
connect(outPane, SIGNAL(showPage(int)), this, SLOT(showPage(int)));
|
||||||
connect(outPane, SIGNAL(hidePage()), this, SLOT(slotHide()));
|
connect(outPane, SIGNAL(hidePage()), this, SLOT(slotHide()));
|
||||||
connect(outPane, SIGNAL(togglePage(bool)), this, SLOT(togglePage(bool)));
|
connect(outPane, SIGNAL(togglePage(int)), this, SLOT(togglePage(int)));
|
||||||
connect(outPane, SIGNAL(navigateStateUpdate()), this, SLOT(updateNavigateState()));
|
connect(outPane, SIGNAL(navigateStateUpdate()), this, SLOT(updateNavigateState()));
|
||||||
connect(outPane, SIGNAL(flashButton()), this, SLOT(flashButton()));
|
connect(outPane, SIGNAL(flashButton()), this, SLOT(flashButton()));
|
||||||
connect(outPane, SIGNAL(setBadgeNumber(int)), this, SLOT(setBadgeNumber(int)));
|
connect(outPane, SIGNAL(setBadgeNumber(int)), this, SLOT(setBadgeNumber(int)));
|
||||||
@@ -364,7 +364,7 @@ void OutputPaneManager::buttonTriggered(int idx)
|
|||||||
// we should toggle and the page is already visible and we are actually closeable
|
// we should toggle and the page is already visible and we are actually closeable
|
||||||
slotHide();
|
slotHide();
|
||||||
} else {
|
} else {
|
||||||
showPage(idx, true);
|
showPage(idx, IOutputPane::ModeSwitch | IOutputPane::WithFocus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,45 +462,47 @@ void OutputPaneManager::setBadgeNumber(int number)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Slot connected to showPage signal of each page
|
// Slot connected to showPage signal of each page
|
||||||
void OutputPaneManager::showPage(bool focus, bool ensureSizeHint)
|
void OutputPaneManager::showPage(int flags)
|
||||||
{
|
{
|
||||||
int idx = findIndexForPage(qobject_cast<IOutputPane*>(sender()));
|
int idx = findIndexForPage(qobject_cast<IOutputPane*>(sender()));
|
||||||
OutputPanePlaceHolder *ph = OutputPanePlaceHolder::getCurrent();
|
showPage(idx, flags);
|
||||||
if (!ph)
|
|
||||||
m_buttons.value(idx)->flash();
|
|
||||||
else
|
|
||||||
showPage(idx, focus);
|
|
||||||
|
|
||||||
if (ensureSizeHint && ph)
|
|
||||||
ph->ensureSizeHintAsMinimum();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputPaneManager::showPage(int idx, bool focus)
|
void OutputPaneManager::showPage(int idx, int flags)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(idx >= 0, return);
|
QTC_ASSERT(idx >= 0, return);
|
||||||
if (!OutputPanePlaceHolder::getCurrent()) {
|
OutputPanePlaceHolder *ph = OutputPanePlaceHolder::getCurrent();
|
||||||
|
|
||||||
|
if (!ph && flags & IOutputPane::ModeSwitch) {
|
||||||
// In this mode we don't have a placeholder
|
// In this mode we don't have a placeholder
|
||||||
// switch to the output mode and switch the page
|
// switch to the output mode and switch the page
|
||||||
ModeManager::activateMode(Id(Constants::MODE_EDIT));
|
ModeManager::activateMode(Id(Constants::MODE_EDIT));
|
||||||
|
ph = OutputPanePlaceHolder::getCurrent();
|
||||||
}
|
}
|
||||||
if (OutputPanePlaceHolder *ph = OutputPanePlaceHolder::getCurrent()) {
|
|
||||||
|
if (ph) {
|
||||||
// make the page visible
|
// make the page visible
|
||||||
ph->setVisible(true);
|
ph->setVisible(true);
|
||||||
ensurePageVisible(idx);
|
ensurePageVisible(idx);
|
||||||
IOutputPane *out = m_panes.at(idx);
|
IOutputPane *out = m_panes.at(idx);
|
||||||
out->visibilityChanged(true);
|
out->visibilityChanged(true);
|
||||||
if (focus && out->canFocus())
|
if (flags & IOutputPane::WithFocus && out->canFocus())
|
||||||
out->setFocus();
|
out->setFocus();
|
||||||
|
|
||||||
|
if (flags & IOutputPane::EnsureSizeHint)
|
||||||
|
ph->ensureSizeHintAsMinimum();
|
||||||
|
} else {
|
||||||
|
m_buttons.value(idx)->flash();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputPaneManager::togglePage(bool focus)
|
void OutputPaneManager::togglePage(int flags)
|
||||||
{
|
{
|
||||||
int idx = findIndexForPage(qobject_cast<IOutputPane*>(sender()));
|
int idx = findIndexForPage(qobject_cast<IOutputPane*>(sender()));
|
||||||
if (OutputPanePlaceHolder::isCurrentVisible() && currentIndex() == idx)
|
if (OutputPanePlaceHolder::isCurrentVisible() && currentIndex() == idx)
|
||||||
slotHide();
|
slotHide();
|
||||||
else
|
else
|
||||||
showPage(idx, focus);
|
showPage(idx, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputPaneManager::focusInEvent(QFocusEvent *e)
|
void OutputPaneManager::focusInEvent(QFocusEvent *e)
|
||||||
@@ -558,7 +560,7 @@ void OutputPaneManager::popupMenu()
|
|||||||
button->hide();
|
button->hide();
|
||||||
} else {
|
} else {
|
||||||
button->show();
|
button->show();
|
||||||
showPage(idx, false);
|
showPage(idx, IOutputPane::ModeSwitch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ protected:
|
|||||||
void focusInEvent(QFocusEvent *e);
|
void focusInEvent(QFocusEvent *e);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void showPage(bool focus, bool ensureSizeHint);
|
void showPage(int flags);
|
||||||
void togglePage(bool focus);
|
void togglePage(int flags);
|
||||||
void clearPage();
|
void clearPage();
|
||||||
void buttonTriggered();
|
void buttonTriggered();
|
||||||
void updateNavigateState();
|
void updateNavigateState();
|
||||||
@@ -100,7 +100,7 @@ private:
|
|||||||
explicit OutputPaneManager(QWidget *parent = 0);
|
explicit OutputPaneManager(QWidget *parent = 0);
|
||||||
~OutputPaneManager();
|
~OutputPaneManager();
|
||||||
|
|
||||||
void showPage(int idx, bool focus);
|
void showPage(int idx, int flags);
|
||||||
void ensurePageVisible(int idx);
|
void ensurePageVisible(int idx);
|
||||||
int findIndexForPage(IOutputPane *out);
|
int findIndexForPage(IOutputPane *out);
|
||||||
int currentIndex() const;
|
int currentIndex() const;
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ void CppFindReferences::findAll_helper(Find::SearchResult *search)
|
|||||||
connect(search, SIGNAL(activated(Find::SearchResultItem)),
|
connect(search, SIGNAL(activated(Find::SearchResultItem)),
|
||||||
this, SLOT(openEditor(Find::SearchResultItem)));
|
this, SLOT(openEditor(Find::SearchResultItem)));
|
||||||
|
|
||||||
Find::SearchResultWindow::instance()->popup(true);
|
Find::SearchResultWindow::instance()->popup(Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus);
|
||||||
const CppModelManagerInterface::WorkingCopy workingCopy = _modelManager->workingCopy();
|
const CppModelManagerInterface::WorkingCopy workingCopy = _modelManager->workingCopy();
|
||||||
QFuture<Usage> result;
|
QFuture<Usage> result;
|
||||||
result = QtConcurrent::run(&find_helper, workingCopy,
|
result = QtConcurrent::run(&find_helper, workingCopy,
|
||||||
@@ -661,7 +661,7 @@ void CppFindReferences::findMacroUses(const Macro ¯o, const QString &replace
|
|||||||
connect(search, SIGNAL(replaceButtonClicked(QString,QList<Find::SearchResultItem>)),
|
connect(search, SIGNAL(replaceButtonClicked(QString,QList<Find::SearchResultItem>)),
|
||||||
SLOT(onReplaceButtonClicked(QString,QList<Find::SearchResultItem>)));
|
SLOT(onReplaceButtonClicked(QString,QList<Find::SearchResultItem>)));
|
||||||
|
|
||||||
Find::SearchResultWindow::instance()->popup(true);
|
Find::SearchResultWindow::instance()->popup(Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus);
|
||||||
|
|
||||||
connect(search, SIGNAL(activated(Find::SearchResultItem)),
|
connect(search, SIGNAL(activated(Find::SearchResultItem)),
|
||||||
this, SLOT(openEditor(Find::SearchResultItem)));
|
this, SLOT(openEditor(Find::SearchResultItem)));
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ void SymbolsFindFilter::findAll(const QString &txt, Find::FindFlags findFlags)
|
|||||||
connect(search, SIGNAL(paused(bool)), this, SLOT(setPaused(bool)));
|
connect(search, SIGNAL(paused(bool)), this, SLOT(setPaused(bool)));
|
||||||
connect(search, SIGNAL(searchAgainRequested()), this, SLOT(searchAgain()));
|
connect(search, SIGNAL(searchAgainRequested()), this, SLOT(searchAgain()));
|
||||||
connect(this, SIGNAL(enabledChanged(bool)), search, SLOT(setSearchAgainEnabled(bool)));
|
connect(this, SIGNAL(enabledChanged(bool)), search, SLOT(setSearchAgainEnabled(bool)));
|
||||||
window->popup(true);
|
window->popup(Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus);
|
||||||
|
|
||||||
SymbolsFindParameters parameters;
|
SymbolsFindParameters parameters;
|
||||||
parameters.text = txt;
|
parameters.text = txt;
|
||||||
|
|||||||
@@ -184,7 +184,8 @@ namespace Internal {
|
|||||||
QTC_ASSERT(widget, return);
|
QTC_ASSERT(widget, return);
|
||||||
int internalIndex = m_searchResultWidgets.indexOf(widget) + 1/*account for "new search" entry*/;
|
int internalIndex = m_searchResultWidgets.indexOf(widget) + 1/*account for "new search" entry*/;
|
||||||
setCurrentIndex(internalIndex, focus);
|
setCurrentIndex(internalIndex, focus);
|
||||||
q->popup(focus);
|
q->popup(focus ? Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus
|
||||||
|
: Core::IOutputPane::NoModeSwitch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,7 +481,7 @@ void SearchResultWindow::setTextEditorFont(const QFont &font)
|
|||||||
void SearchResultWindow::openNewSearchPanel()
|
void SearchResultWindow::openNewSearchPanel()
|
||||||
{
|
{
|
||||||
d->setCurrentIndex(0);
|
d->setCurrentIndex(0);
|
||||||
popup(true/*focus*/, true/*sizeHint*/);
|
popup(IOutputPane::ModeSwitch | IOutputPane::WithFocus | IOutputPane::EnsureSizeHint);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -309,7 +309,8 @@ void FetchContext::startWritePatchFile()
|
|||||||
|
|
||||||
void FetchContext::startCherryPick()
|
void FetchContext::startCherryPick()
|
||||||
{
|
{
|
||||||
VcsBase::VcsBaseOutputWindow::instance()->popup(); // Point user to errors.
|
// Point user to errors.
|
||||||
|
VcsBase::VcsBaseOutputWindow::instance()->popup(Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus);
|
||||||
VcsBase::VcsBaseOutputWindow::instance()->append(tr("Cherry-picking %1...").arg(m_patchFileName));
|
VcsBase::VcsBaseOutputWindow::instance()->append(tr("Cherry-picking %1...").arg(m_patchFileName));
|
||||||
QStringList args;
|
QStringList args;
|
||||||
args << QLatin1String("cherry-pick") << QLatin1String("FETCH_HEAD");
|
args << QLatin1String("cherry-pick") << QLatin1String("FETCH_HEAD");
|
||||||
|
|||||||
@@ -591,7 +591,7 @@ void PerforcePlugin::printOpenedFileList()
|
|||||||
outWin->appendSilently(mapped + QLatin1Char(' ') + line.mid(delimiterPos));
|
outWin->appendSilently(mapped + QLatin1Char(' ') + line.mid(delimiterPos));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outWin->popup();
|
outWin->popup(Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PerforcePlugin::startSubmitProject()
|
void PerforcePlugin::startSubmitProject()
|
||||||
|
|||||||
@@ -284,17 +284,17 @@ void BuildManager::clearBuildQueue()
|
|||||||
|
|
||||||
void BuildManager::toggleOutputWindow()
|
void BuildManager::toggleOutputWindow()
|
||||||
{
|
{
|
||||||
d->m_outputWindow->toggle(false);
|
d->m_outputWindow->toggle(Core::IOutputPane::ModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildManager::showTaskWindow()
|
void BuildManager::showTaskWindow()
|
||||||
{
|
{
|
||||||
d->m_taskWindow->popup(false);
|
d->m_taskWindow->popup(Core::IOutputPane::NoModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildManager::toggleTaskWindow()
|
void BuildManager::toggleTaskWindow()
|
||||||
{
|
{
|
||||||
d->m_taskWindow->toggle(false);
|
d->m_taskWindow->toggle(Core::IOutputPane::ModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BuildManager::tasksAvailable() const
|
bool BuildManager::tasksAvailable() const
|
||||||
@@ -546,12 +546,12 @@ bool BuildManager::buildLists(QList<BuildStepList *> bsls, const QStringList &st
|
|||||||
|
|
||||||
bool success = buildQueueAppend(steps, names);
|
bool success = buildQueueAppend(steps, names);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
d->m_outputWindow->popup(false);
|
d->m_outputWindow->popup(Core::IOutputPane::NoModeSwitch);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ProjectExplorerPlugin::instance()->projectExplorerSettings().showCompilerOutput)
|
if (ProjectExplorerPlugin::instance()->projectExplorerSettings().showCompilerOutput)
|
||||||
d->m_outputWindow->popup(false);
|
d->m_outputWindow->popup(Core::IOutputPane::NoModeSwitch);
|
||||||
startBuildQueue(preambelMessage);
|
startBuildQueue(preambelMessage);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -560,11 +560,11 @@ void BuildManager::appendStep(BuildStep *step, const QString &name)
|
|||||||
{
|
{
|
||||||
bool success = buildQueueAppend(QList<BuildStep *>() << step, QStringList() << name);
|
bool success = buildQueueAppend(QList<BuildStep *>() << step, QStringList() << name);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
d->m_outputWindow->popup(false);
|
d->m_outputWindow->popup(Core::IOutputPane::NoModeSwitch);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ProjectExplorerPlugin::instance()->projectExplorerSettings().showCompilerOutput)
|
if (ProjectExplorerPlugin::instance()->projectExplorerSettings().showCompilerOutput)
|
||||||
d->m_outputWindow->popup(false);
|
d->m_outputWindow->popup(Core::IOutputPane::NoModeSwitch);
|
||||||
startBuildQueue();
|
startBuildQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1595,10 +1595,10 @@ void ProjectExplorerPlugin::startRunControl(RunControl *runControl, RunMode runM
|
|||||||
{
|
{
|
||||||
d->m_outputPane->createNewOutputWindow(runControl);
|
d->m_outputPane->createNewOutputWindow(runControl);
|
||||||
if (runMode == NormalRunMode && d->m_projectExplorerSettings.showRunOutput)
|
if (runMode == NormalRunMode && d->m_projectExplorerSettings.showRunOutput)
|
||||||
d->m_outputPane->popup(false);
|
d->m_outputPane->popup(Core::IOutputPane::NoModeSwitch);
|
||||||
if ((runMode == DebugRunMode || runMode == DebugRunModeWithBreakOnMain)
|
if ((runMode == DebugRunMode || runMode == DebugRunModeWithBreakOnMain)
|
||||||
&& d->m_projectExplorerSettings.showDebugOutput)
|
&& d->m_projectExplorerSettings.showDebugOutput)
|
||||||
d->m_outputPane->popup(false);
|
d->m_outputPane->popup(Core::IOutputPane::NoModeSwitch);
|
||||||
d->m_outputPane->showTabFor(runControl);
|
d->m_outputPane->showTabFor(runControl);
|
||||||
connect(runControl, SIGNAL(finished()), this, SLOT(runControlFinished()));
|
connect(runControl, SIGNAL(finished()), this, SLOT(runControlFinished()));
|
||||||
runControl->start();
|
runControl->start();
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ bool ShowOutputTaskHandler::canHandle(const ProjectExplorer::Task &task) const
|
|||||||
void ShowOutputTaskHandler::handle(const ProjectExplorer::Task &task)
|
void ShowOutputTaskHandler::handle(const ProjectExplorer::Task &task)
|
||||||
{
|
{
|
||||||
Q_ASSERT(canHandle(task));
|
Q_ASSERT(canHandle(task));
|
||||||
m_window->popup(); // popup first as this does move the visible area!
|
// popup first as this does move the visible area!
|
||||||
|
m_window->popup(Core::IOutputPane::Flags(Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus));
|
||||||
m_window->showPositionOf(task);
|
m_window->showPositionOf(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#include "taskhub.h"
|
#include "taskhub.h"
|
||||||
#include "extensionsystem/pluginmanager.h"
|
#include "extensionsystem/pluginmanager.h"
|
||||||
#include "projectexplorer.h"
|
#include "projectexplorer.h"
|
||||||
|
#include <coreplugin/ioutputpane.h>
|
||||||
#include <texteditor/basetextmark.h>
|
#include <texteditor/basetextmark.h>
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
|
|
||||||
@@ -152,7 +153,7 @@ void TaskHub::setCategoryVisibility(const Core::Id &categoryId, bool visible)
|
|||||||
|
|
||||||
void TaskHub::requestPopup()
|
void TaskHub::requestPopup()
|
||||||
{
|
{
|
||||||
emit popupRequested(false);
|
emit popupRequested(Core::IOutputPane::NoModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon TaskHub::taskTypeIcon(Task::TaskType t) const
|
QIcon TaskHub::taskTypeIcon(Task::TaskType t) const
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ signals:
|
|||||||
void taskFileNameUpdated(unsigned int id, const QString &fileName);
|
void taskFileNameUpdated(unsigned int id, const QString &fileName);
|
||||||
void taskLineNumberUpdated(unsigned int id, int line);
|
void taskLineNumberUpdated(unsigned int id, int line);
|
||||||
void categoryVisibilityChanged(const Core::Id &categoryId, bool visible);
|
void categoryVisibilityChanged(const Core::Id &categoryId, bool visible);
|
||||||
void popupRequested(bool withFocus);
|
void popupRequested(int);
|
||||||
void showTask(unsigned int id);
|
void showTask(unsigned int id);
|
||||||
void openTask(unsigned int id);
|
void openTask(unsigned int id);
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -305,8 +305,8 @@ TaskWindow::TaskWindow(TaskHub *taskhub) : d(new TaskWindowPrivate)
|
|||||||
this, SLOT(clearTasks(Core::Id)));
|
this, SLOT(clearTasks(Core::Id)));
|
||||||
connect(d->m_taskHub, SIGNAL(categoryVisibilityChanged(Core::Id,bool)),
|
connect(d->m_taskHub, SIGNAL(categoryVisibilityChanged(Core::Id,bool)),
|
||||||
this, SLOT(setCategoryVisibility(Core::Id,bool)));
|
this, SLOT(setCategoryVisibility(Core::Id,bool)));
|
||||||
connect(d->m_taskHub, SIGNAL(popupRequested(bool)),
|
connect(d->m_taskHub, SIGNAL(popupRequested(int)),
|
||||||
this, SLOT(popup(bool)));
|
this, SLOT(popup(int)));
|
||||||
connect(d->m_taskHub, SIGNAL(showTask(uint)),
|
connect(d->m_taskHub, SIGNAL(showTask(uint)),
|
||||||
this, SLOT(showTask(uint)));
|
this, SLOT(showTask(uint)));
|
||||||
connect(d->m_taskHub, SIGNAL(openTask(uint)),
|
connect(d->m_taskHub, SIGNAL(openTask(uint)),
|
||||||
@@ -456,7 +456,7 @@ void TaskWindow::showTask(unsigned int id)
|
|||||||
QModelIndex sourceIdx = d->m_model->index(sourceRow, 0);
|
QModelIndex sourceIdx = d->m_model->index(sourceRow, 0);
|
||||||
QModelIndex filterIdx = d->m_filter->mapFromSource(sourceIdx);
|
QModelIndex filterIdx = d->m_filter->mapFromSource(sourceIdx);
|
||||||
d->m_listview->setCurrentIndex(filterIdx);
|
d->m_listview->setCurrentIndex(filterIdx);
|
||||||
popup(false);
|
popup(Core::IOutputPane::ModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskWindow::openTask(unsigned int id)
|
void TaskWindow::openTask(unsigned int id)
|
||||||
|
|||||||
@@ -941,7 +941,7 @@ void FindReferences::displayResults(int first, int last)
|
|||||||
this, SLOT(openEditor(Find::SearchResultItem)));
|
this, SLOT(openEditor(Find::SearchResultItem)));
|
||||||
connect(m_currentSearch, SIGNAL(cancelled()), this, SLOT(cancel()));
|
connect(m_currentSearch, SIGNAL(cancelled()), this, SLOT(cancel()));
|
||||||
connect(m_currentSearch, SIGNAL(paused(bool)), this, SLOT(setPaused(bool)));
|
connect(m_currentSearch, SIGNAL(paused(bool)), this, SLOT(setPaused(bool)));
|
||||||
Find::SearchResultWindow::instance()->popup(true);
|
Find::SearchResultWindow::instance()->popup(Core::IOutputPane::Flags(Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus));
|
||||||
|
|
||||||
Core::ProgressManager *progressManager = Core::ICore::progressManager();
|
Core::ProgressManager *progressManager = Core::ICore::progressManager();
|
||||||
Core::FutureProgress *progress = progressManager->addTask(
|
Core::FutureProgress *progress = progressManager->addTask(
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ void BaseFileFind::runSearch(Find::SearchResult *search)
|
|||||||
FileFindParameters parameters = search->userData().value<FileFindParameters>();
|
FileFindParameters parameters = search->userData().value<FileFindParameters>();
|
||||||
CountingLabel *label = new CountingLabel;
|
CountingLabel *label = new CountingLabel;
|
||||||
connect(search, SIGNAL(countChanged(int)), label, SLOT(updateCount(int)));
|
connect(search, SIGNAL(countChanged(int)), label, SLOT(updateCount(int)));
|
||||||
Find::SearchResultWindow::instance()->popup(true);
|
Find::SearchResultWindow::instance()->popup(Core::IOutputPane::Flags(Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus));
|
||||||
QFutureWatcher<FileSearchResultList> *watcher = new QFutureWatcher<FileSearchResultList>();
|
QFutureWatcher<FileSearchResultList> *watcher = new QFutureWatcher<FileSearchResultList>();
|
||||||
m_watchers.insert(watcher, search);
|
m_watchers.insert(watcher, search);
|
||||||
watcher->setPendingResultsLimit(1);
|
watcher->setPendingResultsLimit(1);
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ void ValgrindEngine::receiveProcessError(const QString &error, QProcess::Process
|
|||||||
QList<Core::IOutputPane *> panes = ExtensionSystem::PluginManager::getObjects<Core::IOutputPane>();
|
QList<Core::IOutputPane *> panes = ExtensionSystem::PluginManager::getObjects<Core::IOutputPane>();
|
||||||
foreach (Core::IOutputPane *pane, panes) {
|
foreach (Core::IOutputPane *pane, panes) {
|
||||||
if (pane->displayName() == tr("Application Output")) {
|
if (pane->displayName() == tr("Application Output")) {
|
||||||
pane->popup(false);
|
pane->popup(Core::IOutputPane::NoModeSwitch);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -370,23 +370,22 @@ void VcsBaseOutputWindow::appendSilently(const QString &text)
|
|||||||
void VcsBaseOutputWindow::append(const QString &text)
|
void VcsBaseOutputWindow::append(const QString &text)
|
||||||
{
|
{
|
||||||
appendSilently(text);
|
appendSilently(text);
|
||||||
// Pop up without focus
|
|
||||||
if (!d->plainTextEdit()->isVisible())
|
if (!d->plainTextEdit()->isVisible())
|
||||||
popup(false);
|
popup(Core::IOutputPane::NoModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VcsBaseOutputWindow::appendError(const QString &text)
|
void VcsBaseOutputWindow::appendError(const QString &text)
|
||||||
{
|
{
|
||||||
d->plainTextEdit()->appendError(text);
|
d->plainTextEdit()->appendError(text);
|
||||||
if (!d->plainTextEdit()->isVisible())
|
if (!d->plainTextEdit()->isVisible())
|
||||||
popup(false); // Pop up without focus
|
popup(Core::IOutputPane::NoModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VcsBaseOutputWindow::appendWarning(const QString &text)
|
void VcsBaseOutputWindow::appendWarning(const QString &text)
|
||||||
{
|
{
|
||||||
d->plainTextEdit()->appendWarning(text);
|
d->plainTextEdit()->appendWarning(text);
|
||||||
if (!d->plainTextEdit()->isVisible())
|
if (!d->plainTextEdit()->isVisible())
|
||||||
popup(false); // Pop up without focus
|
popup(Core::IOutputPane::NoModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper to format arguments for log windows hiding common password
|
// Helper to format arguments for log windows hiding common password
|
||||||
@@ -441,7 +440,7 @@ void VcsBaseOutputWindow::appendData(const QByteArray &data)
|
|||||||
{
|
{
|
||||||
appendDataSilently(data);
|
appendDataSilently(data);
|
||||||
if (!d->plainTextEdit()->isVisible())
|
if (!d->plainTextEdit()->isVisible())
|
||||||
popup(false); // Pop up without focus
|
popup(Core::IOutputPane::NoModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VcsBaseOutputWindow::appendDataSilently(const QByteArray &data)
|
void VcsBaseOutputWindow::appendDataSilently(const QByteArray &data)
|
||||||
|
|||||||
Reference in New Issue
Block a user