Changeset 806

Show
Ignore:
Timestamp:
08/11/08 10:03:58 (3 months ago)
Author:
liamstask
Message:

- adding some coloration to build log output to help skimming it

Location:
mcbuilder/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • mcbuilder/trunk/include/BuildLog.h

    r683 r806  
    3030  void append(QString msg); 
    3131  void clear( ); 
     32   
     33private: 
     34  QTextCharFormat fmt; 
    3235}; 
    3336 
  • mcbuilder/trunk/src/BuildLog.cpp

    r684 r806  
    3838void BuildLog::append(QString msg) 
    3939{ 
     40  if(msg.startsWith("*****************")) 
     41    fmt.setForeground(Qt::black); 
     42  else 
     43    fmt.setForeground(QColor(75, 75, 75)); // gray 
     44   
     45  if(!msg.endsWith("\n")) // for some reason, block coloring only seems to happen with new lines...shrug 
     46    msg.append("\n"); 
     47   
     48  logConsole->textCursor().setBlockCharFormat(fmt); 
    4049  logConsole->appendPlainText(msg); 
     50   
    4151  // scroll to the bottom 
    4252  logConsole->moveCursor(QTextCursor::End); 
  • mcbuilder/trunk/src/Builder.cpp

    r800 r806  
    5757  } 
    5858  currentProjectPath = projectName; 
    59   setWorkingDirectory(QDir(currentProjectPath).filePath("build")); 
     59  QDir dir(currentProjectPath); 
     60  setWorkingDirectory(dir.filePath("build")); 
    6061  loadDependencies(LIBRARIES_DIR, currentProjectPath);      // this loads up the list of libraries this project depends on 
    6162  createMakefile(currentProjectPath);        // create a Makefile for this project, given the dependencies 
     
    6970  start(makePath + "make"); 
    7071  QString buildmsg("***************************************************************\n"); 
    71   buildmsg += "  mcbuilder - building " + projectName + "\n"; 
     72  buildmsg += "  mcbuilder - building " + dir.dirName() + "\n"; 
    7273  buildmsg += QDateTime::currentDateTime().toString("  MMM d, yyyy h:m ap") + "\n"; 
    7374  buildmsg += "***************************************************************";