diff options
Diffstat (limited to 'src/plugins/projectexplorer/appoutputpane.cpp')
-rw-r--r-- | src/plugins/projectexplorer/appoutputpane.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp index e0969dc8df..74917d06d7 100644 --- a/src/plugins/projectexplorer/appoutputpane.cpp +++ b/src/plugins/projectexplorer/appoutputpane.cpp @@ -167,7 +167,7 @@ AppOutputPane::AppOutputPane() : m_mainWidget->setLayout(layout); - connect(ProjectExplorerPlugin::instance()->session(), SIGNAL(aboutToUnloadSession(QString)), + connect(SessionManager::instance(), SIGNAL(aboutToUnloadSession(QString)), this, SLOT(aboutToUnloadSession())); connect(ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()), this, SLOT(updateFromSettings())); @@ -301,7 +301,7 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc) this, SLOT(appendMessage(ProjectExplorer::RunControl*,QString,Utils::OutputFormat))); Utils::OutputFormatter *formatter = rc->outputFormatter(); - formatter->setFont(TextEditor::TextEditorSettings::instance()->fontSettings().font()); + formatter->setFont(TextEditor::TextEditorSettings::fontSettings().font()); // First look if we can reuse a tab const int size = m_runControlTabs.size(); @@ -327,8 +327,8 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc) ow->setWindowTitle(tr("Application Output Window")); ow->setWindowIcon(QIcon(QLatin1String(Constants::ICON_WINDOW))); ow->setFormatter(formatter); - ow->setWordWrapEnabled(ProjectExplorerPlugin::instance()->projectExplorerSettings().wrapAppOutput); - ow->setMaxLineCount(ProjectExplorerPlugin::instance()->projectExplorerSettings().maxAppOutputLines); + ow->setWordWrapEnabled(ProjectExplorerPlugin::projectExplorerSettings().wrapAppOutput); + ow->setMaxLineCount(ProjectExplorerPlugin::projectExplorerSettings().maxAppOutputLines); Aggregation::Aggregate *agg = new Aggregation::Aggregate; agg->add(ow); agg->add(new Find::BaseTextFind(ow)); @@ -341,7 +341,7 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc) void AppOutputPane::handleOldOutput(Core::OutputWindow *window) const { - if (ProjectExplorerPlugin::instance()->projectExplorerSettings().cleanOldAppOutput) + if (ProjectExplorerPlugin::projectExplorerSettings().cleanOldAppOutput) window->clear(); else window->grayOutOldContent(); @@ -352,8 +352,8 @@ void AppOutputPane::updateFromSettings() const int size = m_runControlTabs.size(); for (int i = 0; i < size; i++) { RunControlTab &tab =m_runControlTabs[i]; - tab.window->setWordWrapEnabled(ProjectExplorerPlugin::instance()->projectExplorerSettings().wrapAppOutput); - tab.window->setMaxLineCount(ProjectExplorerPlugin::instance()->projectExplorerSettings().maxAppOutputLines); + tab.window->setWordWrapEnabled(ProjectExplorerPlugin::projectExplorerSettings().wrapAppOutput); + tab.window->setMaxLineCount(ProjectExplorerPlugin::projectExplorerSettings().maxAppOutputLines); } } @@ -486,11 +486,10 @@ bool AppOutputPane::closeTab(int tabIndex, CloseTabMode closeTabMode) bool AppOutputPane::optionallyPromptToStop(RunControl *runControl) { - ProjectExplorerPlugin *pe = ProjectExplorerPlugin::instance(); - ProjectExplorerSettings settings = pe->projectExplorerSettings(); + ProjectExplorerSettings settings = ProjectExplorerPlugin::projectExplorerSettings(); if (!runControl->promptToStop(&settings.prompToStopRunControl)) return false; - pe->setProjectExplorerSettings(settings); + ProjectExplorerPlugin::setProjectExplorerSettings(settings); return true; } @@ -569,6 +568,7 @@ void AppOutputPane::slotRunControlFinished() ProjectExplorer::RunControl *rc = qobject_cast<RunControl *>(sender()); QMetaObject::invokeMethod(this, "slotRunControlFinished2", Qt::QueuedConnection, Q_ARG(ProjectExplorer::RunControl *, rc)); + rc->outputFormatter()->flush(); } void AppOutputPane::slotRunControlFinished2(RunControl *sender) |