From f74794b4d79cb599d1609631927ef2d924f876db Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sun, 14 Feb 2016 01:06:04 +0100 Subject: [PATCH] refs #485, refs #584 changed register metadata so blackmiscfreefunctions can be removed --- src/blackmisc/blackmiscfreefunctions.cpp | 15 ---------- src/blackmisc/blackmiscfreefunctions.h | 35 ------------------------ src/blackmisc/registermetadata.cpp | 8 ++++++ 3 files changed, 8 insertions(+), 50 deletions(-) delete mode 100644 src/blackmisc/blackmiscfreefunctions.cpp delete mode 100644 src/blackmisc/blackmiscfreefunctions.h diff --git a/src/blackmisc/blackmiscfreefunctions.cpp b/src/blackmisc/blackmiscfreefunctions.cpp deleted file mode 100644 index 34517d570..000000000 --- a/src/blackmisc/blackmiscfreefunctions.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (C) 2013 - * swift Project Community / Contributors - * - * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level - * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, - * including this file, may be copied, modified, propagated, or distributed except according to the terms - * contained in the LICENSE file. - */ - -#include "blackmiscfreefunctions.h" - -void BlackMisc::initResources() -{ - initBlackMiscResources(); -} diff --git a/src/blackmisc/blackmiscfreefunctions.h b/src/blackmisc/blackmiscfreefunctions.h deleted file mode 100644 index 5aac915cb..000000000 --- a/src/blackmisc/blackmiscfreefunctions.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 2013 - * swift project Community / Contributors - * - * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level - * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, - * including this file, may be copied, modified, propagated, or distributed except according to the terms - * contained in the LICENSE file. - */ - -//! \file - -#ifndef BLACKMISC_FREEFUNCTIONS_H -#define BLACKMISC_FREEFUNCTIONS_H - -#include "blackmisc/blackmiscexport.h" -#include // for Q_INIT_RESOURCE - -/*! - * Workaround, to call initResource from namespace. Used in BlackMisc::initResources(). - * Q_INIT_RESOURCE adds resource, here the translation files. - */ -inline void initBlackMiscResources() -{ - // cannot be declared within namespace, see docu - // hence BlackMisc::initResources() calls this inline function - Q_INIT_RESOURCE(blackmisc); -} - -namespace BlackMisc -{ - //! Init resources - BLACKMISC_EXPORT void initResources(); -} - -#endif // guard diff --git a/src/blackmisc/registermetadata.cpp b/src/blackmisc/registermetadata.cpp index 1cb451931..bdfdbe6a7 100644 --- a/src/blackmisc/registermetadata.cpp +++ b/src/blackmisc/registermetadata.cpp @@ -30,10 +30,18 @@ #include "identifierlist.h" #include "logpattern.h" +void initBlackMiscResourcesImpl() +{ + // cannot be declared within namespace, see docu + Q_INIT_RESOURCE(blackmisc); +} + namespace BlackMisc { void registerMetadata() { + initBlackMiscResources(); + CCountry::registerMetadata(); CCountryList::registerMetadata(); CIcon::registerMetadata();