Commit f906ebfd authored by Shashwat Jolly's avatar Shashwat Jolly

Merge branch 'master' of https://invent.kde.org/pim/kdepim-runtime into etesyncResource

parents d3bb0249 a982ea2f
......@@ -6,8 +6,8 @@ build_clazy_clang_tidy:
stage: build
image: kdeorg/ci-suse-qt514
extends: .linux
only:
- merge_requests
#only:
# - merge_requests
before_script:
- zypper install -y clazy
- git clone --depth=1 https://invent.kde.org/sysadmin/ci-tooling.git $CI_TOOLING
......@@ -19,7 +19,8 @@ build_clazy_clang_tidy:
- export CXX=clazy
- export CC=clang
- export CXXFLAGS="-Wno-deprecated-declarations"
- export CLAZY_CHECKS="level0,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch"
- export CLAZY_HEADER_FILTER='^(?!ui_)\w+.h\$'
- export CLAZY_CHECKS="level0,level1,detaching-member,ifndef-define-typo,isempty-vs-count,qrequiredresult-candidates,reserve-candidates,signal-with-return-value,unneeded-cast,function-args-by-ref,function-args-by-value,returning-void-expression,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch,old-style-connect,qstring-allocations,container-inside-loop,heap-allocated-small-trivial-type,inefficient-qlist,qstring-varargs"
- python3 -u $CI_TOOLING/helpers/prepare-dependencies.py --product $PRODUCT --project $PROJECT --branchGroup $BRANCH_GROUP --environment production --platform $PLATFORM --installTo $INSTALL_PREFIX
- python3 -u $CI_TOOLING/helpers/configure-build.py --product $PRODUCT --project $PROJECT --branchGroup $BRANCH_GROUP --platform $PLATFORM --installTo $INSTALL_PREFIX
- python3 -u $CI_TOOLING/helpers/compile-build.py --product $PRODUCT --project $PROJECT --branchGroup $BRANCH_GROUP --platform $PLATFORM --usingInstall $INSTALL_PREFIX
......
......@@ -241,7 +241,7 @@ void GoogleResourceMigrator::migrateNextAccount()
mMigrations.erase(mMigrations.begin());
if (instances.alreadyExists) {
message(Info, i18n("Google Groupware Resource for account %1 already exists, skipping.", account));
Q_EMIT message(Info, i18n("Google Groupware Resource for account %1 already exists, skipping.", account));
// Just to be sure, check that there are no left-over legacy instances
removeLegacyInstances(account, instances);
......@@ -251,15 +251,15 @@ void GoogleResourceMigrator::migrateNextAccount()
}
qCInfo(MIGRATION_LOG) << "GoogleResourceMigrator: starting migration of account" << account;
message(Info, i18n("Starting migration of account %1", account));
Q_EMIT message(Info, i18n("Starting migration of account %1", account));
qCInfo(MIGRATION_LOG) << "GoogleResourceMigrator: creating new" << akonadiGoogleGroupwareResource;
message(Info, i18n("Creating new instance of Google Gropware Resource"));
Q_EMIT message(Info, i18n("Creating new instance of Google Gropware Resource"));
auto job = new Akonadi::AgentInstanceCreateJob(akonadiGoogleGroupwareResource.toString(), this);
connect(job, &Akonadi::AgentInstanceCreateJob::finished,
this, [this, job, account, instances](KJob *) {
if (job->error()) {
qCWarning(MIGRATION_LOG) << "GoogleResourceMigrator: Failed to create new Google Groupware Resource:" << job->errorString();
message(Error, i18n("Failed to create a new Google Groupware Resource: %1", job->errorString()));
Q_EMIT message(Error, i18n("Failed to create a new Google Groupware Resource: %1", job->errorString()));
setMigrationState(MigratorBase::Failed);
return;
}
......@@ -267,7 +267,7 @@ void GoogleResourceMigrator::migrateNextAccount()
const auto newInstance = job->instance();
if (!migrateAccount(account, instances, newInstance)) {
qCWarning(MIGRATION_LOG) << "GoogleResourceMigrator: failed to migrate account" << account;
message(Error, i18n("Failed to migrate account %1", account));
Q_EMIT message(Error, i18n("Failed to migrate account %1", account));
setMigrationState(MigratorBase::Failed);
return;
}
......@@ -290,7 +290,7 @@ void GoogleResourceMigrator::migrateNextAccount()
<< instances.contactResource.identifier() << "to"
<< newInstance.identifier();
}
message(Success, i18n("Migrated account %1 to new Google Groupware Resource", account));
Q_EMIT message(Success, i18n("Migrated account %1 to new Google Groupware Resource", account));
++mMigrationsDone;
migrateNextAccount();
......
......@@ -262,7 +262,7 @@ EwsOAuthPrivate::EwsOAuthPrivate(EwsOAuth *parent, const QString &email, const Q
bool EwsOAuthPrivate::authenticate(bool interactive)
{
Q_Q(EwsOAuth);
//Q_Q(EwsOAuth);
qCInfoNC(EWSCLI_LOG) << QStringLiteral("Starting OAuth2 authentication");
......
......@@ -84,7 +84,7 @@ EwsMtaConfigDialog::~EwsMtaConfigDialog()
void EwsMtaConfigDialog::save()
{
if (!mUi->resourceWidget->selectedAgentInstances().isEmpty()) {
EwsMtaSettings::setEwsResource(mUi->resourceWidget->selectedAgentInstances().first().identifier());
EwsMtaSettings::setEwsResource(mUi->resourceWidget->selectedAgentInstances().constFirst().identifier());
mParentResource->setName(mUi->accountName->text());
EwsMtaSettings::self()->save();
} else {
......
......@@ -429,7 +429,7 @@ void ContactHandler::itemsUnlinked(const Item::List &items, const Collection &co
ContactsList contacts;
contacts.reserve(items.count());
std::transform(items.cbegin(), items.cend(), std::back_inserter(contacts),
[this, &collection](const Item &item){
[&collection](const Item &item){
ContactPtr contact(new Contact(item.payload<KContacts::Addressee>()));
contact->removeGroup(collection.remoteId());
return contact;
......
......@@ -3,6 +3,7 @@ Name=Google Groupware
Name[ca]=Google Groupware
Name[ca@valencia]=Google Groupware
Name[cs]=Google Groupware
Name[en_GB]=Google Groupware
Name[es]=Google Groupware
Name[et]=Google Groupware
Name[fr]=Google Groupware
......@@ -18,6 +19,7 @@ Comment=Access your Google Calendars, Contacts and Tasks from KDE
Comment[ca]=Accediu als calendaris, contactes i tasques de Google des del KDE
Comment[ca@valencia]=Accediu als calendaris, contactes i tasques de Google des del KDE
Comment[cs]=Přistupujte ke k kalendářům, kontaktům a úkolům z KDE
Comment[en_GB]=Access your Google Calendars, Contacts and Tasks from KDE
Comment[es]=Acceda a sus calendarios, contactos y tareas de Google desde KDE
Comment[et]=Oma Google'i kalendrite, kontaktide ja ülesannete kasutamine otse KDE-st
Comment[fr]=Accès à vos agendas, contacts et tâches Google depuis KDE
......
......@@ -175,5 +175,5 @@ bool GoogleResourceState::handleError(KGAPI2::Job *job, bool _cancelTask)
void GoogleResourceState::scheduleCustomTask(QObject *receiver, const char *method, const QVariant &argument)
{
return m_resource->scheduleCustomTask(receiver, method, argument);
m_resource->scheduleCustomTask(receiver, method, argument);
}
......@@ -97,7 +97,7 @@ void CompactPage::onCollectionFetchCompact(KJob *job)
return;
}
CollectionFetchJob *fetchJob = dynamic_cast<CollectionFetchJob *>(job);
CollectionFetchJob *fetchJob = qobject_cast<CollectionFetchJob *>(job);
Q_ASSERT(fetchJob);
Q_ASSERT(fetchJob->collections().size() == 1);
......
......@@ -879,7 +879,9 @@ void Pop3Test::testMixedLeaveRules()
// Generate 10 mails
//
QList<QByteArray> mails;
mails.reserve(10);
QStringList uids;
uids.reserve(10);
QString allowedRetrs;
for (int i = 0; i < 10; i++) {
QByteArray newMail = simpleMail1;
......
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