Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2022-04-13 16:47:44 +0300
committerGitHub <noreply@github.com>2022-04-13 16:47:44 +0300
commit4033411ffadb7d9491fafe89a2dc72f47173897e (patch)
tree4583f645f7a13f45ace8af34f9543b545f427cbd /src/gui/folderman.h
parent5205defcd23a65d4e7ed889e005d082745bf340b (diff)
Use the folder object directly instead of looking it up by its name (#9583)
Diffstat (limited to 'src/gui/folderman.h')
-rw-r--r--src/gui/folderman.h27
1 files changed, 8 insertions, 19 deletions
diff --git a/src/gui/folderman.h b/src/gui/folderman.h
index eabd02bbe..a23f23403 100644
--- a/src/gui/folderman.h
+++ b/src/gui/folderman.h
@@ -109,7 +109,7 @@ public:
*/
static void backwardMigrationSettingsKeys(QStringList *deleteKeys, QStringList *ignoreKeys);
- const QMap<QString, Folder *> &map() const;
+ const QVector<Folder *> &folders() const;
/** Adds a folder for an account, ensures the journal is gone and saves it in the settings.
*/
@@ -138,14 +138,8 @@ public:
*/
QStringList findFileInLocalFolders(const QString &relPath, const AccountPtr acc);
- /** Returns the folder by alias or NULL if no folder with the alias exists. */
- Folder *folder(const QString &);
-
- /**
- * Migrate accounts from owncloud < 2.0
- * Creates a folder for a specific configuration, identified by alias.
- */
- Folder *setupFolderFromOldConfigFile(const QString &, AccountStatePtr account);
+ /** Returns the folder by id or NULL if no folder with the id exists. */
+ [[deprecated("directly reference the folder")]] Folder *folder(const QByteArray &id);
/**
* Ensures that a given directory does not contain a sync journal file.
@@ -164,12 +158,7 @@ public:
* Compute status summarizing multiple folders
* @return tuple containing folders, status, unresolvedConflicts and lastSyncDone
*/
- static TrayOverallStatusResult trayOverallStatus(const QList<Folder *> &folders);
-
- // Escaping of the alias which is used in QSettings AND the file
- // system, thus need to be escaped.
- static QString escapeAlias(const QString &);
- static QString unescapeAlias(const QString &);
+ static TrayOverallStatusResult trayOverallStatus(const QVector<Folder *> &folders);
SocketApi *socketApi();
#ifdef Q_OS_WIN
@@ -269,7 +258,7 @@ signals:
/**
* Emitted whenever the list of configured folders changes.
*/
- void folderListChanged(const QMap<QString, Folder *> &);
+ void folderListChanged();
void folderRemoved(Folder *folder);
public slots:
@@ -293,8 +282,8 @@ public slots:
*/
void slotSyncOnceFileUnlocks(const QString &path, FileSystem::LockMode mode);
- // slot to schedule an ETag job (from Folder only)
- void slotScheduleETagJob(const QString &alias, RequestEtagJob *job);
+ // slot to schedule an ETag job
+ void slotScheduleETagJob(RequestEtagJob *job);
private slots:
void slotFolderSyncPaused(Folder *, bool paused);
@@ -359,7 +348,7 @@ private:
void setupFoldersHelper(QSettings &settings, AccountStatePtr account, const QStringList &ignoreKeys, bool backwardsCompatible, bool foldersWithPlaceholders);
QSet<Folder *> _disabledFolders;
- QMap<QString, Folder *> _folderMap;
+ QVector<Folder *> _folders;
QString _folderConfigPath;
Folder *_currentSyncFolder;
QPointer<Folder> _lastSyncFolder;