mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									f66e3a4489
								
							
						
					
					
						commit
						125217074e
					
				
					 2 changed files with 21 additions and 2 deletions
				
			
		|  | @ -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); | ||||
|  |  | |||
|  | @ -195,6 +195,8 @@ slots: | |||
| 	void disableShortcuts(bool disablePaste = true); | ||||
| 	void enableShortcuts(); | ||||
| 
 | ||||
| 	void socialNetworkRequestConnect(); | ||||
| 	void socialNetworkRequestUpload(); | ||||
| private: | ||||
| 	Ui::MainWindow ui; | ||||
| 	QAction *actionNextDive; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue