[libcalamaresui] Restore previous DLLEXPORT names
- Different libraries should have different EXPORTs, so that you can IMPORT one while building the other. Reported (and kindly explained) by Kevin Kofler. - Stick to one header file, though. While here, update copyright on file.
This commit is contained in:
parent
0238a7338a
commit
94f5b13db0
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2020, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -22,8 +23,8 @@
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
/*
|
||||
* Mark symbols exported from Calamares libraries with DLLEXPORT.
|
||||
* These are the public API of the libraries.
|
||||
* Mark symbols exported from Calamares non-GUI library with DLLEXPORT.
|
||||
* These are the public API of libcalamares.
|
||||
*/
|
||||
#ifndef DLLEXPORT
|
||||
#if defined( DLLEXPORT_PRO )
|
||||
@ -33,6 +34,18 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Mark symbols exported from Calamares GUI library with DLLEXPORT.
|
||||
* These are the public API of libcalamaresui.
|
||||
*/
|
||||
#ifndef UIDLLEXPORT
|
||||
#if defined( UIDLLEXPORT_PRO )
|
||||
#define UIDLLEXPORT Q_DECL_EXPORT
|
||||
#else
|
||||
#define UIDLLEXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Mark symbols exported from Calamares C++ plugins with PLUGINDLLEXPORT.
|
||||
* These are the public API of the libraries (generally, the plugin
|
||||
|
@ -40,7 +40,7 @@ namespace Calamares
|
||||
|
||||
class GlobalStorage;
|
||||
|
||||
class DLLEXPORT Branding : public QObject
|
||||
class UIDLLEXPORT Branding : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -66,7 +66,7 @@ endif()
|
||||
|
||||
calamares_add_library( calamaresui
|
||||
SOURCES ${calamaresui_SOURCES}
|
||||
EXPORT_MACRO DLLEXPORT_PRO
|
||||
EXPORT_MACRO UIDLLEXPORT_PRO
|
||||
LINK_PRIVATE_LIBRARIES
|
||||
${OPTIONAL_PYTHON_LIBRARIES}
|
||||
LINK_LIBRARIES
|
||||
|
@ -33,7 +33,7 @@ namespace Calamares
|
||||
* @brief The ViewManager class handles progression through view pages.
|
||||
* @note Singleton object, only use through ViewManager::instance().
|
||||
*/
|
||||
class DLLEXPORT ViewManager : public QObject
|
||||
class UIDLLEXPORT ViewManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -29,7 +29,7 @@ class QPluginLoader;
|
||||
namespace Calamares
|
||||
{
|
||||
|
||||
class DLLEXPORT CppJobModule : public Module
|
||||
class UIDLLEXPORT CppJobModule : public Module
|
||||
{
|
||||
public:
|
||||
Type type() const override;
|
||||
|
@ -40,7 +40,7 @@ namespace Calamares
|
||||
* takes care of creating an object of the correct type starting from a module
|
||||
* descriptor structure.
|
||||
*/
|
||||
class DLLEXPORT Module
|
||||
class UIDLLEXPORT Module
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -29,7 +29,7 @@
|
||||
namespace Calamares
|
||||
{
|
||||
|
||||
class DLLEXPORT ProcessJobModule : public Module
|
||||
class UIDLLEXPORT ProcessJobModule : public Module
|
||||
{
|
||||
public:
|
||||
Type type() const override;
|
||||
|
@ -26,7 +26,7 @@
|
||||
namespace Calamares
|
||||
{
|
||||
|
||||
class DLLEXPORT PythonJobModule : public Module
|
||||
class UIDLLEXPORT PythonJobModule : public Module
|
||||
{
|
||||
public:
|
||||
Type type() const override;
|
||||
|
@ -27,7 +27,7 @@ namespace Calamares
|
||||
|
||||
class ViewStep;
|
||||
|
||||
class DLLEXPORT PythonQtViewModule : public Module
|
||||
class UIDLLEXPORT PythonQtViewModule : public Module
|
||||
{
|
||||
public:
|
||||
Type type() const override;
|
||||
|
@ -30,7 +30,7 @@ namespace Calamares
|
||||
|
||||
class ViewStep;
|
||||
|
||||
class DLLEXPORT ViewModule : public Module
|
||||
class UIDLLEXPORT ViewModule : public Module
|
||||
{
|
||||
public:
|
||||
Type type() const override;
|
||||
|
@ -83,7 +83,7 @@ enum ImageMode
|
||||
* @param size the target pixmap size (default: original SVG size).
|
||||
* @return the new pixmap.
|
||||
*/
|
||||
DLLEXPORT QPixmap defaultPixmap( ImageType type,
|
||||
UIDLLEXPORT QPixmap defaultPixmap( ImageType type,
|
||||
ImageMode mode = CalamaresUtils::Original,
|
||||
const QSize& size = QSize( 0, 0 ) );
|
||||
|
||||
@ -95,27 +95,27 @@ DLLEXPORT QPixmap defaultPixmap( ImageType type,
|
||||
* @return the transformed pixmap.
|
||||
* This one is currently unused.
|
||||
*/
|
||||
DLLEXPORT QPixmap createRoundedImage( const QPixmap& avatar, const QSize& size, float frameWidthPct = 0.20f );
|
||||
UIDLLEXPORT QPixmap createRoundedImage( const QPixmap& avatar, const QSize& size, float frameWidthPct = 0.20f );
|
||||
|
||||
/**
|
||||
* @brief unmarginLayout recursively walks the QLayout tree and removes all margins.
|
||||
* @param layout the layout to unmargin.
|
||||
*/
|
||||
DLLEXPORT void unmarginLayout( QLayout* layout );
|
||||
UIDLLEXPORT void unmarginLayout( QLayout* layout );
|
||||
|
||||
/**
|
||||
* @brief clearLayout recursively walks the QLayout tree and deletes all the child
|
||||
* widgets and layouts.
|
||||
* @param layout the layout to clear.
|
||||
*/
|
||||
DLLEXPORT void clearLayout( QLayout* layout );
|
||||
UIDLLEXPORT void clearLayout( QLayout* layout );
|
||||
|
||||
DLLEXPORT void setDefaultFontSize( int points );
|
||||
DLLEXPORT int defaultFontSize(); // in points
|
||||
DLLEXPORT int defaultFontHeight(); // in pixels, DPI-specific
|
||||
DLLEXPORT QFont defaultFont();
|
||||
DLLEXPORT QFont largeFont();
|
||||
DLLEXPORT QSize defaultIconSize();
|
||||
UIDLLEXPORT void setDefaultFontSize( int points );
|
||||
UIDLLEXPORT int defaultFontSize(); // in points
|
||||
UIDLLEXPORT int defaultFontHeight(); // in pixels, DPI-specific
|
||||
UIDLLEXPORT QFont defaultFont();
|
||||
UIDLLEXPORT QFont largeFont();
|
||||
UIDLLEXPORT QSize defaultIconSize();
|
||||
|
||||
/**
|
||||
* @brief Size constants for the main Calamares window.
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "DllMacro.h"
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
|
||||
class DLLEXPORT ImageRegistry
|
||||
class UIDLLEXPORT ImageRegistry
|
||||
{
|
||||
public:
|
||||
static ImageRegistry* instance();
|
||||
|
@ -34,7 +34,7 @@ namespace CalamaresUtils
|
||||
*
|
||||
* If there is a return value from the QML method, it is logged (but not otherwise used).
|
||||
*/
|
||||
DLLEXPORT void
|
||||
UIDLLEXPORT void
|
||||
callQMLFunction( QQuickItem* qmlObject, const char* method );
|
||||
|
||||
} // namespace CalamaresUtils
|
||||
|
@ -45,7 +45,7 @@ namespace Calamares
|
||||
* (which shows all of the things which have been collected to be done in the
|
||||
* next exec-step) through prettyStatus() and createSummaryWidget().
|
||||
*/
|
||||
class DLLEXPORT ViewStep : public QObject
|
||||
class UIDLLEXPORT ViewStep : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user