i18n fixes

This commit is contained in:
Lukáš Tinkl 2014-02-28 18:50:06 +01:00
parent 34bee764e8
commit 39c72cb4b2
11 changed files with 14 additions and 14 deletions

View file

@ -28,7 +28,7 @@
#include "kdebugnamespace.h"
K_PLUGIN_FACTORY(KdeConnectFactory, registerPlugin<Kded>();)
K_EXPORT_PLUGIN(KdeConnectFactory("kdeconnect", "kdeconnect"))
K_EXPORT_PLUGIN(KdeConnectFactory("kdeconnect", "kdeconnect-kded"))
Kded::Kded(QObject *parent, const QList<QVariant>&)
: KDEDModule(parent)

View file

@ -73,7 +73,7 @@ bool BatteryPlugin::receivePackage(const NetworkPackage& np)
if ( thresholdEvent == ThresholdBatteryLow && !isCharging ) {
KNotification* notification = new KNotification("batteryLow");
notification->setPixmap(KIcon("battery-040").pixmap(48, 48));
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect-kded"));
notification->setTitle(i18nc("device name: low battery", "%1: low battery", device()->name()));
notification->setText(i18n("Battery at %1%", currentCharge));
notification->sendEvent();

View file

@ -75,7 +75,7 @@ void MprisControlPlugin::addPlayer(const QString& service)
{
QDBusInterface mprisInterface(service, "/org/mpris/MediaPlayer2", "org.mpris.MediaPlayer2");
//FIXME: This call hangs and returns an empty string if KDED is still starting!
const QString& identity = mprisInterface.property("Identity").toString();
const QString identity = mprisInterface.property("Identity").toString();
playerList[identity] = service;
kDebug(kdeconnect_kded()) << "Mpris addPlayer" << service << "->" << identity;
sendPlayerList();
@ -130,7 +130,7 @@ void MprisControlPlugin::propertiesChanged(const QString& propertyInterface, con
void MprisControlPlugin::removePlayer(const QString& ifaceName)
{
QString identity = playerList.key(ifaceName);
const QString identity = playerList.key(ifaceName);
kDebug(kdeconnect_kded()) << "Mpris removePlayer" << ifaceName << "->" << identity;
playerList.remove(identity);
sendPlayerList();
@ -143,7 +143,7 @@ bool MprisControlPlugin::receivePackage (const NetworkPackage& np)
}
//Send the player list
const QString& player = np.get<QString>("player");
const QString player = np.get<QString>("player");
bool valid_player = playerList.contains(player);
if (!valid_player || np.get<bool>("requestPlayerList")) {
sendPlayerList();

View file

@ -29,7 +29,7 @@
#include "ui_pausemusic_config.h"
K_PLUGIN_FACTORY(PauseMusicConfigFactory, registerPlugin<PauseMusicConfig>();)
K_EXPORT_PLUGIN(PauseMusicConfigFactory("kdeconnect_pausemusic_config", "kdeconnect_pausemusic_config"))
K_EXPORT_PLUGIN(PauseMusicConfigFactory("kdeconnect_pausemusic_config", "kdeconnect-kded"))
PauseMusicConfig::PauseMusicConfig(QWidget *parent, const QVariantList& )
: KCModule(PauseMusicConfigFactory::componentData(), parent)

View file

@ -44,7 +44,7 @@ bool PingPlugin::receivePackage(const NetworkPackage& np)
{
KNotification* notification = new KNotification("pingReceived"); //KNotification::Persistent
notification->setPixmap(KIcon("dialog-ok").pixmap(48, 48));
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect-kded"));
notification->setTitle(device()->name());
notification->setText(np.get<QString>("message",i18n("Ping!"))); //This can be a source of spam
notification->sendEvent();

View file

@ -32,7 +32,7 @@
#include "ui_sftp_config.h"
K_PLUGIN_FACTORY(SftpConfigFactory, registerPlugin<SftpConfig>();)
K_EXPORT_PLUGIN(SftpConfigFactory("kdeconnect_sftp_config", "kdeconnect_sftp_config"))
K_EXPORT_PLUGIN(SftpConfigFactory("kdeconnect_sftp_config", "kdeconnect-kded"))
SftpConfig::SftpConfig(QWidget *parent, const QVariantList& )
: KCModule(SftpConfigFactory::componentData(), parent)

View file

@ -38,7 +38,7 @@
#include "../../kdebugnamespace.h"
K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< SftpPlugin >(); )
K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_sftp", "kdeconnect_sftp") )
K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_sftp", "kdeconnect-kded") )
static const QSet<QString> fields_c = QSet<QString>() << "ip" << "port" << "user" << "port" << "path";
@ -164,7 +164,7 @@ void SftpPlugin::onMounted()
KNotification* notification = new KNotification("mounted", KNotification::CloseOnTimeout, this);
notification->setPixmap(KIconLoader::global()->loadIcon("drive-removable-media", KIconLoader::Desktop));
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect-kded"));
notification->setTitle(i18n("Device %1", device()->name()));
notification->setText(i18n("Filesystem mounted at %1", mountPoint()));
notification->sendEvent();

View file

@ -128,7 +128,7 @@ void SharePlugin::finished(KJob* job)
FileTransferJob* transferJob = (FileTransferJob*)job;
KNotification* notification = new KNotification("pingReceived"); //KNotification::Persistent
notification->setPixmap(KIcon(error? "edit-delete" : "dialog-ok").pixmap(48, 48));
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect-kded"));
notification->setTitle(i18n("Transfer finished"));
notification->setText(transferJob->destination().fileName());
notification->setActions(QStringList(i18n("Open destination folder")));

View file

@ -70,7 +70,7 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
KNotification* notification = new KNotification(type, KNotification::CloseOnTimeout, this); //, KNotification::Persistent
notification->setPixmap(KIcon(icon).pixmap(48, 48));
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
notification->setComponentData(KComponentData("kdeconnect", "kdeconnect-kded"));
notification->setTitle(title);
notification->setText(content);

View file

@ -32,7 +32,7 @@
#include "libkdeconnect/devicesmodel.h"
#include "libkdeconnect/notificationsmodel.h"
Q_EXPORT_PLUGIN2(kdeconnectdeclarativeplugin, KdeConnectDeclarativePlugin);
Q_EXPORT_PLUGIN2(kdeconnectdeclarativeplugin, KdeConnectDeclarativePlugin)
QObject* createDeviceDbusInterface(QVariant deviceId)
{

View file

@ -19,7 +19,7 @@ public:
ObjectFactory(QObject* parent, Func1 f1) : QObject(parent), m_f0(0), m_f1(f1), m_f2(0) {}
ObjectFactory(QObject* parent, Func2 f2) : QObject(parent), m_f0(0), m_f1(0), m_f2(f2) {}
virtual ~ObjectFactory() {};
virtual ~ObjectFactory() {}
Q_INVOKABLE QObject* create() {