summaryrefslogtreecommitdiffstats
path: root/kommander/plugin
diff options
context:
space:
mode:
authorgregory guy <g-gregory@gmx.fr>2019-06-28 15:14:51 +0200
committergregory guy <gregory-tde@laposte.net>2021-03-11 15:04:14 +0100
commit4c43d1fbb66a296958ed1d0dbddf3f8ac4466130 (patch)
treee532b01e8168b2f849f8aaa3266a58b088705726 /kommander/plugin
parent10d21d001e92e653cec6b6d1c05983abd00a1195 (diff)
downloadtdewebdev-4c43d1fbb66a296958ed1d0dbddf3f8ac4466130.tar.gz
tdewebdev-4c43d1fbb66a296958ed1d0dbddf3f8ac4466130.zip
Conversion to the cmake building system.
Delete empty files (dummy.cpp, xsldbgconfig.h). Remove hard-coded path for the kmdr-executor executable. Replaced $TQTDIR/doc/html string path for TQTDOCDIR in kommander. Add man pages taken from the Debian packaging. Signed-off-by: gregory guy <gregory-tde@laposte.net> Fix linking - kxsldbgcommon-static and kimagemapeditorcommon-static needs to be embedded. Move the linking of xml and readline libraries to the appropriate static libraries. Add build option WITH_QUANTA_CVSSERVICE. Add a test whether the readline can be linked standalone or whether ncurses is needed. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kommander/plugin')
-rw-r--r--kommander/plugin/CMakeLists.txt38
-rw-r--r--kommander/plugin/specialinformation.cpp34
2 files changed, 56 insertions, 16 deletions
diff --git a/kommander/plugin/CMakeLists.txt b/kommander/plugin/CMakeLists.txt
new file mode 100644
index 00000000..0daa3736
--- /dev/null
+++ b/kommander/plugin/CMakeLists.txt
@@ -0,0 +1,38 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/kommander/widget
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### kommanderplugin (shared)
+
+tde_add_library( kommanderplugin SHARED AUTOMOC
+
+ SOURCES
+ kommanderplugin.cpp
+ specialinformation.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+
+ DESTINATION ${LIB_INSTALL_DIR}
+
+ VERSION 0.0.0
+)
+
+
+##### headers
+
+install(
+ FILES kommanderplugin.h specials.h
+ DESTINATION ${INCLUDE_INSTALL_DIR}
+)
diff --git a/kommander/plugin/specialinformation.cpp b/kommander/plugin/specialinformation.cpp
index 0a80dd85..4a1d8903 100644
--- a/kommander/plugin/specialinformation.cpp
+++ b/kommander/plugin/specialinformation.cpp
@@ -12,7 +12,9 @@
* (at your option) any later version. *
* *
***************************************************************************/
-
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "specials.h"
#include "specialinformation.h"
@@ -63,7 +65,7 @@ SpecialFunction::SpecialFunction(ParserType p, const TQString& name, const TQStr
}
-TQString SpecialFunction::prototype(uint prototypeFlags) const
+TQString KDE_EXPORT SpecialFunction::prototype(uint prototypeFlags) const
{
if (!m_types.count())
return m_function;
@@ -82,21 +84,21 @@ TQString SpecialFunction::prototype(uint prototypeFlags) const
return TQString("%1(%2)").arg(m_function).arg(params.join(", "));
}
-TQString SpecialFunction::argumentName(uint i) const
+TQString KDE_EXPORT SpecialFunction::argumentName(uint i) const
{
if (i < m_args.count())
return m_args[i];
return TQString();
}
-TQString SpecialFunction::argumentType(uint i) const
+TQString KDE_EXPORT SpecialFunction::argumentType(uint i) const
{
if (i < m_types.count())
return m_types[i];
return TQString();
}
-int SpecialFunction::argumentCount() const
+int KDE_EXPORT SpecialFunction::argumentCount() const
{
return m_types.count();
}
@@ -104,7 +106,7 @@ int SpecialFunction::argumentCount() const
-int SpecialInformation::function(int group, const TQString& fname)
+int KDE_EXPORT SpecialInformation::function(int group, const TQString& fname)
{
TQString f = fname.lower();
if (m_functions.contains(group) && m_functions[group].contains(f))
@@ -114,13 +116,13 @@ int SpecialInformation::function(int group, const TQString& fname)
return -1;
}
-SpecialFunction SpecialInformation::functionObject(const TQString& gname, const TQString& fname)
+KDE_EXPORT SpecialFunction SpecialInformation::functionObject(const TQString& gname, const TQString& fname)
{
int gid = group(gname);
return m_specials[gid][function(gid, fname)];
}
-int SpecialInformation::group(const TQString& gname)
+int KDE_EXPORT SpecialInformation::group(const TQString& gname)
{
if (m_groups.contains(gname))
return m_groups[gname];
@@ -137,7 +139,7 @@ bool SpecialInformation::isValid(const TQString& gname, const TQString& fname)
return function(group(gname), fname) != -1;
}
-bool SpecialInformation::isValid(int gname, int fname, SpecialFunction::ParserType p)
+bool KDE_EXPORT SpecialInformation::isValid(int gname, int fname, SpecialFunction::ParserType p)
{
return m_specials.contains(gname) && m_specials[gname].contains(fname)
&& m_specials[gname][fname].isSupported(p);
@@ -151,14 +153,14 @@ bool SpecialInformation::isValid(const TQString& gname, const TQString& fname,
return f != -1 && m_specials[g][f].isSupported(p);
}
-int SpecialInformation::minArg(int gname, int fname)
+int KDE_EXPORT SpecialInformation::minArg(int gname, int fname)
{
if (isValid(gname, fname))
return m_specials[gname][fname].minArg();
return -1;
}
-int SpecialInformation::maxArg(int gname, int fname)
+int KDE_EXPORT SpecialInformation::maxArg(int gname, int fname)
{
if (isValid(gname, fname))
return m_specials[gname][fname].maxArg();
@@ -186,7 +188,7 @@ TQString SpecialInformation::description(int gname, int fname)
return TQString();
}
-TQString SpecialInformation::prototype(int gname, int fname, uint flags)
+TQString KDE_EXPORT SpecialInformation::prototype(int gname, int fname, uint flags)
{
if (isValid(gname, fname))
return m_specials[gname][fname].prototype(flags);
@@ -246,7 +248,7 @@ void SpecialInformation::insertGroup(int id, const TQString& name, const TQStrin
}
}
-TQString SpecialInformation::parserGroupName(const TQString& name)
+TQString KDE_EXPORT SpecialInformation::parserGroupName(const TQString& name)
{
if (m_parserGroups.contains(name))
return m_parserGroups[name];
@@ -254,12 +256,12 @@ TQString SpecialInformation::parserGroupName(const TQString& name)
return name;
}
-TQStringList SpecialInformation::groups()
+TQStringList KDE_EXPORT SpecialInformation::groups()
{
return m_groups.keys();
}
-TQStringList SpecialInformation::functions(const TQString& g)
+TQStringList KDE_EXPORT SpecialInformation::functions(const TQString& g)
{
int gid = group(g);
if (gid == -1)
@@ -279,7 +281,7 @@ bool SpecialFunction::isSupported(ParserType p) const
return (m_parserTypes & p);
}
-void SpecialInformation::registerSpecials()
+void KDE_EXPORT SpecialInformation::registerSpecials()
{
insertGroup(Group::DCOP, "DCOP", "");
insert(DCOP::addUniqueItem, "addUniqueItem(TQString widget, TQString item)",