diff --git a/example/example.pro b/example/example.pro index 6ba0a69..489950f 100644 --- a/example/example.pro +++ b/example/example.pro @@ -26,6 +26,14 @@ shareui.path = /usr/share/nemo-transferengine/plugins target.path = /usr/lib/nemo-transferengine/plugins INSTALLS += target shareui +# NOTE: the translations here assume that generic sharing UI system will pick up the +# translations from specific /usr/share/translations/nemotransferengine/ with +# specific name where '-' separates locale code at the end. +# It might work for time being, but it's preferred if plugins take the responsibility +# for loading translations in sharing plugin if that uses translations, and/or from +# qml code. Latter commonly by importing an own module where c++ side instantiates +# and installs QTranslator(s) to the qApp on initializeEngine(). + TS_FILE = $$OUT_PWD/example_share_plugin.ts EE_QM = $$OUT_PWD/example_share_plugin_eng_en.qm @@ -49,8 +57,8 @@ engineering_english_install.path = /usr/share/translations/nemotransferengine engineering_english_install.files = $$EE_QM engineering_english_install.CONFIG += no_check_exist -TS_FI_FILE = translations/example_share_plugin_fi.ts -QM_FI_FILE = example_share_plugin_fi.qm +TS_FI_FILE = translations/example_share_plugin-fi.ts +QM_FI_FILE = example_share_plugin-fi.qm finnish.commands += lrelease -idbased $$TS_FI_FILE -qm $$QM_FI_FILE finnish.CONFIG += no_check_exist no_link diff --git a/example/translations/example_share_plugin_fi.ts b/example/translations/example_share_plugin-fi.ts similarity index 100% rename from example/translations/example_share_plugin_fi.ts rename to example/translations/example_share_plugin-fi.ts diff --git a/lib/mediaitem.cpp b/lib/mediaitem.cpp index ae4df71..578d788 100644 --- a/lib/mediaitem.cpp +++ b/lib/mediaitem.cpp @@ -30,9 +30,6 @@ class MediaItemPrivate { public: - MediaItemPrivate() - {} - QMap m_values; }; @@ -96,9 +93,6 @@ MediaItem::MediaItem(QObject *parent): { } -/*! - Destructor. - */ MediaItem::~MediaItem() { delete d_ptr; diff --git a/lib/mediaitem.h b/lib/mediaitem.h index 32a8649..c39ce86 100644 --- a/lib/mediaitem.h +++ b/lib/mediaitem.h @@ -31,11 +31,10 @@ // Originally this was meant to be exposed to QML side, but not anymore. class MediaItemPrivate; + class MediaItem: public QObject { - public: - enum ValueKey { TransferType, Timestamp, diff --git a/lib/mediatransferinterface.cpp b/lib/mediatransferinterface.cpp index 0535139..7cad374 100644 --- a/lib/mediatransferinterface.cpp +++ b/lib/mediatransferinterface.cpp @@ -156,11 +156,9 @@ class MediaTransferInterfacePrivate MediaTransferInterface::MediaTransferInterface(QObject *parent): QObject(parent), d_ptr(new MediaTransferInterfacePrivate) -{} +{ +} -/*! - Destructor. - */ MediaTransferInterface::~MediaTransferInterface() { delete d_ptr; diff --git a/lib/mediatransferinterface.h b/lib/mediatransferinterface.h index cd020fb..005f3b2 100644 --- a/lib/mediatransferinterface.h +++ b/lib/mediatransferinterface.h @@ -38,7 +38,6 @@ class MediaTransferInterface: public QObject { Q_OBJECT public: - enum TransferStatus { NotStarted = TransferEngineData::NotStarted, TransferStarted = TransferEngineData::TransferStarted, @@ -47,7 +46,6 @@ class MediaTransferInterface: public QObject TransferInterrupted = TransferEngineData::TransferInterrupted }; - explicit MediaTransferInterface(QObject *parent = 0); virtual ~MediaTransferInterface(); diff --git a/lib/transferdbrecord.cpp b/lib/transferdbrecord.cpp index 2bc7ce4..8a5c062 100644 --- a/lib/transferdbrecord.cpp +++ b/lib/transferdbrecord.cpp @@ -66,15 +66,10 @@ \value RestartSupported Boolean to indicate if cancel is supported */ -/*! - Default constructor. - */ TransferDBRecord::TransferDBRecord() { - } - /*! Assigns \a other to this transfer db record and returns a reference to this transfer db record. */ @@ -122,9 +117,6 @@ TransferDBRecord::TransferDBRecord(const TransferDBRecord &other): { } -/*! - Destroys the transfer db record. - */ TransferDBRecord::~TransferDBRecord() { } diff --git a/lib/transferengineclient.cpp b/lib/transferengineclient.cpp index 6d40499..94b2be8 100644 --- a/lib/transferengineclient.cpp +++ b/lib/transferengineclient.cpp @@ -91,9 +91,6 @@ CallbackInterface::CallbackInterface(const QString &server, const QString &path, { } -/*! - Destroys CallbackInterface object. - */ CallbackInterface::~CallbackInterface() { delete d_ptr; @@ -194,10 +191,6 @@ TransferEngineClient::TransferEngineClient(QObject *parent) : this); } - -/*! - Destructor. - */ TransferEngineClient::~TransferEngineClient() { Q_D(TransferEngineClient); diff --git a/lib/transferengineclient.h b/lib/transferengineclient.h index ba446be..7366a22 100644 --- a/lib/transferengineclient.h +++ b/lib/transferengineclient.h @@ -31,8 +31,8 @@ #include #include "transfertypes.h" - class CallbackInterfacePrivate; + class CallbackInterface { public: CallbackInterface(); @@ -51,7 +51,6 @@ class TransferEngineClient : public QObject { Q_OBJECT public: - enum Status { TransferFinished = TransferEngineData::TransferFinished, TransferCanceled = TransferEngineData::TransferCanceled, @@ -61,8 +60,6 @@ class TransferEngineClient : public QObject explicit TransferEngineClient(QObject *parent = 0); ~TransferEngineClient(); - - int createDownloadEvent(const QString &displayName, const QUrl &applicationIcon, const QUrl &serviceIcon, diff --git a/lib/transfermethodinfo.cpp b/lib/transfermethodinfo.cpp index 2922747..0b4c475 100644 --- a/lib/transfermethodinfo.cpp +++ b/lib/transfermethodinfo.cpp @@ -104,15 +104,10 @@ TransferMethodInfo::TransferMethodInfo(const TransferMethodInfo &other): accountIcon(other.accountIcon), hints(other.hints) { - } -/*! - Destroys TransferMethodInfo instance. -*/ TransferMethodInfo::~TransferMethodInfo() { - } /*! @@ -199,6 +194,7 @@ QDBusArgument &operator<<(QDBusArgument &argument, const TransferMethodInfoDepre argument.endStructure(); return argument; } + const QDBusArgument &operator>>(const QDBusArgument &argument, TransferMethodInfoDeprecated &info) { argument.beginStructure(); diff --git a/lib/transfertypes.h b/lib/transfertypes.h index cc89b5e..d4e0798 100644 --- a/lib/transfertypes.h +++ b/lib/transfertypes.h @@ -29,7 +29,6 @@ namespace TransferEngineData { - enum TransferStatus { Unknown, NotStarted, @@ -45,6 +44,5 @@ namespace TransferEngineData Download, Sync }; - } #endif // TRANSFERTYPES_H diff --git a/src/transferengine.h b/src/transferengine.h index 8c9cc26..4eda535 100644 --- a/src/transferengine.h +++ b/src/transferengine.h @@ -41,7 +41,6 @@ class TransferEngine : public QObject { Q_OBJECT public: - explicit TransferEngine(QObject *parent = 0); ~TransferEngine();