summaryrefslogtreecommitdiffstats
path: root/kdeui
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-02-23 16:35:21 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-02-27 20:20:20 +0100
commitcfa79f06e225942d19903b52cc2ed74e966d3c3f (patch)
tree9b9cd88f300a81e80e511bba11d59c224f2a2c93 /kdeui
parent4e6b9128f722d7a45188b2c2fc3ecdb887de6cc9 (diff)
downloadtdelibs-cfa79f06e225942d19903b52cc2ed74e966d3c3f.tar.gz
tdelibs-cfa79f06e225942d19903b52cc2ed74e966d3c3f.zip
Use system libdir when searching for dynamically loaded libraries.
This prevents finding an incorrect architecture on multi-arch systems. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 8a859540c3cb306844288144a06028dc302408d6)
Diffstat (limited to 'kdeui')
-rw-r--r--kdeui/ksconfig.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/kdeui/ksconfig.cpp b/kdeui/ksconfig.cpp
index c82f71ef7..81c6e8417 100644
--- a/kdeui/ksconfig.cpp
+++ b/kdeui/ksconfig.cpp
@@ -444,20 +444,25 @@ void KSpellConfig::getAvailDictsIspell () {
dictcombo->insertItem( i18n("ISpell Default") );
// dictionary path
- TQFileInfo dir ("/usr/lib" KDELIBSUFF "/ispell");
- if (!dir.exists() || !dir.isDir())
- dir.setFile ("/usr/local/lib" KDELIBSUFF "/ispell");
- if (!dir.exists() || !dir.isDir())
- dir.setFile ("/usr/local/share/ispell");
- if (!dir.exists() || !dir.isDir())
- dir.setFile ("/usr/share/ispell");
- if (!dir.exists() || !dir.isDir())
- dir.setFile ("/usr/pkg/lib");
+ TQFileInfo dir;
+ TQStringList dirs;
+ dirs
+ << "/usr/" SYSTEM_LIBDIR "/ispell"
+ << "/usr/lib/ispell"
+ << "/usr/local/" SYSTEM_LIBDIR "/ispell"
+ << "/usr/local/lib/ispell"
+ << "/usr/local/share/ispell"
+ << "/usr/share/ispell"
+ << "/usr/pkg/lib";
+ for (TQStringList::ConstIterator it=dirs.begin(); it != dirs.end(); ++it) {
+ dir.setFile(*it);
+ if (dir.exists() && dir.isDir()) {
+ break;
+ }
+ }
/* TODO get them all instead of just one of them.
* If /usr/local/lib exists, it skips the rest
- if (!dir.exists() || !dir.isDir())
- dir.setFile ("/usr/local/lib");
- */
+ */
if (!dir.exists() || !dir.isDir()) return;
kdDebug(750) << "KSpellConfig::getAvailDictsIspell "