[cmake-commits] hoffman committed CMakeSetupDialog.cxx 1.33 1.34
CMakeSetupDialog.h 1.18 1.19
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Feb 14 15:06:07 EST 2008
Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv1208
Modified Files:
CMakeSetupDialog.cxx CMakeSetupDialog.h
Log Message:
ENH: make sure html < > & stuff is escaped for the output window
Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- CMakeSetupDialog.cxx 14 Feb 2008 14:14:04 -0000 1.33
+++ CMakeSetupDialog.cxx 14 Feb 2008 20:06:05 -0000 1.34
@@ -16,7 +16,6 @@
=========================================================================*/
#include "CMakeSetupDialog.h"
-
#include <QFileDialog>
#include <QProgressBar>
#include <QMessageBox>
@@ -177,7 +176,7 @@
QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(outputMessage(QString)),
- this->Output, SLOT(append(QString)));
+ this, SLOT(message(QString)));
QObject::connect(this->Advanced, SIGNAL(clicked(bool)),
this->CacheValues, SLOT(setShowAdvanced(bool)));
@@ -467,10 +466,27 @@
QStringList messages = message.split('\n');
foreach(QString m, messages)
{
+ // make sure we escape html tags in the cmake messages
+ m.replace(QString("&"), QString("&"));
+ m.replace(QString("<"), QString("<"));
+ m.replace(QString(">"), QString(">"));
this->Output->append(QString("<b><font color=red>%1</font></b>").arg(m));
}
}
+void CMakeSetupDialog::message(const QString& message)
+{
+ QStringList messages = message.split('\n');
+ foreach(QString m, messages)
+ {
+ // make sure we escape html tags in the cmake messages
+ m.replace(QString("&"), QString("&"));
+ m.replace(QString("<"), QString("<"));
+ m.replace(QString(">"), QString(">"));
+ this->Output->append(m);
+ }
+}
+
void CMakeSetupDialog::setEnabledState(bool enabled)
{
// disable parts of the GUI during configure/generate
Index: CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- CMakeSetupDialog.h 1 Feb 2008 15:41:29 -0000 1.18
+++ CMakeSetupDialog.h 14 Feb 2008 20:06:05 -0000 1.19
@@ -50,6 +50,7 @@
void finishConfigure(int error);
void finishGenerate(int error);
void error(const QString& message);
+ void message(const QString& message);
void doSourceBrowse();
void doBinaryBrowse();
More information about the Cmake-commits
mailing list