[Pkg-owncloud-commits] [owncloud-client] 213/498: FolderMan: store folders in a QMap instead of a QHash so they are kept in order
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:51 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 ec3fc50e0ea3e01133b9a5685e0f45d2b231266b
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Mon Jun 29 15:49:47 2015 +0200
FolderMan: store folders in a QMap instead of a QHash so they are kept in order
Issue #1529
---
src/gui/folder.h | 4 ++--
src/gui/owncloudgui.cpp | 7 +------
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/gui/folder.h b/src/gui/folder.h
index 542c6e2..d832aef 100644
--- a/src/gui/folder.h
+++ b/src/gui/folder.h
@@ -77,8 +77,8 @@ public:
~Folder();
- typedef QHash<QString, Folder*> Map;
- typedef QHashIterator<QString, Folder*> MapIterator;
+ typedef QMap<QString, Folder*> Map;
+ typedef QMapIterator<QString, Folder*> MapIterator;
/**
* The account the folder is configured on.
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp
index 39b6af7..539f860 100644
--- a/src/gui/owncloudgui.cpp
+++ b/src/gui/owncloudgui.cpp
@@ -340,12 +340,7 @@ void ownCloudGui::setupContextMenu()
_contextMenu->addAction(tr("Managed Folders:"))->setDisabled(true);
}
- // Put everything first in a QMap to properly sort
- QMap<QString, Folder*> folders;
- for( auto i = folderMan->map().constBegin(); i != folderMan->map().constEnd(); i++) {
- folders.insert(i.key(), i.value());
- }
- foreach (auto folder, folders) {
+ foreach (auto folder, folderMan->map()) {
QAction *action = new QAction( tr("Open folder '%1'").arg(folder->alias()), this );
connect( action, SIGNAL(triggered()),_folderOpenActionMapper,SLOT(map()));
_folderOpenActionMapper->setMapping( action, folder->alias() );
--
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