[libcalamaresui] Drop UiDllMacro.h

- The scattering of DLL export macro's is kind of useless;
   there are several headers, and then the export macro isn't
   even applied consistently. Just drop the one for UI exports,
   which was only used in libcalamaresui.
main
Adriaan de Groot 5 years ago
parent 214f9a308e
commit aaa6f6bd55

@ -1,5 +1,3 @@
add_definitions( -DUIDLLEXPORT_PRO )
set( calamaresSources set( calamaresSources
main.cpp main.cpp
CalamaresApplication.cpp CalamaresApplication.cpp

@ -22,7 +22,7 @@
#ifndef BRANDING_H #ifndef BRANDING_H
#define BRANDING_H #define BRANDING_H
#include "UiDllMacro.h" #include "DllMacro.h"
#include "utils/NamedSuffix.h" #include "utils/NamedSuffix.h"
@ -40,7 +40,7 @@ namespace Calamares
class GlobalStorage; class GlobalStorage;
class UIDLLEXPORT Branding : public QObject class DLLEXPORT Branding : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

@ -66,7 +66,7 @@ endif()
calamares_add_library( calamaresui calamares_add_library( calamaresui
SOURCES ${calamaresui_SOURCES} SOURCES ${calamaresui_SOURCES}
EXPORT_MACRO UIDLLEXPORT_PRO EXPORT_MACRO DLLEXPORT_PRO
LINK_PRIVATE_LIBRARIES LINK_PRIVATE_LIBRARIES
${OPTIONAL_PYTHON_LIBRARIES} ${OPTIONAL_PYTHON_LIBRARIES}
LINK_LIBRARIES LINK_LIBRARIES

@ -1,32 +0,0 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UIDLLMACRO_H
#define UIDLLMACRO_H
#include <QtCore/qglobal.h>
#ifndef UIDLLEXPORT
#if defined( UIDLLEXPORT_PRO )
#define UIDLLEXPORT Q_DECL_EXPORT
#else
#define UIDLLEXPORT Q_DECL_IMPORT
#endif
#endif
#endif

@ -20,7 +20,7 @@
#ifndef VIEWMANAGER_H #ifndef VIEWMANAGER_H
#define VIEWMANAGER_H #define VIEWMANAGER_H
#include "UiDllMacro.h" #include "DllMacro.h"
#include "viewpages/ViewStep.h" #include "viewpages/ViewStep.h"
#include <QList> #include <QList>
@ -33,7 +33,7 @@ namespace Calamares
* @brief The ViewManager class handles progression through view pages. * @brief The ViewManager class handles progression through view pages.
* @note Singleton object, only use through ViewManager::instance(). * @note Singleton object, only use through ViewManager::instance().
*/ */
class UIDLLEXPORT ViewManager : public QObject class DLLEXPORT ViewManager : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

@ -22,14 +22,14 @@
#define CALAMARES_CPPJOBMODULE_H #define CALAMARES_CPPJOBMODULE_H
#include "Module.h" #include "Module.h"
#include "UiDllMacro.h" #include "DllMacro.h"
class QPluginLoader; class QPluginLoader;
namespace Calamares namespace Calamares
{ {
class UIDLLEXPORT CppJobModule : public Module class DLLEXPORT CppJobModule : public Module
{ {
public: public:
Type type() const override; Type type() const override;

@ -22,7 +22,7 @@
#include "Job.h" #include "Job.h"
#include "Requirement.h" #include "Requirement.h"
#include "UiDllMacro.h" #include "DllMacro.h"
#include "modulesystem/Descriptor.h" #include "modulesystem/Descriptor.h"
#include "modulesystem/InstanceKey.h" #include "modulesystem/InstanceKey.h"
@ -40,7 +40,7 @@ namespace Calamares
* takes care of creating an object of the correct type starting from a module * takes care of creating an object of the correct type starting from a module
* descriptor structure. * descriptor structure.
*/ */
class UIDLLEXPORT Module class DLLEXPORT Module
{ {
public: public:
/** /**

@ -22,14 +22,14 @@
#include "Module.h" #include "Module.h"
#include "UiDllMacro.h" #include "DllMacro.h"
#include <chrono> #include <chrono>
namespace Calamares namespace Calamares
{ {
class UIDLLEXPORT ProcessJobModule : public Module class DLLEXPORT ProcessJobModule : public Module
{ {
public: public:
Type type() const override; Type type() const override;

@ -21,12 +21,12 @@
#include "Module.h" #include "Module.h"
#include "UiDllMacro.h" #include "DllMacro.h"
namespace Calamares namespace Calamares
{ {
class UIDLLEXPORT PythonJobModule : public Module class DLLEXPORT PythonJobModule : public Module
{ {
public: public:
Type type() const override; Type type() const override;

@ -20,14 +20,14 @@
#define CALAMARES_PYTHONQTVIEWMODULE_H #define CALAMARES_PYTHONQTVIEWMODULE_H
#include "Module.h" #include "Module.h"
#include "UiDllMacro.h" #include "DllMacro.h"
namespace Calamares namespace Calamares
{ {
class ViewStep; class ViewStep;
class UIDLLEXPORT PythonQtViewModule : public Module class DLLEXPORT PythonQtViewModule : public Module
{ {
public: public:
Type type() const override; Type type() const override;

@ -21,7 +21,7 @@
#define CALAMARES_VIEWMODULE_H #define CALAMARES_VIEWMODULE_H
#include "Module.h" #include "Module.h"
#include "UiDllMacro.h" #include "DllMacro.h"
class QPluginLoader; class QPluginLoader;
@ -30,7 +30,7 @@ namespace Calamares
class ViewStep; class ViewStep;
class UIDLLEXPORT ViewModule : public Module class DLLEXPORT ViewModule : public Module
{ {
public: public:
Type type() const override; Type type() const override;

@ -20,7 +20,7 @@
#ifndef CALAMARESUTILSGUI_H #ifndef CALAMARESUTILSGUI_H
#define CALAMARESUTILSGUI_H #define CALAMARESUTILSGUI_H
#include "UiDllMacro.h" #include "DllMacro.h"
#include <QObject> #include <QObject>
#include <QPixmap> #include <QPixmap>
@ -83,7 +83,7 @@ enum ImageMode
* @param size the target pixmap size (default: original SVG size). * @param size the target pixmap size (default: original SVG size).
* @return the new pixmap. * @return the new pixmap.
*/ */
UIDLLEXPORT QPixmap defaultPixmap( ImageType type, DLLEXPORT QPixmap defaultPixmap( ImageType type,
ImageMode mode = CalamaresUtils::Original, ImageMode mode = CalamaresUtils::Original,
const QSize& size = QSize( 0, 0 ) ); const QSize& size = QSize( 0, 0 ) );
@ -95,27 +95,27 @@ UIDLLEXPORT QPixmap defaultPixmap( ImageType type,
* @return the transformed pixmap. * @return the transformed pixmap.
* This one is currently unused. * This one is currently unused.
*/ */
UIDLLEXPORT QPixmap createRoundedImage( const QPixmap& avatar, const QSize& size, float frameWidthPct = 0.20f ); DLLEXPORT QPixmap createRoundedImage( const QPixmap& avatar, const QSize& size, float frameWidthPct = 0.20f );
/** /**
* @brief unmarginLayout recursively walks the QLayout tree and removes all margins. * @brief unmarginLayout recursively walks the QLayout tree and removes all margins.
* @param layout the layout to unmargin. * @param layout the layout to unmargin.
*/ */
UIDLLEXPORT void unmarginLayout( QLayout* layout ); DLLEXPORT void unmarginLayout( QLayout* layout );
/** /**
* @brief clearLayout recursively walks the QLayout tree and deletes all the child * @brief clearLayout recursively walks the QLayout tree and deletes all the child
* widgets and layouts. * widgets and layouts.
* @param layout the layout to clear. * @param layout the layout to clear.
*/ */
UIDLLEXPORT void clearLayout( QLayout* layout ); DLLEXPORT void clearLayout( QLayout* layout );
UIDLLEXPORT void setDefaultFontSize( int points ); DLLEXPORT void setDefaultFontSize( int points );
UIDLLEXPORT int defaultFontSize(); // in points DLLEXPORT int defaultFontSize(); // in points
UIDLLEXPORT int defaultFontHeight(); // in pixels, DPI-specific DLLEXPORT int defaultFontHeight(); // in pixels, DPI-specific
UIDLLEXPORT QFont defaultFont(); DLLEXPORT QFont defaultFont();
UIDLLEXPORT QFont largeFont(); DLLEXPORT QFont largeFont();
UIDLLEXPORT QSize defaultIconSize(); DLLEXPORT QSize defaultIconSize();
/** /**
* @brief Size constants for the main Calamares window. * @brief Size constants for the main Calamares window.

@ -28,10 +28,10 @@
#include <QPixmap> #include <QPixmap>
#include "UiDllMacro.h" #include "DllMacro.h"
#include "utils/CalamaresUtilsGui.h" #include "utils/CalamaresUtilsGui.h"
class UIDLLEXPORT ImageRegistry class DLLEXPORT ImageRegistry
{ {
public: public:
static ImageRegistry* instance(); static ImageRegistry* instance();

@ -21,7 +21,7 @@
#define VIEWSTEP_H #define VIEWSTEP_H
#include "Job.h" #include "Job.h"
#include "UiDllMacro.h" #include "DllMacro.h"
#include "modulesystem/InstanceKey.h" #include "modulesystem/InstanceKey.h"
#include "modulesystem/Requirement.h" #include "modulesystem/Requirement.h"
@ -45,7 +45,7 @@ namespace Calamares
* (which shows all of the things which have been collected to be done in the * (which shows all of the things which have been collected to be done in the
* next exec-step) through prettyStatus() and createSummaryWidget(). * next exec-step) through prettyStatus() and createSummaryWidget().
*/ */
class UIDLLEXPORT ViewStep : public QObject class DLLEXPORT ViewStep : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:

Loading…
Cancel
Save