Change from uploadCurrentDive to requestUpload call

Since we can't forbit the plugins to upload more than just the
current dive, it's better to change the name of the call.
also add a stub to make sure it's calling the right method inside
the plugin.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-11-08 10:58:59 -02:00 committed by Dirk Hohndel
parent 486857f2b4
commit 287977b04c
4 changed files with 5 additions and 4 deletions

View file

@ -268,6 +268,7 @@ MainWindow::MainWindow() : QMainWindow(),
share_on->setData(QVariant::fromValue(plugin));
ui.menuShare_on->addAction(share_on);
connections->addAction(toggle_connection);
connect(share_on, &QAction::triggered, [plugin](bool triggered) { plugin->requestUpload(); }
}
ui.menuShare_on->addSeparator();
ui.menuShare_on->addMenu(connections);

View file

@ -34,7 +34,7 @@ QString FacebookPlugin::socialNetworkName() const
return tr("Facebook");
}
void FacebookPlugin::uploadCurrentDive()
void FacebookPlugin::requestUpload()
{
qDebug() << "Upload Requested";
}

View file

@ -15,7 +15,7 @@ public:
virtual void requestLogoff();
virtual QString socialNetworkIcon() const;
virtual QString socialNetworkName() const;
virtual void uploadCurrentDive();
virtual void requestUpload();
};
#endif

View file

@ -64,7 +64,7 @@ public:
* to update to the social network. All widget stuff related to sendint
* dive information should be executed inside this function.
*/
virtual void uploadCurrentDive() = 0;
virtual void requestUpload() = 0;
};
Q_DECLARE_INTERFACE(ISocialNetworkIntegration, "org.subsurface.ISocialNetworkIntegration.v1")