refs #485, refs #584 changed register metadata so blackmiscfreefunctions can be removed

This commit is contained in:
Klaus Basan
2016-02-14 01:06:04 +01:00
committed by Mathew Sutcliffe
parent 2af30f1035
commit f74794b4d7
3 changed files with 8 additions and 50 deletions

View File

@@ -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();
}

View File

@@ -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 <QDir> // 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

View File

@@ -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();