mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-20 21:02:02 +03:00
ff4213b59f
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35% CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized signature in the connection statement, but i tought it was a good oportunity to modernize the code. This commit only contains calls that were automatically converted with clazy.
57 lines
1.9 KiB
C++
57 lines
1.9 KiB
C++
/*
|
|
* Copyright (C) 2015 by Jeroen Hoek
|
|
* Copyright (C) 2015 by Olivier Goffart <ogoffart@owncloud.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
* for more details.
|
|
*/
|
|
|
|
#include "wizard/owncloudconnectionmethoddialog.h"
|
|
#include <QUrl>
|
|
|
|
namespace OCC {
|
|
|
|
OwncloudConnectionMethodDialog::OwncloudConnectionMethodDialog(QWidget *parent)
|
|
: QDialog(parent, Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::MSWindowsFixedSizeDialogHint)
|
|
, ui(new Ui::OwncloudConnectionMethodDialog)
|
|
{
|
|
ui->setupUi(this);
|
|
|
|
connect(ui->btnNoTLS, &QAbstractButton::clicked, this, &OwncloudConnectionMethodDialog::returnNoTLS);
|
|
connect(ui->btnClientSideTLS, &QAbstractButton::clicked, this, &OwncloudConnectionMethodDialog::returnClientSideTLS);
|
|
connect(ui->btnBack, &QAbstractButton::clicked, this, &OwncloudConnectionMethodDialog::returnBack);
|
|
}
|
|
|
|
void OwncloudConnectionMethodDialog::setUrl(const QUrl &url)
|
|
{
|
|
ui->label->setText(tr("<html><head/><body><p>Failed to connect to the secure server address <em>%1</em>. How do you wish to proceed?</p></body></html>").arg(url.toDisplayString().toHtmlEscaped()));
|
|
}
|
|
|
|
|
|
void OwncloudConnectionMethodDialog::returnNoTLS()
|
|
{
|
|
done(No_TLS);
|
|
}
|
|
|
|
void OwncloudConnectionMethodDialog::returnClientSideTLS()
|
|
{
|
|
done(Client_Side_TLS);
|
|
}
|
|
|
|
void OwncloudConnectionMethodDialog::returnBack()
|
|
{
|
|
done(Back);
|
|
}
|
|
|
|
OwncloudConnectionMethodDialog::~OwncloudConnectionMethodDialog()
|
|
{
|
|
delete ui;
|
|
}
|
|
}
|