Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a2fa909c authored by Laurent Montel's avatar Laurent Montel 😁

Clean up code

parent 63b8e086
......@@ -96,6 +96,8 @@ set(pimsettingexporter_LIB_SRCS
synchronizeresourcejob.cpp
pimsettingsbackuprestore.cpp
pimsettingsbackuprestoreui.cpp
importexportprogressindicatorgui.cpp
importexportprogressindicatorbase.cpp
)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" )
......
......@@ -61,11 +61,6 @@ AbstractImportExportJob::~AbstractImportExportJob()
delete mProgressDialog;
}
QProgressDialog *AbstractImportExportJob::progressDialog()
{
return mProgressDialog;
}
void AbstractImportExportJob::createProgressDialog()
{
if (!mProgressDialog) {
......@@ -101,7 +96,7 @@ void AbstractImportExportJob::showInfo(const QString &text)
Q_EMIT info(text);
}
KZip *AbstractImportExportJob::archive()
KZip *AbstractImportExportJob::archive() const
{
return mArchiveStorage->archive();
}
......
......@@ -94,9 +94,8 @@ protected:
void overwriteDirectory(const QString &path, const KArchiveEntry *entry);
KZip *archive();
KZip *archive() const;
QProgressDialog *progressDialog();
void increaseProgressDialog();
void createProgressDialog();
......
......@@ -28,3 +28,18 @@ ImportExportProgressIndicatorBase::~ImportExportProgressIndicatorBase()
}
void ImportExportProgressIndicatorBase::increaseProgressDialog()
{
}
void ImportExportProgressIndicatorBase::createProgressDialog()
{
}
void ImportExportProgressIndicatorBase::showInfo(const QString &text)
{
}
......@@ -26,6 +26,11 @@ class ImportExportProgressIndicatorBase : public QObject
public:
explicit ImportExportProgressIndicatorBase(QObject *parent = 0);
~ImportExportProgressIndicatorBase();
virtual void increaseProgressDialog();
virtual void createProgressDialog();
virtual void showInfo(const QString &text);
};
#endif // IMPORTEXPORTPROGRESSINDICATORBASE_H
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program 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
*/
#include "importexportprogressindicatorgui.h"
ImportExportProgressIndicatorGui::ImportExportProgressIndicatorGui(QObject *parent)
: ImportExportProgressIndicatorBase(parent)
{
}
ImportExportProgressIndicatorGui::~ImportExportProgressIndicatorGui()
{
}
void ImportExportProgressIndicatorGui::increaseProgressDialog()
{
}
void ImportExportProgressIndicatorGui::createProgressDialog()
{
}
void ImportExportProgressIndicatorGui::showInfo(const QString &text)
{
}
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program 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
*/
#ifndef IMPORTEXPORTPROGRESSINDICATORGUI_H
#define IMPORTEXPORTPROGRESSINDICATORGUI_H
#include "importexportprogressindicatorbase.h"
class ImportExportProgressIndicatorGui : public ImportExportProgressIndicatorBase
{
Q_OBJECT
public:
explicit ImportExportProgressIndicatorGui(QObject *parent = 0);
~ImportExportProgressIndicatorGui();
void increaseProgressDialog();
void createProgressDialog();
void showInfo(const QString &text);
};
#endif // IMPORTEXPORTPROGRESSINDICATORGUI_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