Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some preparations for KDE6/QT6 #240

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-zero-as-null-pointer-constant")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override")

set(QT_DEFINITIONS "${Qt5Core_DEFINITIONS} ${Qt5Gui_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}")
add_definitions(${QT_DEFINITIONS} )

include_directories(${QT_INCLUDES} src)
include_directories( /usr/include/${AKO_PREFIX}/AkonadiCore )
include_directories(/usr/include/${AKO_PREFIX}/)

if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
ki18n_install(po)
endif()
Expand Down
2 changes: 1 addition & 1 deletion meta/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
########### install files ###############

install(FILES kraft.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} RENAME de.volle_kraft_voraus.kraft.desktop)
install(FILES kraft.desktop DESTINATION ${KDE_INSTALL_APPDIR} RENAME de.volle_kraft_voraus.kraft.desktop)
install(FILES kraft.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} RENAME de.volle_kraft_voraus.kraft.appdata.xml)
10 changes: 5 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
include_directories(${QT_INCLUDES} src)

add_subdirectory(pics)

configure_file(${CMAKE_CURRENT_LIST_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)

########### next target ###############
qt5_add_resources(KRAFT_RC_SRC pics/kraft.qrc)

set(kraft_SRCS
attribute.cpp
einheit.cpp
Expand Down Expand Up @@ -125,6 +123,8 @@ set(kraft_SRCS
docidentgenerator.cpp
myidentity.cpp
3rdparty/qrcodegen.cpp

pics/kraft.qrc
)

kconfig_add_kcfg_files(kraft_SRCS
Expand Down Expand Up @@ -189,7 +189,7 @@ if(${AKO_PREFIX}Akonadi_FOUND)
)
endif()

add_library(kraftlib STATIC ${KRAFT_RC_SRC} ${kraft_SRCS})
add_library(kraftlib STATIC ${kraft_SRCS})
target_compile_options(kraftlib PRIVATE -Wall -Wno-suggest-override)

add_executable(kraft main.cpp)
Expand All @@ -210,5 +210,5 @@ install(TARGETS kraft ${INSTALL_TARGETS_DEFAULT_ARGS})

########### install files ###############

install(FILES kraftsettings.kcfg databasesettings.kcfg DESTINATION ${KCFG_INSTALL_DIR})
install(FILES kraftsettings.kcfg databasesettings.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install(FILES kraftui.rc katalogview.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kraft)
9 changes: 1 addition & 8 deletions src/addressprovider_akonadi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,8 @@
#include <QDebug>

#ifdef HAVE_AKONADI
#include <akonadi_version.h>

#if AKONADI_VERSION >= QT_VERSION_CHECK(5,20,0)
#include <AkonadiContact/akonadi-contact_version.h>
#else
#define AKONADICONTACT_VERSION AKONADI_VERSION
#endif
#if AKONADICONTACT_VERSION >= QT_VERSION_CHECK(5, 20, 0)
#include <AkonadiContact/akonadi/contactsearchjob.h>
#include <akonadi/contactsearchjob.h>
#else
#include <akonadi/contact/contactsearchjob.h>
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/addressprovider_akonadi.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
#include <akonadi_version.h>

#if AKONADI_VERSION >= QT_VERSION_CHECK(5,20,0)
#include <AkonadiContact/akonadi-contact_version.h>
#include <akonadi-contact_version.h>
#else
#define AKONADICONTACT_VERSION AKONADI_VERSION
#endif
#if AKONADICONTACT_VERSION >= QT_VERSION_CHECK(5, 20, 0)
#include <AkonadiContact/akonadi/contactstreemodel.h>
#include <akonadi/contactstreemodel.h>
#else
#include <akonadi/contact/contactstreemodel.h>
#endif
Expand Down
6 changes: 3 additions & 3 deletions src/addressselectorwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
#include <akonadi_version.h>

#if AKONADI_VERSION >= QT_VERSION_CHECK(5,20,0)
#include <AkonadiContact/akonadi-contact_version.h>
#include <akonadi-contact_version.h>
#else
#define AKONADICONTACT_VERSION AKONADI_VERSION
#endif
#if AKONADICONTACT_VERSION >= QT_VERSION_CHECK(5, 24, 0)
#include <AkonadiContactEditor/Akonadi/ContactViewer>
#include <AkonadiContactEditor/Akonadi/ContactEditorDialog>
#include <Akonadi/ContactViewer>
#include <Akonadi/ContactEditorDialog>
#elif AKONADICONTACT_VERSION >= QT_VERSION_CHECK(5, 20, 0)
#include <AkonadiContact/Akonadi/ContactViewer>
#include <AkonadiContact/Akonadi/ContactEditorDialog>
Expand Down
1 change: 1 addition & 0 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set(AUTOMOC ON)
if(${AKO_PREFIX}Akonadi_FOUND)
add_executable(${findcontact_NAME} ${FINDCONTACT_SRC})

target_include_directories(${findcontact_NAME} PRIVATE ../src)
target_link_libraries( ${findcontact_NAME}
Qt5::Core
Qt5::Widgets
Expand Down