[network/ruqola] src/widgets: const'ify variable
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit af5bd60117cca416d5c0620727647dcc72c34824 by Laurent Montel.
Committed on 29/07/2026 at 11:20.
Pushed by mlaurent into branch 'master'.
const'ify variable
M +1 -1 src/widgets/dialogs/createsoundmessagewidget.cpp
M +4 -4 src/widgets/room/messagetextedit.cpp
https://invent.kde.org/network/ruqola/-/commit/af5bd60117cca416d5c0620727647dcc72c34824
diff --git a/src/widgets/dialogs/createsoundmessagewidget.cpp b/src/widgets/dialogs/createsoundmessagewidget.cpp
index c40c3300e4..65b5f99188 100644
--- a/src/widgets/dialogs/createsoundmessagewidget.cpp
+++ b/src/widgets/dialogs/createsoundmessagewidget.cpp
@@ -103,7 +103,7 @@ void CreateSoundMessageWidget::updateAudioInputs()
void CreateSoundMessageWidget::loadSettings()
{
- KConfigGroup group(KSharedConfig::openConfig(), QLatin1StringView(mySoundGroupName));
+ const KConfigGroup group(KSharedConfig::openConfig(), QLatin1StringView(mySoundGroupName));
const QByteArray deviceIdentifier = group.readEntry("SoundDevice", QByteArray());
if (!deviceIdentifier.isEmpty()) {
for (int i = 0; i < mDeviceComboBox->count(); ++i) {
diff --git a/src/widgets/room/messagetextedit.cpp b/src/widgets/room/messagetextedit.cpp
index fb86c7670e..96d19ca228 100644
--- a/src/widgets/room/messagetextedit.cpp
+++ b/src/widgets/room/messagetextedit.cpp
@@ -114,14 +114,14 @@ MessageTextEdit::~MessageTextEdit()
void MessageTextEdit::slotSpellCheckingEnableChanged(bool b)
{
- KSharedConfig::Ptr config = KSharedConfig::openConfig();
+ const KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group(config, u"Spelling"_s);
group.writeEntry("checkerEnabledByDefault", b);
}
void MessageTextEdit::slotLanguageChanged(const QString &lang)
{
- KSharedConfig::Ptr config = KSharedConfig::openConfig();
+ const KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group(config, u"Spelling"_s);
group.writeEntry("Language", lang);
switchAutoCorrectionLanguage(lang);
@@ -141,9 +141,9 @@ void MessageTextEdit::switchAutoCorrectionLanguage(const QString &lang)
void MessageTextEdit::loadSpellCheckingSettings()
{
- KSharedConfig::Ptr config = KSharedConfig::openConfig();
+ const KSharedConfig::Ptr config = KSharedConfig::openConfig();
if (config->hasGroup("Spelling"_L1)) {
- KConfigGroup group(config, u"Spelling"_s);
+ const KConfigGroup group(config, u"Spelling"_s);
setCheckSpellingEnabled(group.readEntry("checkerEnabledByDefault", false));
const QString language = group.readEntry("Language", QString());
setSpellCheckingLanguage(language);