diff --git a/CMakeLists.txt b/CMakeLists.txt index ac175de10..58f99492a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,9 +36,6 @@ if(NEOCHAT_FLATPAK) include(cmake/Flatpak.cmake) endif() -# Fix a crash due to problems with quotient's event system. Can probably be removed once the reworked event system is in -cmake_policy(SET CMP0063 OLD) - ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX NEOCHAT VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/neochat-version.h @@ -115,6 +112,10 @@ find_package(QCoro REQUIRED) qcoro_enable_coroutines() +if(NOT Quotient_VERSION_MINOR GREATER 6) + cmake_policy(SET CMP0063 OLD) +endif() + if(ANDROID) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/android/version.gradle.in ${CMAKE_BINARY_DIR}/version.gradle) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a1551c95d..7ad3c885d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -42,7 +42,7 @@ add_executable(neochat if(Quotient_VERSION_MINOR GREATER 6) target_compile_definitions(neochat PRIVATE QUOTIENT_07) else() - target_sources(neochat PRIVATE accountregistry.cpp) + target_sources(neochat PRIVATE neochataccountregistry.cpp) endif() ecm_add_app_icon(NEOCHAT_ICON ICONS ${CMAKE_SOURCE_DIR}/128-logo.png) diff --git a/src/controller.cpp b/src/controller.cpp index 1c46ba3a5..629f84103 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -34,7 +34,12 @@ #include +#ifdef QUOTIENT_07 #include "accountregistry.h" +#else +#include "neochataccountregistry.h" +#endif + #include "csapi/account-data.h" #include "csapi/content-repo.h" #include "csapi/joining.h" diff --git a/src/main.cpp b/src/main.cpp index 4d6165a2d..d0970694d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,7 +32,12 @@ #include "neochat-version.h" +#ifdef QUOTIENT_07 #include "accountregistry.h" +#else +#include "neochataccountregistry.h" +#endif + #include "actionshandler.h" #include "blurhashimageprovider.h" #include "chatboxhelper.h" diff --git a/src/accountregistry.cpp b/src/neochataccountregistry.cpp similarity index 98% rename from src/accountregistry.cpp rename to src/neochataccountregistry.cpp index b87587700..573761f3e 100644 --- a/src/accountregistry.cpp +++ b/src/neochataccountregistry.cpp @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Tobias Fella // SPDX-License-Identifier: LGPL-2.1-or-later -#include "accountregistry.h" +#include "neochataccountregistry.h" #include "connection.h" diff --git a/src/accountregistry.h b/src/neochataccountregistry.h similarity index 100% rename from src/accountregistry.h rename to src/neochataccountregistry.h