Commit 7889cdc8 authored by Andrius Štikonas's avatar Andrius Štikonas

Port away from KLocale.

parent 4a75c3be
......@@ -26,7 +26,7 @@
#include "gpgproc.h"
#include <KDebug>
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <QDesktopServices>
......
......@@ -23,7 +23,8 @@
#include "kgpgsettings.h"
#include <KDebug>
#include <KLocale>
#include <KLocalizedString>
#include <QFile>
#include <QStringList>
#include <QTextStream>
......
......@@ -28,7 +28,7 @@
#include "kgpgsettings.h"
#include "model/kgpgitemmodel.h"
#include <KLocale>
#include <KLocalizedString>
KGpgKeyNode::KGpgKeyNode(KGpgRootNode *parent, const KgpgCore::KgpgKey &k)
: KGpgSignableNode(parent),
......
......@@ -27,7 +27,7 @@
#include "KGpgUidNode.h"
#include "model/kgpgitemmodel.h"
#include <KLocale>
#include <KLocalizedString>
KGpgNode::KGpgNode(KGpgExpandableNode *parent)
: QObject(), m_parent(parent)
......
......@@ -18,7 +18,7 @@
*/
#include "KGpgRefNode.h"
#include <KLocale>
#include <KLocalizedString>
#include "KGpgExpandableNode.h"
#include "KGpgRootNode.h"
......
......@@ -20,7 +20,7 @@
#include "KGpgSignableNode.h"
#include <KLocale>
#include <KLocalizedString>
class KGpgSignNodePrivate {
public:
......
......@@ -18,7 +18,7 @@
*/
#include "KGpgSignableNode.h"
#include <KLocale>
#include <KLocalizedString>
KGpgSignableNode::KGpgSignableNode(KGpgExpandableNode *parent)
: KGpgExpandableNode(parent)
......
......@@ -18,7 +18,7 @@
*/
#include "KGpgSubkeyNode.h"
#include <KLocale>
#include <KLocalizedString>
#include "convert.h"
#include "KGpgKeyNode.h"
......
......@@ -21,7 +21,7 @@
#include "gpgproc.h"
#include "KGpgKeyNode.h"
#include <KLocale>
#include <KLocalizedString>
#include <QDateTime>
#include <QDir>
......
......@@ -17,7 +17,7 @@
#include "detailedconsole.h"
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <KConfigGroup>
#include <QDialogButtonBox>
......
......@@ -35,7 +35,7 @@
#include <KFileDialog>
#include <KFindDialog>
#include <KGlobal>
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <KRecentFilesAction>
#include <KSharedConfig>
......
......@@ -18,7 +18,7 @@
#include <KApplication>
#include <KMessageBox>
#include <KLocale>
#include <KLocalizedString>
#include <KLed>
#include <KConfigGroup>
#include <QDialogButtonBox>
......
......@@ -27,7 +27,7 @@
#include "transactions/kgpgsigntext.h"
#include "transactions/kgpgverify.h"
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <KUrlMimeData>
......
......@@ -14,7 +14,7 @@
#include "foldercompressjob.h"
#include <KArchive>
#include <KLocale>
#include <KLocalizedString>
#include <KTar>
#include <KZip>
......
......@@ -27,8 +27,7 @@
#include "transactions/kgpgchangepass.h"
#include <KConfigGroup>
#include <KGlobal>
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <KToolInvocation>
......@@ -38,6 +37,7 @@
#include <QFormLayout>
#include <QHBoxLayout>
#include <QImage>
#include <QLocale>
#include <QPixmap>
#include <QPushButton>
#include <QVBoxLayout>
......@@ -211,11 +211,11 @@ void KgpgKeyInfo::displayKey()
m_id->setText(m_node->getId().right(16));
m_algorithm->setText(Convert::toString(key->algorithm()) + QLatin1String( " / " ) + Convert::toString(key->encryptionAlgorithm()));
m_algorithm->setWhatsThis(i18n("<qt>The left part is the algorithm used by the <b>signature</b> key. The right part is the algorithm used by the <b>encryption</b> key.</qt>"));
m_creation->setText(KGlobal::locale()->formatDate(m_node->getCreation().date(), KLocale::ShortDate));
m_creation->setText(QLocale().toString(m_node->getCreation().date(), QLocale::ShortFormat));
if (m_node->getExpiration().isNull())
m_expiration->setText(i18nc("Unlimited key lifetime", "Unlimited"));
else
m_expiration->setText(KGlobal::locale()->formatDate(m_node->getExpiration().date(), KLocale::ShortDate));
m_expiration->setText(QLocale().toString(m_node->getExpiration().date(), QLocale::ShortFormat));
m_trust->setText(trust);
m_trust->setColor(trustcolor);
m_length->setText(m_node->getSize());
......
......@@ -26,7 +26,7 @@
#include "transactions/kgpgkeyserversearchtransaction.h"
#include "transactions/kgpgsendkeys.h"
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <QCursor>
......
......@@ -61,8 +61,7 @@
#include <akonadi/contact/contactsearchjob.h>
#include <KActionCollection>
#include <KDebug>
#include <KGlobal>
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <KMimeTypeTrader>
#include <KProcess>
......@@ -78,7 +77,6 @@
#include <KStatusNotifierItem>
#include <KToggleAction>
#include <KToolInvocation>
#include <QUrl>
#include <QApplication>
#include <QClipboard>
......@@ -99,6 +97,7 @@
#include <QPrintDialog>
#include <QPrinter>
#include <QProcess>
#include <QUrl>
#include <QWidget>
#include <QWidgetAction>
#include <kcontacts/addresseelist.h>
......
......@@ -25,7 +25,7 @@
#include "transactions/kgpgimport.h"
#include <KConfigGroup>
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <KUrlMimeData>
......
......@@ -24,9 +24,8 @@
#include "core/kgpgkey.h"
#include <KComboBox>
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <QUrl>
#include <KUrlRequester>
#include <QCheckBox>
......@@ -34,9 +33,10 @@
#include <QHBoxLayout>
#include <QLabel>
#include <QSpacerItem>
#include <QStandardPaths>
#include <QTextStream>
#include <QWidget>
#include <QStandardPaths>
#include <QUrl>
using namespace KgpgCore;
......
......@@ -23,7 +23,7 @@
#include "core/KGpgUidNode.h"
#include <gpgme.h>
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <KProcess>
#include <QFile>
......
......@@ -20,17 +20,18 @@
#include "kgpgsettings.h"
#include <KComboBox>
#include <KConfigGroup>
#include <KHBox>
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <QIntValidator>
#include <QDialogButtonBox>
#include <QPushButton>
#include <QStringList>
#include <QVBoxLayout>
#include <QWhatsThis>
#include <QWidget>
#include <KConfigGroup>
#include <QDialogButtonBox>
#include <QPushButton>
using namespace KgpgCore;
......
......@@ -23,10 +23,11 @@
#include "model/kgpgitemmodel.h"
#include <KConfig>
#include <KConfigGroup>
#include <KDebug>
#include <KDesktopFile>
#include <KFontChooser>
#include <KLocale>
#include <KLocalizedString>
#include <KMessageBox>
#include <KProcess>
#include <QUrl>
......@@ -38,7 +39,6 @@
#include <QTextStream>
#include <QVBoxLayout>
#include <QStandardPaths>
#include <KConfigGroup>
using namespace KgpgCore;
......
......@@ -17,7 +17,7 @@
#include <K4AboutData>
#include <KCmdLineArgs>
#include <KLocale>
#include <KLocalizedString>
#include <KUniqueApplication>
static const char description[] =
......
......@@ -19,7 +19,7 @@
#include "gpgservermodel.h"
#include <KLocale>
#include <KLocalizedString>
#include <QStringList>
GpgServerModel::GpgServerModel(QObject *parent)
......
......@@ -21,7 +21,7 @@
#include "kgpgitemmodel.h"
#include "core/kgpgkey.h"
#include <KLocale>
#include <KLocalizedString>
#include <QIcon>
using namespace KgpgCore;
......
......@@ -24,7 +24,7 @@
#include "core/kgpgkey.h"
#include "core/images.h"
#include <KLocale>
#include <KLocalizedString>
#include <QDate>
using namespace KgpgCore;
......
......@@ -23,8 +23,9 @@
#include "core/images.h"
#include "model/kgpgitemnode.h"
#include <KGlobal>
#include <KLocale>
#include <KLocalizedString>
#include <QLocale>
#include <QMetaObject>
KGpgItemModel::KGpgItemModel(QObject *parent)
......@@ -179,7 +180,7 @@ KGpgItemModel::data(const QModelIndex &index, int role) const
}
case KEYCOLUMN_EXPIR:
if (role == Qt::DisplayRole)
return KGlobal::locale()->formatDate(node->getExpiration().date(), KLocale::ShortDate);
return QLocale().toString(node->getExpiration().date(), QLocale::ShortFormat);
break;
case KEYCOLUMN_SIZE:
switch (role) {
......@@ -201,7 +202,7 @@ KGpgItemModel::data(const QModelIndex &index, int role) const
break;
case KEYCOLUMN_CREAT:
if (role == Qt::DisplayRole)
return KGlobal::locale()->formatDate(node->getCreation().date(), KLocale::ShortDate);
return QLocale().toString(node->getCreation().date(), QLocale::ShortFormat);
break;
case KEYCOLUMN_ID:
switch (role) {
......
......@@ -15,7 +15,7 @@
#include <KDateTime>
#include <KDebug>
#include <KLocale>
#include <KLocalizedString>
#include <QScopedPointer>
#include <QString>
......
......@@ -21,8 +21,9 @@
#include "kgpgitemmodel.h"
#include "core/kgpgkey.h"
#include <KGlobal>
#include <KLocale>
#include <QLocale>
#include <KLocalizedString>
using namespace KgpgCore;
......@@ -229,7 +230,7 @@ SelectSecretKeyProxyModel::data(const QModelIndex &index, int role) const
case 1:
return nd->getEmail();
case 2:
return KGlobal::locale()->formatDate(nd->getExpiration().date(), KLocale::ShortDate);
return QLocale().toString(nd->getExpiration().date(), QLocale::ShortFormat);
case 3:
return nd->getId().right(8);
}
......
......@@ -18,9 +18,9 @@
#include <QCheckBox>
#include <QVBoxLayout>
#include <KDatePicker>
#include <KLocale>
#include <KConfigGroup>
#include <KDatePicker>
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QPushButton>
......
......@@ -23,19 +23,18 @@
#include <QAction>
#include <QCheckBox>
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QTableView>
#include <QVBoxLayout>
#include <KActionCollection>
#include <QHBoxLayout>
#include <KIconLoader>
#include <KLocale>
#include <QVBoxLayout>
#include <KConfigGroup>
#include <QDialogButtonBox>
#include <QPushButton>
#include <KIconLoader>
#include <KLocalizedString>
using namespace KgpgCore;
......
......@@ -16,14 +16,15 @@
#include "model/selectkeyproxymodel.h"
#include <KComboBox>
#include <KLocale>
#include <QVBoxLayout>
#include <QCheckBox>
#include <QLabel>
#include <QTableView>
#include <KConfigGroup>
#include <KLocalizedString>
#include <QCheckBox>
#include <QDialogButtonBox>
#include <QLabel>
#include <QPushButton>
#include <QTableView>
#include <QVBoxLayout>
using namespace KgpgCore;
......
......@@ -13,8 +13,8 @@
#include "kgpgaddphoto.h"
#include <KLocalizedString>
#include <KMessageBox>
#include <KLocale>
KGpgAddPhoto::KGpgAddPhoto(QObject *parent, const QString &keyid, const QString &imagepath)
: KGpgEditKeyTransaction(parent, keyid, QLatin1String( "addphoto" ), false)
......
......@@ -13,7 +13,7 @@
#include "kgpgchangepass.h"
#include <KLocale>
#include <KLocalizedString>
KGpgChangePass::KGpgChangePass(QObject *parent, const QString &keyid)
: KGpgTransaction(parent),
......
......@@ -16,7 +16,7 @@
#include "gpgproc.h"
#include "kgpgsettings.h"
#include <KLocale>
#include <KLocalizedString>
KGpgDecrypt::KGpgDecrypt(QObject *parent, const QString &text)
: KGpgTextOrFileTransaction(parent, text),
......
......@@ -15,8 +15,8 @@
#include "gpgproc.h"
#include <KLocale>
#include <KEmailAddress>
#include <KLocalizedString>
#include <QApplication>
KGpgGenerateKey::KGpgGenerateKey(QObject *parent, const QString &name, const QString &email, const QString &comment,
......
......@@ -14,7 +14,7 @@
#include "kgpggeneraterevoke.h"
#include <KDebug>
#include <KLocale>
#include <KLocalizedString>
#include <QFile>
KGpgGenerateRevoke::KGpgGenerateRevoke(QObject *parent, const QString &keyID, const QUrl &revokeUrl, const int reason, const QString &description)
......
......@@ -17,7 +17,7 @@
#include "core/KGpgKeyNode.h"
#include <KDebug>
#include <KLocale>
#include <KLocalizedString>
KGpgImport::KGpgImport(QObject *parent, const QString &text)
: KGpgTextOrFileTransaction(parent, text, true)
......
......@@ -15,7 +15,7 @@
#include "gpgproc.h"
#include <KLocale>
#include <KLocalizedString>
#include <QLabel>
#include <QProgressDialog>
......
......@@ -28,7 +28,7 @@
#include <KDebug>
#include <KIO/RenameDialog>
#include <KNewPasswordDialog>
#include <KLocale>
#include <KLocalizedString>
#include <KPasswordDialog>
KGpgTransaction::KGpgTransaction(QObject *parent, const bool allowChaining)
......
......@@ -15,7 +15,7 @@
#include "kgpgtransaction.h"
#include <KLocale>
#include <KLocalizedString>
KGpgTransactionJob::KGpgTransactionJob(KGpgTransaction *transaction)
: KJob(transaction->parent()),
......
......@@ -17,8 +17,9 @@
#include "core/KGpgKeyNode.h"
#include "model/kgpgitemmodel.h"
#include <KGlobal>
#include <KLocale>
#include <QLocale>
#include <KLocalizedString>
KGpgVerify::KGpgVerify(QObject *parent, const QString &text)
: KGpgTextOrFileTransaction(parent, text),
......@@ -94,8 +95,8 @@ sigTimeMessage(const QString &sigtime)
return i18nc("first argument is formatted date, second argument is formatted time",
"The signature was created at %1 %2",
KGlobal::locale()->formatDate(stamp.date(), KLocale::LongDate),
KGlobal::locale()->formatTime(stamp.time(), KLocale::LongDate)) +
QLocale().toString(stamp.date(), QLocale::ShortFormat),
QLocale().toString(stamp.time(), QLocale::ShortFormat)) +
QLatin1String("<br/>");
}
......
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