From 3b242145342e41d11ec8cf8d800cfefcd8674a34 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 25 Feb 2025 14:31:17 +0900 Subject: Replace obsolete kstddirs.h with kstandarddirs.h Signed-off-by: Michele Calgaro (cherry picked from commit b2925b116af68ffc3b1696c0d5b81696f894de04) --- tdecore/configure.in.in | 2 +- tdecore/kstandarddirs.cpp | 2 +- tdecore/kstandarddirs.h | 6 ++--- tdecore/tests/CMakeLists.txt | 2 +- tdecore/tests/Makefile.am | 4 +-- tdecore/tests/kstandarddirstest.cpp | 52 +++++++++++++++++++++++++++++++++++++ tdecore/tests/kstddirstest.cpp | 52 ------------------------------------- tdehtml/misc/knsplugininstaller.cpp | 2 +- 8 files changed, 61 insertions(+), 61 deletions(-) create mode 100644 tdecore/tests/kstandarddirstest.cpp delete mode 100644 tdecore/tests/kstddirstest.cpp diff --git a/tdecore/configure.in.in b/tdecore/configure.in.in index 7ecda35e7..2597fddcc 100644 --- a/tdecore/configure.in.in +++ b/tdecore/configure.in.in @@ -1,4 +1,4 @@ -dnl Compile in the exec prefix to help kstddirs in finding dynamic libs +dnl Compile in the exec prefix to help kstandarddirs in finding dynamic libs AC_DEFINE_UNQUOTED(__KDE_EXECPREFIX, "$exec_prefix", [execprefix or NONE if not set, for libloading]) dnl Compile in kde_bindir to safely find tdesu_stub. diff --git a/tdecore/kstandarddirs.cpp b/tdecore/kstandarddirs.cpp index b7d41d136..8a0b59c5f 100644 --- a/tdecore/kstandarddirs.cpp +++ b/tdecore/kstandarddirs.cpp @@ -441,7 +441,7 @@ TQString TDEStandardDirs::findResourceDir( const char *type, #ifndef NDEBUG if(false && strcmp(type, "locale")) - fprintf(stderr, "KStdDirs::findResDir(): can't find \"%s\" in type \"%s\".\n", filename.ascii(), type); + fprintf(stderr, "TDEStandardDirs::findResourceDir(): can't find \"%s\" in type \"%s\".\n", filename.ascii(), type); #endif return TQString::null; diff --git a/tdecore/kstandarddirs.h b/tdecore/kstandarddirs.h index e40f7617f..79085dce1 100644 --- a/tdecore/kstandarddirs.h +++ b/tdecore/kstandarddirs.h @@ -20,8 +20,8 @@ Boston, MA 02110-1301, USA. */ -#ifndef SSK_KSTDDIRS_H -#define SSK_KSTDDIRS_H +#ifndef _KSTANDARDDIRS_H +#define _KSTANDARDDIRS_H #include #include @@ -726,4 +726,4 @@ TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, /*! @} */ -#endif // SSK_KSTDDIRS_H +#endif // _KSTANDARDDIRS_H diff --git a/tdecore/tests/CMakeLists.txt b/tdecore/tests/CMakeLists.txt index 36377a255..6ccc215bd 100644 --- a/tdecore/tests/CMakeLists.txt +++ b/tdecore/tests/CMakeLists.txt @@ -31,7 +31,7 @@ tde_add_library( tdeconfigtest SHARED AUTOMOC ) set( CHECKS - tdeconfigtestgui klocaletest kprocesstest ksimpleconfigtest kstddirstest + tdeconfigtestgui klocaletest kprocesstest ksimpleconfigtest kstandarddirstest kuniqueapptest ktempfiletest krandomsequencetest kdebugtest ksocktest kstringhandlertest kcmdlineargstest kapptest kmemtest dcopkonqtest kipctest cplusplustest kiconloadertest kresolvertest diff --git a/tdecore/tests/Makefile.am b/tdecore/tests/Makefile.am index 73e06f588..0e902b1d2 100644 --- a/tdecore/tests/Makefile.am +++ b/tdecore/tests/Makefile.am @@ -22,7 +22,7 @@ INCLUDES = -I$(top_srcdir)/tdecore $(all_includes) AM_LDFLAGS = $(QT_LDFLAGS) $(X_LDFLAGS) $(KDE_RPATH) check_PROGRAMS = tdeconfigtestgui klocaletest kprocesstest ksimpleconfigtest \ - kstddirstest kurltest kuniqueapptest ktempfiletest krandomsequencetest \ + kstandarddirstest kurltest kuniqueapptest ktempfiletest krandomsequencetest \ kdebugtest ksocktest kstringhandlertest kcmdlineargstest kapptest \ kmemtest kidlservertest kidlclienttest dcopkonqtest kipctest \ cplusplustest kiconloadertest kresolvertest kmdcodectest knotifytest \ @@ -45,7 +45,7 @@ klocaletest_SOURCES = klocaletest.cpp #kcatalogue_SOURCES = kcatalogue.cpp libintl.cpp ksimpleconfigtest_SOURCES = ksimpleconfigtest.cpp kurltest_SOURCES = kurltest.cpp -kstddirstest_SOURCES = kstddirstest.cpp +kstandarddirstest_SOURCES = kstandarddirstest.cpp kprocesstest_SOURCES = kprocesstest.cpp kuniqueapptest_SOURCES = kuniqueapptest.cpp kapptest_SOURCES = kapptest.cpp diff --git a/tdecore/tests/kstandarddirstest.cpp b/tdecore/tests/kstandarddirstest.cpp new file mode 100644 index 000000000..ae6ea16bd --- /dev/null +++ b/tdecore/tests/kstandarddirstest.cpp @@ -0,0 +1,52 @@ +#include +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + TDEApplication a(argc, argv, "whatever", false); + TDEStandardDirs t; + TDEConfig config; // to add custom entries - a bit tricky :/ + + TQStringList list; + TQString s; + + t.saveLocation("icon"); + + s = t.findResource("icon", "xv.xpm"); + if (!s.isNull()) kdDebug() << s << endl; + + list = t.findAllResources("data", "kfind/toolbar", true); + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { + kdDebug() << "data " << (*it).ascii() << endl; + } + + list = t.findAllResources("config", "kcmdisplayrc"); + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { + kdDebug() << "config " << (*it).ascii() << endl; + } + + list = t.findAllResources("config", "kcmdisplayrc", false, true); + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { + kdDebug() << "config2 " << (*it).ascii() << endl; + } + + list = t.findAllResources("html", "en/*/index.html", false); + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { + kdDebug() << "docs " << (*it).ascii() << endl; + } + + list = t.findAllResources("html", "*/*/*.html", false); + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { + kdDebug() << "docs " << (*it).ascii() << endl; + } + + list = t.findDirs("data", "twin"); + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { + kdDebug() << "twin dirs " << (*it).ascii() << endl; + } + + kdDebug() << "hit " << t.findResourceDir("config", "kcmdisplayrc") << endl; +} diff --git a/tdecore/tests/kstddirstest.cpp b/tdecore/tests/kstddirstest.cpp deleted file mode 100644 index ae6ea16bd..000000000 --- a/tdecore/tests/kstddirstest.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - TDEApplication a(argc, argv, "whatever", false); - TDEStandardDirs t; - TDEConfig config; // to add custom entries - a bit tricky :/ - - TQStringList list; - TQString s; - - t.saveLocation("icon"); - - s = t.findResource("icon", "xv.xpm"); - if (!s.isNull()) kdDebug() << s << endl; - - list = t.findAllResources("data", "kfind/toolbar", true); - for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - kdDebug() << "data " << (*it).ascii() << endl; - } - - list = t.findAllResources("config", "kcmdisplayrc"); - for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - kdDebug() << "config " << (*it).ascii() << endl; - } - - list = t.findAllResources("config", "kcmdisplayrc", false, true); - for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - kdDebug() << "config2 " << (*it).ascii() << endl; - } - - list = t.findAllResources("html", "en/*/index.html", false); - for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - kdDebug() << "docs " << (*it).ascii() << endl; - } - - list = t.findAllResources("html", "*/*/*.html", false); - for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - kdDebug() << "docs " << (*it).ascii() << endl; - } - - list = t.findDirs("data", "twin"); - for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - kdDebug() << "twin dirs " << (*it).ascii() << endl; - } - - kdDebug() << "hit " << t.findResourceDir("config", "kcmdisplayrc") << endl; -} diff --git a/tdehtml/misc/knsplugininstaller.cpp b/tdehtml/misc/knsplugininstaller.cpp index aefa73192..f5cea7644 100644 --- a/tdehtml/misc/knsplugininstaller.cpp +++ b/tdehtml/misc/knsplugininstaller.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include -- cgit v1.2.1