[Cmake-commits] [cmake-commits] clinton committed CMakeSetupDialog.cxx 1.49 1.50 CMakeSetupDialog.h 1.25 1.26
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Apr 14 16:15:31 EDT 2008
Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv19601
Modified Files:
CMakeSetupDialog.cxx CMakeSetupDialog.h
Log Message:
BUG: Fix issue when non-error messages were incorrectly colored red.
Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.49
retrieving revision 1.50
diff -C 2 -d -r1.49 -r1.50
*** CMakeSetupDialog.cxx 7 Apr 2008 23:19:49 -0000 1.49
--- CMakeSetupDialog.cxx 14 Apr 2008 20:15:28 -0000 1.50
***************
*** 139,142 ****
--- 139,143 ----
QFont outputFont("Courier");
this->Output->setFont(outputFont);
+ this->ErrorFormat.setForeground(QBrush(Qt::red));
// start the cmake worker thread
***************
*** 513,542 ****
this->ProgressBar->setValue(qRound(percent * 100));
}
!
void CMakeSetupDialog::error(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(">"));
! 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);
! }
}
--- 514,528 ----
this->ProgressBar->setValue(qRound(percent * 100));
}
!
void CMakeSetupDialog::error(const QString& message)
{
! this->Output->setCurrentCharFormat(this->ErrorFormat);
! this->Output->append(message);
}
void CMakeSetupDialog::message(const QString& message)
{
! this->Output->setCurrentCharFormat(this->MessageFormat);
! this->Output->append(message);
}
Index: CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -C 2 -d -r1.25 -r1.26
*** CMakeSetupDialog.h 7 Apr 2008 23:19:50 -0000 1.25
--- CMakeSetupDialog.h 14 Apr 2008 20:15:28 -0000 1.26
***************
*** 100,103 ****
--- 100,106 ----
State CurrentState;
+ QTextCharFormat ErrorFormat;
+ QTextCharFormat MessageFormat;
+
};
More information about the Cmake-commits
mailing list