Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions src/application/revisionsingleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ class RevisionSingleton : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(RevisionSingleton)
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
Q_PROPERTY(QString name READ name CONSTANT)
Q_PROPERTY(QString runtimeQtVersion READ runtimeQtVersion CONSTANT)
Q_PROPERTY(QString compiledQtVersion READ compiledQtVersion CONSTANT)

RevisionSingleton() {
}

public:
static QObject *qmlInstance(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)

return new RevisionSingleton;
}
Expand All @@ -31,8 +33,16 @@ class RevisionSingleton : public QObject
return QStringLiteral(REVISION);
}

signals:
void nameChanged(const QString &name);
QString runtimeQtVersion() const
{
return qVersion();
}

QString compiledQtVersion() const
{
return QT_VERSION_STR;
}

}; // class RevisionSingleton
} // namespace qtquickvcp

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@
<source>TLO</source>
<translation>TLO</translation>
</message>
<message>
<source>S:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditToolTableAction</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@
<source>TLO</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>S:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditToolTableAction</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@
<source>TLO</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>S:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditToolTableAction</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@
<source>TLO</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>S:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditToolTableAction</name>
Expand Down
8 changes: 4 additions & 4 deletions src/videoview/mjpegstreamerclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ void MjpegStreamerClient::updateMessageReceived(const QList<QByteArray> &message
#endif

streamBufferItem.image = QImage::fromData(data, "JPG");
streamBufferItem.timestamp = (double)frame.timestamp_s()*1000 + (double)frame.timestamp_us() / 1000.0;
streamBufferItem.timestamp = static_cast<double>(frame.timestamp_s())*1000.0 + static_cast<double>(frame.timestamp_us()) / 1000.0;

dateTime.setMSecsSinceEpoch((quint64)frame.timestamp_unix()*(quint64)1000);
dateTime.setMSecsSinceEpoch(static_cast<qint64>(frame.timestamp_unix()) * 1000);
dateTime = dateTime.toLocalTime();
time = dateTime.time();
streamBufferItem.time = time.addMSecs(frame.timestamp_us()/1000.0);
streamBufferItem.time = time.addMSecs(static_cast<int>(frame.timestamp_us() / 1000));

#ifdef QT_DEBUG
qDebug() << "time: " << streamBufferItem.time;
Expand Down Expand Up @@ -301,7 +301,7 @@ void MjpegStreamerClient::updateStreamBuffer()
m_currentStreamBufferItem = m_streamBuffer.dequeue();
interval = m_currentStreamBufferItem.timestamp - timestamp;

m_streamBufferTimer->start(qMax((int)interval, 0));
m_streamBufferTimer->start(qMax(static_cast<int>(interval), 0));
}

}
Expand Down