diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-02-16 11:30:46 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-03-09 21:06:22 +0900 |
commit | caf01321779aee7b959c29a74f15fdc23a81c527 (patch) | |
tree | d63baeb7a8bb39899db1eee077ab71df37149f9e /src/sq_libraryhandler.cpp | |
parent | 37453a729671f7c92987a3cce03cf540de067f9c (diff) | |
download | ksquirrel-caf01321779aee7b959c29a74f15fdc23a81c527.tar.gz ksquirrel-caf01321779aee7b959c29a74f15fdc23a81c527.zip |
Fix bad code, this was highlighted when building with cmake and ninja
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 591ce28f0128f324165b19f6ff653d158711614b)
Diffstat (limited to 'src/sq_libraryhandler.cpp')
-rw-r--r-- | src/sq_libraryhandler.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/sq_libraryhandler.cpp b/src/sq_libraryhandler.cpp index 3b6cf2c..56165b9 100644 --- a/src/sq_libraryhandler.cpp +++ b/src/sq_libraryhandler.cpp @@ -257,8 +257,8 @@ void SQ_LibraryHandler::add(TQStringList &foundLibraries) libtmp.lib->load(); // resolve create() and destroy() functions - libtmp.codec_create = (fmt_codec_base*(*)())(libtmp.lib)->resolve(TQString::fromLatin1("codec_create")); - libtmp.codec_destroy = (void (*)(fmt_codec_base*))(libtmp.lib)->resolve(TQString::fromLatin1("codec_destroy")); + libtmp.codec_create = (fmt_codec_base*(*)())(libtmp.lib)->resolve(TQString::fromLatin1("codec_create").local8Bit()); + libtmp.codec_destroy = (void (*)(fmt_codec_base*))(libtmp.lib)->resolve(TQString::fromLatin1("codec_destroy").local8Bit()); // couldn't resolve - corrupted library ? if(!libtmp.codec_create || !libtmp.codec_destroy) @@ -274,19 +274,19 @@ void SQ_LibraryHandler::add(TQStringList &foundLibraries) // read options codeK->options(&o); - TQString q = o.name; + TQString q = o.name.c_str(); // Yet unknown library ? if(!alreadyInMap(q)) { libtmp.mime = TQPixmap(reinterpret_cast<const char **>(o.pixmap)); - libtmp.mimetype = o.mimetype; + libtmp.mimetype = o.mimetype.c_str(); libtmp.mime_multi = libtmp.mimetype.find(';') != -1; libtmp.quickinfo = q; - libtmp.filter = o.filter; - libtmp.version = o.version; - libtmp.regexp_str = o.mime; - libtmp.config = o.config; + libtmp.filter = o.filter.c_str(); + libtmp.version = o.version.c_str(); + libtmp.regexp_str = o.mime.c_str(); + libtmp.config = o.config.c_str(); libtmp.regexp.setPattern(libtmp.regexp_str); libtmp.regexp.setCaseSensitive(true); libtmp.writestatic = o.writestatic; @@ -366,10 +366,10 @@ void SQ_LibraryHandler::dump() const for(const_iterator it = begin();it != itEnd;++it) { std::cerr << std::setw(30) - << KStringHandler::csqueeze(TQFileInfo((*it).libpath).fileName(), 30) + << KStringHandler::csqueeze(TQFileInfo((*it).libpath).fileName(), 30).local8Bit() << std::setw(0) << " [" - << KStringHandler::rsqueeze((*it).quickinfo, 45) + << KStringHandler::rsqueeze((*it).quickinfo, 45).local8Bit() << "]" << endl; } @@ -430,7 +430,7 @@ void SQ_LibraryHandler::writeSettings(SQ_LIBRARY *lib) for(fmt_settings::iterator it = lib->settings.begin();it != itEnd;++it) { - k = (*it).first; + k = TQString::fromLocal8Bit((*it).first.c_str()); if((*it).second.type == settings_value::v_bool) // boolean { @@ -450,7 +450,7 @@ void SQ_LibraryHandler::writeSettings(SQ_LIBRARY *lib) else // string { k.prepend("s"); - tdeconf->writeEntry(k, (*it).second.sVal); + tdeconf->writeEntry(k, (*it).second.sVal.c_str()); } } } |