Commit 251063c8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove KDELibs4Support

parent 60d7edcc
......@@ -27,9 +27,18 @@ ecm_setup_version(${KDEPIMLIBS_VERSION} VARIABLE_PREFIX KPIMIDENTITIES
)
########### Find packages ###########
find_package(KF5CoreAddons ${KF5_VERSION} CONFIG REQUIRED)
#REMOVE IT WHEN WE REMOVE from KF5PimTextEdit or KF5PimUtils
find_package(KF5KDELibs4Support ${KF5_VERSION} CONFIG REQUIRED)
find_package(Qt5Network NO_MODULE REQUIRED)
find_package(KF5CoreAddons ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Completion ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Emoticons ${KF5_VERSION} CONFIG REQUIRED)
if("${CMAKE_SOURCE_DIR}" STREQUAL "${KPimIdentities_SOURCE_DIR}")
find_package(KF5PimTextEdit ${KDEPIMLIBS_VERSION} CONFIG REQUIRED)
......
@PACKAGE_INIT@
find_dependency(KF5CoreAddons "@KF5_VERSION@")
find_dependency(KF5KDELibs4Support "@KF5_VERSION@")
find_dependency(KF5PimTextEdit "@KDEPIMLIBS_VERSION@")
include("${CMAKE_CURRENT_LIST_DIR}/KF5PimIdentitiesTargets.cmake")
......@@ -3,4 +3,4 @@ set(QT_REQUIRED_VERSION "5.2.0")
find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
ecm_add_tests( identitytest.cpp signaturetest.cpp NAME_PREFIX "kpimidentity-" LINK_LIBRARIES KF5PimIdentities KF5::PimTextEdit Qt5::Test KF5::KDELibs4Support)
ecm_add_tests( identitytest.cpp signaturetest.cpp NAME_PREFIX "kpimidentity-" LINK_LIBRARIES KF5PimIdentities KF5::PimTextEdit Qt5::Test KF5::ConfigCore KF5::TextWidgets KF5::XmlGui KF5::IconThemes)
......@@ -28,7 +28,6 @@
#include "kpimtextedit/textedit.h"
#include <KIconLoader>
#include <KStandardDirs>
#include <KConfigGroup>
#include <QStandardPaths>
#include <KConfig>
......
......@@ -24,7 +24,14 @@ PUBLIC
PRIVATE
KF5::KIOCore
KF5::PimUtils
KF5::KDELibs4Support
Qt5::Network
KF5::Completion
KF5::I18n
KF5::TextWidgets
KF5::WidgetsAddons
KF5::XmlGui
KF5::KIOWidgets
KF5::ConfigCore
)
set_target_properties(KF5PimIdentities PROPERTIES
......
......@@ -21,7 +21,7 @@
#include "identity.h"
#include "signature.h"
#include <kdebug.h>
#include <qdebug.h>
#include <kconfiggroup.h>
#include <kpimutils/email.h>
......@@ -118,7 +118,7 @@ void Identity::writeConfig( KConfigGroup &config ) const
QHash<QString, QVariant>::const_iterator end = mPropertiesMap.constEnd();
while ( i != end ) {
config.writeEntry( i.key(), i.value() );
kDebug( 5325 ) << "Store:" << i.key() << ":" << i.value();
qDebug() << "Store:" << i.key() << ":" << i.value();
++i;
}
mSignature.writeConfig( config );
......
......@@ -25,7 +25,7 @@
#include "kpimidentities_export.h"
#include "signature.h"
#include <kdemacros.h>
//#include <kdemacros.h>
#include <QtCore/QString>
#include <QtCore/QStringList>
......
......@@ -26,10 +26,10 @@ static const char configKeyDefaultIdentity[] = "Default Identity";
#include <kpimutils/email.h> // for static helper functions
#include <kemailsettings.h> // for IdentityEntry::fromControlCenter()
#include <klocale.h>
//#include <klocale.h>
#include <klocalizedstring.h>
#include <kglobal.h>
#include <kdebug.h>
//#include <kglobal.h>
#include <qdebug.h>
#include <kconfig.h>
#include <kuser.h>
#include <kconfiggroup.h>
......@@ -145,7 +145,7 @@ void IdentityManager::Private::readConfig( KConfig *config )
}
if ( !haveDefault ) {
kWarning( 5325 ) << "IdentityManager: There was no default identity."
qWarning() << "IdentityManager: There was no default identity."
<< "Marking first one as default.";
mIdentities.first().setIsDefault( true );
}
......@@ -265,7 +265,7 @@ int IdentityManager::Private::newUoid()
void IdentityManager::Private::slotIdentitiesChanged( const QString &id )
{
kDebug( 5325 ) << " KPIMIdentities::IdentityManager::slotIdentitiesChanged :" << id;
qDebug() << " KPIMIdentities::IdentityManager::slotIdentitiesChanged :" << id;
const QString ourIdentifier = QString::fromLatin1( "%1/%2" ).
arg( QDBusConnection::sessionBus().baseService() ).
arg( q->property( "uniqueDBusPath" ).toString() );
......@@ -299,7 +299,7 @@ IdentityManager::IdentityManager( bool readonly, QObject *parent,
d->mConfig = new KConfig( QStringLiteral("emailidentities") );
d->readConfig( d->mConfig );
if ( d->mIdentities.isEmpty() ) {
kDebug( 5325 ) << "emailidentities is empty -> convert from kmailrc";
qDebug() << "emailidentities is empty -> convert from kmailrc";
// No emailidentities file, or an empty one due to broken conversion
// (kconf_update bug in kdelibs <= 3.2.2)
// => convert it, i.e. read settings from kmailrc
......@@ -308,7 +308,7 @@ IdentityManager::IdentityManager( bool readonly, QObject *parent,
}
// we need at least a default identity:
if ( d->mIdentities.isEmpty() ) {
kDebug( 5325 ) << "IdentityManager: No identity found. Creating default.";
qDebug() << "IdentityManager: No identity found. Creating default.";
d->createDefaultIdentity();
commit();
}
......@@ -357,8 +357,8 @@ IdentityManager::IdentityManager( bool readonly, QObject *parent,
IdentityManager::~IdentityManager()
{
kWarning( hasPendingChanges(), 5325 )
<< "IdentityManager: There were uncommitted changes!";
if (hasPendingChanges())
qWarning() << "IdentityManager: There were uncommitted changes!";
delete d;
}
......@@ -404,14 +404,14 @@ void IdentityManager::commit()
const Identity &orig = identityForUoid( uoid ); // look up in mIdentities
if ( *it != orig ) {
// changed identity
kDebug( 5325 ) << "emitting changed() for identity" << uoid;
qDebug() << "emitting changed() for identity" << uoid;
emit changed( *it );
changedUOIDs << uoid;
}
seenUOIDs.removeAll( uoid );
} else {
// new identity
kDebug( 5325 ) << "emitting added() for identity" << ( *it ).uoid();
qDebug() << "emitting added() for identity" << ( *it ).uoid();
emit added( *it );
}
}
......@@ -419,7 +419,7 @@ void IdentityManager::commit()
// what's left are deleted identities:
for ( QList<uint>::ConstIterator it = seenUOIDs.constBegin();
it != seenUOIDs.constEnd(); ++it ) {
kDebug( 5325 ) << "emitting deleted() for identity" << ( *it );
qDebug() << "emitting deleted() for identity" << ( *it );
emit deleted( *it );
}
......@@ -552,7 +552,7 @@ Identity &IdentityManager::modifyIdentityForName( const QString &name )
}
}
kWarning( 5325 ) << "IdentityManager::modifyIdentityForName() used as"
qWarning() << "IdentityManager::modifyIdentityForName() used as"
<< "newFromScratch() replacement!"
<< endl << " name == \"" << name << "\"";
return newFromScratch( name );
......@@ -566,7 +566,7 @@ Identity &IdentityManager::modifyIdentityForUoid( uint uoid )
}
}
kWarning( 5325 ) << "IdentityManager::identityForUoid() used as"
qWarning() << "IdentityManager::identityForUoid() used as"
<< "newFromScratch() replacement!"
<< endl << " uoid == \"" << uoid << "\"";
return newFromScratch( i18n( "Unnamed" ) );
......@@ -581,9 +581,9 @@ const Identity &IdentityManager::defaultIdentity() const
}
if ( d->mIdentities.isEmpty() ) {
kFatal( 5325 ) << "IdentityManager: No default identity found!";
qCritical() << "IdentityManager: No default identity found!";
} else {
kWarning( 5325 ) << "IdentityManager: No default identity found!";
qWarning() << "IdentityManager: No default identity found!";
}
return *begin();
}
......
......@@ -21,11 +21,11 @@
#include "signature.h"
#include <kdebug.h>
#include <qdebug.h>
#include <klocalizedstring.h>
#include <kmessagebox.h>
#include <kconfiggroup.h>
#include <kurl.h>
#include <QUrl>
#include <kprocess.h>
#include <KRichTextEdit>
#include <kpimutils/kfileio.h>
......@@ -162,7 +162,7 @@ QString Signature::rawText( bool *ok ) const
case FromCommand:
return textFromCommand( ok );
};
kFatal( 5325 ) << "Signature::type() returned unknown value!";
qCritical() << "Signature::type() returned unknown value!";
return QString(); // make compiler happy
}
......@@ -212,10 +212,10 @@ QString Signature::textFromFile( bool *ok ) const
assert( mType == FromFile );
// TODO: Use KIO::NetAccess to download non-local files!
if ( !KUrl( mUrl ).isLocalFile() &&
if ( !QUrl( mUrl ).isLocalFile() &&
!( QFileInfo( mUrl ).isRelative() &&
QFileInfo( mUrl ).exists() ) ) {
kDebug( 5325 ) << "Signature::textFromFile:"
qDebug() << "Signature::textFromFile:"
<< "non-local URLs are unsupported";
if ( ok ) {
*ok = false;
......
......@@ -25,7 +25,7 @@
#include "kpimidentities_export.h"
#include <kdemacros.h>
//#include <kdemacros.h>
#include <QtCore/QString>
#include <QtCore/QStringList>
......
......@@ -24,7 +24,6 @@
#include <kactioncollection.h>
#include <klocalizedstring.h>
#include <qdebug.h>
#include <kdialog.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <kshellcompletion.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment