diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-02-23 16:35:21 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-02-27 20:18:17 +0100 |
commit | 33c3818ac59fda3a00b7cff19fd3b1f09296fe5d (patch) | |
tree | 0d5d3e3353303d875922d428ae28464e9d121930 /tdeui | |
parent | 89609911f85667e0e46b89e15023081cd6724677 (diff) | |
download | tdelibs-33c3818ac59fda3a00b7cff19fd3b1f09296fe5d.tar.gz tdelibs-33c3818ac59fda3a00b7cff19fd3b1f09296fe5d.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 'tdeui')
-rw-r--r-- | tdeui/ksconfig.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/tdeui/ksconfig.cpp b/tdeui/ksconfig.cpp index 234882939..6ae9e3d5f 100644 --- a/tdeui/ksconfig.cpp +++ b/tdeui/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 " |