Commit cb1c9046 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Rename more class

parent de61e7fa
......@@ -4,16 +4,16 @@ include_directories(${AKONADI_INCLUDE_DIR}
)
set(pimsettingexporterconsole_SRCS
set(pimdataexporterconsole_SRCS
importexportprogressindicatorconsole.cpp
pimdataexporterconsole.cpp
loginfo.cpp
loginfile.cpp
main.cpp)
ecm_qt_declare_logging_category(pimsettingexporterconsole_SRCS HEADER pimdataexportconsole_debug.h IDENTIFIER PIMDATAEXPORTERCONSOLE_LOG CATEGORY_NAME org.kde.pim.pimdataexporterconsole)
ecm_qt_declare_logging_category(pimdataexporterconsole_SRCS HEADER pimdataexportconsole_debug.h IDENTIFIER PIMDATAEXPORTERCONSOLE_LOG CATEGORY_NAME org.kde.pim.pimdataexporterconsole)
add_executable(pimsettingexporterconsole ${pimsettingexporterconsole_SRCS})
add_executable(pimsettingexporterconsole ${pimdataexporterconsole_SRCS})
target_link_libraries(pimsettingexporterconsole KF5::ConfigCore KF5::CoreAddons KF5::I18n KF5::Archive KF5::AkonadiCore KF5::MailCommon
pimdataexporterprivate
......
......@@ -6,7 +6,7 @@ include_directories(
set( PIMDATAEXPORTERCONSOLE_LOGinfiletest_SRCS loginfiletest.cpp ../loginfile.cpp )
ecm_qt_declare_logging_category(PIMDATAEXPORTERCONSOLE_LOGinfiletest_SRCS HEADER pimdataexportconsole_debug.h IDENTIFIER PIMDATAEXPORTERCONSOLE_LOG CATEGORY_NAME org.kde.pim.pimsettingexporterconsole)
ecm_qt_declare_logging_category(PIMDATAEXPORTERCONSOLE_LOGinfiletest_SRCS HEADER pimdataexportconsole_debug.h IDENTIFIER PIMDATAEXPORTERCONSOLE_LOG CATEGORY_NAME org.kde.pim.pimdataexporterconsole)
add_executable( PIMDATAEXPORTERCONSOLE_LOGinfiletest ${PIMDATAEXPORTERCONSOLE_LOGinfiletest_SRCS})
......
......@@ -35,7 +35,7 @@ int main(int argc, char *argv[])
QCommandLineParser parser;
KAboutData aboutData(QStringLiteral("pimsettingexporterconsole"), i18n("PIM Setting Exporter Console"),
QStringLiteral(PIMSETTINGEXPORTER_VERSION), i18n("PIM Setting Exporter Console"), KAboutLicense::GPL_V2,
QStringLiteral(PIMDATAEXPORTER_VERSION), i18n("PIM Setting Exporter Console"), KAboutLicense::GPL_V2,
i18n("Copyright © 2015-2019 pimsettingexporter authors"));
aboutData.addAuthor(i18n("Laurent Montel"), i18n("Maintainer"), QStringLiteral("montel@kde.org"));
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("logfile"), i18n("File to log information to."), QStringLiteral("file")));
......
......@@ -31,7 +31,7 @@
PimDataExporterConsole::PimDataExporterConsole(QObject *parent)
: QObject(parent)
, mPimSettingsBackupRestore(new PimDataBackupRestore(this))
, mPimDataBackupRestore(new PimDataBackupRestore(this))
, mLogInFile(nullptr)
, mLogInfo(new LogInfo(this))
, mMode(Import)
......@@ -53,14 +53,14 @@ PimDataExporterConsole::~PimDataExporterConsole()
void PimDataExporterConsole::initializeLogInFile()
{
connect(mPimSettingsBackupRestore, &PimDataBackupRestore::addEndLine, this, &PimDataExporterConsole::slotAddEndLine);
connect(mPimSettingsBackupRestore, &PimDataBackupRestore::addError, this, &PimDataExporterConsole::slotAddError);
connect(mPimSettingsBackupRestore, &PimDataBackupRestore::addInfo, this, &PimDataExporterConsole::slotAddInfo);
connect(mPimSettingsBackupRestore, &PimDataBackupRestore::addTitle, this, &PimDataExporterConsole::slotAddTitle);
connect(mPimSettingsBackupRestore, &PimDataBackupRestore::jobFinished, this, &PimDataExporterConsole::slotJobFinished);
connect(mPimSettingsBackupRestore, &PimDataBackupRestore::backupDone, this, &PimDataExporterConsole::slotBackupDone);
connect(mPimSettingsBackupRestore, &PimDataBackupRestore::jobFailed, this, &PimDataExporterConsole::slotJobFailed);
connect(mPimSettingsBackupRestore, &PimDataBackupRestore::restoreDone, this, &PimDataExporterConsole::slotRestoreDone);
connect(mPimDataBackupRestore, &PimDataBackupRestore::addEndLine, this, &PimDataExporterConsole::slotAddEndLine);
connect(mPimDataBackupRestore, &PimDataBackupRestore::addError, this, &PimDataExporterConsole::slotAddError);
connect(mPimDataBackupRestore, &PimDataBackupRestore::addInfo, this, &PimDataExporterConsole::slotAddInfo);
connect(mPimDataBackupRestore, &PimDataBackupRestore::addTitle, this, &PimDataExporterConsole::slotAddTitle);
connect(mPimDataBackupRestore, &PimDataBackupRestore::jobFinished, this, &PimDataExporterConsole::slotJobFinished);
connect(mPimDataBackupRestore, &PimDataBackupRestore::backupDone, this, &PimDataExporterConsole::slotBackupDone);
connect(mPimDataBackupRestore, &PimDataBackupRestore::jobFailed, this, &PimDataExporterConsole::slotJobFailed);
connect(mPimDataBackupRestore, &PimDataBackupRestore::restoreDone, this, &PimDataExporterConsole::slotRestoreDone);
}
void PimDataExporterConsole::closeLogFile()
......@@ -80,7 +80,7 @@ void PimDataExporterConsole::slotJobFailed()
{
qCWarning(PIMDATAEXPORTERCONSOLE_LOG) << "job failed";
closeLogFile();
mPimSettingsBackupRestore->closeArchive();
mPimDataBackupRestore->closeArchive();
}
void PimDataExporterConsole::slotBackupDone()
......@@ -93,7 +93,7 @@ void PimDataExporterConsole::slotBackupDone()
void PimDataExporterConsole::slotJobFinished()
{
qCDebug(PIMDATAEXPORTERCONSOLE_LOG) << "job finished";
mPimSettingsBackupRestore->nextStep();
mPimDataBackupRestore->nextStep();
}
void PimDataExporterConsole::slotAddEndLine()
......@@ -148,17 +148,17 @@ void PimDataExporterConsole::start()
if (!mTemplateFileName.isEmpty()) {
TemplateSelection selection;
const QHash<Utils::AppsType, Utils::importExportParameters> templateElements = selection.loadTemplate(mTemplateFileName);
mPimSettingsBackupRestore->setStoredParameters(templateElements);
mPimDataBackupRestore->setStoredParameters(templateElements);
}
switch (mMode) {
case Import:
if (!mPimSettingsBackupRestore->restoreStart(mImportExportFileName)) {
if (!mPimDataBackupRestore->restoreStart(mImportExportFileName)) {
qCDebug(PIMDATAEXPORTERCONSOLE_LOG) << "Unable to start restore.";
QTimer::singleShot(0, this, &PimDataExporterConsole::finished);
}
break;
case Export:
if (!mPimSettingsBackupRestore->backupStart(mImportExportFileName)) {
if (!mPimDataBackupRestore->backupStart(mImportExportFileName)) {
qCDebug(PIMDATAEXPORTERCONSOLE_LOG) << "Unable to start backup.";
QTimer::singleShot(0, this, &PimDataExporterConsole::finished);
}
......
......@@ -65,7 +65,7 @@ private:
void closeLogFile();
QString mTemplateFileName;
QString mImportExportFileName;
PimDataBackupRestore *mPimSettingsBackupRestore = nullptr;
PimDataBackupRestore *mPimDataBackupRestore = nullptr;
LogInFile *mLogInFile = nullptr;
LogInfo *mLogInfo = nullptr;
Mode mMode;
......
......@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
#ifndef PIMSETTINGSBACKUPRESTORE_H
#define PIMSETTINGSBACKUPRESTORE_H
#ifndef PIMDATABACKUPRESTORE_H
#define PIMDATABACKUPRESTORE_H
#include <QObject>
#include <QHash>
......@@ -80,4 +80,4 @@ private:
ArchiveStorage *mArchiveStorage = nullptr;
};
#endif // PIMSETTINGSBACKUPRESTORE_H
#endif // PIMDATABACKUPRESTORE_H
......@@ -31,12 +31,12 @@ PimDataBackupThread::PimDataBackupThread(KZip *zip, const QString &url, const QS
, mArchiveName(archivename)
, mZip(zip)
{
qCDebug(PIMDATAEXPORTERCORE_LOG) << " PimSettingBackupThread::PimSettingBackupThread" << this;
qCDebug(PIMDATAEXPORTERCORE_LOG) << " PimDataBackupThread::PimDataBackupThread" << this;
}
PimDataBackupThread::~PimDataBackupThread()
{
qCDebug(PIMDATAEXPORTERCORE_LOG) << " PimSettingBackupThread::~PimSettingBackupThread()" << this;
qCDebug(PIMDATAEXPORTERCORE_LOG) << " PimDataBackupThread::~PimDataBackupThread()" << this;
}
void PimDataBackupThread::run()
......
......@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
#ifndef PIMSETTINGBACKUPTHREAD_H
#define PIMSETTINGBACKUPTHREAD_H
#ifndef PIMDATABACKUPTHREAD_H
#define PIMDATABACKUPTHREAD_H
#include <QThread>
class KZip;
......@@ -44,4 +44,4 @@ private:
KZip *mZip = nullptr;
};
#endif // PIMSETTINGBACKUPTHREAD_H
#endif // PIMDATABACKUPTHREAD_H
......@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
#ifndef PIMSETTINGEXPORTER_CORE_PRIVATE_EXPORT_H
#define PIMSETTINGEXPORTER_CORE_PRIVATE_EXPORT_H
#ifndef PIMDATAEXPORTER_CORE_PRIVATE_EXPORT_H
#define PIMDATAEXPORTER_CORE_PRIVATE_EXPORT_H
#include "pimdataexporter_export.h"
......
......@@ -16,8 +16,8 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef PIMSETTINGEXPORTERKERNEL_H
#define PIMSETTINGEXPORTERKERNEL_H
#ifndef PIMDATAEXPORTERKERNEL_H
#define PIMDATAEXPORTERKERNEL_H
#include <MailCommon/MailInterfaces>
#include "pimdataexporter_export.h"
......
......@@ -45,7 +45,7 @@ set(pimdataexporter_SRCS
qt5_add_resources(pimdataexporter_SRCS pimsettingexporter.qrc)
ecm_qt_declare_logging_category(pimdataexporter_SRCS HEADER pimdataexportgui_debug.h IDENTIFIER PIMDATAEXPORTERGUI_LOG CATEGORY_NAME org.kde.pim.pimsettingexportergui)
ecm_qt_declare_logging_category(pimdataexporter_SRCS HEADER pimdataexportgui_debug.h IDENTIFIER PIMDATAEXPORTERGUI_LOG CATEGORY_NAME org.kde.pim.pimdataexportergui)
add_executable(pimsettingexporter ${pimdataexporter_SRCS})
......
......@@ -16,7 +16,7 @@ target_link_libraries(pimdataexporterconfiguredialogtest Qt5::Test Qt5::Widgets
add_executable( pimdataexporterconfigurewidgettest pimdataexporterconfigurewidgettest.cpp ../widgets/pimdataexporterconfigurewidget.cpp ${pimdataexporter_kcfg_SRCS})
add_test(NAME pimdataexporterconfigurewidgettest COMMAND pimsettingexporterconfigurewidgettest)
add_test(NAME pimdataexporterconfigurewidgettest COMMAND pimdataexporterconfigurewidgettest)
ecm_mark_as_test(pimdataexporterconfigurewidgettest)
target_link_libraries(pimdataexporterconfigurewidgettest Qt5::Test Qt5::Widgets KF5::I18n KF5::ItemViews KF5::ConfigCore KF5::ConfigGui)
......
......@@ -50,7 +50,7 @@ void PimDataCommandLineOption::slotActivateRequested(const QStringList &argument
void PimDataCommandLineOption::createParser(const QApplication &app)
{
KAboutData aboutData(QStringLiteral("pimsettingexporter"), i18n("PIM Setting Exporter"),
QStringLiteral(PIMSETTINGEXPORTER_VERSION), i18n("PIM Setting Exporter"), KAboutLicense::GPL_V2,
QStringLiteral(PIMDATAEXPORTER_VERSION), i18n("PIM Setting Exporter"), KAboutLicense::GPL_V2,
i18n("Copyright © 2012-2019 pimsettingexporter authors"));
aboutData.addAuthor(i18n("Laurent Montel"), i18n("Maintainer"), QStringLiteral("montel@kde.org"));
mParser.addVersionOption();
......
......@@ -89,17 +89,17 @@ PimDataExporterWindow::~PimDataExporterWindow()
void PimDataExporterWindow::initializeBackupRestoreUi()
{
mPimSettingsBackupRestoreUI = new PimDataBackupRestoreUI(this, this);
connect(mPimSettingsBackupRestoreUI, &PimDataBackupRestore::addInfo, this, &PimDataExporterWindow::slotAddInfo);
connect(mPimSettingsBackupRestoreUI, &PimDataBackupRestore::addEndLine, this, &PimDataExporterWindow::slotAddEndLine);
connect(mPimSettingsBackupRestoreUI, &PimDataBackupRestore::addError, this, &PimDataExporterWindow::slotAddError);
connect(mPimSettingsBackupRestoreUI, &PimDataBackupRestore::addTitle, this, &PimDataExporterWindow::slotAddTitle);
connect(mPimSettingsBackupRestoreUI, &PimDataBackupRestore::updateActions, this, &PimDataExporterWindow::slotUpdateActions);
connect(mPimSettingsBackupRestoreUI, &PimDataBackupRestore::jobFinished, this, &PimDataExporterWindow::slotJobFinished);
connect(mPimSettingsBackupRestoreUI, &PimDataBackupRestore::backupDone, this, &PimDataExporterWindow::slotShowBackupFinishDialogInformation);
connect(mPimSettingsBackupRestoreUI, &PimDataBackupRestore::jobFailed, this, &PimDataExporterWindow::slotJobFailed);
connect(mPimSettingsBackupRestoreUI, &PimDataBackupRestoreUI::needSyncResource, this, &PimDataExporterWindow::slotAddResourceToSync);
connect(mPimSettingsBackupRestoreUI, &PimDataBackupRestore::restoreDone, this, &PimDataExporterWindow::slotRestoreDone);
mPimDataBackupRestoreUI = new PimDataBackupRestoreUI(this, this);
connect(mPimDataBackupRestoreUI, &PimDataBackupRestore::addInfo, this, &PimDataExporterWindow::slotAddInfo);
connect(mPimDataBackupRestoreUI, &PimDataBackupRestore::addEndLine, this, &PimDataExporterWindow::slotAddEndLine);
connect(mPimDataBackupRestoreUI, &PimDataBackupRestore::addError, this, &PimDataExporterWindow::slotAddError);
connect(mPimDataBackupRestoreUI, &PimDataBackupRestore::addTitle, this, &PimDataExporterWindow::slotAddTitle);
connect(mPimDataBackupRestoreUI, &PimDataBackupRestore::updateActions, this, &PimDataExporterWindow::slotUpdateActions);
connect(mPimDataBackupRestoreUI, &PimDataBackupRestore::jobFinished, this, &PimDataExporterWindow::slotJobFinished);
connect(mPimDataBackupRestoreUI, &PimDataBackupRestore::backupDone, this, &PimDataExporterWindow::slotShowBackupFinishDialogInformation);
connect(mPimDataBackupRestoreUI, &PimDataBackupRestore::jobFailed, this, &PimDataExporterWindow::slotJobFailed);
connect(mPimDataBackupRestoreUI, &PimDataBackupRestoreUI::needSyncResource, this, &PimDataExporterWindow::slotAddResourceToSync);
connect(mPimDataBackupRestoreUI, &PimDataBackupRestore::restoreDone, this, &PimDataExporterWindow::slotRestoreDone);
}
void PimDataExporterWindow::slotAddResourceToSync(const QString &name, const QString &identifier)
......@@ -109,12 +109,12 @@ void PimDataExporterWindow::slotAddResourceToSync(const QString &name, const QSt
void PimDataExporterWindow::slotJobFinished()
{
mPimSettingsBackupRestoreUI->nextStep();
mPimDataBackupRestoreUI->nextStep();
}
void PimDataExporterWindow::slotJobFailed()
{
mPimSettingsBackupRestoreUI->closeArchive();
mPimDataBackupRestoreUI->closeArchive();
}
void PimDataExporterWindow::slotRestoreDone()
......@@ -295,8 +295,8 @@ void PimDataExporterWindow::backupData(const QString &filename, const QString &t
if (dialog->exec()) {
mLogWidget->clear();
initializeBackupRestoreUi();
mPimSettingsBackupRestoreUI->setStoredParameters(dialog->storedType());
mPimSettingsBackupRestoreUI->setExportedInfoFileName(dialog->exportedFileInfo());
mPimDataBackupRestoreUI->setStoredParameters(dialog->storedType());
mPimDataBackupRestoreUI->setExportedInfoFileName(dialog->exportedFileInfo());
delete dialog;
if (currentFileName.isEmpty()) {
......@@ -314,7 +314,7 @@ void PimDataExporterWindow::backupData(const QString &filename, const QString &t
}
mTrayIcon->setStatus(KStatusNotifierItem::Active);
mTrayIcon->setToolTipSubTitle(i18n("Backup in progress..."));
if (!mPimSettingsBackupRestoreUI->backupStart(currentFileName)) {
if (!mPimDataBackupRestoreUI->backupStart(currentFileName)) {
qCDebug(PIMDATAEXPORTERGUI_LOG) << " backup Start failed";
}
mLastArchiveFileName = currentFileName;
......@@ -400,12 +400,12 @@ void PimDataExporterWindow::loadData(const QString &filename, const QString &tem
mLogWidget->clear();
mNeedToSyncResources.clear();
initializeBackupRestoreUi();
mPimSettingsBackupRestoreUI->setStoredParameters(dialog->storedType());
mPimDataBackupRestoreUI->setStoredParameters(dialog->storedType());
delete dialog;
mTrayIcon->setStatus(KStatusNotifierItem::Active);
mTrayIcon->setToolTipSubTitle(i18n("Restore in progress..."));
if (!mPimSettingsBackupRestoreUI->restoreStart(currentFileName)) {
if (!mPimDataBackupRestoreUI->restoreStart(currentFileName)) {
qCDebug(PIMDATAEXPORTERGUI_LOG) << " PimSettingExporterWindow restore failed";
}
} else {
......
......@@ -74,7 +74,7 @@ private:
QAction *mArchiveStructureInfo = nullptr;
QAction *mShowArchiveInformationsAction = nullptr;
QAction *mShowArchiveInformationsAboutCurrentArchiveAction = nullptr;
PimDataBackupRestoreUI *mPimSettingsBackupRestoreUI = nullptr;
PimDataBackupRestoreUI *mPimDataBackupRestoreUI = nullptr;
PimDataTrayIcon *mTrayIcon = nullptr;
};
......
......@@ -27,10 +27,10 @@
build against older kdelibs releases.
*/
#ifndef PIMSETTINGEXPORTER_VERSION_H
#define PIMSETTINGEXPORTER_VERSION_H
#ifndef PIMDATAEXPORTER_VERSION_H
#define PIMDATAEXPORTER_VERSION_H
#define PIMSETTINGEXPORTER_VERSION "@KDEPIM_VERSION@"
#define PIMDATAEXPORTER_VERSION "@KDEPIM_VERSION@"
#endif
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