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

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@nextcloud.com>2020-05-18 21:54:23 +0300
committerMichael Schuster <michael@schuster.ms>2020-05-20 04:54:41 +0300
commit712869db9a68025362798a4ff9ccc9f3e424a417 (patch)
treed29fb71b6a914e49bf770c5c623ef36f9018b145 /src/3rdparty
parent3d2de4fc408320d362d05fc9258449f67faccc4c (diff)
Use auto to avoiding repeating type names
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/kmessagewidget/kmessagewidget.cpp10
-rw-r--r--src/3rdparty/qtsingleapplication/qtsingleapplication.cpp6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/3rdparty/kmessagewidget/kmessagewidget.cpp b/src/3rdparty/kmessagewidget/kmessagewidget.cpp
index c0166f622..d2d0f12b7 100644
--- a/src/3rdparty/kmessagewidget/kmessagewidget.cpp
+++ b/src/3rdparty/kmessagewidget/kmessagewidget.cpp
@@ -91,7 +91,7 @@ void KMessageWidgetPrivate::init(KMessageWidget *q_ptr)
QObject::connect(textLabel, &QLabel::linkActivated, q, &KMessageWidget::linkActivated);
QObject::connect(textLabel, &QLabel::linkHovered, q, &KMessageWidget::linkHovered);
- QAction *closeAction = new QAction(q);
+ auto *closeAction = new QAction(q);
closeAction->setText(KMessageWidget::tr("&Close"));
closeAction->setToolTip(KMessageWidget::tr("Close message"));
closeAction->setIcon(QIcon(":/client/theme/close.svg")); // ivan: NC customization
@@ -115,7 +115,7 @@ void KMessageWidgetPrivate::createLayout()
buttons.clear();
Q_FOREACH (QAction *action, q->actions()) {
- QToolButton *button = new QToolButton(content);
+ auto *button = new QToolButton(content);
button->setDefaultAction(action);
button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
buttons.append(button);
@@ -127,7 +127,7 @@ void KMessageWidgetPrivate::createLayout()
closeButton->setAutoRaise(buttons.isEmpty());
if (wordWrap) {
- QGridLayout *layout = new QGridLayout(content);
+ auto *layout = new QGridLayout(content);
// Set alignment to make sure icon does not move down if text wraps
layout->addWidget(iconLabel, 0, 0, 1, 1, Qt::AlignHCenter | Qt::AlignTop);
layout->addWidget(textLabel, 0, 1);
@@ -137,7 +137,7 @@ void KMessageWidgetPrivate::createLayout()
layout->addWidget(closeButton, 0, 2, 1, 1, Qt::AlignHCenter | Qt::AlignTop);
} else {
// Use an additional layout in row 1 for the buttons.
- QHBoxLayout *buttonLayout = new QHBoxLayout;
+ auto *buttonLayout = new QHBoxLayout;
buttonLayout->addStretch();
Q_FOREACH (QToolButton *button, buttons) {
// For some reason, calling show() is necessary if wordwrap is true,
@@ -150,7 +150,7 @@ void KMessageWidgetPrivate::createLayout()
layout->addItem(buttonLayout, 1, 0, 1, 2);
}
} else {
- QHBoxLayout *layout = new QHBoxLayout(content);
+ auto *layout = new QHBoxLayout(content);
layout->addWidget(iconLabel);
layout->addWidget(textLabel);
diff --git a/src/3rdparty/qtsingleapplication/qtsingleapplication.cpp b/src/3rdparty/qtsingleapplication/qtsingleapplication.cpp
index 5934d1cb3..b1895a5a4 100644
--- a/src/3rdparty/qtsingleapplication/qtsingleapplication.cpp
+++ b/src/3rdparty/qtsingleapplication/qtsingleapplication.cpp
@@ -81,7 +81,7 @@ QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char *
lockfile.open(QtLockedFile::ReadWrite);
lockfile.lock(QtLockedFile::WriteLock);
- qint64 *pids = static_cast<qint64 *>(instances->data());
+ auto *pids = static_cast<qint64 *>(instances->data());
if (!created) {
// Find the first instance that it still running
// The whole list needs to be iterated in order to append to it
@@ -109,7 +109,7 @@ QtSingleApplication::~QtSingleApplication()
lockfile.open(QtLockedFile::ReadWrite);
lockfile.lock(QtLockedFile::WriteLock);
// Rewrite array, removing current pid and previously crashed ones
- qint64 *pids = static_cast<qint64 *>(instances->data());
+ auto *pids = static_cast<qint64 *>(instances->data());
qint64 *newpids = pids;
for (; *pids; ++pids) {
if (*pids != appPid && isRunning(*pids))
@@ -122,7 +122,7 @@ QtSingleApplication::~QtSingleApplication()
bool QtSingleApplication::event(QEvent *event)
{
if (event->type() == QEvent::FileOpen) {
- QFileOpenEvent *foe = static_cast<QFileOpenEvent*>(event);
+ auto *foe = static_cast<QFileOpenEvent*>(event);
emit fileOpenRequest(foe->file());
return true;
}