Changeset 149 in ntrip for trunk/BNC/bncapp.cpp


Ignore:
Timestamp:
Sep 8, 2006, 9:04:28 PM (18 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncapp.cpp

    r109 r149  
    1717
    1818#include <iostream>
     19#include <QSettings>
    1920
    2021#include "bncapp.h"
     
    2930  _logFile   = 0;
    3031  _logStream = 0;
    31   for (int ii = 1; ii < argc; ii++) {
    32     if (QString(argv[ii]) == "-o" && ii+1 < argc) {
    33       _logFile = new QFile(argv[ii+1]);
    34       _logFile->open(QIODevice::WriteOnly);
    35       _logStream = new QTextStream();
    36       _logStream->setDevice(_logFile);
    37     }
     32  QSettings settings;
     33  QString logFileName = settings.value("logFile").toString();
     34  if ( !logFileName.isEmpty() ) {
     35    _logFile = new QFile(logFileName);
     36    _logFile->open(QIODevice::WriteOnly);
     37    _logStream = new QTextStream();
     38    _logStream->setDevice(_logFile);
    3839  }
    3940}
Note: See TracChangeset for help on using the changeset viewer.