Commit 931ae453 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Fix automoc warnings

While at it, stop naming things MUON.
parent 17c61127
......@@ -29,6 +29,12 @@ find_package(KF5NewStuff 5.23)
pkg_check_modules(FLATPAK flatpak>=0.6.12)
if(NOT CMAKE_VERSION VERSION_LESS "3.10.0")
# CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros.
# 3.10+ lets us provide more macro names that require automoc.
list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "DISCOVER_BACKEND_PLUGIN")
endif()
configure_file(DiscoverVersion.h.in DiscoverVersion.h)
add_subdirectory(libdiscover)
......
......@@ -37,7 +37,7 @@
#include <QTimer>
#include <QAction>
MUON_BACKEND_PLUGIN(DummyBackend)
DISCOVER_BACKEND_PLUGIN(DummyBackend)
DummyBackend::DummyBackend(QObject* parent)
: AbstractResourcesBackend(parent)
......
......@@ -59,7 +59,7 @@
#include <glib.h>
MUON_BACKEND_PLUGIN(FlatpakBackend)
DISCOVER_BACKEND_PLUGIN(FlatpakBackend)
static QString idForInstalledRef(FlatpakInstallation *installation, FlatpakInstalledRef *ref)
{
......
......@@ -50,7 +50,7 @@
#include "utils.h"
#include "config-paths.h"
MUON_BACKEND_PLUGIN(PackageKitBackend)
DISCOVER_BACKEND_PLUGIN(PackageKitBackend)
QString PackageKitBackend::locateService(const QString &filename)
{
......
......@@ -39,7 +39,7 @@
#include "utils.h"
MUON_BACKEND_PLUGIN(SnapBackend)
DISCOVER_BACKEND_PLUGIN(SnapBackend)
SnapBackend::SnapBackend(QObject* parent)
: AbstractResourcesBackend(parent)
......
......@@ -102,5 +102,3 @@ int main(int argc, char** argv)
delete dialog;
return ret;
}
#include "SnapMacaroonDialog.moc"
......@@ -25,5 +25,3 @@ BackendNotifierModule::BackendNotifierModule(QObject* parent)
{}
BackendNotifierModule::~BackendNotifierModule() = default;
#include "BackendNotifierModule.moc"
......@@ -239,7 +239,7 @@ public:
virtual QVector<AbstractResourcesBackend*> newInstance(QObject* parent, const QString &name) const = 0;
};
#define MUON_BACKEND_PLUGIN(ClassName)\
#define DISCOVER_BACKEND_PLUGIN(ClassName)\
class ClassName##Factory : public AbstractResourcesBackendFactory {\
Q_OBJECT\
Q_PLUGIN_METADATA(IID "org.kde.muon.AbstractResourcesBackendFactory")\
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment