diff options
author | Slávek Banko <[email protected]> | 2019-02-23 16:35:21 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2019-02-24 04:22:56 +0100 |
commit | 8a859540c3cb306844288144a06028dc302408d6 (patch) | |
tree | ab30cacb69adc9e2419162224d5cfa9bddeb11b7 /tdeui/ksconfig.cpp | |
parent | c49ee53043b73fac7fe7e956360f1e3cdc342c6e (diff) | |
download | tdelibs-8a859540c3cb306844288144a06028dc302408d6.tar.gz tdelibs-8a859540c3cb306844288144a06028dc302408d6.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 <[email protected]>
Diffstat (limited to 'tdeui/ksconfig.cpp')
-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 " |