Skip to content

Commit f823b67

Browse files
author
Uwe Kindler
committed
Added support for export of shared library functions to support MSVC builds
1 parent 064cab4 commit f823b67

10 files changed

+29
-9
lines changed

src/DockAreaWidget.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
//============================================================================
3333
#include <QFrame>
3434

35+
#include "ads_globals.h"
36+
3537
class QXmlStreamWriter;
3638

3739
namespace ads
@@ -47,7 +49,7 @@ class CDockWidget;
4749
* It displays a title tab, which is clickable and will switch to
4850
* the contents associated to the title when clicked.
4951
*/
50-
class CDockAreaWidget : public QFrame
52+
class ADS_EXPORT CDockAreaWidget : public QFrame
5153
{
5254
Q_OBJECT
5355
private:

src/DockContainerWidget.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
#include "ads_globals.h"
3636

37+
3738
class QXmlStreamWriter;
3839
class QXmlStreamReader;
3940

@@ -49,7 +50,7 @@ class CFloatingDockContainer;
4950
* Container that manages a number of dock areas with single dock widgets
5051
* or tabyfied dock widgets in each area
5152
*/
52-
class CDockContainerWidget : public QFrame
53+
class ADS_EXPORT CDockContainerWidget : public QFrame
5354
{
5455
Q_OBJECT
5556
private:

src/DockManager.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
//============================================================================
3333
#include "DockContainerWidget.h"
3434

35+
#include "ads_globals.h"
36+
3537
class QSettings;
3638

3739
namespace ads
@@ -44,7 +46,7 @@ class CDockOverlay;
4446
/**
4547
* The central dock manager that maintains the complete docking system
4648
**/
47-
class CDockManager : public CDockContainerWidget
49+
class ADS_EXPORT CDockManager : public CDockContainerWidget
4850
{
4951
Q_OBJECT
5052
private:

src/DockOverlay.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CDockOverlayCross;
3939
* DockOverlay paints a translucent rectangle over another widget. The geometry
4040
* of the rectangle is based on the mouse location.
4141
*/
42-
class CDockOverlay : public QFrame
42+
class ADS_EXPORT CDockOverlay : public QFrame
4343
{
4444
Q_OBJECT
4545
private:

src/DockSplitter.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@
3131
//============================================================================
3232
#include <QSplitter>
3333

34+
#include "ads_globals.h"
35+
3436
namespace ads
3537
{
3638
struct DockSplitterPrivate;
3739

3840
/**
3941
* Splitter used internally instead of QSplitter
4042
*/
41-
class CDockSplitter : public QSplitter
43+
class ADS_EXPORT CDockSplitter : public QSplitter
4244
{
4345
Q_OBJECT
4446
private:

src/DockWidget.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
//============================================================================
3333
#include <QFrame>
3434

35+
#include "ads_globals.h"
36+
3537
class QXmlStreamWriter;
3638

3739
namespace ads
@@ -47,7 +49,7 @@ struct DockContainerWidgetPrivate;
4749
* The QDockWidget class provides a widget that can be docked inside a
4850
* CDockManager or floated as a top-level window on the desktop.
4951
*/
50-
class CDockWidget : public QFrame
52+
class ADS_EXPORT CDockWidget : public QFrame
5153
{
5254
Q_OBJECT
5355
private:

src/DockWidgetTitleBar.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
//============================================================================
3333
#include <QFrame>
3434

35+
#include "ads_globals.h"
36+
3537
namespace ads
3638
{
3739
class CDockWidget;
@@ -41,7 +43,7 @@ struct DockWidgetTitleBarPrivate;
4143
/**
4244
* A dock widget title bar that shows a title and an icon
4345
*/
44-
class CDockWidgetTitleBar : public QFrame
46+
class ADS_EXPORT CDockWidgetTitleBar : public QFrame
4547
{
4648
Q_OBJECT
4749
Q_PROPERTY(bool activeTab READ isActiveTab WRITE setActiveTab NOTIFY activeTabChanged)

src/FloatingDockContainer.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
//============================================================================
3232
#include <QWidget>
3333

34+
#include "ads_globals.h"
35+
3436
class QXmlStreamReader;
3537

3638
namespace ads
@@ -46,7 +48,7 @@ class CDockManager;
4648
* docking of dock widgets like the main window and that can be docked into
4749
* another dock container
4850
*/
49-
class CFloatingDockContainer : public QWidget
51+
class ADS_EXPORT CFloatingDockContainer : public QWidget
5052
{
5153
Q_OBJECT
5254
private:

src/ads_globals.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@
3131
// INCLUDES
3232
//============================================================================
3333
#include <QPair>
34+
#include <QtCore/QtGlobal>
35+
36+
#ifdef ADS_SHARED_EXPORT
37+
#define ADS_EXPORT Q_DECL_EXPORT
38+
#else
39+
#define ADS_EXPORT Q_DECL_IMPORT
40+
#endif
3441

3542
class QSplitter;
3643

src/src.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ CONFIG += adsBuildShared
1111

1212
adsBuildShared {
1313
CONFIG += shared
14-
DEFINES += ADS_EXPORT
14+
DEFINES += ADS_SHARED_EXPORT
1515
}
1616
!adsBuildShared {
1717
CONFIG += staticlib

0 commit comments

Comments
 (0)