mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
SpellCheck: Fix dictionary directories for macOS
Also show directories in preferences.
This commit is contained in:
parent
81b8adfe95
commit
ac160506f6
@ -409,8 +409,13 @@ Preferences::Preferences(BrowserWindow* window)
|
|||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
const QStringList dictionariesDirs = {
|
const QStringList dictionariesDirs = {
|
||||||
QCoreApplication::applicationDirPath() + QL1S("/qtwebengine_dictionaries"),
|
#if Q_OS_OSX
|
||||||
QLibraryInfo::location(QLibraryInfo::DataPath) + QL1S("/qtwebengine_dictionaries")
|
QDir::cleanPath(QCoreApplication::applicationDirPath() + QL1S("/../Contents/Resources/qtwebengine_dictionaries")),
|
||||||
|
QDir::cleanPath(QCoreApplication::applicationDirPath() + QL1S("/../Contents/Frameworks/QtWebEngineCore.framework/Resources/qtwebengine_dictionaries"))
|
||||||
|
#else
|
||||||
|
QDir::cleanPath(QCoreApplication::applicationDirPath() + QL1S("/qtwebengine_dictionaries")),
|
||||||
|
QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::DataPath) + QL1S("/qtwebengine_dictionaries"))
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
ui->spellcheckDirectories->setText(dictionariesDirs.join(QL1C('\n')));
|
ui->spellcheckDirectories->setText(dictionariesDirs.join(QL1C('\n')));
|
||||||
|
@ -2282,6 +2282,19 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="spellcheckPage">
|
<widget class="QWidget" name="spellcheckPage">
|
||||||
<layout class="QGridLayout" name="gridLayout_20">
|
<layout class="QGridLayout" name="gridLayout_20">
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Language:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="2" column="4">
|
<item row="2" column="4">
|
||||||
<spacer name="horizontalSpacer_16">
|
<spacer name="horizontalSpacer_16">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -2302,6 +2315,32 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="6" column="1" colspan="4">
|
||||||
|
<widget class="QLabel" name="label_40">
|
||||||
|
<property name="text">
|
||||||
|
<string>For more informations about Spell Check, please see <a href="https://github.com/QupZilla/qupzilla/wiki/Spell-Check">wiki</a>.</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1">
|
||||||
|
<spacer name="verticalSpacer_17">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="2" column="2">
|
||||||
<widget class="QComboBox" name="spellcheckLanguage"/>
|
<widget class="QComboBox" name="spellcheckLanguage"/>
|
||||||
</item>
|
</item>
|
||||||
@ -2321,34 +2360,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1" colspan="4">
|
|
||||||
<widget class="QFrame" name="frame_2">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="spellcheckDirectories"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Language:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" colspan="5">
|
<item row="0" column="0" colspan="5">
|
||||||
<widget class="QLabel" name="label_10">
|
<widget class="QLabel" name="label_10">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -2370,31 +2381,33 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1" colspan="4">
|
<item row="5" column="1" colspan="4">
|
||||||
<widget class="QLabel" name="label_40">
|
<widget class="QScrollArea" name="spellcheckDirectoriesScrollArea">
|
||||||
<property name="text">
|
<property name="sizePolicy">
|
||||||
<string>For more informations about Spell Check, please see <a href="https://github.com/QupZilla/qupzilla/wiki/Spell-Check">wiki</a>.</string>
|
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="widgetResizable">
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>560</width>
|
||||||
|
<height>70</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="spellcheckDirectories"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
</layout>
|
||||||
<spacer name="verticalSpacer_17">
|
</widget>
|
||||||
<property name="orientation">
|
</widget>
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
Reference in New Issue
Block a user