mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kdecore: merge KLocaleUnixPrivate into KLocalePrivate
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
825449e174
commit
50dd0cd82c
6 changed files with 174 additions and 248 deletions
|
@ -240,7 +240,6 @@ set(kdecore_LIB_SRCS
|
|||
|
||||
kernel/ktoolinvocation_x11.cpp
|
||||
kernel/kstandarddirs_unix.cpp
|
||||
localization/klocale_unix.cpp
|
||||
io/klockfile_unix.cpp
|
||||
util/kshell_unix.cpp
|
||||
util/kuser_unix.cpp
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "klocale.h"
|
||||
#include "klocale_unix_p.h"
|
||||
#include "klocale_p.h"
|
||||
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QTextCodec>
|
||||
|
@ -39,12 +39,12 @@
|
|||
#include "common_helpers_p.h"
|
||||
|
||||
KLocale::KLocale(const QString &catalog, KSharedConfig::Ptr config)
|
||||
: d(new KLocaleUnixPrivate(this, catalog, config))
|
||||
: d(new KLocalePrivate(this, catalog, config))
|
||||
{
|
||||
}
|
||||
|
||||
KLocale::KLocale(const QString& catalog, const QString &language, const QString &country, KConfig *config)
|
||||
: d(new KLocaleUnixPrivate(this, catalog, language, country, config))
|
||||
: d(new KLocalePrivate(this, catalog, language, country, config))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -98,19 +98,36 @@ QDebug operator<<(QDebug debug, const KCatalogName &cn)
|
|||
return debug << cn.name << cn.loadCount;
|
||||
}
|
||||
|
||||
KLocalePrivate::KLocalePrivate(KLocale *q_ptr)
|
||||
: q(q_ptr),
|
||||
m_config(KSharedConfig::Ptr()),
|
||||
m_country(QString()),
|
||||
m_language(QString()),
|
||||
m_languages(0),
|
||||
m_catalogName(QString()),
|
||||
m_calendar(0),
|
||||
m_currency(0),
|
||||
m_codecForEncoding(0)
|
||||
KLocalePrivate::KLocalePrivate(KLocale *q_ptr, const QString &catalogName, KSharedConfig::Ptr config)
|
||||
: q(q_ptr),
|
||||
m_config(KSharedConfig::Ptr()),
|
||||
m_country(QString()),
|
||||
m_language(QString()),
|
||||
m_languages(0),
|
||||
m_catalogName(QString()),
|
||||
m_calendar(0),
|
||||
m_currency(0),
|
||||
m_codecForEncoding(0)
|
||||
{
|
||||
init(catalogName, QString(), QString(), config, 0);
|
||||
}
|
||||
|
||||
KLocalePrivate::KLocalePrivate(KLocale *q_ptr, const QString& catalogName,
|
||||
const QString &language,const QString &country, KConfig *config)
|
||||
: q(q_ptr),
|
||||
m_config(KSharedConfig::Ptr()),
|
||||
m_country(QString()),
|
||||
m_language(QString()),
|
||||
m_languages(0),
|
||||
m_catalogName(QString()),
|
||||
m_calendar(0),
|
||||
m_currency(0),
|
||||
m_codecForEncoding(0)
|
||||
{
|
||||
init(catalogName, language, country, KSharedConfig::Ptr(), config);
|
||||
}
|
||||
|
||||
|
||||
KLocalePrivate::KLocalePrivate(const KLocalePrivate &rhs)
|
||||
{
|
||||
copy(rhs);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,49 +0,0 @@
|
|||
/* This file is part of the KDE libraries
|
||||
Copyright (C) 2010 John Layt <john@layt.net>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "klocale_unix_p.h"
|
||||
|
||||
KLocaleUnixPrivate::KLocaleUnixPrivate(KLocale *q_ptr, const QString &catalogName, KSharedConfig::Ptr config)
|
||||
:KLocalePrivate(q_ptr)
|
||||
{
|
||||
init(catalogName, QString(), QString(), config, 0);
|
||||
}
|
||||
|
||||
KLocaleUnixPrivate::KLocaleUnixPrivate(KLocale *q_ptr, const QString& catalogName,
|
||||
const QString &language,const QString &country, KConfig *config)
|
||||
:KLocalePrivate(q_ptr)
|
||||
{
|
||||
init(catalogName, language, country, KSharedConfig::Ptr(), config);
|
||||
}
|
||||
|
||||
KLocaleUnixPrivate::KLocaleUnixPrivate( const KLocaleUnixPrivate &rhs )
|
||||
:KLocalePrivate( rhs )
|
||||
{
|
||||
KLocalePrivate::copy( rhs );
|
||||
}
|
||||
|
||||
KLocaleUnixPrivate &KLocaleUnixPrivate::operator=( const KLocaleUnixPrivate &rhs )
|
||||
{
|
||||
KLocalePrivate::copy( rhs );
|
||||
return *this;
|
||||
}
|
||||
|
||||
KLocaleUnixPrivate::~KLocaleUnixPrivate()
|
||||
{
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/* This file is part of the KDE libraries
|
||||
* Copyright 2010 John Layt <john@layt.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef KLOCALE_UNIX_P_H
|
||||
#define KLOCALE_UNIX_P_H
|
||||
|
||||
#include "klocale_p.h"
|
||||
|
||||
class KLocaleUnixPrivate : public KLocalePrivate
|
||||
{
|
||||
public:
|
||||
KLocaleUnixPrivate( KLocale *q, const QString &catalog, KSharedConfig::Ptr config );
|
||||
|
||||
KLocaleUnixPrivate(KLocale *q, const QString& catalog, const QString &language,
|
||||
const QString &country, KConfig *config);
|
||||
|
||||
KLocaleUnixPrivate( const KLocaleUnixPrivate &rhs );
|
||||
|
||||
KLocaleUnixPrivate &operator=( const KLocaleUnixPrivate &rhs );
|
||||
|
||||
virtual ~KLocaleUnixPrivate();
|
||||
};
|
||||
|
||||
#endif // KLOCALE_UNIX_P_H
|
Loading…
Add table
Reference in a new issue