[Pkg-owncloud-commits] [owncloud-client] 47/218: Remove the accountmigrator.cpp It is not used

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 17 14:30:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 0fa43538417621e02951e00ca2bdfa8ea0be10cb
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Sep 1 17:02:23 2015 +0200

    Remove the accountmigrator.cpp It is not used
    
    This was used to convert the config from the community client to
    the  branded client. But we don't need this feature anymore
    https://github.com/owncloud/client/issues/3515#issuecomment-133394443
---
 src/gui/CMakeLists.txt      |  1 -
 src/gui/accountmigrator.cpp | 89 ---------------------------------------------
 src/gui/accountmigrator.h   | 39 --------------------
 src/gui/folderman.cpp       |  1 -
 4 files changed, 130 deletions(-)

diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index e45f8e6..a892ab1 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -62,7 +62,6 @@ set(client_SRCS
     sslerrordialog.cpp
     syncrunfilelog.cpp
     systray.cpp
-    accountmigrator.cpp
     quotainfo.cpp
     accountstate.cpp
     addcertificatedialog.cpp
diff --git a/src/gui/accountmigrator.cpp b/src/gui/accountmigrator.cpp
deleted file mode 100644
index 8d9a558..0000000
--- a/src/gui/accountmigrator.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) by Klaas Freitag <freitag at owncloud.com>
- *
- * This program 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; version 2 of the License.
- *
- * 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.
- */
-
-#include "accountmigrator.h"
-#include "configfile.h"
-#include "folderman.h"
-#include "theme.h"
-
-
-#include <QSettings>
-#include <QStringList>
-#include <QDir>
-#include <QFileInfo>
-#include <QDebug>
-
-namespace OCC {
-
-// The purpose of this class is to migrate an existing account that
-// was set up with an unbranded client to an branded one.
-// The usecase is: Usually people try first with the community client,
-// later they maybe switch to a branded client. When they install the
-// branded client first, it should automatically pick the information
-// from the already configured account.
-
-AccountMigrator::AccountMigrator()
-{
-
-}
-
-// the list of folder definitions which are files in the directory "folders"
-// underneath the ownCloud configPath (with ownCloud as a last segment)
-// need to be copied to the themed path and adjusted.
-
-QStringList AccountMigrator::migrateFolderDefinitons()
-{
-    ConfigFile cfg;
-    QStringList re;
-
-    QString themePath = cfg.configPath();
-    // create the original ownCloud config path out of the theme path
-    // by removing the theme folder and append ownCloud.
-    QString oCPath = themePath;
-    if( oCPath.endsWith(QLatin1Char('/')) ) {
-        oCPath.truncate( oCPath.length()-1 );
-    }
-    oCPath = oCPath.left( oCPath.lastIndexOf('/'));
-
-    themePath += QLatin1String( "folders");
-    oCPath += QLatin1String( "/ownCloud/folders" );
-
-    qDebug() << "Migrator: theme-path: " << themePath;
-    qDebug() << "Migrator: ownCloud path: " << oCPath;
-
-    // get a dir listing of the ownCloud folder definitions and copy
-    // them over to the theme dir
-    QDir oCDir(oCPath);
-    oCDir.setFilter( QDir::Files );
-    QStringList files = oCDir.entryList();
-
-    foreach( const QString& file, files ) {
-        QString escapedAlias = FolderMan::instance()->escapeAlias(file);
-        QString themeFile = themePath + QDir::separator() + file;
-        QString oCFile = oCPath+QDir::separator()+file;
-        if( QFile::copy( oCFile, themeFile ) ) {
-            re.append(file);
-            qDebug() << "Migrator: Folder definition migrated: " << file;
-
-            // fix the connection entry of the folder definition
-            QSettings settings(themeFile, QSettings::IniFormat);
-            settings.beginGroup( escapedAlias );
-            settings.setValue(QLatin1String("connection"),  Theme::instance()->appName());
-            settings.sync();
-        }
-    }
-
-    return re;
-}
-
-}
diff --git a/src/gui/accountmigrator.h b/src/gui/accountmigrator.h
deleted file mode 100644
index 7a023c7..0000000
--- a/src/gui/accountmigrator.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) by Klaas Freitag <freitag at owncloud.com>
- *
- * This program 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; version 2 of the License.
- *
- * 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.
- */
-
-#ifndef ACCOUNTMIGRATOR_H
-#define ACCOUNTMIGRATOR_H
-
-#include <QStringList>
-
-namespace OCC {
-
-/**
- * @brief The AccountSettings class
- * @ingroup gui
- */
-class AccountMigrator {
-
-public:
-    explicit AccountMigrator();
-
-    /**
-     * @brief migrateFolderDefinitons - migrate the folder definition files
-     * @return the list of migrated folder definitions
-     */
-    QStringList migrateFolderDefinitons();
-
-};
-}
-
-#endif // ACCOUNTMIGRATOR_H
diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp
index 1d949e5..3b18a9a 100644
--- a/src/gui/folderman.cpp
+++ b/src/gui/folderman.cpp
@@ -19,7 +19,6 @@
 #include "theme.h"
 #include "socketapi.h"
 #include "account.h"
-#include "accountmigrator.h"
 #include "accountstate.h"
 #include "accountmanager.h"
 #include "filesystem.h"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list