Complete Qt6 migration: full clean build green across groups G1-G12 incl. runtime plugin set
new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
This commit is contained in:
1 parent
eb1d949edc
commit
815e16368e
1718 files changed
+126739
-18495
No files matched your search
@@ -183,6 +183,13 @@ NGL_INSTALL_TARGET(LtsWidgets)
|
||||
SET(ltswidgetsplugin_SRCS ltswidgetsplugin.cpp ltswidgetsplugin.json)
|
||||
NGL_ADD_LIBRARY(WS ltswidgetsplugin MODULE ${ltswidgetsplugin_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(ltswidgetsplugin LtsWidgets ltsCoordWidget LtsDataView LtsFileDialog LtsReportDisplay svcFlmCommon)
|
||||
# ltswidgetsplugin.cpp unconditionally includes <LtsReportDisplay/lts_report_display_widget.h>,
|
||||
# which pulls KDReports -> #include <QPrinter>. In Qt6 that forwarding header lives in
|
||||
# <QtInc>/QtPrintSupport. With BUILD_CODIFICATION=OFF the LtsReportDisplay->KDReports
|
||||
# include chain is not built, so expose the QtPrintSupport module dir directly.
|
||||
if(DEFINED QT6_INC_DIR AND EXISTS "${QT6_INC_DIR}/QtPrintSupport")
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(ltswidgetsplugin PRIVATE "${QT6_INC_DIR}/QtPrintSupport")
|
||||
endif()
|
||||
NGL_SET_TARGET_PROPERTIES(ltswidgetsplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/designer)
|
||||
NGL_INSTALL_TARGET(ltswidgetsplugin DESTINATION lib/designer COMPONENT Devel)
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
{
|
||||
const T &entry = LtsAbstractTableModel<T>::m_vecData.at(row);
|
||||
if (entry.first)
|
||||
ids << entry.second.id();
|
||||
ids << entry.second.id;
|
||||
}
|
||||
|
||||
return ids;
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
{
|
||||
const T &entry = LtsAbstractTableModel<T>::m_vecData.at(row);
|
||||
if (!entry.first)
|
||||
ids << entry.second.id();
|
||||
ids << entry.second.id;
|
||||
}
|
||||
|
||||
return ids;
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
for (int row = 0; row < LtsAbstractTableModel<T>::rowCount(); ++row)
|
||||
{
|
||||
T &entry = LtsAbstractTableModel<T>::m_vecData[row];
|
||||
bool bContains = vecCheckedIds.contains(entry.second.id());
|
||||
bool bContains = vecCheckedIds.contains(entry.second.id);
|
||||
if (entry.first != bContains)
|
||||
{
|
||||
entry.first = bContains;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "lts_dialog.h"
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include "lts_progress_dialog_helper.h"
|
||||
#include "lts_message_dialog.h"
|
||||
#include "lts_dialog_helper.h"
|
||||
|
||||
@@ -327,7 +327,7 @@ protected:
|
||||
*/
|
||||
void translate(T *ui, const S &data, const QString &custom, const QString &title) // same as 'void translate(T *ui, const S &data, const QString &title)', but for topics without the 'name' entry
|
||||
{
|
||||
translate(ui, QString::fromUtf8(typeid(data).name()), data.id(), custom /* can be empty */, title);
|
||||
translate(ui, QString::fromUtf8(typeid(data).name()), data.id, custom /* can be empty */, title);
|
||||
}
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@ protected:
|
||||
*/
|
||||
void translate(T *ui, const S &data, const QString &title)
|
||||
{
|
||||
translate(ui, data, QString::fromStdString(data.name()), title); // -> translate #5
|
||||
translate(ui, data, QString::fromStdString(data.name), title); // -> translate #5
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
|
||||
|
||||
#include "requirement_widget.h"
|
||||
|
||||
#include <LtsWidgets/lts_message_dialog.h>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QLabel>
|
||||
|
||||
namespace LtsWidgets
|
||||
{
|
||||
UiRequirement::UiRequirement(QLabel* descriptionLabel, const std::function<bool()>& requirementCheck,
|
||||
const QString& userWarningMessage)
|
||||
: m_descriptionLabel(descriptionLabel), m_requirementCheck(requirementCheck), m_lastResult(true),
|
||||
m_userWarningMessage(userWarningMessage)
|
||||
{
|
||||
retranslate();
|
||||
}
|
||||
|
||||
void UiRequirement::reset()
|
||||
{
|
||||
if (!isValid())
|
||||
return;
|
||||
m_descriptionLabel->setText(m_originalText);
|
||||
m_descriptionLabel->setToolTip(m_originalTooltip);
|
||||
}
|
||||
|
||||
void UiRequirement::setTexts()
|
||||
{
|
||||
if (!isValid())
|
||||
return;
|
||||
if (!m_lastResult)
|
||||
{
|
||||
m_descriptionLabel->setText(
|
||||
QStringLiteral("<span style=\"color:#aa0000;\">\u2022 %1</span>").arg(m_originalText));
|
||||
|
||||
if (!m_userWarningMessage.isEmpty())
|
||||
{
|
||||
m_descriptionLabel->setCursor(Qt::WhatsThisCursor);
|
||||
m_descriptionLabel->setToolTip(m_userWarningMessage);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_originalText.startsWith(QStringLiteral("\u2022 ")))
|
||||
return;
|
||||
|
||||
m_descriptionLabel->setText(QStringLiteral("\u2022 %1").arg(m_originalText));
|
||||
m_descriptionLabel->setCursor(Qt::ArrowCursor);
|
||||
m_descriptionLabel->setToolTip(m_originalTooltip);
|
||||
}
|
||||
}
|
||||
|
||||
void UiRequirement::retranslate()
|
||||
{
|
||||
if (!isValid())
|
||||
return;
|
||||
|
||||
if (m_originalText.startsWith(QStringLiteral("\u2022 ")))
|
||||
return;
|
||||
|
||||
auto x = m_descriptionLabel->text();
|
||||
if (x.startsWith(QStringLiteral("\u2022 ")))
|
||||
return;
|
||||
|
||||
m_originalText = x;
|
||||
|
||||
m_originalTooltip = m_descriptionLabel->toolTip();
|
||||
setTexts();
|
||||
}
|
||||
|
||||
bool UiRequirement::checkRequirement()
|
||||
{
|
||||
if (!isValid())
|
||||
return m_lastResult;
|
||||
|
||||
m_lastResult = m_requirementCheck();
|
||||
|
||||
if (!m_descriptionLabel->isVisible() && !m_descriptionLabel->property("checkMe").toBool())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
setTexts();
|
||||
|
||||
return m_lastResult;
|
||||
}
|
||||
|
||||
bool UiRequirementList::checkRequirements(QWidget* messageOnThisParent)
|
||||
{
|
||||
bool result = true;
|
||||
for (auto i = m_requirementList.begin(); i != m_requirementList.end(); ++i)
|
||||
{
|
||||
UiRequirement& r = (*i);
|
||||
|
||||
if (!r.isValid())
|
||||
continue;
|
||||
|
||||
if (!r.checkRequirement())
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!result && messageOnThisParent)
|
||||
{
|
||||
LtsWidgets::LtsMessageDialog::showMessage(
|
||||
messageOnThisParent,
|
||||
QApplication::translate("LtsWidgets::LtsDialog",
|
||||
"There are elements that have invalid or no value.<br>"
|
||||
"Please change values in the elements which are marked with red text."),
|
||||
QApplication::translate("LtsWidgets::LtsDialog", "Operation not complete"));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void UiRequirementList::addRequirement(const UiRequirement& uiRequirement)
|
||||
{
|
||||
m_requirementList.append(uiRequirement);
|
||||
}
|
||||
|
||||
void UiRequirementList::clear()
|
||||
{
|
||||
for (auto i = m_requirementList.begin(); i != m_requirementList.end(); ++i)
|
||||
{
|
||||
UiRequirement& uir = *i;
|
||||
uir.reset();
|
||||
}
|
||||
|
||||
m_requirementList.clear();
|
||||
}
|
||||
|
||||
void UiRequirementList::retranslate()
|
||||
{
|
||||
for (auto i = m_requirementList.begin(); i != m_requirementList.end(); ++i)
|
||||
{
|
||||
UiRequirement& r = (*i);
|
||||
|
||||
r.retranslate();
|
||||
}
|
||||
}
|
||||
} // namespace LtsWidgets
|
||||
@@ -1,62 +0,0 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "lts_widgets_export.h"
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <functional>
|
||||
|
||||
class QLabel;
|
||||
|
||||
namespace LtsWidgets
|
||||
{
|
||||
|
||||
class LTSWIDGETS_EXPORT UiRequirement
|
||||
{
|
||||
public:
|
||||
explicit UiRequirement() = default;
|
||||
|
||||
UiRequirement(QLabel* descriptionLabel, const std::function<bool()>& requirementCheck,
|
||||
const QString& userWarningMessage = QString());
|
||||
|
||||
void reset();
|
||||
|
||||
bool checkRequirement();
|
||||
|
||||
bool isValid() const
|
||||
{
|
||||
return m_descriptionLabel != nullptr;
|
||||
}
|
||||
|
||||
void retranslate();
|
||||
|
||||
private:
|
||||
void setTexts();
|
||||
|
||||
QLabel* m_descriptionLabel;
|
||||
std::function<bool()> m_requirementCheck;
|
||||
QString m_originalText;
|
||||
QString m_originalTooltip;
|
||||
bool m_lastResult;
|
||||
QString m_userWarningMessage;
|
||||
};
|
||||
|
||||
class LTSWIDGETS_EXPORT UiRequirementList
|
||||
{
|
||||
public:
|
||||
UiRequirementList() = default;
|
||||
|
||||
bool checkRequirements(QWidget* messageOnThisParent = nullptr);
|
||||
|
||||
void addRequirement(const UiRequirement& uiRequirement);
|
||||
|
||||
void clear();
|
||||
|
||||
void retranslate();
|
||||
|
||||
private:
|
||||
QVector<UiRequirement> m_requirementList;
|
||||
};
|
||||
} // namespace LtsWidgets
|
||||
Reference in new issue
Block a user