Commit b0d450ce authored by Laurent Montel's avatar Laurent Montel 😁

now akonadi-calendar/akonadi-contact compile fine

parent bb798659
......@@ -27,12 +27,13 @@ ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX AKONADICONTACT
########### Find packages ###########
find_package(KF5KDELibs4Support ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Abc ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarCore ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Completion ${KF5_VERSION} CONFIG REQUIRED)
#find_package(Phonon4Qt5 CONFIG REQUIRED)
if(${CMAKE_SOURCE_DIR} STREQUAL ${Akonadi-Contact_SOURCE_DIR})
find_package(KF5Akonadi CONFIG REQUIRED)
find_package(KF5Abc ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarCore ${KF5_VERSION} CONFIG REQUIRED)
endif()
########### Targets ###########
......
......@@ -4,11 +4,11 @@ kde_enable_exceptions()
remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)
find_package(Prison QUIET)
set_package_properties(Prison PROPERTIES DESCRIPTION "Prison" URL "http://projects.kde.org/prison" TYPE OPTIONAL PURPOSE "Needed to show mobile barcodes of your contacts")
#REACTIVATE
#find_package(Prison QUIET)
#set_package_properties(Prison PROPERTIES DESCRIPTION "Prison" URL "http://projects.kde.org/prison" TYPE OPTIONAL PURPOSE "Needed to show mobile barcodes of your contacts")
if (PRISON_FOUND)
add_definitions(-DHAVE_PRISON)
include_directories(${PRISON_INCLUDE_DIR})
endif()
set( AKONADI_PHONE_DIAL_DEFAULT "UseSkype" )
......@@ -123,36 +123,39 @@ generate_export_header(KF5AkonadiContact BASE_NAME akonadi-contact)
add_library(KF5::AkonadiContact ALIAS KF5AkonadiContact)
target_include_directories(KF5AkonadiContact INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}/AkonadiContact;${Boost_INCLUDE_DIR}>")
target_include_directories(KF5AkonadiContact PUBLIC "$<BUILD_INTERFACE:${Akonadi-Contact_SOURCE_DIR}/src;${Akonadi-Contact_BINARY_DIR}/src;${Boost_INCLUDE_DIR}>")
target_link_libraries(KF5AkonadiContact
KF5::KDELibs4Support
KF5::AkonadiCore
KF5::AkonadiWidgets
KF5::KIOCore
KF5::KDELibs4Support
KF5::KMime
KF5::CalendarCore
KF5::PimUtils
KF5::Completion
KF5::Abc
#Phonon::phonon4qt5
)
if (KDE4_BUILD_TESTS)
set(AKONADI_CONTACT_TESTS_EXPORT AKONADI_CONTACT_EXPORT)
endif()
#REACTIVE
#if (KDE4_BUILD_TESTS)
# set(AKONADI_CONTACT_TESTS_EXPORT AKONADI_CONTACT_EXPORT)
#endif()
configure_file(akonadi-contactprivate_export.h.in "${CMAKE_CURRENT_BINARY_DIR}/akonadi-contactprivate_export.h")
if (KDE4_BUILD_TESTS)
set(AKONADI_CONTACT_TESTS_EXPORT AKONADI_CONTACT_EXPORT)
endif()
#REACTIVATE
#if (KDE4_BUILD_TESTS)
# set(AKONADI_CONTACT_TESTS_EXPORT AKONADI_CONTACT_EXPORT)
#endif()
configure_file(akonadi-contactprivate_export.h.in
"${CMAKE_CURRENT_BINARY_DIR}/akonadi-contactprivate_export.h"
)
if(PRISON_FOUND)
target_link_libraries(KF5AkonadiContact ${PRISON_LIBRARIES})
#target_link_libraries(KF5AkonadiContact ${PRISON_LIBRARIES})
endif()
set_target_properties(KF5AkonadiContact PROPERTIES
......@@ -239,3 +242,4 @@ install( FILES
editor/im/improtocols.h
DESTINATION ${INCLUDE_INSTALL_DIR}/akonadi/contact COMPONENT Devel
)
......@@ -21,7 +21,7 @@
#include "abstractcontactformatter.h"
#include <AkonadiCore/item.h>
#include <item.h>
#include <kabc/addressee.h>
using namespace Akonadi;
......
......@@ -21,7 +21,7 @@
#include "abstractcontactgroupformatter.h"
#include <AkonadiCore/item.h>
#include <item.h>
#include <kabc/contactgroup.h>
using namespace Akonadi;
......
......@@ -21,7 +21,7 @@
#include "contactmetadataattribute_p.h"
#include <AkonadiCore/attributefactory.h>
#include <attributefactory.h>
namespace {
......
......@@ -21,7 +21,7 @@
#include "collectionfiltermodel_p.h"
#include <AkonadiCore/entitytreemodel.h>
#include <entitytreemodel.h>
CollectionFilterModel::CollectionFilterModel( QObject *parent )
: QSortFilterProxyModel( parent ), mRights( Akonadi::Collection::ReadOnly )
......
......@@ -24,7 +24,7 @@
#include <QSortFilterProxyModel>
#include <AkonadiCore/collection.h>
#include <collection.h>
/**
* @short A filter model for Akonadi collections.
......
......@@ -21,10 +21,10 @@
#include "contactcompletionmodel_p.h"
#include <AkonadiCore/changerecorder.h>
#include <AkonadiCore/entitymimetypefiltermodel.h>
#include <AkonadiCore/itemfetchscope.h>
#include <AkonadiCore/session.h>
#include <changerecorder.h>
#include <entitymimetypefiltermodel.h>
#include <itemfetchscope.h>
#include <session.h>
#include <kabc/addressee.h>
......
......@@ -22,7 +22,7 @@
#ifndef AKONADI_CONTACTCOMPLETIONMODEL_P_H
#define AKONADI_CONTACTCOMPLETIONMODEL_P_H
#include <AkonadiCore/entitytreemodel.h>
#include <entitytreemodel.h>
namespace Akonadi {
......
......@@ -27,14 +27,14 @@
#include "contactmetadataattribute_p.h"
#include "editor/contacteditorwidget.h"
#include <AkonadiWidgets/collectiondialog.h>
#include <AkonadiCore/collectionfetchjob.h>
#include <AkonadiCore/itemcreatejob.h>
#include <AkonadiCore/itemfetchjob.h>
#include <AkonadiCore/itemfetchscope.h>
#include <AkonadiCore/itemmodifyjob.h>
#include <AkonadiCore/monitor.h>
#include <AkonadiCore/session.h>
#include <collectiondialog.h>
#include <collectionfetchjob.h>
#include <itemcreatejob.h>
#include <itemfetchjob.h>
#include <itemfetchscope.h>
#include <itemmodifyjob.h>
#include <monitor.h>
#include <session.h>
#include <kabc/addressee.h>
#include <klocalizedstring.h>
......
......@@ -23,8 +23,8 @@
#include "contacteditor.h"
#include <AkonadiWidgets/collectioncombobox.h>
#include <AkonadiCore/item.h>
#include <collectioncombobox.h>
#include <item.h>
#include <kabc/addressee.h>
......
......@@ -27,14 +27,14 @@
#include "contactgroupeditordelegate_p.h"
#include "waitingoverlay_p.h"
#include <AkonadiCore/collectiondialog.h>
#include <AkonadiCore/collectionfetchjob.h>
#include <AkonadiCore/itemcreatejob.h>
#include <AkonadiCore/itemfetchjob.h>
#include <AkonadiCore/itemfetchscope.h>
#include <AkonadiCore/itemmodifyjob.h>
#include <akonadi/monitor.h>
#include <AkonadiCore/session.h>
#include <collectiondialog.h>
#include <collectionfetchjob.h>
#include <itemcreatejob.h>
#include <itemfetchjob.h>
#include <itemfetchscope.h>
#include <itemmodifyjob.h>
#include <monitor.h>
#include <session.h>
#include <kabc/contactgroup.h>
#include <klocalizedstring.h>
#include <klineedit.h>
......
......@@ -26,8 +26,8 @@
#include "ui_contactgroupeditor.h"
#include <AkonadiCore/collection.h>
#include <AkonadiCore/item.h>
#include <collection.h>
#include <item.h>
class KJob;
......
......@@ -24,7 +24,7 @@
#include "contactcompletionmodel_p.h"
#include "contactgroupmodel_p.h"
#include <AkonadiCore/entitytreemodel.h>
#include <entitytreemodel.h>
#include <kcombobox.h>
#include <kicon.h>
#include <klocalizedstring.h>
......
......@@ -26,7 +26,7 @@
#include <QStyledItemDelegate>
#include <AkonadiCore/item.h>
#include <item.h>
namespace Akonadi
{
......
......@@ -24,8 +24,8 @@
#include "contactgroupeditor.h"
#include "contactgroupeditor_p.h"
#include <akonadi/collectioncombobox.h>
#include <AkonadiCore/item.h>
#include <collectioncombobox.h>
#include <item.h>
#include <kabc/contactgroup.h>
#include <klocale.h>
#include <klocalizedstring.h>
......
......@@ -21,10 +21,10 @@
#include "contactgroupexpandjob.h"
#include <akonadi/contact/contactgroupsearchjob.h>
#include <AkonadiCore/itemfetchjob.h>
#include <AkonadiCore/itemfetchscope.h>
#include <akonadi/itemsearchjob.h>
#include <contactgroupsearchjob.h>
#include <itemfetchjob.h>
#include <itemfetchscope.h>
#include <itemsearchjob.h>
using namespace Akonadi;
......
......@@ -23,9 +23,9 @@
#include "contactcompletionmodel_p.h"
#include <AkonadiCore/entitytreemodel.h>
#include <AkonadiCore/itemfetchjob.h>
#include <AkonadiCore/itemfetchscope.h>
#include <entitytreemodel.h>
#include <itemfetchjob.h>
#include <itemfetchscope.h>
#include <klocalizedstring.h>
#include <QtCore/QAbstractItemModel>
......
......@@ -22,7 +22,7 @@
#ifndef AKONADI_CONTACTGROUPLINEEDIT_P_H
#define AKONADI_CONTACTGROUPLINEEDIT_P_H
#include <AkonadiCore/item.h>
#include <item.h>
#include <kabc/addressee.h>
#include <kabc/contactgroup.h>
#include <klineedit.h>
......
......@@ -21,8 +21,8 @@
#include "contactgroupmodel_p.h"
#include <AkonadiCore/itemfetchjob.h>
#include <AkonadiCore/itemfetchscope.h>
#include <itemfetchjob.h>
#include <itemfetchscope.h>
#include <kabc/addressee.h>
#include <kicon.h>
#include <kiconloader.h>
......@@ -294,8 +294,13 @@ QVariant ContactGroupModel::data( const QModelIndex &index, int role ) const
}
if ( member.isReference ) {
//QT5 port
#if 0
return QIcon::fromTheme( QLatin1String( "x-office-contact" ), KIconLoader::global(),
QStringList() << QLatin1String( "emblem-symbolic-link" ) );
#else
return QString();
#endif
} else {
return QIcon::fromTheme( QLatin1String( "x-office-contact" ) );
}
......
......@@ -22,7 +22,7 @@
#include "contactgroupsearchjob.h"
#include <searchquery.h>
#include <AkonadiCore/itemfetchscope.h>
#include <itemfetchscope.h>
#include <QStringList>
using namespace Akonadi;
......
......@@ -24,8 +24,8 @@
#include "akonadi-contact_export.h"
#include <AkonadiCore/item.h>
#include <akonadi/itemsearchjob.h>
#include <item.h>
#include <itemsearchjob.h>
#include <kabc/contactgroup.h>
namespace Akonadi {
......
......@@ -25,11 +25,11 @@
#include "standardcontactgroupformatter.h"
#include "textbrowser_p.h"
#include <AkonadiCore/collectionfetchjob.h>
#include <AkonadiCore/entitydisplayattribute.h>
#include <AkonadiCore/item.h>
#include <AkonadiCore/itemfetchjob.h>
#include <AkonadiCore/itemfetchscope.h>
#include <collectionfetchjob.h>
#include <entitydisplayattribute.h>
#include <item.h>
#include <itemfetchjob.h>
#include <itemfetchscope.h>
#include <kabc/addressee.h>
#include <kabc/contactgroup.h>
#include <kcolorscheme.h>
......
......@@ -24,7 +24,7 @@
#include "akonadi-contact_export.h"
#include <akonadi/itemmonitor.h>
#include <itemmonitor.h>
#include <QWidget>
......
......@@ -23,7 +23,7 @@
#include "contactgroupviewer.h"
#include <AkonadiCore/item.h>
#include <item.h>
#include <klocalizedstring.h>
#include <QVBoxLayout>
......
......@@ -23,7 +23,7 @@
#include "contactmetadataattribute_p.h"
#include <AkonadiCore/item.h>
#include <item.h>
using namespace Akonadi;
......
......@@ -24,7 +24,7 @@
#include "akonadi-contactprivate_export.h"
#include <AkonadiCore/attribute.h>
#include <attribute.h>
#include <QtCore/QVariant>
......
......@@ -22,7 +22,7 @@
#include "contactsearchjob.h"
#include <searchquery.h>
#include <AkonadiCore/itemfetchscope.h>
#include <itemfetchscope.h>
using namespace Akonadi;
......
......@@ -24,8 +24,8 @@
#include "akonadi-contact_export.h"
#include <AkonadiCore/item.h>
#include <akonadi/itemsearchjob.h>
#include <item.h>
#include <itemsearchjob.h>
#include <kabc/addressee.h>
namespace Akonadi {
......
......@@ -23,7 +23,7 @@
#include "contactstreemodel.h"
#include <AkonadiCore/entitytreemodel.h>
#include <entitytreemodel.h>
#include <kabc/addressee.h>
#include <kabc/contactgroup.h>
......
......@@ -25,7 +25,7 @@
#include "akonadi-contact_export.h"
#include <AkonadiCore/entitytreemodel.h>
#include <entitytreemodel.h>
namespace Akonadi {
......
......@@ -29,11 +29,11 @@
#include "editor/im/improtocols.h"
#include <AkonadiCore/collection.h>
#include <AkonadiCore/collectionfetchjob.h>
#include <AkonadiCore/entitydisplayattribute.h>
#include <AkonadiCore/item.h>
#include <AkonadiCore/itemfetchscope.h>
#include <collection.h>
#include <collectionfetchjob.h>
#include <entitydisplayattribute.h>
#include <item.h>
#include <itemfetchscope.h>
#include <kabc/addressee.h>
#include <kcolorscheme.h>
#include <kconfiggroup.h>
......
......@@ -24,7 +24,7 @@
#include "akonadi-contact_export.h"
#include <akonadi/itemmonitor.h>
#include <itemmonitor.h>
#include <QWidget>
......
......@@ -23,7 +23,7 @@
#include "contactviewer.h"
#include "contactdefaultactions.h"
#include <AkonadiCore/item.h>
#include <item.h>
using namespace Akonadi;
#include <KConfig>
......
......@@ -21,9 +21,9 @@
#include "categorieseditwidget.h"
#include <AkonadiCore/item.h>
#include <akonadi/tag.h>
#include <akonadi/tagwidget.h>
#include <item.h>
#include <tag.h>
#include <tagwidget.h>
#include <kabc/addressee.h>
#include <kdialog.h>
......
......@@ -560,7 +560,7 @@ void ContactEditorWidget::loadContact( const KABC::Addressee &contact, const Ako
// Internet group
d->mEmailWidget->loadContact( contact );
d->mHomepageWidget->setUrl( contact.url() );
d->mHomepageWidget->setText( contact.url().toString() );
d->mBlogWidget->setText( d->loadCustom( contact, QLatin1String( "BlogFeed" ) ) );
d->mIMWidget->loadContact( contact );
......
......@@ -36,7 +36,8 @@
#include <KListWidget>
#include <klocalizedstring.h>
#include <kmessagebox.h>
#include <kpimutils/email.h>
#include <email.h>
#include <KSharedConfig>
class EmailAddressExtracter : public QObject
{
......
......@@ -29,7 +29,7 @@
#include <kio/netaccess.h>
#include <klocalizedstring.h>
#include <kmessagebox.h>
#include <kpixmapregionselectordialog.h>
//#include <kpixmapregionselectordialog.h>
#include <QtCore/QMimeData>
#include <QDrag>
......@@ -86,7 +86,8 @@ QImage ImageLoader::loadImage(const KUrl &url, bool *ok)
QPixmap pixmap = QPixmap::fromImage(image);
image = KPixmapRegionSelectorDialog::getSelectedImage(pixmap, 1, 1, mParent);
//QT5 port
//image = KPixmapRegionSelectorDialog::getSelectedImage(pixmap, 1, 1, mParent);
if (image.isNull()) {
(*ok) = false;
return image;
......
......@@ -28,7 +28,8 @@
#include <klocalizedstring.h>
#include <kmessagebox.h>
#include <phonon/mediaobject.h>
//QT5 port
//#include <phonon/mediaobject.h>
#include <QtCore/QBuffer>
#include <QContextMenuEvent>
......@@ -170,7 +171,8 @@ void SoundEditWidget::playSound()
if (!mHasSound) {
return;
}
//QT5 port
#if 0
Phonon::MediaObject *player = Phonon::createPlayer(Phonon::NotificationCategory);
QBuffer *soundData = new QBuffer(player);
soundData->setData(mSound);
......@@ -178,6 +180,7 @@ void SoundEditWidget::playSound()
player->setParent(this);
connect(player, SIGNAL(finished()), player, SLOT(deleteLater()));
player->play();
#endif
}
void SoundEditWidget::changeSound()
......
......@@ -26,7 +26,7 @@
#include <QtCore/QSharedData>
#include <QtCore/QString>
#include <AkonadiCore/item.h>
#include <item.h>
namespace Akonadi {
......
......@@ -22,7 +22,7 @@
#include "emailaddressselectionproxymodel_p.h"
#include <AkonadiCore/item.h>
#include <item.h>
#include <kabc/addressee.h>
#include <kabc/contactgroup.h>
#include <klocalizedstring.h>
......
......@@ -25,14 +25,14 @@
#include "emailaddressselection_p.h"
#include "emailaddressselectionproxymodel_p.h"
#include <AkonadiCore/changerecorder.h>
#include <akonadi/contact/contactsfilterproxymodel.h>
#include <akonadi/contact/contactstreemodel.h>
#include <akonadi/control.h>
#include <AkonadiCore/entitydisplayattribute.h>
#include <akonadi/entitytreeview.h>
#include <AkonadiCore/itemfetchscope.h>
#include <AkonadiCore/session.h>
#include <changerecorder.h>
#include <contactsfilterproxymodel.h>
#include <contactstreemodel.h>
#include <control.h>
#include <entitydisplayattribute.h>
#include <entitytreeview.h>
#include <itemfetchscope.h>
#include <session.h>