summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-03-18 04:07:25 +0100
committerSlávek Banko <slavek.banko@axis.cz>2022-03-20 18:51:06 +0100
commit2c0b8b6e8bebf4e8eabc5b0ff4104d4a3d30a608 (patch)
treec1ae92b234dee67c147861379e94442ea9701962
parent5ec229a4470f605eca53326853ff246a49e80189 (diff)
downloadkmymoney-2c0b8b6e8bebf4e8eabc5b0ff4104d4a3d30a608.tar.gz
kmymoney-2c0b8b6e8bebf4e8eabc5b0ff4104d4a3d30a608.zip
Fix building with hidden visibility.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 64d92fbade9e54ba8bb334b67ba541cea1f7ae9e)
-rw-r--r--kmymoney2/kmymoneytest.cpp10
-rw-r--r--kmymoney2/mymoney/mymoneyforecast.h3
-rw-r--r--libkdchart/kdchart_export.h48
-rw-r--r--libkgpgfile/kgpgfile.cpp2
-rw-r--r--libkgpgfile/kgpgfile.h5
5 files changed, 18 insertions, 50 deletions
diff --git a/kmymoney2/kmymoneytest.cpp b/kmymoney2/kmymoneytest.cpp
index 623a390..7d55794 100644
--- a/kmymoney2/kmymoneytest.cpp
+++ b/kmymoney2/kmymoneytest.cpp
@@ -222,11 +222,11 @@ void timetrace(const char *txt)
// these symbols are needed when linking with libofx because it requires
// these global symbols as part of its callback interface
extern "C" {
- void ofx_proc_security_cb() {}
- void ofx_proc_transaction_cb() {}
- void ofx_proc_statement_cb() {}
- void ofx_proc_status_cb() {}
- void ofx_proc_account_cb() {}
+ KMYMONEY_EXPORT void ofx_proc_security_cb() {}
+ KMYMONEY_EXPORT void ofx_proc_transaction_cb() {}
+ KMYMONEY_EXPORT void ofx_proc_statement_cb() {}
+ KMYMONEY_EXPORT void ofx_proc_status_cb() {}
+ KMYMONEY_EXPORT void ofx_proc_account_cb() {}
}
#endif
#endif
diff --git a/kmymoney2/mymoney/mymoneyforecast.h b/kmymoney2/mymoney/mymoneyforecast.h
index 30d4cbd..ff82f3a 100644
--- a/kmymoney2/mymoney/mymoneyforecast.h
+++ b/kmymoney2/mymoney/mymoneyforecast.h
@@ -41,7 +41,7 @@
* @author Alvaro Soliverez <asoliverez@gmail.com>
*/
-class MyMoneyForecast
+class KMYMONEY_EXPORT MyMoneyForecast
{
public:
MyMoneyForecast();
@@ -401,4 +401,3 @@ private:
};
#endif // MYMONEYFORECAST_H
-
diff --git a/libkdchart/kdchart_export.h b/libkdchart/kdchart_export.h
index afa340f..40b72c2 100644
--- a/libkdchart/kdchart_export.h
+++ b/libkdchart/kdchart_export.h
@@ -1,47 +1,15 @@
#ifndef KDCHART_EXPORT_H
#define KDCHART_EXPORT_H
-#include <tqglobal.h>
-
-#if 0
-#include <koffice_export.h>
-#else
-
-#if defined(Q_OS_WIN32) && defined(KDCHART_DLL)
-#define DLL_EXPORT __declspec(dllexport)
-#define DLL_IMPORT __declspec(dllimport)
-#else
-#define DLL_EXPORT
-#define DLL_IMPORT
-#endif
-
-#if defined(KDCHART_DLL)
-#define KDCHART_EXPORT DLL_EXPORT
+#if defined(__KDE_HAVE_GCC_VISIBILITY) || defined(G_HAVE_GCC_VISIBILITY)
+#define KDCHART_NO_EXPORT __attribute__ ((visibility("hidden")))
+#define KDCHART_EXPORT __attribute__ ((visibility("default")))
+#elif defined(_WIN32)
+#define KDCHART_NO_EXPORT
+#define KDCHART_EXPORT __declspec(dllexport)
#else
-#define KDCHART_EXPORT DLL_IMPORT
+#define KDCHART_NO_EXPORT
+#define KDCHART_EXPORT
#endif
#endif
-
-#endif // #if 1
-
-/*
- How to make a KD Chart DLL rather than linking statically:
-
- 1. We have an #include <kdchart_export.h> statement in all
- of our public KD Chart header files
-
- 2. We have the KDCHART_EXPORT macro added to all of our
- public classes.
-
- So e.g. the class header reads:
-
- class KDCHART_EXPORT KDChartWidget : public QWidget
- {
-
- }
-
-
- 3. In order to create a DLL
- just add "CONFIG += dll" to the qmake command line or to the [KD Chart directory]/src/src.pro file
-*/
diff --git a/libkgpgfile/kgpgfile.cpp b/libkgpgfile/kgpgfile.cpp
index 73413bc..378bf5d 100644
--- a/libkgpgfile/kgpgfile.cpp
+++ b/libkgpgfile/kgpgfile.cpp
@@ -56,7 +56,7 @@ public:
};
extern "C" {
- void *init_libkgpgfile()
+ KDE_EXPORT void *init_libkgpgfile()
{
return new KGPGFileFactory;
}
diff --git a/libkgpgfile/kgpgfile.h b/libkgpgfile/kgpgfile.h
index ab28968..1d13ff0 100644
--- a/libkgpgfile/kgpgfile.h
+++ b/libkgpgfile/kgpgfile.h
@@ -22,6 +22,7 @@
#include <tqobject.h>
#include <tqstring.h>
#include <tqstringlist.h>
+#include <kdemacros.h>
#ifdef Q_MOC_RUN
#define USE_QT4
@@ -61,10 +62,10 @@ class TDEProcess;
*/
// MOC_SKIP_BEGIN
#ifdef USE_QT4
-class KGPGFile : public TQFile
+class KDE_EXPORT KGPGFile : public TQFile
#else // USE_QT4
// MOC_SKIP_END
-class KGPGFile : public TQObject, public TQFile
+class KDE_EXPORT KGPGFile : public TQObject, public TQFile
// MOC_SKIP_BEGIN
#endif // USE_QT4
// MOC_SKIP_END