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:
authorChristian Kamm <mail@ckamm.de>2017-05-17 11:55:42 +0300
committerckamm <mail@ckamm.de>2017-05-17 13:26:27 +0300
commitc8d0f788e00bdae125a26d9159ce9efdd6325cd2 (patch)
treead77cb515fe650984e6b76dfffe09838090d77bd /src/gui/sharedialog.cpp
parentae263d60bd6d1bc0eb0c3712bab11de120b8cdd3 (diff)
Apply clang-format
Diffstat (limited to 'src/gui/sharedialog.cpp')
-rw-r--r--src/gui/sharedialog.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/gui/sharedialog.cpp b/src/gui/sharedialog.cpp
index 3ad8eed32..60d6167d4 100644
--- a/src/gui/sharedialog.cpp
+++ b/src/gui/sharedialog.cpp
@@ -35,19 +35,19 @@ namespace OCC {
static const int thumbnailSize = 40;
ShareDialog::ShareDialog(QPointer<AccountState> accountState,
- const QString &sharePath,
- const QString &localPath,
- SharePermissions maxSharingPermissions,
- QWidget *parent) :
- QDialog(parent),
- _ui(new Ui::ShareDialog),
- _accountState(accountState),
- _sharePath(sharePath),
- _localPath(localPath),
- _maxSharingPermissions(maxSharingPermissions),
- _linkWidget(NULL),
- _userGroupWidget(NULL),
- _progressIndicator(NULL)
+ const QString &sharePath,
+ const QString &localPath,
+ SharePermissions maxSharingPermissions,
+ QWidget *parent)
+ : QDialog(parent)
+ , _ui(new Ui::ShareDialog)
+ , _accountState(accountState)
+ , _sharePath(sharePath)
+ , _localPath(localPath)
+ , _maxSharingPermissions(maxSharingPermissions)
+ , _linkWidget(NULL)
+ , _userGroupWidget(NULL)
+ , _progressIndicator(NULL)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setAttribute(Qt::WA_DeleteOnClose);
@@ -75,13 +75,13 @@ ShareDialog::ShareDialog(QPointer<AccountState> accountState,
QFileInfo lPath(_localPath);
QString fileName = lPath.fileName();
_ui->label_name->setText(tr("%1").arg(fileName));
- QFont f( _ui->label_name->font());
- f.setPointSize( f.pointSize() * 1.4 );
- _ui->label_name->setFont( f );
+ QFont f(_ui->label_name->font());
+ f.setPointSize(f.pointSize() * 1.4);
+ _ui->label_name->setFont(f);
_ui->label_sharePath->setWordWrap(true);
QString ocDir(_sharePath);
- ocDir.truncate(ocDir.length()-fileName.length());
+ ocDir.truncate(ocDir.length() - fileName.length());
ocDir.replace(QRegExp("^/*"), "");
ocDir.replace(QRegExp("/*$"), "");
@@ -90,7 +90,7 @@ ShareDialog::ShareDialog(QPointer<AccountState> accountState,
// may be in use or not.
_ui->gridLayout->removeWidget(_ui->label_sharePath);
_ui->gridLayout->removeWidget(_ui->label_name);
- if( ocDir.isEmpty() ) {
+ if (ocDir.isEmpty()) {
_ui->gridLayout->addWidget(_ui->label_name, 0, 1, 2, 1);
_ui->label_sharePath->setText(QString());
} else {
@@ -124,7 +124,7 @@ ShareDialog::ShareDialog(QPointer<AccountState> accountState,
job->setProperties(QList<QByteArray>() << "http://open-collaboration-services.org/ns:share-permissions");
job->setTimeout(10 * 1000);
connect(job, SIGNAL(result(QVariantMap)), SLOT(slotMaxSharingPermissionsReceived(QVariantMap)));
- connect(job, SIGNAL(finishedWithError(QNetworkReply*)), SLOT(slotMaxSharingPermissionsError()));
+ connect(job, SIGNAL(finishedWithError(QNetworkReply *)), SLOT(slotMaxSharingPermissionsError()));
job->start();
}
@@ -133,13 +133,14 @@ ShareDialog::~ShareDialog()
delete _ui;
}
-void ShareDialog::done( int r ) {
+void ShareDialog::done(int r)
+{
ConfigFile cfg;
cfg.saveGeometry(this);
QDialog::done(r);
}
-void ShareDialog::slotMaxSharingPermissionsReceived(const QVariantMap & result)
+void ShareDialog::slotMaxSharingPermissionsReceived(const QVariantMap &result)
{
const QVariant receivedPermissions = result["share-permissions"];
if (!receivedPermissions.toString().isEmpty()) {
@@ -179,8 +180,8 @@ void ShareDialog::showSharingUi()
// We only do user/group sharing from 8.2.0
bool userGroupSharing =
- theme->userGroupSharing()
- && _accountState->account()->serverVersionInt() >= Account::makeServerVersion(8, 2, 0);
+ theme->userGroupSharing()
+ && _accountState->account()->serverVersionInt() >= Account::makeServerVersion(8, 2, 0);
if (userGroupSharing) {
_userGroupWidget = new ShareUserGroupWidget(_accountState->account(), _sharePath, _localPath, _maxSharingPermissions, this);
@@ -218,7 +219,8 @@ void ShareDialog::slotThumbnailFetched(const int &statusCode, const QByteArray &
_ui->label_icon->setPixmap(p);
}
-void ShareDialog::slotAccountStateChanged(int state) {
+void ShareDialog::slotAccountStateChanged(int state)
+{
bool enabled = (state == AccountState::State::Connected);
qCDebug(lcSharing) << "Account connected?" << enabled;
@@ -230,6 +232,4 @@ void ShareDialog::slotAccountStateChanged(int state) {
_linkWidget->setEnabled(enabled);
}
}
-
}
-