diff --git a/src/plugins/projectexplorer/outputwindow.cpp b/src/plugins/projectexplorer/outputwindow.cpp
index 9e2d728df77..3304912f7c7 100644
--- a/src/plugins/projectexplorer/outputwindow.cpp
+++ b/src/plugins/projectexplorer/outputwindow.cpp
@@ -482,6 +482,8 @@ OutputWindow::OutputWindow(QWidget *parent)
//setCenterOnScroll(false);
setFrameShape(QFrame::NoFrame);
setMouseTracking(true);
+ if (!ProjectExplorerPlugin::instance()->projectExplorerSettings().wrapAppOutput)
+ setWordWrapMode(QTextOption::NoWrap);
static uint usedIds = 0;
Core::ICore *core = Core::ICore::instance();
@@ -520,6 +522,9 @@ OutputWindow::OutputWindow(QWidget *parent)
redoAction->setEnabled(false);
cutAction->setEnabled(false);
copyAction->setEnabled(false);
+
+ connect(ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()),
+ this, SLOT(updateWordWrapMode()));
}
OutputWindow::~OutputWindow()
@@ -738,5 +743,13 @@ void OutputWindow::enableUndoRedo()
setUndoRedoEnabled(true);
}
+void OutputWindow::updateWordWrapMode()
+{
+ if (ProjectExplorerPlugin::instance()->projectExplorerSettings().wrapAppOutput)
+ setWordWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
+ else
+ setWordWrapMode(QTextOption::NoWrap);
+}
+
} // namespace Internal
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/outputwindow.h b/src/plugins/projectexplorer/outputwindow.h
index b9a59f7104a..ad6999ea1dd 100644
--- a/src/plugins/projectexplorer/outputwindow.h
+++ b/src/plugins/projectexplorer/outputwindow.h
@@ -176,6 +176,9 @@ protected:
virtual void mouseReleaseEvent(QMouseEvent *e);
virtual void mouseMoveEvent(QMouseEvent *e);
+private slots:
+ void updateWordWrapMode();
+
private:
void enableUndoRedo();
QString doNewlineEnfocement(const QString &out);
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 8ee1d474756..5b0ba9b89ac 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -797,6 +797,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
d->m_projectExplorerSettings.saveBeforeBuild = s->value("ProjectExplorer/Settings/SaveBeforeBuild", false).toBool();
d->m_projectExplorerSettings.showCompilerOutput = s->value("ProjectExplorer/Settings/ShowCompilerOutput", false).toBool();
d->m_projectExplorerSettings.cleanOldAppOutput = s->value("ProjectExplorer/Settings/CleanOldAppOutput", false).toBool();
+ d->m_projectExplorerSettings.wrapAppOutput = s->value("ProjectExplorer/Settings/WrapAppOutput", true).toBool();
d->m_projectExplorerSettings.useJom = s->value("ProjectExplorer/Settings/UseJom", true).toBool();
d->m_projectExplorerSettings.environmentId = QUuid(s->value("ProjectExplorer/Settings/EnvironmentId").toString());
if (d->m_projectExplorerSettings.environmentId.isNull())
@@ -1050,6 +1051,7 @@ void ProjectExplorerPlugin::savePersistentSettings()
s->setValue("ProjectExplorer/Settings/SaveBeforeBuild", d->m_projectExplorerSettings.saveBeforeBuild);
s->setValue("ProjectExplorer/Settings/ShowCompilerOutput", d->m_projectExplorerSettings.showCompilerOutput);
s->setValue("ProjectExplorer/Settings/CleanOldAppOutput", d->m_projectExplorerSettings.cleanOldAppOutput);
+ s->setValue("ProjectExplorer/Settings/WrapAppOutput", d->m_projectExplorerSettings.wrapAppOutput);
s->setValue("ProjectExplorer/Settings/UseJom", d->m_projectExplorerSettings.useJom);
s->setValue("ProjectExplorer/Settings/EnvironmentId", d->m_projectExplorerSettings.environmentId.toString());
}
diff --git a/src/plugins/projectexplorer/projectexplorersettings.h b/src/plugins/projectexplorer/projectexplorersettings.h
index 256f4ef2639..26b50a31e75 100644
--- a/src/plugins/projectexplorer/projectexplorersettings.h
+++ b/src/plugins/projectexplorer/projectexplorersettings.h
@@ -37,14 +37,16 @@ namespace Internal {
struct ProjectExplorerSettings
{
- ProjectExplorerSettings() : buildBeforeDeploy(true), deployBeforeRun(true), saveBeforeBuild(false),
- showCompilerOutput(false), cleanOldAppOutput(false), useJom(true) {}
+ ProjectExplorerSettings() : buildBeforeDeploy(true), deployBeforeRun(true),
+ saveBeforeBuild(false), showCompilerOutput(false),
+ cleanOldAppOutput(false), wrapAppOutput(true), useJom(true) {}
bool buildBeforeDeploy;
bool deployBeforeRun;
bool saveBeforeBuild;
bool showCompilerOutput;
bool cleanOldAppOutput;
+ bool wrapAppOutput;
bool useJom;
// Add a UUid which is used to identify the development environment.
// This is used to warn the user when he is trying to open a .user file that was created
@@ -59,6 +61,7 @@ inline bool operator==(const ProjectExplorerSettings &p1, const ProjectExplorerS
&& p1.saveBeforeBuild == p2.saveBeforeBuild
&& p1.showCompilerOutput == p2.showCompilerOutput
&& p1.cleanOldAppOutput == p2.cleanOldAppOutput
+ && p1.wrapAppOutput == p2.wrapAppOutput
&& p1.useJom == p2.useJom;
}
diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.cpp b/src/plugins/projectexplorer/projectexplorersettingspage.cpp
index 71f6ed60d9e..ec8a1419940 100644
--- a/src/plugins/projectexplorer/projectexplorersettingspage.cpp
+++ b/src/plugins/projectexplorer/projectexplorersettingspage.cpp
@@ -70,6 +70,7 @@ ProjectExplorerSettings ProjectExplorerSettingsWidget::settings() const
pes.saveBeforeBuild = m_ui.saveAllFilesCheckBox->isChecked();
pes.showCompilerOutput = m_ui.showCompileOutputCheckBox->isChecked();
pes.cleanOldAppOutput = m_ui.cleanOldAppOutputCheckBox->isChecked();
+ pes.wrapAppOutput = m_ui.wrapAppOutputCheckBox->isChecked();
pes.useJom = m_ui.jomCheckbox->isChecked();
return pes;
}
@@ -81,6 +82,7 @@ void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings &
m_ui.saveAllFilesCheckBox->setChecked(pes.saveBeforeBuild);
m_ui.showCompileOutputCheckBox->setChecked(pes.showCompilerOutput);
m_ui.cleanOldAppOutputCheckBox->setChecked(pes.cleanOldAppOutput);
+ m_ui.wrapAppOutputCheckBox->setChecked(pes.wrapAppOutput);
m_ui.jomCheckbox->setChecked(pes.useJom);
}
diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.ui b/src/plugins/projectexplorer/projectexplorersettingspage.ui
index dc0c30526d1..020f53f7d38 100644
--- a/src/plugins/projectexplorer/projectexplorersettingspage.ui
+++ b/src/plugins/projectexplorer/projectexplorersettingspage.ui
@@ -7,7 +7,7 @@
0
0
437
- 343
+ 389
@@ -90,6 +90,13 @@
+ -
+
+
+ Word-wrap application output
+
+
+
-