Changeset 5727 in ntrip


Ignore:
Timestamp:
Jul 31, 2014, 2:32:14 PM (8 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppThread.cpp

    r5726 r5727  
    6969  // ----------------------
    7070  if (BNC_CORE->caster()) {
    71     connect(BNC_CORE->caster(), SIGNAL(newObs(QByteArray, QList<t_obs>)),
     71    connect(BNC_CORE->caster().data(), SIGNAL(newObs(QByteArray, QList<t_obs>)),
    7272          this,      SLOT(slotNewObs(QByteArray, QList<t_obs>)));
    7373
  • trunk/BNC/src/bnccore.cpp

    r5577 r5727  
    7272  _logFile     = 0;
    7373  _logStream   = 0;
    74   _caster      = 0;
    7574  _rawFile     = 0;
    7675#ifdef USE_COMBINATION
     
    631630void t_bncCore::slotQuit() {
    632631  cout << "t_bncCore::slotQuit" << endl;
    633   delete _caster;
     632  _caster.clear();
    634633  qApp->quit();
    635634}
  • trunk/BNC/src/bnccore.h

    r5722 r5727  
    5151    void setPort(int port);
    5252    void setPortCorr(int port);
    53     void setCaster(bncCaster* caster) {_caster = caster;}
    54     const bncCaster* caster() const {return _caster;}
     53    void setCaster(QSharedPointer<bncCaster> caster) {_caster = caster;}
     54    QSharedPointer<bncCaster> caster() const {return _caster;}
    5555    QDateTime* _currentDateAndTimeGPS;
    5656    void setConfFileName(const QString& confFileName);
     
    128128    QTcpServer*         _serverNMEA;
    129129    QList<QTcpSocket*>* _socketsNMEA;
    130     bncCaster*          _caster;
     130    QSharedPointer<bncCaster> _caster;
    131131    QMap<QString, bncTime> _lastCorrDumpTime;
    132132    double              _waitCoTime;
  • trunk/BNC/src/bncmain.cpp

    r5528 r5727  
    193193    bncEphUploadCaster* casterEph = new bncEphUploadCaster(); (void) casterEph;
    194194   
    195     bncCaster* caster = new bncCaster();
     195    QSharedPointer<bncCaster> caster(new bncCaster());
    196196   
    197197    BNC_CORE->setCaster(caster);
     
    200200    BNC_CORE->initCombination();
    201201   
    202     BNC_CORE->connect(caster, SIGNAL(getThreadsFinished()), &app, SLOT(quit()));
     202    BNC_CORE->connect(caster.data(), SIGNAL(getThreadsFinished()), &app, SLOT(quit()));
    203203   
    204204    BNC_CORE->slotMessage("========== Start BNC v" BNCVERSION " =========", true);
  • trunk/BNC/src/bncwindow.cpp

    r5725 r5727  
    9090#endif
    9191
    92   _caster    = 0;
    9392  _casterEph = 0;
    9493
     
    15281527////////////////////////////////////////////////////////////////////////////
    15291528bncWindow::~bncWindow() {
    1530   delete _caster;
     1529  _caster.clear();
    15311530  delete _casterEph;
    15321531  delete _pppMain;
     
    19911990void bncWindow::slotGetThreadsFinished() {
    19921991  BNC_CORE->slotMessage("All Get Threads Terminated", true);
    1993   delete _caster;    _caster    = 0;
     1992  _caster.clear();
    19941993  delete _casterEph; _casterEph = 0;
    19951994  _runningRealTime = false;
     
    20262025  enableStartStop();
    20272026
    2028   _caster = new bncCaster();
     2027  _caster = QSharedPointer<bncCaster>(new bncCaster());
    20292028
    20302029  BNC_CORE->setCaster(_caster);
     
    20332032  BNC_CORE->initCombination();
    20342033
    2035   connect(_caster, SIGNAL(getThreadsFinished()),
     2034  connect(_caster.data(), SIGNAL(getThreadsFinished()),
    20362035          this, SLOT(slotGetThreadsFinished()));
    20372036
    2038   connect (_caster, SIGNAL(mountPointsRead(QList<bncGetThread*>)),
     2037  connect (_caster.data(), SIGNAL(mountPointsRead(QList<bncGetThread*>)),
    20392038           this, SLOT(slotMountPointsRead(QList<bncGetThread*>)));
    20402039
     
    20882087    }
    20892088    BNC_CORE->stopCombination();
    2090     delete _caster;    _caster    = 0;
     2089    _caster.clear();
    20912090    delete _casterEph; _casterEph = 0;
    20922091    _runningRealTime = false;
  • trunk/BNC/src/bncwindow.h

    r5716 r5727  
    260260    bncBytesCounter* _uploadEphBytesCounter;
    261261
    262     bncCaster* _caster;
     262    QSharedPointer<bncCaster> _caster;
    263263
    264264    bncEphUploadCaster* _casterEph;
Note: See TracChangeset for help on using the changeset viewer.