Commit 8ef3989a authored by pvuorela's avatar pvuorela

Merge branch 'third_party_plugin_example' into 'master'

Third party translation example docs + cosmetics

See merge request !8
parents 24745100 c384d146
...@@ -26,6 +26,14 @@ shareui.path = /usr/share/nemo-transferengine/plugins ...@@ -26,6 +26,14 @@ shareui.path = /usr/share/nemo-transferengine/plugins
target.path = /usr/lib/nemo-transferengine/plugins target.path = /usr/lib/nemo-transferengine/plugins
INSTALLS += target shareui 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 TS_FILE = $$OUT_PWD/example_share_plugin.ts
EE_QM = $$OUT_PWD/example_share_plugin_eng_en.qm EE_QM = $$OUT_PWD/example_share_plugin_eng_en.qm
...@@ -49,8 +57,8 @@ engineering_english_install.path = /usr/share/translations/nemotransferengine ...@@ -49,8 +57,8 @@ engineering_english_install.path = /usr/share/translations/nemotransferengine
engineering_english_install.files = $$EE_QM engineering_english_install.files = $$EE_QM
engineering_english_install.CONFIG += no_check_exist engineering_english_install.CONFIG += no_check_exist
TS_FI_FILE = translations/example_share_plugin_fi.ts TS_FI_FILE = translations/example_share_plugin-fi.ts
QM_FI_FILE = example_share_plugin_fi.qm QM_FI_FILE = example_share_plugin-fi.qm
finnish.commands += lrelease -idbased $$TS_FI_FILE -qm $$QM_FI_FILE finnish.commands += lrelease -idbased $$TS_FI_FILE -qm $$QM_FI_FILE
finnish.CONFIG += no_check_exist no_link finnish.CONFIG += no_check_exist no_link
......
...@@ -30,9 +30,6 @@ ...@@ -30,9 +30,6 @@
class MediaItemPrivate class MediaItemPrivate
{ {
public: public:
MediaItemPrivate()
{}
QMap <MediaItem::ValueKey, QVariant> m_values; QMap <MediaItem::ValueKey, QVariant> m_values;
}; };
...@@ -96,9 +93,6 @@ MediaItem::MediaItem(QObject *parent): ...@@ -96,9 +93,6 @@ MediaItem::MediaItem(QObject *parent):
{ {
} }
/*!
Destructor.
*/
MediaItem::~MediaItem() MediaItem::~MediaItem()
{ {
delete d_ptr; delete d_ptr;
......
...@@ -31,11 +31,10 @@ ...@@ -31,11 +31,10 @@
// Originally this was meant to be exposed to QML side, but not anymore. // Originally this was meant to be exposed to QML side, but not anymore.
class MediaItemPrivate; class MediaItemPrivate;
class MediaItem: public QObject class MediaItem: public QObject
{ {
public: public:
enum ValueKey { enum ValueKey {
TransferType, TransferType,
Timestamp, Timestamp,
......
...@@ -156,11 +156,9 @@ public: ...@@ -156,11 +156,9 @@ public:
MediaTransferInterface::MediaTransferInterface(QObject *parent): MediaTransferInterface::MediaTransferInterface(QObject *parent):
QObject(parent), QObject(parent),
d_ptr(new MediaTransferInterfacePrivate) d_ptr(new MediaTransferInterfacePrivate)
{} {
}
/*!
Destructor.
*/
MediaTransferInterface::~MediaTransferInterface() MediaTransferInterface::~MediaTransferInterface()
{ {
delete d_ptr; delete d_ptr;
......
...@@ -38,7 +38,6 @@ class MediaTransferInterface: public QObject ...@@ -38,7 +38,6 @@ class MediaTransferInterface: public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
enum TransferStatus { enum TransferStatus {
NotStarted = TransferEngineData::NotStarted, NotStarted = TransferEngineData::NotStarted,
TransferStarted = TransferEngineData::TransferStarted, TransferStarted = TransferEngineData::TransferStarted,
...@@ -47,7 +46,6 @@ public: ...@@ -47,7 +46,6 @@ public:
TransferInterrupted = TransferEngineData::TransferInterrupted TransferInterrupted = TransferEngineData::TransferInterrupted
}; };
explicit MediaTransferInterface(QObject *parent = 0); explicit MediaTransferInterface(QObject *parent = 0);
virtual ~MediaTransferInterface(); virtual ~MediaTransferInterface();
......
...@@ -66,15 +66,10 @@ ...@@ -66,15 +66,10 @@
\value RestartSupported Boolean to indicate if cancel is supported \value RestartSupported Boolean to indicate if cancel is supported
*/ */
/*!
Default constructor.
*/
TransferDBRecord::TransferDBRecord() TransferDBRecord::TransferDBRecord()
{ {
} }
/*! /*!
Assigns \a other to this transfer db record and returns a reference to this transfer db record. 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): ...@@ -122,9 +117,6 @@ TransferDBRecord::TransferDBRecord(const TransferDBRecord &other):
{ {
} }
/*!
Destroys the transfer db record.
*/
TransferDBRecord::~TransferDBRecord() TransferDBRecord::~TransferDBRecord()
{ {
} }
......
...@@ -91,9 +91,6 @@ CallbackInterface::CallbackInterface(const QString &server, const QString &path, ...@@ -91,9 +91,6 @@ CallbackInterface::CallbackInterface(const QString &server, const QString &path,
{ {
} }
/*!
Destroys CallbackInterface object.
*/
CallbackInterface::~CallbackInterface() CallbackInterface::~CallbackInterface()
{ {
delete d_ptr; delete d_ptr;
...@@ -194,10 +191,6 @@ TransferEngineClient::TransferEngineClient(QObject *parent) : ...@@ -194,10 +191,6 @@ TransferEngineClient::TransferEngineClient(QObject *parent) :
this); this);
} }
/*!
Destructor.
*/
TransferEngineClient::~TransferEngineClient() TransferEngineClient::~TransferEngineClient()
{ {
Q_D(TransferEngineClient); Q_D(TransferEngineClient);
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
#include <QUrl> #include <QUrl>
#include "transfertypes.h" #include "transfertypes.h"
class CallbackInterfacePrivate; class CallbackInterfacePrivate;
class CallbackInterface { class CallbackInterface {
public: public:
CallbackInterface(); CallbackInterface();
...@@ -51,7 +51,6 @@ class TransferEngineClient : public QObject ...@@ -51,7 +51,6 @@ class TransferEngineClient : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
enum Status { enum Status {
TransferFinished = TransferEngineData::TransferFinished, TransferFinished = TransferEngineData::TransferFinished,
TransferCanceled = TransferEngineData::TransferCanceled, TransferCanceled = TransferEngineData::TransferCanceled,
...@@ -61,8 +60,6 @@ public: ...@@ -61,8 +60,6 @@ public:
explicit TransferEngineClient(QObject *parent = 0); explicit TransferEngineClient(QObject *parent = 0);
~TransferEngineClient(); ~TransferEngineClient();
int createDownloadEvent(const QString &displayName, int createDownloadEvent(const QString &displayName,
const QUrl &applicationIcon, const QUrl &applicationIcon,
const QUrl &serviceIcon, const QUrl &serviceIcon,
......
...@@ -104,15 +104,10 @@ TransferMethodInfo::TransferMethodInfo(const TransferMethodInfo &other): ...@@ -104,15 +104,10 @@ TransferMethodInfo::TransferMethodInfo(const TransferMethodInfo &other):
accountIcon(other.accountIcon), accountIcon(other.accountIcon),
hints(other.hints) hints(other.hints)
{ {
} }
/*!
Destroys TransferMethodInfo instance.
*/
TransferMethodInfo::~TransferMethodInfo() TransferMethodInfo::~TransferMethodInfo()
{ {
} }
/*! /*!
...@@ -199,6 +194,7 @@ QDBusArgument &operator<<(QDBusArgument &argument, const TransferMethodInfoDepre ...@@ -199,6 +194,7 @@ QDBusArgument &operator<<(QDBusArgument &argument, const TransferMethodInfoDepre
argument.endStructure(); argument.endStructure();
return argument; return argument;
} }
const QDBusArgument &operator>>(const QDBusArgument &argument, TransferMethodInfoDeprecated &info) const QDBusArgument &operator>>(const QDBusArgument &argument, TransferMethodInfoDeprecated &info)
{ {
argument.beginStructure(); argument.beginStructure();
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
namespace TransferEngineData namespace TransferEngineData
{ {
enum TransferStatus { enum TransferStatus {
Unknown, Unknown,
NotStarted, NotStarted,
...@@ -45,6 +44,5 @@ namespace TransferEngineData ...@@ -45,6 +44,5 @@ namespace TransferEngineData
Download, Download,
Sync Sync
}; };
} }
#endif // TRANSFERTYPES_H #endif // TRANSFERTYPES_H
...@@ -41,7 +41,6 @@ class TransferEngine : public QObject ...@@ -41,7 +41,6 @@ class TransferEngine : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit TransferEngine(QObject *parent = 0); explicit TransferEngine(QObject *parent = 0);
~TransferEngine(); ~TransferEngine();
......
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