Changeset 8127 in ntrip for trunk/BNC/src/bnccore.cpp


Ignore:
Timestamp:
May 10, 2017, 3:20:54 PM (7 years ago)
Author:
stoecker
Message:

update qwt and qwtpolar, many QT5 fixes (unfinished)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bnccore.cpp

    r7999 r8127  
    170170      expandEnvVar(logFileName);
    171171      _logFile = new QFile(logFileName + "_" +
    172                           currDate.toString("yyMMdd").toAscii().data());
     172                          currDate.toString("yyMMdd").toLatin1().data());
    173173      _fileDate = currDate;
    174174      if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) {
     
    189189      msgLocal = msg.mid(1);
    190190    }
    191     *_logStream << currentDateAndTimeGPS().toString("yy-MM-dd hh:mm:ss ").toAscii().data();
     191    *_logStream << currentDateAndTimeGPS().toString("yy-MM-dd hh:mm:ss ").toLatin1().data();
    192192    *_logStream << msgLocal.data() << endl;
    193193    _logStream->flush();
     
    202202  t_irc ircPut = _ephUser.putNewEph(eph, true);
    203203  if      (eph->checkState() == t_eph::bad) {
    204     messagePrivate("WRONG EPHEMERIS\n" + eph->toString(3.0).toAscii());
     204    messagePrivate("WRONG EPHEMERIS\n" + eph->toString(3.0).toLatin1());
    205205    return failure;
    206206  }
    207207  else if (eph->checkState() == t_eph::outdated) {
    208     messagePrivate("OUTDATED EPHEMERIS\n" + eph->toString(3.0).toAscii());
     208    messagePrivate("OUTDATED EPHEMERIS\n" + eph->toString(3.0).toLatin1());
    209209    return failure;
    210210  }
     
    270270    comments.append("Source: " + decoder +
    271271                    " " + url.encodedHost() +
    272                     "/" + url.path().mid(1).toAscii());
     272                    "/" + url.path().mid(1).toLatin1());
    273273  }
    274274
     
    388388        line.sprintf(
    389389          "%9.2f%11sN: GNSS NAV DATA    M: Mixed%12sRINEX VERSION / TYPE\n",
    390           t_rnxNavFile::defaultRnxNavVersion3, "", "");
     390          defaultRnxNavVersion3, "", "");
    391391        *_ephStreamGPS << line;
    392392
    393393        QString hlp = currentDateAndTimeGPS().toString("yyyyMMdd hhmmss UTC").leftJustified(20, ' ', true);
    394         *_ephStreamGPS << _pgmName.toAscii().data()
    395                        << _userName.toAscii().data()
    396                        << hlp.toAscii().data()
     394        *_ephStreamGPS << _pgmName.toLatin1().data()
     395                       << _userName.toLatin1().data()
     396                       << hlp.toLatin1().data()
    397397                       << "PGM / RUN BY / DATE" << endl;
    398398
     
    415415        QString line;
    416416        line.sprintf("%9.2f%11sN: GPS NAV DATA%25sRINEX VERSION / TYPE\n",
    417                      t_rnxNavFile::defaultRnxNavVersion2, "", "");
     417                     defaultRnxNavVersion2, "", "");
    418418        *_ephStreamGPS << line;
    419419
    420420        QString hlp = currentDateAndTimeGPS().date().toString("dd-MMM-yyyy").leftJustified(20, ' ', true);
    421         *_ephStreamGPS << _pgmName.toAscii().data()
    422                        << _userName.toAscii().data()
    423                        << hlp.toAscii().data()
     421        *_ephStreamGPS << _pgmName.toLatin1().data()
     422                       << _userName.toLatin1().data()
     423                       << hlp.toLatin1().data()
    424424                       << "PGM / RUN BY / DATE" << endl;
    425425
     
    437437        QString line;
    438438        line.sprintf("%9.2f%11sG: GLONASS NAV DATA%21sRINEX VERSION / TYPE\n",
    439                      t_rnxNavFile::defaultRnxNavVersion2, "", "");
     439                     defaultRnxNavVersion2, "", "");
    440440        *_ephStreamGlonass << line;
    441441
    442442        QString hlp = currentDateAndTimeGPS().date().toString("dd-MMM-yyyy").leftJustified(20, ' ', true);
    443         *_ephStreamGlonass << _pgmName.toAscii().data()
    444                            << _userName.toAscii().data()
    445                            << hlp.toAscii().data()
     443        *_ephStreamGlonass << _pgmName.toLatin1().data()
     444                           << _userName.toLatin1().data()
     445                           << hlp.toLatin1().data()
    446446                           << "PGM / RUN BY / DATE" << endl;
    447447
     
    464464void t_bncCore::printEph(const t_eph& eph, bool printFile) {
    465465
    466   QString strV2 = eph.toString(t_rnxNavFile::defaultRnxNavVersion2);
    467   QString strV3 = eph.toString(t_rnxObsHeader::defaultRnxObsVersion3);
     466  QString strV2 = eph.toString(defaultRnxNavVersion2);
     467  QString strV3 = eph.toString(defaultRnxObsVersion3);
    468468
    469469  if     (_rinexVers == 2 && eph.type() == t_eph::GLONASS) {
     
    487487  if (printFile && stream) {
    488488    if (_rinexVers == 2) {
    489       *stream << strV2.toAscii();
     489      *stream << strV2.toLatin1();
    490490    }
    491491    else {
    492       *stream << strV3.toAscii();
     492      *stream << strV3.toLatin1();
    493493    }
    494494    stream->flush();
     
    502502      QTcpSocket* sock = is.next();
    503503      if (sock->state() == QAbstractSocket::ConnectedState) {
    504         if (sock->write(strV3.toAscii()) == -1) {
     504        if (sock->write(strV3.toLatin1()) == -1) {
    505505          delete sock;
    506506          is.remove();
Note: See TracChangeset for help on using the changeset viewer.