summaryrefslogtreecommitdiffstats
path: root/src/assistant/assistant/findwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/assistant/assistant/findwidget.cpp')
-rw-r--r--src/assistant/assistant/findwidget.cpp48
1 files changed, 11 insertions, 37 deletions
diff --git a/src/assistant/assistant/findwidget.cpp b/src/assistant/assistant/findwidget.cpp
index 2bbbbf6b0..55954564a 100644
--- a/src/assistant/assistant/findwidget.cpp
+++ b/src/assistant/assistant/findwidget.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "tracer.h"
#include "findwidget.h"
@@ -39,6 +14,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
FindWidget::FindWidget(QWidget *parent)
: QWidget(parent)
, appPalette(qApp->palette())
@@ -46,18 +23,17 @@ FindWidget::FindWidget(QWidget *parent)
TRACE_OBJ
installEventFilter(this);
QHBoxLayout *hboxLayout = new QHBoxLayout(this);
- QString resourcePath = QLatin1String(":/qt-project.org/assistant/images/");
+ QString resourcePath = ":/qt-project.org/assistant/images/"_L1;
#ifndef Q_OS_MAC
- hboxLayout->setContentsMargins(QMargins());
+ hboxLayout->setContentsMargins({});
hboxLayout->setSpacing(6);
- resourcePath.append(QLatin1String("win"));
+ resourcePath.append("win"_L1);
#else
- resourcePath.append(QLatin1String("mac"));
+ resourcePath.append("mac"_L1);
#endif
- toolClose = setupToolButton(QString(),
- resourcePath + QLatin1String("/closetab.png"));
+ toolClose = setupToolButton({}, resourcePath + "/closetab.png"_L1);
hboxLayout->addWidget(toolClose);
connect(toolClose, &QAbstractButton::clicked, this, &QWidget::hide);
@@ -68,14 +44,12 @@ FindWidget::FindWidget(QWidget *parent)
connect(editFind, &QLineEdit::returnPressed, this, &FindWidget::findNext);
connect(editFind, &QLineEdit::textChanged, this, &FindWidget::updateButtons);
- toolPrevious = setupToolButton(tr("Previous"),
- resourcePath + QLatin1String("/previous.png"));
+ toolPrevious = setupToolButton(tr("Previous"), resourcePath + "/previous.png"_L1);
connect(toolPrevious, &QAbstractButton::clicked, this, &FindWidget::findPrevious);
hboxLayout->addWidget(toolPrevious);
- toolNext = setupToolButton(tr("Next"),
- resourcePath + QLatin1String("/next.png"));
+ toolNext = setupToolButton(tr("Next"), resourcePath + "/next.png"_L1);
hboxLayout->addWidget(toolNext);
connect(toolNext, &QAbstractButton::clicked, this, &FindWidget::findNext);