Commit 818eb665 authored by Jonathan Marten's avatar Jonathan Marten Committed by Stefano Crocco
Browse files

Port and update the Konqueror settings

kDebug(), qDebug() -> qCDebug() with logging category
No need to link with KDELibs4Support
Use Qt5 signal connection syntax
Remove konq/kcustommenueditor.*, no longer used and needs Qt3Support
Convert deprecated What's This -> tool tips
Remove konqhtml/pluginopts.* and associated, Netscape plugins not supported since KDE3
Remove konqhtml/khttpoptdlg.*, no longer supported or accessible from GUI
KDialog -> QDialog
QObject::blockSignals() -> QSignalBlocker
KCModule::changed() -> markAsChanged()
Make the adblock import/export help appear again
KFileDialog -> QFileDialog
KIntSpinBox -> QSpinBox
parent 42a4e4db
...@@ -60,14 +60,14 @@ void BookmarksConfigModule::load() ...@@ -60,14 +60,14 @@ void BookmarksConfigModule::load()
ui.sbCacheSize->setValue(group.readEntry("CacheSize", 5 * 1024)); ui.sbCacheSize->setValue(group.readEntry("CacheSize", 5 * 1024));
// Config changed notifications... // Config changed notifications...
connect(ui.sbColumns, SIGNAL(valueChanged(int)), SLOT(configChanged())); connect(ui.sbColumns, QOverload<int>::of(&QSpinBox::valueChanged), this, &BookmarksConfigModule::configChanged);
connect(ui.cbShowBackgrounds, SIGNAL(toggled(bool)), SLOT(configChanged())); connect(ui.cbShowBackgrounds, &QAbstractButton::toggled, this, &BookmarksConfigModule::configChanged);
connect(ui.cbShowRoot, SIGNAL(toggled(bool)), SLOT(configChanged())); connect(ui.cbShowRoot, &QAbstractButton::toggled, this, &BookmarksConfigModule::configChanged);
connect(ui.cbFlattenTree, SIGNAL(toggled(bool)), SLOT(configChanged())); connect(ui.cbFlattenTree, &QAbstractButton::toggled, this, &BookmarksConfigModule::configChanged);
connect(ui.cbShowPlaces, SIGNAL(toggled(bool)), SLOT(configChanged())); connect(ui.cbShowPlaces, &QAbstractButton::toggled, this, &BookmarksConfigModule::configChanged);
connect(ui.sbCacheSize, SIGNAL(valueChanged(int)), SLOT(configChanged())); connect(ui.sbCacheSize, QOverload<int>::of(&QSpinBox::valueChanged), this, &BookmarksConfigModule::configChanged);
connect(ui.clearCacheButton, SIGNAL(clicked(bool)), SLOT(clearCache())); connect(ui.clearCacheButton, &QAbstractButton::clicked, this, &BookmarksConfigModule::clearCache);
delete c; delete c;
emit changed(false); emit changed(false);
......
...@@ -2,7 +2,6 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kcmkonq\") ...@@ -2,7 +2,6 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kcmkonq\")
set(kcm_konq_PART_SRCS set(kcm_konq_PART_SRCS
behaviour.cpp behaviour.cpp
konqkcmfactory.cpp konqkcmfactory.cpp
# kcustommenueditor.cpp
) )
add_library(kcm_konq MODULE ${kcm_konq_PART_SRCS}) add_library(kcm_konq MODULE ${kcm_konq_PART_SRCS})
......
...@@ -59,9 +59,9 @@ KBehaviourOptions::KBehaviourOptions(QWidget *parent, const QVariantList &) ...@@ -59,9 +59,9 @@ KBehaviourOptions::KBehaviourOptions(QWidget *parent, const QVariantList &)
winPixmap->setFixedSize(winPixmap->sizeHint()); winPixmap->setFixedSize(winPixmap->sizeHint());
cbNewWin = new QCheckBox(i18n("Open folders in separate &windows"), this); cbNewWin = new QCheckBox(i18n("Open folders in separate &windows"), this);
cbNewWin->setWhatsThis(i18n("If this option is checked, Konqueror will open a new window when " cbNewWin->setToolTip(i18n("If this option is checked, Konqueror will open a new window when "
"you open a folder, rather than showing that folder's contents in the current window.")); "you open a folder, rather than showing that folder's contents in the current window."));
connect(cbNewWin, SIGNAL(toggled(bool)), this, SLOT(changed())); connect(cbNewWin, &QAbstractButton::toggled, this, &KBehaviourOptions::markAsChanged);
connect(cbNewWin, &QAbstractButton::toggled, this, &KBehaviourOptions::updateWinPixmap); connect(cbNewWin, &QAbstractButton::toggled, this, &KBehaviourOptions::updateWinPixmap);
miscLayout->addWidget(cbNewWin); miscLayout->addWidget(cbNewWin);
...@@ -84,9 +84,9 @@ KBehaviourOptions::KBehaviourOptions(QWidget *parent, const QVariantList &) ...@@ -84,9 +84,9 @@ KBehaviourOptions::KBehaviourOptions(QWidget *parent, const QVariantList &)
cbShowDeleteCommand = new QCheckBox(i18n("Show 'Delete' me&nu entries which bypass the trashcan"), this); cbShowDeleteCommand = new QCheckBox(i18n("Show 'Delete' me&nu entries which bypass the trashcan"), this);
mainLayout->addWidget(cbShowDeleteCommand); mainLayout->addWidget(cbShowDeleteCommand);
connect(cbShowDeleteCommand, SIGNAL(toggled(bool)), this, SLOT(changed())); connect(cbShowDeleteCommand, &QAbstractButton::toggled, this, &KBehaviourOptions::markAsChanged);
cbShowDeleteCommand->setWhatsThis(i18n("Check this if you want 'Delete' menu commands to be displayed " cbShowDeleteCommand->setToolTip(i18n("Check this if you want 'Delete' menu commands to be displayed "
"on the desktop and in the file manager's menus and context menus. " "on the desktop and in the file manager's menus and context menus. "
"You can always delete files by holding the Shift key " "You can always delete files by holding the Shift key "
"while calling 'Move to Trash'.")); "while calling 'Move to Trash'."));
......
/* This file is part of the KDE libraries
Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; version 2
of the License.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
// Own
#include "kcustommenueditor.h"
// Qt
#include <QDir>
#include <QRegExp>
#include <QImage>
#include <QPushButton>
// KDE
#include <k3listview.h>
#include <kconfigbase.h>
#include <kconfiggroup.h>
#include <kdialogbuttonbox.h>
#include <kglobal.h>
#include <QHBoxLayout>
#include <kiconloader.h>
#include <KLocalizedString>
#include <kopenwithdialog.h>
#include <kservice.h>
#include <kstandarddirs.h>
class KCustomMenuEditor::Item : public Q3ListViewItem
{
public:
Item(Q3ListView *parent, KService::Ptr service)
: Q3ListViewItem(parent),
s(service)
{
init();
}
Item(Q3ListViewItem *parent, KService::Ptr service)
: Q3ListViewItem(parent),
s(service)
{
init();
}
void init()
{
QString serviceName = s->name();
// item names may contain ampersands. To avoid them being converted
// to accelerators, replace them with two ampersands.
serviceName.replace('&', "&&");
QPixmap normal = KIconLoader::global()->loadIcon(s->icon(), KIconLoader::Small,
0, KIconLoader::DefaultState, QStringList(), 0L, true);
// make sure they are not larger than 16x16
if (normal.width() > 16 || normal.height() > 16) {
QImage tmp = normal.toImage();
tmp = tmp.scaled(16, 16, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
normal = QPixmap::fromImage(tmp);
}
setText(0, serviceName);
setPixmap(0, normal);
}
KService::Ptr s;
};
class KCustomMenuEditor::KCustomMenuEditorPrivate
{
public:
QPushButton *pbRemove;
QPushButton *pbMoveUp;
QPushButton *pbMoveDown;
};
KCustomMenuEditor::KCustomMenuEditor(QWidget *parent)
: KDialog(parent),
m_listView(0), d(new KCustomMenuEditorPrivate)
{
setCaption(i18nc("@title:window", "Menu Editor"));
setButtons(Ok | Cancel);
setDefaultButton(Ok);
QWidget *page = new QWidget(this);
QHBoxLayout *pageHBoxLayout = new QHBoxLayout(page);
pageHBoxLayout->setContentsMargins(0, 0, 0, 0);
setMainWidget(page);
m_listView = new K3ListView(page);
pageHBoxLayout->addWidget(m_listView);
m_listView->addColumn(i18n("Menu"));
m_listView->setFullWidth(true);
m_listView->setSorting(-1);
KDialogButtonBox *buttonBox = new KDialogButtonBox(page, Qt::Vertical);
buttonBox->addButton(i18n("New..."), QDialogButtonBox::ActionRole, this, SLOT(slotNewItem()));
d->pbRemove = buttonBox->addButton(i18n("Remove"), QDialogButtonBox::DestructiveRole, this, SLOT(slotRemoveItem()));
d->pbMoveUp = buttonBox->addButton(i18n("Move Up"), QDialogButtonBox::ActionRole, this, SLOT(slotMoveUp()));
d->pbMoveDown = buttonBox->addButton(i18n("Move Down"), QDialogButtonBox::ActionRole, this, SLOT(slotMoveDown()));
buttonBox->layout();
connect(m_listView, SIGNAL(selectionChanged()), this, SLOT(refreshButton()));
refreshButton();
}
KCustomMenuEditor::~KCustomMenuEditor()
{
delete d;
}
void KCustomMenuEditor::refreshButton()
{
Q3ListViewItem *item = m_listView->currentItem();
d->pbRemove->setEnabled(item);
d->pbMoveUp->setEnabled(item && item->itemAbove());
d->pbMoveDown->setEnabled(item && item->itemBelow());
}
void
KCustomMenuEditor::load(KConfig *cfg)
{
KConfigGroup cg(cfg, QString());
int count = cg.readEntry("NrOfItems", 0);
Q3ListViewItem *last = 0;
for (int i = 0; i < count; i++) {
QString entry = cg.readPathEntry(QString("Item%1").arg(i + 1), QString());
if (entry.isEmpty()) {
continue;
}
// Try KSycoca first.
KService::Ptr menuItem = KService::serviceByDesktopPath(entry);
if (!menuItem) {
menuItem = KService::serviceByDesktopName(entry);
}
if (!menuItem) {
menuItem = new KService(entry);
}
if (!menuItem->isValid()) {
continue;
}
Q3ListViewItem *item = new Item(m_listView, menuItem);
item->moveItem(last);
last = item;
}
}
void
KCustomMenuEditor::save(KConfig *cfg)
{
// First clear the whole config file.
const QStringList groups = cfg->groupList();
for (QStringList::ConstIterator it = groups.begin();
it != groups.end(); ++it) {
cfg->deleteGroup(*it);
}
KConfigGroup cg(cfg, QString());
Item *item = (Item *) m_listView->firstChild();
int i = 0;
while (item) {
i++;
QString path = item->s->entryPath();
if (QDir::isRelativePath(path) || QDir::isRelativePath(KGlobal::dirs()->relativeLocation("xdgdata-apps", path))) {
path = item->s->desktopEntryName();
}
cg.writePathEntry(QString("Item%1").arg(i), path);
item = (Item *) item->nextSibling();
}
cg.writeEntry("NrOfItems", i);
}
void
KCustomMenuEditor::slotNewItem()
{
Q3ListViewItem *item = m_listView->currentItem();
KOpenWithDialog dlg(this);
dlg.setSaveNewApplications(true);
if (dlg.exec()) {
KService::Ptr s = dlg.service();
if (s && s->isValid()) {
Item *newItem = new Item(m_listView, s);
newItem->moveItem(item);
}
refreshButton();
}
}
void
KCustomMenuEditor::slotRemoveItem()
{
Q3ListViewItem *item = m_listView->currentItem();
if (!item) {
return;
}
delete item;
refreshButton();
}
void
KCustomMenuEditor::slotMoveUp()
{
Q3ListViewItem *item = m_listView->currentItem();
if (!item) {
return;
}
Q3ListViewItem *searchItem = m_listView->firstChild();
while (searchItem) {
Q3ListViewItem *next = searchItem->nextSibling();
if (next == item) {
searchItem->moveItem(item);
break;
}
searchItem = next;
}
refreshButton();
}
void
KCustomMenuEditor::slotMoveDown()
{
Q3ListViewItem *item = m_listView->currentItem();
if (!item) {
return;
}
Q3ListViewItem *after = item->nextSibling();
if (!after) {
return;
}
item->moveItem(after);
refreshButton();
}
/* This file is part of the KDE libraries
Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; version 2
of the License.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _KCUSTOMMENUEDITOR_H_
#define _KCUSTOMMENUEDITOR_H_
#include <kdialog.h>
class K3ListView;
/*
* Dialog for editing custom menus.
*
* @author Waldo Bastian (bastian@kde.org)
*/
class KCustomMenuEditor : public KDialog
{
Q_OBJECT
public:
/**
* Create a dialog for editing a custom menu
*/
KCustomMenuEditor(QWidget *parent);
~KCustomMenuEditor();
/**
* load the custom menu
*/
void load(KConfig *);
/**
* save the custom menu
*/
void save(KConfig *);
public Q_SLOTS:
void slotNewItem();
void slotRemoveItem();
void slotMoveUp();
void slotMoveDown();
void refreshButton();
protected:
class Item;
K3ListView *m_listView;
class KCustomMenuEditorPrivate;
KCustomMenuEditorPrivate *const d;
};
#endif
...@@ -10,9 +10,7 @@ set(kcm_konqhtml_PART_SRCS ...@@ -10,9 +10,7 @@ set(kcm_konqhtml_PART_SRCS
htmlopts.cpp htmlopts.cpp
jsopts.cpp jsopts.cpp
javaopts.cpp javaopts.cpp
pluginopts.cpp
appearance.cpp appearance.cpp
khttpoptdlg.cpp
policydlg.cpp policydlg.cpp
main.cpp main.cpp
jspolicies.cpp jspolicies.cpp
...@@ -24,7 +22,6 @@ set(kcm_konqhtml_PART_SRCS ...@@ -24,7 +22,6 @@ set(kcm_konqhtml_PART_SRCS
) )
ki18n_wrap_ui(kcm_konqhtml_PART_SRCS ki18n_wrap_ui(kcm_konqhtml_PART_SRCS
nsconfigwidget.ui
advancedTabOptions.ui advancedTabOptions.ui
css/csscustom.ui css/csscustom.ui
css/cssconfig.ui css/cssconfig.ui
...@@ -32,10 +29,7 @@ ki18n_wrap_ui(kcm_konqhtml_PART_SRCS ...@@ -32,10 +29,7 @@ ki18n_wrap_ui(kcm_konqhtml_PART_SRCS
add_library(kcm_konqhtml MODULE ${kcm_konqhtml_PART_SRCS}) add_library(kcm_konqhtml MODULE ${kcm_konqhtml_PART_SRCS})
target_link_libraries(kcm_konqhtml target_link_libraries(kcm_konqhtml KF5::Parts KF5::ItemViews)
KF5::Parts
KF5::KDELibs4Support
)
install(TARGETS kcm_konqhtml DESTINATION ${KDE_INSTALL_PLUGINDIR}) install(TARGETS kcm_konqhtml DESTINATION ${KDE_INSTALL_PLUGINDIR})
......
...@@ -7,21 +7,16 @@ ...@@ -7,21 +7,16 @@
#include <QDBusMessage> #include <QDBusMessage>
#include <QDBusConnection> #include <QDBusConnection>
#include <QGroupBox> #include <QGroupBox>
#include <kcharsets.h>
#include <ksharedconfig.h>
#include <kdebug.h>
#include <kdialog.h>
#include <kglobal.h>
#include <KLocalizedString>
#include <knuminput.h>
#include <KPluginFactory>
#include <KPluginLoader>
#include <QFontComboBox> #include <QFontComboBox>
#include <QFontDatabase> #include <QFontDatabase>
#include <QSpinBox> #include <QSpinBox>
#include <QTabWidget> #include <QTabWidget>
#include <kcharsets.h>
#include <ksharedconfig.h>
#include <KLocalizedString>
#include <KConfigGroup>
static const char *const animationValues[] = {"Enabled", "Disabled", "LoopOnce"}; static const char *const animationValues[] = {"Enabled", "Disabled", "LoopOnce"};
enum AnimationsType { AnimationsAlways = 0, AnimationsNever = 1, AnimationsLoopOnce = 2 }; enum AnimationsType { AnimationsAlways = 0, AnimationsNever = 1, AnimationsLoopOnce = 2 };
...@@ -45,8 +40,7 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList &) ...@@ -45,8 +40,7 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList &)
tabWidget->addTab(fontsTab, i18nc("@title:tab", "Fonts")); tabWidget->addTab(fontsTab, i18nc("@title:tab", "Fonts"));
tabWidget->addTab(cssConfig, i18nc("@title:tab", "Stylesheets")); tabWidget->addTab(cssConfig, i18nc("@title:tab", "Stylesheets"));
connect(cssConfig, SIGNAL(changed()), this, SLOT(changed())); connect(cssConfig, &CSSConfig::changed, this, &KAppearanceOptions::markAsChanged);
connect(cssConfig, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)));
l = new QVBoxLayout(mainTab); l = new QVBoxLayout(mainTab);
...@@ -56,23 +50,23 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList &) ...@@ -56,23 +50,23 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList &)
QFormLayout *fl = new QFormLayout(box); QFormLayout *fl = new QFormLayout(box);
m_pAutoLoadImagesCheckBox = new QCheckBox(i18n("A&utomatically load images"), this); m_pAutoLoadImagesCheckBox = new QCheckBox(i18n("A&utomatically load images"), this);
m_pAutoLoadImagesCheckBox->setWhatsThis(i18n("<html>If this box is checked, Konqueror will" m_pAutoLoadImagesCheckBox->setToolTip(i18n("<html>If this box is checked, Konqueror will"
" automatically load any images that are embedded in a web page." " automatically load any images that are embedded in a web page."
" Otherwise, it will display placeholders for the images, and" " Otherwise, it will display placeholders for the images, and"
" you can then manually load the images by clicking on the image" " you can then manually load the images by clicking on the image"
" button.<br />Unless you have a very slow network connection, you" " button.<br />Unless you have a very slow network connection, you"
" will probably want to check this box to enhance your browsing" " will probably want to check this box to enhance your browsing"
" experience.</html>")); " experience.</html>"));
connect(m_pAutoLoadImagesCheckBox, SIGNAL(toggled(bool)), SLOT(changed())); connect(m_pAutoLoadImagesCheckBox, &QAbstractButton::toggled, this, &KAppearanceOptions::markAsChanged);
fl->addRow(m_pAutoLoadImagesCheckBox); fl->addRow(m_pAutoLoadImagesCheckBox);
m_pUnfinishedImageFrameCheckBox = new QCheckBox(i18n("Dra&w frame around not completely loaded images"), this); m_pUnfinishedImageFrameCheckBox = new QCheckBox(i18n("Dra&w frame around not completely loaded images"), this);
m_pUnfinishedImageFrameCheckBox->setWhatsThis(i18n("<html>If this box is checked, Konqueror will draw" m_pUnfinishedImageFrameCheckBox->setToolTip(i18n("<html>If this box is checked, Konqueror will draw"
" a frame as a placeholder around images embedded in a web page that are" " a frame as a placeholder around images embedded in a web page that are"
" not yet fully loaded.<br />You will probably want to check this box to" " not yet fully loaded.<br />You will probably want to check this box to"
" enhance your browsing experience, especially if have a slow network" " enhance your browsing experience, especially if have a slow network"
" connection.</html>")); " connection.</html>"));
connect(m_pUnfinishedImageFrameCheckBox, SIGNAL(toggled(bool)), SLOT(changed())); connect(m_pUnfinishedImageFrameCheckBox, &QAbstractButton::toggled, this, &KAppearanceOptions::markAsChanged);
fl->addRow(m_pUnfinishedImageFrameCheckBox); fl->addRow(m_pUnfinishedImageFrameCheckBox);
m_pAnimationsCombo = new QComboBox(this); m_pAnimationsCombo = new QComboBox(this);
...@@ -80,11 +74,11 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList &) ...@@ -80,11 +74,11 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList &)
m_pAnimationsCombo->insertItem(AnimationsAlways, i18nc("animations", "Enabled")); m_pAnimationsCombo->insertItem(AnimationsAlways, i18nc("animations", "Enabled"));
m_pAnimationsCombo->insertItem(AnimationsNever, i18nc("animations", "Disabled")); m_pAnimationsCombo->insertItem(AnimationsNever, i18nc("animations", "Disabled"));
m_pAnimationsCombo->insertItem(AnimationsLoopOnce, i18n("Show Only Once")); m_pAnimationsCombo->insertItem(AnimationsLoopOnce, i18n("Show Only Once"));
m_pAnimationsCombo->setWhatsThis(i18n("<html>Controls how Konqueror shows animated images:<br />" m_pAnimationsCombo->setToolTip(i18n("<html>Controls how Konqueror shows animated images:<br />"
"<ul><li><b>Enabled</b>: Show all animations completely.</li>" "<ul><li><b>Enabled</b>: Show all animations completely.</li>"
"<li><b>Disabled</b>: Never show animations, show the starting image only.</li>" "<li><b>Disabled</b>: Never show animations, show the starting image only.</li>"
"<li><b>Show only once</b>: Show all animations completely but do not repeat them.</li></ul></html>")); "<li><b>Show only once</b>: Show all animations completely but do not repeat them.</li></ul></html>"));
connect(m_pAnimationsCombo, SIGNAL(currentIndexChanged(int)), SLOT(changed())); connect(m_pAnimationsCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &KAppearanceOptions::markAsChanged);
fl->addRow(i18n("A&nimations:"), m_pAnimationsCombo); fl->addRow(i18n("A&nimations:"), m_pAnimationsCombo);
//Other //Other
...@@ -98,13 +92,13 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList &) ...@@ -98,13 +92,13 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList &)
m_pUnderlineCombo->insertItem(UnderlineHover, i18n("Only on Hover")); m_pUnderlineCombo->insertItem(UnderlineHover, i18n("Only on Hover"));
fl->addRow(i18n("Und&erline links:"), m_pUnderlineCombo); fl->addRow(i18n("Und&erline links:"), m_pUnderlineCombo);
m_pUnderlineCombo->setWhatsThis(i18n( m_pUnderlineCombo->setToolTip(i18n(
"<html>Controls how Konqueror handles underlining hyperlinks:<br />" "<html>Controls how Konqueror handles underlining hyperlinks:<br />"
"<ul><li><b>Enabled</b>: Always underline links</li>" "<ul><li><b>Enabled</b>: Always underline links</li>"
"<li><b>Disabled</b>: Never underline links</li>" "<li><b>Disabled</b>: Never underline links</li>"
"<li><b>Only on Hover</b>: Underline when the mouse is moved over the link</li>" "<li><b>Only on Hover</b>: Underline when the mouse is moved over the link</li>"
"</ul><br /><i>Note: The site's CSS definitions can override this value.</i></html>")); "</ul><br /><i>Note: The site's CSS definitions can override this value.</i></html>"));
connect(m_pUnderlineCombo, SIGNAL(currentIndexChanged(int)), SLOT(changed())); connect(m_pUnderlineCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &KAppearanceOptions::markAsChanged);
m_pSmoothScrollingCombo = new QComboBox(this); m_pSmoothScrollingCombo = new QComboBox(this);
m_pSmoothScrollingCombo->setEditable(false); m_pSmoothScrollingCombo->setEditable(false);
...@@ -112,12 +106,12 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList &) ...@@ -112,12 +106,12 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList &)
m_pSmoothScrollingCombo->insertItem(SmoothScrollingAlways, i18nc("smooth scrolling", "Always")); m_pSmoothScrollingCombo->insertItem(SmoothScrollingAlways, i18nc("smooth scrolling", "Always"));
m_pSmoothScrollingCombo->insertItem(SmoothScrollingNever, i18nc("soft scrolling", "Never")); m_pSmoothScrollingCombo->insertItem(SmoothScrollingNever, i18nc("soft scrolling", "Never"));
fl->addRow(i18n("S&mooth scrolling:"), m_pSmoothScrollingCombo); fl->addRow(i18n("S&mooth scrolling:"), m_pSmoothScrollingCombo);
m_pSmoothScrollingCombo->setWhatsThis(i18n( m_pSmoothScrollingCombo->setToolTip(i18n(
"<html>Determines whether Konqueror should use smooth steps to scroll HTML pages, or whole steps:<br />" "<html>Determines whether Konqueror should use smooth steps to scroll HTML pages, or whole steps:<br />"
"<ul><li><b>Always</b>: Always use smooth steps when scrolling.</li>" "<ul><li><b>Always</b>: Always use smooth steps when scrolling.</li>"
"<li><b>Never</b>: Never use smooth scrolling, scroll with whole steps instead.</li>" "<li><b>Never</b>: Never use smooth scrolling, scroll with whole steps instead.</li>"
"<li><b>When Efficient</b>: Only use smooth scrolling on pages where it can be achieved with moderate usage of system resources.</li></ul></html>")); "<li><b>When Efficient</b>: Only use smooth scrolling on pages where it can be achieved with moderate usage of system resources.</li></ul></html>"));
connect(m_pSmoothScrollingCombo, SIGNAL(currentIndexChanged(int)), SLOT(changed())); connect(m_pSmoothScrollingCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &KAppearanceOptions<