Merge pull request #366 from elevatormind/qt6-cmake

Qt6 cmake
This commit is contained in:
Laurent Trinques
2025-02-21 15:36:54 +01:00
committed by GitHub
60 changed files with 242 additions and 286 deletions

View File

@@ -16,7 +16,7 @@
include(cmake/hoto_update_cmake_message.cmake) include(cmake/hoto_update_cmake_message.cmake)
cmake_minimum_required(VERSION 3.14...3.19 FATAL_ERROR) cmake_minimum_required(VERSION 3.21.1 FATAL_ERROR)
project(qelectrotech project(qelectrotech
VERSION 0.9.0 VERSION 0.9.0
@@ -27,6 +27,13 @@ project(qelectrotech
include(cmake/copyright_message.cmake) include(cmake/copyright_message.cmake)
set(QET_DIR ${PROJECT_SOURCE_DIR}) set(QET_DIR ${PROJECT_SOURCE_DIR})
include(cmake/qet_compilation_vars.cmake)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 REQUIRED COMPONENTS ${QET_COMPONENTS})
qt_standard_project_setup()
# Add sub directories # Add sub directories
option(PACKAGE_TESTS "Build the tests" ON) option(PACKAGE_TESTS "Build the tests" ON)
@@ -43,42 +50,17 @@ include(cmake/git_last_commit_sha.cmake)
include(cmake/fetch_kdeaddons.cmake) include(cmake/fetch_kdeaddons.cmake)
include(cmake/fetch_singleapplication.cmake) include(cmake/fetch_singleapplication.cmake)
include(cmake/fetch_pugixml.cmake) include(cmake/fetch_pugixml.cmake)
include(cmake/qet_compilation_vars.cmake)
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(
QT
NAMES
Qt6
Qt5
COMPONENTS
${QET_COMPONENTS}
REQUIRED
)
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS
${QET_COMPONENTS}
REQUIRED)
set(CMAKE_AUTOUIC_SEARCH_PATHS ${QET_DIR}/sources/ui) set(CMAKE_AUTOUIC_SEARCH_PATHS ${QET_DIR}/sources/ui)
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${QET_DIR}/lang")
qt5_add_translation(QM_FILES ${TS_FILES})
# als laatse # als laatse
include(cmake/define_definitions.cmake) include(cmake/define_definitions.cmake)
add_executable( qt_add_executable(
${PROJECT_NAME} ${PROJECT_NAME}
${QET_RES_FILES} ${QET_RES_FILES}
${QET_SRC_FILES} ${QET_SRC_FILES}
@@ -86,13 +68,24 @@ add_executable(
${QET_DIR}/qelectrotech.qrc ${QET_DIR}/qelectrotech.qrc
) )
if(QMFILES_AS_RESOURCE)
qt_add_translations(${PROJECT_NAME} TS_FILES ${TS_FILES} RESOURCE_PREFIX "/lang")
else()
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${QET_DIR}/lang")
qt_add_translation(QM_FILES ${TS_FILES})
endif()
find_package(SQLite3 REQUIRED)
target_link_libraries( target_link_libraries(
${PROJECT_NAME} ${PROJECT_NAME}
PUBLIC PUBLIC
PRIVATE PRIVATE
pugixml::pugixml pugixml::pugixml
SingleApplication::SingleApplication SingleApplication::SingleApplication
${KF5_PRIVATE_LIBRARIES} SQLite::SQLite3
${KF6_PRIVATE_LIBRARIES}
${QET_PRIVATE_LIBRARIES} ${QET_PRIVATE_LIBRARIES}
) )
@@ -149,6 +142,7 @@ install(FILES LICENSE ELEMENTS.LICENSE CREDIT README ChangeLog DESTINATION share
install(FILES misc/org.qelectrotech.qelectrotech.desktop DESTINATION share/applications) install(FILES misc/org.qelectrotech.qelectrotech.desktop DESTINATION share/applications)
install(FILES misc/qelectrotech.xml DESTINATION share/mime/packages) install(FILES misc/qelectrotech.xml DESTINATION share/mime/packages)
install(FILES misc/qelectrotech.appdata.xml DESTINATION ${QET_APPDATA_PATH}) install(FILES misc/qelectrotech.appdata.xml DESTINATION ${QET_APPDATA_PATH})
install(FILES ${QM_FILES} DESTINATION ${QET_LANG_PATH}) if(NOT QMFILES_AS_RESOURCE)
install(FILES ${QM_FILES} DESTINATION ${QET_LANG_PATH})
endif()
endif() endif()

View File

@@ -62,10 +62,14 @@ message("PROJECT_SOURCE_DIR :" ${PROJECT_SOURCE_DIR})
message("QET_DIR :" ${QET_DIR}) message("QET_DIR :" ${QET_DIR})
message("GIT_COMMIT_SHA :" ${GIT_COMMIT_SHA}) message("GIT_COMMIT_SHA :" ${GIT_COMMIT_SHA})
if(BUILD_WITH_KF5) if(BUILD_WITH_KF6 AND BUILD_KF6)
message("KF5_GIT_TAG :" ${KF5_GIT_TAG}) message("KF6_GIT_TAG :" ${KF6_GIT_TAG})
else() else()
add_definitions(-DBUILD_WITHOUT_KF5) add_definitions(-DBUILD_WITHOUT_KF6)
endif() endif()
message("QET_COMPONENTS :" ${QET_COMPONENTS}) message("QET_COMPONENTS :" ${QET_COMPONENTS})
message("QT_VERSION_MAJOR :" ${QT_VERSION_MAJOR}) message("Qt version :" ${Qt6_VERSION})
if(QMFILES_AS_RESOURCE)
add_definitions(-DQMFILES_AS_RESOURCE)
endif()

View File

@@ -31,5 +31,8 @@ add_definitions(-DQT_MESSAGELOGCONTEXT)
# In order to do so, uncomment the following line. # In order to do so, uncomment the following line.
#add_definitions(-DTODO_LIST) #add_definitions(-DTODO_LIST)
# Build with KF5 # Build with KF6
option(BUILD_WITH_KF5 "Build with KF5" ON) option(BUILD_WITH_KF6 "Build with KF6" ON)
# Use translations as a Qt resource
option(QMFILES_AS_RESOURCE "Use .qm files as Qt resource" ON)

View File

@@ -14,54 +14,59 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with QElectroTech. If not, see <http://www.gnu.org/licenses/>. # along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
message(" - fetch_kdeaddons") message(STATUS "fetch_kdeaddons")
if(DEFINED BUILD_WITH_KF5) if(BUILD_WITH_KF6)
Include(FetchContent) option(BUILD_KF6 "Build KF6 libraries, use system ones otherwise" OFF)
block(PROPAGATE KF6_GIT_TAG)
set(BUILD_TESTING OFF)
set(KDE_SKIP_TEST_SETTINGS ON)
set(BUILD_DESIGNERPLUGIN OFF)
set(KCOREADDONS_USE_QML OFF)
set(BUILD_QCH OFF)
set(BUILD_SHARED_LIBS OFF)
find_package(ECM 6.8.0 REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
option(BUILD_KF5 "Build KF5 libraries, use system ones otherwise" YES) if(BUILD_KF6)
Include(FetchContent)
if(BUILD_KF5) if(NOT DEFINED KF6_GIT_TAG)
set(KF6_GIT_TAG v6.8.0)
if(NOT DEFINED KF5_GIT_TAG)
#https://qelectrotech.org/forum/viewtopic.php?pid=13924#p13924
set(KF5_GIT_TAG v5.77.0)
endif() endif()
# Fix stop the run autotests of kcoreaddons
# see
# https://invent.kde.org/frameworks/kcoreaddons/-/blob/master/CMakeLists.txt#L98
# issue:
# CMake Error at /usr/share/ECM/modules/ECMAddTests.cmake:89 (add_executable):
# Cannot find source file:
# see
# https://qelectrotech.org/forum/viewtopic.php?pid=13929#p13929
set(KDE_SKIP_TEST_SETTINGS "TRUE")
set(BUILD_TESTING "0")
FetchContent_Declare(
ecm
GIT_REPOSITORY https://invent.kde.org/frameworks/extra-cmake-modules.git
GIT_TAG ${KF5_GIT_TAG})
FetchContent_MakeAvailable(ecm)
FetchContent_Declare( FetchContent_Declare(
kcoreaddons kcoreaddons
GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
GIT_TAG ${KF5_GIT_TAG}) GIT_TAG ${KF6_GIT_TAG})
FetchContent_MakeAvailable(kcoreaddons) FetchContent_MakeAvailable(kcoreaddons)
get_target_property(kca_version KF6::CoreAddons VERSION)
FetchContent_Declare( FetchContent_Declare(
kwidgetsaddons kwidgetsaddons
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
GIT_TAG ${KF5_GIT_TAG}) GIT_TAG ${KF6_GIT_TAG})
FetchContent_MakeAvailable(kwidgetsaddons) FetchContent_MakeAvailable(kwidgetsaddons)
get_target_property(kwa_version KF6::WidgetsAddons VERSION)
else() else()
find_package(KF5CoreAddons REQUIRED) find_package(KF6CoreAddons REQUIRED)
find_package(KF5WidgetsAddons REQUIRED) set(kca_version ${KF6CoreAddons_VERSION})
find_package(KF6WidgetsAddons REQUIRED)
set(kwa_version ${KF6WidgetsAddons_VERSION})
endif() endif()
set(KF5_PRIVATE_LIBRARIES get_target_property(kca_type KF6::WidgetsAddons TYPE)
KF5::WidgetsAddons get_target_property(kwa_type KF6::CoreAddons TYPE)
KF5::CoreAddons
message(NOTICE "ecm version : " ${ECM_VERSION})
message(NOTICE "kcoreaddons library : " ${kca_type})
message(NOTICE "kcoreaddons version : " ${kca_version})
message(NOTICE "kwidgetsaddons library : " ${kwa_type})
message(NOTICE "kwidgetsaddons version : " ${kwa_version})
endblock()
set(KF6_PRIVATE_LIBRARIES
KF6::WidgetsAddons
KF6::CoreAddons
) )
endif() endif()

View File

@@ -25,7 +25,7 @@ if(BUILD_PUGIXML)
FetchContent_Declare( FetchContent_Declare(
pugixml pugixml
GIT_REPOSITORY https://github.com/zeux/pugixml.git GIT_REPOSITORY https://github.com/zeux/pugixml.git
GIT_TAG v1.11.4) GIT_TAG v1.14)
FetchContent_MakeAvailable(pugixml) FetchContent_MakeAvailable(pugixml)
else() else()

View File

@@ -26,6 +26,6 @@ Include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
SingleApplication SingleApplication
GIT_REPOSITORY https://github.com/itay-grudev/SingleApplication.git GIT_REPOSITORY https://github.com/itay-grudev/SingleApplication.git
GIT_TAG v3.2.0) GIT_TAG v3.5.1)
FetchContent_MakeAvailable(SingleApplication) FetchContent_MakeAvailable(SingleApplication)

View File

@@ -17,6 +17,8 @@
message(" - qet_compilation_vars") message(" - qet_compilation_vars")
set(QET_COMPONENTS set(QET_COMPONENTS
Core
Gui
LinguistTools LinguistTools
PrintSupport PrintSupport
Xml Xml
@@ -710,7 +712,6 @@ set(QET_SRC_FILES
set(TS_FILES set(TS_FILES
${QET_DIR}/lang/qet_ar.ts ${QET_DIR}/lang/qet_ar.ts
${QET_DIR}/lang/qet_be.ts
${QET_DIR}/lang/qet_ca.ts ${QET_DIR}/lang/qet_ca.ts
${QET_DIR}/lang/qet_cs.ts ${QET_DIR}/lang/qet_cs.ts
${QET_DIR}/lang/qet_da.ts ${QET_DIR}/lang/qet_da.ts
@@ -727,6 +728,7 @@ set(TS_FILES
${QET_DIR}/lang/qet_mn.ts ${QET_DIR}/lang/qet_mn.ts
${QET_DIR}/lang/qet_nb.ts ${QET_DIR}/lang/qet_nb.ts
${QET_DIR}/lang/qet_nl.ts ${QET_DIR}/lang/qet_nl.ts
${QET_DIR}/lang/qet_nl_BE.ts
${QET_DIR}/lang/qet_no.ts ${QET_DIR}/lang/qet_no.ts
${QET_DIR}/lang/qet_pl.ts ${QET_DIR}/lang/qet_pl.ts
${QET_DIR}/lang/qet_pt.ts ${QET_DIR}/lang/qet_pt.ts

View File

@@ -29,4 +29,4 @@ add_definitions(-DQET_ALLOW_OVERRIDE_CD_OPTION)
add_definitions(-DQET_ALLOW_OVERRIDE_DD_OPTION) add_definitions(-DQET_ALLOW_OVERRIDE_DD_OPTION)
#comment the line below to disable the project database export #comment the line below to disable the project database export
#add_definitions(-DQET_EXPORT_PROJECT_DB) #error Todo add_definitions(-DQET_EXPORT_PROJECT_DB)

View File

@@ -765,7 +765,7 @@ void ElementsCollectionWidget::search()
} }
//start the search when text have at least 3 letters. //start the search when text have at least 3 letters.
if (text.count() < 3) { if (text.length() < 3) {
return; return;
} }

View File

@@ -805,15 +805,15 @@ bool ElementsLocation::setXml(const QDomDocument &xml_document) const
qDebug() << "Help code for QT 6 or later"; qDebug() << "Help code for QT 6 or later";
QString path_ = collectionPath(false); QString path_ = collectionPath(false);
QRegularExpression rx("^(.*)/(.*\\.elmt)$"); QRegularExpression rx(QRegularExpression::anchoredPattern("(.*)/(.*\\.elmt)"));
QRegularExpressionMatch match = rx.match(path_);
if (rx.exactMatch(path_)) if (match.hasMatch())
{ {
return project() return project()
->embeddedElementCollection() ->embeddedElementCollection()
->addElementDefinition( ->addElementDefinition(
rx.cap(1), match.captured(1),
rx.cap(2), match.captured(2),
xml_document.documentElement()); xml_document.documentElement());
} }
else else

View File

@@ -17,6 +17,7 @@
*/ */
#include "terminalstripdrawer.h" #include "terminalstripdrawer.h"
#include <QPainter> #include <QPainter>
#include <QHash>
namespace TerminalStripDrawer { namespace TerminalStripDrawer {
@@ -202,7 +203,7 @@ void TerminalStripDrawer::paint(QPainter *painter)
painter->restore(); painter->restore();
//Draw the bridges //Draw the bridges
for (const auto &points_ : qAsConst(bridges_anchor_points)) for (const auto &points_ : std::as_const(bridges_anchor_points))
{ {
painter->save(); painter->save();
auto pen_{painter->pen()}; auto pen_{painter->pen()};

View File

@@ -126,7 +126,7 @@ void RemoveTerminalFromStripCommand::redo()
if (m_strip) if (m_strip)
{ {
QVector<QSharedPointer<RealTerminal>> real_t; QVector<QSharedPointer<RealTerminal>> real_t;
for (const auto &real_t_vector : qAsConst(m_terminals)) { for (const auto &real_t_vector : std::as_const(m_terminals)) {
real_t.append(real_t_vector); real_t.append(real_t_vector);
} }

View File

@@ -68,7 +68,7 @@ void UnGroupTerminalsCommand::undo()
m_terminal_strip->groupTerminals(key, m_physical_real_H.value(key)); m_terminal_strip->groupTerminals(key, m_physical_real_H.value(key));
} }
//Second, set level. //Second, set level.
for (const auto &pair : qAsConst(m_real_t_level)) { for (const auto &pair : std::as_const(m_real_t_level)) {
m_terminal_strip->setLevel(pair.first, pair.second); m_terminal_strip->setLevel(pair.first, pair.second);
} }
} }
@@ -78,7 +78,7 @@ void UnGroupTerminalsCommand::redo()
{ {
if (m_terminal_strip) if (m_terminal_strip)
{ {
for (const auto &value : qAsConst(m_physical_real_H)) { for (const auto &value : std::as_const(m_physical_real_H)) {
m_terminal_strip->unGroupTerminals(value); m_terminal_strip->unGroupTerminals(value);
} }
} }

View File

@@ -131,7 +131,7 @@ bool PhysicalTerminal::setLevelOf(const QSharedPointer<RealTerminal> &terminal,
if (i >= 0) if (i >= 0)
{ {
#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) #if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
m_real_terminal.swapItemsAt(i, std::min(level, m_real_terminal.size()-1)); m_real_terminal.swapItemsAt(i, std::min((qsizetype)level, m_real_terminal.size()-1));
#else #else
auto j = std::min(level, m_real_terminal.size()-1); auto j = std::min(level, m_real_terminal.size()-1);
std::swap(m_real_terminal.begin()[i], m_real_terminal.begin()[j]); std::swap(m_real_terminal.begin()[i], m_real_terminal.begin()[j]);

View File

@@ -466,7 +466,7 @@ QSharedPointer<RealTerminal> TerminalStrip::realTerminalForUuid(const QUuid &uui
QVector<QSharedPointer<RealTerminal>> TerminalStrip::realTerminals() const QVector<QSharedPointer<RealTerminal>> TerminalStrip::realTerminals() const
{ {
QVector<QSharedPointer<RealTerminal>> vector_; QVector<QSharedPointer<RealTerminal>> vector_;
for (const auto &phy : qAsConst(m_physical_terminals)) { for (const auto &phy : std::as_const(m_physical_terminals)) {
vector_.append(phy->realTerminals()); vector_.append(phy->realTerminals());
} }
return vector_; return vector_;
@@ -639,7 +639,7 @@ bool TerminalStrip::isBridgeable(const QVector<QSharedPointer<RealTerminal>> &re
// Get the physical terminal and pos // Get the physical terminal and pos
auto first_physical_terminal = first_real_terminal->physicalTerminal(); auto first_physical_terminal = first_real_terminal->physicalTerminal();
QVector<shared_physical_terminal> physical_vector{first_physical_terminal}; QVector<shared_physical_terminal> physical_vector{first_physical_terminal};
QVector<int> pos_vector{m_physical_terminals.indexOf(first_physical_terminal)}; QVector<qsizetype> pos_vector{m_physical_terminals.indexOf(first_physical_terminal)};
auto bridge_ = isBridged(first_real_terminal); auto bridge_ = isBridged(first_real_terminal);
//bool to know at the end of this function if at least one terminal is not bridged //bool to know at the end of this function if at least one terminal is not bridged
@@ -856,7 +856,7 @@ QSharedPointer<TerminalStripBridge> TerminalStrip::isBridged(const QSharedPointe
{ {
if (real_terminal) if (real_terminal)
{ {
for (const auto &bridge_ : qAsConst(m_bridge)) { for (const auto &bridge_ : std::as_const(m_bridge)) {
if (bridge_->realTerminals().contains(real_terminal)) if (bridge_->realTerminals().contains(real_terminal))
return bridge_; return bridge_;
} }
@@ -983,7 +983,7 @@ QDomElement TerminalStrip::toXml(QDomDocument &parent_document)
} }
root_elmt.appendChild(xml_layout); root_elmt.appendChild(xml_layout);
for (const auto &bridge_ : qAsConst(m_bridge)) { for (const auto &bridge_ : std::as_const(m_bridge)) {
root_elmt.appendChild(bridge_->toXml(parent_document)); root_elmt.appendChild(bridge_->toXml(parent_document));
} }
@@ -1024,7 +1024,7 @@ bool TerminalStrip::fromXml(QDomElement &xml_element)
for (auto &xml_real : QETXML::findInDomElement(xml_physical, RealTerminal::xmlTagName())) for (auto &xml_real : QETXML::findInDomElement(xml_physical, RealTerminal::xmlTagName()))
{ {
const auto uuid_ = QUuid(xml_real.attribute(QStringLiteral("element_uuid"))); const auto uuid_ = QUuid(xml_real.attribute(QStringLiteral("element_uuid")));
for (auto terminal_elmt : qAsConst(free_terminals)) for (auto terminal_elmt : std::as_const(free_terminals))
{ {
if (terminal_elmt->uuid() == uuid_) if (terminal_elmt->uuid() == uuid_)
{ {

View File

@@ -85,7 +85,7 @@ QDomElement TerminalStripBridge::toXml(QDomDocument &parent_document) const
root_elmt.setAttribute(QStringLiteral("color"), m_color.name()); root_elmt.setAttribute(QStringLiteral("color"), m_color.name());
auto terminals_elmt = parent_document.createElement(QStringLiteral("real_terminals")); auto terminals_elmt = parent_document.createElement(QStringLiteral("real_terminals"));
for (const auto &real_t : qAsConst(m_real_terminals)) for (const auto &real_t : std::as_const(m_real_terminals))
{ {
if (real_t) if (real_t)
{ {
@@ -106,7 +106,7 @@ void TerminalStripBridge::fromXml(const QDomElement &dom_element)
} }
m_uuid = QUuid(dom_element.attribute(QStringLiteral("uuid"), m_uuid.toString())); m_uuid = QUuid(dom_element.attribute(QStringLiteral("uuid"), m_uuid.toString()));
m_color.setNamedColor(dom_element.attribute(QStringLiteral("color"))); m_color = QColor::fromString(dom_element.attribute(QStringLiteral("color")));
const auto real_t_vector = QETXML::subChild(dom_element, const auto real_t_vector = QETXML::subChild(dom_element,
QStringLiteral("real_terminals"), QStringLiteral("real_terminals"),

View File

@@ -535,7 +535,7 @@ modelRealTerminalData TerminalStripModel::dataAtRow(int row) const
else else
{ {
auto current_row = 0; auto current_row = 0;
for (const auto &physical_data : qAsConst(m_physical_data)) for (const auto &physical_data : std::as_const(m_physical_data))
{ {
for (const auto &real_data : physical_data.real_data) for (const auto &real_data : physical_data.real_data)
{ {
@@ -567,7 +567,7 @@ void TerminalStripModel::replaceDataAtRow(modelRealTerminalData data, int row)
auto current_row = 0; auto current_row = 0;
auto current_physical = 0; auto current_physical = 0;
for (const auto &physical_data : qAsConst(m_physical_data)) for (const auto &physical_data : std::as_const(m_physical_data))
{ {
auto current_real = 0; auto current_real = 0;
for (int i=0 ; i<physical_data.real_data.count() ; ++i) for (int i=0 ; i<physical_data.real_data.count() ; ++i)
@@ -606,7 +606,7 @@ modelPhysicalTerminalData TerminalStripModel::physicalDataAtIndex(int index) con
int current_phy = -1; int current_phy = -1;
bool match_ = false; bool match_ = false;
for (const auto &ptd_ : qAsConst(m_physical_data)) for (const auto &ptd_ : std::as_const(m_physical_data))
{ {
current_checked_index += ptd_.real_data.size(); current_checked_index += ptd_.real_data.size();
++current_phy; ++current_phy;
@@ -637,9 +637,9 @@ modelRealTerminalData TerminalStripModel::realDataAtIndex(int index) const
int current_checked_index = -1; int current_checked_index = -1;
for (const auto & ptd_ : qAsConst(m_physical_data)) for (const auto & ptd_ : std::as_const(m_physical_data))
{ {
for (const auto & rtd_ : qAsConst(ptd_.real_data)) { for (const auto & rtd_ : std::as_const(ptd_.real_data)) {
++current_checked_index; ++current_checked_index;
if (current_checked_index == index) { if (current_checked_index == index) {
return rtd_; return rtd_;

View File

@@ -29,12 +29,12 @@
#include "modelTerminalData.h" #include "modelTerminalData.h"
//Code to use QColor as key for QHash //Code to use QColor as key for QHash
inline uint qHash(const QColor &key, uint seed) { inline size_t qHash(const QColor &key, size_t seed) {
return qHash(key.name(), seed); return qHash(key.name(), seed);
} }
//needed to use QPointer<Element> as key of QHash //needed to use QPointer<Element> as key of QHash
inline uint qHash(const QPointer<Element> &key, uint seed) { inline size_t qHash(const QPointer<Element> &key, size_t seed) {
if (key) if (key)
return qHash(key->uuid(), seed); return qHash(key->uuid(), seed);
else else

View File

@@ -60,7 +60,7 @@ void TerminalStripTreeDockWidget::reload()
m_uuid_terminal_H.clear(); m_uuid_terminal_H.clear();
m_uuid_strip_H.clear(); m_uuid_strip_H.clear();
for (const auto &connection_ : qAsConst(m_strip_changed_connection)) { for (const auto &connection_ : std::as_const(m_strip_changed_connection)) {
disconnect(connection_); disconnect(connection_);
} }
m_strip_changed_connection.clear(); m_strip_changed_connection.clear();
@@ -222,7 +222,7 @@ void TerminalStripTreeDockWidget::buildTree()
return a->name() < b->name(); return a->name() < b->name();
}); });
for (const auto &ts : qAsConst(ts_vector)) { for (const auto &ts : std::as_const(ts_vector)) {
addTerminalStrip(ts); addTerminalStrip(ts);
} }
addFreeTerminal(); addFreeTerminal();
@@ -324,7 +324,7 @@ void TerminalStripTreeDockWidget::addFreeTerminal()
auto free_terminal_item = ui->m_tree_view->topLevelItem(1); auto free_terminal_item = ui->m_tree_view->topLevelItem(1);
for (const auto terminal : qAsConst(vector_)) for (const auto terminal : std::as_const(vector_))
{ {
QUuid uuid_ = terminal->uuid(); QUuid uuid_ = terminal->uuid();
QStringList strl{terminal->actualLabel()}; QStringList strl{terminal->actualLabel()};

View File

@@ -57,9 +57,9 @@ bool NumerotationContext::addValue(const QString &type,
const QVariant &value, const QVariant &value,
const int increase, const int increase,
const int initialvalue) { const int initialvalue) {
if (!keyIsAcceptable(type) && !value.canConvert(QVariant::String)) if (!keyIsAcceptable(type) && !value.canConvert<QString>())
return false; return false;
if (keyIsNumber(type) && !value.canConvert(QVariant::Int)) if (keyIsNumber(type) && !value.canConvert<int>())
return false; return false;
QString valuestr = value.toString(); QString valuestr = value.toString();

View File

@@ -941,8 +941,8 @@ QString BorderTitleBlock::incrementLetters(const QString &string) {
} else { } else {
// separate previous digits from last digit // separate previous digits from last digit
// separe les digits precedents du dernier digit // separe les digits precedents du dernier digit
QString first_digits(string.left(string.count() - 1)); QString first_digits(string.left(string.length() - 1));
QChar last_digit(string.at(string.count() - 1)); QChar last_digit(string.at(string.length() - 1));
if (last_digit != 'Z') { if (last_digit != 'Z') {
// increments the last digit // increments the last digit
// incremente le dernier digit // incremente le dernier digit

View File

@@ -253,9 +253,11 @@ bool projectDataBase::createDataBase()
return false; return false;
} }
m_data_base.exec("PRAGMA temp_store = MEMORY"); QSqlQuery *temp_query = new QSqlQuery(m_data_base);
m_data_base.exec("PRAGMA journal_mode = MEMORY"); temp_query->exec("PRAGMA temp_store = MEMORY");
m_data_base.exec("PRAGMA synchronous = OFF"); temp_query->exec("PRAGMA journal_mode = MEMORY");
temp_query->exec("PRAGMA synchronous = OFF");
delete temp_query;
QSqlQuery query_(m_data_base); QSqlQuery query_(m_data_base);
bool first_ = true; bool first_ = true;

View File

@@ -151,7 +151,7 @@ Diagram::~Diagram()
continue; continue;
deletable_items.append(qgi); deletable_items.append(qgi);
} }
for (const auto &item : qAsConst(deletable_items)) for (const auto &item : std::as_const(deletable_items))
{ {
removeItem(item); removeItem(item);
delete item; delete item;
@@ -1453,13 +1453,13 @@ bool Diagram::fromXml(QDomElement &document,
if (position != QPointF()) if (position != QPointF())
{ {
QVector <QGraphicsItem *> added_items; QVector <QGraphicsItem *> added_items;
for (auto element : qAsConst(added_elements )) added_items << element; for (auto element : std::as_const(added_elements )) added_items << element;
for (auto cond : qAsConst(added_conductors )) added_items << cond; for (auto cond : std::as_const(added_conductors )) added_items << cond;
for (auto shape : qAsConst(added_shapes )) added_items << shape; for (auto shape : std::as_const(added_shapes )) added_items << shape;
for (auto text : qAsConst(added_texts )) added_items << text; for (auto text : std::as_const(added_texts )) added_items << text;
for (auto image : qAsConst(added_images )) added_items << image; for (auto image : std::as_const(added_images )) added_items << image;
for (auto table : qAsConst(added_tables )) added_items << table; for (auto table : std::as_const(added_tables )) added_items << table;
for (const auto &strip : qAsConst(added_strips)) added_items << strip; for (const auto &strip : std::as_const(added_strips)) added_items << strip;
//Get the top left corner of the rectangle that contain all added items //Get the top left corner of the rectangle that contain all added items
QRectF items_rect; QRectF items_rect;
@@ -1568,11 +1568,11 @@ void Diagram::refreshContents()
conductor->refreshText(); conductor->refreshText();
} }
for (auto &table : qAsConst(dc_.m_tables)) { for (auto &table : std::as_const(dc_.m_tables)) {
table->initLink(); table->initLink();
} }
for (auto &strip :qAsConst(dc_.m_terminal_strip)) { for (auto &strip :std::as_const(dc_.m_terminal_strip)) {
strip->refreshPending(); strip->refreshPending();
} }
} }
@@ -1757,7 +1757,7 @@ void Diagram::invertSelection()
item_list << item; item_list << item;
} }
} }
for (auto item : qAsConst(item_list)) { for (auto item : std::as_const(item_list)) {
item -> setSelected(!item -> isSelected()); item -> setSelected(!item -> isSelected());
} }

View File

@@ -55,7 +55,7 @@ DiagramContent::DiagramContent(Diagram *diagram, bool selected) :
item_list = diagram->items(); item_list = diagram->items();
} }
for (const auto &item : qAsConst(item_list)) for (const auto &item : std::as_const(item_list))
{ {
switch (item->type()) switch (item->type())
{ {
@@ -391,10 +391,10 @@ QList<QGraphicsItem *> DiagramContent::items(int filter) const
if (filter & ElementTextFields) for(auto qgi : m_element_texts) items_list << qgi; if (filter & ElementTextFields) for(auto qgi : m_element_texts) items_list << qgi;
if (filter & TextGroup) for(auto qgi : m_texts_groups) items_list << qgi; if (filter & TextGroup) for(auto qgi : m_texts_groups) items_list << qgi;
if (filter & Tables) for(auto qgi : m_tables) items_list << qgi; if (filter & Tables) for(auto qgi : m_tables) items_list << qgi;
if (filter & TerminalStrip) for(const auto qgi : qAsConst(m_terminal_strip)) items_list << qgi; if (filter & TerminalStrip) for(const auto qgi : std::as_const(m_terminal_strip)) items_list << qgi;
if (filter & SelectedOnly) { if (filter & SelectedOnly) {
for(const auto &qgi : qAsConst(items_list)) { for(const auto &qgi : std::as_const(items_list)) {
if (!qgi -> isSelected()) items_list.removeOne(qgi); if (!qgi -> isSelected()) items_list.removeOne(qgi);
} }
} }
@@ -420,7 +420,7 @@ int DiagramContent::count(int filter) const
if (filter & ElementTextFields) for(auto deti : m_element_texts) { if (deti -> isSelected()) ++ count; } if (filter & ElementTextFields) for(auto deti : m_element_texts) { if (deti -> isSelected()) ++ count; }
if (filter & TextGroup) for(auto etig : m_texts_groups) { if (etig -> isSelected()) ++ count; } if (filter & TextGroup) for(auto etig : m_texts_groups) { if (etig -> isSelected()) ++ count; }
if (filter & Tables) for(auto table : m_tables) { if (table -> isSelected()) ++ count; } if (filter & Tables) for(auto table : m_tables) { if (table -> isSelected()) ++ count; }
if (filter & TerminalStrip) for(const auto &strip : qAsConst(m_terminal_strip)) {if (strip->isSelected()) ++ count;} if (filter & TerminalStrip) for(const auto &strip : std::as_const(m_terminal_strip)) {if (strip->isSelected()) ++ count;}
} }
else { else {
if (filter & Elements) count += m_elements.count(); if (filter & Elements) count += m_elements.count();

View File

@@ -746,7 +746,7 @@ void ElementScene::addItems(QVector<QGraphicsItem *> items)
*/ */
void ElementScene::removeItems(QVector<QGraphicsItem *> items) void ElementScene::removeItems(QVector<QGraphicsItem *> items)
{ {
const int previous_selected_count{selectedItems().size()}; const qsizetype previous_selected_count{selectedItems().size()};
//block signal to avoid multiple emit of selection changed, //block signal to avoid multiple emit of selection changed,
//we emit this signal only once at the end of this function. //we emit this signal only once at the end of this function.

View File

@@ -140,7 +140,7 @@ void DynamicTextFieldEditor::updateForm()
ui -> m_user_text_le -> setText(m_text_field.data() -> text()); ui -> m_user_text_le -> setText(m_text_field.data() -> text());
ui -> m_size_sb -> setValue(m_text_field.data() -> font().pointSize()); ui -> m_size_sb -> setValue(m_text_field.data() -> font().pointSize());
ui->m_keep_visual_rotation_cb->setChecked(m_text_field.data()->keepVisualRotation()); ui->m_keep_visual_rotation_cb->setChecked(m_text_field.data()->keepVisualRotation());
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
m_color_kpb -> setColor(m_text_field.data() -> color()); m_color_kpb -> setColor(m_text_field.data() -> color());
#endif #endif
@@ -169,7 +169,7 @@ void DynamicTextFieldEditor::updateForm()
void DynamicTextFieldEditor::setupWidget() void DynamicTextFieldEditor::setupWidget()
{ {
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
m_color_kpb = new KColorButton(this); m_color_kpb = new KColorButton(this);
m_color_kpb->setObjectName(QString::fromUtf8("m_color_kpb")); m_color_kpb->setObjectName(QString::fromUtf8("m_color_kpb"));

View File

@@ -21,7 +21,7 @@
#include "../elementitemeditor.h" #include "../elementitemeditor.h"
#include "../graphicspart/partdynamictextfield.h" #include "../graphicspart/partdynamictextfield.h"
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
# include <KColorButton> # include <KColorButton>
#endif #endif
@@ -77,7 +77,7 @@ class DynamicTextFieldEditor : public ElementItemEditor {
QList<PartDynamicTextField*> m_parts; QList<PartDynamicTextField*> m_parts;
QList<QMetaObject::Connection> m_connection_list; QList<QMetaObject::Connection> m_connection_list;
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
KColorButton* m_color_kpb = nullptr; KColorButton* m_color_kpb = nullptr;
#endif #endif

View File

@@ -1069,7 +1069,7 @@ void QETElementEditor::updateAction()
<< ui->m_revert_selection_action << ui->m_revert_selection_action
<< ui->m_paste_from_file_action << ui->m_paste_from_file_action
<< ui->m_paste_from_element_action; << ui->m_paste_from_element_action;
for (auto action : qAsConst(ro_list)) { for (auto action : std::as_const(ro_list)) {
action->setDisabled(m_read_only); action->setDisabled(m_read_only);
} }
@@ -1084,7 +1084,7 @@ void QETElementEditor::updateAction()
<< ui->m_flip_action << ui->m_flip_action
<< ui->m_mirror_action; << ui->m_mirror_action;
auto items_selected = !m_read_only && m_elmt_scene->selectedItems().count(); auto items_selected = !m_read_only && m_elmt_scene->selectedItems().count();
for (auto action : qAsConst(select_list)) { for (auto action : std::as_const(select_list)) {
action->setEnabled(items_selected); action->setEnabled(items_selected);
} }

View File

@@ -229,7 +229,7 @@ void TerminalEditor::activeConnections(bool active)
m_editor_connections << connect(ui->m_type_cb, QOverload<int>::of(&QComboBox::activated), m_editor_connections << connect(ui->m_type_cb, QOverload<int>::of(&QComboBox::activated),
this, &TerminalEditor::typeEdited); this, &TerminalEditor::typeEdited);
} else { } else {
for (auto const & con : qAsConst(m_editor_connections)) { for (auto const & con : std::as_const(m_editor_connections)) {
QObject::disconnect(con); QObject::disconnect(con);
} }
m_editor_connections.clear(); m_editor_connections.clear();

View File

@@ -62,7 +62,7 @@ void TextEditor::updateForm()
m_rotation_sb -> setValue(m_text -> rotation()); m_rotation_sb -> setValue(m_text -> rotation());
m_size_sb -> setValue(m_text -> font().pointSize()); m_size_sb -> setValue(m_text -> font().pointSize());
m_font_pb -> setText(m_text -> font().family()); m_font_pb -> setText(m_text -> font().family());
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
m_color_pb -> setColor(m_text -> defaultTextColor()); m_color_pb -> setColor(m_text -> defaultTextColor());
#endif #endif
@@ -84,7 +84,7 @@ void TextEditor::setUpChangeConnection(QPointer<PartText> part)
void TextEditor::disconnectChangeConnection() void TextEditor::disconnectChangeConnection()
{ {
for (const auto &connection : qAsConst(m_change_connection)) { for (const auto &connection : std::as_const(m_change_connection)) {
disconnect(connection); disconnect(connection);
} }
m_change_connection.clear(); m_change_connection.clear();
@@ -344,7 +344,7 @@ void TextEditor::setUpWidget(QWidget *parent)
m_line_edit->setPlaceholderText(tr("Entrer votre texte ici")); m_line_edit->setPlaceholderText(tr("Entrer votre texte ici"));
gridLayout->addWidget(m_line_edit, 0, 0, 1, 6); gridLayout->addWidget(m_line_edit, 0, 0, 1, 6);
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
m_color_pb = new KColorButton(parent); m_color_pb = new KColorButton(parent);
m_color_pb->setObjectName(QString::fromUtf8("m_color_pb")); m_color_pb->setObjectName(QString::fromUtf8("m_color_pb"));

View File

@@ -25,7 +25,7 @@
#include <QSpinBox> #include <QSpinBox>
#include <QLineEdit> #include <QLineEdit>
#include <QPushButton> #include <QPushButton>
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
#include <KColorButton> #include <KColorButton>
#endif #endif
@@ -65,7 +65,7 @@ class TextEditor : public ElementItemEditor {
QSpinBox *m_size_sb; QSpinBox *m_size_sb;
QLineEdit *m_line_edit; QLineEdit *m_line_edit;
QPushButton *m_font_pb; QPushButton *m_font_pb;
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
KColorButton *m_color_pb; KColorButton *m_color_pb;
#endif #endif

View File

@@ -59,11 +59,11 @@ QVector <QPointer<Element>> ElementProvider::freeElement(ElementData::Types filt
QList<Element *> elmt_list; QList<Element *> elmt_list;
//search in all diagram //search in all diagram
for (const auto &diagram_ : qAsConst(m_diagram_list)) for (const auto &diagram_ : std::as_const(m_diagram_list))
{ {
//get all element in diagram d //get all element in diagram d
elmt_list = diagram_->elements(); elmt_list = diagram_->elements();
for (const auto &elmt_ : qAsConst(elmt_list)) for (const auto &elmt_ : std::as_const(elmt_list))
{ {
if (filter & elmt_->elementData().m_type && if (filter & elmt_->elementData().m_type &&
elmt_->isFree()) elmt_->isFree())
@@ -106,7 +106,7 @@ QList <Element *> ElementProvider::fromUuids(QList<QUuid> uuid_list) const
QVector<QPointer<Element>> ElementProvider::find(ElementData::Types elmt_type) const QVector<QPointer<Element>> ElementProvider::find(ElementData::Types elmt_type) const
{ {
QVector<QPointer<Element>> returned_vector; QVector<QPointer<Element>> returned_vector;
for (const auto &diagram_ : qAsConst(m_diagram_list)) for (const auto &diagram_ : std::as_const(m_diagram_list))
{ {
const auto elmt_list = diagram_->elements(); const auto elmt_list = diagram_->elements();
for (const auto &elmt_ : elmt_list) for (const auto &elmt_ : elmt_list)
@@ -198,7 +198,7 @@ QVector<TerminalElement *> ElementProvider::freeTerminal() const
{ {
QVector<TerminalElement *> vector_; QVector<TerminalElement *> vector_;
for (const auto &diagram : qAsConst(m_diagram_list)) for (const auto &diagram : std::as_const(m_diagram_list))
{ {
const auto elmt_list{diagram->elements()}; const auto elmt_list{diagram->elements()};

View File

@@ -45,18 +45,19 @@ ElementsCollectionCache::ElementsCollectionCache(const QString &database_path, Q
qDebug() << "Unable to open the SQLite database " << database_path << " as " << connection_name << ": " << cache_db_.lastError(); qDebug() << "Unable to open the SQLite database " << database_path << " as " << connection_name << ": " << cache_db_.lastError();
else else
{ {
cache_db_.exec("PRAGMA temp_store = MEMORY"); QSqlQuery *temp_query = new QSqlQuery(cache_db_);
cache_db_.exec("PRAGMA journal_mode = MEMORY"); temp_query->exec("PRAGMA temp_store = MEMORY");
cache_db_.exec("PRAGMA page_size = 4096"); temp_query->exec("PRAGMA journal_mode = MEMORY");
cache_db_.exec("PRAGMA cache_size = 16384"); temp_query->exec("PRAGMA page_size = 4096");
cache_db_.exec("PRAGMA locking_mode = EXCLUSIVE"); temp_query->exec("PRAGMA cache_size = 16384");
cache_db_.exec("PRAGMA synchronous = OFF"); temp_query->exec("PRAGMA locking_mode = EXCLUSIVE");
temp_query->exec("PRAGMA synchronous = OFF");
#if TODO_LIST #if TODO_LIST
#pragma message("@TODO the tables could already exist, handle that case.") #pragma message("@TODO the tables could already exist, handle that case.")
#endif #endif
//@TODO the tables could already exist, handle that case. //@TODO the tables could already exist, handle that case.
cache_db_.exec("CREATE TABLE names" temp_query->exec("CREATE TABLE names"
"(" "("
"path VARCHAR(512) NOT NULL," "path VARCHAR(512) NOT NULL,"
"locale VARCHAR(2) NOT NULL," "locale VARCHAR(2) NOT NULL,"
@@ -65,12 +66,13 @@ ElementsCollectionCache::ElementsCollectionCache(const QString &database_path, Q
"PRIMARY KEY(path, locale)" "PRIMARY KEY(path, locale)"
");"); ");");
cache_db_.exec("CREATE TABLE pixmaps" temp_query->exec("CREATE TABLE pixmaps"
"(" "("
"path VARCHAR(512) NOT NULL UNIQUE," "path VARCHAR(512) NOT NULL UNIQUE,"
"uuid VARCHAR(512) NOT NULL," "uuid VARCHAR(512) NOT NULL,"
"pixmap BLOB, PRIMARY KEY(path)," "pixmap BLOB, PRIMARY KEY(path),"
"FOREIGN KEY(path) REFERENCES names (path) ON DELETE CASCADE);"); "FOREIGN KEY(path) REFERENCES names (path) ON DELETE CASCADE);");
delete temp_query;
// prepare queries // prepare queries
select_name_ = new QSqlQuery(cache_db_); select_name_ = new QSqlQuery(cache_db_);

View File

@@ -150,7 +150,7 @@ void MachineInfo::send_info_to_debug()
qInfo()<< ""; qInfo()<< "";
qInfo()<< " OS System language:"<< QLocale::system().name(); qInfo()<< " OS System language:"<< QLocale::system().name();
qInfo()<< " OS System Native Country Name:"<< QLocale::system().nativeCountryName(); qInfo()<< " OS System Native Country Name:"<< QLocale::system().nativeTerritoryName();
qInfo()<< " OS System Native Language Name:"<< QLocale::system().nativeLanguageName(); qInfo()<< " OS System Native Language Name:"<< QLocale::system().nativeLanguageName();
qInfo()<< ""; qInfo()<< "";
qInfo()<< " System language defined in QET configuration:"<< QString(QETApp::langFromSetting().toLatin1()); qInfo()<< " System language defined in QET configuration:"<< QString(QETApp::langFromSetting().toLatin1());
@@ -188,7 +188,7 @@ void MachineInfo::send_info_to_debug()
QDirIterator it1(QETApp::commonElementsDir().toLatin1(),nameFilters, QDir::Files, QDirIterator::Subdirectories); QDirIterator it1(QETApp::commonElementsDir().toLatin1(),nameFilters, QDir::Files, QDirIterator::Subdirectories);
while (it1.hasNext()) while (it1.hasNext())
{ {
if(it1.next() > 0 ) if(it1.next() != "")
{ {
commomElementsDir ++; commomElementsDir ++;
} }
@@ -200,7 +200,7 @@ void MachineInfo::send_info_to_debug()
QDirIterator it2(QETApp::customElementsDir().toLatin1(), nameFilters, QDir::Files, QDirIterator::Subdirectories); QDirIterator it2(QETApp::customElementsDir().toLatin1(), nameFilters, QDir::Files, QDirIterator::Subdirectories);
while (it2.hasNext()) while (it2.hasNext())
{ {
if(it2.next() > 0 ) if(it2.next() != "")
{ {
customElementsDir ++; customElementsDir ++;
} }
@@ -211,7 +211,7 @@ void MachineInfo::send_info_to_debug()
QDirIterator it3(QETApp::companyElementsDir().toLatin1(), nameFilters, QDir::Files, QDirIterator::Subdirectories); QDirIterator it3(QETApp::companyElementsDir().toLatin1(), nameFilters, QDir::Files, QDirIterator::Subdirectories);
while (it3.hasNext()) while (it3.hasNext())
{ {
if(it3.next() > 0 ) if(it3.next() != "")
{ {
companyElementsDir ++; companyElementsDir ++;
} }

View File

@@ -23,7 +23,7 @@
#include "utils/qetsettings.h" #include "utils/qetsettings.h"
#include <QStyleFactory> #include <QStyleFactory>
#include <QtConcurrentRun> #include <QThreadPool>
/** /**
@brief myMessageOutput @brief myMessageOutput
@@ -216,7 +216,7 @@ QGuiApplication::setHighDpiScaleFactorRoundingPolicy(QetSettings::hdpiScaleFacto
QObject::connect(&app, &SingleApplication::receivedMessage, QObject::connect(&app, &SingleApplication::receivedMessage,
&qetapp, &QETApp::receiveMessage); &qetapp, &QETApp::receiveMessage);
QtConcurrent::run([=]() QThreadPool::globalInstance()->start([=]()
{ {
// for debugging // for debugging
qInstallMessageHandler(myMessageOutput); qInstallMessageHandler(myMessageOutput);

View File

@@ -44,17 +44,17 @@ QDomElement UserProperties::toXml(QDomDocument &xml_document) const
for (auto i = m_properties.begin(); i != m_properties.end(); ++i) for (auto i = m_properties.begin(); i != m_properties.end(); ++i)
{ {
auto type = i.value().type(); auto type = i.value().typeId();
switch(type) { switch(type) {
case QVariant::Type::String: case QMetaType::QString:
up.appendChild(QETXML::createXmlProperty(i.key(), i.value().toString())); break; up.appendChild(QETXML::createXmlProperty(i.key(), i.value().toString())); break;
case QVariant::Type::Int: case QMetaType::Int:
up.appendChild(QETXML::createXmlProperty(i.key(), i.value().toInt())); break; up.appendChild(QETXML::createXmlProperty(i.key(), i.value().toInt())); break;
case QVariant::Type::Double: case QMetaType::Double:
up.appendChild(QETXML::createXmlProperty(i.key(), i.value().toDouble())); break; up.appendChild(QETXML::createXmlProperty(i.key(), i.value().toDouble())); break;
case QVariant::Type::Bool: case QMetaType::Bool:
up.appendChild(QETXML::createXmlProperty(i.key(), i.value().toBool())); break; up.appendChild(QETXML::createXmlProperty(i.key(), i.value().toBool())); break;
case QVariant::Type::Color: case QMetaType::QColor:
up.appendChild(QETXML::createXmlProperty(i.key(), QColor(i.value().value<QColor>()))); break; up.appendChild(QETXML::createXmlProperty(i.key(), QColor(i.value().value<QColor>()))); break;
default: default:
break; break;

View File

@@ -45,7 +45,7 @@
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#include <QProcessEnvironment> #include <QProcessEnvironment>
#include <QRegularExpression> #include <QRegularExpression>
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
# include <KAutoSaveFile> # include <KAutoSaveFile>
#endif #endif
@@ -222,6 +222,23 @@ void QETApp::setLanguage(const QString &desired_language) {
// load translations for the QET application // load translations for the QET application
// charge les traductions pour l'application QET // charge les traductions pour l'application QET
#ifdef QMFILES_AS_RESOURCE
if (!qetTranslator.load(QLocale(desired_language), "qet" "_", ":/lang")) {
/* in case of failure,
* we fall back on the native channels for French
* en cas d'echec,
* on retombe sur les chaines natives pour le francais
*/
if (desired_language != "fr") {
// use of the English version by default
// utilisation de la version anglaise par defaut
if(!qetTranslator.load(QLocale(desired_language), "qet", "_", ":/lang"))
qWarning() << "failed to load"
<< ":/lang/qet_en.qm" << "(" << __FILE__
<< __LINE__ << __FUNCTION__ << ")";
}
}
#else
if (!qetTranslator.load("qet_" + desired_language, languages_path)) { if (!qetTranslator.load("qet_" + desired_language, languages_path)) {
/* in case of failure, /* in case of failure,
* we fall back on the native channels for French * we fall back on the native channels for French
@@ -237,6 +254,8 @@ void QETApp::setLanguage(const QString &desired_language) {
<< __LINE__ << __FUNCTION__ << ")"; << __LINE__ << __FUNCTION__ << ")";
} }
} }
#endif
qInfo() << "Loaded language file:" << qetTranslator.filePath();
qApp->installTranslator(&qetTranslator); qApp->installTranslator(&qetTranslator);
QString ltr_special_string = tr( QString ltr_special_string = tr(
@@ -2368,7 +2387,7 @@ void QETApp::buildSystemTrayMenu()
*/ */
void QETApp::checkBackupFiles() void QETApp::checkBackupFiles()
{ {
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
return; return;
#else #else
QList<KAutoSaveFile *> stale_files = KAutoSaveFile::allStaleFiles(); QList<KAutoSaveFile *> stale_files = KAutoSaveFile::allStaleFiles();

View File

@@ -46,7 +46,7 @@
#include "ui/diagrameditorhandlersizewidget.h" #include "ui/diagrameditorhandlersizewidget.h"
#include "TerminalStrip/ui/addterminalstripitemdialog.h" #include "TerminalStrip/ui/addterminalstripitemdialog.h"
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
# include <KAutoSaveFile> # include <KAutoSaveFile>
#endif #endif
@@ -1892,7 +1892,7 @@ bool QETDiagramEditor::drawGrid() const
return m_draw_grid->isChecked(); return m_draw_grid->isChecked();
} }
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
/** /**
@brief QETDiagramEditor::openBackupFiles @brief QETDiagramEditor::openBackupFiles

View File

@@ -43,7 +43,7 @@ class DiagramPropertiesEditorDockWidget;
class ElementsCollectionWidget; class ElementsCollectionWidget;
class AutoNumberingDockWidget; class AutoNumberingDockWidget;
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
class KAutoSaveFile; class KAutoSaveFile;
#endif #endif
@@ -69,7 +69,7 @@ class QETDiagramEditor : public QETMainWindow
ProjectView *currentProjectView() const; ProjectView *currentProjectView() const;
QETProject *currentProject() const; QETProject *currentProject() const;
bool drawGrid() const; bool drawGrid() const;
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
void openBackupFiles (QList<KAutoSaveFile *> backup_files); void openBackupFiles (QList<KAutoSaveFile *> backup_files);
#endif #endif
@@ -195,7 +195,9 @@ class QETDiagramEditor : public QETMainWindow
*m_terminal_strip_dialog = nullptr, ///<Launch terminal strip dialog *m_terminal_strip_dialog = nullptr, ///<Launch terminal strip dialog
*m_project_terminalBloc, ///< generate terminal block *m_project_terminalBloc, ///< generate terminal block
*m_project_export_conductor_num,///<Export the wire num to csv *m_project_export_conductor_num,///<Export the wire num to csv
#ifdef QET_EXPORT_PROJECT_DB
*m_export_project_db, ///Export to file the internal database of the current project *m_export_project_db, ///Export to file the internal database of the current project
#endif
*m_tile_window, ///< Show MDI subwindows as tile *m_tile_window, ///< Show MDI subwindows as tile
*m_cascade_window, ///< Show MDI subwindows as cascade *m_cascade_window, ///< Show MDI subwindows as cascade
*m_previous_window, ///< Switch to the previous document *m_previous_window, ///< Switch to the previous document

View File

@@ -594,7 +594,7 @@ void QetShapeItem::addHandler()
{ {
m_handler_vector = QetGraphicsHandlerItem::handlerForPoint(mapToScene(points_vector), QETUtils::graphicsHandlerSize(this)); m_handler_vector = QetGraphicsHandlerItem::handlerForPoint(mapToScene(points_vector), QETUtils::graphicsHandlerSize(this));
for(const auto handler : qAsConst(m_handler_vector)) for(const auto handler : std::as_const(m_handler_vector))
{ {
handler->setZValue(this->zValue()+1); handler->setZValue(this->zValue()+1);
handler->setColor(Qt::blue); handler->setColor(Qt::blue);

View File

@@ -86,7 +86,7 @@ QETProject::QETProject(const QString &path, QObject *parent) :
init(); init();
} }
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
/** /**
@brief QETProject::QETProject @brief QETProject::QETProject
@@ -330,7 +330,7 @@ void QETProject::setFilePath(const QString &filepath)
if (filepath == m_file_path) { if (filepath == m_file_path) {
return; return;
} }
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
if (m_backup_file.isOpen()) { if (m_backup_file.isOpen()) {
m_backup_file.close(); m_backup_file.close();
@@ -1911,7 +1911,7 @@ NamesList QETProject::namesListForIntegrationCategory()
*/ */
void QETProject::writeBackup() void QETProject::writeBackup()
{ {
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
# if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove # if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
QDomDocument xml_project(toXml()); QDomDocument xml_project(toXml());
@@ -2077,7 +2077,7 @@ void QETProject::updateDiagramsFolioData()
} }
} }
for (const auto &diagram_ : qAsConst(m_diagrams_list)) { for (const auto &diagram_ : std::as_const(m_diagrams_list)) {
diagram_->update(); diagram_->update();
} }
} }

View File

@@ -29,7 +29,7 @@
#include "titleblock/templatescollection.h" #include "titleblock/templatescollection.h"
#include "titleblockproperties.h" #include "titleblockproperties.h"
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
# include <KAutoSaveFile> # include <KAutoSaveFile>
#endif #endif
@@ -47,7 +47,7 @@ class XmlElementCollection;
class QTimer; class QTimer;
class TerminalStrip; class TerminalStrip;
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
class KAutoSaveFile; class KAutoSaveFile;
#endif #endif
@@ -78,7 +78,7 @@ class QETProject : public QObject
public: public:
QETProject (QObject *parent = nullptr); QETProject (QObject *parent = nullptr);
QETProject (const QString &path, QObject * = nullptr); QETProject (const QString &path, QObject * = nullptr);
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
QETProject (KAutoSaveFile *backup, QObject *parent=nullptr); QETProject (KAutoSaveFile *backup, QObject *parent=nullptr);
#endif #endif
@@ -288,7 +288,7 @@ class QETProject : public QObject
bool m_freeze_new_conductors = false; bool m_freeze_new_conductors = false;
QTimer m_save_backup_timer, QTimer m_save_backup_timer,
m_autosave_timer; m_autosave_timer;
#ifdef BUILD_WITHOUT_KF5 #ifdef BUILD_WITHOUT_KF6
#else #else
KAutoSaveFile m_backup_file; KAutoSaveFile m_backup_file;
#endif #endif

View File

@@ -20,6 +20,8 @@
#include <QDomElement> #include <QDomElement>
#include <QPen> #include <QPen>
#include <QUuid>
class QDomDocument; class QDomDocument;
class QDir; class QDir;

View File

@@ -89,18 +89,6 @@ void QGIManager::release(const QList<QGraphicsItem *> &qgis) {
foreach(QGraphicsItem *qgi, qgis) release(qgi); foreach(QGraphicsItem *qgi, qgis) release(qgi);
} }
void QGIManager::manage(const QVector<QGraphicsItem *> &items) {
for (const auto &qgi : items) {
manage(qgi);
}
}
void QGIManager::release(const QVector<QGraphicsItem *> &items) {
for (const auto &qgi : items) {
release(qgi);
}
}
/** /**
Indique au QGIManager de detruire les QGraphicsItem restants lors de sa Indique au QGIManager de detruire les QGraphicsItem restants lors de sa
destruction si ceux-ci n'appartiennent pas a la scene destruction si ceux-ci n'appartiennent pas a la scene

View File

@@ -45,12 +45,8 @@ class QGIManager {
public: public:
void manage(QGraphicsItem *); void manage(QGraphicsItem *);
void release(QGraphicsItem *); void release(QGraphicsItem *);
QT_DEPRECATED_X("Use QGIManager::manage(const QVector<QGraphicsItem *> &) instead") void manage(const QList<QGraphicsItem *> &);
void manage(const QList<QGraphicsItem *> &); void release(const QList<QGraphicsItem *> &);
QT_DEPRECATED_X("Use QGIManager::release(const QVector<QGraphicsItem *> &) instead")
void release(const QList<QGraphicsItem *> &);
void manage(const QVector<QGraphicsItem *> &items);
void release(const QVector<QGraphicsItem *> &items);
void setDestroyQGIOnDelete(bool); void setDestroyQGIOnDelete(bool);
bool manages(QGraphicsItem *) const; bool manages(QGraphicsItem *) const;
}; };

View File

@@ -33,7 +33,7 @@ RecentFiles::RecentFiles(const QString &identifier, int size, QObject *parent) :
menu_(nullptr) menu_(nullptr)
{ {
mapper_ = new QSignalMapper(this); mapper_ = new QSignalMapper(this);
connect(mapper_, SIGNAL(mapped(const QString &)), this, SLOT(handleMenuRequest(const QString &))); connect(mapper_, &QSignalMapper::mappedString, this, &RecentFiles::handleMenuRequest);
extractFilesFromSettings(); extractFilesFromSettings();
buildMenu(); buildMenu();

View File

@@ -454,7 +454,7 @@ QDomElement TitleBlockTemplatesFilesCollection::getTemplateXmlDescription(const
} }
QDomDocument *xml_document = new QDomDocument(); QDomDocument *xml_document = new QDomDocument();
bool xml_parsing = xml_document -> setContent(&xml_file); bool xml_parsing = (bool)xml_document -> setContent(&xml_file);
if (!xml_parsing) { if (!xml_parsing) {
delete xml_document; delete xml_document;
return(QDomElement()); return(QDomElement());

View File

@@ -19,6 +19,8 @@
#define TITLEBLOCK_SLASH_TEMPLATE_VIEW_H #define TITLEBLOCK_SLASH_TEMPLATE_VIEW_H
#include "../titleblocktemplate.h" #include "../titleblocktemplate.h"
#include <QGraphicsGridLayout>
#include <QGraphicsLayoutItem>
#include <QGraphicsView> #include <QGraphicsView>
class HelperCell; class HelperCell;
class SplittedHelperCell; class SplittedHelperCell;

View File

@@ -103,7 +103,7 @@ bool TitleBlockTemplate::loadFromXmlFile(const QString &filepath) {
// parse its content as XML // parse its content as XML
QDomDocument xml_doc; QDomDocument xml_doc;
bool xml_parsing = xml_doc.setContent(&template_file); bool xml_parsing = (bool)xml_doc.setContent(&template_file);
if (!xml_parsing) { if (!xml_parsing) {
return(false); return(false);
} }

View File

@@ -203,7 +203,7 @@ void ElementInfoWidget::buildInterface()
*/ */
ElementInfoPartWidget *ElementInfoWidget::infoPartWidgetForKey(const QString &key) const ElementInfoPartWidget *ElementInfoWidget::infoPartWidgetForKey(const QString &key) const
{ {
for (const auto &eipw : qAsConst(m_eipw_list)) for (const auto &eipw : std::as_const(m_eipw_list))
{ {
if (eipw->key() == key) if (eipw->key() == key)
return eipw; return eipw;
@@ -245,7 +245,7 @@ DiagramContext ElementInfoWidget::currentInfo() const
{ {
DiagramContext info_; DiagramContext info_;
for (const auto &eipw : qAsConst(m_eipw_list)) for (const auto &eipw : std::as_const(m_eipw_list))
{ {
//add value only if they're something to store //add value only if they're something to store

View File

@@ -504,7 +504,7 @@ void ShapeGraphicsItemPropertiesWidget::setUpEditConnection()
void ShapeGraphicsItemPropertiesWidget::clearEditConnection() void ShapeGraphicsItemPropertiesWidget::clearEditConnection()
{ {
for (const auto &c : qAsConst(m_edit_connection)) { for (const auto &c : std::as_const(m_edit_connection)) {
disconnect(c); disconnect(c);
} }
m_edit_connection.clear(); m_edit_connection.clear();

View File

@@ -139,7 +139,7 @@ void MoveGraphicsItemCommand::move(const QPointF &movement)
} }
//Move some conductors //Move some conductors
for (const auto &conductor : qAsConst(m_content.m_conductors_to_move)) { for (const auto &conductor : std::as_const(m_content.m_conductors_to_move)) {
setupAnimation(conductor, setupAnimation(conductor,
"pos", "pos",
conductor->pos(), conductor->pos(),
@@ -147,7 +147,7 @@ void MoveGraphicsItemCommand::move(const QPointF &movement)
} }
//Recalculate the path of other conductors //Recalculate the path of other conductors
for (const auto &conductor : qAsConst(m_content.m_conductors_to_update)) { for (const auto &conductor : std::as_const(m_content.m_conductors_to_update)) {
setupAnimation(conductor, "animPath", 1, 1); setupAnimation(conductor, "animPath", 1, 1);
} }
} }

View File

@@ -40,31 +40,15 @@ if(NOT DEFINED QET_COMPONENTS)
message(".. QET_COMPONENTS is not set !!! I set them up !!!") message(".. QET_COMPONENTS is not set !!! I set them up !!!")
include(../../cmake/qet_compilation_vars.cmake) include(../../cmake/qet_compilation_vars.cmake)
endif() endif()
if(NOT DEFINED QT_VERSION_MAJOR) find_package(Qt6 REQUIRED COMPONENTS ${QET_COMPONENTS})
find_package( message(".. Qt version :" ${Qt6_VERSION})
QT
NAMES
Qt6
Qt5
COMPONENTS
${QET_COMPONENTS}
REQUIRED
)
endif()
message(".. QT_VERSION_MAJOR :" ${QT_VERSION_MAJOR})
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS
${QET_COMPONENTS}
REQUIRED)
Include(FetchContent) Include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
Catch2 Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.1) GIT_TAG v3.7.0)
FetchContent_MakeAvailable(Catch2) FetchContent_MakeAvailable(Catch2)
@@ -88,7 +72,7 @@ target_link_libraries(
PUBLIC PUBLIC
Catch2::Catch2 Catch2::Catch2
PRIVATE PRIVATE
${KF5_PRIVATE_LIBRARIES} ${KF6_PRIVATE_LIBRARIES}
${QET_PRIVATE_LIBRARIES}) ${QET_PRIVATE_LIBRARIES})
if (DEFINED ENV{CATCH_INCLUDE_DIR}) if (DEFINED ENV{CATCH_INCLUDE_DIR})

View File

@@ -1,6 +1,6 @@
#define CATCH_CONFIG_RUNNER #define CATCH_CONFIG_RUNNER
#include <QtGui/QGuiApplication> #include <QtGui/QGuiApplication>
#include <catch2/catch.hpp> #include <catch2/catch_all.hpp>
int main(int argc, char** argv) int main(int argc, char** argv)
{ {

View File

@@ -1,6 +1,6 @@
#include "../../../sources/borderproperties.h" #include "../../../sources/borderproperties.h"
#include <catch2/catch.hpp> #include <catch2/catch_all.hpp>
TEST_CASE("BorderProperties") TEST_CASE("BorderProperties")
{ {

View File

@@ -1,6 +1,6 @@
#include "../../../sources/qet.h" #include "../../../sources/qet.h"
#include <catch2/catch.hpp> #include <catch2/catch_all.hpp>
TEST_CASE("qet stringToFileName") TEST_CASE("qet stringToFileName")
{ {

View File

@@ -1,3 +1,3 @@
#include <catch2/catch.hpp> #include <catch2/catch_all.hpp>
TEST_CASE("My first test with Catch2", "[fancy]") { REQUIRE(0 == 0); } TEST_CASE("My first test with Catch2", "[fancy]") { REQUIRE(0 == 0); }

View File

@@ -40,31 +40,15 @@ if(NOT DEFINED QET_COMPONENTS)
message(".. QET_COMPONENTS is not set !!! I set them up !!!") message(".. QET_COMPONENTS is not set !!! I set them up !!!")
include(../../cmake/qet_compilation_vars.cmake) include(../../cmake/qet_compilation_vars.cmake)
endif() endif()
if(NOT DEFINED QT_VERSION_MAJOR) find_package(Qt6 REQUIRED COMPONENTS ${QET_COMPONENTS})
find_package( message(".. Qt version :" ${Qt6_VERSION})
QT
NAMES
Qt6
Qt5
COMPONENTS
${QET_COMPONENTS}
REQUIRED
)
endif()
message(".. QT_VERSION_MAJOR :" ${QT_VERSION_MAJOR})
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS
${QET_COMPONENTS}
REQUIRED)
Include(FetchContent) Include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
GTest GTest
GIT_REPOSITORY https://github.com/google/googletest.git GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.10.0) GIT_TAG v1.15.2)
FetchContent_MakeAvailable(GTest) FetchContent_MakeAvailable(GTest)
@@ -85,6 +69,6 @@ target_link_libraries(
PUBLIC PUBLIC
gmock gmock_main gmock gmock_main
PRIVATE PRIVATE
${KF5_PRIVATE_LIBRARIES} ${KF6_PRIVATE_LIBRARIES}
${QET_PRIVATE_LIBRARIES}) ${QET_PRIVATE_LIBRARIES})

View File

@@ -40,31 +40,15 @@ if(NOT DEFINED QET_COMPONENTS)
message(".. QET_COMPONENTS is not set !!! I set them up !!!") message(".. QET_COMPONENTS is not set !!! I set them up !!!")
include(../../cmake/qet_compilation_vars.cmake) include(../../cmake/qet_compilation_vars.cmake)
endif() endif()
if(NOT DEFINED QT_VERSION_MAJOR) find_package(Qt6 REQUIRED COMPONENTS ${QET_COMPONENTS})
find_package( message(".. Qt version :" ${Qt6_VERSION})
QT
NAMES
Qt6
Qt5
COMPONENTS
${QET_COMPONENTS}
REQUIRED
)
endif()
message(".. QT_VERSION_MAJOR :" ${QT_VERSION_MAJOR})
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS
${QET_COMPONENTS}
REQUIRED)
Include(FetchContent) Include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
GTest GTest
GIT_REPOSITORY https://github.com/google/googletest.git GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.10.0) GIT_TAG v1.15.2)
FetchContent_MakeAvailable(GTest) FetchContent_MakeAvailable(GTest)
@@ -84,6 +68,6 @@ target_link_libraries(
PUBLIC PUBLIC
gtest gtest_main gtest gtest_main
PRIVATE PRIVATE
${KF5_PRIVATE_LIBRARIES} ${KF6_PRIVATE_LIBRARIES}
${QET_PRIVATE_LIBRARIES}) ${QET_PRIVATE_LIBRARIES})

View File

@@ -40,26 +40,8 @@ if(NOT DEFINED QET_COMPONENTS)
message(".. QET_COMPONENTS is not set !!! I set them up !!!") message(".. QET_COMPONENTS is not set !!! I set them up !!!")
include(../../cmake/qet_compilation_vars.cmake) include(../../cmake/qet_compilation_vars.cmake)
endif() endif()
if(NOT DEFINED QT_VERSION_MAJOR) find_package(Qt6 REQUIRED COMPONENTS Test ${QET_COMPONENTS})
find_package( message(".. Qt version :" ${Qt6_VERSION})
QT
NAMES
Qt6
Qt5
COMPONENTS
${QET_COMPONENTS}
Test
REQUIRED
)
endif()
message(".. QT_VERSION_MAJOR :" ${QT_VERSION_MAJOR})
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS
${QET_COMPONENTS}
Test
REQUIRED)
include(../../cmake/fetch_kdeaddons.cmake) include(../../cmake/fetch_kdeaddons.cmake)
include(../../cmake/fetch_singleapplication.cmake) include(../../cmake/fetch_singleapplication.cmake)
@@ -74,6 +56,6 @@ target_link_libraries(
${PROJECT_NAME} ${PROJECT_NAME}
PRIVATE PRIVATE
Qt::Test Qt::Test
${KF5_PRIVATE_LIBRARIES} ${KF6_PRIVATE_LIBRARIES}
${QET_PRIVATE_LIBRARIES}) ${QET_PRIVATE_LIBRARIES})