Skip to content

Commit 2a72888

Browse files
Added acss_globals.h to properly export DLL symbols
1 parent fad1fcf commit 2a72888

File tree

4 files changed

+69
-3
lines changed

4 files changed

+69
-3
lines changed

src/QmlStyleUrlInterceptor.h

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

35+
#include "acss_globals.h"
36+
3537
namespace acss
3638
{
3739
class QtAdvancedStylesheet;
@@ -64,7 +66,7 @@ class QtAdvancedStylesheet;
6466
* and turn them into absolute paths (with the help of the @c QtAdvancedStylesheet
6567
* instance passed in the constructor) that can be understood by QML.
6668
*/
67-
class CQmlStyleUrlInterceptor : public QQmlAbstractUrlInterceptor
69+
class ACSS_EXPORT CQmlStyleUrlInterceptor : public QQmlAbstractUrlInterceptor
6870
{
6971
public:
7072
/**

src/QtAdvancedStylesheet.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434
#include <QPair>
3535
#include <QObject>
3636

37-
class QIcon;
37+
#include "acss_globals.h"
38+
39+
40+
QT_FORWARD_DECLARE_CLASS(QIcon)
3841

3942
namespace acss
4043
{
@@ -45,7 +48,7 @@ using tColorReplaceList = QVector<QStringPair>;
4548
/**
4649
* Encapsulates all information about a single stylesheet based style
4750
*/
48-
class QtAdvancedStylesheet : public QObject
51+
class ACSS_EXPORT QtAdvancedStylesheet : public QObject
4952
{
5053
Q_OBJECT
5154
private:

src/acss_globals.h

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#ifndef acss_globalsH
2+
#define acss_globalsH
3+
/*******************************************************************************
4+
** Qt Advanced Stylesheets
5+
** Copyright (C) 2022 Uwe Kindler
6+
**
7+
** This library is free software; you can redistribute it and/or
8+
** modify it under the terms of the GNU Lesser General Public
9+
** License as published by the Free Software Foundation; either
10+
** version 2.1 of the License, or (at your option) any later version.
11+
**
12+
** This library is distributed in the hope that it will be useful,
13+
** but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
** Lesser General Public License for more details.
16+
**
17+
** You should have received a copy of the GNU Lesser General Public
18+
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
19+
******************************************************************************/
20+
21+
22+
//============================================================================
23+
/// \file ACSS_globals.h
24+
/// \author Uwe Kindler
25+
/// \date 19.04.2022
26+
//============================================================================
27+
28+
29+
//============================================================================
30+
// INCLUDES
31+
//============================================================================
32+
#include <QtCore/QtGlobal>
33+
#include <QDebug>
34+
35+
36+
#ifndef ACSS_STATIC
37+
#ifdef ACSS_SHARED_EXPORT
38+
#define ACSS_EXPORT Q_DECL_EXPORT
39+
#else
40+
#define ACSS_EXPORT Q_DECL_IMPORT
41+
#endif
42+
#else
43+
#define ACSS_EXPORT
44+
#endif
45+
46+
// Define ACSS_DEBUG_PRINT to enable a lot of debug output
47+
#ifdef ACSS_DEBUG_PRINT
48+
#define ACSS_PRINT(s) qDebug() << s
49+
#else
50+
#define ACSS_PRINT(s)
51+
#endif
52+
53+
// Set ACSS_DEBUG_LEVEL to enable additional debug output and to enable layout
54+
// dumps to qDebug and std::cout after layout changes
55+
#define ACSS_DEBUG_LEVEL 0
56+
57+
58+
59+
//---------------------------------------------------------------------------
60+
#endif // acss_globalsH

src/src.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ windows {
3030
#RESOURCES += ads.qrc
3131

3232
HEADERS += \
33+
acss_globals.h \
3334
QmlStyleUrlInterceptor.h \
3435
QtAdvancedStylesheet.h
3536

0 commit comments

Comments
 (0)