diff --git a/src/calamares/CMakeLists.txt b/src/calamares/CMakeLists.txt index a55e26b6d..9327af8e3 100644 --- a/src/calamares/CMakeLists.txt +++ b/src/calamares/CMakeLists.txt @@ -1,5 +1,3 @@ -add_definitions( -DUIDLLEXPORT_PRO ) - set( calamaresSources main.cpp CalamaresApplication.cpp diff --git a/src/libcalamaresui/Branding.h b/src/libcalamaresui/Branding.h index e3952881e..4c051981c 100644 --- a/src/libcalamaresui/Branding.h +++ b/src/libcalamaresui/Branding.h @@ -22,7 +22,7 @@ #ifndef BRANDING_H #define BRANDING_H -#include "UiDllMacro.h" +#include "DllMacro.h" #include "utils/NamedSuffix.h" @@ -40,7 +40,7 @@ namespace Calamares class GlobalStorage; -class UIDLLEXPORT Branding : public QObject +class DLLEXPORT Branding : public QObject { Q_OBJECT public: diff --git a/src/libcalamaresui/CMakeLists.txt b/src/libcalamaresui/CMakeLists.txt index c603ca22d..9f87ed009 100644 --- a/src/libcalamaresui/CMakeLists.txt +++ b/src/libcalamaresui/CMakeLists.txt @@ -66,7 +66,7 @@ endif() calamares_add_library( calamaresui SOURCES ${calamaresui_SOURCES} - EXPORT_MACRO UIDLLEXPORT_PRO + EXPORT_MACRO DLLEXPORT_PRO LINK_PRIVATE_LIBRARIES ${OPTIONAL_PYTHON_LIBRARIES} LINK_LIBRARIES diff --git a/src/libcalamaresui/UiDllMacro.h b/src/libcalamaresui/UiDllMacro.h deleted file mode 100644 index 3064ca68c..000000000 --- a/src/libcalamaresui/UiDllMacro.h +++ /dev/null @@ -1,32 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2014, Teo Mrnjavac - * - * 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 . - */ - -#ifndef UIDLLMACRO_H -#define UIDLLMACRO_H - -#include - -#ifndef UIDLLEXPORT -#if defined( UIDLLEXPORT_PRO ) -#define UIDLLEXPORT Q_DECL_EXPORT -#else -#define UIDLLEXPORT Q_DECL_IMPORT -#endif -#endif - -#endif diff --git a/src/libcalamaresui/ViewManager.h b/src/libcalamaresui/ViewManager.h index fca74a367..50838f780 100644 --- a/src/libcalamaresui/ViewManager.h +++ b/src/libcalamaresui/ViewManager.h @@ -20,7 +20,7 @@ #ifndef VIEWMANAGER_H #define VIEWMANAGER_H -#include "UiDllMacro.h" +#include "DllMacro.h" #include "viewpages/ViewStep.h" #include @@ -33,7 +33,7 @@ namespace Calamares * @brief The ViewManager class handles progression through view pages. * @note Singleton object, only use through ViewManager::instance(). */ -class UIDLLEXPORT ViewManager : public QObject +class DLLEXPORT ViewManager : public QObject { Q_OBJECT public: diff --git a/src/libcalamaresui/modulesystem/CppJobModule.h b/src/libcalamaresui/modulesystem/CppJobModule.h index feb0f22bb..758b44459 100644 --- a/src/libcalamaresui/modulesystem/CppJobModule.h +++ b/src/libcalamaresui/modulesystem/CppJobModule.h @@ -22,14 +22,14 @@ #define CALAMARES_CPPJOBMODULE_H #include "Module.h" -#include "UiDllMacro.h" +#include "DllMacro.h" class QPluginLoader; namespace Calamares { -class UIDLLEXPORT CppJobModule : public Module +class DLLEXPORT CppJobModule : public Module { public: Type type() const override; diff --git a/src/libcalamaresui/modulesystem/Module.h b/src/libcalamaresui/modulesystem/Module.h index bf2f1cb5d..4ebbdf2a2 100644 --- a/src/libcalamaresui/modulesystem/Module.h +++ b/src/libcalamaresui/modulesystem/Module.h @@ -22,7 +22,7 @@ #include "Job.h" #include "Requirement.h" -#include "UiDllMacro.h" +#include "DllMacro.h" #include "modulesystem/Descriptor.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 * descriptor structure. */ -class UIDLLEXPORT Module +class DLLEXPORT Module { public: /** diff --git a/src/libcalamaresui/modulesystem/ProcessJobModule.h b/src/libcalamaresui/modulesystem/ProcessJobModule.h index 96fb2ed47..31e3b1219 100644 --- a/src/libcalamaresui/modulesystem/ProcessJobModule.h +++ b/src/libcalamaresui/modulesystem/ProcessJobModule.h @@ -22,14 +22,14 @@ #include "Module.h" -#include "UiDllMacro.h" +#include "DllMacro.h" #include namespace Calamares { -class UIDLLEXPORT ProcessJobModule : public Module +class DLLEXPORT ProcessJobModule : public Module { public: Type type() const override; diff --git a/src/libcalamaresui/modulesystem/PythonJobModule.h b/src/libcalamaresui/modulesystem/PythonJobModule.h index 8fa137f71..1d70b5f6c 100644 --- a/src/libcalamaresui/modulesystem/PythonJobModule.h +++ b/src/libcalamaresui/modulesystem/PythonJobModule.h @@ -21,12 +21,12 @@ #include "Module.h" -#include "UiDllMacro.h" +#include "DllMacro.h" namespace Calamares { -class UIDLLEXPORT PythonJobModule : public Module +class DLLEXPORT PythonJobModule : public Module { public: Type type() const override; diff --git a/src/libcalamaresui/modulesystem/PythonQtViewModule.h b/src/libcalamaresui/modulesystem/PythonQtViewModule.h index 6ebb5c433..eeee69a78 100644 --- a/src/libcalamaresui/modulesystem/PythonQtViewModule.h +++ b/src/libcalamaresui/modulesystem/PythonQtViewModule.h @@ -20,14 +20,14 @@ #define CALAMARES_PYTHONQTVIEWMODULE_H #include "Module.h" -#include "UiDllMacro.h" +#include "DllMacro.h" namespace Calamares { class ViewStep; -class UIDLLEXPORT PythonQtViewModule : public Module +class DLLEXPORT PythonQtViewModule : public Module { public: Type type() const override; diff --git a/src/libcalamaresui/modulesystem/ViewModule.h b/src/libcalamaresui/modulesystem/ViewModule.h index e9db1347b..dfe9bed92 100644 --- a/src/libcalamaresui/modulesystem/ViewModule.h +++ b/src/libcalamaresui/modulesystem/ViewModule.h @@ -21,7 +21,7 @@ #define CALAMARES_VIEWMODULE_H #include "Module.h" -#include "UiDllMacro.h" +#include "DllMacro.h" class QPluginLoader; @@ -30,7 +30,7 @@ namespace Calamares class ViewStep; -class UIDLLEXPORT ViewModule : public Module +class DLLEXPORT ViewModule : public Module { public: Type type() const override; diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.h b/src/libcalamaresui/utils/CalamaresUtilsGui.h index 0c10dcc30..884e603e3 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.h +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.h @@ -20,7 +20,7 @@ #ifndef CALAMARESUTILSGUI_H #define CALAMARESUTILSGUI_H -#include "UiDllMacro.h" +#include "DllMacro.h" #include #include @@ -83,7 +83,7 @@ enum ImageMode * @param size the target pixmap size (default: original SVG size). * @return the new pixmap. */ -UIDLLEXPORT QPixmap defaultPixmap( ImageType type, +DLLEXPORT QPixmap defaultPixmap( ImageType type, ImageMode mode = CalamaresUtils::Original, const QSize& size = QSize( 0, 0 ) ); @@ -95,27 +95,27 @@ UIDLLEXPORT QPixmap defaultPixmap( ImageType type, * @return the transformed pixmap. * 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. * @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 * widgets and layouts. * @param layout the layout to clear. */ -UIDLLEXPORT void clearLayout( QLayout* layout ); +DLLEXPORT void clearLayout( QLayout* layout ); -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(); +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(); /** * @brief Size constants for the main Calamares window. diff --git a/src/libcalamaresui/utils/ImageRegistry.h b/src/libcalamaresui/utils/ImageRegistry.h index 454cb500d..a7d04fa9a 100644 --- a/src/libcalamaresui/utils/ImageRegistry.h +++ b/src/libcalamaresui/utils/ImageRegistry.h @@ -28,10 +28,10 @@ #include -#include "UiDllMacro.h" +#include "DllMacro.h" #include "utils/CalamaresUtilsGui.h" -class UIDLLEXPORT ImageRegistry +class DLLEXPORT ImageRegistry { public: static ImageRegistry* instance(); diff --git a/src/libcalamaresui/viewpages/ViewStep.h b/src/libcalamaresui/viewpages/ViewStep.h index c5903d6f5..55b2e200a 100644 --- a/src/libcalamaresui/viewpages/ViewStep.h +++ b/src/libcalamaresui/viewpages/ViewStep.h @@ -21,7 +21,7 @@ #define VIEWSTEP_H #include "Job.h" -#include "UiDllMacro.h" +#include "DllMacro.h" #include "modulesystem/InstanceKey.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 * next exec-step) through prettyStatus() and createSummaryWidget(). */ -class UIDLLEXPORT ViewStep : public QObject +class DLLEXPORT ViewStep : public QObject { Q_OBJECT public: