mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 16:23:46 +08:00
few fixes from LGTM
old-commit-hash: 758794dec5a886a8c3704d9e2ac191f8c208cc7e
This commit is contained in:
@@ -74,6 +74,10 @@ LogReader::LogReader(const QString& file, Events *events_, QReadWriteLock* event
|
||||
});
|
||||
}
|
||||
|
||||
LogReader::~LogReader() {
|
||||
delete parser;
|
||||
}
|
||||
|
||||
void LogReader::mergeEvents(int dled) {
|
||||
auto amsg = kj::arrayPtr((const capnp::word*)(raw.data() + event_offset), (dled-event_offset)/sizeof(capnp::word));
|
||||
Events events_local;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef FILEREADER_HPP
|
||||
#define FILEREADER_HPP
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QNetworkAccessManager>
|
||||
@@ -20,7 +19,8 @@
|
||||
#include "channel.hpp"
|
||||
|
||||
class FileReader : public QObject {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FileReader(const QString& file_);
|
||||
void startRequest(const QUrl &url);
|
||||
@@ -28,10 +28,13 @@ public:
|
||||
virtual void readyRead();
|
||||
void httpFinished();
|
||||
virtual void done() {};
|
||||
|
||||
public slots:
|
||||
void process();
|
||||
|
||||
protected:
|
||||
QNetworkReply *reply;
|
||||
|
||||
private:
|
||||
QNetworkAccessManager *qnam;
|
||||
QElapsedTimer timer;
|
||||
@@ -44,9 +47,12 @@ class LogReader : public FileReader {
|
||||
Q_OBJECT
|
||||
public:
|
||||
LogReader(const QString& file, Events *, QReadWriteLock* events_lock_, QMap<int, QPair<int, int> > *eidx_);
|
||||
~LogReader();
|
||||
|
||||
void readyRead();
|
||||
void done() { is_done = true; };
|
||||
bool is_done = false;
|
||||
|
||||
private:
|
||||
bz_stream bStream;
|
||||
|
||||
@@ -63,6 +69,3 @@ private:
|
||||
QReadWriteLock* events_lock;
|
||||
QMap<int, QPair<int, int> > *eidx;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user