Skip to content

Commit

Permalink
dev-libs/ktextaddons: Make 1.5.2_p20240107 build at all
Browse files Browse the repository at this point in the history
  • Loading branch information
a17r committed Jan 8, 2024
1 parent a00442a commit dd08323
Show file tree
Hide file tree
Showing 3 changed files with 464 additions and 0 deletions.
322 changes: 322 additions & 0 deletions dev-libs/ktextaddons/files/ktextaddons-1.5.2_p20240107-kf-5.247.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,322 @@
From 733f14eaeaf48a79b0016e5ce3ba237cd543241e Mon Sep 17 00:00:00 2001
From: Laurent Montel <[email protected]>
Date: Mon, 6 Nov 2023 08:02:28 +0100
Subject: [PATCH] Adapt to new api

---
textaddonswidgets/selectspecialchardialog.cpp | 4 ++--
textcustomeditor/plaintexteditor/plaintexteditor.cpp | 10 +++++-----
textcustomeditor/richtexteditor/richtexteditor.cpp | 10 +++++-----
textedittexttospeech/texttospeechconfigdialog.cpp | 4 ++--
textemoticons/core/emojimodelmanager.cpp | 4 ++--
.../grammalecte/grammalecteconfigdialog.cpp | 4 ++--
textgrammarcheck/grammalecte/grammalectemanager.cpp | 4 ++--
.../languagetool/languagetoolconfigdialog.cpp | 4 ++--
textgrammarcheck/languagetool/languagetoolmanager.cpp | 4 ++--
.../plugins/bergamot/begamotenginedialog.cpp | 4 ++--
.../translator/widgets/translatordebugdialog.cpp | 4 ++--
texttranslator/translator/widgets/translatorwidget.cpp | 4 ++--
12 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/textaddonswidgets/selectspecialchardialog.cpp b/textaddonswidgets/selectspecialchardialog.cpp
index 24bf91bf..5e58a72b 100644
--- a/textaddonswidgets/selectspecialchardialog.cpp
+++ b/textaddonswidgets/selectspecialchardialog.cpp
@@ -71,14 +71,14 @@ void SelectSpecialCharDialogPrivate::readConfig()
{
q->create(); // ensure a window is created
q->windowHandle()->resize(QSize(300, 200));
- KConfigGroup group(KSharedConfig::openStateConfig(), mySelectSpecialCharDialogConfigGroupName);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(mySelectSpecialCharDialogConfigGroupName));
KWindowConfig::restoreWindowSize(q->windowHandle(), group);
q->resize(q->windowHandle()->size()); // workaround for QTBUG-40584
}

void SelectSpecialCharDialogPrivate::writeConfig()
{
- KConfigGroup group(KSharedConfig::openStateConfig(), mySelectSpecialCharDialogConfigGroupName);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(mySelectSpecialCharDialogConfigGroupName));
KWindowConfig::saveWindowSize(q->windowHandle(), group);
}

diff --git a/textcustomeditor/plaintexteditor/plaintexteditor.cpp b/textcustomeditor/plaintexteditor/plaintexteditor.cpp
index f7785135..1d8e12db 100644
--- a/textcustomeditor/plaintexteditor/plaintexteditor.cpp
+++ b/textcustomeditor/plaintexteditor/plaintexteditor.cpp
@@ -52,7 +52,7 @@ public:
, webshortcutMenuManager(new KIO::KUriFilterSearchProviderActions(q))
{
KConfig sonnetKConfig(QStringLiteral("sonnetrc"));
- KConfigGroup group(&sonnetKConfig, "Spelling");
+ KConfigGroup group(&sonnetKConfig, QLatin1String("Spelling"));
checkSpellingEnabled = group.readEntry("checkerEnabledByDefault", false);
supportFeatures |= PlainTextEditor::Search;
supportFeatures |= PlainTextEditor::SpellChecking;
@@ -866,8 +866,8 @@ void PlainTextEditor::setSpellCheckingConfigFileName(const QString &_fileName)
{
d->spellCheckingConfigFileName = _fileName;
KSharedConfig::Ptr config = KSharedConfig::openConfig(d->spellCheckingConfigFileName);
- if (config->hasGroup("Spelling")) {
- KConfigGroup group(config, "Spelling");
+ if (config->hasGroup(QLatin1String("Spelling"))) {
+ KConfigGroup group(config, QLatin1String("Spelling"));
d->checkSpellingEnabled = group.readEntry("checkerEnabledByDefault", false);
d->spellCheckingLanguage = group.readEntry("Language", QString());
}
@@ -905,7 +905,7 @@ void PlainTextEditor::setSpellCheckingLanguage(const QString &_language)
if (_language != d->spellCheckingLanguage) {
d->spellCheckingLanguage = _language;
KSharedConfig::Ptr config = KSharedConfig::openConfig(d->spellCheckingConfigFileName);
- KConfigGroup group(config, "Spelling");
+ KConfigGroup group(config, QLatin1String("Spelling"));
group.writeEntry("Language", d->spellCheckingLanguage);
setCheckSpellingEnabled(checkSpellingEnabled());

@@ -917,7 +917,7 @@ void PlainTextEditor::slotToggleAutoSpellCheck()
{
setCheckSpellingEnabled(!checkSpellingEnabled());
KSharedConfig::Ptr config = KSharedConfig::openConfig(d->spellCheckingConfigFileName);
- KConfigGroup group(config, "Spelling");
+ KConfigGroup group(config, QLatin1String("Spelling"));
group.writeEntry("checkerEnabledByDefault", d->checkSpellingEnabled);
}

diff --git a/textcustomeditor/richtexteditor/richtexteditor.cpp b/textcustomeditor/richtexteditor/richtexteditor.cpp
index 4a3ed1a8..0e8deffa 100644
--- a/textcustomeditor/richtexteditor/richtexteditor.cpp
+++ b/textcustomeditor/richtexteditor/richtexteditor.cpp
@@ -54,7 +54,7 @@ public:
, webshortcutMenuManager(new KIO::KUriFilterSearchProviderActions(q))
{
KConfig sonnetKConfig(QStringLiteral("sonnetrc"));
- KConfigGroup group(&sonnetKConfig, "Spelling");
+ KConfigGroup group(&sonnetKConfig, QLatin1String("Spelling"));
checkSpellingEnabled = group.readEntry("checkerEnabledByDefault", false);
supportFeatures |= RichTextEditor::Search;
supportFeatures |= RichTextEditor::SpellChecking;
@@ -638,8 +638,8 @@ void RichTextEditor::setSpellCheckingConfigFileName(const QString &_fileName)
{
d->spellCheckingConfigFileName = _fileName;
KSharedConfig::Ptr config = KSharedConfig::openConfig(d->spellCheckingConfigFileName);
- if (config->hasGroup("Spelling")) {
- KConfigGroup group(config, "Spelling");
+ if (config->hasGroup(QLatin1String("Spelling"))) {
+ KConfigGroup group(config, QLatin1String("Spelling"));
d->checkSpellingEnabled = group.readEntry("checkerEnabledByDefault", false);
d->spellCheckingLanguage = group.readEntry("Language", QString());
}
@@ -711,7 +711,7 @@ void RichTextEditor::setSpellCheckingLanguage(const QString &_language)
if (_language != d->spellCheckingLanguage) {
d->spellCheckingLanguage = _language;
KSharedConfig::Ptr config = KSharedConfig::openConfig(d->spellCheckingConfigFileName);
- KConfigGroup group(config, "Spelling");
+ KConfigGroup group(config, QLatin1String("Spelling"));
group.writeEntry("Language", d->spellCheckingLanguage);

Q_EMIT languageChanged(_language);
@@ -722,7 +722,7 @@ void RichTextEditor::slotToggleAutoSpellCheck()
{
setCheckSpellingEnabled(!checkSpellingEnabled());
KSharedConfig::Ptr config = KSharedConfig::openConfig(d->spellCheckingConfigFileName);
- KConfigGroup group(config, "Spelling");
+ KConfigGroup group(config, QLatin1String("Spelling"));
group.writeEntry("checkerEnabledByDefault", d->checkSpellingEnabled);
}

diff --git a/textedittexttospeech/texttospeechconfigdialog.cpp b/textedittexttospeech/texttospeechconfigdialog.cpp
index b567da4d..a33641d4 100644
--- a/textedittexttospeech/texttospeechconfigdialog.cpp
+++ b/textedittexttospeech/texttospeechconfigdialog.cpp
@@ -54,7 +54,7 @@ void TextToSpeechConfigDialog::readConfig()
{
create(); // ensure a window is created
windowHandle()->resize(QSize(300, 200));
- KConfigGroup group(KSharedConfig::openStateConfig(), myTextToSpeechConfigDialogConfigGroupName);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(myTextToSpeechConfigDialogConfigGroupName));
KWindowConfig::restoreWindowSize(windowHandle(), group);
resize(windowHandle()->size()); // workaround for QTBUG-40584
mTextToSpeechConfigWidget->initializeSettings();
@@ -62,7 +62,7 @@ void TextToSpeechConfigDialog::readConfig()

void TextToSpeechConfigDialog::writeConfig()
{
- KConfigGroup group(KSharedConfig::openStateConfig(), myTextToSpeechConfigDialogConfigGroupName);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(myTextToSpeechConfigDialogConfigGroupName));
KWindowConfig::saveWindowSize(windowHandle(), group);
}

diff --git a/textemoticons/core/emojimodelmanager.cpp b/textemoticons/core/emojimodelmanager.cpp
index d2808c35..4f3c32ac 100644
--- a/textemoticons/core/emojimodelmanager.cpp
+++ b/textemoticons/core/emojimodelmanager.cpp
@@ -26,13 +26,13 @@ public:
}
void loadRecentUsed()
{
- KConfigGroup group(KSharedConfig::openConfig(), myEmoticonRecentUsedGroupName);
+ KConfigGroup group(KSharedConfig::openConfig(), QLatin1String(myEmoticonRecentUsedGroupName));
mRecentIdentifier = group.readEntry("Recents", QStringList());
}

void writeRecentUsed()
{
- KConfigGroup group(KSharedConfig::openConfig(), myEmoticonRecentUsedGroupName);
+ KConfigGroup group(KSharedConfig::openConfig(), QLatin1String(myEmoticonRecentUsedGroupName));
group.writeEntry("Recents", mRecentIdentifier);
group.sync();
}
diff --git a/textgrammarcheck/grammalecte/grammalecteconfigdialog.cpp b/textgrammarcheck/grammalecte/grammalecteconfigdialog.cpp
index cc415326..30d8f890 100644
--- a/textgrammarcheck/grammalecte/grammalecteconfigdialog.cpp
+++ b/textgrammarcheck/grammalecte/grammalecteconfigdialog.cpp
@@ -44,7 +44,7 @@ GrammalecteConfigDialog::~GrammalecteConfigDialog()

void GrammalecteConfigDialog::writeConfig()
{
- KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGrammalecteConfigDialog);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(myConfigGrammalecteConfigDialog));
KWindowConfig::saveWindowSize(windowHandle(), group);
}

@@ -52,7 +52,7 @@ void GrammalecteConfigDialog::readConfig()
{
create(); // ensure a window is created
windowHandle()->resize(QSize(500, 300));
- KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGrammalecteConfigDialog);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(myConfigGrammalecteConfigDialog));
KWindowConfig::restoreWindowSize(windowHandle(), group);
resize(windowHandle()->size()); // workaround for QTBUG-40584
}
diff --git a/textgrammarcheck/grammalecte/grammalectemanager.cpp b/textgrammarcheck/grammalecte/grammalectemanager.cpp
index e191e960..538f21c3 100644
--- a/textgrammarcheck/grammalecte/grammalectemanager.cpp
+++ b/textgrammarcheck/grammalecte/grammalectemanager.cpp
@@ -29,7 +29,7 @@ GrammalecteManager *GrammalecteManager::self()

void GrammalecteManager::saveSettings()
{
- KConfigGroup grp(KSharedConfig::openConfig(), myConfigGroupName);
+ KConfigGroup grp(KSharedConfig::openConfig(), QLatin1String(myConfigGroupName));
grp.writeEntry(QStringLiteral("pythonpath"), mPythonPath);
grp.writeEntry(QStringLiteral("grammalectepath"), mGrammalectePath);
grp.writeEntry(QStringLiteral("options"), mOptions);
@@ -47,7 +47,7 @@ void GrammalecteManager::setOptions(const QStringList &saveOptions)

void GrammalecteManager::loadSettings()
{
- KConfigGroup grp(KSharedConfig::openConfig(), myConfigGroupName);
+ KConfigGroup grp(KSharedConfig::openConfig(), QLatin1String(myConfigGroupName));
mPythonPath = grp.readEntry(QStringLiteral("pythonpath"));
if (mPythonPath.isEmpty()) {
mPythonPath = QStandardPaths::findExecutable(QStringLiteral("python3"));
diff --git a/textgrammarcheck/languagetool/languagetoolconfigdialog.cpp b/textgrammarcheck/languagetool/languagetoolconfigdialog.cpp
index 8d2ba5db..f5bccd18 100644
--- a/textgrammarcheck/languagetool/languagetoolconfigdialog.cpp
+++ b/textgrammarcheck/languagetool/languagetoolconfigdialog.cpp
@@ -46,7 +46,7 @@ LanguageToolConfigDialog::~LanguageToolConfigDialog()

void LanguageToolConfigDialog::writeConfig()
{
- KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(myConfigGroupName));
KWindowConfig::saveWindowSize(windowHandle(), group);
}

@@ -54,7 +54,7 @@ void LanguageToolConfigDialog::readConfig()
{
create(); // ensure a window is created
windowHandle()->resize(QSize(500, 300));
- KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(myConfigGroupName));
KWindowConfig::restoreWindowSize(windowHandle(), group);
resize(windowHandle()->size()); // workaround for QTBUG-40584
}
diff --git a/textgrammarcheck/languagetool/languagetoolmanager.cpp b/textgrammarcheck/languagetool/languagetoolmanager.cpp
index 4bef19ee..22492621 100644
--- a/textgrammarcheck/languagetool/languagetoolmanager.cpp
+++ b/textgrammarcheck/languagetool/languagetoolmanager.cpp
@@ -84,7 +84,7 @@ void LanguageToolManager::setLanguageToolPath(const QString &path)

void LanguageToolManager::loadSettings()
{
- KConfigGroup grp(KSharedConfig::openConfig(), myLanguageToolManagerGroupName);
+ KConfigGroup grp(KSharedConfig::openConfig(), QLatin1String(myLanguageToolManagerGroupName));
mLanguageToolPath = grp.readEntry(QStringLiteral("languagetoolpath"), QStringLiteral("https://api.languagetoolplus.com/v2"));
if (mLanguageToolPath == QLatin1String("https://languagetool.org/api/v2")) {
mLanguageToolPath = QStringLiteral("https://api.languagetoolplus.com/v2");
@@ -96,7 +96,7 @@ void LanguageToolManager::loadSettings()

void LanguageToolManager::saveSettings()
{
- KConfigGroup grp(KSharedConfig::openConfig(), myLanguageToolManagerGroupName);
+ KConfigGroup grp(KSharedConfig::openConfig(), QLatin1String(myLanguageToolManagerGroupName));
grp.writeEntry(QStringLiteral("languagetoolpath"), mLanguageToolPath);
grp.writeEntry(QStringLiteral("language"), mLanguage);
grp.writeEntry(QStringLiteral("useLocalInstance"), mUseLocalInstance);
diff --git a/texttranslator/translator/plugins/bergamot/begamotenginedialog.cpp b/texttranslator/translator/plugins/bergamot/begamotenginedialog.cpp
index d25dc9b6..63c972df 100644
--- a/texttranslator/translator/plugins/bergamot/begamotenginedialog.cpp
+++ b/texttranslator/translator/plugins/bergamot/begamotenginedialog.cpp
@@ -43,7 +43,7 @@ BegamotEngineDialog::~BegamotEngineDialog()

void BegamotEngineDialog::writeConfig()
{
- KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(myConfigGroupName));
KWindowConfig::saveWindowSize(windowHandle(), group);
}

@@ -51,7 +51,7 @@ void BegamotEngineDialog::readConfig()
{
create(); // ensure a window is created
windowHandle()->resize(QSize(500, 300));
- KConfigGroup group(KSharedConfig::openStateConfig(), myConfigGroupName);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(myConfigGroupName));
KWindowConfig::restoreWindowSize(windowHandle(), group);
resize(windowHandle()->size()); // workaround for QTBUG-40584
}
diff --git a/texttranslator/translator/widgets/translatordebugdialog.cpp b/texttranslator/translator/widgets/translatordebugdialog.cpp
index b82914ae..20c6220c 100644
--- a/texttranslator/translator/widgets/translatordebugdialog.cpp
+++ b/texttranslator/translator/widgets/translatordebugdialog.cpp
@@ -64,14 +64,14 @@ void TranslatorDebugDialog::readConfig()
{
create(); // ensure a window is created
windowHandle()->resize(QSize(800, 600));
- KConfigGroup group(KSharedConfig::openStateConfig(), myTranslatorDebugDialogConfigGroupName);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(myTranslatorDebugDialogConfigGroupName));
KWindowConfig::restoreWindowSize(windowHandle(), group);
resize(windowHandle()->size()); // workaround for QTBUG-40584
}

void TranslatorDebugDialog::writeConfig()
{
- KConfigGroup group(KSharedConfig::openStateConfig(), myTranslatorDebugDialogConfigGroupName);
+ KConfigGroup group(KSharedConfig::openStateConfig(), QLatin1String(myTranslatorDebugDialogConfigGroupName));
KWindowConfig::saveWindowSize(windowHandle(), group);
group.sync();
}
diff --git a/texttranslator/translator/widgets/translatorwidget.cpp b/texttranslator/translator/widgets/translatorwidget.cpp
index d60e8271..c590eb3f 100644
--- a/texttranslator/translator/widgets/translatorwidget.cpp
+++ b/texttranslator/translator/widgets/translatorwidget.cpp
@@ -157,14 +157,14 @@ void TranslatorWidget::writeConfig()
myGroup.writeEntry("ToLanguage", d->toCombobox->itemData(d->toCombobox->currentIndex()).toString());
myGroup.sync();
}
- KConfigGroup myGroupUi(KSharedConfig::openStateConfig(), myTranslatorWidgetConfigGroupName);
+ KConfigGroup myGroupUi(KSharedConfig::openStateConfig(), QLatin1String(myTranslatorWidgetConfigGroupName));
myGroupUi.writeEntry("mainSplitter", d->splitter->sizes());
myGroupUi.sync();
}

void TranslatorWidget::readConfig()
{
- KConfigGroup myGroupUi(KSharedConfig::openStateConfig(), myTranslatorWidgetConfigGroupName);
+ KConfigGroup myGroupUi(KSharedConfig::openStateConfig(), QLatin1String(myTranslatorWidgetConfigGroupName));
const QList<int> size = {100, 400};
d->splitter->setSizes(myGroupUi.readEntry("mainSplitter", size));

--
GitLab

Loading

0 comments on commit dd08323

Please sign in to comment.