1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-07 00:14:49 -04:00

Migrate code to Qt 5.14.2

This commit is contained in:
f4exb
2020-11-04 08:59:16 +01:00
parent 76926ab550
commit 379096cbdd
12 changed files with 41 additions and 48 deletions
+8 -8
View File
@@ -135,7 +135,7 @@ void GLScope::newTraces(std::vector<float *> *traces, int traceIndex, std::vecto
if (m_dataChanged.testAndSetOrdered(0, 1))
{
m_processingTraceIndex.store(traceIndex);
m_processingTraceIndex.storeRelaxed(traceIndex);
m_traces = &traces[traceIndex];
m_projectionTypes = projectionTypes;
}
@@ -834,8 +834,8 @@ void GLScope::paintGL()
drawMarkers();
m_dataChanged.store(0);
m_processingTraceIndex.store(-1);
m_dataChanged.storeRelaxed(0);
m_processingTraceIndex.storeRelaxed(-1);
m_mutex.unlock();
}
@@ -1113,7 +1113,7 @@ void GLScope::applyConfig()
void GLScope::setUniqueDisplays()
{
QFontMetrics fm(font());
int M = fm.width("-");
int M = fm.horizontalAdvance("-");
int scopeHeight = height() - m_topMargin - m_botMargin;
int scopeWidth = width() - m_leftMargin - m_rightMargin;
@@ -1297,7 +1297,7 @@ void GLScope::setUniqueDisplays()
void GLScope::setVerticalDisplays()
{
QFontMetrics fm(font());
int M = fm.width("-");
int M = fm.horizontalAdvance("-");
int scopeHeight = (height() - m_topMargin) / 2 - m_botMargin;
int scopeWidth = width() - m_leftMargin - m_rightMargin;
@@ -1480,7 +1480,7 @@ void GLScope::setVerticalDisplays()
void GLScope::setHorizontalDisplays()
{
QFontMetrics fm(font());
int M = fm.width("-");
int M = fm.horizontalAdvance("-");
int scopeHeight = height() - m_topMargin - m_botMargin;
int scopeWidth = (width() - m_rightMargin) / 2 - m_leftMargin;
@@ -1662,7 +1662,7 @@ void GLScope::setHorizontalDisplays()
void GLScope::setPolarDisplays()
{
QFontMetrics fm(font());
int M = fm.width("-");
int M = fm.horizontalAdvance("-");
int scopeHeight = height() - m_topMargin - m_botMargin;
int scopeWidth = (width() - m_rightMargin) / 2 - m_leftMargin;
int scopeDim = std::min(scopeWidth, scopeHeight);
@@ -2012,7 +2012,7 @@ void GLScope::drawTextOverlay(
void GLScope::tick()
{
if (m_dataChanged.load()) {
if (m_dataChanged.loadRelaxed()) {
update();
}
}