and two more patches. On Sun, Nov 8, 2015 at 9:57 PM, Tomaz Canabrava <[email protected]> wrote:
> They don't like c++11 > >
From be06d0f78281a4a7b96aa8a49ce1b94441aa47a8 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava <[email protected]> Date: Sun, 8 Nov 2015 22:01:05 -0200 Subject: [PATCH 8/9] Removed C++11 from the code. Make Dirk ungrumpy Signed-off-by: Tomaz Canabrava <[email protected]> --- CMakeLists.txt | 9 +++------ desktop-widgets/mainwindow.cpp | 2 +- subsurface-core/pluginmanager.h | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d45ca43..ff3e28d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,14 +53,11 @@ execute_process( message(STATUS "Creating build files for Subsurface ${SSRF_VERSION_STRING}") if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") # using Intel C++ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 32f0d8d..b532b85 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -245,7 +245,7 @@ MainWindow::MainWindow() : QMainWindow(), if(PluginManager::instance().socialNetworkIntegrationPlugins().count()) { QMenu *connections = new QMenu(tr("Connect to")); - for(ISocialNetworkIntegration *plugin : PluginManager::instance().socialNetworkIntegrationPlugins()){ + Q_FOREACH(ISocialNetworkIntegration *plugin, PluginManager::instance().socialNetworkIntegrationPlugins()){ QAction *toggle_connection = new QAction(this); toggle_connection->setText(plugin->socialNetworkName()); toggle_connection->setIcon(QIcon(plugin->socialNetworkIcon())); diff --git a/subsurface-core/pluginmanager.h b/subsurface-core/pluginmanager.h index c494389..19e88b8 100644 --- a/subsurface-core/pluginmanager.h +++ b/subsurface-core/pluginmanager.h @@ -12,8 +12,8 @@ public: QList<ISocialNetworkIntegration*> socialNetworkIntegrationPlugins() const; private: PluginManager(); - PluginManager(const PluginManager&) = delete; - PluginManager& operator=(const PluginManager&) = delete; + PluginManager(const PluginManager&){}; + PluginManager& operator=(const PluginManager&){}; }; #endif \ No newline at end of file -- 2.6.2
From eecd7666b4cea4ceb799fcc063a34a0963d930a6 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava <[email protected]> Date: Sun, 8 Nov 2015 22:04:51 -0200 Subject: [PATCH 9/9] Link the facebook plugin against the subsurface_interface This should prevent a compile issue on mac, worked without it on linux. Signed-off-by: Tomaz Canabrava <[email protected]> --- desktop-widgets/plugins/facebook/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop-widgets/plugins/facebook/CMakeLists.txt b/desktop-widgets/plugins/facebook/CMakeLists.txt index 82a6c77..3f63a8f 100644 --- a/desktop-widgets/plugins/facebook/CMakeLists.txt +++ b/desktop-widgets/plugins/facebook/CMakeLists.txt @@ -3,5 +3,5 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_library(facebook_integration SHARED ${FACEBOOK_PLUGIN_SRCS}) -target_link_libraries(facebook_integration subsurface_corelib ${QT_LIBRARIES}) -add_dependencies(facebook_integration subsurface_corelib) \ No newline at end of file +target_link_libraries(facebook_integration subsurface_corelib subsurface_interface ${QT_LIBRARIES}) +add_dependencies(facebook_integration subsurface_corelib subsurface_interface) \ No newline at end of file -- 2.6.2
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
