Migrates ./Lts/Viewer successfully to Qt6
This commit is contained in:
28 files changed
+250
-129
No files matched your search
+15
-13
@@ -27,11 +27,11 @@
|
||||
#include <SymbologyXML/xml_symbol_codec.h>
|
||||
|
||||
// ESRI
|
||||
#include <arcgis/TaskWatcher.h>
|
||||
#include <arcgis/Symbol.h>
|
||||
#include <arcgis/SymbolStyleSearchParameters.h>
|
||||
#include <arcgis/SymbolStyleSearchResultListModel.h>
|
||||
#include <arcgis/SymbolStyleSearchResult.h>
|
||||
#include <TaskWatcher.h>
|
||||
#include <Symbol.h>
|
||||
#include <SymbolStyleSearchParameters.h>
|
||||
#include <SymbolStyleSearchResultListModel.h>
|
||||
#include <SymbolStyleSearchResult.h>
|
||||
|
||||
|
||||
# include <arcgis/arcgisversion.h> // This file is created by RME, not ESRI
|
||||
@@ -48,6 +48,8 @@
|
||||
#include <QtWidgets/QTreeView>
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QStringView>
|
||||
#include <utility>
|
||||
#include <QtCore/QRegularExpression>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QThread>
|
||||
@@ -785,7 +787,7 @@ int SymbolDictionaryImpl::addEtsSymbols(const QString &path)
|
||||
|
||||
// iterate over sorted files:
|
||||
int fileId_substitute = 0;
|
||||
for (const auto &filePath : qAsConst(slFilePaths))
|
||||
for (const auto &filePath : std::as_const(slFilePaths))
|
||||
{
|
||||
++fileId_substitute;
|
||||
// DEBUG_LOG(m_logger) << LOGFUNCTION << " found file= '" << filePath << "'";
|
||||
@@ -819,10 +821,10 @@ int SymbolDictionaryImpl::addEtsSymbols(const QString &path)
|
||||
// rootDir.absolutePath(): ':/advancedSymbology/CivilSymbols'
|
||||
// filepath : ':/advancedSymbology/CivilSymbols/Sonstige/Bundeswehr_Stelle.gif'
|
||||
// remove path from filePath:
|
||||
QStringRef filePathReduced = filePath.midRef(rootDir.absolutePath().size() + 1);
|
||||
QStringView filePathReduced = filePath.mid(rootDir.absolutePath().size() + 1);
|
||||
// filepath 'Sonstige/Bundeswehr_Stelle.gif'
|
||||
|
||||
QVector<QStringRef> parts = filePathReduced.split(QLatin1Char('/'));
|
||||
QVector<QStringView> parts = filePathReduced.split(QLatin1Char('/'));
|
||||
|
||||
// remove filename (to get dirname's as tags:
|
||||
parts.removeLast();
|
||||
@@ -840,7 +842,7 @@ int SymbolDictionaryImpl::addEtsSymbols(const QString &path)
|
||||
QStringList tags;
|
||||
tags.reserve(parts.size() + 2);
|
||||
tags.append(ETS_SYMBOL_KEYWORD); // 'ETS'
|
||||
for (const auto &item : qAsConst(parts))
|
||||
for (const auto &item : std::as_const(parts))
|
||||
tags.append(item.toString());
|
||||
tags.append(humanReadableName);
|
||||
|
||||
@@ -1441,7 +1443,7 @@ QSharedPointer<SymbolResult> SymbolDictionaryImpl::fetchSymbol(const SymbolDataT
|
||||
}
|
||||
|
||||
// linear search - maybe optimize. But how many different icons are really rendered in parallel?
|
||||
for (const QWeakPointer<SymbolResult> &res : qAsConst(m_findSymbol2symbolResult))
|
||||
for (const QWeakPointer<SymbolResult> &res : std::as_const(m_findSymbol2symbolResult))
|
||||
{
|
||||
auto sp = res.toStrongRef();
|
||||
if (!sp)
|
||||
@@ -1988,7 +1990,7 @@ QImage renderXML_Symbol(const QSharedPointer<SymbologyXML::PixmapSymbolCache> &x
|
||||
}
|
||||
additionalSymbolData.m_vbg.color = injuryColor;
|
||||
|
||||
for (const AdditionalSymbolType additionalSymbolType : qAsConst(symbolDataToRender.additionalSymbols))
|
||||
for (const AdditionalSymbolType additionalSymbolType : std::as_const(symbolDataToRender.additionalSymbols))
|
||||
{
|
||||
switch (additionalSymbolType)
|
||||
{
|
||||
@@ -2089,7 +2091,7 @@ QImage renderExtensions(QImage &coreImage,
|
||||
|
||||
// coreImage.save(QLatin1String("/tmp/dummy.png"));
|
||||
|
||||
for (const QColor &oldColor : qAsConst(oldColorVec))
|
||||
for (const QColor &oldColor : std::as_const(oldColorVec))
|
||||
{
|
||||
if (oldColor.isValid())
|
||||
{
|
||||
@@ -2128,7 +2130,7 @@ QImage renderExtensions(QImage &coreImage,
|
||||
#endif // USE_ARCADE_SYMBOLOGY
|
||||
|
||||
// replace honoring the hotSpot by simple scaling :
|
||||
int hqFdTf = QStringRef(&sidc, 7, 1).toInt();
|
||||
int hqFdTf = QStringView(sidc).slice(7, 1).toInt();
|
||||
// int amplifierDescriptor = QStringRef(&sidc, 8, 2).toInt();
|
||||
if (((hqFdTf > 0) && ((hqFdTf < 8)))) // HeadQuarter/FeintDummy/TaskFore have more height then width
|
||||
newSize = fullImage.size();
|
||||
|
||||
Reference in new issue
Block a user