From b0445490138dbd29f4698a938091bd59ea4a7143 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 17 Feb 2020 11:37:35 +0100 Subject: [PATCH] [libcalamares] Merge PluginDllMacro.h into DllMacro.h - Let's just have one header definining export- and visibility- macros for Calamares. They are still selected based on the export flags (*_PRO), just defined in one header instead of two. --- src/libcalamares/DllMacro.h | 8 +++++ src/libcalamares/PluginDllMacro.h | 32 ------------------- .../contextualprocess/ContextualProcessJob.h | 2 +- src/modules/dracutlukscfg/DracutLuksCfgJob.h | 2 +- src/modules/dummycpp/DummyCppJob.h | 2 +- src/modules/finished/FinishedViewStep.h | 2 +- src/modules/fsresizer/ResizeFSJob.h | 2 +- src/modules/hostinfo/HostInfoJob.h | 2 +- src/modules/initcpio/InitcpioJob.h | 2 +- src/modules/initramfs/InitramfsJob.h | 2 +- .../InteractiveTerminalViewStep.h | 2 +- src/modules/keyboard/KeyboardViewStep.h | 2 +- src/modules/license/LicenseViewStep.h | 2 +- src/modules/locale/LocaleViewStep.h | 2 +- .../luksbootkeyfile/LuksBootKeyFileJob.h | 2 +- src/modules/machineid/MachineIdJob.h | 2 +- src/modules/netinstall/NetInstallViewStep.h | 2 +- src/modules/notesqml/NotesQmlViewStep.h | 2 +- src/modules/oemid/OEMViewStep.h | 2 +- .../packagechooser/PackageChooserViewStep.h | 2 +- src/modules/partition/gui/PartitionViewStep.h | 2 +- src/modules/plasmalnf/PlasmaLnfViewStep.h | 2 +- src/modules/preservefiles/PreserveFiles.h | 2 +- src/modules/shellprocess/ShellProcessJob.h | 2 +- src/modules/summary/SummaryViewStep.h | 2 +- src/modules/tracking/TrackingViewStep.h | 2 +- src/modules/users/UsersViewStep.h | 2 +- src/modules/webview/WebViewStep.h | 2 +- src/modules/welcome/WelcomeViewStep.h | 2 +- src/modules/welcomeq/WelcomeQmlViewStep.h | 2 +- 30 files changed, 36 insertions(+), 60 deletions(-) delete mode 100644 src/libcalamares/PluginDllMacro.h diff --git a/src/libcalamares/DllMacro.h b/src/libcalamares/DllMacro.h index d3e1c8098..865d91d57 100644 --- a/src/libcalamares/DllMacro.h +++ b/src/libcalamares/DllMacro.h @@ -29,4 +29,12 @@ #endif #endif +#ifndef PLUGINDLLEXPORT +#if defined( PLUGINDLLEXPORT_PRO ) +#define PLUGINDLLEXPORT Q_DECL_EXPORT +#else +#define PLUGINDLLEXPORT Q_DECL_IMPORT +#endif +#endif + #endif diff --git a/src/libcalamares/PluginDllMacro.h b/src/libcalamares/PluginDllMacro.h deleted file mode 100644 index d790230b9..000000000 --- a/src/libcalamares/PluginDllMacro.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 PLUGINDLLMACRO_H -#define PLUGINDLLMACRO_H - -#include - -#ifndef PLUGINDLLEXPORT -#if defined( PLUGINDLLEXPORT_PRO ) -#define PLUGINDLLEXPORT Q_DECL_EXPORT -#else -#define PLUGINDLLEXPORT Q_DECL_IMPORT -#endif -#endif - -#endif diff --git a/src/modules/contextualprocess/ContextualProcessJob.h b/src/modules/contextualprocess/ContextualProcessJob.h index 2efbc5082..3a252d2d3 100644 --- a/src/modules/contextualprocess/ContextualProcessJob.h +++ b/src/modules/contextualprocess/ContextualProcessJob.h @@ -23,7 +23,7 @@ #include #include "CppJob.h" -#include "PluginDllMacro.h" +#include "DllMacro.h" #include "utils/PluginFactory.h" diff --git a/src/modules/dracutlukscfg/DracutLuksCfgJob.h b/src/modules/dracutlukscfg/DracutLuksCfgJob.h index e9e5a54a2..ccf0adb70 100644 --- a/src/modules/dracutlukscfg/DracutLuksCfgJob.h +++ b/src/modules/dracutlukscfg/DracutLuksCfgJob.h @@ -27,7 +27,7 @@ #include -#include +#include class PLUGINDLLEXPORT DracutLuksCfgJob : public Calamares::CppJob { diff --git a/src/modules/dummycpp/DummyCppJob.h b/src/modules/dummycpp/DummyCppJob.h index 4a79d0378..c60b01d57 100644 --- a/src/modules/dummycpp/DummyCppJob.h +++ b/src/modules/dummycpp/DummyCppJob.h @@ -27,7 +27,7 @@ #include -#include +#include class PLUGINDLLEXPORT DummyCppJob : public Calamares::CppJob { diff --git a/src/modules/finished/FinishedViewStep.h b/src/modules/finished/FinishedViewStep.h index 7b3881099..2df37e9b6 100644 --- a/src/modules/finished/FinishedViewStep.h +++ b/src/modules/finished/FinishedViewStep.h @@ -25,7 +25,7 @@ #include "utils/PluginFactory.h" #include "viewpages/ViewStep.h" -#include "PluginDllMacro.h" +#include "DllMacro.h" class FinishedPage; diff --git a/src/modules/fsresizer/ResizeFSJob.h b/src/modules/fsresizer/ResizeFSJob.h index 76ca6c219..985942b99 100644 --- a/src/modules/fsresizer/ResizeFSJob.h +++ b/src/modules/fsresizer/ResizeFSJob.h @@ -27,7 +27,7 @@ #include "partition/PartitionSize.h" #include "utils/PluginFactory.h" -#include +#include class CoreBackend; // From KPMCore class Device; // From KPMCore diff --git a/src/modules/hostinfo/HostInfoJob.h b/src/modules/hostinfo/HostInfoJob.h index fa3342192..5db169b0e 100644 --- a/src/modules/hostinfo/HostInfoJob.h +++ b/src/modules/hostinfo/HostInfoJob.h @@ -20,7 +20,7 @@ #define HOSTINFOJOB_H #include "CppJob.h" -#include "PluginDllMacro.h" +#include "DllMacro.h" #include "utils/PluginFactory.h" #include diff --git a/src/modules/initcpio/InitcpioJob.h b/src/modules/initcpio/InitcpioJob.h index 11358d749..cdc48f6ce 100644 --- a/src/modules/initcpio/InitcpioJob.h +++ b/src/modules/initcpio/InitcpioJob.h @@ -20,7 +20,7 @@ #define INITCPIOJOB_H #include "CppJob.h" -#include "PluginDllMacro.h" +#include "DllMacro.h" #include "utils/PluginFactory.h" #include diff --git a/src/modules/initramfs/InitramfsJob.h b/src/modules/initramfs/InitramfsJob.h index 9eeb81fea..3239c6929 100644 --- a/src/modules/initramfs/InitramfsJob.h +++ b/src/modules/initramfs/InitramfsJob.h @@ -20,7 +20,7 @@ #define INITRAMFSJOB_H #include "CppJob.h" -#include "PluginDllMacro.h" +#include "DllMacro.h" #include "utils/PluginFactory.h" #include diff --git a/src/modules/interactiveterminal/InteractiveTerminalViewStep.h b/src/modules/interactiveterminal/InteractiveTerminalViewStep.h index 55486691d..f0af35d3c 100644 --- a/src/modules/interactiveterminal/InteractiveTerminalViewStep.h +++ b/src/modules/interactiveterminal/InteractiveTerminalViewStep.h @@ -25,7 +25,7 @@ #include #include -#include +#include class InteractiveTerminalPage; diff --git a/src/modules/keyboard/KeyboardViewStep.h b/src/modules/keyboard/KeyboardViewStep.h index a5bdd579e..9f362e116 100644 --- a/src/modules/keyboard/KeyboardViewStep.h +++ b/src/modules/keyboard/KeyboardViewStep.h @@ -25,7 +25,7 @@ #include #include -#include +#include class KeyboardPage; diff --git a/src/modules/license/LicenseViewStep.h b/src/modules/license/LicenseViewStep.h index 957110f3d..cc1a92896 100644 --- a/src/modules/license/LicenseViewStep.h +++ b/src/modules/license/LicenseViewStep.h @@ -20,7 +20,7 @@ #ifndef LICENSEPAGEPLUGIN_H #define LICENSEPAGEPLUGIN_H -#include +#include #include #include diff --git a/src/modules/locale/LocaleViewStep.h b/src/modules/locale/LocaleViewStep.h index eb8d64177..841aba97f 100644 --- a/src/modules/locale/LocaleViewStep.h +++ b/src/modules/locale/LocaleViewStep.h @@ -25,7 +25,7 @@ #include "utils/PluginFactory.h" #include "viewpages/ViewStep.h" -#include "PluginDllMacro.h" +#include "DllMacro.h" #include #include diff --git a/src/modules/luksbootkeyfile/LuksBootKeyFileJob.h b/src/modules/luksbootkeyfile/LuksBootKeyFileJob.h index 2d4d6d319..de9b9c677 100644 --- a/src/modules/luksbootkeyfile/LuksBootKeyFileJob.h +++ b/src/modules/luksbootkeyfile/LuksBootKeyFileJob.h @@ -20,7 +20,7 @@ #define LUKSBOOTKEYFILEJOB_H #include "CppJob.h" -#include "PluginDllMacro.h" +#include "DllMacro.h" #include "utils/PluginFactory.h" #include diff --git a/src/modules/machineid/MachineIdJob.h b/src/modules/machineid/MachineIdJob.h index 5d44b2017..3e450accb 100644 --- a/src/modules/machineid/MachineIdJob.h +++ b/src/modules/machineid/MachineIdJob.h @@ -26,7 +26,7 @@ #include -#include +#include class PLUGINDLLEXPORT MachineIdJob : public Calamares::CppJob { diff --git a/src/modules/netinstall/NetInstallViewStep.h b/src/modules/netinstall/NetInstallViewStep.h index b07d3f96d..f26ba74ed 100644 --- a/src/modules/netinstall/NetInstallViewStep.h +++ b/src/modules/netinstall/NetInstallViewStep.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include diff --git a/src/modules/notesqml/NotesQmlViewStep.h b/src/modules/notesqml/NotesQmlViewStep.h index 445b34c81..5ffd4598e 100644 --- a/src/modules/notesqml/NotesQmlViewStep.h +++ b/src/modules/notesqml/NotesQmlViewStep.h @@ -20,7 +20,7 @@ #ifndef NOTESQMLVIEWSTEP_H #define NOTESQMLVIEWSTEP_H -#include "PluginDllMacro.h" +#include "DllMacro.h" #include "locale/TranslatableConfiguration.h" #include "utils/CalamaresUtilsSystem.h" #include "utils/Variant.h" diff --git a/src/modules/oemid/OEMViewStep.h b/src/modules/oemid/OEMViewStep.h index d8722594a..57e2bba66 100644 --- a/src/modules/oemid/OEMViewStep.h +++ b/src/modules/oemid/OEMViewStep.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include diff --git a/src/modules/packagechooser/PackageChooserViewStep.h b/src/modules/packagechooser/PackageChooserViewStep.h index 29e65ef82..9e9087971 100644 --- a/src/modules/packagechooser/PackageChooserViewStep.h +++ b/src/modules/packagechooser/PackageChooserViewStep.h @@ -19,7 +19,7 @@ #ifndef PACKAGECHOOSERVIEWSTEP_H #define PACKAGECHOOSERVIEWSTEP_H -#include "PluginDllMacro.h" +#include "DllMacro.h" #include "locale/TranslatableConfiguration.h" #include "utils/PluginFactory.h" #include "viewpages/ViewStep.h" diff --git a/src/modules/partition/gui/PartitionViewStep.h b/src/modules/partition/gui/PartitionViewStep.h index 0a62b3aa3..f60dff1df 100644 --- a/src/modules/partition/gui/PartitionViewStep.h +++ b/src/modules/partition/gui/PartitionViewStep.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include "core/PartitionActions.h" diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.h b/src/modules/plasmalnf/PlasmaLnfViewStep.h index 01db17821..e99418549 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.h +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/src/modules/preservefiles/PreserveFiles.h b/src/modules/preservefiles/PreserveFiles.h index ed2fe889c..587ac9bab 100644 --- a/src/modules/preservefiles/PreserveFiles.h +++ b/src/modules/preservefiles/PreserveFiles.h @@ -24,7 +24,7 @@ #include #include "CppJob.h" -#include "PluginDllMacro.h" +#include "DllMacro.h" #include "utils/PluginFactory.h" diff --git a/src/modules/shellprocess/ShellProcessJob.h b/src/modules/shellprocess/ShellProcessJob.h index d532aac99..708a43087 100644 --- a/src/modules/shellprocess/ShellProcessJob.h +++ b/src/modules/shellprocess/ShellProcessJob.h @@ -20,7 +20,7 @@ #define SHELLPROCESSJOB_H #include "CppJob.h" -#include "PluginDllMacro.h" +#include "DllMacro.h" #include "utils/CommandList.h" #include "utils/PluginFactory.h" diff --git a/src/modules/summary/SummaryViewStep.h b/src/modules/summary/SummaryViewStep.h index 88f177a4d..2c873e168 100644 --- a/src/modules/summary/SummaryViewStep.h +++ b/src/modules/summary/SummaryViewStep.h @@ -24,7 +24,7 @@ #include #include -#include +#include class SummaryPage; diff --git a/src/modules/tracking/TrackingViewStep.h b/src/modules/tracking/TrackingViewStep.h index dc952253a..df6497d68 100644 --- a/src/modules/tracking/TrackingViewStep.h +++ b/src/modules/tracking/TrackingViewStep.h @@ -21,7 +21,7 @@ #include "TrackingType.h" -#include +#include #include #include diff --git a/src/modules/users/UsersViewStep.h b/src/modules/users/UsersViewStep.h index 6fced76b9..74bdb84c4 100644 --- a/src/modules/users/UsersViewStep.h +++ b/src/modules/users/UsersViewStep.h @@ -25,7 +25,7 @@ #include #include -#include +#include #include diff --git a/src/modules/webview/WebViewStep.h b/src/modules/webview/WebViewStep.h index c588318fa..9ee2dfac9 100644 --- a/src/modules/webview/WebViewStep.h +++ b/src/modules/webview/WebViewStep.h @@ -26,7 +26,7 @@ #include #include -#include +#include #include diff --git a/src/modules/welcome/WelcomeViewStep.h b/src/modules/welcome/WelcomeViewStep.h index 4d8fa160f..217f827e9 100644 --- a/src/modules/welcome/WelcomeViewStep.h +++ b/src/modules/welcome/WelcomeViewStep.h @@ -25,7 +25,7 @@ #include #include -#include +#include #include diff --git a/src/modules/welcomeq/WelcomeQmlViewStep.h b/src/modules/welcomeq/WelcomeQmlViewStep.h index 5486d8d31..468dd7621 100644 --- a/src/modules/welcomeq/WelcomeQmlViewStep.h +++ b/src/modules/welcomeq/WelcomeQmlViewStep.h @@ -25,7 +25,7 @@ #include "utils/PluginFactory.h" #include "viewpages/ViewStep.h" -#include +#include #include #include