aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/pysidetest/hiddenobject.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-29 15:01:40 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-01 10:51:58 +0200
commit430d02db24b95a56ae0acc6a9df6a0effe49da0d (patch)
tree8713f11a51f42205dcf2d06894f7f9caa9a49cbe /sources/pyside2/tests/pysidetest/hiddenobject.h
parent26e4ba3639bac57b0481bd6bb3964b1afa340ab9 (diff)
Consolidate export/import macros
For the 3 libraries that need to export symbols, (libshiboken, libpyside, pysidetest), fix up the export/import macros to follow the Qt convention: - Define generic export/import macros LIBSHIBOKEN_EX/IMPORT equivalent to Q_DECL_EX/IMPORT. Remove definitions for the ancient g++ 4.X. - Reuse those in libpyside, pysidetest as PYSIDE_EX/IMPORT and PYSIDETEST_EX/IMPORT. - While building, define some BUILD_ macro indicating export. - Define the _API macros depending on the BUILD_ macro to be export or import, respectively as is done in Qt. Remove the ugly hack in pysidetest that tried to re-use the PYSIDE_API macro. - Brush up the headers a bit. Change-Id: I635891b7eec5a52a1dcf45022f7bfb6a9cfee83f Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/tests/pysidetest/hiddenobject.h')
-rw-r--r--sources/pyside2/tests/pysidetest/hiddenobject.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/sources/pyside2/tests/pysidetest/hiddenobject.h b/sources/pyside2/tests/pysidetest/hiddenobject.h
index ffa8d614a..97a2864c5 100644
--- a/sources/pyside2/tests/pysidetest/hiddenobject.h
+++ b/sources/pyside2/tests/pysidetest/hiddenobject.h
@@ -29,11 +29,9 @@
#ifndef HIDDENOBJECT_H
#define HIDDENOBJECT_H
-#ifdef pysidetest_EXPORTS
-#define PYSIDE_EXPORTS 1
-#endif
-#include "pysidemacros.h"
-#include <QObject>
+#include "pysidetest_macros.h"
+
+#include <QtCore/QObject>
// This class shouldn't be exported!
class HiddenObject : public QObject
@@ -49,7 +47,6 @@ private:
};
// Return a instance of HiddenObject
-PYSIDE_API QObject* getHiddenObject();
-
+PYSIDETEST_API QObject* getHiddenObject();
#endif