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

Make it compile. Port to QIcon::theme

parent 65ea4ecc
......@@ -255,10 +255,6 @@ if (QT_QTDECLARATIVE_FOUND)
add_subdirectory(qml)
endif ()
#if(OPENSYNC_FOUND)
# add_subdirectory(opensync)
#endif(OPENSYNC_FOUND)
############### Here we install some extra stuff ###############
## install the MIME type spec file for KDEPIM specific MIME types
......
......@@ -2,6 +2,9 @@ add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
kde_enable_exceptions()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/
)
set( MIGRATION_AKONADI_SHARED_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/kmigratorbase.cpp
......
......@@ -6,19 +6,16 @@ set(gid_SRCS
add_library(gidmigration STATIC ${gid_SRCS})
target_link_libraries(gidmigration
${KDE4_KDEPIMLIBS_LIBS}
KF5::AkonadiCore
KF5::KMime
KF5::KDELibs4Support
Qt5::Core
KF5::KConfigCore
)
add_executable(gidmigrator main.cpp)
target_link_libraries(gidmigrator
gidmigration
${KDE4_KDEPIMLIBS_LIBS}
KF5::AkonadiCore
KF5::KMime
)
......
......@@ -20,7 +20,7 @@
#ifndef GIDMIGRATOR_H
#define GIDMIGRATOR_H
#include <migration/migratorbase.h>
#include <migratorbase.h>
#include <KJob>
class GidMigrator: public MigratorBase
......
......@@ -58,6 +58,12 @@ if(LibKGAPI2_FOUND OR LibKFbAPI_FOUND)
set_package_properties(QJSON PROPERTIES DESCRIPTION "Qt library for handling JSON data" URL "http://qjson.sourceforge.net/" TYPE REQUIRED PURPOSE "Required to build the Google and Facebook resources")
endif()
include_directories(
${kdepim-runtime_SOURCE_DIR}/libkdepim-copy
${CMAKE_CURRENT_SOURCE_DIR}/shared
${CMAKE_CURRENT_BINARY_DIR}/shared
)
#add_definitions( -DQT_NO_CAST_FROM_ASCII )
......@@ -98,7 +104,7 @@ add_subdirectory( dav )
#add_subdirectory( imap )
add_subdirectory( kdeaccounts )
#if (Libkolab_FOUND AND Libkolabxml_FOUND)
# macro_optional_add_subdirectory( kolabproxy )
# add_subdirectory( kolabproxy )
#endif()
add_subdirectory( localbookmarks )
......
......@@ -22,14 +22,14 @@
#include "settings.h"
#include <kconfigdialogmanager.h>
#include <KIcon>
#include <QIcon>
#include <KLocalizedString>
ConfigDialog::ConfigDialog(QWidget* parent)
: KDialog( parent )
{
ui.setupUi( mainWidget() );
setWindowIcon( KIcon( QLatin1String("view-calendar-birthday") ) );
setWindowIcon( QIcon::fromTheme( QLatin1String("view-calendar-birthday") ) );
mManager = new KConfigDialogManager( this, Settings::self() );
mManager->updateWidgets();
ui.kcfg_AlarmDays->setSuffix( ki18np( " day", " days" ) );
......
......@@ -33,7 +33,7 @@ SettingsDialog::SettingsDialog( ContactsResourceSettings *settings, WId windowId
mSettings( settings )
{
ui.setupUi( mainWidget() );
setWindowIcon( KIcon( QLatin1String("text-directory") ) );
setWindowIcon( QIcon::fromTheme( QLatin1String("text-directory") ) );
ui.kcfg_Path->setMode( KFile::LocalOnly | KFile::Directory );
setButtons( Ok | Cancel );
......
......@@ -36,7 +36,7 @@ ConfigDialog::ConfigDialog( QWidget *parent )
: KDialog( parent )
{
mUi.setupUi( mainWidget() );
setWindowIcon( KIcon( QLatin1String("folder-remote") ) );
setWindowIcon( QIcon::fromTheme( QLatin1String("folder-remote") ) );
mModel = new QStandardItemModel();
QStringList headers;
......
......@@ -25,7 +25,7 @@
#include "davutils.h"
#include <KDebug>
#include <KIcon>
#include <QIcon>
#include <KMessageBox>
#include <KUrl>
......@@ -185,9 +185,9 @@ void SearchDialog::onCollectionsFetchJobFinished( KJob* job )
item->setData( data, Qt::UserRole + 1 );
item->setToolTip( collection.url() );
if ( collection.protocol() == DavUtils::CalDav )
item->setIcon( KIcon( QLatin1String("view-calendar") ) );
item->setIcon( QIcon::fromTheme( QLatin1String("view-calendar") ) );
else
item->setIcon( KIcon( QLatin1String("view-pim-contacts" )) );
item->setIcon( QIcon::fromTheme( QLatin1String("view-pim-contacts" )) );
mModel->appendRow( item );
}
}
......@@ -135,7 +135,7 @@ SetupWizard::SetupWizard( QWidget *parent )
: QWizard( parent )
{
setWindowTitle( i18n( "DAV groupware configuration wizard" ) );
setWindowIcon( KIcon( QLatin1String("folder-remote") ) );
setWindowIcon( QIcon::fromTheme( QLatin1String("folder-remote") ) );
setPage( W_CredentialsPage, new CredentialsPage );
setPage( W_PredefinedProviderPage, new PredefinedProviderPage );
setPage( W_ServerTypePage, new ServerTypePage );
......@@ -523,10 +523,10 @@ void CheckPage::onFetchDone( KJob *job )
if ( job->error() ) {
msg = i18n( "An error occurred: %1",job->errorText());
icon = KIcon( QLatin1String("dialog-close") ).pixmap( 16, 16 );
icon = QIcon::fromTheme( QLatin1String("dialog-close") ).pixmap( 16, 16 );
} else {
msg = i18n( "Connected successfully" );
icon = KIcon( QLatin1String("dialog-ok-apply") ).pixmap( 16, 16 );
icon = QIcon::fromTheme( QLatin1String("dialog-ok-apply") ).pixmap( 16, 16 );
}
mStatusLabel->setHtml( QString::fromLatin1( "<html><body><img src=\"icon\"> %1</body></html>" ).arg( msg ) );
......
......@@ -40,8 +40,8 @@ SettingsDialog::SettingsDialog( FacebookResource *parentResource, WId parentWind
KWindowSystem::setMainWindow( this, parentWindow );
setButtons( Ok|Cancel|User1 );
setButtonText( User1, i18n( "About" ) );
setButtonIcon( User1, KIcon( QLatin1String("help-about") ) );
setWindowIcon( KIcon( QLatin1String("facebookresource") ) );
setButtonIcon( User1, QIcon::fromTheme( QLatin1String("help-about") ) );
setWindowIcon( QIcon::fromTheme( QLatin1String("facebookresource") ) );
setWindowTitle( i18n( "Facebook Settings" ) );
setupWidgets();
......
......@@ -91,7 +91,7 @@ GoogleSettings *CalendarResource::settings() const
int CalendarResource::runConfigurationDialog( WId windowId )
{
QScopedPointer<SettingsDialog> settingsDialog( new SettingsDialog( accountManager(), windowId, this ) );
settingsDialog->setWindowIcon( KIcon( QLatin1String("im-google") ) );
settingsDialog->setWindowIcon( QIcon::fromTheme( QLatin1String("im-google") ) );
return settingsDialog->exec();
}
......
......@@ -58,7 +58,7 @@ SettingsDialog::SettingsDialog( GoogleAccountManager *accountManager, WId window
m_calendarsList = new KListWidget( m_calendarsBox );
vbox->addWidget( m_calendarsList, 1 );
m_reloadCalendarsBtn = new KPushButton( KIcon( QLatin1String("view-refresh") ), i18n( "Reload" ), m_calendarsBox );
m_reloadCalendarsBtn = new KPushButton( QIcon::fromTheme( QLatin1String("view-refresh") ), i18n( "Reload" ), m_calendarsBox );
vbox->addWidget( m_reloadCalendarsBtn );
connect( m_reloadCalendarsBtn, SIGNAL(clicked(bool)),
this, SLOT(slotReloadCalendars()) );
......@@ -91,7 +91,7 @@ SettingsDialog::SettingsDialog( GoogleAccountManager *accountManager, WId window
m_taskListsList = new KListWidget( m_taskListsBox );
vbox->addWidget( m_taskListsList, 1 );
m_reloadTaskListsBtn = new KPushButton( KIcon( QLatin1String("view-refresh") ), i18n( "Reload" ), m_taskListsBox );
m_reloadTaskListsBtn = new KPushButton( QIcon::fromTheme( QLatin1String("view-refresh") ), i18n( "Reload" ), m_taskListsBox );
vbox->addWidget( m_reloadTaskListsBtn );
connect( m_reloadTaskListsBtn, SIGNAL(clicked(bool)),
this, SLOT(slotReloadTaskLists()) );
......
......@@ -66,12 +66,12 @@ GoogleSettingsDialog::GoogleSettingsDialog( GoogleAccountManager *accountManager
connect( m_accComboBox, SIGNAL(currentIndexChanged(QString)),
this, SIGNAL(currentAccountChanged(QString)) );
m_addAccButton = new KPushButton( KIcon( QLatin1String("list-add-user") ), i18n( "&Add" ), m_accGroupBox );
m_addAccButton = new KPushButton( QIcon::fromTheme( QLatin1String("list-add-user") ), i18n( "&Add" ), m_accGroupBox );
accLayout->addWidget( m_addAccButton );
connect( m_addAccButton, SIGNAL(clicked(bool)),
this, SLOT(slotAddAccountClicked()) );
m_removeAccButton = new KPushButton( KIcon( QLatin1String("list-remove-user") ), i18n( "&Remove" ), m_accGroupBox );
m_removeAccButton = new KPushButton( QIcon::fromTheme( QLatin1String("list-remove-user") ), i18n( "&Remove" ), m_accGroupBox );
accLayout->addWidget( m_removeAccButton );
connect( m_removeAccButton, SIGNAL(clicked(bool)),
this, SLOT(slotRemoveAccountClicked()) );
......
......@@ -80,7 +80,7 @@ int ContactsResource::runConfigurationDialog( WId windowId )
{
QScopedPointer<SettingsDialog> settingsDialog( new SettingsDialog( accountManager(), windowId, this ) );
settingsDialog->setWindowIcon( KIcon( QLatin1String("im-google") ) );
settingsDialog->setWindowIcon( QIcon::fromTheme( QLatin1String("im-google") ) );
return settingsDialog->exec();
}
......
......@@ -31,8 +31,9 @@
#include <KCalCore/MemoryCalendar>
#include <KCalCore/FileStorage>
#include <KCalCore/ICalFormat>
#include <KIcon>
#include <QIcon>
#include <KLocalizedString>
#include <KDebug>
#include <QtCore/QDir>
......@@ -102,7 +103,7 @@ void ICalDirResource::aboutToQuit()
void ICalDirResource::configure( WId windowId )
{
SettingsDialog dlg( windowId );
dlg.setWindowIcon( KIcon( "text-calendar" ) );
dlg.setWindowIcon( QIcon::fromTheme( "text-calendar" ) );
if ( dlg.exec() ) {
initializeICalDirectory();
loadIncidences();
......
......@@ -32,7 +32,7 @@
#include <klocale.h>
#include <kstandarddirs.h>
#include <KWindowSystem>
#include <KIcon>
#include <QIcon>
#include <KGlobal>
#include <agentmanager.h>
......@@ -214,7 +214,7 @@ KDialog* ImapResource::createConfigureDialog(WId windowId)
{
SetupServer *dlg = new SetupServer( this, windowId );
KWindowSystem::setMainWindow( dlg, windowId );
dlg->setWindowIcon( KIcon( QLatin1String("network-server") ) );
dlg->setWindowIcon( QIcon::fromTheme( QLatin1String("network-server") ) );
connect(dlg, SIGNAL(finished(int)), this, SLOT(onConfigurationDone(int)));;
return dlg;
}
......@@ -283,7 +283,7 @@ int ImapResource::configureSubscription(qlonglong windowId)
#endif
}
mSubscriptions->setCaption( i18nc( "@title:window", "Serverside Subscription" ) );
mSubscriptions->setWindowIcon( KIcon( QLatin1String("network-server") ) );
mSubscriptions->setWindowIcon( QIcon::fromTheme( QLatin1String("network-server") ) );
mSubscriptions->connectAccount( *m_pool->account(), password );
mSubscriptions->setSubscriptionEnabled( Settings::self()->subscriptionEnabled() );
......
......@@ -610,7 +610,7 @@ void SetupServer::slotManageSubscriptions()
QPointer<SubscriptionDialog> subscriptions = new SubscriptionDialog( this );
subscriptions->setCaption( i18n( "Serverside Subscription" ) );
subscriptions->setWindowIcon( KIcon( QLatin1String("network-server") ) );
subscriptions->setWindowIcon( QIcon::fromTheme( QLatin1String("network-server") ) );
subscriptions->connectAccount( account, m_ui->password->text() );
m_subscriptionsChanged = subscriptions->isSubscriptionChanged();
......
......@@ -27,7 +27,7 @@
#include <kfiledialog.h>
#include <klocale.h>
#include <KWindowSystem>
#include <KIcon>
#include <QIcon>
using namespace Akonadi;
......@@ -65,7 +65,7 @@ bool KDEAccountsResource::retrieveItem( const Akonadi::Item &item, const QSet<QB
void KDEAccountsResource::customizeConfigDialog( SingleFileResourceConfigDialog<Settings>* dlg )
{
dlg->setWindowIcon( KIcon( QLatin1String("kde") ) );
dlg->setWindowIcon( QIcon::fromTheme( QLatin1String("kde") ) );
dlg->setCaption( i18n( "Select KDE Accounts File" ) );
}
......
......@@ -304,7 +304,7 @@ void KolabProxyResource::configure( WId windowId )
if ( windowId )
KWindowSystem::setMainWindow( kolabConfigDialog, windowId );
kolabConfigDialog->setWindowIcon( KIcon( QLatin1String("kolab") ) );
kolabConfigDialog->setWindowIcon( QIcon::fromTheme( QLatin1String("kolab") ) );
kolabConfigDialog->exec();
emit configurationDialogAccepted();
......
......@@ -246,7 +246,7 @@ void MaildirResource::configure( WId windowId )
ConfigDialog dlg( mSettings, identifier() );
if ( windowId )
KWindowSystem::setMainWindow( &dlg, windowId );
dlg.setWindowIcon( KIcon( QLatin1String("message-rfc822") ) );
dlg.setWindowIcon( QIcon::fromTheme( QLatin1String("message-rfc822") ) );
if ( dlg.exec() ) {
// if we have no name, or the default one,
// better use the name of the top level collection
......
......@@ -23,6 +23,8 @@
#include <Collection>
#include <CollectionRequester>
#include <KDebug>
using namespace Akonadi;
ConfigDialog::ConfigDialog(QWidget * parent) :
......
......@@ -30,6 +30,8 @@
#include <ItemCopyJob>
#include <KGlobal>
#include <KDebug>
using namespace Akonadi;
MTDummyResource::MTDummyResource( const QString &id )
......
......@@ -31,7 +31,7 @@
#include <kmbox/mbox.h>
#include <kmime/kmime_message.h>
#include <KWindowSystem>
#include <KIcon>
#include <QIcon>
#include "compactpage.h"
#include "deleteditemsattribute.h"
......@@ -85,7 +85,7 @@ MboxResource::~MboxResource()
void MboxResource::customizeConfigDialog( SingleFileResourceConfigDialog<Settings>* dlg )
{
dlg->setWindowIcon( KIcon( QLatin1String("message-rfc822") ) );
dlg->setWindowIcon( QIcon::fromTheme( QLatin1String("message-rfc822") ) );
dlg->addPage( i18n( "Compact frequency" ), new CompactPage( mSettings->path() ) );
dlg->addPage( i18n( "Lock method" ), new LockMethodPage() );
dlg->setCaption( i18n( "Select MBox file" ) );
......
......@@ -117,7 +117,7 @@ void MixedMaildirResource::configure( WId windowId )
if ( windowId ) {
KWindowSystem::setMainWindow( &dlg, windowId );
}
dlg.setWindowIcon( KIcon( "message-rfc822" ) );
dlg.setWindowIcon( QIcon::fromTheme( "message-rfc822" ) );
bool fullSync = false;
......
......@@ -38,7 +38,7 @@
#include <KWindowSystem>
#include <KLocalizedString>
#include <KIcon>
#include <QIcon>
#include <QDateTime>
#include <QDir>
......@@ -282,7 +282,7 @@ void NntpResource::configure( WId windowId )
if ( windowId ) {
KWindowSystem::setMainWindow( &dlg, windowId );
}
dlg.setWindowIcon( KIcon( "message-news" ) );
dlg.setWindowIcon( QIcon::fromTheme( "message-news" ) );
if ( dlg.exec() ) {
emit configurationDialogAccepted();
} else {
......
......@@ -322,7 +322,7 @@ void OpenXchangeResource::configure( WId windowId )
const bool useIncrementalUpdates = Settings::self()->useIncrementalUpdates();
ConfigDialog dlg( windowId );
dlg.setWindowIcon( KIcon( "ox" ) );
dlg.setWindowIcon( QIcon::fromTheme( "ox" ) );
if ( dlg.exec() ) { //krazy:exclude=crashy
// if the user has changed the incremental update settings we have to do
......
......@@ -78,7 +78,7 @@ AccountDialog::AccountDialog( POP3Resource *parentResource, WId parentWindow )
mWallet( 0 )
{
KWindowSystem::setMainWindow( this, parentWindow );
setWindowIcon( KIcon( QLatin1String("network-server") ) );
setWindowIcon( QIcon::fromTheme( QLatin1String("network-server") ) );
setWindowTitle( i18n( "POP3 Account Settings" ) );
setButtons( Ok|Cancel );
mValidator.setRegExp( QRegExp( QLatin1String("[A-Za-z0-9-_:.]*") ) );
......
......@@ -37,7 +37,7 @@
#include <entitydisplayattribute.h>
#include <KLocalizedString>
#include <KDebug>
#include <QFileInfo>
using namespace Akonadi;
......
......@@ -36,6 +36,7 @@
#include <QFile>
#include <QDir>
#include <QPointer>
#include <KDebug>
namespace Akonadi
{
......
......@@ -72,7 +72,7 @@ void VCardResource::aboutToQuit()
void VCardResource::customizeConfigDialog( SingleFileResourceConfigDialog<Settings>* dlg )
{
dlg->setWindowIcon( KIcon( QLatin1String("text-directory") ) );
dlg->setWindowIcon( QIcon::fromTheme( QLatin1String("text-directory") ) );
dlg->setFilter( QLatin1String("*.vcf|") + i18nc("Filedialog filter for *.vcf", "vCard Address Book File" ) );
dlg->setCaption( i18n("Select Address Book") );
}
......
......@@ -31,8 +31,9 @@
#include <entitydisplayattribute.h>
#include <itemfetchscope.h>
#include <KIcon>
#include <QIcon>
#include <KLocalizedString>
#include <KDebug>
using namespace Akonadi;
......@@ -61,7 +62,7 @@ void VCardDirResource::aboutToQuit()
void VCardDirResource::configure( WId windowId )
{
SettingsDialog dlg( windowId );
dlg.setWindowIcon( KIcon( QLatin1String("text-directory") ) );
dlg.setWindowIcon( QIcon::fromTheme( QLatin1String("text-directory") ) );
if ( dlg.exec() ) {
initializeVCardDirectory();
loadAddressees();
......
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