summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-05-08 16:01:14 +0200
committerMontel Laurent <[email protected]>2015-05-08 16:01:14 +0200
commita2fa909c2385af0386b15410904efcf687e56d52 (patch)
tree4d3cc090bc70448547935f696f762358d0505a74
parent63b8e0865424ee15d8346bd5ff434182a4efc54f (diff)
Clean up code
-rw-r--r--pimsettingexporter/CMakeLists.txt2
-rw-r--r--pimsettingexporter/abstractimportexportjob.cpp7
-rw-r--r--pimsettingexporter/abstractimportexportjob.h3
-rw-r--r--pimsettingexporter/importexportprogressindicatorbase.cpp15
-rw-r--r--pimsettingexporter/importexportprogressindicatorbase.h5
-rw-r--r--pimsettingexporter/importexportprogressindicatorgui.cpp46
-rw-r--r--pimsettingexporter/importexportprogressindicatorgui.h36
7 files changed, 106 insertions, 8 deletions
diff --git a/pimsettingexporter/CMakeLists.txt b/pimsettingexporter/CMakeLists.txt
index 67bc646..d34cd75 100644
--- a/pimsettingexporter/CMakeLists.txt
+++ b/pimsettingexporter/CMakeLists.txt
@@ -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}" )
diff --git a/pimsettingexporter/abstractimportexportjob.cpp b/pimsettingexporter/abstractimportexportjob.cpp
index 1c1cd90..5929b39 100644
--- a/pimsettingexporter/abstractimportexportjob.cpp
+++ b/pimsettingexporter/abstractimportexportjob.cpp
@@ -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();
}
diff --git a/pimsettingexporter/abstractimportexportjob.h b/pimsettingexporter/abstractimportexportjob.h
index 3ec5539..f955948 100644
--- a/pimsettingexporter/abstractimportexportjob.h
+++ b/pimsettingexporter/abstractimportexportjob.h
@@ -94,9 +94,8 @@ protected:
void overwriteDirectory(const QString &path, const KArchiveEntry *entry);
- KZip *archive();
+ KZip *archive() const;
- QProgressDialog *progressDialog();
void increaseProgressDialog();
void createProgressDialog();
diff --git a/pimsettingexporter/importexportprogressindicatorbase.cpp b/pimsettingexporter/importexportprogressindicatorbase.cpp
index 6c53f36..ba9a772 100644
--- a/pimsettingexporter/importexportprogressindicatorbase.cpp
+++ b/pimsettingexporter/importexportprogressindicatorbase.cpp
@@ -28,3 +28,18 @@ ImportExportProgressIndicatorBase::~ImportExportProgressIndicatorBase()
}
+void ImportExportProgressIndicatorBase::increaseProgressDialog()
+{
+
+}
+
+void ImportExportProgressIndicatorBase::createProgressDialog()
+{
+
+}
+
+void ImportExportProgressIndicatorBase::showInfo(const QString &text)
+{
+
+}
+
diff --git a/pimsettingexporter/importexportprogressindicatorbase.h b/pimsettingexporter/importexportprogressindicatorbase.h
index 347c91b..68991e3 100644
--- a/pimsettingexporter/importexportprogressindicatorbase.h
+++ b/pimsettingexporter/importexportprogressindicatorbase.h
@@ -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
diff --git a/pimsettingexporter/importexportprogressindicatorgui.cpp b/pimsettingexporter/importexportprogressindicatorgui.cpp
new file mode 100644
index 0000000..2afba9f
--- /dev/null
+++ b/pimsettingexporter/importexportprogressindicatorgui.cpp
@@ -0,0 +1,46 @@
+/*
+ Copyright (c) 2015 Montel Laurent <[email protected]>
+
+ 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)
+{
+
+}
+
+
diff --git a/pimsettingexporter/importexportprogressindicatorgui.h b/pimsettingexporter/importexportprogressindicatorgui.h
new file mode 100644
index 0000000..bb37f21
--- /dev/null
+++ b/pimsettingexporter/importexportprogressindicatorgui.h
@@ -0,0 +1,36 @@
+/*
+ Copyright (c) 2015 Montel Laurent <[email protected]>
+
+ 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