From 2b20232384a101b81f17e64b464803a15c20c725 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Sun, 27 Jul 2025 17:41:20 +0300 Subject: [PATCH] Windows build has been fixed --- .idea/misc.xml | 3 +++ .idea/vcs.xml | 1 - limereport/limereport.pri | 14 +++++++++++--- limereport/limereport.pro | 6 ++++++ limereport/scripteditor/lrcompletermodel.cpp | 4 ++-- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 79b3c94..0b76fe5 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,7 @@ + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 15885cc..94a25f7 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,6 +2,5 @@ - \ No newline at end of file diff --git a/limereport/limereport.pri b/limereport/limereport.pri index 8efae19..0fa32d9 100644 --- a/limereport/limereport.pri +++ b/limereport/limereport.pri @@ -221,11 +221,19 @@ system("git --version") { } VERSION_TEMPLATE = $$PWD/version.h.in +VERSION_OUTPUT = $$OUT_PWD/version.h + +defineReplace(generateHeader){ + VERSION_TEMPLATE = $$1 + OUTPUT_FILE = $$2 + LINES = $$cat($$VERSION_TEMPLATE, lines) + LINES = $$replace(LINES, @GIT_VERSION@, $$LR_VERSION) + system(echo '// Auto generated version header' > $$OUTPUT_FILE) + for (a, LINES): system(echo '$${a}' >> $$OUTPUT_FILE) +} generateversion.depends = FORCE -generateversion.input = VERSION_TEMPLATE -generateversion.output = $$OUT_PWD/version.h -generateversion.commands = $$QMAKE_STREAM_EDITOR \'s/@GIT_VERSION@/$$LR_VERSION/\' ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT} +generateversion.commands = $$generateHeader($$VERSION_TEMPLATE, $$VERSION_OUTPUT) generateversion.CONFIG = no_link target_predeps QMAKE_EXTRA_COMPILERS += generateversion diff --git a/limereport/limereport.pro b/limereport/limereport.pro index 61764ae..8e213d1 100644 --- a/limereport/limereport.pro +++ b/limereport/limereport.pro @@ -35,6 +35,12 @@ CONFIG(staticlib) { DEFINES -= LIMEREPORT_EXPORTS } +contains(CONFIG, x86_64) { + message(Цель: 64 бита) +} else { + message(Цель: 32 бита) +} + EXTRA_FILES += \ $$PWD/lrglobal.h \ $$PWD/lrdatasourceintf.h \ diff --git a/limereport/scripteditor/lrcompletermodel.cpp b/limereport/scripteditor/lrcompletermodel.cpp index 367aba4..e5e8d78 100644 --- a/limereport/scripteditor/lrcompletermodel.cpp +++ b/limereport/scripteditor/lrcompletermodel.cpp @@ -25,8 +25,8 @@ QModelIndex CompleterModel::index(int row, int column, const QModelIndex& parent QModelIndex CompleterModel::parent(const QModelIndex& child) const { if (child.isValid()) { - if (CompleterItem* childItem = static_cast(child.internalPointer()); - childItem) { + CompleterItem* childItem = static_cast(child.internalPointer()); + if (childItem) { CompleterItem* parentItem = childItem->parent(); if (parentItem != &m_root) { return indexFromItem(parentItem);