Skip to content

Commit

Permalink
Added acss_globals.h to properly export DLL symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
githubuser0xFFFF committed Apr 19, 2022
1 parent fad1fcf commit 2a72888
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/QmlStyleUrlInterceptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
//============================================================================
#include <QQmlAbstractUrlInterceptor>

#include "acss_globals.h"

namespace acss
{
class QtAdvancedStylesheet;
Expand Down Expand Up @@ -64,7 +66,7 @@ class QtAdvancedStylesheet;
* and turn them into absolute paths (with the help of the @c QtAdvancedStylesheet
* instance passed in the constructor) that can be understood by QML.
*/
class CQmlStyleUrlInterceptor : public QQmlAbstractUrlInterceptor
class ACSS_EXPORT CQmlStyleUrlInterceptor : public QQmlAbstractUrlInterceptor
{
public:
/**
Expand Down
7 changes: 5 additions & 2 deletions src/QtAdvancedStylesheet.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
#include <QPair>
#include <QObject>

class QIcon;
#include "acss_globals.h"


QT_FORWARD_DECLARE_CLASS(QIcon)

namespace acss
{
Expand All @@ -45,7 +48,7 @@ using tColorReplaceList = QVector<QStringPair>;
/**
* Encapsulates all information about a single stylesheet based style
*/
class QtAdvancedStylesheet : public QObject
class ACSS_EXPORT QtAdvancedStylesheet : public QObject
{
Q_OBJECT
private:
Expand Down
60 changes: 60 additions & 0 deletions src/acss_globals.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#ifndef acss_globalsH
#define acss_globalsH
/*******************************************************************************
** Qt Advanced Stylesheets
** Copyright (C) 2022 Uwe Kindler
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/


//============================================================================
/// \file ACSS_globals.h
/// \author Uwe Kindler
/// \date 19.04.2022
//============================================================================


//============================================================================
// INCLUDES
//============================================================================
#include <QtCore/QtGlobal>
#include <QDebug>


#ifndef ACSS_STATIC
#ifdef ACSS_SHARED_EXPORT
#define ACSS_EXPORT Q_DECL_EXPORT
#else
#define ACSS_EXPORT Q_DECL_IMPORT
#endif
#else
#define ACSS_EXPORT
#endif

// Define ACSS_DEBUG_PRINT to enable a lot of debug output
#ifdef ACSS_DEBUG_PRINT
#define ACSS_PRINT(s) qDebug() << s
#else
#define ACSS_PRINT(s)
#endif

// Set ACSS_DEBUG_LEVEL to enable additional debug output and to enable layout
// dumps to qDebug and std::cout after layout changes
#define ACSS_DEBUG_LEVEL 0



//---------------------------------------------------------------------------
#endif // acss_globalsH
1 change: 1 addition & 0 deletions src/src.pro
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ windows {
#RESOURCES += ads.qrc

HEADERS += \
acss_globals.h \
QmlStyleUrlInterceptor.h \
QtAdvancedStylesheet.h

Expand Down

0 comments on commit 2a72888

Please sign in to comment.