diff --git a/kleopatra/CMakeLists.txt b/kleopatra/CMakeLists.txt --- a/kleopatra/CMakeLists.txt +++ b/kleopatra/CMakeLists.txt @@ -47,7 +47,6 @@ find_package(KF5Libkleo ${LIBKLEO_VERSION} CONFIG REQUIRED) find_package(KF5Mime ${KMIME_VERSION} CONFIG REQUIRED) find_package(KF5Gpgmepp ${GPGMEPP_VERSION} CONFIG REQUIRED) - find_package(KF5Libkdepim ${LIBKDEPIM_VERSION} CONFIG REQUIRED) find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test Network) endif() # Standalone build @@ -201,7 +200,6 @@ utils/scrollarea.cpp utils/dragqueen.cpp utils/multivalidator.cpp - utils/progressmanager.cpp utils/systemtrayicon.cpp utils/hex.cpp @@ -406,7 +404,6 @@ KF5::DBusAddons Qt5::Network ${_kleopatra_uiserver_extra_libs} - KF5::Libkdepim ) if(USABLE_ASSUAN_FOUND) diff --git a/kleopatra/mainwindow.cpp b/kleopatra/mainwindow.cpp --- a/kleopatra/mainwindow.cpp +++ b/kleopatra/mainwindow.cpp @@ -55,10 +55,6 @@ #include "utils/filedialog.h" #include "utils/clipboardmenu.h" -// from libkdepim -#include "libkdepim/statusbarprogresswidget.h" -#include "libkdepim/progressdialog.h" -#include #include #include #include @@ -258,14 +254,6 @@ vbox->addWidget(&tabWidget); q->setCentralWidget(mainWidget); - KPIM::ProgressDialog *progressDialog = new KPIM::ProgressDialog(q->statusBar(), q); - KDAB_SET_OBJECT_NAME(progressDialog); - progressDialog->hide(); - KPIM::StatusbarProgressWidget *statusBarProgressWidget - = new KPIM::StatusbarProgressWidget(progressDialog, q->statusBar()); - KDAB_SET_OBJECT_NAME(statusBarProgressWidget); - q->statusBar()->addPermanentWidget(statusBarProgressWidget, 0); - statusBarProgressWidget->show(); } MainWindow::Private::Private(MainWindow *qq) @@ -291,7 +279,6 @@ setupActions(); - connect(&controller, &KeyListController::message, q->statusBar(), &QStatusBar::showMessage); connect(&controller, SIGNAL(contextMenuRequested(QAbstractItemView*,QPoint)), q, SLOT(slotContextMenuRequested(QAbstractItemView*,QPoint))); q->createGUI(QStringLiteral("kleopatra.rc")); @@ -369,7 +356,6 @@ clipboadMenu->clipboardMenu()->setDelayed(false); coll->addAction(QStringLiteral("clipboard_menu"), clipboadMenu->clipboardMenu()); - q->createStandardStatusBarAction(); q->setStandardToolBarMenuEnabled(true); controller.createActions(coll); diff --git a/kleopatra/models/keycache.cpp b/kleopatra/models/keycache.cpp --- a/kleopatra/models/keycache.cpp +++ b/kleopatra/models/keycache.cpp @@ -40,7 +40,6 @@ #include "smimevalidationpreferences.h" #include -#include #include #include @@ -1049,11 +1048,6 @@ connect(job, SIGNAL(result(GpgME::KeyListResult,std::vector)), q, SLOT(listAllKeysJobDone(GpgME::KeyListResult,std::vector))); - const QString label = protocol == Kleo::CryptoBackendFactory::instance()->smime() - ? i18n("Listing X.509 certificates") - : i18n("Listing OpenPGP certificates"); - (void)ProgressManager::createForJob(job, label); - connect(q, &RefreshKeysJob::canceled, job, &Job::slotCancel); diff --git a/kleopatra/utils/progressmanager.h b/kleopatra/utils/progressmanager.h deleted file mode 100644 --- a/kleopatra/utils/progressmanager.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- mode: c++; c-basic-offset:4 -*- - utils/progressmanager.h - - This file is part of Kleopatra, the KDE keymanager - Copyright (c) 2008 Klarälvdalens Datakonsult AB - - Kleopatra is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Kleopatra 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 - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - In addition, as a special exception, the copyright holders give - permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked - combinations including the two. You must obey the GNU General - Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to - your version of the file, but you are not obligated to do so. If - you do not wish to do so, delete this exception statement from - your version. -*/ - -#ifndef __KLEOPATRA_UTILS_PROGRESSMANAGER_H_ -#define __KLEOPATRA_UTILS_PROGRESSMANAGER_H_ - -namespace KPIM -{ -class ProgressItem; -} - -namespace Kleo -{ -class Job; -} - -class QString; - -namespace Kleo -{ -namespace ProgressManager -{ - -KPIM::ProgressItem *createForJob(Kleo::Job *job, const QString &label); - -} // namespace ProgressManager -} // namespace Kleo - -#endif // __KLEOPATRA_UTILS_PROGRESSMANAGER_H_ diff --git a/kleopatra/utils/progressmanager.cpp b/kleopatra/utils/progressmanager.cpp deleted file mode 100644 --- a/kleopatra/utils/progressmanager.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- mode: c++; c-basic-offset:4 -*- - utils/progressmanager.cpp - - This file is part of Kleopatra, the KDE keymanager - Copyright (c) 2008 Klarälvdalens Datakonsult AB - - Kleopatra is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Kleopatra 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 - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - In addition, as a special exception, the copyright holders give - permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked - combinations including the two. You must obey the GNU General - Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to - your version of the file, but you are not obligated to do so. If - you do not wish to do so, delete this exception statement from - your version. -*/ - -#include - -#include "utils/progressmanager.h" -#include "utils/progressmanager_p.h" - -using namespace Kleo; - -KPIM::ProgressItem *ProgressManager::createForJob(Job *job, const QString &label) -{ - if (!job) { - return 0; - } - - KPIM::ProgressItem *const item = KPIM::ProgressManager::createProgressItem(label); - if (item) { - new Mapper(item, job); - } - return item; -} - -#include "moc_progressmanager_p.cpp" diff --git a/kleopatra/utils/progressmanager_p.h b/kleopatra/utils/progressmanager_p.h deleted file mode 100644 --- a/kleopatra/utils/progressmanager_p.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- mode: c++; c-basic-offset:4 -*- - utils/progressmanager_p.h - - This file is part of Kleopatra, the KDE keymanager - Copyright (c) 2008 Klarälvdalens Datakonsult AB - - Kleopatra is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Kleopatra 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 - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - In addition, as a special exception, the copyright holders give - permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked - combinations including the two. You must obey the GNU General - Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to - your version of the file, but you are not obligated to do so. If - you do not wish to do so, delete this exception statement from - your version. -*/ - -#ifndef __KLEOPATRA_UTILS_PROGRESSMANAGER_P_H_ -#define __KLEOPATRA_UTILS_PROGRESSMANAGER_P_H_ - -#include "utils/progressmanager.h" - -#include - -#include - -#include - -namespace -{ - -class Mapper : public QObject -{ - Q_OBJECT -public: - Mapper(KPIM::ProgressItem *item, Kleo::Job *job) - : QObject(item), m_item(item), m_job(job) - { - - connect(item, &KPIM::ProgressItem::progressItemCanceled, - job, &Kleo::Job::slotCancel); - - connect(job, &Kleo::Job::done, - this, &Mapper::slotDone); - connect(job, &Kleo::Job::progress, - this, &Mapper::slotProgress); - } - -private Q_SLOTS: - void slotDone() - { - if (m_item) { - m_item->setComplete(); - } - m_item = 0; - } - - void slotProgress(const QString &what, int current, int total) - { - if (!m_item) { - return; - } - m_item->setStatus(what); - m_item->setProgress(total ? current / total : 0); - } - -private: - QPointer m_item; - QPointer m_job; -}; - -} - -#endif // __KLEOPATRA_UTILS_PROGRESSMANAGER_P_H_