Commit 74b8d45e authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Use cmakedefine01

This way we get a build time warning if the var isn't defined at all, e.g.
a missing check_include_files() CMake call.
parent f3a8871c
Pipeline #188817 passed with stage
in 1 minute and 19 seconds
#cmakedefine ENABLE_SEARCH 1
#cmakedefine ENABLE_CONTENTVIEWS 1
#cmakedefine01 ENABLE_SEARCH
#cmakedefine01 ENABLE_CONTENTVIEWS
......@@ -64,7 +64,7 @@
#include <QTimer>
#include <QVBoxLayout>
#ifdef ENABLE_CONTENTVIEWS
#if ENABLE_CONTENTVIEWS
#include <Akonadi/ContactGroupViewer>
#include <Akonadi/ContactViewer>
#include <CalendarSupport/IncidenceViewer>
......@@ -195,7 +195,7 @@ BrowserWidget::BrowserWidget(KXmlGuiWindow *xmlGuiWindow, QWidget *parent)
connect(contentUi.saveButton, &QPushButton::clicked, this, &BrowserWidget::save);
splitter3->addWidget(contentViewParent);
#ifdef ENABLE_CONTENTVIEWS
#if ENABLE_CONTENTVIEWS
auto w = new QWidget;
w->setLayout(new QVBoxLayout);
w->layout()->addWidget(mContactView = new Akonadi::ContactViewer);
......@@ -308,7 +308,7 @@ void BrowserWidget::contentViewChanged()
void BrowserWidget::setItem(const Akonadi::Item &item)
{
mCurrentItem = item;
#ifdef ENABLE_CONTENTVIEWS
#if ENABLE_CONTENTVIEWS
if (item.hasPayload<KContacts::Addressee>()) {
mContactView->setItem(item);
contentUi.stack->setCurrentWidget(mContactView->parentWidget());
......
......@@ -13,7 +13,7 @@
#include "dbbrowser.h"
#include "dbconsole.h"
#include "debugwidget.h"
#ifdef ENABLE_SEARCH
#if ENABLE_SEARCH
#include "searchwidget.h"
#endif
#include "jobtrackerwidget.h"
......@@ -56,7 +56,7 @@ MainWidget::MainWidget(KXmlGuiWindow *parent)
tabWidget->addTab(new JobTrackerWidget("resourcesJobtracker", tabWidget, QStringLiteral("Enable tracking of Resource Schedulers")),
QStringLiteral("Resources Schedulers"));
tabWidget->addTab(new NotificationMonitor(tabWidget), QStringLiteral("Notification Monitor"));
#ifdef ENABLE_SEARCH
#if ENABLE_SEARCH
tabWidget->addTab(new SearchWidget(tabWidget), QStringLiteral("Item Search"));
#endif
tabWidget->addTab(new MonitorsWidget(tabWidget), QStringLiteral("Monitors"));
......
Supports Markdown
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