QortalOS Brooklyn for Raspberry Pi 4
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
1.0 KiB

/*
SPDX-FileCopyrightText: 2002 Joseph Wenninger <[email protected]>
SPDX-FileCopyrightText: 2020 Méven Car <[email protected]>
SPDX-FileCopyrightText: 2020 Tobias Fella <[email protected]>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "componentchooserbrowser.h"
#include "browser_settings.h"
ComponentChooserBrowser::ComponentChooserBrowser(QObject *parent)
: ComponentChooser(parent,
QStringLiteral("x-scheme-handler/http"),
QStringLiteral("WebBrowser"),
QStringLiteral("org.kde.falkon.desktop"),
i18n("Select default browser"))
{
}
void ComponentChooserBrowser::save()
{
const QString storageId = m_applications[m_index].toMap()["storageId"].toString();
BrowserSettings browserSettings;
browserSettings.setBrowserApplication(storageId);
browserSettings.save();
saveMimeTypeAssociation(QStringLiteral("x-scheme-handler/http"), storageId);
saveMimeTypeAssociation(QStringLiteral("x-scheme-handler/https"), storageId);
}