summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-11-08 21:50:12 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-08 15:58:44 -0800
commit125217074e61ff25b901a05004208ccb21f121ce (patch)
tree2d40e66f9d347cc0c0d234442be58d393fa63da3 /desktop-widgets
parentf66e3a4489b0739ca5ca1e1ebc7f26617f5f4017 (diff)
downloadsubsurface-125217074e61ff25b901a05004208ccb21f121ce.tar.gz
Remove lambdas: they don't work on OSX 10.7
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/mainwindow.cpp21
-rw-r--r--desktop-widgets/mainwindow.h2
2 files changed, 21 insertions, 2 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 14ba96772..32f0d8d07 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -250,7 +250,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(); });
+ connect(toggle_connection, SIGNAL(triggered()), this, SLOT(socialNetworkRequestConnect()));
QAction *share_on = new QAction(this);
share_on->setText(plugin->socialNetworkName());
@@ -258,7 +258,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(); });
+ connect(share_on, SIGNAL(triggered()), this, SLOT(socialNetworkRequestUpload()));
}
ui.menuShare_on->addSeparator();
ui.menuShare_on->addMenu(connections);
@@ -276,6 +276,23 @@ MainWindow::~MainWindow()
m_Instance = NULL;
}
+void MainWindow::socialNetworkRequestConnect()
+{
+ QAction *action = qobject_cast<QAction*>(sender());
+ ISocialNetworkIntegration *plugin = action->data().value<ISocialNetworkIntegration*>();
+ if (plugin->isConnected())
+ plugin->requestLogoff();
+ else
+ plugin->requestLogin();
+}
+
+void MainWindow::socialNetworkRequestUpload()
+{
+ QAction *action = qobject_cast<QAction*>(sender());
+ ISocialNetworkIntegration *plugin = action->data().value<ISocialNetworkIntegration*>();
+ plugin->requestUpload();
+}
+
void MainWindow::setStateProperties(const QByteArray& state, const PropertyList& tl, const PropertyList& tr, const PropertyList& bl, const PropertyList& br)
{
stateProperties[state] = PropertiesForQuadrant(tl, tr, bl, br);
diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h
index 0d431b8b5..fc63c5740 100644
--- a/desktop-widgets/mainwindow.h
+++ b/desktop-widgets/mainwindow.h
@@ -195,6 +195,8 @@ slots:
void disableShortcuts(bool disablePaste = true);
void enableShortcuts();
+ void socialNetworkRequestConnect();
+ void socialNetworkRequestUpload();
private:
Ui::MainWindow ui;
QAction *actionNextDive;