- Timestamp:
- Sep 12, 2013, 5:57:31 PM (11 years ago)
- Location:
- trunk/GnssCenter/map_stations
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/map_stations/map_stations.cpp
r5430 r5431 68 68 ///////////////////////////////////////////////////////////////////////////// 69 69 t_map_stations::~t_map_stations() { 70 if (_thriftClient) { 71 _thriftClient->stopAndDestroy(); 72 } 70 slotStopThrift(); 73 71 if (_results) { 74 72 while (!_results->empty()) { … … 85 83 if (!_thriftClient) { 86 84 _thriftClient = new t_thriftClient(this); 85 connect(_thriftClient, SIGNAL(finished()), this, SLOT(slotThriftFinished())); 87 86 _thriftClient->start(); 88 87 slotPlotResults(); … … 98 97 ///////////////////////////////////////////////////////////////////////////// 99 98 void t_map_stations::slotStopThrift() { 100 if (_thriftClient && _thriftClient->isRunning()) { 101 _thriftClient->stopAndDestroy(); 99 qDebug() << "slotStopThrift" << _thriftClient; 100 if (_thriftClient) { 101 _thriftClient->stop(); 102 102 _thriftClient = 0; 103 103 } 104 } 105 106 // 107 ///////////////////////////////////////////////////////////////////////////// 108 void t_map_stations::slotThriftFinished() { 109 qDebug() << "slotThriftFinished" << _thriftClient; 110 sender()->deleteLater(); 111 _thriftClient = 0; 104 112 } 105 113 -
trunk/GnssCenter/map_stations/map_stations.h
r5430 r5431 26 26 void slotStartThrift(); 27 27 void slotStopThrift(); 28 void slotThriftFinished(); 28 29 void slotPlotResults(); 29 30 -
trunk/GnssCenter/map_stations/thriftclient.cpp
r5427 r5431 62 62 cerr << "Unknown exception" << endl; 63 63 } 64 this->terminate();65 this->deleteLater();66 64 } 67 65 -
trunk/GnssCenter/map_stations/thriftclient.h
r5428 r5431 68 68 ~t_thriftClient(); 69 69 virtual void run(); 70 void stop AndDestroy() {70 void stop() { 71 71 QMutexLocker locker(&_mutex); 72 72 _stop = true;
Note:
See TracChangeset
for help on using the changeset viewer.