[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-baseapps/frameworks] lib/konq/src: Remove dead code
From: David Faure <faure () kde ! org>
Date: 2014-10-12 8:20:16
Message-ID: E1XdEO0-000245-Fp () scm ! kde ! org
[Download RAW message or body]
Git commit 0a110d98ff92d87dbc79ff528a44476b857685b9 by David Faure.
Committed on 12/10/2014 at 08:20.
Pushed by dfaure into branch 'frameworks'.
Remove dead code
M +0 -43 lib/konq/src/konq_operations.cpp
M +1 -1 lib/konq/src/konq_operations.h
http://commits.kde.org/kde-baseapps/0a110d98ff92d87dbc79ff528a44476b857685b9
diff --git a/lib/konq/src/konq_operations.cpp b/lib/konq/src/konq_operations.cpp
index 5d84348..4065407 100644
--- a/lib/konq/src/konq_operations.cpp
+++ b/lib/konq/src/konq_operations.cpp
@@ -536,49 +536,6 @@ void KonqOperations::_addPluginActions(QList<QAction*>& \
pluginActions,const KUrl }
}
-// these two are from /apps/konqueror/settings/konq/globalpaths.cpp
-static bool cleanHomeDirPath( QString &path, const QString &homeDir )
-{
-#ifdef Q_WS_WIN //safer
- if (!QDir::convertSeparators(path).startsWith(QDir::convertSeparators(homeDir)))
- return false;
-#else
- if (!path.startsWith(homeDir))
- return false;
-#endif
-
- int len = homeDir.length();
- // replace by "$HOME" if possible
- if (len && (path.length() == len || path[len] == '/')) {
- path.replace(0, len, QString::fromLatin1("$HOME"));
- return true;
- } else
- return false;
-}
-static QString translatePath( QString path ) // krazy:exclude=passbyvalue
-{
- // keep only one single '/' at the beginning - needed for cleanHomeDirPath()
- while (path[0] == '/' && path[1] == '/')
- path.remove(0,1);
-
- // we probably should escape any $ ` and \ characters that may occur in the \
path, but the Qt code that reads back
- // the file doesn't unescape them so not much point in doing so
-
- // All of the 3 following functions to return the user's home directory
- // can return different paths. We have to test all them.
- const QString homeDir0 = QFile::decodeName(qgetenv("HOME"));
- const QString homeDir1 = QDir::homePath();
- const QString homeDir2 = QDir(homeDir1).canonicalPath();
- if (cleanHomeDirPath(path, homeDir0) ||
- cleanHomeDirPath(path, homeDir1) ||
- cleanHomeDirPath(path, homeDir2) ) {
- // kDebug() << "Path was replaced\n";
- }
-
- return path;
-}
-
-
void KonqOperations::setOperation( KIO::Job * job, Operation method, const KUrl & \
dest ) {
m_method = method;
diff --git a/lib/konq/src/konq_operations.h b/lib/konq/src/konq_operations.h
index db7cbed..3c1c3ce 100644
--- a/lib/konq/src/konq_operations.h
+++ b/lib/konq/src/konq_operations.h
@@ -53,7 +53,7 @@ public:
*/
static void editMimeType( const QString & mimeType, QWidget* parent );
- enum Operation { TRASH, DEL, COPY, MOVE, LINK, EMPTYTRASH, STAT, MKDIR, RESTORE, \
UNKNOWN, PUT }; + enum Operation { TRASH, COPY, MOVE, LINK, UNKNOWN, PUT };
/**
* Drop
* @param destItem destination KFileItem for the drop (background or item)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic