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:
1718 files changed
+126739
-18495
No files matched your search
@@ -17,7 +17,13 @@ SET(SRCS
|
||||
printing.h
|
||||
)
|
||||
|
||||
if (KDReports_FOUND AND QT6_GUI_AVAILABLE AND BUILD_CODIFICATION)
|
||||
# Legacy always built the real LtsPrinting when KDReports was available
|
||||
# (FIND_PACKAGE(KDReports REQUIRED)); it is a common lib consumed by many
|
||||
# targets (e.g. SitmapGuiPlugin::doPrint -> LtsPrinting::printImage), so it must
|
||||
# NOT be gated on the BUILD_CODIFICATION product flag (which only bundles the
|
||||
# CodificationManagement/ReportViewer plugins). Build the real lib whenever
|
||||
# KDReports is found; keep the stub only as a KDReports-absent fallback.
|
||||
if (KDReports_FOUND AND QT6_GUI_AVAILABLE)
|
||||
NGL_ADD_LIBRARY2(WS LtsPrinting SHARED ${SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsPrinting
|
||||
PUBLIC
|
||||
@@ -38,5 +44,7 @@ if(QT6_GUI_AVAILABLE)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(LtsPrinting)
|
||||
else()
|
||||
message(STATUS "KDReports not found or BUILD_RTI disabled; skipping LtsPrinting target")
|
||||
message(STATUS "KDReports not found or Qt6 GUI unavailable; building LtsPrinting stub (link-only, no printing symbols)")
|
||||
add_library(LtsPrinting SHARED lts_printing_stub.cpp)
|
||||
NGL_INSTALL_TARGET(LtsPrinting)
|
||||
endif()
|
||||
@@ -0,0 +1,14 @@
|
||||
// LtsPrinting link stub for the Qt6 migration.
|
||||
//
|
||||
// The real LtsPrinting library requires KDReports (a Qt5/KDE print-reporting
|
||||
// library that is not available in the Qt6 toolchain). When KDReports is not
|
||||
// found the real library is skipped (see CMakeLists.txt); this stub provides a
|
||||
// linkable `LtsPrinting` target so that consumers referencing the target name
|
||||
// (e.g. SmoCheckButtonHandler) still link. It exports no printing symbols.
|
||||
namespace lts_printing_stub
|
||||
{
|
||||
int lts_printing_stub_marker()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ void printView(LtsSession::LtsSession* session, QWidget* dialogParent, const QAb
|
||||
|
||||
doc.setMetaInformation(QTextDocument::DocumentTitle, dialogParent->windowTitle());
|
||||
LtsPrinting::Base nglPrinter(doc, dialogParent, QObject::tr("Print %1").arg(dialogParent->windowTitle()),
|
||||
dialogParent->windowTitle(), QPrinter::A4, QPrinter::Landscape);
|
||||
dialogParent->windowTitle(), QPageSize(QPageSize::A4), QPageLayout::Landscape);
|
||||
if (!nglPrinter.printer())
|
||||
return;
|
||||
|
||||
@@ -118,8 +118,8 @@ void printView(LtsSession::LtsSession* session, QWidget* dialogParent, QAbstract
|
||||
}
|
||||
|
||||
void printImage(LtsSession::LtsSession* session, QWidget* dialogParent, const QImage& image, const QString& imageTitle,
|
||||
const QString& description, const QPrinter::PageSize& pageSize,
|
||||
const QPrinter::Orientation& pageOrientation)
|
||||
const QString& description, const QPageSize& pageSize,
|
||||
const QPageLayout::Orientation& pageOrientation)
|
||||
{
|
||||
QTextDocument doc;
|
||||
QTextCursor cursor(&doc);
|
||||
@@ -141,7 +141,7 @@ void printImage(LtsSession::LtsSession* session, QWidget* dialogParent, const QI
|
||||
|
||||
void printImages(LtsSession::LtsSession* session, QWidget* dialogParent, const QString& docName,
|
||||
QVector<QImage>& images, QVector<QString>& imageTitles, QVector<QString>& descriptions,
|
||||
const QPrinter::PageSize& pageSize, const QPrinter::Orientation& pageOrientation)
|
||||
const QPageSize& pageSize, const QPageLayout::Orientation& pageOrientation)
|
||||
|
||||
{
|
||||
QTextDocument doc;
|
||||
@@ -181,8 +181,8 @@ void printPDFImages(QWidget* dialogParent, const QString& docName, const QString
|
||||
QPrinter printer;
|
||||
|
||||
printer.setColorMode(QPrinter::ColorMode::Color);
|
||||
printer.setOrientation(QPrinter::Orientation::Portrait);
|
||||
printer.setPageSize(QPrinter::PageSize::A4);
|
||||
printer.setPageOrientation(QPageLayout::Portrait);
|
||||
printer.setPageSize(QPageSize(QPageSize::A4));
|
||||
QString fn = docName;
|
||||
fn = fn.remove(QLatin1Char(' '));
|
||||
fn = fn.remove(QLatin1String(".."));
|
||||
@@ -224,7 +224,7 @@ void printReport(LtsSession::LtsSession* session, QWidget* dialogParent, KDRepor
|
||||
|
||||
doc.setMetaInformation(QTextDocument::DocumentTitle, dialogParent->windowTitle());
|
||||
LtsPrinting::Base nglPrinter(doc, dialogParent, QObject::tr("Print %1").arg(dialogParent->windowTitle()),
|
||||
dialogParent->windowTitle(), QPrinter::A3, QPrinter::Landscape);
|
||||
dialogParent->windowTitle(), QPageSize(QPageSize::A3), QPageLayout::Landscape);
|
||||
if (!nglPrinter.printer())
|
||||
return;
|
||||
|
||||
@@ -233,8 +233,8 @@ void printReport(LtsSession::LtsSession* session, QWidget* dialogParent, KDRepor
|
||||
cursor.movePosition(QTextCursor::End);
|
||||
|
||||
report.setWidthForEndlessPrinter(0);
|
||||
report.setPageSize(QPrinter::A3);
|
||||
report.setOrientation(QPrinter::Landscape);
|
||||
report.setPageSize(QPageSize::A3);
|
||||
report.setPageOrientation(QPageLayout::Landscape);
|
||||
|
||||
LtsPrinting::Base::printReportData(doc, report);
|
||||
nglPrinter.print(&doc);
|
||||
@@ -249,8 +249,8 @@ void printWidget(LtsSession::LtsSession* session, QWidget* dialogParent, QWidget
|
||||
|
||||
QString windowTitle = dialogParent->windowTitle();
|
||||
doc.setMetaInformation(QTextDocument::DocumentTitle, dialogParent->windowTitle());
|
||||
LtsPrinting::Base nglPrinter(doc, dialogParent, QObject::tr("Print %1").arg(windowTitle), windowTitle, QPrinter::A3,
|
||||
QPrinter::Landscape);
|
||||
LtsPrinting::Base nglPrinter(doc, dialogParent, QObject::tr("Print %1").arg(windowTitle), windowTitle,
|
||||
QPageSize(QPageSize::A3), QPageLayout::Landscape);
|
||||
if (!nglPrinter.printer())
|
||||
return;
|
||||
|
||||
@@ -271,8 +271,8 @@ void printMessage(LtsSession::LtsSession* session, QWidget* dialogParent, const
|
||||
QString windowTitle = subject;
|
||||
|
||||
doc.setMetaInformation(QTextDocument::DocumentTitle, subject);
|
||||
LtsPrinting::Base nglPrinter(doc, dialogParent, QObject::tr("Print %1").arg(windowTitle), windowTitle, QPrinter::A4,
|
||||
QPrinter::Portrait);
|
||||
LtsPrinting::Base nglPrinter(doc, dialogParent, QObject::tr("Print %1").arg(windowTitle), windowTitle,
|
||||
QPageSize(QPageSize::A4), QPageLayout::Portrait);
|
||||
|
||||
QString str = QString(QStringLiteral("<H2><strong>%1</strong> %2 </H2>")).arg(subject).arg(subjectContent);
|
||||
str.append(QString(QStringLiteral("<strong>%1</strong> %2<br>")).arg(time).arg(timeContent));
|
||||
@@ -302,8 +302,8 @@ void printStoryboard(LtsSession::LtsSession* session, QWidget* dialogParent, QAb
|
||||
QString windowTitle = dialogParent->windowTitle();
|
||||
doc.setMetaInformation(QTextDocument::DocumentTitle, dialogParent->windowTitle());
|
||||
|
||||
LtsPrinting::Base nglPrinter(doc, dialogParent, QObject::tr("Print %1").arg(windowTitle), windowTitle, QPrinter::A4,
|
||||
QPrinter::Portrait);
|
||||
LtsPrinting::Base nglPrinter(doc, dialogParent, QObject::tr("Print %1").arg(windowTitle), windowTitle,
|
||||
QPageSize(QPageSize::A4), QPageLayout::Portrait);
|
||||
|
||||
if (!nglPrinter.printer())
|
||||
return;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtPrintSupport/QPrinter>
|
||||
#include <QtGui/QPageSize>
|
||||
#include <QtGui/QPageLayout>
|
||||
|
||||
#ifndef LTSPRINTING_EXPORT
|
||||
#ifdef BUILD_STATIC_LIBRARIES
|
||||
@@ -42,13 +44,13 @@ LTSPRINTING_EXPORT void printStoryboard(LtsSession::LtsSession* session, QWidget
|
||||
|
||||
LTSPRINTING_EXPORT void printImage(LtsSession::LtsSession* session, QWidget* dialogParent, const QImage& image,
|
||||
const QString& imageTitle, const QString& description,
|
||||
const QPrinter::PageSize& pageSize = QPrinter::A3,
|
||||
const QPrinter::Orientation& pageOrientation = QPrinter::Landscape);
|
||||
const QPageSize& pageSize = QPageSize(QPageSize::A3),
|
||||
const QPageLayout::Orientation& pageOrientation = QPageLayout::Landscape);
|
||||
|
||||
LTSPRINTING_EXPORT void printImages(LtsSession::LtsSession* session, QWidget* dialogParent, const QString& docName,
|
||||
QVector<QImage>& images, QVector<QString>& imageTitles,
|
||||
QVector<QString>& descriptions, const QPrinter::PageSize& pageSize = QPrinter::A3,
|
||||
const QPrinter::Orientation& pageOrientation = QPrinter::Landscape);
|
||||
QVector<QString>& descriptions, const QPageSize& pageSize = QPageSize(QPageSize::A3),
|
||||
const QPageLayout::Orientation& pageOrientation = QPageLayout::Landscape);
|
||||
|
||||
LTSPRINTING_EXPORT void printPDFImages(QWidget* dialogParent, const QString& docName, const QString& printPath,
|
||||
QVector<QImage>& images);
|
||||
|
||||
@@ -50,8 +50,8 @@ Base::Base(QTextDocument &doc,
|
||||
QWidget *dialogParent,
|
||||
const QString &dialogTitle,
|
||||
const QString &_fn,
|
||||
QPrinter::PaperSize _ps,
|
||||
QPrinter::Orientation _or,
|
||||
QPageSize _ps,
|
||||
QPageLayout::Orientation _or,
|
||||
QPrinter::ColorMode _cm) : m_printer(new QPrinter),
|
||||
m_painter(new QPainter),
|
||||
m_iconFilenameNr(0),
|
||||
@@ -61,9 +61,9 @@ Base::Base(QTextDocument &doc,
|
||||
headersize_(10), headerrule_(0.5), headertext_(HeaderText),
|
||||
footersize_(10), footerrule_(0.5), footertext_(FooterText),
|
||||
itemFontSize_(2),
|
||||
m_settings(new NGL::Settings(NGL::findProjectConfigFile())).getNGLLogger("NGLPrinting")),
|
||||
m_currentPage(1),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
m_settings(new NGL::Settings(NGL::findProjectConfigFile())),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("NGLPrinting")),
|
||||
m_currentPage(1)
|
||||
{
|
||||
QString fn = _fn;
|
||||
fn = fn.remove(QLatin1Char(' '));
|
||||
@@ -77,8 +77,8 @@ Base::Base(QTextDocument &doc,
|
||||
#endif
|
||||
m_printer->setOutputFormat(QPrinter::NativeFormat);
|
||||
|
||||
m_printer->setPaperSize(_ps);
|
||||
m_printer->setOrientation(_or);
|
||||
m_printer->setPageSize(_ps);
|
||||
m_printer->setPageOrientation(_or);
|
||||
m_printer->setColorMode(_cm);
|
||||
|
||||
m_printer->setFullPage(true);
|
||||
@@ -101,13 +101,13 @@ Base::Base(QTextDocument &doc,
|
||||
QAbstractPrintDialog::PrintCollateCopies;
|
||||
dialog->setOptions(op);
|
||||
QString title = dialogTitle;
|
||||
if (_ps == QPrinter::A2)
|
||||
if (_ps.id() == QPageSize::A2)
|
||||
title += QLatin1String(" (A2)");
|
||||
if (_ps == QPrinter::A3)
|
||||
if (_ps.id() == QPageSize::A3)
|
||||
title += QLatin1String(" (A3)");
|
||||
if (_ps == QPrinter::A4)
|
||||
if (_ps.id() == QPageSize::A4)
|
||||
title += QLatin1String(" (A4)");
|
||||
if (_ps == QPrinter::A5)
|
||||
if (_ps.id() == QPageSize::A5)
|
||||
title += QLatin1String(" (A5)");
|
||||
dialog->setWindowTitle(title);
|
||||
if (dialog->exec() != QDialog::Accepted)
|
||||
@@ -153,7 +153,7 @@ QString Base::styleSheet()
|
||||
|
||||
QSize Base::printerPageSize() const
|
||||
{
|
||||
return QSize(m_printer->pageRect().width() - 2 * DOC_MARGIN, m_printer->pageRect().height() - 2 * DOC_MARGIN);
|
||||
return QSize(m_printer->pageRect(QPrinter::Point).width() - 2 * DOC_MARGIN, m_printer->pageRect(QPrinter::Point).height() - 2 * DOC_MARGIN);
|
||||
}
|
||||
|
||||
bool Base::newPage()
|
||||
@@ -543,7 +543,7 @@ bool Base::printItemData(QString& str, const QAbstractItemModel* model, const QM
|
||||
displayString += vdata.toString();
|
||||
|
||||
QString fgColorString;
|
||||
vdata = model->data(mi, Qt::TextColorRole);
|
||||
vdata = model->data(mi, Qt::ForegroundRole);
|
||||
if (vdata.isValid())
|
||||
fgColorString = vdata.value<QColor>().name();
|
||||
|
||||
@@ -684,24 +684,24 @@ bool Base::printReportData(QTextDocument& doc, KDReports::Report& report)
|
||||
return true;
|
||||
}
|
||||
|
||||
QPrinter::PageSize Base::pageSize() const
|
||||
QPageSize Base::pageSize() const
|
||||
{
|
||||
return m_printer->pageSize();
|
||||
return m_printer->pageLayout().pageSize();
|
||||
}
|
||||
|
||||
void Base::setPageSize(QPrinter::PageSize size)
|
||||
void Base::setPageSize(QPageSize size)
|
||||
{
|
||||
m_printer->setPageSize(size);
|
||||
}
|
||||
|
||||
QPrinter::Orientation Base::orientation() const
|
||||
QPageLayout::Orientation Base::orientation() const
|
||||
{
|
||||
return m_printer->orientation();
|
||||
return m_printer->pageLayout().orientation();
|
||||
}
|
||||
|
||||
void Base::setOrientation(QPrinter::Orientation orientation)
|
||||
void Base::setOrientation(QPageLayout::Orientation orientation)
|
||||
{
|
||||
m_printer->setOrientation(orientation);
|
||||
m_printer->setPageOrientation(orientation);
|
||||
}
|
||||
|
||||
double Base::leftMargin() const
|
||||
@@ -711,7 +711,7 @@ double Base::leftMargin() const
|
||||
|
||||
void Base::setLeftMargin(double margin)
|
||||
{
|
||||
if ((margin > 0) && (margin < m_printer->paperRect().width() / 2))
|
||||
if ((margin > 0) && (margin < m_printer->paperRect(QPrinter::Point).width() / 2))
|
||||
leftmargin_ = margin;
|
||||
else
|
||||
leftmargin_ = 0;
|
||||
@@ -724,7 +724,7 @@ double Base::rightMargin() const
|
||||
|
||||
void Base::setRightMargin(double margin)
|
||||
{
|
||||
if ((margin > 0) && (margin < m_printer->paperRect().width() / 2))
|
||||
if ((margin > 0) && (margin < m_printer->paperRect(QPrinter::Point).width() / 2))
|
||||
rightmargin_ = margin;
|
||||
else
|
||||
rightmargin_ = 0;
|
||||
@@ -737,7 +737,7 @@ double Base::topMargin() const
|
||||
|
||||
void Base::setTopMargin(double margin)
|
||||
{
|
||||
if ((margin > 0) && (margin < m_printer->paperRect().height() / 4))
|
||||
if ((margin > 0) && (margin < m_printer->paperRect(QPrinter::Point).height() / 4))
|
||||
topmargin_ = margin;
|
||||
else
|
||||
topmargin_ = 0;
|
||||
@@ -750,7 +750,7 @@ double Base::bottomMargin() const
|
||||
|
||||
void Base::setBottomMargin(double margin)
|
||||
{
|
||||
if ((margin > 0) && (margin < m_printer->paperRect().height() / 4))
|
||||
if ((margin > 0) && (margin < m_printer->paperRect(QPrinter::Point).height() / 4))
|
||||
bottommargin_ = margin;
|
||||
else
|
||||
bottommargin_ = 0;
|
||||
@@ -758,7 +758,7 @@ void Base::setBottomMargin(double margin)
|
||||
|
||||
void Base::setMargins(double margin)
|
||||
{
|
||||
if ((margin > 0) && (margin < m_printer->paperRect().height() / 2) && (margin < m_printer->paperRect().width() / 2))
|
||||
if ((margin > 0) && (margin < m_printer->paperRect(QPrinter::Point).height() / 2) && (margin < m_printer->paperRect(QPrinter::Point).width() / 2))
|
||||
leftmargin_ = rightmargin_ = topmargin_ = bottommargin_ = margin;
|
||||
else
|
||||
leftmargin_ = rightmargin_ = topmargin_ = bottommargin_ = 0;
|
||||
@@ -771,7 +771,7 @@ double Base::spacing() const
|
||||
|
||||
void Base::setSpacing(double spacing)
|
||||
{
|
||||
if ((spacing > 0) && (spacing <= m_printer->paperRect().height() / 8))
|
||||
if ((spacing > 0) && (spacing <= m_printer->paperRect(QPrinter::Point).height() / 8))
|
||||
spacing_ = spacing;
|
||||
else
|
||||
spacing_ = 0;
|
||||
@@ -784,7 +784,7 @@ double Base::headerSize() const
|
||||
|
||||
void Base::setHeaderSize(double size)
|
||||
{
|
||||
if ((size > 0) && (size <= m_printer->paperRect().height() / 8))
|
||||
if ((size > 0) && (size <= m_printer->paperRect(QPrinter::Point).height() / 8))
|
||||
headersize_ = size;
|
||||
else
|
||||
headersize_ = 0;
|
||||
@@ -817,7 +817,7 @@ double Base::footerSize() const
|
||||
|
||||
void Base::setFooterSize(double size)
|
||||
{
|
||||
if ((size > 0) && (size <= m_printer->paperRect().height() / 8))
|
||||
if ((size > 0) && (size <= m_printer->paperRect(QPrinter::Point).height() / 8))
|
||||
footersize_ = size;
|
||||
else
|
||||
footersize_ = 0;
|
||||
@@ -851,7 +851,7 @@ void Base::setItemFontSize(int itemFontSize)
|
||||
QRectF Base::paperRect(QPaintDevice* device)
|
||||
{
|
||||
|
||||
QRectF rect = m_printer->paperRect();
|
||||
QRectF rect = m_printer->paperRect(QPrinter::Point);
|
||||
|
||||
rect.setWidth(rect.width() * device->logicalDpiX() / m_printer->logicalDpiX());
|
||||
rect.setHeight(rect.height() * device->logicalDpiY() / m_printer->logicalDpiY());
|
||||
@@ -930,7 +930,7 @@ void Base::printSinglePage()
|
||||
m_tempdoc->setPageSize(contentRect(m_printer).size());
|
||||
|
||||
QTextFrameFormat fmt = m_tempdoc->rootFrame()->frameFormat();
|
||||
fmt.setContentsMargins(0, 0, 0, 0);
|
||||
fmt.setMargin(0);
|
||||
m_tempdoc->rootFrame()->setFrameFormat(fmt);
|
||||
|
||||
int doccopies;
|
||||
@@ -938,11 +938,11 @@ void Base::printSinglePage()
|
||||
if (m_printer->collateCopies())
|
||||
{
|
||||
doccopies = 1;
|
||||
pagecopies = m_printer->numCopies();
|
||||
pagecopies = m_printer->copyCount();
|
||||
}
|
||||
else
|
||||
{
|
||||
doccopies = m_printer->numCopies();
|
||||
doccopies = m_printer->copyCount();
|
||||
pagecopies = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include <QtCore/QSet>
|
||||
#include <QtPrintSupport/QPrinter>
|
||||
#include <QtGui/QPageSize>
|
||||
#include <QtGui/QPageLayout>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
@@ -50,7 +52,7 @@ class Base
|
||||
{
|
||||
public:
|
||||
Base(QTextDocument& doc, QWidget* dialogParent, const QString& dialogTitle, const QString& _fn,
|
||||
QPrinter::PaperSize _ps = QPrinter::A4, QPrinter::Orientation _or = QPrinter::Portrait,
|
||||
QPageSize _ps = QPageSize(QPageSize::A4), QPageLayout::Orientation _or = QPageLayout::Portrait,
|
||||
QPrinter::ColorMode _cm = QPrinter::Color);
|
||||
|
||||
virtual ~Base();
|
||||
@@ -61,13 +63,13 @@ class Base
|
||||
|
||||
static QString styleSheet();
|
||||
|
||||
QPrinter::PageSize pageSize() const;
|
||||
QPageSize pageSize() const;
|
||||
|
||||
void setPageSize(QPrinter::PageSize size);
|
||||
void setPageSize(QPageSize size);
|
||||
|
||||
QPrinter::Orientation orientation() const;
|
||||
QPageLayout::Orientation orientation() const;
|
||||
|
||||
void setOrientation(QPrinter::Orientation orientation);
|
||||
void setOrientation(QPageLayout::Orientation orientation);
|
||||
|
||||
bool newPage();
|
||||
|
||||
|
||||
Reference in new issue
Block a user