Skip to content

Commit

Permalink
Merge branch 'third_party_plugin_example' into 'master'
Browse files Browse the repository at this point in the history
Third party translation example docs + cosmetics

See merge request mer-core/transfer-engine!8
  • Loading branch information
pvuorela committed Dec 11, 2018
2 parents 2474510 + c384d14 commit 8ef3989
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 43 deletions.
12 changes: 10 additions & 2 deletions example/example.pro
Expand Up @@ -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

Expand All @@ -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
Expand Down
6 changes: 0 additions & 6 deletions lib/mediaitem.cpp
Expand Up @@ -30,9 +30,6 @@
class MediaItemPrivate
{
public:
MediaItemPrivate()
{}

QMap <MediaItem::ValueKey, QVariant> m_values;
};

Expand Down Expand Up @@ -96,9 +93,6 @@ MediaItem::MediaItem(QObject *parent):
{
}

/*!
Destructor.
*/
MediaItem::~MediaItem()
{
delete d_ptr;
Expand Down
3 changes: 1 addition & 2 deletions lib/mediaitem.h
Expand Up @@ -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,
Expand Down
6 changes: 2 additions & 4 deletions lib/mediatransferinterface.cpp
Expand Up @@ -156,11 +156,9 @@ class MediaTransferInterfacePrivate
MediaTransferInterface::MediaTransferInterface(QObject *parent):
QObject(parent),
d_ptr(new MediaTransferInterfacePrivate)
{}
{
}

/*!
Destructor.
*/
MediaTransferInterface::~MediaTransferInterface()
{
delete d_ptr;
Expand Down
2 changes: 0 additions & 2 deletions lib/mediatransferinterface.h
Expand Up @@ -38,7 +38,6 @@ class MediaTransferInterface: public QObject
{
Q_OBJECT
public:

enum TransferStatus {
NotStarted = TransferEngineData::NotStarted,
TransferStarted = TransferEngineData::TransferStarted,
Expand All @@ -47,7 +46,6 @@ class MediaTransferInterface: public QObject
TransferInterrupted = TransferEngineData::TransferInterrupted
};


explicit MediaTransferInterface(QObject *parent = 0);
virtual ~MediaTransferInterface();

Expand Down
8 changes: 0 additions & 8 deletions lib/transferdbrecord.cpp
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -122,9 +117,6 @@ TransferDBRecord::TransferDBRecord(const TransferDBRecord &other):
{
}

/*!
Destroys the transfer db record.
*/
TransferDBRecord::~TransferDBRecord()
{
}
Expand Down
7 changes: 0 additions & 7 deletions lib/transferengineclient.cpp
Expand Up @@ -91,9 +91,6 @@ CallbackInterface::CallbackInterface(const QString &server, const QString &path,
{
}

/*!
Destroys CallbackInterface object.
*/
CallbackInterface::~CallbackInterface()
{
delete d_ptr;
Expand Down Expand Up @@ -194,10 +191,6 @@ TransferEngineClient::TransferEngineClient(QObject *parent) :
this);
}


/*!
Destructor.
*/
TransferEngineClient::~TransferEngineClient()
{
Q_D(TransferEngineClient);
Expand Down
5 changes: 1 addition & 4 deletions lib/transferengineclient.h
Expand Up @@ -31,8 +31,8 @@
#include <QUrl>
#include "transfertypes.h"


class CallbackInterfacePrivate;

class CallbackInterface {
public:
CallbackInterface();
Expand All @@ -51,7 +51,6 @@ class TransferEngineClient : public QObject
{
Q_OBJECT
public:

enum Status {
TransferFinished = TransferEngineData::TransferFinished,
TransferCanceled = TransferEngineData::TransferCanceled,
Expand All @@ -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,
Expand Down
6 changes: 1 addition & 5 deletions lib/transfermethodinfo.cpp
Expand Up @@ -104,15 +104,10 @@ TransferMethodInfo::TransferMethodInfo(const TransferMethodInfo &other):
accountIcon(other.accountIcon),
hints(other.hints)
{

}

/*!
Destroys TransferMethodInfo instance.
*/
TransferMethodInfo::~TransferMethodInfo()
{

}

/*!
Expand Down Expand Up @@ -199,6 +194,7 @@ QDBusArgument &operator<<(QDBusArgument &argument, const TransferMethodInfoDepre
argument.endStructure();
return argument;
}

const QDBusArgument &operator>>(const QDBusArgument &argument, TransferMethodInfoDeprecated &info)
{
argument.beginStructure();
Expand Down
2 changes: 0 additions & 2 deletions lib/transfertypes.h
Expand Up @@ -29,7 +29,6 @@

namespace TransferEngineData
{

enum TransferStatus {
Unknown,
NotStarted,
Expand All @@ -45,6 +44,5 @@ namespace TransferEngineData
Download,
Sync
};

}
#endif // TRANSFERTYPES_H
1 change: 0 additions & 1 deletion src/transferengine.h
Expand Up @@ -41,7 +41,6 @@ class TransferEngine : public QObject
{
Q_OBJECT
public:

explicit TransferEngine(QObject *parent = 0);
~TransferEngine();

Expand Down

0 comments on commit 8ef3989

Please sign in to comment.