fix Warning
This commit is contained in:
1 parent
593c221d23
commit
8345470273
316 files changed
+1246
-929
No files matched your search
+4
-3
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "aes_explosions_edit_adler_standalone.h"
|
||||
#include <utility>
|
||||
#include "aes_rocket_utility.h"
|
||||
#include "aes_effector.h"
|
||||
#include "ui_aes_explosions_edit_adler_standalone.h"
|
||||
@@ -1914,7 +1915,7 @@ void ExplosionsEditAdlerStandAlone::enableUiElements(bool enable)
|
||||
// }
|
||||
|
||||
const QList<QAbstractButton *> &geoButtons = m_geometrieButtonGroup->buttons();
|
||||
for (QAbstractButton *btn : qAsConst(geoButtons))
|
||||
for (QAbstractButton *btn : std::as_const(geoButtons))
|
||||
btn->setEnabled(enable);
|
||||
// For PreFat
|
||||
// m_ui->geometrieLineBtn->hide();
|
||||
@@ -2907,7 +2908,7 @@ void ExplosionsEditAdlerStandAlone::fillCharges()
|
||||
m_ui->cbChargeType->clear();
|
||||
m_ui->cbChargeType->addItem(emptyEntryComboBox, -1);
|
||||
|
||||
for (const ProjectDataManagement::ChargeType &chargeType : qAsConst(chargesForGearClass))
|
||||
for (const ProjectDataManagement::ChargeType &chargeType : std::as_const(chargesForGearClass))
|
||||
{
|
||||
// Vulcano ist available for point geometry only:
|
||||
const bool bIsVulcano = chargeTypeIdIsVulcano(chargeType.id());
|
||||
@@ -2953,7 +2954,7 @@ void ExplosionsEditAdlerStandAlone::fillGearClasses()
|
||||
int index = 0;
|
||||
m_ui->cbGearClass->insertItem(index, emptyEntryComboBox, -1);
|
||||
|
||||
for (auto type : qAsConst(gearClasses))
|
||||
for (auto type : std::as_const(gearClasses))
|
||||
{
|
||||
if (m_gearClassFilter.contains(type.gearClassId()))
|
||||
{
|
||||
|
||||
+2
-1
@@ -26,6 +26,7 @@
|
||||
#include <QSignalBlocker>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QTimeZone>
|
||||
#include <QtGlobal>
|
||||
#include <ngltools/ngltools_dtg.h>
|
||||
#include <utility>
|
||||
@@ -156,7 +157,7 @@ class AvmPlaybackMenu::TimeControl : public QObject
|
||||
QString msecsSinceEpochToString(qint64 msecs)
|
||||
{
|
||||
return dateTimeToString(
|
||||
QDateTime::fromMSecsSinceEpoch(msecs, Qt::TimeSpec::OffsetFromUTC, m_timezoneHoursOffset * 3600));
|
||||
QDateTime::fromMSecsSinceEpoch(msecs, QTimeZone(m_timezoneHoursOffset * 3600)));
|
||||
}
|
||||
|
||||
void setTimezoneHoursOffset(int timezoneHoursOffset)
|
||||
|
||||
+2
-5
@@ -35,11 +35,8 @@ set(SRCS
|
||||
# which needs to be built on SV, too.
|
||||
#
|
||||
NGL_ADD_LIBRARY2(WS AvmShared SHARED ${SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(AvmShared
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../Services/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../Common/
|
||||
)
|
||||
# NGL_TARGET_INCLUDE_DIRECTORIES(AvmShared) removed: ../../Services and ../../Common do not
|
||||
# exist at those relative paths (pre-existing -Wmissing-include-dirs warnings); nothing includes from them.
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(AvmShared
|
||||
PUBLIC
|
||||
|
||||
@@ -385,13 +385,10 @@ public:
|
||||
|
||||
const QString &backup = toString();
|
||||
|
||||
QString errorMsg;
|
||||
int errorLine;
|
||||
int errorColumn;
|
||||
|
||||
if (!setContent(xml, &errorMsg, &errorLine, &errorColumn))
|
||||
const auto parseResult = setContent(xml);
|
||||
if (!parseResult)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " parsing xml input failed: " << errorMsg << " at line " << errorLine << " , column " << errorColumn;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " parsing xml input failed: " << parseResult.errorMessage << " at line " << int(parseResult.errorLine) << " , column " << int(parseResult.errorColumn);
|
||||
setContent(backup);
|
||||
return false;
|
||||
}
|
||||
@@ -406,13 +403,10 @@ public:
|
||||
|
||||
const QString &backup = toString();
|
||||
|
||||
QString errorMsg;
|
||||
int errorLine;
|
||||
int errorColumn;
|
||||
|
||||
if (!setContent(device, &errorMsg, &errorLine, &errorColumn))
|
||||
const auto parseResult = setContent(device);
|
||||
if (!parseResult)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " parsing xml input failed: " << errorMsg << " at line " << errorLine << " , column " << errorColumn;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " parsing xml input failed: " << parseResult.errorMessage << " at line " << int(parseResult.errorLine) << " , column " << int(parseResult.errorColumn);
|
||||
setContent(backup);
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
@@ -301,6 +301,8 @@ bool fill(QComboBox *cbx, PdmComboBoxType type)
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
case PdmComboBoxType::CbUnkown:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (curData.isValid() && (cbx->findData(curData) != -1))
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
#include <QtWidgets/QFileDialog>
|
||||
#include <QtWidgets/QToolButton>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QTimeZone>
|
||||
|
||||
|
||||
namespace ScreenRecording
|
||||
@@ -138,7 +139,7 @@ void InterfaceImpl::onUpdateGui()
|
||||
connect(m_timer, &QTimer::timeout, this, [this]()
|
||||
{
|
||||
m_toolBtn->setIcon((m_counter++ % 2) ? m_recIcon : QIcon());
|
||||
m_toolBtn->setToolTip(QDateTime::fromSecsSinceEpoch(m_counter, Qt::UTC).toString(QLatin1String("hh:mm:ss")));
|
||||
m_toolBtn->setToolTip(QDateTime::fromSecsSinceEpoch(m_counter, QTimeZone(0)).toString(QLatin1String("hh:mm:ss")));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+6
-5
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "srm_data_plugin.h"
|
||||
#include <utility>
|
||||
|
||||
#include <DDS/Core/core_dtc.h>
|
||||
#include <SituationReplayManagement/srm_ftc.h>
|
||||
@@ -51,7 +52,7 @@ public:
|
||||
{
|
||||
// next 4 lines: comment please
|
||||
m_references += fi;
|
||||
for (const auto &info : qAsConst(m_replayPartitions))
|
||||
for (const auto &info : std::as_const(m_replayPartitions))
|
||||
{
|
||||
fi->write(info);
|
||||
}
|
||||
@@ -72,7 +73,7 @@ public:
|
||||
void removeSession(ForeignInterfaceImpl *fi, bool wait = true) noexcept(false)
|
||||
{
|
||||
m_references -= fi;
|
||||
for (const auto &info : qAsConst(m_replayPartitions))
|
||||
for (const auto &info : std::as_const(m_replayPartitions))
|
||||
fi->remove(info);
|
||||
|
||||
replayPartitionRemoveRequest(fi, 0, 0, 0, wait);
|
||||
@@ -262,7 +263,7 @@ public:
|
||||
}
|
||||
|
||||
const auto &rp = it.value();
|
||||
for (auto ptr : qAsConst(m_references))
|
||||
for (auto ptr : std::as_const(m_references))
|
||||
ptr->remove(rp);
|
||||
|
||||
proc->deleteLater();
|
||||
@@ -281,7 +282,7 @@ public:
|
||||
}
|
||||
|
||||
const ReplayPartitionEx &rp = it.value();
|
||||
for (ForeignInterfaceImpl* ptr : qAsConst(m_references))
|
||||
for (ForeignInterfaceImpl* ptr : std::as_const(m_references))
|
||||
ptr->write(rp);
|
||||
}
|
||||
|
||||
@@ -353,7 +354,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
for (auto *ptr : qAsConst(m_references))
|
||||
for (auto *ptr : std::as_const(m_references))
|
||||
ptr->remove(rp);
|
||||
|
||||
it = m_replayPartitions.erase(it);
|
||||
|
||||
Reference in new issue
Block a user