mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 19:03:23 +00:00
Make it possible to connect to facebook again
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
70e6840d51
commit
486857f2b4
4 changed files with 10 additions and 2 deletions
|
@ -260,6 +260,7 @@ MainWindow::MainWindow() : QMainWindow(),
|
|||
toggle_connection->setText(plugin->socialNetworkName());
|
||||
toggle_connection->setIcon(QIcon(plugin->socialNetworkIcon()));
|
||||
toggle_connection->setData(QVariant::fromValue(plugin));
|
||||
connect(toggle_connection, &QAction::triggered, [plugin](bool triggered){ plugin->requestLogin(); });
|
||||
|
||||
QAction *share_on = new QAction(this);
|
||||
share_on->setText(plugin->socialNetworkName());
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#include "facebook_integration.h"
|
||||
#include "facebookconnectwidget.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
FacebookPlugin::FacebookPlugin(QObject* parent): QObject(parent)
|
||||
{
|
||||
|
@ -12,7 +15,8 @@ bool FacebookPlugin::isConnected()
|
|||
|
||||
void FacebookPlugin::requestLogin()
|
||||
{
|
||||
|
||||
FacebookConnectWidget connectDialog;
|
||||
connectDialog.exec();
|
||||
}
|
||||
|
||||
void FacebookPlugin::requestLogoff()
|
||||
|
|
|
@ -275,6 +275,7 @@ void FacebookManager::sendDive()
|
|||
}
|
||||
|
||||
FacebookConnectWidget::FacebookConnectWidget(QWidget *parent) : QDialog(parent), ui(new Ui::FacebookConnectWidget) {
|
||||
ui->setupUi(this);
|
||||
FacebookManager *fb = FacebookManager::instance();
|
||||
facebookWebView = new QWebView(this);
|
||||
ui->fbWebviewContainer->layout()->addWidget(facebookWebView);
|
||||
|
|
|
@ -40,8 +40,10 @@ void PluginManager::loadPlugins()
|
|||
if(!plugin)
|
||||
continue;
|
||||
|
||||
if (ISocialNetworkIntegration *social = qobject_cast<ISocialNetworkIntegration*>(plugin))
|
||||
if (ISocialNetworkIntegration *social = qobject_cast<ISocialNetworkIntegration*>(plugin)) {
|
||||
qDebug() << "Adding the plugin: " << social->socialNetworkName();
|
||||
_socialNetworks.push_back(social);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue