Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
208 changes: 139 additions & 69 deletions src/gui/accountsettings.cpp

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion src/gui/accountsettings.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/*
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2014 ownCloud GmbH
Expand All @@ -7,7 +7,7 @@
#ifndef ACCOUNTSETTINGS_H
#define ACCOUNTSETTINGS_H

#include <QWidget>

Check failure on line 10 in src/gui/accountsettings.h

View workflow job for this annotation

GitHub Actions / build

src/gui/accountsettings.h:10:10 [clang-diagnostic-error]

'QWidget' file not found
#include <QUrl>
#include <QPointer>
#include <QHash>
Expand All @@ -27,6 +27,8 @@
class QNetworkReply;
class QListWidgetItem;
class QLabel;
class QPushButton;

Check warning on line 30 in src/gui/accountsettings.h

View workflow job for this annotation

GitHub Actions / build

src/gui/accountsettings.h:30:7 [cppcoreguidelines-avoid-non-const-global-variables]

variable 'QPushButton' is non-const and globally accessible, consider making it const
class QIcon;

Check warning on line 31 in src/gui/accountsettings.h

View workflow job for this annotation

GitHub Actions / build

src/gui/accountsettings.h:31:7 [cppcoreguidelines-avoid-non-const-global-variables]

variable 'QIcon' is non-const and globally accessible, consider making it const

namespace OCC {

Expand All @@ -52,7 +54,13 @@
public:
explicit AccountSettings(AccountState *accountState, QWidget *parent = nullptr);
~AccountSettings() override;
[[nodiscard]] QSize sizeHint() const override { return ownCloudGui::settingsDialogSize(); }
[[nodiscard]] QSize sizeHint() const override
{
return {
ownCloudGui::settingsDialogSize().width(),
QWidget::sizeHint().height()
};
}
bool canEncryptOrDecrypt(const FolderStatusModel::SubFolderInfo* folderInfo);
[[nodiscard]] OCC::AccountState *accountsState() const { return _accountState; }

Expand Down Expand Up @@ -132,6 +140,8 @@
QAction *addActionToEncryptionMessage(const QString &actionTitle, const QString &actionId);

void setupE2eEncryptionMessage();
void setEncryptionMessageIcon(const QIcon &icon);
void updateEncryptionMessageActions();

/// Returns the alias of the selected folder, empty string if none
[[nodiscard]] QString selectedFolderAlias() const;
Expand All @@ -149,6 +159,9 @@
bool _menuShown = false;

QHash<QString, QMetaObject::Connection> _folderConnections;
QHash<QAction *, QPushButton *> _encryptionMessageButtons;

QString _spaceUsageText;
};

} // namespace OCC
Expand Down
Loading
Loading