diff -Nru kdepim-runtime-4.14.6/accountwizard/accountwizard.desktop kdepim-runtime-15.08.0/accountwizard/accountwizard.desktop
--- kdepim-runtime-4.14.6/accountwizard/accountwizard.desktop 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/accountwizard.desktop 1970-01-01 00:00:00.000000000 +0000
@@ -1,97 +0,0 @@
-[Desktop Entry]
-Name=Account Wizard
-Name[bg]=Помощник за сметки
-Name[bs]=Čarobnjak naloga
-Name[ca]=Assistent de comptes
-Name[ca@valencia]=Assistent de comptes
-Name[cs]=Průvodce nastavením účtu
-Name[da]=Kontoguide
-Name[de]=Zugangsassistent
-Name[el]=Οδηγός Λογαριασμού
-Name[en_GB]=Account Wizard
-Name[es]=Asistente de cuentas
-Name[et]=Kontonõustaja
-Name[fi]=Opastettu tilien asetus
-Name[fr]=Assistant de comptes
-Name[ga]=Treoraí Cuntais
-Name[gl]=Asistente de contas
-Name[hu]=Azonosítóbeállító varázsló
-Name[ia]=Assistente de conto
-Name[it]=Procedura guidata per la creazione di account
-Name[ja]=アカウントウィザード
-Name[kk]=Тіркелгі шебері
-Name[km]=អ្នកជំនួយការគណនី
-Name[ko]=계정 마법사
-Name[lt]=Paskyros vediklis
-Name[lv]=Konta vednis
-Name[mai]=खाता विजार्ड
-Name[nb]=Konto-veiviser
-Name[nds]=Konto-Hölper
-Name[nl]=Accountassistent
-Name[pa]=ਅਕਾਊਂਟ ਸਹਾਇਕ
-Name[pl]=Pomocnik konta
-Name[pt]=Assistente de Contas
-Name[pt_BR]=Assistente de contas
-Name[ro]=Expert conturi
-Name[ru]=Мастер учётных записей
-Name[sk]=Sprievodca účtom
-Name[sl]=Čarovnik za račune
-Name[sr]=Чаробњак за налоге
-Name[sr@ijekavian]=Чаробњак за налоге
-Name[sr@ijekavianlatin]=Čarobnjak za naloge
-Name[sr@latin]=Čarobnjak za naloge
-Name[sv]=Kontoguide
-Name[tr]=Hesap Sihirbazı
-Name[ug]=زىيارەت يېتەكچىسى
-Name[uk]=Майстер облікових записів
-Name[x-test]=xxAccount Wizardxx
-Name[zh_CN]=账户向导
-Name[zh_TW]=帳號精靈
-Exec=accountwizard --package %u
-Type=Application
-NoDisplay=true
-Comment=Launch the account wizard to configure PIM accounts.
-Comment[bs]=Pokreni čarobnjaka za naloge za konfigurisanje PIM naloga.
-Comment[ca]=Llança l'assistent de comptes per a configurar comptes de PIM.
-Comment[ca@valencia]=Llança l'assistent de comptes per a configurar comptes de PIM.
-Comment[cs]=Spustit průvodce nastavením PIM účtů.
-Comment[da]=Start kontoguiden for at konfigurere PIM-konti.
-Comment[de]=Den Zugangsassistenten zum Einrichten von PIM-Zugängen starten.
-Comment[el]=Εκτέλεση του οδηγού λογαριασμού για τη διαμόρφωση λογαριασμών PIM.
-Comment[en_GB]=Launch the account wizard to configure PIM accounts.
-Comment[es]=Lanzar el asistente de cuentas para configurar las cuentas PIM.
-Comment[et]=Kontonõustaja käivitamine PIM-kontode seadistamiseks.
-Comment[fi]=Käynnistä PIM-tilien opastettu asetus.
-Comment[fr]=Lance l'assistant de compte pour configurer les comptes PIM.
-Comment[gl]=Iniciar o asistente de contas para configurar as contas de información persoal
-Comment[hu]=A PIM azonosítókat beállító varázsló elindítása.
-Comment[ia]=Aperi le assistente de conto pro configurar contos del Administration de Informationes Personal
-Comment[it]=Esegue la procedura guidata per la creazione di account per configurare gli account di PIM.
-Comment[kk]=PIM тіркелгілерін баптау үшін шеберін жегеді.
-Comment[km]=ចាប់ផ្ដើមអ្នកជំនួយការគណនី ដើម្បីកំណត់រចនាសម្ព័ន្ធគណនី PIM ។
-Comment[ko]=계정 마법사를 실행하여 PIM 계정을 설정합니다.
-Comment[lt]=PIM paskyros nustatymui, paleisti paskyros vediklį.
-Comment[lv]=Palaiž konta vedni, lai konfigurētu PIM kontus.
-Comment[nb]=Start kontoveiviseren for å sette opp PIM-kontoer.
-Comment[nds]=Konto-Hölper för't Inrichten vun PIM-Kontos starten
-Comment[nl]=Start de accountassistent om PIM-accounts in te stellen.
-Comment[pl]=Uruchom pomocnika konta, aby ustawić konta ZIO.
-Comment[pt]=Lançar o assistente de contas para configurar as contas PIM.
-Comment[pt_BR]=Executa o assistente para configuração das contas PIM.
-Comment[ro]=Lansează expertul de conturi pentru a configura conturi noi.
-Comment[ru]=Мастер для настройки учётных записей персонального информационного менеджера.
-Comment[sk]=Spustí sprievodcu účtami na nasatavenie PIM účtov.
-Comment[sl]=Zaženite čarovnika za nastavljanje računov za osebne podatke.
-Comment[sr]=Покрените чаробњак да подесите ПИМ налоге.
-Comment[sr@ijekavian]=Покрените чаробњак да подесите ПИМ налоге.
-Comment[sr@ijekavianlatin]=Pokrenite čarobnjak da podesite PIM naloge.
-Comment[sr@latin]=Pokrenite čarobnjak da podesite PIM naloge.
-Comment[sv]=Starta kontoguiden för att anpassa konton för personlig informationshantering.
-Comment[tr]=PIM hesaplarını düzenlemek için hesap sihirbazını başlat.
-Comment[ug]=PIM ھېساباتلىرىنى سەپلەشتە ئىشلىتىدىغان ھېسابات يېتەكچىسىنى ئىجرا قىلىش
-Comment[uk]=Запустити майстер облікових записів для налаштування.
-Comment[x-test]=xxLaunch the account wizard to configure PIM accounts.xx
-Comment[zh_CN]=调用账户向导配置个人信息账户。
-Comment[zh_TW]=啟動帳號精靈來設定 PIM 帳號
-MimeType=application/x-accountwizard-package;
-Terminal=false
diff -Nru kdepim-runtime-4.14.6/accountwizard/accountwizard.knsrc kdepim-runtime-15.08.0/accountwizard/accountwizard.knsrc
--- kdepim-runtime-4.14.6/accountwizard/accountwizard.knsrc 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/accountwizard.knsrc 1970-01-01 00:00:00.000000000 +0000
@@ -1,5 +0,0 @@
-[KNewStuff3]
-ProvidersUrl=http://download.kde.org/ocs/providers.xml
-Categories=Akonadi Email Providers
-TargetDir=akonadi/accountwizard
-Uncompress=archive
diff -Nru kdepim-runtime-4.14.6/accountwizard/accountwizard-mime.xml kdepim-runtime-15.08.0/accountwizard/accountwizard-mime.xml
--- kdepim-runtime-4.14.6/accountwizard/accountwizard-mime.xml 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/accountwizard-mime.xml 1970-01-01 00:00:00.000000000 +0000
@@ -1,7 +0,0 @@
-
-
-
- KDE Accountwizard Package
-
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/CMakeLists.txt kdepim-runtime-15.08.0/accountwizard/CMakeLists.txt
--- kdepim-runtime-4.14.6/accountwizard/CMakeLists.txt 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,71 +0,0 @@
-add_definitions( -DQT_NO_CAST_FROM_ASCII )
-add_definitions( -DQT_NO_CAST_TO_ASCII )
-
-# allow to disable GHNS support on resource-constrained systems
-option( ACCOUNTWIZARD_NO_GHNS "Disable GHNS support in the account wizard" ${KDEPIM_MOBILE_UI} )
-if ( ACCOUNTWIZARD_NO_GHNS )
- add_definitions( -DACCOUNTWIZARD_NO_GHNS )
-endif ()
-
-set(accountwizard_srcs
- dialog.cpp
- typepage.cpp
- loadpage.cpp
- global.cpp
- page.cpp
- dynamicpage.cpp
- setupmanager.cpp
- setuppage.cpp
- resource.cpp
- setupobject.cpp
- transport.cpp
- configfile.cpp
- ldap.cpp
- identity.cpp
- servertest.cpp
- personaldatapage.cpp
- ispdb/ispdb.cpp
-)
-
-kde4_add_ui_files(accountwizard_srcs
- ui/typepage.ui
- ui/loadpage.ui
- ui/setuppage.ui
- ui/personaldatapage.ui
-)
-
-set(accountwizard_libs
- ${KDEPIMLIBS_AKONADI_LIBS}
- ${KDEPIMLIBS_MAILTRANSPORT_LIBS}
- ${KDEPIMLIBS_KPIMUTILS_LIBS}
- ${KDE4_KROSSCORE_LIBS}
- ${KDE4_KDECORE_LIBS}
- ${KDE4_KIO_LIBS}
- ${KDEPIMLIBS_KMIME_LIBS}
- ${KDEPIMLIBS_KPIMIDENTITIES_LIBS}
- ${QT_QTGUI_LIBRARY}
- ${QT_QTUITOOLS_LIBRARY}
-)
-
-if ( NOT ACCOUNTWIZARD_NO_GHNS )
- set(accountwizard_srcs ${accountwizard_srcs} providerpage.cpp)
- kde4_add_ui_files(accountwizard_srcs ui/providerpage.ui)
- set(accountwizard_libs ${accountwizard_libs} ${KDE4_KNEWSTUFF3_LIBS})
-endif ()
-
-kde4_add_executable(accountwizard ${accountwizard_srcs} main.cpp)
-target_link_libraries(accountwizard ${accountwizard_libs})
-
-kde4_add_plugin(accountwizard_plugin ${accountwizard_srcs} inprocess-main.cpp)
-target_link_libraries(accountwizard_plugin ${accountwizard_libs})
-
-if ( NOT ACCOUNTWIZARD_NO_GHNS )
- install(FILES accountwizard.knsrc DESTINATION ${CONFIG_INSTALL_DIR})
-endif ()
-install(TARGETS accountwizard ${INSTALL_TARGETS_DEFAULT_ARGS})
-install(TARGETS accountwizard_plugin DESTINATION ${PLUGIN_INSTALL_DIR})
-install(PROGRAMS accountwizard.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
-install(FILES accountwizard-mime.xml DESTINATION ${XDG_MIME_INSTALL_DIR})
-update_xdg_mimetypes(${XDG_MIME_INSTALL_DIR})
-
-add_subdirectory(wizards)
diff -Nru kdepim-runtime-4.14.6/accountwizard/configfile.cpp kdepim-runtime-15.08.0/accountwizard/configfile.cpp
--- kdepim-runtime-4.14.6/accountwizard/configfile.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/configfile.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,91 +0,0 @@
-/*
- Copyright (c) 2010-2015 Laurent Montel
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "configfile.h"
-
-#include
-#include
-#include
-#include
-
-ConfigFile::ConfigFile( const QString & configName, QObject *parent )
- : SetupObject( parent )
-{
- m_name = configName;
- m_config = new KConfig( configName );
-}
-
-ConfigFile::~ConfigFile()
-{
- delete m_config;
-}
-
-void ConfigFile::write()
-{
- create();
-}
-
-void ConfigFile::create()
-{
- emit info( i18n( "Writing config file for %1...",m_name ) );
-
- foreach ( const Config &c, m_configData ) {
- KConfigGroup grp = m_config->group( c.group );
- if ( c.obscure )
- grp.writeEntry( c.key, KStringHandler::obscure( c.value ) );
- else
- grp.writeEntry( c.key, c.value );
- }
-
- m_config->sync();
- emit finished( i18n( "Config file for %1 is writing.", m_name ) );
-}
-
-void ConfigFile::destroy()
-{
- emit info( i18n( "Config file for %1 was not changed.", m_name ) );
-}
-
-void ConfigFile::setName( const QString &name )
-{
- m_name = name;
-}
-
-
-void ConfigFile::setConfig( const QString &group, const QString &key, const QString &value )
-{
- Config conf;
- conf.group = group;
- conf.key = key;
- conf.value = value;
- conf.obscure = false;
- m_configData.append( conf );
-}
-
-void ConfigFile::setPassword(const QString& group, const QString& key, const QString& value)
-{
- Config conf;
- conf.group = group;
- conf.key = key;
- conf.value = value;
- conf.obscure = true;
- m_configData.append( conf );
-}
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/configfile.h kdepim-runtime-15.08.0/accountwizard/configfile.h
--- kdepim-runtime-4.14.6/accountwizard/configfile.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/configfile.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,53 +0,0 @@
-/*
- Copyright (c) 2010-2015 Laurent Montel
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef CONFIGFILE_H
-#define CONFIGFILE_H
-
-#include "setupobject.h"
-
-class KConfig;
-
-struct Config {
- QString group;
- QString key;
- QString value;
- bool obscure;
-};
-
-class ConfigFile : public SetupObject
-{
- Q_OBJECT
- public:
- explicit ConfigFile( const QString& configName, QObject *parent = 0 );
- ~ConfigFile();
- void create();
- void destroy();
- public slots:
- Q_SCRIPTABLE void write();
- Q_SCRIPTABLE void setName( const QString & name );
- Q_SCRIPTABLE void setConfig( const QString &group, const QString &key, const QString &value );
- Q_SCRIPTABLE void setPassword( const QString &group, const QString &key, const QString &value );
- private:
- QList m_configData;
- QString m_name;
- KConfig *m_config;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/dialog.cpp kdepim-runtime-15.08.0/accountwizard/dialog.cpp
--- kdepim-runtime-4.14.6/accountwizard/dialog.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/dialog.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,206 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
- Copyright (c) 2010 Tom Albers
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "dialog.h"
-#include "personaldatapage.h"
-#ifndef ACCOUNTWIZARD_NO_GHNS
-#include "providerpage.h"
-#endif
-#include "typepage.h"
-#include "loadpage.h"
-#include "global.h"
-#include "dynamicpage.h"
-#include "setupmanager.h"
-#include "servertest.h"
-#include "setuppage.h"
-
-#include
-
-#include
-#include
-#include
-#include
-
-#include
-
-Dialog::Dialog(QWidget* parent, Qt::WindowFlags flags ) :
- KAssistantDialog( parent, flags )
-{
-#if defined (Q_WS_MAEMO_5) || defined (MEEGO_EDITION_HARMATTAN)
- setWindowState( Qt::WindowFullScreen );
-#endif
-
- showButton( Help, false ); // we don't have help for the account wizard atm
-
- mSetupManager = new SetupManager( this );
- const bool showPersonalDataPage = Global::typeFilter().size() == 1 && Global::typeFilter().first() == KMime::Message::mimeType();
-
- if ( showPersonalDataPage ) {
- // todo: dont ask these details based on a setting of the desktop file.
- PersonalDataPage *pdpage = new PersonalDataPage( this );
- addPage( pdpage, i18n( "Provide personal data" ) );
- connect( pdpage, SIGNAL(manualWanted(bool)), SLOT(slotManualConfigWanted(bool)) );
- if ( !Global::assistant().isEmpty() ) {
- pdpage->setHideOptionInternetSearch( true );
- }
- }
-
- if ( Global::assistant().isEmpty() ) {
- TypePage* typePage = new TypePage( this );
- connect( typePage->treeview(), SIGNAL(doubleClicked(QModelIndex)), SLOT(slotNextPage()) );
-#ifndef ACCOUNTWIZARD_NO_GHNS
- connect( typePage, SIGNAL(ghnsWanted()), SLOT(slotGhnsWanted()) );
-#endif
- mTypePage = addPage( typePage, i18n( "Select Account Type" ) );
- setAppropriate( mTypePage, false );
-
-#ifndef ACCOUNTWIZARD_NO_GHNS
- ProviderPage *ppage = new ProviderPage( this );
- connect( typePage, SIGNAL(ghnsWanted()), ppage, SLOT(startFetchingData()) );
- connect( ppage->treeview(), SIGNAL(doubleClicked(QModelIndex)), SLOT(slotNextPage()) );
- connect( ppage, SIGNAL(ghnsNotWanted()), SLOT(slotGhnsNotWanted()) );
- mProviderPage = addPage( ppage, i18n( "Select Provider" ) );
- setAppropriate( mProviderPage, false );
-#endif
- }
-
- LoadPage *loadPage = new LoadPage( this );
- mLoadPage = addPage( loadPage, i18n( "Loading Assistant" ) );
- setAppropriate( mLoadPage, false );
- loadPage->exportObject( this, QLatin1String( "Dialog" ) );
- loadPage->exportObject( mSetupManager, QLatin1String( "SetupManager" ) );
- loadPage->exportObject( new ServerTest( this ), QLatin1String( "ServerTest" ) );
- connect( loadPage, SIGNAL(aboutToStart()), SLOT(clearDynamicPages()) );
-
- SetupPage *setupPage = new SetupPage( this );
- mLastPage = addPage( setupPage, i18n( "Setting up Account" ) );
- mSetupManager->setSetupPage( setupPage );
-
- slotManualConfigWanted( !showPersonalDataPage );
-
- Page *page = qobject_cast( currentPage()->widget() );
- page->enterPageNext();
- emit page->pageEnteredNext();
- enableButton( KDialog::Help, false );
-}
-
-KPageWidgetItem* Dialog::addPage(Page* page, const QString &title)
-{
- KPageWidgetItem *item = KAssistantDialog::addPage( page, title );
- connect( page, SIGNAL(leavePageNextOk()), SLOT(slotNextOk()) );
- connect( page, SIGNAL(leavePageBackOk()), SLOT(slotBackOk()) );
- page->setPageWidgetItem( item );
- return item;
-}
-
-
-void Dialog::slotNextPage()
-{
- next();
-}
-
-void Dialog::next()
-{
- Page *page = qobject_cast( currentPage()->widget() );
- page->leavePageNext();
- page->leavePageNextRequested();
-}
-
-void Dialog::slotNextOk()
-{
- Page *page = qobject_cast( currentPage()->widget() );
- emit page->pageLeftNext();
- KAssistantDialog::next();
- page = qobject_cast( currentPage()->widget() );
- page->enterPageNext();
- emit page->pageEnteredNext();
-}
-
-
-void Dialog::back()
-{
- Page *page = qobject_cast( currentPage()->widget() );
- page->leavePageBack();
- page->leavePageBackRequested();
-}
-
-void Dialog::slotBackOk()
-{
- Page *page = qobject_cast( currentPage()->widget() );
- emit page->pageLeftBack();
- KAssistantDialog::back();
- page = qobject_cast( currentPage()->widget() );
- page->enterPageBack();
- emit page->pageEnteredBack();
-}
-
-QObject* Dialog::addPage(const QString& uiFile, const QString &title )
-{
- kDebug() << uiFile;
- DynamicPage *page = new DynamicPage( Global::assistantBasePath() + uiFile, this );
- connect( page, SIGNAL(leavePageNextOk()), SLOT(slotNextOk()) );
- connect( page, SIGNAL(leavePageBackOk()), SLOT(slotBackOk()) );
- KPageWidgetItem* item = insertPage( mLastPage, page, title );
- page->setPageWidgetItem( item );
- mDynamicPages.push_back( item );
- return page;
-}
-
-void Dialog::slotManualConfigWanted( bool show )
-{
- Q_ASSERT( mTypePage );
- setAppropriate( mTypePage, show );
- setAppropriate( mLoadPage, show );
-}
-
-#ifndef ACCOUNTWIZARD_NO_GHNS
-void Dialog::slotGhnsWanted()
-{
- Q_ASSERT( mProviderPage );
- setAppropriate( mProviderPage, true );
- setCurrentPage( mProviderPage );
-}
-
-void Dialog::slotGhnsNotWanted()
-{
- Q_ASSERT( mProviderPage );
- setAppropriate( mProviderPage, false );
-}
-#endif
-
-SetupManager* Dialog::setupManager()
-{
- return mSetupManager;
-}
-
-void Dialog::clearDynamicPages()
-{
- foreach ( KPageWidgetItem *item, mDynamicPages )
- removePage( item );
- mDynamicPages.clear();
-}
-
-void Dialog::reject()
-{
- connect( mSetupManager, SIGNAL(rollbackComplete()), SLOT(close()) );
- mSetupManager->requestRollback();
-}
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/dialog.h kdepim-runtime-15.08.0/accountwizard/dialog.h
--- kdepim-runtime-4.14.6/accountwizard/dialog.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/dialog.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,69 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef DIALOG_H
-#define DIALOG_H
-
-#include "setupmanager.h"
-#include
-
-class Page;
-class TypePage;
-
-class Dialog : public KAssistantDialog
-{
- Q_OBJECT
- public:
- explicit Dialog( QWidget *parent = 0, Qt::WindowFlags flags = 0 );
-
- /* reimpl */ void next();
- /* reimpl */ void back();
-
- // give room for certain pages to create objects too.
- SetupManager* setupManager();
-
- public slots:
- Q_SCRIPTABLE QObject* addPage( const QString &uiFile, const QString &title );
-
- void reject();
-
- private slots:
- void slotNextPage();
-#ifndef ACCOUNTWIZARD_NO_GHNS
- void slotGhnsWanted();
- void slotGhnsNotWanted();
-#endif
- void slotManualConfigWanted( bool );
- void slotNextOk();
- void slotBackOk();
- void clearDynamicPages();
-
- private:
- KPageWidgetItem* addPage( Page* page, const QString &title );
-
- private:
- SetupManager* mSetupManager;
- KPageWidgetItem* mLastPage;
- KPageWidgetItem* mProviderPage;
- KPageWidgetItem* mTypePage;
- KPageWidgetItem* mLoadPage;
- QVector mDynamicPages;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/dynamicpage.cpp kdepim-runtime-15.08.0/accountwizard/dynamicpage.cpp
--- kdepim-runtime-4.14.6/accountwizard/dynamicpage.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/dynamicpage.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,65 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "dynamicpage.h"
-
-#include
-
-#include
-#include
-#include
-#include
-
-DynamicPage::DynamicPage(const QString& uiFile, KAssistantDialog* parent) : Page( parent )
-{
- QVBoxLayout *layout = new QVBoxLayout;
- layout->setMargin( 0 );
- setLayout( layout );
-
-#ifdef KDEPIM_MOBILE_UI
- // for mobile ui we put the page into a scroll area in case it's too big
- QScrollArea *pageParent = new QScrollArea( this );
- pageParent->setFrameShape( QFrame::NoFrame );
- pageParent->setWidgetResizable( true );
- layout->addWidget( pageParent );
-#else
- QWidget *pageParent = this;
-#endif
-
- QUiLoader loader;
- QFile file( uiFile );
- file.open( QFile::ReadOnly );
- kDebug() << uiFile;
- m_dynamicWidget = loader.load( &file, pageParent );
- file.close();
-
-#ifdef KDEPIM_MOBILE_UI
- pageParent->setWidget( m_dynamicWidget );
-#else
- layout->addWidget( m_dynamicWidget );
-#endif
-
- setValid( true );
-}
-
-QObject* DynamicPage::widget() const
-{
- return m_dynamicWidget;
-}
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/dynamicpage.h kdepim-runtime-15.08.0/accountwizard/dynamicpage.h
--- kdepim-runtime-4.14.6/accountwizard/dynamicpage.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/dynamicpage.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,39 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef DYNAMICPAGE_H
-#define DYNAMICPAGE_H
-
-#include "page.h"
-
-class DynamicPage : public Page
-{
- Q_OBJECT
- public:
- explicit DynamicPage( const QString &uiFile, KAssistantDialog* parent = 0 );
-
- public slots:
- /// returns the top-level widget of the UI file
- Q_SCRIPTABLE QObject* widget() const;
-
- private:
- QWidget* m_dynamicWidget;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/global.cpp kdepim-runtime-15.08.0/accountwizard/global.cpp
--- kdepim-runtime-4.14.6/accountwizard/global.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/global.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,115 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "global.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-class GlobalPrivate
-{
- public:
- QStringList filter;
- QString assistant;
-};
-
-K_GLOBAL_STATIC( GlobalPrivate, sInstance )
-
-
-QString Global::assistant()
-{
- return sInstance->assistant;
-}
-
-void Global::setAssistant(const QString& assistant)
-{
- const QFileInfo info( assistant );
- if ( info.isAbsolute() ) {
- sInstance->assistant = assistant;
- return;
- }
-
- const QStringList list = KGlobal::dirs()->findAllResources(
- "data", QLatin1String( "akonadi/accountwizard/*.desktop" ),
- KStandardDirs::Recursive | KStandardDirs::NoDuplicates );
- foreach ( const QString &entry, list ) {
- const QFileInfo info( entry );
- const QDir dir( info.absolutePath() );
- kDebug() << dir.dirName();
- if ( dir.dirName() == assistant ) {
- sInstance->assistant = entry;
- return;
- }
- }
-
- sInstance->assistant.clear();
-}
-
-
-QStringList Global::typeFilter()
-{
- return sInstance->filter;
-}
-
-void Global::setTypeFilter(const QStringList& filter)
-{
- sInstance->filter = filter;
-}
-
-QString Global::assistantBasePath()
-{
- const QFileInfo info( assistant() );
- if ( info.isAbsolute() )
- return info.absolutePath() + QDir::separator();
- return QString();
-}
-
-QString Global::unpackAssistant( const KUrl& remotePackageUrl )
-{
- QString localPackageFile;
- if ( remotePackageUrl.protocol() == QLatin1String( "file" ) ) {
- localPackageFile = remotePackageUrl.path();
- } else {
- QString remoteFileName = QFileInfo( remotePackageUrl.path() ).fileName();
- localPackageFile = KStandardDirs::locateLocal( "cache", QLatin1String("accountwizard/") + remoteFileName );
- KIO::Job* job = KIO::copy( remotePackageUrl, localPackageFile, KIO::Overwrite | KIO::HideProgressInfo );
- kDebug() << "downloading remote URL" << remotePackageUrl << "to" << localPackageFile;
- if ( !KIO::NetAccess::synchronousRun( job, 0 ) )
- return QString();
- }
-
- const KUrl file( QLatin1String("tar://") + localPackageFile );
- const QFileInfo fi( localPackageFile );
- const QString assistant = fi.baseName();
- const QString dest = KStandardDirs::locateLocal( "appdata", QLatin1String("/") );
- KStandardDirs::makeDir( dest + file.fileName() );
- KIO::Job* getJob = KIO::copy( file, dest, KIO::Overwrite | KIO::HideProgressInfo );
- if ( KIO::NetAccess::synchronousRun( getJob, 0 ) ) {
- kDebug() << "worked, unpacked in " << dest;
- return dest + file.fileName() + QLatin1Char('/') + assistant + QLatin1Char('/') + assistant + QLatin1String(".desktop");
- } else {
- kDebug() << "failed" << getJob->errorString();
- return QString();
- }
-}
diff -Nru kdepim-runtime-4.14.6/accountwizard/global.h kdepim-runtime-15.08.0/accountwizard/global.h
--- kdepim-runtime-4.14.6/accountwizard/global.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/global.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,39 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef GLOBAL_H
-#define GLOBAL_H
-
-#include
-#include
-
-namespace Global
-{
- QStringList typeFilter();
- void setTypeFilter( const QStringList &filter );
-
- QString assistant();
- void setAssistant( const QString &assistant );
-
- QString assistantBasePath();
-
- QString unpackAssistant( const KUrl& remotePackageUrl );
-}
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/HOWTO kdepim-runtime-15.08.0/accountwizard/HOWTO
--- kdepim-runtime-4.14.6/accountwizard/HOWTO 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/HOWTO 1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-You can create packages too... Want to read about it?
-http://techbase.kde.org/Development/Tutorials/Akonadi/CreatingAccountWizardPackages
diff -Nru kdepim-runtime-4.14.6/accountwizard/identity.cpp kdepim-runtime-15.08.0/accountwizard/identity.cpp
--- kdepim-runtime-4.14.6/accountwizard/identity.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/identity.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,152 +0,0 @@
-/*
- Copyright (c) 2010-2015 Laurent Montel
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "identity.h"
-#include "transport.h"
-
-#include
-#include
-
-#include
-
-Identity::Identity( QObject *parent )
- : SetupObject( parent ),
- m_transport( 0 )
-{
- m_manager = new KPIMIdentities::IdentityManager( false, this, "mIdentityManager" );
- m_identity = &m_manager->newFromScratch( QString() );
- Q_ASSERT( m_identity != 0 );
-}
-
-Identity::~Identity()
-{
- delete m_manager;
-}
-
-void Identity::create()
-{
- emit info( i18n( "Setting up identity..." ) );
-
- // store identity information
- // TODO now that we have the identity object around anyway we can probably get rid of most of the other members
- m_identity->setIdentityName( identityName() );
- m_identity->setFullName( m_realName );
- m_identity->setPrimaryEmailAddress( m_email );
- m_identity->setOrganization( m_organization );
- if ( m_transport && m_transport->transportId() > 0 )
- m_identity->setTransport( QString::number( m_transport->transportId() ) );
- if ( !m_signature.isEmpty() ) {
- const KPIMIdentities::Signature sig( m_signature );
- m_identity->setSignature( sig );
- }
- if ( !m_prefCryptoFormat.isEmpty() )
- m_identity->setPreferredCryptoMessageFormat( m_prefCryptoFormat );
- if ( !m_xface.isEmpty() ) {
- m_identity->setXFaceEnabled( true );
- m_identity->setXFace( m_xface );
- }
- m_manager->setAsDefault( m_identity->uoid() );
- m_manager->commit();
-
- emit finished( i18n( "Identity set up." ) );
-}
-
-QString Identity::identityName() const
-{
- // create identity name
- QString name( m_identityName );
- if ( name.isEmpty() ) {
- name = i18nc( "Default name for new email accounts/identities.", "Unnamed" );
-
- QString idName = m_email;
- int pos = idName.indexOf( QLatin1Char('@') );
- if ( pos != -1 ) {
- name = idName.mid( 0, pos );
- }
-
- // Make the name a bit more human friendly
- name.replace( QLatin1Char('.'), QLatin1Char(' ') );
- pos = name.indexOf( QLatin1Char(' ') );
- if ( pos != 0 ) {
- name[ pos + 1 ] = name[ pos + 1 ].toUpper();
- }
- name[ 0 ] = name[ 0 ].toUpper();
- }
-
- if ( !m_manager->isUnique( name ) ) {
- name = m_manager->makeUnique( name );
- }
- return name;
-}
-
-
-void Identity::destroy()
-{
- m_manager->removeIdentityForced( m_identity->identityName() );
- m_manager->commit();
- m_identity = 0;
- emit info( i18n( "Identity removed." ) );
-}
-
-void Identity::setIdentityName(const QString& name)
-{
- m_identityName = name;
-}
-
-void Identity::setRealName( const QString &name )
-{
- m_realName = name;
-}
-
-void Identity::setOrganization( const QString &org )
-{
- m_organization = org;
-}
-
-void Identity::setEmail( const QString &email )
-{
- m_email = email;
-}
-
-uint Identity::uoid() const
-{
- return m_identity->uoid();
-}
-
-void Identity::setTransport(QObject* transport)
-{
- m_transport = qobject_cast( transport );
- setDependsOn( qobject_cast( transport ) );
-}
-
-void Identity::setSignature(const QString& sig)
-{
- m_signature = sig;
-}
-
-void Identity::setPreferredCryptoMessageFormat(const QString& format)
-{
- m_prefCryptoFormat = format;
-}
-
-void Identity::setXFace(const QString& xface)
-{
- m_xface = xface;
-}
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/identity.h kdepim-runtime-15.08.0/accountwizard/identity.h
--- kdepim-runtime-4.14.6/accountwizard/identity.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/identity.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,68 +0,0 @@
-/*
- Copyright (c) 2010-2015 Laurent Montel
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef IDENTITY_H
-#define IDENTITY_H
-
-#include "setupobject.h"
-
-class Transport;
-
-namespace KPIMIdentities {
- class Identity;
- class IdentityManager;
-}
-
-class Identity : public SetupObject
-{
- Q_OBJECT
- public:
- explicit Identity( QObject *parent = 0 );
- ~Identity();
- void create();
- void destroy();
-
- public slots:
- Q_SCRIPTABLE void setIdentityName( const QString &name );
- Q_SCRIPTABLE void setRealName( const QString & name );
- Q_SCRIPTABLE void setEmail( const QString &email );
- Q_SCRIPTABLE void setOrganization( const QString &org );
- Q_SCRIPTABLE void setSignature( const QString &sig );
- Q_SCRIPTABLE uint uoid() const;
- Q_SCRIPTABLE void setTransport( QObject* transport );
- Q_SCRIPTABLE void setPreferredCryptoMessageFormat( const QString &format );
- Q_SCRIPTABLE void setXFace( const QString &xface );
-
- protected:
- QString identityName() const;
-
- private:
- QString m_identityName;
- QString m_realName;
- QString m_email;
- QString m_organization;
- QString m_signature;
- QString m_prefCryptoFormat;
- QString m_xface;
- Transport *m_transport;
- KPIMIdentities::IdentityManager *m_manager;
- KPIMIdentities::Identity *m_identity;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/inprocess-main.cpp kdepim-runtime-15.08.0/accountwizard/inprocess-main.cpp
--- kdepim-runtime-4.14.6/accountwizard/inprocess-main.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/inprocess-main.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,46 +0,0 @@
-/*
- Copyright (c) 2010 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "dialog.h"
-#include "global.h"
-
-#include
-#include
-#include
-#include
-
-class AccountWizard : public QObject
-{
- Q_OBJECT
- public:
- explicit AccountWizard( QObject* parent = 0 ) : QObject( parent ) {}
-
- public slots:
- void run( const QStringList &types, QWidget *parent )
- {
- if ( !types.isEmpty() )
- Global::setTypeFilter( types );
- Dialog dlg( parent );
- dlg.exec();
- }
-};
-
-Q_EXPORT_PLUGIN2( accountwizard, AccountWizard )
-
-#include "inprocess-main.moc"
diff -Nru kdepim-runtime-4.14.6/accountwizard/ispdb/CMakeLists.txt kdepim-runtime-15.08.0/accountwizard/ispdb/CMakeLists.txt
--- kdepim-runtime-4.14.6/accountwizard/ispdb/CMakeLists.txt 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/ispdb/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-
-set(ispdb_srcs
- main.cpp
- ispdb.cpp
-)
-
-kde4_add_executable(ispdb ${ispdb_srcs})
-
-target_link_libraries(ispdb
- ${KDE4_KDECORE_LIBS}
- ${KDE4_KIO_LIBS}
- ${KDEPIMLIBS_KMIME_LIBS}
-)
-
-install(TARGETS ispdb ${INSTALL_TARGETS_DEFAULT_ARGS})
diff -Nru kdepim-runtime-4.14.6/accountwizard/ispdb/ispdb.cpp kdepim-runtime-15.08.0/accountwizard/ispdb/ispdb.cpp
--- kdepim-runtime-4.14.6/accountwizard/ispdb/ispdb.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/ispdb/ispdb.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,277 +0,0 @@
-/*
- Copyright (c) 2010 Omat Holding B.V.
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "ispdb.h"
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-Ispdb::Ispdb( QObject *parent )
- : QObject( parent ), mServerType( DataBase )
-{
-}
-
-Ispdb::~Ispdb()
-{
-}
-
-void Ispdb::setEmail( const QString& address )
-{
- KMime::Types::Mailbox box;
- box.fromUnicodeString( address );
- mAddr = box.addrSpec();
-}
-
-void Ispdb::start()
-{
- kDebug() << mAddr.asString();
- // we should do different things in here. But lets focus in the db first.
- lookupInDb();
-}
-
-void Ispdb::startJob( const KUrl&url )
-{
- QMap< QString, QVariant > map;
- map[QLatin1String("errorPage")] = false;
-
- KIO::TransferJob* job = KIO::get( url, KIO::NoReload, KIO::HideProgressInfo );
- job->setMetaData( map );
- connect( job, SIGNAL(result(KJob*)),
- this, SLOT(slotResult(KJob*)) );
- connect( job, SIGNAL(data(KIO::Job*,QByteArray)),
- this, SLOT(dataArrived(KIO::Job*,QByteArray)) );
-}
-
-void Ispdb::lookupInDb()
-{
- KUrl url;
- switch( mServerType )
- {
- case IspAutoConfig:
- {
- url = KUrl( QLatin1String("http://autoconfig.") + mAddr.domain.toLower() + QLatin1String("/mail/config-v1.1.xml?emailaddress=") + mAddr.asString().toLower() );
- Q_EMIT searchType(i18n("Lookup configuration: Email provider"));
- break;
- }
- case IspWellKnow:
- {
- url = KUrl( QLatin1String("http://") + mAddr.domain.toLower() + QLatin1String("/.well-known/autoconfig/mail/config-v1.1.xml") );
- Q_EMIT searchType(i18n("Lookup configuration: Trying common server name"));
- break;
- }
- case DataBase:
- {
- url = KUrl( QLatin1String("https://autoconfig.thunderbird.net/v1.1/") + mAddr.domain.toLower() );
- Q_EMIT searchType(i18n("Lookup configuration: Mozilla database"));
- break;
- }
- }
- startJob( url );
-}
-
-void Ispdb::slotResult( KJob* job )
-{
- if ( job->error() ) {
- kDebug() << "Fetching failed" << job->errorString();
- bool lookupFinished = false;
-
- switch( mServerType ) {
- case IspAutoConfig: {
- mServerType = IspWellKnow;
- break;
- }
- case IspWellKnow: {
- lookupFinished = true;
- break;
- }
- case DataBase: {
- mServerType = IspAutoConfig;
- break;
- }
- }
-
- if ( lookupFinished )
- {
- emit finished( false );
- return;
- }
- lookupInDb();
- return;
- }
-
- //kDebug() << mData;
- QDomDocument document;
- bool ok = document.setContent( mData );
- if ( !ok ) {
- kDebug() << "Could not parse xml" << mData;
- emit finished( false );
- return;
- }
-
- QDomElement docElem = document.documentElement();
- QDomNode m = docElem.firstChild(); // emailprovider
- QDomNode n = m.firstChild(); // emailprovider
-
- while ( !n.isNull() ) {
- QDomElement e = n.toElement();
- if ( !e.isNull() ) {
- //kDebug() << qPrintable( e.tagName() );
- const QString tagName( e.tagName() );
- if ( tagName == QLatin1String( "domain" ) )
- mDomains << e.text();
- else if ( tagName == QLatin1String( "displayName" ) )
- mDisplayName = e.text();
- else if ( tagName == QLatin1String( "displayShortName" ) )
- mDisplayShortName = e.text();
- else if ( tagName == QLatin1String( "incomingServer" )
- && e.attribute( QLatin1String("type") ) == QLatin1String( "imap" ) ) {
- server s = createServer( e );
- if (s.isValid())
- mImapServers.append( s );
- } else if ( tagName == QLatin1String( "incomingServer" )
- && e.attribute( QLatin1String("type") ) == QLatin1String( "pop3" ) ) {
- server s = createServer( e );
- if (s.isValid())
- mPop3Servers.append( s );
- } else if ( tagName == QLatin1String( "outgoingServer" )
- && e.attribute( QLatin1String("type") ) == QLatin1String( "smtp" ) ) {
- server s = createServer( e );
- if (s.isValid())
- mSmtpServers.append( s );
- }
- }
- n = n.nextSibling();
- }
-
- // comment this section out when you are tired of it...
- kDebug() << "------------------ summary --------------";
- kDebug() << "Domains" << mDomains;
- kDebug() << "Name" << mDisplayName << "(" << mDisplayShortName << ")";
- kDebug() << "Imap servers:";
- foreach ( const server& s, mImapServers ) {
- kDebug() << s.hostname << s.port << s.socketType << s.username << s.authentication;
- }
- kDebug() << "pop3 servers:";
- foreach ( const server& s, mPop3Servers ) {
- kDebug() << s.hostname << s.port << s.socketType << s.username << s.authentication;
- }
- kDebug() << "smtp servers:";
- foreach ( const server& s, mSmtpServers ) {
- kDebug() << s.hostname << s.port << s.socketType << s.username << s.authentication;
- }
- // end section.
-
- emit finished( true );
-}
-
-server Ispdb::createServer( const QDomElement& n )
-{
- QDomNode o = n.firstChild();
- server s;
- while ( !o.isNull() ) {
- QDomElement f = o.toElement();
- if ( !f.isNull() ) {
- const QString tagName( f.tagName() );
- if ( tagName == QLatin1String( "hostname" ) )
- s.hostname = replacePlaceholders( f.text() );
- else if ( tagName == QLatin1String( "port" ) )
- s.port = f.text().toInt();
- else if ( tagName == QLatin1String( "socketType" ) ) {
- const QString type( f.text() );
- if ( type == QLatin1String( "plain" ) )
- s.socketType = None;
- else if ( type == QLatin1String( "SSL" ) )
- s.socketType = SSL;
- if ( type == QLatin1String( "STARTTLS" ) )
- s.socketType = StartTLS;
- } else if ( tagName == QLatin1String( "username" ) ) {
- s.username = replacePlaceholders( f.text() );
- } else if ( tagName == QLatin1String( "authentication" ) ) {
- const QString type( f.text() );
- if ( type == QLatin1String( "password-cleartext" )
- || type == QLatin1String( "plain" ) )
- s.authentication = Plain;
- else if ( type == QLatin1String( "password-encrypted" )
- || type == QLatin1String( "secure" ) )
- s.authentication = CramMD5;
- else if ( type == QLatin1String( "NTLM" ) )
- s.authentication = NTLM;
- else if ( type == QLatin1String( "GSSAPI" ) )
- s.authentication = GSSAPI;
- else if ( type == QLatin1String( "client-ip-based" ) )
- s.authentication = ClientIP;
- else if ( type == QLatin1String( "none" ) )
- s.authentication = NoAuth;
- }
- }
- o = o.nextSibling();
- }
- return s;
-}
-
-QString Ispdb::replacePlaceholders( const QString& in )
-{
- QString out( in );
- out.replace( QLatin1String("%EMAILLOCALPART%"), mAddr.localPart );
- out.replace( QLatin1String("%EMAILADDRESS%"), mAddr.asString() );
- out.replace( QLatin1String("%EMAILDOMAIN%"), mAddr.domain );
- return out;
-}
-
-void Ispdb::dataArrived( KIO::Job*, const QByteArray& data )
-{
- mData.append( data );
-}
-
-// The getters
-
-QStringList Ispdb::relevantDomains() const
-{
- return mDomains;
-}
-
-QString Ispdb::name( length l ) const
-{
- if ( l == Long )
- return mDisplayName;
- else if ( l == Short )
- return mDisplayShortName;
- else
- return QString(); //make compiler happy. Not me.
-}
-
-QList< server > Ispdb::imapServers() const
-{
- return mImapServers;
-}
-
-QList< server > Ispdb::pop3Servers() const
-{
- return mPop3Servers;
-}
-
-QList< server > Ispdb::smtpServers() const
-{
- return mSmtpServers;
-}
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/ispdb/ispdb.h kdepim-runtime-15.08.0/accountwizard/ispdb/ispdb.h
--- kdepim-runtime-4.14.6/accountwizard/ispdb/ispdb.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/ispdb/ispdb.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,133 +0,0 @@
-/*
- Copyright (c) 2010 Omat Holding B.V.
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef ISPDB_H
-#define ISPDB_H
-
-#include
-
-#include
-#include
-
-class QDomElement;
-
-struct server;
-
-/**
- This class will search in Mozilla's database for an xml file
- describing the isp data belonging to that address. This class
- searches and wraps the result for further usage. References:
- https://wiki.mozilla.org/Thunderbird:Autoconfiguration
- https://developer.mozilla.org/en/Thunderbird/Autoconfiguration
- https://ispdb.mozillamessaging.com/
-*/
-class Ispdb : public QObject
-{
- Q_OBJECT
-public:
- enum socketType { None = 0, SSL, StartTLS };
-
- /**
- Ispdb uses custom authtyps, hence the enum here.
- @see https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
- In particular, note that Ispdb's Plain represents both Cleartext and AUTH Plain
- We will always treat it as Cleartext
- */
- enum authType { Plain = 0, CramMD5, NTLM, GSSAPI, ClientIP, NoAuth };
- enum length { Long = 0, Short };
-
- /** Constructor */
- explicit Ispdb( QObject *parent = 0 );
-
- /** Destructor */
- ~Ispdb();
-
- /** After finished() has been emitted you can
- retrieve the domains that are covered by these
- settings */
- QStringList relevantDomains() const;
-
- /** After finished() has been emitted you can
- get the name of the provider, you can get a long
- name and a short one */
- QString name( length ) const;
-
- /** After finished() has been emitted you can
- get a list of imap servers available for this provider */
- QList< server > imapServers() const;
-
- /** After finished() has been emitted you can
- get a list of pop3 servers available for this provider */
- QList< server > pop3Servers() const;
-
- /** After finished() has been emitted you can
- get a list of smtp servers available for this provider */
- QList< server > smtpServers() const;
-
-public slots:
- /** Sets the emailaddress you want to servers for */
- void setEmail( const QString& );
-
- /** Starts looking up the servers which belong to the e-mailaddress */
- void start();
-
-private slots:
- void slotResult( KJob* );
- void dataArrived( KIO::Job*, const QByteArray& data );
-
-signals:
- /** emitted when done. **/
- void finished( bool );
- void searchType( const QString &type );
-
-private:
- enum searchServerType { IspAutoConfig = 0, IspWellKnow, DataBase };
-
- server createServer( const QDomElement& n );
- void lookupInDb();
- QString replacePlaceholders( const QString& );
- void startJob( const KUrl&url );
-
- KMime::Types::AddrSpec mAddr; // emailaddress
- QByteArray mData; // storage of incoming data from kio
-
- // storage of the results
- QStringList mDomains;
- QString mDisplayName, mDisplayShortName;
- QList< server > mImapServers, mPop3Servers, mSmtpServers;
- Ispdb::searchServerType mServerType;
-};
-
-struct server {
- server() {
- port = -1;
- authentication = Ispdb::Plain;
- socketType = Ispdb::None;
- }
- bool isValid() const {
- return (port != -1);
- }
- QString hostname;
- int port;
- Ispdb::socketType socketType;
- QString username;
- Ispdb::authType authentication;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/ispdb/main.cpp kdepim-runtime-15.08.0/accountwizard/ispdb/main.cpp
--- kdepim-runtime-4.14.6/accountwizard/ispdb/main.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/ispdb/main.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,61 +0,0 @@
-/*
- Copyright (c) 2010 Omat Holding B.V.
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "ispdb.h"
-
-#include
-#include
-#include
-#include
-
-int main( int argc, char **argv )
-{
- KAboutData aboutData( "ispdb", 0,
- ki18n( "ISPDB Assistant" ),
- "0.1",
- ki18n( "Helps setting up PIM accounts" ),
- KAboutData::License_LGPL,
- ki18n( "(c) 2010 Omat Holding B.V." ),
- KLocalizedString(),
- "http://pim.kde.org/akonadi/" );
- aboutData.setProgramIconName( "akonadi" );
- aboutData.addAuthor( ki18n( "Tom Albers" ), ki18n( "Author" ), "toma@kde.org" );
-
- KCmdLineArgs::init( argc, argv, &aboutData );
- KCmdLineOptions options;
- options.add( "email ", ki18n( "Tries to fetch the settings for that email address" ) );
- KCmdLineArgs::addCmdLineOptions( options );
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
-
- QString email;
- if ( !args->getOption( "email" ).isEmpty() )
- email = args->getOption( "email" );
- else
- email = "blablabla@gmail.com";
-
-
- KApplication app;
-
- Ispdb ispdb;
- ispdb.setEmail( email );
- ispdb.start();
-
- return app.exec();
-
-}
diff -Nru kdepim-runtime-4.14.6/accountwizard/ldap.cpp kdepim-runtime-15.08.0/accountwizard/ldap.cpp
--- kdepim-runtime-4.14.6/accountwizard/ldap.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/ldap.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,117 +0,0 @@
-/*
- Copyright (c) 2010-2015 Laurent Montel
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "ldap.h"
-
-#include
-#include
-#include
-
-
-Ldap::Ldap( QObject *parent )
- : SetupObject( parent )
-{
-}
-
-Ldap::~Ldap()
-{
-}
-
-void Ldap::create()
-{
- emit info( i18n( "Setting up LDAP server..." ) );
-
- if ( m_server.isEmpty() || m_user.isEmpty() )
- return;
-
- const QString host = m_server;
-
- // Figure out the basedn
- QString basedn = host;
- // If the user gave a full email address, the domain name
- // of that overrides the server name for the ldap dn
- const QString user = m_user;
- int pos = user.indexOf( QLatin1String("@") );
- if ( pos > 0 ) {
- const QString h = user.mid( pos+1 );
- if ( !h.isEmpty() )
- // The user did type in a domain on the email address. Use that
- basedn = h;
- }
- { // while we're here, write default domain
- KConfig c( QLatin1String("kmail2rc") );
- KConfigGroup group = c.group( "General" );
- group.writeEntry( "Default domain", basedn );
- }
-
- basedn.replace( QLatin1Char('.'), QLatin1String(",dc=") );
- basedn.prepend( QLatin1String("dc=") );
-
- // Set the changes
- KConfig c( QLatin1String("kabldaprc") );
- KConfigGroup group = c.group( "LDAP" );
- bool hasMyServer = false;
- uint selHosts = group.readEntry( "NumSelectedHosts", 0 );
- for ( uint i = 0 ; i < selHosts && !hasMyServer; ++i )
- if ( group.readEntry( QString::fromLatin1( "SelectedHost%1" ).arg( i ), QString() ) == host )
- hasMyServer = true;
- if ( !hasMyServer ) {
- group.writeEntry( "NumSelectedHosts", selHosts + 1 );
- group.writeEntry( QString::fromLatin1( "SelectedHost%1" ).arg( selHosts ), host );
- group.writeEntry( QString::fromLatin1( "SelectedBase%1" ).arg( selHosts ), basedn );
- group.writeEntry( QString::fromLatin1( "SelectedPort%1" ).arg( selHosts ), "389" );
- if ( !m_authMethod.isEmpty() ) {
- group.writeEntry( QString::fromLatin1( "SelectedAuth%1" ).arg( selHosts ), m_authMethod );
- group.writeEntry( QString::fromLatin1( "SelectedBind%1" ).arg( selHosts ), m_bindDn );
- group.writeEntry( QString::fromLatin1( "SelectedPwdBind%1" ).arg( selHosts ), m_password );
- }
- }
- emit finished( i18n( "LDAP set up." ) );
-}
-
-void Ldap::destroy()
-{
- emit info( i18n( "LDAP not configuring." ) );
-}
-
-void Ldap::setUser( const QString &user )
-{
- m_user = user;
-}
-
-void Ldap::setServer( const QString &server )
-{
- m_server = server;
-}
-
-void Ldap::setAuthenticationMethod(const QString& meth)
-{
- m_authMethod = meth;
-}
-
-void Ldap::setBindDn(const QString& bindDn)
-{
- m_bindDn = bindDn;
-}
-
-void Ldap::setPassword(const QString& password)
-{
- m_password = password;
-}
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/ldap.h kdepim-runtime-15.08.0/accountwizard/ldap.h
--- kdepim-runtime-4.14.6/accountwizard/ldap.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/ldap.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,48 +0,0 @@
-/*
- Copyright (c) 2010-2015 Laurent Montel
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef LDAP_H
-#define LDAP_H
-
-#include "setupobject.h"
-
-
-class Ldap : public SetupObject
-{
- Q_OBJECT
- public:
- explicit Ldap( QObject *parent = 0 );
- ~Ldap();
- void create();
- void destroy();
- public slots:
- Q_SCRIPTABLE void setUser( const QString & name );
- Q_SCRIPTABLE void setServer( const QString &server );
- Q_SCRIPTABLE void setAuthenticationMethod( const QString &meth );
- Q_SCRIPTABLE void setBindDn( const QString &bindDn );
- Q_SCRIPTABLE void setPassword( const QString &password );
- private:
- QString m_user;
- QString m_server;
- QString m_bindDn;
- QString m_authMethod;
- QString m_password;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/loadpage.cpp kdepim-runtime-15.08.0/accountwizard/loadpage.cpp
--- kdepim-runtime-4.14.6/accountwizard/loadpage.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/loadpage.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,88 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "loadpage.h"
-#include "global.h"
-#include
-#include
-#include
-#include
-#include
-
-LoadPage::LoadPage(KAssistantDialog* parent) :
- Page( parent ),
- m_action( 0 )
-{
- ui.setupUi( this );
- setValid( false );
-}
-
-void LoadPage::enterPageNext()
-{
- setValid( false );
- // FIXME: deletion seems to delete the exported objects as well, killing the entire wizard...
- //delete m_action;
- m_action = 0;
- emit aboutToStart();
-
- const KConfig f( Global::assistant() );
- KConfigGroup grp( &f, "Wizard" );
- const QString scriptFile = grp.readEntry( "Script", QString() );
- if ( scriptFile.isEmpty() ) {
- ui.statusLabel->setText( i18n( "No script specified in '%1'.", Global::assistant() ) );
- return;
- }
- if ( !QFile::exists( Global::assistantBasePath() + scriptFile ) ) {
- ui.statusLabel->setText( i18n( "Unable to load assistant: File '%1' does not exist.", Global::assistantBasePath() + scriptFile ) );
- return;
- }
- ui.statusLabel->setText( i18n( "Loading script '%1'...", Global::assistantBasePath() + scriptFile ) );
-
- m_action = new Kross::Action( this, QLatin1String("AccountWizard") );
- typedef QPair ObjectStringPair;
- foreach ( const ObjectStringPair &exportedObject, m_exportedObjects )
- m_action->addQObject( exportedObject.first, exportedObject.second );
-
- if ( !m_action->setFile( Global::assistantBasePath() + scriptFile ) ) {
- ui.statusLabel->setText( i18n( "Failed to load script: '%1'.", m_action->errorMessage() ) );
- return;
- }
-
- KConfigGroup grpTranslate( &f, "Translate" );
- const QString poFileName = grpTranslate.readEntry( "Filename" );
- if ( !poFileName.isEmpty() )
- KGlobal::locale()->insertCatalog( poFileName );
-
- m_action->trigger();
-
- m_parent->next();
-}
-
-void LoadPage::enterPageBack()
-{
- // TODO: if we are the first page, call enterPageNext(), hm, can we get here then at all?
- m_parent->back();
-}
-
-void LoadPage::exportObject(QObject* object, const QString& name)
-{
- m_exportedObjects.push_back( qMakePair( object, name ) );
-}
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/loadpage.h kdepim-runtime-15.08.0/accountwizard/loadpage.h
--- kdepim-runtime-4.14.6/accountwizard/loadpage.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/loadpage.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,51 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef LOADPAGE_H
-#define LOADPAGE_H
-
-#include "page.h"
-
-#include "ui_loadpage.h"
-
-namespace Kross {
-class Action;
-}
-
-class LoadPage : public Page
-{
- Q_OBJECT
- public:
- explicit LoadPage( KAssistantDialog *parent );
-
- virtual void enterPageNext();
- virtual void enterPageBack();
-
- void exportObject( QObject *object, const QString &name );
-
- Q_SIGNALS:
- void aboutToStart();
-
- private:
- Ui::LoadPage ui;
- QVector< QPair< QObject*, QString > > m_exportedObjects;
- Kross::Action* m_action;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/main.cpp kdepim-runtime-15.08.0/accountwizard/main.cpp
--- kdepim-runtime-4.14.6/accountwizard/main.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/main.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,81 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "dialog.h"
-#include "global.h"
-
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-
-#include
-
-int main( int argc, char **argv )
-{
- KAboutData aboutData( "accountwizard", 0,
- ki18n( "Account Assistant" ),
- "0.1",
- ki18n( "Helps setting up PIM accounts" ),
- KAboutData::License_LGPL,
- ki18n( "(c) 2009 the Akonadi developers" ),
- KLocalizedString(),
- "http://pim.kde.org/akonadi/" );
- aboutData.setProgramIconName( QLatin1String("akonadi") );
- aboutData.addAuthor( ki18n( "Volker Krause" ), ki18n( "Author" ), "vkrause@kde.org" );
- aboutData.addAuthor( ki18n( "Laurent Montel" ), KLocalizedString() , "montel@kde.org" );
-
- KCmdLineArgs::init( argc, argv, &aboutData );
-
- KCmdLineOptions options;
- options.add( "type ", ki18n( "Only offer accounts that support the given type." ) );
- options.add( "assistant ", ki18n( "Run the specified assistant." ) );
- options.add( "package ", ki18n( "unpack fullpath on startup and launch that assistant" ) );
- KCmdLineArgs::addCmdLineOptions( options );
- KUniqueApplication::addCmdLineOptions();
-
- if ( !KUniqueApplication::start() ) {
- fprintf( stderr, "accountwizard is already running!\n" );
- exit( 0 );
- }
-
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
-
- KUniqueApplication app;
- KGlobal::locale()->insertCatalog( QLatin1String("libakonadi") );
-
- Akonadi::Control::start( 0 );
-
- if ( !args->getOption( "package" ).isEmpty() ) {
- Global::setAssistant( Global::unpackAssistant( KUrl( args->getOption( "package" ) ) ) );
- } else
- Global::setAssistant( args->getOption( "assistant" ) );
-
- if ( !args->getOption( "type" ).isEmpty() )
- Global::setTypeFilter( args->getOption( "type" ).split( QLatin1Char(',') ) );
- args->clear();
- Dialog dlg( 0/*, Qt::WindowStaysOnTopHint*/ );
- dlg.show();
-
- return app.exec();
-}
diff -Nru kdepim-runtime-4.14.6/accountwizard/Messages.sh kdepim-runtime-15.08.0/accountwizard/Messages.sh
--- kdepim-runtime-4.14.6/accountwizard/Messages.sh 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/Messages.sh 1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-#!/bin/sh
-$EXTRACTRC ui/*.ui >> rc.cpp
-$XGETTEXT *.cpp ispdb/*.cpp -o $podir/accountwizard.pot
diff -Nru kdepim-runtime-4.14.6/accountwizard/page.cpp kdepim-runtime-15.08.0/accountwizard/page.cpp
--- kdepim-runtime-4.14.6/accountwizard/page.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/page.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,60 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "page.h"
-#include
-#include
-
-Page::Page(KAssistantDialog* parent):
- QWidget(parent),
- m_item( 0 ),
- m_parent( parent ),
- m_valid( false )
-{
-}
-
-
-void Page::setPageWidgetItem(KPageWidgetItem* item)
-{
- m_item = item;
- m_parent->setValid( m_item, m_valid );
-}
-
-
-void Page::setValid(bool valid)
-{
- if ( !m_item )
- m_valid = valid;
- else
- m_parent->setValid( m_item, valid );
-}
-
-void Page::nextPage()
-{
- m_parent->next();
-}
-
-void Page::enterPageBack() {}
-void Page::enterPageNext() {}
-void Page::leavePageBack() {}
-void Page::leavePageNext() {}
-
-void Page::leavePageBackRequested() { emit leavePageBackOk(); }
-void Page::leavePageNextRequested() { emit leavePageNextOk(); }
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/page.h kdepim-runtime-15.08.0/accountwizard/page.h
--- kdepim-runtime-4.14.6/accountwizard/page.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/page.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef PAGE_H
-#define PAGE_H
-
-#include
-
-class KAssistantDialog;
-class KPageWidgetItem;
-
-class Page : public QWidget
-{
- Q_OBJECT
- public:
- explicit Page( KAssistantDialog *parent );
-
- void setPageWidgetItem( KPageWidgetItem *item );
-
- virtual void enterPageNext();
- virtual void enterPageBack();
- virtual void leavePageNext();
- virtual void leavePageBack();
- virtual void leavePageNextRequested();
- virtual void leavePageBackRequested();
-
- signals:
- Q_SCRIPTABLE void pageEnteredNext();
- Q_SCRIPTABLE void pageEnteredBack();
- Q_SCRIPTABLE void pageLeftNext();
- Q_SCRIPTABLE void pageLeftBack();
- Q_SCRIPTABLE void leavePageNextOk();
- Q_SCRIPTABLE void leavePageBackOk();
-
- public slots:
- Q_SCRIPTABLE void setValid( bool valid );
- Q_SCRIPTABLE void nextPage();
-
- protected:
- KPageWidgetItem *m_item;
- KAssistantDialog *m_parent;
-
- private:
- friend class Dialog;
- bool m_valid;
-};
-
-#endif // PAGE_H
diff -Nru kdepim-runtime-4.14.6/accountwizard/personaldatapage.cpp kdepim-runtime-15.08.0/accountwizard/personaldatapage.cpp
--- kdepim-runtime-4.14.6/accountwizard/personaldatapage.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/personaldatapage.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,278 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
- Copyright (c) 2010 Tom Albers
- Copyright (c) 2012 Laurent Montel
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "personaldatapage.h"
-
-#include "config-enterprise.h"
-#include "global.h"
-#include "dialog.h"
-#include "transport.h"
-#include "resource.h"
-#include "ispdb/ispdb.h"
-
-#include
-#include
-
-#include
-
-#include
-
-
-QString accountName(Ispdb *ispdb, QString username)
-{
- const int pos(username.indexOf(QLatin1Char('@')));
- username = username.left(pos);
- return ispdb->name( Ispdb::Long ) + QString::fromLatin1(" (%1)").arg(username);
-}
-
-PersonalDataPage::PersonalDataPage(Dialog* parent) :
- Page( parent ), mIspdb( 0 ), mSetupManager( parent->setupManager() )
-{
- QWidget *pageParent = this;
-
- ui.setupUi( pageParent );
-
- KPIMUtils::EmailValidator* emailValidator = new KPIMUtils::EmailValidator( this );
- ui.emailEdit->setValidator( emailValidator );
-
- // KEmailSettings defaults
- ui.nameEdit->setText( mSetupManager->name() );
- ui.emailEdit->setText( mSetupManager->email() );
- slotTextChanged();
- connect( ui.emailEdit, SIGNAL(textChanged(QString)), SLOT(slotTextChanged()) );
- connect( ui.nameEdit, SIGNAL(textChanged(QString)), SLOT(slotTextChanged()) );
- connect( ui.createAccountPb, SIGNAL(clicked()), SLOT(slotCreateAccountClicked()) );
- connect( ui.buttonGroup, SIGNAL(buttonClicked(QAbstractButton*)), SLOT(slotRadioButtonClicked(QAbstractButton*)) );
-#ifdef KDEPIM_ENTERPRISE_BUILD
- ui.checkOnlineGroupBox->setChecked( false );
-#endif
-}
-
-void PersonalDataPage::setHideOptionInternetSearch( bool hide )
-{
- ui.checkOnlineGroupBox->setChecked( !hide );
- ui.checkOnlineGroupBox->setVisible( !hide );
-}
-
-void PersonalDataPage::slotRadioButtonClicked( QAbstractButton* button)
-{
- QString smptHostname;
- if ( !mIspdb->smtpServers().isEmpty() ) {
- server s = mIspdb->smtpServers().first();
- smptHostname = s.hostname;
- }
- ui.outgoingLabel->setText( i18n( "SMTP, %1", smptHostname ) );
- if ( button == ui.imapAccount ) {
- server simap = mIspdb->imapServers().first(); // should be ok.
- ui.incommingLabel->setText( i18n( "IMAP, %1", simap.hostname ) );
- ui.usernameLabel->setText( simap.username );
- } else if ( button == ui.pop3Account ) {
- server spop3 = mIspdb->pop3Servers().first(); // should be ok.
- ui.incommingLabel->setText( i18n( "POP3, %1", spop3.hostname ) );
- ui.usernameLabel->setText( spop3.username );
- }
-}
-
-void PersonalDataPage::slotCreateAccountClicked()
-{
- configureSmtpAccount();
- if ( ui.imapAccount->isChecked() )
- configureImapAccount();
- else
- configurePop3Account();
- emit leavePageNextOk(); // go to the next page
- mSetupManager->execute();
-}
-
-void PersonalDataPage::slotTextChanged()
-{
- // Ignore the password field, as that can be empty when auth is based on ip-address.
- setValid( !ui.emailEdit->text().isEmpty() &&
- !ui.nameEdit->text().isEmpty() &&
- KPIMUtils::isValidSimpleAddress( ui.emailEdit->text() ) );
-}
-
-void PersonalDataPage::leavePageNext()
-{
- ui.stackedPage->setCurrentIndex( 0 );
- ui.imapAccount->setChecked( true );
- mSetupManager->setPersonalDataAvailable( true );
- mSetupManager->setName( ui.nameEdit->text() );
- mSetupManager->setPassword( ui.passwordEdit->text() );
- mSetupManager->setEmail( ui.emailEdit->text().trimmed() );
-
- if ( ui.checkOnlineGroupBox->isChecked() ) {
- // since the user can go back and forth, explicitly disable the man page
- emit manualWanted( false );
- setCursor( Qt::BusyCursor );
- ui.mProgress->start();
- kDebug() << "Searching on internet";
- delete mIspdb;
- mIspdb = new Ispdb( this );
- connect(mIspdb, SIGNAL(searchType(QString)), this, SLOT(slotSearchType(QString)));
- mIspdb->setEmail( ui.emailEdit->text() );
- mIspdb->start();
-
- connect( mIspdb, SIGNAL(finished(bool)),
- SLOT(ispdbSearchFinished(bool)) );
- } else {
- emit manualWanted( true ); // enable the manual page
- emit leavePageNextOk(); // go to the next page
- }
-}
-
-void PersonalDataPage::ispdbSearchFinished( bool ok )
-{
- kDebug() << ok;
-
- unsetCursor();
- ui.mProgress->stop();
- if ( ok ) {
-
- if ( !mIspdb->imapServers().isEmpty() && !mIspdb->pop3Servers().isEmpty() )
- {
- ui.stackedPage->setCurrentIndex( 1 );
- slotRadioButtonClicked( ui.imapAccount );
- }
- else
- automaticConfigureAccount();
-
- } else {
- emit manualWanted( true ); // enable the manual page
- emit leavePageNextOk();
- }
-}
-
-void PersonalDataPage::slotSearchType(const QString &type)
-{
- ui.mProgress->setActiveLabel(type);
-}
-
-void PersonalDataPage::configureSmtpAccount()
-{
- if ( !mIspdb->smtpServers().isEmpty() ) {
- server s = mIspdb->smtpServers().first(); // should be ok.
- kDebug() << "Configuring transport for" << s.hostname;
-
- QObject* object = mSetupManager->createTransport( QLatin1String("smtp") );
- Transport* t = qobject_cast( object );
- t->setName( accountName(mIspdb,s.username) );
- t->setHost( s.hostname );
- t->setPort( s.port );
- t->setUsername( s.username );
- t->setPassword( ui.passwordEdit->text() );
- switch ( s.authentication ) {
- case Ispdb::Plain: t->setAuthenticationType( QLatin1String("plain") ); break;
- case Ispdb::CramMD5: t->setAuthenticationType( QLatin1String("cram-md5") ); break;
- case Ispdb::NTLM: t->setAuthenticationType( QLatin1String("ntlm") ); break;
- case Ispdb::GSSAPI: t->setAuthenticationType( QLatin1String("gssapi") ); break;
- case Ispdb::ClientIP: break;
- case Ispdb::NoAuth: break;
- default: break;
- }
- switch ( s.socketType ) {
- case Ispdb::Plain: t->setEncryption( QLatin1String("none") );break;
- case Ispdb::SSL: t->setEncryption( QLatin1String("ssl") );break;
- case Ispdb::StartTLS: t->setEncryption( QLatin1String("tls") );break;
- default: break;
- }
- } else
- kDebug() << "No transport to be created....";
-}
-
-void PersonalDataPage::configureImapAccount()
-{
- if ( !mIspdb->imapServers().isEmpty() ) {
- server s = mIspdb->imapServers().first(); // should be ok.
- kDebug() << "Configuring imap for" << s.hostname;
-
- QObject* object = mSetupManager->createResource( QLatin1String("akonadi_imap_resource") );
- Resource* t = qobject_cast( object );
- t->setName( accountName(mIspdb,s.username) );
- t->setOption( QLatin1String("ImapServer"), s.hostname );
- t->setOption( QLatin1String("ImapPort"), s.port );
- t->setOption( QLatin1String("UserName"), s.username );
- t->setOption( QLatin1String("Password"), ui.passwordEdit->text() );
- switch ( s.authentication ) {
- case Ispdb::Plain: t->setOption( QLatin1String("Authentication"), MailTransport::Transport::EnumAuthenticationType::CLEAR ); break;
- case Ispdb::CramMD5: t->setOption( QLatin1String("Authentication"), MailTransport::Transport::EnumAuthenticationType::CRAM_MD5 ); break;
- case Ispdb::NTLM: t->setOption( QLatin1String("Authentication"), MailTransport::Transport::EnumAuthenticationType::NTLM ); break;
- case Ispdb::GSSAPI: t->setOption( QLatin1String("Authentication"), MailTransport::Transport::EnumAuthenticationType::GSSAPI ); break;
- case Ispdb::ClientIP: break;
- case Ispdb::NoAuth: break;
- default: break;
- }
- switch ( s.socketType ) {
- case Ispdb::None: t->setOption( QLatin1String("Safety"), QLatin1String("None") );break;
- case Ispdb::SSL: t->setOption( QLatin1String("Safety"), QLatin1String("SSL") );break;
- case Ispdb::StartTLS: t->setOption( QLatin1String("Safety"), QLatin1String("STARTTLS") );break;
- default: break;
- }
- }
-}
-
-void PersonalDataPage::configurePop3Account()
-{
- if ( !mIspdb->pop3Servers().isEmpty() ) {
- server s = mIspdb->pop3Servers().first(); // should be ok.
- kDebug() << "No Imap to be created, configuring pop3 for" << s.hostname;
-
- QObject* object = mSetupManager->createResource( QLatin1String("akonadi_pop3_resource") );
- Resource* t = qobject_cast( object );
- t->setName( accountName(mIspdb,s.username) );
- t->setOption( QLatin1String("Host"), s.hostname );
- t->setOption( QLatin1String("Port"), s.port );
- t->setOption( QLatin1String("Login"), s.username );
- t->setOption( QLatin1String("Password"), ui.passwordEdit->text() );
- switch ( s.authentication ) {
- case Ispdb::Plain: t->setOption( QLatin1String("AuthenticationMethod"), MailTransport::Transport::EnumAuthenticationType::PLAIN ); break;
- case Ispdb::CramMD5: t->setOption( QLatin1String("AuthenticationMethod"), MailTransport::Transport::EnumAuthenticationType::CRAM_MD5 ); break;
- case Ispdb::NTLM: t->setOption( QLatin1String("AuthenticationMethod"), MailTransport::Transport::EnumAuthenticationType::NTLM ); break;
- case Ispdb::GSSAPI: t->setOption( QLatin1String("AuthenticationMethod"), MailTransport::Transport::EnumAuthenticationType::GSSAPI ); break;
- case Ispdb::ClientIP:
- case Ispdb::NoAuth:
- default: t->setOption( QLatin1String("AuthenticationMethod"), MailTransport::Transport::EnumAuthenticationType::CLEAR ); break;
- }
- switch ( s.socketType ) {
- case Ispdb::SSL: t->setOption( QLatin1String("UseSSL"), 1 );break;
- case Ispdb::StartTLS: t->setOption( QLatin1String("UseTLS"), 1 );break;
- case Ispdb::None:
- default: t->setOption( QLatin1String("UseTLS"), 1 ); break;
- }
- }
-}
-
-void PersonalDataPage::automaticConfigureAccount()
-{
- configureSmtpAccount();
- configureImapAccount();
- configurePop3Account();
- emit leavePageNextOk(); // go to the next page
- mSetupManager->execute();
-}
-
-void PersonalDataPage::leavePageNextRequested()
-{
- // override base class with doing nothing...
-}
-
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/personaldatapage.h kdepim-runtime-15.08.0/accountwizard/personaldatapage.h
--- kdepim-runtime-4.14.6/accountwizard/personaldatapage.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/personaldatapage.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
- Copyright (c) 2010 Tom Albers
- Copyright (c) 2012 Laurent Montel
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef PERSONALDATA_H
-#define PERSONALDATA_H
-
-#include "page.h"
-#include "setupmanager.h"
-#include "dialog.h"
-
-#include "ui_personaldatapage.h"
-
-class Ispdb;
-
-class PersonalDataPage : public Page
-{
- Q_OBJECT
- public:
- explicit PersonalDataPage( Dialog* parent = 0 );
- void setHideOptionInternetSearch( bool );
-
- virtual void leavePageNext();
- virtual void leavePageNextRequested();
-
- private slots:
- void ispdbSearchFinished( bool ok );
- void slotTextChanged();
- void slotCreateAccountClicked();
- void slotRadioButtonClicked( QAbstractButton* button);
- void slotSearchType(const QString&);
-
- signals:
- void manualWanted( bool );
-
- private:
- void automaticConfigureAccount();
- void configureSmtpAccount();
- void configureImapAccount();
- void configurePop3Account();
-
- Ui::PersonalDataPage ui;
- Ispdb* mIspdb;
- SetupManager *mSetupManager;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/providerpage.cpp kdepim-runtime-15.08.0/accountwizard/providerpage.cpp
--- kdepim-runtime-4.14.6/accountwizard/providerpage.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/providerpage.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,176 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
- Copyright (c) 2010 Tom Albers
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "providerpage.h"
-#include "global.h"
-
-#include
-#include
-#include
-
-ProviderPage::ProviderPage(KAssistantDialog* parent) :
- Page( parent ),
- m_model( new QStandardItemModel( this ) ),
- m_downloadManager( new KNS3::DownloadManager( this ) ),
- m_newPageWanted( false ),
- m_newPageReady( false )
-{
- ui.setupUi( this );
-
- QSortFilterProxyModel *proxy = new QSortFilterProxyModel( this );
- proxy->setSourceModel( m_model );
- ui.listView->setModel( proxy );
- ui.searchLine->setProxy( proxy );
-
- m_fetchItem = new QStandardItem( i18n( "Fetching provider list..." ) );
- m_fetchItem->setFlags(Qt::NoItemFlags);
- m_model->appendRow( m_fetchItem );
-
- // we can start the search, whenever the user reaches this page, chances
- // are we have the full list.
- connect( m_downloadManager, SIGNAL(searchResult(KNS3::Entry::List)),
- SLOT(fillModel(KNS3::Entry::List)) );
- connect( m_downloadManager, SIGNAL(entryStatusChanged(KNS3::Entry)),
- SLOT(providerStatusChanged(KNS3::Entry)) );
- m_downloadManager->setSearchOrder( KNS3::DownloadManager::Alphabetical );
-
- connect( ui.listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(selectionChanged()) );
-
- kDebug();
-}
-
-void ProviderPage::startFetchingData()
-{
- m_downloadManager->search( 0, 100000 );
-}
-
-void ProviderPage::fillModel( const KNS3::Entry::List& list )
-{
- kDebug();
- m_model->removeRows( m_model->indexFromItem( m_fetchItem ).row(), 1 );
-
- // KNS3::Entry::Entry() is private, so we need to save the whole list.
- // we can not use a QHash or whatever, as that needs that constructor...
- m_providerEntries = list;
-
- foreach ( const KNS3::Entry& e, list ) {
- kDebug() << "Found Entry: " << e.name();
-
- QStandardItem *item = new QStandardItem( e.name() );
- item->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
- item->setData( e.name(), Qt::ToolTipRole );
- item->setData( e.id(), Qt::UserRole );
- item->setData( e.providerId(), Qt::UserRole+ 1 );
- m_model->appendRow( item );
- }
-}
-
-void ProviderPage::selectionChanged()
-{
- if ( ui.listView->selectionModel()->hasSelection() ) {
- setValid( true );
- } else {
- setValid( false );
- }
-}
-
-void ProviderPage::leavePageNext()
-{
- m_newPageReady = false;
- if ( !ui.listView->selectionModel()->hasSelection() )
- return;
- const QModelIndex index = ui.listView->selectionModel()->selectedIndexes().first();
- if ( !index.isValid() )
- return;
-
- const QSortFilterProxyModel *proxy = static_cast( ui.listView->model() );
- const QStandardItem* item = m_model->itemFromIndex( proxy->mapToSource( index ) );
- kDebug() << "Item selected:"<< item->text();
-
- // download and execute it...
- foreach ( const KNS3::Entry& e, m_providerEntries ) {
- if ( e.id() == item->data( Qt::UserRole ) &&
- e.providerId() == item->data( Qt::UserRole+ 1 ) ) {
-
- m_wantedProvider.entryId = e.id();
- m_wantedProvider.entryProviderId = e.providerId();
-
- if ( e.status() == KNS3::Entry::Installed ) {
- kDebug() << "already installed" << e.installedFiles();
- findDesktopAndSetAssistant( e.installedFiles() );
- } else {
- kDebug() << "Starting download for " << e.name();
- m_downloadManager->installEntry( e );
- }
-
- break;
- }
- }
-}
-
-void ProviderPage::providerStatusChanged( const KNS3::Entry& e )
-{
- kDebug() << e.name();
- if ( e.id() == m_wantedProvider.entryId &&
- e.providerId() == m_wantedProvider.entryProviderId &&
- e.status() == KNS3::Entry::Installed ) {
- findDesktopAndSetAssistant( e.installedFiles() );
- }
-}
-
-void ProviderPage::findDesktopAndSetAssistant( const QStringList& list )
-{
- foreach ( const QString& file, list ) {
- kDebug() << file;
- if ( file.endsWith( QLatin1String ( ".desktop" ) ) ) {
- kDebug() << "Yay, a desktop file!" << file;
- Global::setAssistant( file );
- m_newPageReady = true;
- if ( m_newPageWanted ) {
- kDebug() << "New page was already requested, now we are done, approve it";
- emit leavePageNextOk();
- }
- break;
- }
- }
-}
-
-QTreeView *ProviderPage::treeview() const
-{
- return ui.listView;
-}
-
-void ProviderPage::leavePageBackRequested()
-{
- emit leavePageBackOk();
- emit ghnsNotWanted();
-}
-
-void ProviderPage::leavePageNextRequested()
-{
- m_newPageWanted = true;
- if ( m_newPageReady ) {
- kDebug() << "New page requested and we are done, so ok...";
- emit leavePageNextOk();
- } else {
- kDebug() << "New page requested, but we are not done yet...";
- }
-}
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/providerpage.h kdepim-runtime-15.08.0/accountwizard/providerpage.h
--- kdepim-runtime-4.14.6/accountwizard/providerpage.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/providerpage.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,75 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
- Copyright (c) 2010 Tom Albers
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef PROVIDERPAGE_H
-#define PROVIDERPAGE_H
-
-#include "page.h"
-#include
-
-#include "ui_providerpage.h"
-#include
-
-struct Provider {
- QString entryId;
- QString entryProviderId;
-};
-
-namespace KNS3 {
- class DownloadManager;
-}
-
-class ProviderPage : public Page
-{
- Q_OBJECT
- public:
- explicit ProviderPage( KAssistantDialog* parent = 0 );
-
- virtual void leavePageNext();
- virtual void leavePageNextRequested();
- virtual void leavePageBackRequested();
-
- QTreeView *treeview() const;
-
- signals:
- void ghnsNotWanted();
-
- public slots:
- void startFetchingData();
-
- private slots:
- void fillModel( const KNS3::Entry::List& );
- void selectionChanged();
- void providerStatusChanged( const KNS3::Entry& );
-
- private:
- void findDesktopAndSetAssistant( const QStringList& list );
-
- Ui::ProviderPage ui;
- QStandardItemModel *m_model;
- QStandardItem *m_fetchItem;
- KNS3::DownloadManager *m_downloadManager;
- KNS3::Entry::List m_providerEntries;
- Provider m_wantedProvider;
- bool m_newPageWanted;
- bool m_newPageReady;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/resource.cpp kdepim-runtime-15.08.0/accountwizard/resource.cpp
--- kdepim-runtime-4.14.6/accountwizard/resource.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/resource.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,165 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "resource.h"
-
-#include
-#include
-#include
-
-#include
-#include
-
-#include
-#include
-#include
-#include
-
-using namespace Akonadi;
-
-static QVariant::Type argumentType( const QMetaObject *mo, const QString &method )
-{
- QMetaMethod m;
- for ( int i = 0; i < mo->methodCount(); ++i ) {
- const QString signature = QString::fromLatin1( mo->method( i ).signature() );
- if ( signature.contains( method + QLatin1Char( '(' ) ) ) {
- m = mo->method( i );
- break;
- }
- }
-
- if ( !m.signature() ) {
- kWarning() << "Did not find D-Bus method: " << method << " available methods are:";
- for ( int i = 0; i < mo->methodCount(); ++i )
- kWarning() << mo->method( i ).signature();
- return QVariant::Invalid;
- }
-
- const QList argTypes = m.parameterTypes();
- if ( argTypes.count() != 1 )
- return QVariant::Invalid;
-
- return QVariant::nameToType( argTypes.first() );
-}
-
-Resource::Resource(const QString& type, QObject* parent) :
- SetupObject( parent ),
- m_typeIdentifier( type )
-{
-}
-
-void Resource::setOption( const QString &key, const QVariant &value )
-{
- m_settings.insert( key, value );
-}
-
-void Resource::setName( const QString &name )
-{
- m_name = name;
-}
-
-void Resource::create()
-{
- const AgentType type = AgentManager::self()->type( m_typeIdentifier );
- if ( !type.isValid() ) {
- emit error( i18n( "Resource type '%1' is not available.", m_typeIdentifier ) );
- return;
- }
-
- // check if unique instance already exists
- kDebug() << type.capabilities();
- if ( type.capabilities().contains( QLatin1String( "Unique" ) ) ) {
- foreach ( const AgentInstance &instance, AgentManager::self()->instances() ) {
- kDebug() << instance.type().identifier() << ( instance.type() == type );
- if ( instance.type() == type ) {
- emit finished( i18n( "Resource '%1' is already set up.", type.name() ) );
- return;
- }
- }
- }
-
- emit info( i18n( "Creating resource instance for '%1'...", type.name() ) );
- AgentInstanceCreateJob *job = new AgentInstanceCreateJob( type, this );
- connect( job, SIGNAL(result(KJob*)), SLOT(instanceCreateResult(KJob*)) );
- job->start();
-}
-
-
-void Resource::instanceCreateResult(KJob* job)
-{
- if ( job->error() ) {
- emit error( i18n( "Failed to create resource instance: %1", job->errorText() ) );
- return;
- }
-
- m_instance = qobject_cast( job )->instance();
-
- if ( !m_settings.isEmpty() ) {
- emit info( i18n( "Configuring resource instance..." ) );
- QDBusInterface iface( QLatin1String("org.freedesktop.Akonadi.Resource.") + m_instance.identifier(), QLatin1String("/Settings") );
- if ( !iface.isValid() ) {
- emit error( i18n( "Unable to configure resource instance." ) );
- return;
- }
-
- // configure resource
- if ( !m_name.isEmpty() )
- m_instance.setName( m_name );
- QMap::const_iterator end( m_settings.constEnd() );
- for ( QMap::const_iterator it = m_settings.constBegin(); it != end; ++it ) {
- kDebug() << "Setting up " << it.key() << " for agent " << m_instance.identifier();
- const QString methodName = QString::fromLatin1( "set%1" ).arg( it.key() );
- QVariant arg = it.value();
- const QVariant::Type targetType = argumentType( iface.metaObject(), methodName );
- if ( !arg.canConvert( targetType ) ) {
- emit error( i18n( "Could not convert value of setting '%1' to required type %2.", it.key(), QLatin1String(QVariant::typeToName( targetType )) ) );
- return;
- }
- arg.convert( targetType );
- QDBusReply reply = iface.call( methodName, arg );
- if ( !reply.isValid() ) {
- emit error( i18n( "Could not set setting '%1': %2", it.key(), reply.error().message() ) );
- return;
- }
- }
- m_instance.reconfigure();
- }
-
- emit finished( i18n( "Resource setup completed." ) );
-}
-
-void Resource::destroy()
-{
- if ( m_instance.isValid() ) {
- AgentManager::self()->removeInstance( m_instance );
- emit info( i18n( "Removed resource instance for '%1'.", m_instance.type().name() ) );
- }
-}
-
-QString Resource::identifier()
-{
- return m_instance.identifier();
-}
-
-void Resource::reconfigure()
-{
- m_instance.reconfigure();
-}
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/resource.h kdepim-runtime-15.08.0/accountwizard/resource.h
--- kdepim-runtime-4.14.6/accountwizard/resource.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/resource.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,51 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef RESOURCE_H
-#define RESOURCE_H
-
-#include "setupobject.h"
-#include
-#include
-
-class KJob;
-
-class Resource : public SetupObject
-{
- Q_OBJECT
- public:
- explicit Resource( const QString &type, QObject *parent = 0 );
- void create();
- void destroy();
-
- public slots:
- Q_SCRIPTABLE void setName( const QString &name );
- Q_SCRIPTABLE void setOption( const QString &key, const QVariant &value );
- Q_SCRIPTABLE QString identifier();
- Q_SCRIPTABLE void reconfigure();
-
- private slots:
- void instanceCreateResult( KJob* job );
-
- private:
- QString m_typeIdentifier, m_name;
- QMap m_settings;
- Akonadi::AgentInstance m_instance;
-};
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/servertest.cpp kdepim-runtime-15.08.0/accountwizard/servertest.cpp
--- kdepim-runtime-4.14.6/accountwizard/servertest.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/servertest.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-/*
- Copyright (c) 2010 Tom Albers
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "servertest.h"
-#include
-#include
-
-#include
-#include
-#include
-
-ServerTest::ServerTest( QObject* parent) :
- QObject(parent), m_serverTest( new MailTransport::ServerTest( 0 ) )
-{
- kDebug() << "Welcome!";
- connect( m_serverTest, SIGNAL(finished(QList)),
- SLOT(testFinished(QList)) );
-}
-
-ServerTest::~ServerTest()
-{
- delete m_serverTest;
-}
-
-void ServerTest::test( const QString server, const QString protocol )
-{
- kDebug() << server << protocol;
- m_serverTest->setServer( server );
- m_serverTest->setProtocol( protocol );
- m_serverTest->start();
-}
-
-void ServerTest::testFinished( QList< int > list )
-{
- kDebug() << "types: " << list;
- if ( list.contains( MailTransport::Transport::EnumEncryption::TLS ) ) {
- emit testResult( QLatin1String("tls") );
- } else if ( list.contains( MailTransport::Transport::EnumEncryption::SSL ) ) {
- emit testResult( QLatin1String("ssl") );
- } else {
- KMessageBox::information( 0, i18n( "There seems to be a problem in reaching this server "
- "or choosing a safe way to sent the credentials to server. We advise you to "
- "check the settings of the account and adjust it manually if needed." ),
- i18n( "Autodetecting settings failed" ) );
- emit testFail();
- }
-}
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/servertest.h kdepim-runtime-15.08.0/accountwizard/servertest.h
--- kdepim-runtime-4.14.6/accountwizard/servertest.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/servertest.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,54 +0,0 @@
-/*
- Copyright (c) 2010 Tom Albers
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef SERVERTEST_H
-#define SERVERTEST_H
-
-#include
-
-namespace MailTransport {
- class ServerTest;
-}
-
-class ServerTest : public QObject
-{
- Q_OBJECT
- public:
- explicit ServerTest( QObject *parent );
- ~ServerTest();
-
- public slots:
- /* @p protocol being 'imap' 'smtp' or 'pop3' */
- Q_SCRIPTABLE void test( const QString server, const QString protocol );
-
- signals:
- /* returns the advised setting, @p result begin 'ssl' 'tls' or 'none'. */
- void testResult( const QString& result );
-
- /* returns if no connection is possible, test failed. */
- void testFail();
-
- private slots:
- void testFinished( QList< int > list );
-
- private:
- MailTransport::ServerTest* m_serverTest;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/setupmanager.cpp kdepim-runtime-15.08.0/accountwizard/setupmanager.cpp
--- kdepim-runtime-4.14.6/accountwizard/setupmanager.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/setupmanager.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,245 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "setupmanager.h"
-#include "resource.h"
-#include "setuppage.h"
-#include "transport.h"
-#include "configfile.h"
-#include "ldap.h"
-#include "identity.h"
-
-#include
-#include
-
-SetupManager::SetupManager( QWidget* parent) :
- QObject(parent),
- m_currentSetupObject( 0 ),
- m_page( 0 ),
- m_wallet( 0 ),
- m_personalDataAvailable( false ),
- m_rollbackRequested( false )
-{
- KEMailSettings e;
- m_name = e.getSetting( KEMailSettings::RealName );
- m_email = e.getSetting( KEMailSettings::EmailAddress );
-}
-
-SetupManager::~SetupManager()
-{
- delete m_wallet;
-}
-
-void SetupManager::setSetupPage(SetupPage* page)
-{
- m_page = page;
-}
-
-QObject* SetupManager::createResource(const QString& type)
-{
- return connectObject( new Resource( type, this ) );
-}
-
-QObject* SetupManager::createTransport(const QString& type)
-{
- return connectObject( new Transport( type, this ) );
-}
-
-QObject* SetupManager::createConfigFile(const QString& fileName)
-{
- return connectObject( new ConfigFile( fileName, this ) );
-}
-
-QObject* SetupManager::createLdap()
-{
- return connectObject( new Ldap( this ) );
-}
-
-
-QObject* SetupManager::createIdentity()
-{
- return connectObject( new Identity( this ) );
-}
-
-static bool dependencyCompare( SetupObject *left, SetupObject *right )
-{
- if ( !left->dependsOn() && right->dependsOn() )
- return true;
- return false;
-}
-
-void SetupManager::execute()
-{
- m_page->setStatus( i18n( "Setting up account..." ) );
- m_page->setValid( false );
-
- // ### FIXME this is a bad over-simplification and would need a real topological sort
- // but for current usage it is good enough
- qStableSort( m_objectToSetup.begin(), m_objectToSetup.end(), dependencyCompare );
- setupNext();
-}
-
-void SetupManager::setupSucceeded(const QString& msg)
-{
- Q_ASSERT( m_page );
- m_page->addMessage( SetupPage::Success, msg );
- if(m_currentSetupObject) {
- m_setupObjects.append( m_currentSetupObject );
- m_currentSetupObject = 0;
- }
- setupNext();
-}
-
-void SetupManager::setupFailed(const QString& msg)
-{
- Q_ASSERT( m_page );
- m_page->addMessage( SetupPage::Error, msg );
- if( m_currentSetupObject ) {
- m_setupObjects.append( m_currentSetupObject );
- m_currentSetupObject = 0;
- }
- rollback();
-}
-
-void SetupManager::setupInfo(const QString& msg)
-{
- Q_ASSERT( m_page );
- m_page->addMessage( SetupPage::Info, msg );
-}
-
-void SetupManager::setupNext()
-{
- // user canceld during the previous setup step
- if ( m_rollbackRequested ) {
- rollback();
- return;
- }
-
- if ( m_objectToSetup.isEmpty() ) {
- m_page->setStatus( i18n( "Setup complete." ) );
- m_page->setProgress( 100 );
- m_page->setValid( true );
- } else {
- const int setupObjectCount = m_objectToSetup.size() + m_setupObjects.size();
- const int remainingObjectCount = setupObjectCount - m_objectToSetup.size();
- m_page->setProgress( ( remainingObjectCount * 100 ) / setupObjectCount );
- m_currentSetupObject = m_objectToSetup.takeFirst();
- m_currentSetupObject->create();
- }
-}
-
-void SetupManager::rollback()
-{
- m_page->setStatus( i18n( "Failed to set up account, rolling back..." ) );
- const int setupObjectCount = m_objectToSetup.size() + m_setupObjects.size();
- int remainingObjectCount = m_setupObjects.size();
- foreach ( SetupObject* obj, m_setupObjects ) {
- m_page->setProgress( ( remainingObjectCount * 100 ) / setupObjectCount );
- if( obj ) {
- obj->destroy();
- m_objectToSetup.prepend( obj );
- }
- }
- m_setupObjects.clear();
- m_page->setProgress( 0 );
- m_page->setStatus( i18n( "Failed to set up account." ) );
- m_page->setValid( true );
- m_rollbackRequested = false;
- emit rollbackComplete();
-}
-
-SetupObject* SetupManager::connectObject(SetupObject* obj)
-{
- connect( obj, SIGNAL(finished(QString)), SLOT(setupSucceeded(QString)) );
- connect( obj, SIGNAL(info(QString)), SLOT(setupInfo(QString)) );
- connect( obj, SIGNAL(error(QString)), SLOT(setupFailed(QString)) );
- m_objectToSetup.append( obj );
- return obj;
-}
-
-void SetupManager::setName( const QString& name )
-{
- m_name = name;
-}
-
-QString SetupManager::name()
-{
- return m_name;
-}
-
-void SetupManager::setEmail( const QString& email)
-{
- m_email = email;
-}
-
-QString SetupManager::email()
-{
- return m_email;
-}
-
-void SetupManager::setPassword( const QString& password)
-{
- m_password = password;
-}
-
-QString SetupManager::password()
-{
- return m_password;
-}
-
-QString SetupManager::country()
-{
- return KGlobal::locale()->country();
-}
-
-void SetupManager::openWallet()
-{
- using namespace KWallet;
- if ( Wallet::isOpen( Wallet::NetworkWallet() ) )
- return;
-
- Q_ASSERT( parent()->isWidgetType() );
- m_wallet = Wallet::openWallet( Wallet::NetworkWallet(), qobject_cast( parent() )->effectiveWinId(), Wallet::Asynchronous );
- QEventLoop loop;
- connect( m_wallet, SIGNAL(walletOpened(bool)), &loop, SLOT(quit()) );
- loop.exec();
-}
-
-bool SetupManager::personalDataAvailable()
-{
- return m_personalDataAvailable;
-}
-
-void SetupManager::setPersonalDataAvailable(bool available)
-{
- m_personalDataAvailable = available;
-}
-
-void SetupManager::requestRollback()
-{
- if ( m_setupObjects.isEmpty() ) {
- emit rollbackComplete();
- } else {
- m_rollbackRequested = true;
- if ( !m_currentSetupObject )
- rollback();
- }
-}
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/setupmanager.h kdepim-runtime-15.08.0/accountwizard/setupmanager.h
--- kdepim-runtime-4.14.6/accountwizard/setupmanager.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/setupmanager.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,86 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef SETUPMANAGER_H
-#define SETUPMANAGER_H
-
-#include
-
-namespace KWallet {
- class Wallet;
-}
-
-class SetupObject;
-class SetupPage;
-
-class SetupManager : public QObject
-{
- Q_OBJECT
- public:
- explicit SetupManager( QWidget *parent );
- ~SetupManager();
- void setSetupPage( SetupPage* page );
-
- void setName( const QString& );
- void setEmail( const QString& );
- void setPassword( const QString& );
- void setPersonalDataAvailable( bool available );
-
- public slots:
- Q_SCRIPTABLE bool personalDataAvailable();
- Q_SCRIPTABLE QString name();
- Q_SCRIPTABLE QString email();
- Q_SCRIPTABLE QString password();
- Q_SCRIPTABLE QString country();
- /** Ensures the wallet is open for subsequent sync wallet access in the resources. */
- Q_SCRIPTABLE void openWallet();
- Q_SCRIPTABLE QObject* createResource( const QString &type );
- Q_SCRIPTABLE QObject* createTransport( const QString &type );
- Q_SCRIPTABLE QObject* createConfigFile( const QString &configName );
- Q_SCRIPTABLE QObject* createLdap();
- Q_SCRIPTABLE QObject* createIdentity();
- Q_SCRIPTABLE void execute();
-
- void requestRollback();
-
- signals:
- void rollbackComplete();
-
- private:
- void setupNext();
- void rollback();
- SetupObject* connectObject( SetupObject* obj );
-
- private slots:
- void setupSucceeded( const QString &msg );
- void setupFailed( const QString &msg );
- void setupInfo( const QString &msg );
-
- private:
- QString m_name, m_email, m_password;
- QList m_objectToSetup;
- QList m_setupObjects;
- SetupObject* m_currentSetupObject;
- SetupPage* m_page;
- KWallet::Wallet *m_wallet;
- bool m_personalDataAvailable;
- bool m_rollbackRequested;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/setupobject.cpp kdepim-runtime-15.08.0/accountwizard/setupobject.cpp
--- kdepim-runtime-4.14.6/accountwizard/setupobject.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/setupobject.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,35 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "setupobject.h"
-
-SetupObject::SetupObject(QObject* parent): QObject(parent), m_dependsOn( 0 )
-{
-}
-
-SetupObject* SetupObject::dependsOn() const
-{
- return m_dependsOn;
-}
-
-void SetupObject::setDependsOn(SetupObject* obj)
-{
- m_dependsOn = obj;
-}
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/setupobject.h kdepim-runtime-15.08.0/accountwizard/setupobject.h
--- kdepim-runtime-4.14.6/accountwizard/setupobject.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/setupobject.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,46 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef SETUPOBJECT_H
-#define SETUPOBJECT_H
-
-#include
-
-class SetupObject : public QObject
-{
- Q_OBJECT
- public:
- explicit SetupObject( QObject *parent );
-
- virtual void create() = 0;
- virtual void destroy() = 0;
-
- SetupObject* dependsOn() const;
- void setDependsOn( SetupObject* obj );
-
- signals:
- void error( const QString &msg );
- void info( const QString &msg );
- void finished( const QString &msg );
-
- private:
- SetupObject *m_dependsOn;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/setuppage.cpp kdepim-runtime-15.08.0/accountwizard/setuppage.cpp
--- kdepim-runtime-4.14.6/accountwizard/setuppage.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/setuppage.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,71 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "setuppage.h"
-
-#include
-
-SetupPage::SetupPage(KAssistantDialog* parent) :
- Page(parent),
- m_msgModel( new QStandardItemModel( this ) )
-{
- ui.setupUi( this );
- ui.detailView->setModel( m_msgModel );
- connect( ui.detailsButton, SIGNAL(clicked()), SLOT(detailsClicked()) );
-}
-
-void SetupPage::enterPageNext()
-{
- ui.stackWidget->setCurrentIndex( 0 );
-}
-
-void SetupPage::detailsClicked()
-{
- ui.stackWidget->setCurrentIndex( 1 );
-}
-
-void SetupPage::addMessage(SetupPage::MessageType type, const QString& msg)
-{
- QStandardItem *item = new QStandardItem;
- item->setText( msg );
- item->setEditable( false );
- switch ( type ) {
- case Success:
- item->setIcon( KIcon( QLatin1String("dialog-ok") ) );
- break;
- case Info:
- item->setIcon( KIcon( QLatin1String("dialog-information" )) );
- break;
- case Error:
- item->setIcon( KIcon( QLatin1String("dialog-error") ) );
- break;
- }
- m_msgModel->appendRow( item );
-}
-
-void SetupPage::setStatus(const QString& msg)
-{
- ui.progressLabel->setText( msg );
-}
-
-void SetupPage::setProgress(int percent)
-{
- ui.progressBar->setValue( percent );
-}
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/setuppage.h kdepim-runtime-15.08.0/accountwizard/setuppage.h
--- kdepim-runtime-4.14.6/accountwizard/setuppage.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/setuppage.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,52 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef SETUPPAGE_H
-#define SETUPPAGE_H
-
-#include "page.h"
-#include "ui_setuppage.h"
-
-class QStandardItemModel;
-
-class SetupPage : public Page
-{
- Q_OBJECT
- public:
- explicit SetupPage( KAssistantDialog *parent );
- virtual void enterPageNext();
-
- enum MessageType {
- Success,
- Info,
- Error
- };
- void addMessage( MessageType type, const QString &msg );
- void setStatus( const QString &msg );
- void setProgress( int percent );
-
- private slots:
- void detailsClicked();
-
- private:
- Ui::SetupPage ui;
- QStandardItemModel* m_msgModel;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/TODO kdepim-runtime-15.08.0/accountwizard/TODO
--- kdepim-runtime-4.14.6/accountwizard/TODO 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/TODO 1970-01-01 00:00:00.000000000 +0000
@@ -1,5 +0,0 @@
-- figure out i18n for the actual wizards (DONE)
-- imap+pop3wizard has no encryption as default i.c.w. plain auth method. Not a good default!
-- remember which set up resources/transports/ldap accounts/identities belong together so we can offer to remove them in one go again
-- add more wizards (In progress)
-- sort out password fields at least for pop3.
diff -Nru kdepim-runtime-4.14.6/accountwizard/transport.cpp kdepim-runtime-15.08.0/accountwizard/transport.cpp
--- kdepim-runtime-4.14.6/accountwizard/transport.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/transport.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,156 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "transport.h"
-
-#include
-
-#include
-#include
-
-#define TABLE_SIZE x
-
-template
-struct StringValueTable {
- const char * name;
- typename T::type value;
- typedef typename T::type value_type;
-};
-
-static const StringValueTable transportTypeEnums[] = {
- { "smtp", MailTransport::Transport::EnumType::SMTP },
- { "sendmail", MailTransport::Transport::EnumType::Sendmail },
- { "akonadi", MailTransport::Transport::EnumType::Akonadi }
-};
-static const int transportTypeEnumsSize = sizeof( transportTypeEnums ) / sizeof ( *transportTypeEnums );
-
-static const StringValueTable encryptionEnum[] = {
- { "none", MailTransport::Transport::EnumEncryption::None },
- { "ssl", MailTransport::Transport::EnumEncryption::SSL },
- { "tls", MailTransport::Transport::EnumEncryption::TLS }
-};
-static const int encryptionEnumSize = sizeof( encryptionEnum ) / sizeof( *encryptionEnum );
-
-static const StringValueTable authenticationTypeEnum[] = {
- { "login", MailTransport::Transport::EnumAuthenticationType::LOGIN },
- { "plain", MailTransport::Transport::EnumAuthenticationType::PLAIN },
- { "cram-md5", MailTransport::Transport::EnumAuthenticationType::CRAM_MD5 },
- { "digest-md5", MailTransport::Transport::EnumAuthenticationType::DIGEST_MD5 },
- { "gssapi", MailTransport::Transport::EnumAuthenticationType::GSSAPI },
- { "ntlm", MailTransport::Transport::EnumAuthenticationType::NTLM },
- { "apop", MailTransport::Transport::EnumAuthenticationType::APOP },
- { "clear", MailTransport::Transport::EnumAuthenticationType::CLEAR },
- { "anonymous", MailTransport::Transport::EnumAuthenticationType::ANONYMOUS }
-};
-static const int authenticationTypeEnumSize = sizeof( authenticationTypeEnum ) / sizeof( *authenticationTypeEnum );
-
-template
-static typename T::value_type stringToValue( const T *table, const int tableSize, const QString &string )
-{
- const QString ref = string.toLower();
- for ( int i = 0; i < tableSize; ++i ) {
- if ( ref == QLatin1String( table[i].name ) )
- return table[i].value;
- }
- return table[0].value; // TODO: error handling
-}
-
-Transport::Transport(const QString& type, QObject* parent) :
- SetupObject( parent ),
- m_transportId( -1 ),
- m_port( -1 ),
- m_encr( MailTransport::Transport::EnumEncryption::TLS ),
- m_auth( MailTransport::Transport::EnumAuthenticationType::PLAIN )
-{
- m_transportType = stringToValue( transportTypeEnums, transportTypeEnumsSize, type );
- if ( m_transportType == MailTransport::Transport::EnumType::SMTP )
- m_port = 25;
-}
-
-void Transport::create()
-{
- emit info( i18n( "Setting up mail transport account..." ) );
- MailTransport::Transport* mt = MailTransport::TransportManager::self()->createTransport();
- mt->setName( m_name );
- mt->setHost( m_host );
- if ( m_port > 0 )
- mt->setPort( m_port );
- if ( !m_user.isEmpty() ) {
- mt->setUserName( m_user );
- mt->setRequiresAuthentication( true );
- }
- if ( !m_password.isEmpty() ) {
- mt->setStorePassword( true );
- mt->setPassword( m_password );
- }
- mt->setEncryption( m_encr );
- mt->setAuthenticationType( m_auth );
- m_transportId = mt->id();
- mt->writeConfig();
- MailTransport::TransportManager::self()->addTransport( mt );
- MailTransport::TransportManager::self()->setDefaultTransport( mt->id() );
- emit finished( i18n( "Mail transport account set up." ) );
-}
-
-void Transport::destroy()
-{
- MailTransport::TransportManager::self()->removeTransport( m_transportId );
- emit info( i18n( "Mail transport account deleted." ) );
-}
-
-void Transport::setName( const QString &name )
-{
- m_name = name;
-}
-
-void Transport::setHost( const QString &host )
-{
- m_host = host;
-}
-
-void Transport::setPort( int port )
-{
- m_port = port;
-}
-
-void Transport::setUsername( const QString &user )
-{
- m_user = user;
-}
-
-void Transport::setPassword( const QString &password )
-{
- m_password = password;
-}
-
-void Transport::setEncryption( const QString &encryption )
-{
- m_encr = stringToValue( encryptionEnum, encryptionEnumSize, encryption );
-}
-
-void Transport::setAuthenticationType( const QString &authType )
-{
- m_auth = stringToValue( authenticationTypeEnum, authenticationTypeEnumSize, authType );
-}
-
-int Transport::transportId() const
-{
- return m_transportId;
-}
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/transport.h kdepim-runtime-15.08.0/accountwizard/transport.h
--- kdepim-runtime-4.14.6/accountwizard/transport.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/transport.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,62 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef TRANSPORT_H
-#define TRANSPORT_H
-
-#include "setupobject.h"
-#include
-
-
-class Transport : public SetupObject
-{
- Q_OBJECT
- public:
- explicit Transport( const QString &type, QObject *parent = 0 );
- void create();
- void destroy();
-
- int transportId() const;
-
- public slots:
- Q_SCRIPTABLE void setName( const QString &name );
- Q_SCRIPTABLE void setHost( const QString &host );
- Q_SCRIPTABLE void setPort( int port );
- Q_SCRIPTABLE void setUsername( const QString &user );
- Q_SCRIPTABLE void setPassword( const QString &password );
- Q_SCRIPTABLE void setEncryption( const QString &encryption );
- Q_SCRIPTABLE void setAuthenticationType( const QString &authType );
-
- private:
- MailTransport::Transport::EnumEncryption stringToEncryption( const QString &encryptionString );
- MailTransport::Transport::EnumAuthenticationType stringToAuthType( const QString &authString );
-
- private:
- int m_transportId;
- MailTransport::Transport::EnumType::type m_transportType;
- QString m_name;
- QString m_host;
- int m_port;
- QString m_user;
- QString m_password;
- MailTransport::Transport::EnumEncryption::type m_encr;
- MailTransport::Transport::EnumAuthenticationType::type m_auth;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/typepage.cpp kdepim-runtime-15.08.0/accountwizard/typepage.cpp
--- kdepim-runtime-4.14.6/accountwizard/typepage.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/typepage.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,117 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#include "typepage.h"
-
-#include
-#include
-#include
-
-#include
-#include "global.h"
-#include
-
-TypePage::TypePage(KAssistantDialog* parent) :
- Page( parent ),
- m_model( new QStandardItemModel( this ) )
-{
- ui.setupUi( this );
-#ifdef KDEPIM_MOBILE_UI
- ui.label->setHidden( true );
- ui.searchLine->setHidden( true );
-#endif
-
-#ifdef ACCOUNTWIZARD_NO_GHNS
- ui.ghnsButton->hide();
-#endif
-
- QSortFilterProxyModel *proxy = new QSortFilterProxyModel( this );
- proxy->setSourceModel( m_model );
- ui.listView->setModel( proxy );
- ui.searchLine->setProxy( proxy );
-
- const QStringList list = KGlobal::dirs()->findAllResources( "data", QLatin1String( "akonadi/accountwizard/*.desktop" ),
- KStandardDirs::Recursive | KStandardDirs::NoDuplicates );
- const QStringList filter = Global::typeFilter();
- foreach ( const QString &entry, list ) {
- KDesktopFile f( entry );
- kDebug() << entry << f.readName();
- const KConfig configWizard( entry );
- KConfigGroup grp( &configWizard, "Wizard" );
- const QStringList lstType = grp.readEntry( "Type", QStringList() );
- if ( lstType.isEmpty() ) {
- kDebug() << QString::fromLatin1( " %1 doesn't contains specific type" ).arg( f.readName() );
- }
- if ( !filter.isEmpty() ) {
- // stolen from agentfilterproxymodel
- bool found = false;
- foreach ( const QString &mimeType, lstType ) {
- if ( filter.contains( mimeType ) ) {
- found = true;
- break;
- } else {
- foreach ( const QString &type, filter ) {
- KMimeType::Ptr typePtr = KMimeType::mimeType( type, KMimeType::ResolveAliases );
- if ( !typePtr.isNull() && typePtr->is( mimeType ) ) {
- found = true;
- break;
- }
- }
- }
- if ( found )
- break;
- }
- if ( !found )
- continue;
- }
- QStandardItem *item = new QStandardItem( f.readName() );
- item->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
- item->setData( entry, Qt::UserRole );
- if ( !f.readIcon().isEmpty() )
- item->setData( KIcon( f.readIcon() ), Qt::DecorationRole );
- item->setData( f.readComment(), Qt::ToolTipRole );
- m_model->appendRow( item );
- }
-
- connect( ui.listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(selectionChanged()) );
- connect( ui.ghnsButton, SIGNAL(clicked()), SIGNAL(ghnsWanted()) );
-}
-
-void TypePage::selectionChanged()
-{
- if ( ui.listView->selectionModel()->hasSelection() ) {
- setValid( true );
- } else {
- setValid( false );
- }
-}
-
-void TypePage::leavePageNext()
-{
- if ( !ui.listView->selectionModel()->hasSelection() )
- return;
- const QModelIndex index = ui.listView->selectionModel()->selectedIndexes().first();
- Global::setAssistant( index.data( Qt::UserRole ).toString() );
-}
-
-QTreeView *TypePage::treeview() const
-{
- return ui.listView;
-}
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/typepage.h kdepim-runtime-15.08.0/accountwizard/typepage.h
--- kdepim-runtime-4.14.6/accountwizard/typepage.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/typepage.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,47 +0,0 @@
-/*
- Copyright (c) 2009 Volker Krause
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-#ifndef TYPEPAGE_H
-#define TYPEPAGE_H
-
-#include "page.h"
-#include
-
-#include "ui_typepage.h"
-
-class TypePage : public Page
-{
- Q_OBJECT
- public:
- explicit TypePage( KAssistantDialog* parent = 0 );
-
- virtual void leavePageNext();
- QTreeView *treeview() const;
-
- signals:
- void ghnsWanted();
-
- private slots:
- void selectionChanged();
- private:
- Ui::TypePage ui;
- QStandardItemModel *m_model;
-};
-
-#endif
diff -Nru kdepim-runtime-4.14.6/accountwizard/ui/loadpage.ui kdepim-runtime-15.08.0/accountwizard/ui/loadpage.ui
--- kdepim-runtime-4.14.6/accountwizard/ui/loadpage.ui 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/ui/loadpage.ui 1970-01-01 00:00:00.000000000 +0000
@@ -1,54 +0,0 @@
-
-
- LoadPage
-
-
-
- 0
- 0
- 400
- 84
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 129
-
-
-
-
- -
-
-
- Loading assistant...
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 129
-
-
-
-
-
-
-
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/ui/personaldatapage.ui kdepim-runtime-15.08.0/accountwizard/ui/personaldatapage.ui
--- kdepim-runtime-4.14.6/accountwizard/ui/personaldatapage.ui 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/ui/personaldatapage.ui 1970-01-01 00:00:00.000000000 +0000
@@ -1,283 +0,0 @@
-
-
- PersonalDataPage
-
-
-
- 0
- 0
- 521
- 289
-
-
-
- -
-
-
- With a few simple steps we create the right settings for you. Please follow the steps of this wizard carefully.
-
-
- true
-
-
-
- -
-
-
-
-
-
- Full name:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- nameEdit
-
-
-
- -
-
-
-
- 0
- 22
-
-
-
-
- -
-
-
- E-mail address:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- emailEdit
-
-
-
- -
-
-
-
- 0
- 22
-
-
-
-
- -
-
-
-
- 0
- 22
-
-
-
- QLineEdit::Password
-
-
-
- -
-
-
- Password:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- passwordEdit
-
-
-
-
-
- -
-
-
- 0
-
-
-
-
-
-
-
- Find provider settings on the Internet
-
-
- true
-
-
-
-
-
-
- Check online for the settings needed for this email provider. Only the domain name part of the e-mail address will be sent over the Internet at this point. If this option is unchecked, the account can be set up manually.
-
-
- true
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
- IMAP account
-
-
- true
-
-
- buttonGroup
-
-
-
- -
-
-
- POP3 account
-
-
- buttonGroup
-
-
-
-
-
- -
-
-
-
-
-
- Incoming:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- TextLabel
-
-
-
- -
-
-
- Outgoing:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- TextLabel
-
-
-
- -
-
-
- Username:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- TextLabel
-
-
-
-
-
- -
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- Create Account
-
-
-
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 20
-
-
-
-
-
-
-
-
- KLineEdit
- QLineEdit
-
-
-
- KPIMUtils::ProgressIndicatorLabel
- QLabel
- kpimutils/progressindicatorlabel.h
- 1
-
-
-
-
-
-
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/ui/providerpage.ui kdepim-runtime-15.08.0/accountwizard/ui/providerpage.ui
--- kdepim-runtime-4.14.6/accountwizard/ui/providerpage.ui 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/ui/providerpage.ui 1970-01-01 00:00:00.000000000 +0000
@@ -1,63 +0,0 @@
-
-
- ProviderPage
-
-
-
- 0
- 0
- 400
- 172
-
-
-
- -
-
-
- Select your provider from the list below or click advanced if your provider is not listed
-
-
- true
-
-
-
- -
-
-
- -
-
-
- false
-
-
- true
-
-
- true
-
-
- true
-
-
- true
-
-
- true
-
-
- true
-
-
-
-
-
-
-
- KFilterProxySearchLine
- QWidget
-
-
-
-
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/ui/setuppage.ui kdepim-runtime-15.08.0/accountwizard/ui/setuppage.ui
--- kdepim-runtime-4.14.6/accountwizard/ui/setuppage.ui 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/ui/setuppage.ui 1970-01-01 00:00:00.000000000 +0000
@@ -1,103 +0,0 @@
-
-
- SetupPage
-
-
-
- 0
- 0
- 400
- 143
-
-
-
- -
-
-
- 0
-
-
-
-
-
-
-
- Qt::Vertical
-
-
-
- 20
- 109
-
-
-
-
- -
-
-
- Setting up account...
-
-
-
- -
-
-
- -
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- &Details...
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 74
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- KPushButton
- QPushButton
-
-
-
-
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/ui/typepage.ui kdepim-runtime-15.08.0/accountwizard/ui/typepage.ui
--- kdepim-runtime-4.14.6/accountwizard/ui/typepage.ui 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/ui/typepage.ui 1970-01-01 00:00:00.000000000 +0000
@@ -1,84 +0,0 @@
-
-
- TypePage
-
-
-
- 0
- 0
- 400
- 151
-
-
-
- -
-
-
- Select which kind of account you want to create:
-
-
-
- -
-
-
- -
-
-
- false
-
-
- true
-
-
- true
-
-
- true
-
-
- true
-
-
- true
-
-
- true
-
-
-
- -
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- Check for more on Internet
-
-
-
-
-
-
-
-
-
- KFilterProxySearchLine
- QWidget
-
-
-
-
-
-
diff -Nru kdepim-runtime-4.14.6/accountwizard/wizards/CMakeLists.txt kdepim-runtime-15.08.0/accountwizard/wizards/CMakeLists.txt
--- kdepim-runtime-4.14.6/accountwizard/wizards/CMakeLists.txt 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/wizards/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-add_subdirectory(tine20)
diff -Nru kdepim-runtime-4.14.6/accountwizard/wizards/tine20/CMakeLists.txt kdepim-runtime-15.08.0/accountwizard/wizards/tine20/CMakeLists.txt
--- kdepim-runtime-4.14.6/accountwizard/wizards/tine20/CMakeLists.txt 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/wizards/tine20/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-
-install ( FILES tine20wizard.desktop tine20wizard.es tine20wizard.ui DESTINATION ${DATA_INSTALL_DIR}/akonadi/accountwizard/tine20 )
diff -Nru kdepim-runtime-4.14.6/accountwizard/wizards/tine20/Messages.sh kdepim-runtime-15.08.0/accountwizard/wizards/tine20/Messages.sh
--- kdepim-runtime-4.14.6/accountwizard/wizards/tine20/Messages.sh 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/wizards/tine20/Messages.sh 1970-01-01 00:00:00.000000000 +0000
@@ -1,4 +0,0 @@
-#! /usr/bin/env bash
-$EXTRACTRC *.ui >> rc.cpp
-$XGETTEXT *.cpp -o $podir/accountwizard_tine20.pot
-$XGETTEXT -kqsTr *.es -j -o $podir/accountwizard_tine20.pot
diff -Nru kdepim-runtime-4.14.6/accountwizard/wizards/tine20/tine20wizard.desktop kdepim-runtime-15.08.0/accountwizard/wizards/tine20/tine20wizard.desktop
--- kdepim-runtime-4.14.6/accountwizard/wizards/tine20/tine20wizard.desktop 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/wizards/tine20/tine20wizard.desktop 1970-01-01 00:00:00.000000000 +0000
@@ -1,93 +0,0 @@
-[Desktop Entry]
-Name=Tine 2.0 Groupware Server
-Name[bs]=Tine 2.0 Groupware Server
-Name[ca]=Servidor de treball en grup Tine 2.0
-Name[ca@valencia]=Servidor de treball en grup Tine 2.0
-Name[cs]=Groupware Server Tine 2.0
-Name[da]=Tine 2.0 groupware-server
-Name[de]=Tine 2.0 Groupware-Server
-Name[el]=Tine 2.0 Groupware Server
-Name[en_GB]=Tine 2.0 Groupware Server
-Name[es]=Servidor de trabajo en grupo Tine 2.0
-Name[et]=Tine 2.0 grupitöö server
-Name[fi]=Tine 2.0 -työryhmäpalvelin
-Name[fr]=Serveur de logiciels de collaboration Tine 2.0
-Name[ga]=Freastalaí Groupware Tine 2.0
-Name[gl]=Servidor de grupos Tine 2.0
-Name[hu]=Tine 2.0 csoportmunka-kiszolgáló
-Name[ia]=Servitor de Tine 2.0 Groupware
-Name[it]=Server di groupware Tine 2.0
-Name[kk]=Tine 2.0 топтық іс сервері
-Name[km]=ម៉ាស៊ីនបម្រើ Tine ២.០ Groupware
-Name[ko]=Tine 2.0 그룹웨어 서버
-Name[lt]=Tine 2.0 grupinio darbo serveris
-Name[lv]=Tine 2.0 grupprogrammatūras serveris
-Name[nb]=Tine 2.0 gruppevare-tjener
-Name[nds]=Tine 2.0-Arbeitkoppel-Server
-Name[nl]=Tine 2.0 groupwareserver
-Name[pl]=Serwer Groupware Tine 2.0
-Name[pt]=Servidor de Groupware Tine 2.0
-Name[pt_BR]=Servidor groupware Tine 2.0
-Name[ru]=Сервер совместной работы Tine 2.0
-Name[sk]=Tine 2.0 Groupware Server
-Name[sl]=Strežnik Tine 2.0 za skupinsko delo
-Name[sr]=Тинеов групверски сервер
-Name[sr@ijekavian]=Тинеов групверски сервер
-Name[sr@ijekavianlatin]=Tineov grupverski server
-Name[sr@latin]=Tineov grupverski server
-Name[sv]=Tine 2.0 grupprogramserver
-Name[tr]=Tine 2.0 Groupware Sunucusu
-Name[uk]=Сервер групової роботи Tine 2.0
-Name[x-test]=xxTine 2.0 Groupware Serverxx
-Name[zh_CN]=Tine 2.0 群件服务器
-Name[zh_TW]=Tine 2.0 群組伺服器
-Icon=applications-internet
-Comment=Tine 2.0 Groupware Server
-Comment[bs]=Tine 2.0 Groupware Server
-Comment[ca]=Servidor de treball en grup Tine 2.0
-Comment[ca@valencia]=Servidor de treball en grup Tine 2.0
-Comment[cs]=Groupware Server Tine 2.0
-Comment[da]=Tine 2.0 groupware-server
-Comment[de]=Tine 2.0 Groupware-Server
-Comment[el]=Εξυπηρετητής Tine 2.0 Groupware
-Comment[en_GB]=Tine 2.0 Groupware Server
-Comment[es]=Servidor de trabajo en grupo Tine 2.0
-Comment[et]=Tine 2.0 grupitöö server
-Comment[fi]=Tine 2.0 -työryhmäpalvelin
-Comment[fr]=Serveur de logiciels de collaboration Tine 2.0
-Comment[ga]=Freastalaí Groupware Tine 2.0
-Comment[gl]=Servidor de grupos Tine 2.0
-Comment[hu]=Tine 2.0 csoportmunka-kiszolgáló
-Comment[ia]=Servitor de Tine 2.0 Groupware
-Comment[it]=Server di groupware Tine 2.0
-Comment[kk]=Tine 2.0 топтық іс сервері
-Comment[km]=ម៉ាស៊ីនបម្រើ Tine ២.០ Groupware
-Comment[ko]=Tine 2.0 그룹웨어 서버
-Comment[lt]=Tine 2.0 grupinio darbo serveris
-Comment[lv]=Tine 2.0 grupprogrammatūras serveris
-Comment[nb]=Tine 2.0 gruppevare-tjener
-Comment[nds]=Tine 2.0-Arbeitkoppel-Server
-Comment[nl]=Tine 2.0 groupwareserver
-Comment[pl]=Serwer Groupware Tine 2.0
-Comment[pt]=Servidor de 'Groupware' Tine 2.0
-Comment[pt_BR]=Servidor groupware Tine 2.0
-Comment[ru]=Сервер совместной работы Tine 2.0
-Comment[sk]=Tine 2.0 Groupware Server
-Comment[sl]=Strežnik Tine 2.0 za skupinsko delo
-Comment[sr]=Тинеов групверски сервер
-Comment[sr@ijekavian]=Тинеов групверски сервер
-Comment[sr@ijekavianlatin]=Tineov grupverski server
-Comment[sr@latin]=Tineov grupverski server
-Comment[sv]=Tine 2.0 grupprogramserver
-Comment[tr]=Tine 2.0 Groupware Sunucusu
-Comment[uk]=Сервер групової роботи Tine 2.0
-Comment[x-test]=xxTine 2.0 Groupware Serverxx
-Comment[zh_CN]=Tine 2.0 群件服务器
-Comment[zh_TW]=Tine 2.0 群組伺服器
-
-[Wizard]
-Type=message/rfc822,text/directory,text/calendar
-Script=tine20wizard.es
-
-[Translate]
-Filename=accountwizard_tine20
diff -Nru kdepim-runtime-4.14.6/accountwizard/wizards/tine20/tine20wizard.es kdepim-runtime-15.08.0/accountwizard/wizards/tine20/tine20wizard.es
--- kdepim-runtime-4.14.6/accountwizard/wizards/tine20/tine20wizard.es 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/wizards/tine20/tine20wizard.es 1970-01-01 00:00:00.000000000 +0000
@@ -1,177 +0,0 @@
-/*
- Copyright (c) 2012 Volker Krause
- Copyright (c) 2010 Casey Link
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-*/
-
-// add this function to trim user input of whitespace when needed
-String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); };
-
-var page = Dialog.addPage( "tine20wizard.ui", qsTr("Personal Settings") );
-var userChangedServerAddress = false;
-
-page.widget().nameEdit.text = SetupManager.name()
-page.widget().emailEdit.text = SetupManager.email()
-page.widget().passwordEdit.text = SetupManager.password()
-guessServerName();
-
-if ( SetupManager.personalDataAvailable() ) {
- page.widget().nameEdit.visible = false;
- page.widget().nameLabel.visible = false;
- page.widget().emailEdit.visible = false;
- page.widget().emailLabel.visible = false;
- page.widget().passwordEdit.visible = false;
- page.widget().passwordLabel.visible = false;
-}
-
-
-function guessServerName()
-{
- if ( userChangedServerAddress == true ) {
- return;
- }
-
- var email = page.widget().emailEdit.text;
- var pos = email.indexOf( "@" );
- if ( pos >= 0 && (pos + 1) < email.length ) {
- var server = email.slice( pos + 1, email.length );
- page.widget().serverAddress.text = server;
- }
-
- userChangedServerAddress = false;
-}
-
-function emailChanged( arg )
-{
- validateInput();
- guessServerName();
-}
-
-function serverChanged( arg )
-{
- validateInput();
- if ( arg == "" ) {
- userChangedServerAddress = false;
- } else {
- userChangedServerAddress = true;
- }
-}
-
-function validateInput()
-{
- if ( page.widget().serverAddress.text.trim() == "" || page.widget().emailEdit.text.trim() == "" ) {
- page.setValid( false );
- } else {
- page.setValid( true );
- }
-}
-
-// stage 1, setup identity and run imap server test
-// stage 2, smtp setup (no server test) and Dav resources
-var stage = 1;
-var identity; // global so it can be accesed in setup and testOk
-
-function setup()
-{
- print("setup() " + stage);
- var serverAddress = page.widget().serverAddress.text.trim();
- if ( stage == 1 ) {
- SetupManager.openWallet();
-
- identity = SetupManager.createIdentity();
- identity.setEmail( page.widget().emailEdit.text );
- identity.setRealName( page.widget().nameEdit.text );
-
- ServerTest.test( serverAddress, "imap" );
- } else { // stage 2
- var smtp = SetupManager.createTransport( "smtp" );
- smtp.setName( serverAddress );
- smtp.setHost( serverAddress );
- smtp.setPort( 25 );
- smtp.setEncryption( "TLS" );
- smtp.setAuthenticationType( "plain" );
- smtp.setUsername( page.widget().emailEdit.text );
- smtp.setPassword( page.widget().passwordEdit.text );
- identity.setTransport( smtp );
-
- var dav = SetupManager.createResource( "akonadi_davgroupware_resource" );
- print("dav: " + dav );
- try {
- dav.setName( "Tine 2.0" );
- dav.setOption( "DisplayName", "Tine 2.0" );
- dav.setOption( "RefreshInterval", 60 );
- dav.setOption( "RemoteUrls", ["$default$|CalDav|https://" + page.widget().serverAddress.text.trim() + "/calendars",
- "$default$|CardDav|https://" + page.widget().serverAddress.text.trim() + "/addressbooks"] );
- dav.setOption( "DefaultUsername", page.widget().emailEdit.text.trim() );
- } catch (e) { print(e); }
-
- print("pre-exec");
- SetupManager.execute();
- print("post-exec");
- }
-}
-
-function testResultFail()
-{
- testOk( -1 );
-}
-
-function testOk( arg )
-{
- print("testOk arg =", arg);
- var imapRes = SetupManager.createResource( "akonadi_imap_resource" );
- imapRes.setName( page.widget().serverAddress.text.trim() );
- imapRes.setOption( "ImapServer", page.widget().serverAddress.text.trim() );
- imapRes.setOption( "UserName", page.widget().emailEdit.text.trim() );
- imapRes.setOption( "Password", page.widget().passwordEdit.text.trim() );
- imapRes.setOption( "UseDefaultIdentity", false );
- imapRes.setOption( "AccountIdentity", identity.uoid() );
- imapRes.setOption( "DisconnectedModeEnabled", true );
- imapRes.setOption( "IntervalCheckTime", 60 );
- imapRes.setOption( "SubscriptionEnabled", true );
- imapRes.setOption( "SieveSupport", false );
- imapRes.setOption( "Authentication", 7 ); // ClearText
- if ( arg == "ssl" ) {
- // The ENUM used for authentication (in the imap resource only)
- imapRes.setOption( "Safety", "SSL" ); // SSL/TLS
- imapRes.setOption( "ImapPort", 993 );
- } else if ( arg == "tls" ) { // tls is really STARTTLS
- imapRes.setOption( "Safety", "STARTTLS" ); // STARTTLS
- imapRes.setOption( "ImapPort", 143 );
- } else if ( arg == "none" ) {
- imapRes.setOption( "Safety", "NONE" ); // No encryption
- imapRes.setOption( "ImapPort", 143 );
- } else {
- // safe default fallback in case server test failed
- imapRes.setOption( "Safety", "STARTTLS" );
- imapRes.setOption( "ImapPort", 143 );
- }
- stage = 2;
- setup();
-}
-
-try {
- ServerTest.testFail.connect(testResultFail);
- ServerTest.testResult.connect(testOk);
- page.widget().emailEdit.textChanged.connect(emailChanged);
- page.widget().serverAddress.textChanged.connect(serverChanged);
- page.pageLeftNext.connect(setup);
-} catch (e) {
- print(e);
-}
-
-validateInput();
diff -Nru kdepim-runtime-4.14.6/accountwizard/wizards/tine20/tine20wizard.ui kdepim-runtime-15.08.0/accountwizard/wizards/tine20/tine20wizard.ui
--- kdepim-runtime-4.14.6/accountwizard/wizards/tine20/tine20wizard.ui 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/accountwizard/wizards/tine20/tine20wizard.ui 1970-01-01 00:00:00.000000000 +0000
@@ -1,87 +0,0 @@
-
-
- tine20Wizard
-
-
-
- 0
- 0
- 368
- 124
-
-
-
-
- QFormLayout::ExpandingFieldsGrow
-
- -
-
-
- &Name:
-
-
- nameEdit
-
-
-
- -
-
-
- -
-
-
- &Email:
-
-
- emailEdit
-
-
-
- -
-
-
- -
-
-
- &Password:
-
-
- passwordEdit
-
-
-
- -
-
-
- QLineEdit::Password
-
-
-
- -
-
-
- &Server Address:
-
-
- serverAddress
-
-
-
- -
-
-
-
-
-
-
- KLineEdit
- QLineEdit
-
-
-
-
- serverAddress
-
-
-
-
diff -Nru kdepim-runtime-4.14.6/agents/akonadinepomukfeederagent.desktop kdepim-runtime-15.08.0/agents/akonadinepomukfeederagent.desktop
--- kdepim-runtime-4.14.6/agents/akonadinepomukfeederagent.desktop 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/agents/akonadinepomukfeederagent.desktop 1970-01-01 00:00:00.000000000 +0000
@@ -1,53 +0,0 @@
-[Desktop Entry]
-Name=Akonadi Nepomuk Feeder
-Name[bs]=Akonadi Nepomuk napajač
-Name[ca]=Alimentador del Nepomuk per a l'Akonadi
-Name[ca@valencia]=Alimentador del Nepomuk per a l'Akonadi
-Name[cs]=Akonadi podavač Nepomuku
-Name[da]=Akonadi Nepomuk-feeder
-Name[de]=Nepomuk-Modul für Akonadi
-Name[el]=Τροφοδότης Nepomuk του Akonadi
-Name[en_GB]=Akonadi Nepomuk Feeder
-Name[es]=Alimentador Nepomuk de Akonadi
-Name[et]=Akonadi Nepomuki söötur
-Name[fi]=Akonadi Nepomuk Feeder
-Name[fr]=Connecteur Nepomuk pour Akonadi
-Name[ga]=Fothaire Nepomuk Akonadi
-Name[gl]=Alimentador de Nepomuk para Akonadi
-Name[hu]=Akonadi Nepomuk feltöltő
-Name[ia]=Syndication de Akonadi Nepomuk
-Name[it]=Fornitore Akonadi per Nepomuk
-Name[kk]=Nepomuk эл.пошта бергіші
-Name[km]=កម្មវិធីមតិព័ត៌មាន Akonadi Nepomuk
-Name[ko]=Akonadi Nepomuk 공급자
-Name[lt]=Akonadi Nepomuk šaltinis
-Name[lv]=Akonadi Nepomuk barotājs
-Name[nb]=Akonadi innmating til Nepomuk
-Name[nds]=Nepomuk-Ingaav för Akonadi
-Name[nl]=Akonadi Nepumuk-feeder
-Name[pl]=Podajnik Akonadi Nepomuk
-Name[pt]=Fontes do Nepomuk para o Akonadi
-Name[pt_BR]=Alimentador do Nepomuk para o Akonadi
-Name[ru]=Akonadi Nepomuk Feeder
-Name[sk]=Kŕmitko Nepomuk Akonadi
-Name[sl]=Podajalnik za Nepomuk
-Name[sr]=Непомуков уводник Аконадија
-Name[sr@ijekavian]=Непомуков уводник Аконадија
-Name[sr@ijekavianlatin]=Nepomukov uvodnik Akonadija
-Name[sr@latin]=Nepomukov uvodnik Akonadija
-Name[sv]=Akonadi-inmatning till Nepomuk
-Name[tr]=Akonadi Nepomuk Besleyici
-Name[uk]=Передавач даних Akonadi Nepomuk
-Name[x-test]=xxAkonadi Nepomuk Feederxx
-Name[zh_CN]=Akonadi Nepomuk 邮件采集器
-Name[zh_TW]=Akonadi Nepomuk Feeder
-
-Type=AkonadiAgent
-Exec=akonadi_nepomuk_feeder
-Icon=nepomuk
-
-# This agent is disabled, do not autostart it.
-# KDE5: remove this file
-X-Akonadi-MimeTypes=
-X-Akonadi-Capabilities=
-X-Akonadi-Identifier=akonadi_nepomuk_feeder
diff -Nru kdepim-runtime-4.14.6/agents/cmake/FindXsltproc.cmake kdepim-runtime-15.08.0/agents/cmake/FindXsltproc.cmake
--- kdepim-runtime-4.14.6/agents/cmake/FindXsltproc.cmake 1970-01-01 00:00:00.000000000 +0000
+++ kdepim-runtime-15.08.0/agents/cmake/FindXsltproc.cmake 2015-08-10 21:01:02.000000000 +0000
@@ -0,0 +1,32 @@
+# Find xsltproc executable and provide a macro to generate D-Bus interfaces.
+#
+# The following variables are defined :
+# XSLTPROC_EXECUTABLE - path to the xsltproc executable
+# Xsltproc_FOUND - true if the program was found
+#
+find_program(XSLTPROC_EXECUTABLE xsltproc DOC "Path to the xsltproc executable")
+mark_as_advanced(XSLTPROC_EXECUTABLE)
+
+if(XSLTPROC_EXECUTABLE)
+ set(Xsltproc_FOUND TRUE)
+
+ # We depend on kdepimlibs, make sure it's found
+ if(NOT DEFINED KF5Akonadi_DATA_DIR)
+ find_package(KF5Akonadi REQUIRED)
+ endif()
+
+
+ # Macro to generate a D-Bus interface description from a KConfigXT file
+ macro(kcfg_generate_dbus_interface _kcfg _name)
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_name}.xml
+ COMMAND ${XSLTPROC_EXECUTABLE} --stringparam interfaceName ${_name}
+ ${KF5Akonadi_DATA_DIR}/kcfg2dbus.xsl
+ ${_kcfg}
+ > ${CMAKE_CURRENT_BINARY_DIR}/${_name}.xml
+ DEPENDS ${KF5Akonadi_DATA_DIR}/kcfg2dbus.xsl
+ ${_kcfg}
+ )
+ endmacro()
+endif()
+
diff -Nru kdepim-runtime-4.14.6/agents/CMakeLists.txt kdepim-runtime-15.08.0/agents/CMakeLists.txt
--- kdepim-runtime-4.14.6/agents/CMakeLists.txt 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/agents/CMakeLists.txt 2015-08-10 21:01:02.000000000 +0000
@@ -1,20 +1,49 @@
+project(agents)
+cmake_minimum_required(VERSION 2.8.12)
+
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
-macro(kdepim_add_agent _target)
- if(KDEPIM_BUILD_AGENTS_AS_PLUGINS)
- add_definitions(-DKDEPIM_PLUGIN_AGENT)
- kde4_add_plugin(${_target} ${ARGN})
- install( TARGETS ${_target} DESTINATION ${PLUGIN_INSTALL_DIR}/ )
- else()
- kde4_add_executable(${_target} ${ARGN})
- install(TARGETS ${_target} ${INSTALL_TARGETS_DEFAULT_ARGS})
- endif()
-endmacro()
+if ("${CMAKE_SOURCE_DIR}" STREQUAL "${agents_SOURCE_DIR}")
+
+ find_package(ECM 5.9.0 CONFIG REQUIRED)
+ set(CMAKE_MODULE_PATH ${agents_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
+
+ include(ECMPackageConfigHelpers)
+ include(ECMSetupVersion)
+ include(FeatureSummary)
+ include(KDEInstallDirs)
+ include(KDECMakeSettings)
+ include(KDEFrameworkCompilerSettings)
+
+ set(KDEPIMLIBS_LIB_VERSION "4.75.0")
+ set(KF5_VERSION "5.9.0")
+ set(QT_REQUIRED_VERSION "5.4.0")
+ # KF5 package
+ find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5NotifyConfig ${KF5_VERSION} CONFIG REQUIRED)
+
+ # KdepimLibs package
+ find_package(KF5Akonadi ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5Mime ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5AkonadiMime ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5MailTransport ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5PimIdentities ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5AkonadiContact ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5CalendarCore ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
+
+
+ # Xsltproc
+ find_package(Xsltproc)
+ set_package_properties(Xsltproc PROPERTIES DESCRIPTION "XSLT processor from libxslt" TYPE REQUIRED PURPOSE "Required to generate D-Bus interfaces for all Akonadi resources.")
+
+endif()
add_subdirectory( maildispatcher )
add_subdirectory( newmailnotifier )
add_subdirectory( migration )
add_subdirectory( invitations )
-install(FILES akonadinepomukfeederagent.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents")
+if ("${CMAKE_SOURCE_DIR}" STREQUAL "${agents_SOURCE_DIR}")
+ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+endif()
diff -Nru kdepim-runtime-4.14.6/agents/invitations/CMakeLists.txt kdepim-runtime-15.08.0/agents/invitations/CMakeLists.txt
--- kdepim-runtime-4.14.6/agents/invitations/CMakeLists.txt 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/agents/invitations/CMakeLists.txt 2015-08-10 21:01:02.000000000 +0000
@@ -1,35 +1,41 @@
+
+
set( invitationsagent_SRCS
invitationsagent.cpp
incidenceattribute.cpp
)
-#kde4_add_ui_files(invitationsagent_SRCS settings.ui)
-#kde4_add_kcfg_files(invitationsagent_SRCS settings.kcfgc)
+add_definitions(-DTRANSLATION_DOMAIN=\"akonadi_invitations_agent\")
+
+#ki18n_wrap_ui(invitationsagent_SRCS settings.ui)
+#kconfig_add_kcfg_files(invitationsagent_SRCS settings.kcfgc)
#kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/invitationsagent.kcfg org.kde.Akonadi.MailDispatcher.Settings)
-#qt4_add_dbus_adaptor(invitationsagent_SRCS
+#qt5_add_dbus_adaptor(invitationsagent_SRCS
# ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.MailDispatcher.Settings.xml settings.h Settings
#)
-## qt4_add_dbus_adaptor( invitationsagent_SRCS
+## qt5_add_dbus_adaptor( invitationsagent_SRCS
## ${KDE4_DBUS_INTERFACES_DIR}/org.kde.Akonadi.MailDispatcher.xml invitationsagent.h MailDispatcherAgent
## )
-kde4_add_executable(akonadi_invitations_agent ${invitationsagent_SRCS})
+add_executable(akonadi_invitations_agent ${invitationsagent_SRCS})
target_link_libraries(akonadi_invitations_agent
- ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS}
- ${KDEPIMLIBS_AKONADI_LIBS}
- ${KDEPIMLIBS_AKONADI_KMIME_LIBS}
- ${KDEPIMLIBS_KMIME_LIBS}
- ${KDEPIMLIBS_MAILTRANSPORT_LIBS}
- ${KDEPIMLIBS_KCALCORE_LIBS}
+ KF5::KIOCore
+ KF5::AkonadiCore
+ KF5::AkonadiMime
+ KF5::Mime
+ KF5::MailTransport
+ KF5::CalendarCore
+ KF5::AkonadiAgentBase
+ KF5::IdentityManagement
)
-if (Q_WS_MAC)
+if( APPLE )
set_target_properties(akonadi_invitations_agent PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template)
set_target_properties(akonadi_invitations_agent PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.Akonadi.invitationsagent")
set_target_properties(akonadi_invitations_agent PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi Invitations Calendar")
endif ()
-install(TARGETS akonadi_invitations_agent ${INSTALL_TARGETS_DEFAULT_ARGS})
-install(FILES invitationsagent.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents")
+install(TARGETS akonadi_invitations_agent ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
+install(FILES invitationsagent.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents")
diff -Nru kdepim-runtime-4.14.6/agents/invitations/incidenceattribute.cpp kdepim-runtime-15.08.0/agents/invitations/incidenceattribute.cpp
--- kdepim-runtime-4.14.6/agents/invitations/incidenceattribute.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/agents/invitations/incidenceattribute.cpp 2015-08-10 21:01:02.000000000 +0000
@@ -26,68 +26,68 @@
class IncidenceAttribute::Private
{
- public:
+public:
QString status;
Akonadi::Item::Id referenceId;
- explicit Private() : referenceId( -1 ) {}
+ explicit Private() : referenceId(-1) {}
};
IncidenceAttribute::IncidenceAttribute()
- : Attribute(), d( new Private )
+ : Attribute(), d(new Private)
{
}
IncidenceAttribute::~IncidenceAttribute()
{
- delete d;
+ delete d;
}
QByteArray IncidenceAttribute::type() const
{
- static const QByteArray sType( "incidence" );
+ static const QByteArray sType("incidence");
return sType;
}
-Attribute* IncidenceAttribute::clone() const
+Attribute *IncidenceAttribute::clone() const
{
- IncidenceAttribute *other = new IncidenceAttribute;
- return other;
+ IncidenceAttribute *other = new IncidenceAttribute;
+ return other;
}
QByteArray IncidenceAttribute::serialized() const
{
- QString data;
- QTextStream out( &data );
- out << d->status;
- out << d->referenceId;
- return data.toUtf8();
+ QString data;
+ QTextStream out(&data);
+ out << d->status;
+ out << d->referenceId;
+ return data.toUtf8();
}
-void IncidenceAttribute::deserialize( const QByteArray &data )
-{
- QString s( QString::fromUtf8( data ) );
- QTextStream in( &s );
- in >> d->status;
- in >> d->referenceId;
+void IncidenceAttribute::deserialize(const QByteArray &data)
+{
+ QString s(QString::fromUtf8(data));
+ QTextStream in(&s);
+ in >> d->status;
+ in >> d->referenceId;
}
QString IncidenceAttribute::status() const
{
- return d->status;
+ return d->status;
}
-void IncidenceAttribute::setStatus( const QString &newstatus ) const
+void IncidenceAttribute::setStatus(const QString &newstatus) const
{
- d->status = newstatus;
+ d->status = newstatus;
}
Akonadi::Item::Id IncidenceAttribute::reference() const
{
- return d->referenceId;
+ return d->referenceId;
}
-void IncidenceAttribute::setReference( Akonadi::Item::Id id )
+void IncidenceAttribute::setReference(Akonadi::Item::Id id)
{
- d->referenceId = id;
+ d->referenceId = id;
}
diff -Nru kdepim-runtime-4.14.6/agents/invitations/incidenceattribute.h kdepim-runtime-15.08.0/agents/invitations/incidenceattribute.h
--- kdepim-runtime-4.14.6/agents/invitations/incidenceattribute.h 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/agents/invitations/incidenceattribute.h 2015-08-10 21:01:02.000000000 +0000
@@ -20,22 +20,23 @@
#ifndef INCIDENCEATTRIBUTE_H
#define INCIDENCEATTRIBUTE_H
-#include
-#include
+#include
+#include
-namespace Akonadi {
+namespace Akonadi
+{
class IncidenceAttribute : public Akonadi::Attribute
{
- public:
+public:
explicit IncidenceAttribute();
~IncidenceAttribute();
- virtual QByteArray type() const;
- virtual Attribute* clone() const;
+ QByteArray type() const Q_DECL_OVERRIDE;
+ Attribute *clone() const Q_DECL_OVERRIDE;
- virtual QByteArray serialized() const;
- virtual void deserialize( const QByteArray &data );
+ QByteArray serialized() const Q_DECL_OVERRIDE;
+ void deserialize(const QByteArray &data) Q_DECL_OVERRIDE;
/**
* The status the invitation is in.
@@ -44,16 +45,16 @@
* "new", "accepted", "tentative", "counter", "cancel", "reply", "delegated"
*/
QString status() const;
- void setStatus( const QString &newstatus ) const;
+ void setStatus(const QString &newstatus) const;
/**
* The referenced item. This is used e.g. in the invitationagent to
* let users know where the original mail message is.
*/
Akonadi::Item::Id reference() const;
- void setReference( Akonadi::Item::Id id );
+ void setReference(Akonadi::Item::Id id);
- private:
+private:
class Private;
Private *const d;
};
diff -Nru kdepim-runtime-4.14.6/agents/invitations/invitationsagent.cpp kdepim-runtime-15.08.0/agents/invitations/invitationsagent.cpp
--- kdepim-runtime-4.14.6/agents/invitations/invitationsagent.cpp 2015-02-27 00:16:51.000000000 +0000
+++ kdepim-runtime-15.08.0/agents/invitations/invitationsagent.cpp 2015-08-10 21:01:02.000000000 +0000
@@ -21,66 +21,66 @@
#include "incidenceattribute.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
#include
#include
-#include
+#include
#include
#include
#include
#include
-#include
+#include
#include
-#include
#include
#include
#include
#include
+#include
using namespace Akonadi;
class InvitationsCollectionRequestJob : public SpecialCollectionsRequestJob
{
- public:
- InvitationsCollectionRequestJob( SpecialCollections* collection, InvitationsAgent *agent )
- : SpecialCollectionsRequestJob( collection, agent )
+public:
+ InvitationsCollectionRequestJob(SpecialCollections *collection, InvitationsAgent *agent)
+ : SpecialCollectionsRequestJob(collection, agent)
{
- setDefaultResourceType( QLatin1String( "akonadi_ical_resource" ) );
+ setDefaultResourceType(QStringLiteral("akonadi_ical_resource"));
- QVariantMap options;
- options.insert( QLatin1String( "Path" ), QString( KGlobal::dirs()->localxdgdatadir() + QLatin1String( "akonadi_invitations" ) ) );
- options.insert( QLatin1String( "Name" ), i18n( "Invitations" ) );
- setDefaultResourceOptions( options );
-
- QMap displayNameMap;
- displayNameMap.insert( "invitations", i18n( "Invitations" ) );
- setTypes( displayNameMap.keys() );
- setNameForTypeMap( displayNameMap );
-
- QMap iconNameMap;
- iconNameMap.insert( "invitations", QLatin1String( "folder" ) );
- setIconForTypeMap( iconNameMap );
+ QVariantMap options;
+ options.insert(QStringLiteral("Path"), QString(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + QStringLiteral("akonadi_invitations")));
+ options.insert(QStringLiteral("Name"), i18n("Invitations"));
+ setDefaultResourceOptions(options);
+
+ QMap displayNameMap;
+ displayNameMap.insert("invitations", i18n("Invitations"));
+ setTypes(displayNameMap.keys());
+ setNameForTypeMap(displayNameMap);
+
+ QMap iconNameMap;
+ iconNameMap.insert("invitations", QStringLiteral("folder"));
+ setIconForTypeMap(iconNameMap);
}
virtual ~InvitationsCollectionRequestJob()
@@ -90,27 +90,27 @@
class InvitationsCollection : public SpecialCollections
{
- public:
+public:
class Settings : public KCoreConfigSkeleton
{
- public:
+ public:
Settings()
{
- setCurrentGroup( QLatin1String("Invitations") );
- addItemString( QLatin1String("DefaultResourceId"), m_id, QString() );
+ setCurrentGroup(QStringLiteral("Invitations"));
+ addItemString(QStringLiteral("DefaultResourceId"), m_id, QString());
}
virtual ~Settings()
{
}
- private:
+ private:
QString m_id;
};
- InvitationsCollection( InvitationsAgent *agent )
- : Akonadi::SpecialCollections( new Settings ), m_agent( agent ), sInvitationsType( "invitations" )
+ InvitationsCollection(InvitationsAgent *agent)
+ : Akonadi::SpecialCollections(new Settings), m_agent(agent), sInvitationsType("invitations")
{
}
@@ -120,45 +120,46 @@
void clear()
{
- m_collection = Collection();
+ m_collection = Collection();
}
bool hasDefaultCollection() const
{
- return SpecialCollections::hasDefaultCollection( sInvitationsType );
+ return SpecialCollections::hasDefaultCollection(sInvitationsType);
}
Collection defaultCollection() const
{
- if ( !m_collection.isValid() )
- m_collection = SpecialCollections::defaultCollection( sInvitationsType );
+ if (!m_collection.isValid()) {
+ m_collection = SpecialCollections::defaultCollection(sInvitationsType);
+ }
- return m_collection;
+ return m_collection;
}
void registerDefaultCollection()
{
- defaultCollection();
- registerCollection( sInvitationsType, m_collection );
+ defaultCollection();
+ registerCollection(sInvitationsType, m_collection);
}
- SpecialCollectionsRequestJob* reguestJob() const
+ SpecialCollectionsRequestJob *reguestJob() const
{
- InvitationsCollectionRequestJob *job = new InvitationsCollectionRequestJob( const_cast( this ),
- m_agent );
- job->requestDefaultCollection( sInvitationsType );
+ InvitationsCollectionRequestJob *job = new InvitationsCollectionRequestJob(const_cast