- Timestamp:
- Jul 31, 2014, 2:32:14 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppThread.cpp
r5726 r5727 69 69 // ---------------------- 70 70 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>)), 72 72 this, SLOT(slotNewObs(QByteArray, QList<t_obs>))); 73 73 -
trunk/BNC/src/bnccore.cpp
r5577 r5727 72 72 _logFile = 0; 73 73 _logStream = 0; 74 _caster = 0;75 74 _rawFile = 0; 76 75 #ifdef USE_COMBINATION … … 631 630 void t_bncCore::slotQuit() { 632 631 cout << "t_bncCore::slotQuit" << endl; 633 delete _caster;632 _caster.clear(); 634 633 qApp->quit(); 635 634 } -
trunk/BNC/src/bnccore.h
r5722 r5727 51 51 void setPort(int port); 52 52 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;} 55 55 QDateTime* _currentDateAndTimeGPS; 56 56 void setConfFileName(const QString& confFileName); … … 128 128 QTcpServer* _serverNMEA; 129 129 QList<QTcpSocket*>* _socketsNMEA; 130 bncCaster*_caster;130 QSharedPointer<bncCaster> _caster; 131 131 QMap<QString, bncTime> _lastCorrDumpTime; 132 132 double _waitCoTime; -
trunk/BNC/src/bncmain.cpp
r5528 r5727 193 193 bncEphUploadCaster* casterEph = new bncEphUploadCaster(); (void) casterEph; 194 194 195 bncCaster* caster = new bncCaster();195 QSharedPointer<bncCaster> caster(new bncCaster()); 196 196 197 197 BNC_CORE->setCaster(caster); … … 200 200 BNC_CORE->initCombination(); 201 201 202 BNC_CORE->connect(caster , SIGNAL(getThreadsFinished()), &app, SLOT(quit()));202 BNC_CORE->connect(caster.data(), SIGNAL(getThreadsFinished()), &app, SLOT(quit())); 203 203 204 204 BNC_CORE->slotMessage("========== Start BNC v" BNCVERSION " =========", true); -
trunk/BNC/src/bncwindow.cpp
r5725 r5727 90 90 #endif 91 91 92 _caster = 0;93 92 _casterEph = 0; 94 93 … … 1528 1527 //////////////////////////////////////////////////////////////////////////// 1529 1528 bncWindow::~bncWindow() { 1530 delete _caster;1529 _caster.clear(); 1531 1530 delete _casterEph; 1532 1531 delete _pppMain; … … 1991 1990 void bncWindow::slotGetThreadsFinished() { 1992 1991 BNC_CORE->slotMessage("All Get Threads Terminated", true); 1993 delete _caster; _caster = 0;1992 _caster.clear(); 1994 1993 delete _casterEph; _casterEph = 0; 1995 1994 _runningRealTime = false; … … 2026 2025 enableStartStop(); 2027 2026 2028 _caster = new bncCaster();2027 _caster = QSharedPointer<bncCaster>(new bncCaster()); 2029 2028 2030 2029 BNC_CORE->setCaster(_caster); … … 2033 2032 BNC_CORE->initCombination(); 2034 2033 2035 connect(_caster , SIGNAL(getThreadsFinished()),2034 connect(_caster.data(), SIGNAL(getThreadsFinished()), 2036 2035 this, SLOT(slotGetThreadsFinished())); 2037 2036 2038 connect (_caster , SIGNAL(mountPointsRead(QList<bncGetThread*>)),2037 connect (_caster.data(), SIGNAL(mountPointsRead(QList<bncGetThread*>)), 2039 2038 this, SLOT(slotMountPointsRead(QList<bncGetThread*>))); 2040 2039 … … 2088 2087 } 2089 2088 BNC_CORE->stopCombination(); 2090 delete _caster; _caster = 0;2089 _caster.clear(); 2091 2090 delete _casterEph; _casterEph = 0; 2092 2091 _runningRealTime = false; -
trunk/BNC/src/bncwindow.h
r5716 r5727 260 260 bncBytesCounter* _uploadEphBytesCounter; 261 261 262 bncCaster*_caster;262 QSharedPointer<bncCaster> _caster; 263 263 264 264 bncEphUploadCaster* _casterEph;
Note:
See TracChangeset
for help on using the changeset viewer.