Commit 8105b2e5 authored by Kevin Funk's avatar Kevin Funk
Browse files

Always make libkdepim a required depencency

KPIM::KCheckComboBox is used throughout the code base, which makes it
difficult to make this optional.

Note: This only affects behavior on Windows. On Linux this was required
before already.
parent ab01f184
......@@ -78,12 +78,12 @@ find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
find_package(KF5Contacts ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarCore ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED) # Because of KPIM::KCheckComboBox, KPIM::UiStateSaver
if (NOT WIN32)
find_package(KF5AkonadiContact ${AKONADI_CONTACT_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarSupport ${CALENDARSUPPORT_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5MessageViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5AkonadiSearch ${AKONADI_SEARCH_VERSION} CONFIG REQUIRED)
find_package(Xapian CONFIG)
......@@ -93,7 +93,6 @@ if (NOT WIN32)
TYPE REQUIRED
)
set(ENABLE_LIBKDEPIM TRUE)
set(ENABLE_SEARCH TRUE)
set(ENABLE_CONTENTVIEWS TRUE)
endif()
......
#cmakedefine ENABLE_LIBKDEPIM 1
#cmakedefine ENABLE_SEARCH 1
#cmakedefine ENABLE_CONTENTVIEWS 1
......@@ -114,6 +114,7 @@ target_link_libraries(libakonadiconsole
KF5::ItemViews
KF5::TextWidgets
KF5::XmlGui
KF5::Libkdepim
)
if (ENABLE_SEARCH)
......@@ -131,12 +132,6 @@ if (ENABLE_CONTENTVIEWS)
)
endif()
if (ENABLE_LIBKDEPIM)
target_link_libraries(libakonadiconsole
KF5::Libkdepim
)
endif()
set_target_properties(libakonadiconsole
PROPERTIES OUTPUT_NAME akonadiconsole
VERSION ${KDEPIM_LIB_VERSION}
......
......@@ -22,9 +22,7 @@
#include "mainwindow.h"
#include "config-akonadiconsole.h"
#ifdef ENABLE_LIBKDEPIM
#include <Libkdepim/UiStateSaver>
#endif
#include <KActionCollection>
#include <KConfigGroup>
......@@ -42,9 +40,7 @@ MainWindow::MainWindow(QWidget *parent)
KStandardAction::quit(qApp, &QApplication::quit, actionCollection());
setupGUI(Keys /*| ToolBar | StatusBar*/ | Save | Create, QStringLiteral("akonadiconsoleui.rc"));
#ifdef ENABLE_LIBKDEPIM
KPIM::UiStateSaver::restoreState(this, KConfigGroup(KSharedConfig::openConfig(), "UiState"));
#endif
KMessageBox::information(this, QStringLiteral("<p>Akonadi Console is purely a development tool. "
"It allows you to view and change internal data structures of Akonadi. "
"You should only change data in here if you know what you are doing, otherwise "
......@@ -60,10 +56,8 @@ MainWindow::~MainWindow()
void MainWindow::closeEvent(QCloseEvent *event)
{
#ifdef ENABLE_LIBKDEPIM
KConfigGroup config(KSharedConfig::openConfig(), "UiState");
KPIM::UiStateSaver::saveState(this, config);
KSharedConfig::openConfig()->sync();
#endif
KXmlGuiWindow::closeEvent(event);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment