From e34023931f3f20997214e2ffebb242a2caf8e9b7 Mon Sep 17 00:00:00 2001 From: Youssef BEDDAD Date: Fri, 20 May 2022 12:21:41 +0100 Subject: [PATCH 1/6] Update: - Added -USE_QT6 in order to choose what to build instead of the default behaviour. --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ba0f51..bf9c49a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,11 +7,13 @@ set(LIMEREPORT_VERSION_RELEASE 6) option(ENABLE_ZINT "Enable libzint build for barcode support" OFF) option(LIMEREPORT_STATIC "Build LimeReport as static library" OFF) +option(USE_QT6 "Use Qt6" OFF) -find_package( - QT NAMES Qt6 Qt5 - COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport REQUIRED - ) +if(USE_QT6) + find_package(QT NAMES Qt6) +else() + find_package(QT NAMES Qt5) +endif(USE_QT6) find_package( Qt${QT_VERSION_MAJOR} COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport REQUIRED From c622a5a0094b9dfa452ebe3fcfbe6b057a6e290f Mon Sep 17 00:00:00 2001 From: Youssef BEDDAD Date: Fri, 20 May 2022 12:28:08 +0100 Subject: [PATCH 2/6] Update: - Adding an ifdef condition to discard Q_DECLARE_METATYPE(QLocale::Language) from compilation on Qt6 --- limereport/translationeditor/languageselectdialog.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/limereport/translationeditor/languageselectdialog.h b/limereport/translationeditor/languageselectdialog.h index 0402327..48d53b4 100644 --- a/limereport/translationeditor/languageselectdialog.h +++ b/limereport/translationeditor/languageselectdialog.h @@ -8,18 +8,20 @@ namespace Ui { class LanguageSelectDialog; } -class LanguageSelectDialog : public QDialog -{ +class LanguageSelectDialog : public QDialog { Q_OBJECT -public: + public: explicit LanguageSelectDialog(QWidget *parent = 0); ~LanguageSelectDialog(); QLocale::Language getSelectedLanguage(); -private: + + private: Ui::LanguageSelectDialog *ui; }; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) Q_DECLARE_METATYPE(QLocale::Language) +#endif #endif // LANGUAGESELECTDIALOG_H From 747346b4138eee61ad5178cdd44a63cd31d2ec46 Mon Sep 17 00:00:00 2001 From: Youssef BEDDAD Date: Fri, 20 May 2022 12:32:47 +0100 Subject: [PATCH 3/6] Update: - setResizeMode is no longer available on Qt6 ( I think the setSectionResizeMode from Qt5 was reintroduced in Qt6 LTS ) --- limereport/databrowser/lrsqleditdialog.cpp | 274 +++++++++------------ 1 file changed, 122 insertions(+), 152 deletions(-) diff --git a/limereport/databrowser/lrsqleditdialog.cpp b/limereport/databrowser/lrsqleditdialog.cpp index 7fe874f..92e5b3a 100644 --- a/limereport/databrowser/lrsqleditdialog.cpp +++ b/limereport/databrowser/lrsqleditdialog.cpp @@ -28,20 +28,18 @@ * GNU General Public License for more details. * ****************************************************************************/ #include "lrsqleditdialog.h" -#include "ui_lrsqleditdialog.h" #include "lrreportengine_p.h" +#include "ui_lrsqleditdialog.h" #include -#include #include +#include -namespace LimeReport{ +namespace LimeReport { -SQLEditDialog::SQLEditDialog(QWidget *parent, LimeReport::DataSourceManager *dataSources, SQLDialogMode dialogMode) : - QDialog(parent), - ui(new Ui::SQLEditDialog),m_datasources(dataSources),m_dialogMode(dialogMode), m_oldDatasourceName(""), - m_settings(0), m_ownedSettings(false) -{ +SQLEditDialog::SQLEditDialog(QWidget *parent, LimeReport::DataSourceManager *dataSources, SQLDialogMode dialogMode) + : QDialog(parent), ui(new Ui::SQLEditDialog), m_datasources(dataSources), m_dialogMode(dialogMode), + m_oldDatasourceName(""), m_settings(0), m_ownedSettings(false) { ui->setupUi(this); m_masterDatasources = new QCompleter(this); ui->leMaster->setCompleter(m_masterDatasources); @@ -54,72 +52,72 @@ SQLEditDialog::SQLEditDialog(QWidget *parent, LimeReport::DataSourceManager *dat ui->rbSubQuery->setVisible(false); ui->leMaster->setVisible(false); ui->lbMaster->setVisible(false); - ui->fieldsMap->setHorizontalHeaderItem(0,new QTableWidgetItem("master")); - ui->fieldsMap->setHorizontalHeaderItem(1,new QTableWidgetItem("detail")); + ui->fieldsMap->setHorizontalHeaderItem(0, new QTableWidgetItem("master")); + ui->fieldsMap->setHorizontalHeaderItem(1, new QTableWidgetItem("detail")); -#ifdef HAVE_QT5 ui->fieldsMap->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); -#else - ui->fieldsMap->horizontalHeader()->setResizeMode(QHeaderView::Stretch); -#endif + ui->pnlChildDatasource->setVisible(false); connect(ui->pbPreview, SIGNAL(pressed()), this, SLOT(slotPreviewData())); connect(ui->pbHidePreview, SIGNAL(pressed()), this, SLOT(slotHidePreview())); } -SQLEditDialog::~SQLEditDialog() -{ +SQLEditDialog::~SQLEditDialog() { delete ui; if (m_settings && m_ownedSettings) delete m_settings; } -QSettings *SQLEditDialog::settings(){ - if (m_settings){ +QSettings *SQLEditDialog::settings() { + if (m_settings) { return m_settings; } else { - m_settings = new QSettings("LimeReport",QCoreApplication::applicationName()); + m_settings = new QSettings("LimeReport", QCoreApplication::applicationName()); m_ownedSettings = true; return m_settings; } } -void SQLEditDialog::setSettings(QSettings *value, bool owned){ - if (m_settings && m_ownedSettings) delete m_settings; +void SQLEditDialog::setSettings(QSettings *value, bool owned) { + if (m_settings && m_ownedSettings) + delete m_settings; m_settings = value; m_ownedSettings = owned; } -void SQLEditDialog::accept() -{ +void SQLEditDialog::accept() { SQLEditResult result; - if (ui->tabWidget->currentIndex() == 1){ + if (ui->tabWidget->currentIndex() == 1) { result.resultMode = SQLEditResult::CSVText; - } else if (!ui->cbSubdetail->isChecked()){ - result.resultMode=SQLEditResult::Query; + } else if (!ui->cbSubdetail->isChecked()) { + result.resultMode = SQLEditResult::Query; } else { - if (ui->rbSubQuery->isChecked()) result.resultMode = SQLEditResult::SubQuery; - else result.resultMode=SQLEditResult::SubProxy; + if (ui->rbSubQuery->isChecked()) + result.resultMode = SQLEditResult::SubQuery; + else + result.resultMode = SQLEditResult::SubProxy; } result.connectionName = ConnectionDesc::connectionNameForReport(ui->cbbConnection->currentText()); - result.datasourceName=ui->leDatasourceName->text(); + result.datasourceName = ui->leDatasourceName->text(); result.sql = ui->sqlText->toPlainText(); result.csv = ui->csvText->toPlainText(); result.dialogMode = m_dialogMode; result.oldDatasourceName = m_oldDatasourceName; result.subdetail = ui->cbSubdetail->isChecked(); - result.masterDatasource=ui->leMaster->text(); - result.childDataSource=ui->leChild->text(); + result.masterDatasource = ui->leMaster->text(); + result.childDataSource = ui->leChild->text(); result.separator = ui->leSeparator->text(); result.firstRowIsHeader = ui->cbUseFirstRowAsHeader->isChecked(); - if (ui->fieldsMap->rowCount() > 0){ - for(int i=0; i< ui->fieldsMap->rowCount(); ++i){ + if (ui->fieldsMap->rowCount() > 0) { + for (int i = 0; i < ui->fieldsMap->rowCount(); ++i) { LimeReport::FieldsCorrelation fieldsCorrelation; - fieldsCorrelation.master = ui->fieldsMap->item(i,0) ? ui->fieldsMap->item(i,0)->data(Qt::DisplayRole).toString() : ""; - fieldsCorrelation.detail = ui->fieldsMap->item(i,1) ? ui->fieldsMap->item(i,1)->data(Qt::DisplayRole).toString() : ""; + fieldsCorrelation.master = + ui->fieldsMap->item(i, 0) ? ui->fieldsMap->item(i, 0)->data(Qt::DisplayRole).toString() : ""; + fieldsCorrelation.detail = + ui->fieldsMap->item(i, 1) ? ui->fieldsMap->item(i, 1)->data(Qt::DisplayRole).toString() : ""; result.fieldMap.append(fieldsCorrelation); } } @@ -128,87 +126,83 @@ void SQLEditDialog::accept() check(); emit signalSqlEditingFinished(result); QDialog::accept(); - }catch(LimeReport::ReportError &exception){ - QMessageBox::critical(this,tr("Error"),exception.what()); + } catch (LimeReport::ReportError &exception) { + QMessageBox::critical(this, tr("Error"), exception.what()); } } -void SQLEditDialog::showEvent(QShowEvent *) -{ +void SQLEditDialog::showEvent(QShowEvent *) { ui->lblInfo->setVisible(false); initConnections(); readSettings(); } -void SQLEditDialog::closeEvent(QCloseEvent *) -{ - writeSetting(); -} +void SQLEditDialog::closeEvent(QCloseEvent *) { writeSetting(); } -void SQLEditDialog::hideEvent(QHideEvent *) -{ - writeSetting(); -} +void SQLEditDialog::hideEvent(QHideEvent *) { writeSetting(); } -void SQLEditDialog::check() -{ - if (ui->leDatasourceName->text().isEmpty()) throw LimeReport::ReportError(tr("Datasource Name is empty!")); - if (ui->sqlText->toPlainText().isEmpty() && (!ui->rbProxy) ) throw LimeReport::ReportError(tr("SQL is empty!")); - if (m_dialogMode==AddMode){ - if (m_datasources->containsDatasource(ui->leDatasourceName->text())){ - throw LimeReport::ReportError(QString(tr("Datasource with name: \"%1\" already exists!")).arg(ui->leDatasourceName->text())); +void SQLEditDialog::check() { + if (ui->leDatasourceName->text().isEmpty()) + throw LimeReport::ReportError(tr("Datasource Name is empty!")); + if (ui->sqlText->toPlainText().isEmpty() && (!ui->rbProxy)) + throw LimeReport::ReportError(tr("SQL is empty!")); + if (m_dialogMode == AddMode) { + if (m_datasources->containsDatasource(ui->leDatasourceName->text())) { + throw LimeReport::ReportError( + QString(tr("Datasource with name: \"%1\" already exists!")).arg(ui->leDatasourceName->text())); } } } -void SQLEditDialog::initConnections() -{ - foreach(QString connectionName, QSqlDatabase::connectionNames()){ - ui->cbbConnection->addItem(QIcon(":/databrowser/images/plug-connect.png"),ConnectionDesc::connectionNameForUser(connectionName)); +void SQLEditDialog::initConnections() { + foreach (QString connectionName, QSqlDatabase::connectionNames()) { + ui->cbbConnection->addItem(QIcon(":/databrowser/images/plug-connect.png"), + ConnectionDesc::connectionNameForUser(connectionName)); } - foreach(QString connectionName, m_datasources->connectionNames()){ - connectionName = (connectionName.compare(QSqlDatabase::defaultConnection)==0) ? - tr("defaultConnection") : connectionName; - if (ui->cbbConnection->findText(connectionName,Qt::MatchExactly )==-1) - ui->cbbConnection->addItem(QIcon(":/databrowser/images/plug-disconnect.png"),ConnectionDesc::connectionNameForUser(connectionName)); + foreach (QString connectionName, m_datasources->connectionNames()) { + connectionName = + (connectionName.compare(QSqlDatabase::defaultConnection) == 0) ? tr("defaultConnection") : connectionName; + if (ui->cbbConnection->findText(connectionName, Qt::MatchExactly) == -1) + ui->cbbConnection->addItem(QIcon(":/databrowser/images/plug-disconnect.png"), + ConnectionDesc::connectionNameForUser(connectionName)); } ui->cbbConnection->setCurrentIndex(ui->cbbConnection->findText(m_defaultConnection)); - if (!m_oldDatasourceName.isEmpty()){ - ui->cbbConnection->setCurrentIndex(ui->cbbConnection->findText(ConnectionDesc::connectionNameForUser(m_datasources->connectionName(m_oldDatasourceName)))); + if (!m_oldDatasourceName.isEmpty()) { + ui->cbbConnection->setCurrentIndex(ui->cbbConnection->findText( + ConnectionDesc::connectionNameForUser(m_datasources->connectionName(m_oldDatasourceName)))); } } -void SQLEditDialog::setDataSources(LimeReport::DataSourceManager *dataSources, QString datasourceName) -{ - m_datasources=dataSources; - if (!datasourceName.isEmpty()){ +void SQLEditDialog::setDataSources(LimeReport::DataSourceManager *dataSources, QString datasourceName) { + m_datasources = dataSources; + if (!datasourceName.isEmpty()) { ui->cbSubdetail->setEnabled(true); - m_oldDatasourceName=datasourceName; + m_oldDatasourceName = datasourceName; ui->leDatasourceName->setText(datasourceName); ui->sqlText->setText(dataSources->queryText(datasourceName)); - if (dataSources->isQuery(datasourceName)){ + if (dataSources->isQuery(datasourceName)) { initQueryMode(); } - if (dataSources->isSubQuery(datasourceName)){ + if (dataSources->isSubQuery(datasourceName)) { initSubQueryMode(); ui->leMaster->setText(dataSources->subQueryByName(datasourceName)->master()); } - if (dataSources->isProxy(datasourceName)){ + if (dataSources->isProxy(datasourceName)) { initProxyMode(); - LimeReport::ProxyDesc* proxyDesc = dataSources->proxyByName(datasourceName); + LimeReport::ProxyDesc *proxyDesc = dataSources->proxyByName(datasourceName); ui->leChild->setText(proxyDesc->child()); ui->leMaster->setText(proxyDesc->master()); - int curIndex=0; - foreach(LimeReport::FieldMapDesc* fields, *proxyDesc->fieldsMap()){ - ui->fieldsMap->setRowCount(curIndex+1); - ui->fieldsMap->setItem(curIndex,0,new QTableWidgetItem(fields->master())); - ui->fieldsMap->setItem(curIndex,1,new QTableWidgetItem(fields->detail())); + int curIndex = 0; + foreach (LimeReport::FieldMapDesc *fields, *proxyDesc->fieldsMap()) { + ui->fieldsMap->setRowCount(curIndex + 1); + ui->fieldsMap->setItem(curIndex, 0, new QTableWidgetItem(fields->master())); + ui->fieldsMap->setItem(curIndex, 1, new QTableWidgetItem(fields->detail())); curIndex++; } } - if (dataSources->isCSV(datasourceName)){ + if (dataSources->isCSV(datasourceName)) { ui->csvText->setPlainText(dataSources->csvByName(datasourceName)->csvText()); ui->leSeparator->setText(dataSources->csvByName(datasourceName)->separator()); ui->cbUseFirstRowAsHeader->setChecked(dataSources->csvByName(datasourceName)->firstRowIsHeader()); @@ -217,59 +211,55 @@ void SQLEditDialog::setDataSources(LimeReport::DataSourceManager *dataSources, Q } } -void SQLEditDialog::setDefaultConnection(QString defaultConnection) -{ +void SQLEditDialog::setDefaultConnection(QString defaultConnection) { m_defaultConnection = ConnectionDesc::connectionNameForUser(defaultConnection); } -void SQLEditDialog::slotDataSourceNameEditing() -{ - if (m_dialogMode==AddMode){ - QPalette palette=ui->leDatasourceName->palette(); - if (m_datasources->containsDatasource(ui->leDatasourceName->text())){ - palette.setColor(QPalette::Text,Qt::red); +void SQLEditDialog::slotDataSourceNameEditing() { + if (m_dialogMode == AddMode) { + QPalette palette = ui->leDatasourceName->palette(); + if (m_datasources->containsDatasource(ui->leDatasourceName->text())) { + palette.setColor(QPalette::Text, Qt::red); ui->leDatasourceName->setPalette(palette); - ui->lblInfo->setText(QString(tr("Datasource with name %1 already exist")).arg(ui->leDatasourceName->text())); + ui->lblInfo->setText( + QString(tr("Datasource with name %1 already exist")).arg(ui->leDatasourceName->text())); ui->lblInfo->setVisible(true); } else { - palette.setColor(QPalette::Text,QApplication::palette().text().color()); + palette.setColor(QPalette::Text, QApplication::palette().text().color()); ui->leDatasourceName->setPalette(palette); ui->lblInfo->setVisible(false); } } } -void SQLEditDialog::on_cbSubdetail_clicked(bool checked) -{ - if (checked){ - m_masterDatasources->setModel(new QStringListModel(m_datasources->dataSourceNames(),m_datasources)); +void SQLEditDialog::on_cbSubdetail_clicked(bool checked) { + if (checked) { + m_masterDatasources->setModel(new QStringListModel(m_datasources->dataSourceNames(), m_datasources)); } ui->leMaster->setEnabled(checked); ui->rbProxy->setEnabled(checked); ui->rbSubQuery->setEnabled(checked); - if ((checked)&&(ui->rbProxy->isChecked())) initProxyMode(); - if ((checked)&&(ui->rbSubQuery->isChecked())) initSubQueryMode(); - if (!checked) initQueryMode(); + if ((checked) && (ui->rbProxy->isChecked())) + initProxyMode(); + if ((checked) && (ui->rbSubQuery->isChecked())) + initSubQueryMode(); + if (!checked) + initQueryMode(); } -void SQLEditDialog::on_rbProxy_clicked(bool checked) -{ - if (checked) initProxyMode(); +void SQLEditDialog::on_rbProxy_clicked(bool checked) { + if (checked) + initProxyMode(); } -void SQLEditDialog::on_rbSubQuery_clicked(bool checked) -{ - if (checked) initSubQueryMode(); +void SQLEditDialog::on_rbSubQuery_clicked(bool checked) { + if (checked) + initSubQueryMode(); } -void SQLEditDialog::on_pbAddField_clicked() -{ - ui->fieldsMap->setRowCount(ui->fieldsMap->rowCount()+1); -} +void SQLEditDialog::on_pbAddField_clicked() { ui->fieldsMap->setRowCount(ui->fieldsMap->rowCount() + 1); } - -void SQLEditDialog::initQueryMode() -{ +void SQLEditDialog::initQueryMode() { ui->gbSQL->setVisible(true); ui->gbFieldsMap->setVisible(false); ui->pnlChildDatasource->setVisible(false); @@ -278,12 +268,11 @@ void SQLEditDialog::initQueryMode() ui->cbSubdetail->setChecked(false); ui->leMaster->setVisible(false); ui->lbMaster->setVisible(false); - //ui->tabWidget->removeTab(1); + // ui->tabWidget->removeTab(1); ui->tabWidget->addTab(ui->csvTab, tr("CSV")); } -void SQLEditDialog::initSubQueryMode() -{ +void SQLEditDialog::initSubQueryMode() { ui->gbSQL->setVisible(true); ui->gbFieldsMap->setVisible(false); ui->pnlChildDatasource->setVisible(false); @@ -297,8 +286,7 @@ void SQLEditDialog::initSubQueryMode() ui->tabWidget->removeTab(1); } -void SQLEditDialog::initProxyMode() -{ +void SQLEditDialog::initProxyMode() { ui->gbSQL->setVisible(false); ui->gbFieldsMap->setVisible(true); ui->pnlChildDatasource->setVisible(true); @@ -313,23 +301,17 @@ void SQLEditDialog::initProxyMode() ui->tabWidget->removeTab(1); } -void SQLEditDialog::initCSVMode() -{ - ui->tabWidget->setCurrentWidget(ui->csvTab); -} +void SQLEditDialog::initCSVMode() { ui->tabWidget->setCurrentWidget(ui->csvTab); } -void SQLEditDialog::slotPreviewData() -{ - if (ui->cbbConnection->currentText().isEmpty()){ - QMessageBox::critical(this,tr("Attention"),tr("Connection is not specified")); +void SQLEditDialog::slotPreviewData() { + if (ui->cbbConnection->currentText().isEmpty()) { + QMessageBox::critical(this, tr("Attention"), tr("Connection is not specified")); return; } - m_previewModel = m_datasources->previewSQL( - ConnectionDesc::connectionNameForReport(ui->cbbConnection->currentText()), - ui->sqlText->toPlainText(), - ui->leMaster->text() - ); - if (m_previewModel){ + m_previewModel = + m_datasources->previewSQL(ConnectionDesc::connectionNameForReport(ui->cbbConnection->currentText()), + ui->sqlText->toPlainText(), ui->leMaster->text()); + if (m_previewModel) { ui->tvPreview->setModel(m_previewModel.data()); ui->gbDataPreview->setVisible(true); ui->pbPreview->setText(tr("Refresh")); @@ -337,49 +319,37 @@ void SQLEditDialog::slotPreviewData() } else { if (ui->gbDataPreview->isVisible()) hidePreview(); - QMessageBox::critical(this,tr("Attention"),m_datasources->lastError()); + QMessageBox::critical(this, tr("Attention"), m_datasources->lastError()); } } -void SQLEditDialog::slotHidePreview() -{ - hidePreview(); -} +void SQLEditDialog::slotHidePreview() { hidePreview(); } -void SQLEditDialog::writeSetting() -{ - if (settings()!=0){ +void SQLEditDialog::writeSetting() { + if (settings() != 0) { settings()->beginGroup("SQLEditor"); - settings()->setValue("Geometry",saveGeometry()); + settings()->setValue("Geometry", saveGeometry()); settings()->endGroup(); } } -void SQLEditDialog::readSettings() -{ - if (settings()==0) return; +void SQLEditDialog::readSettings() { + if (settings() == 0) + return; settings()->beginGroup("SQLEditor"); QVariant v = settings()->value("Geometry"); - if (v.isValid()){ + if (v.isValid()) { restoreGeometry(v.toByteArray()); } settings()->endGroup(); } -void SQLEditDialog::hidePreview() -{ +void SQLEditDialog::hidePreview() { ui->gbDataPreview->setVisible(false); ui->pbPreview->setText(tr("Preview")); ui->pbHidePreview->setVisible(false); } -void SQLEditDialog::on_pbDelField_clicked() -{ - ui->fieldsMap->removeRow(ui->fieldsMap->currentRow()); -} +void SQLEditDialog::on_pbDelField_clicked() { ui->fieldsMap->removeRow(ui->fieldsMap->currentRow()); } } // namespace LimeReport - - - - From 593112ccb1fbf3db84bd297f2d8a1b60d1712a29 Mon Sep 17 00:00:00 2001 From: Youssef BEDDAD Date: Fri, 20 May 2022 12:41:09 +0100 Subject: [PATCH 4/6] Update: - add -qt{QT_MAJOR_VERSION} at the end of the created library --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bf9c49a..6257b8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -342,6 +342,8 @@ set(GLOBAL_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/config.h ) +set(PROJECT_NAME ${PROJECT_NAME}-qt${QT_VERSION_MAJOR}) + if (LIMEREPORT_STATIC) message(STATUS "STATIC LIBRARY") add_library(${PROJECT_NAME} STATIC ${EXTRA_FILES} ${LIMEREPORT_SOURCES}) From f561bfa8f3d83f69855b0081cf91bdee355cfd96 Mon Sep 17 00:00:00 2001 From: Youssef BEDDAD Date: Sat, 21 May 2022 14:49:23 +0100 Subject: [PATCH 5/6] Update: - Fixed LRDesigner build complaining about PrintSupport and Qml --- designer/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer/CMakeLists.txt b/designer/CMakeLists.txt index 3f3ffe4..cad7b86 100644 --- a/designer/CMakeLists.txt +++ b/designer/CMakeLists.txt @@ -14,5 +14,7 @@ target_include_directories(LRDesigner PUBLIC ${PROJECT_SOURCE_DIR}/include) target_link_libraries(LRDesigner PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets + Qt${QT_VERSION_MAJOR}::PrintSupport + Qt${QT_VERSION_MAJOR}::Qml ${PROJECT_NAME} ) From 8575dd25d33aff37d155f0724f69e0adfa84d42e Mon Sep 17 00:00:00 2001 From: Youssef BEDDAD Date: Sat, 21 May 2022 20:30:14 +0100 Subject: [PATCH 6/6] Update: - added missing lrchartaxiseditor to CMakeLists.txt to fix LRDesigner and demo_r1 builds - added -qt${QT_VERSION_MAJOR} to demo_r1 and LRDesigner CMakeLists.txt project files --- CMakeLists.txt | 3 +++ demo_r1/CMakeLists.txt | 2 +- designer/CMakeLists.txt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6257b8c..9874801 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,7 @@ ${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.cpp ${PROJECT_NAME}/items/lrabstractlayout.cpp ${PROJECT_NAME}/items/lralignpropitem.cpp ${PROJECT_NAME}/items/lrchartitem.cpp +${PROJECT_NAME}/items/lrchartaxiseditor.cpp ${PROJECT_NAME}/items/lrchartitemeditor.cpp ${PROJECT_NAME}/items/lrhorizontallayout.cpp ${PROJECT_NAME}/items/lrimageitem.cpp @@ -191,6 +192,7 @@ ${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.h ${PROJECT_NAME}/items/lrabstractlayout.h ${PROJECT_NAME}/items/lralignpropitem.h ${PROJECT_NAME}/items/lrchartitem.h +${PROJECT_NAME}/items/lrchartaxiseditor.h ${PROJECT_NAME}/items/lrchartitemeditor.h ${PROJECT_NAME}/items/lreditableimageitemintf.h ${PROJECT_NAME}/items/lrhorizontallayout.h @@ -287,6 +289,7 @@ ${PROJECT_NAME}/databrowser/lrsqleditdialog.ui ${PROJECT_NAME}/databrowser/lrvariabledialog.ui ${PROJECT_NAME}/dialogdesigner/templates/Dialog.ui ${PROJECT_NAME}/items/lrchartitemeditor.ui +${PROJECT_NAME}/items/lrchartaxiseditor.ui ${PROJECT_NAME}/items/lrimageitemeditor.ui ${PROJECT_NAME}/items/lrtextitemeditor.ui ${PROJECT_NAME}/lraboutdialog.ui diff --git a/demo_r1/CMakeLists.txt b/demo_r1/CMakeLists.txt index a694da1..da749ac 100644 --- a/demo_r1/CMakeLists.txt +++ b/demo_r1/CMakeLists.txt @@ -18,6 +18,6 @@ target_link_libraries(demo_r1 PRIVATE Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Qml Qt${QT_VERSION_MAJOR}::Sql - ${PROJECT_NAME} + ${PROJECT_NAME}-qt${QT_VERSION_MAJOR} ) diff --git a/designer/CMakeLists.txt b/designer/CMakeLists.txt index cad7b86..d63ea0b 100644 --- a/designer/CMakeLists.txt +++ b/designer/CMakeLists.txt @@ -16,5 +16,5 @@ target_link_libraries(LRDesigner PUBLIC Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Qml - ${PROJECT_NAME} + ${PROJECT_NAME}-qt${QT_VERSION_MAJOR} )