X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/48b58f830a585b773435c9af5ee2fe8f0c7c641d..9e8e58147:/src/settings/viewmodes/dolphinfontrequester.cpp diff --git a/src/settings/viewmodes/dolphinfontrequester.cpp b/src/settings/viewmodes/dolphinfontrequester.cpp index 0a9eb166c..cb66870af 100644 --- a/src/settings/viewmodes/dolphinfontrequester.cpp +++ b/src/settings/viewmodes/dolphinfontrequester.cpp @@ -1,27 +1,14 @@ -/*************************************************************************** - * Copyright (C) 2008 by Peter Penz * - * * - * 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. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ +/* + * SPDX-FileCopyrightText: 2008 Peter Penz + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinfontrequester.h" -#include #include +#include #include #include #include @@ -35,12 +22,12 @@ DolphinFontRequester::DolphinFontRequester(QWidget* parent) : m_customFont() { QHBoxLayout* topLayout = new QHBoxLayout(this); - topLayout->setMargin(0); + topLayout->setContentsMargins(0, 0, 0, 0); - m_modeCombo = new KComboBox(this); + m_modeCombo = new QComboBox(this); m_modeCombo->addItem(i18nc("@item:inlistbox Font", "System Font")); m_modeCombo->addItem(i18nc("@item:inlistbox Font", "Custom Font")); - connect(m_modeCombo, static_cast(&KComboBox::activated), + connect(m_modeCombo, QOverload::of(&QComboBox::activated), this, &DolphinFontRequester::changeMode); m_chooseFontButton = new QPushButton(i18nc("@action:button Choose font", "Choose..."), this); @@ -91,13 +78,13 @@ void DolphinFontRequester::openFontDialog() if (ok) { m_customFont = font; m_modeCombo->setFont(m_customFont); - emit changed(); + Q_EMIT changed(); } } void DolphinFontRequester::changeMode(int index) { setMode((index == CustomFont) ? CustomFont : SystemFont); - emit changed(); + Q_EMIT changed(); }