Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glibmm-2.68 support #50

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMake/CheckSigrokFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function(check_libsigrok_features additional_header additional_lib)
include(CheckCXXSourceCompiles)
include(CMakePushCheckState)
cmake_push_check_state()
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
set(CMAKE_REQUIRED_INCLUDES "${additional_header}")
set(CMAKE_REQUIRED_LIBRARIES "${additional_lib}")
set(CMAKE_REQUIRED_QUIET 1)
Expand Down
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()

# SmuView, QCodeEditor and pybind11 only need C++11
set(CMAKE_CXX_STANDARD 11)
# SmuView, QCodeEditor and pybind11 only need C++17
set(CMAKE_CXX_STANDARD 17)

if(WIN32)
# On Windows/MinGW we need to statically link to libraries.
Expand Down Expand Up @@ -81,7 +81,7 @@ message(STATUS "STATIC_PKGDEPS_LIBS: ${STATIC_PKGDEPS_LIBS}")
#-------------------------------------------------------------------------------

list(APPEND PKGDEPS glib-2.0>=2.28.0)
list(APPEND PKGDEPS glibmm-2.4>=2.28.0)
list(APPEND PKGDEPS glibmm-2.68>=2.68.0)

set(LIBSR_CXX_BINDING "libsigrokcxx>=0.5.2")
list(APPEND PKGDEPS "${LIBSR_CXX_BINDING}")
Expand Down Expand Up @@ -122,7 +122,7 @@ find_package(Qwt 6.1.2 REQUIRED)
# specify any boost libraries
find_package(Boost 1.54 REQUIRED)

# Find the platform's thread library (needed for C++11 threads).
# Find the platform's thread library (needed for C++17 threads).
# This will set ${CMAKE_THREAD_LIBS_INIT} to the correct, OS-specific value.
find_package(Threads REQUIRED)

Expand Down Expand Up @@ -193,7 +193,7 @@ endif()
message(STATUS "${SV_TITLE} version: ${SV_VERSION_STRING}")

# Library versions
set(SV_GLIBMM_VERSION ${PKGDEPS_glibmm-2.4_VERSION})
set(SV_GLIBMM_VERSION ${PKGDEPS_glibmm-2.68_VERSION})
set(SV_PYBIND11_VERSION ${PYBIND11_VERSION_MAJOR}.${PYBIND11_VERSION_MINOR}.${PYBIND11_VERSION_PATCH})
if(MINGW)
# MXE workaround: Use PkgConfig to find Python
Expand Down Expand Up @@ -383,7 +383,7 @@ qt5_add_resources(smuview_RESOURCES_RCC ${smuview_RESOURCES})
add_definitions(-DQT_NO_KEYWORDS)
add_definitions(-D__STDC_LIMIT_MACROS)
add_definitions(-Wall -Wextra -Woverloaded-virtual -Wdeprecated-declarations) # -Weffc++ -Wconversion -Wsign-conversion)
add_definitions(-std=c++11)
add_definitions(-std=c++17)
add_definitions(-DBOOST_MATH_DISABLE_FLOAT128=1)

if(NOT DISABLE_WERROR)
Expand Down
3 changes: 2 additions & 1 deletion src/data/properties/doublerangeproperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ void DoubleRangeProperty::change_value(const QVariant &qvar)
Q_EMIT value_changed(qvar);
}

void DoubleRangeProperty::on_value_changed(Glib::VariantBase gvar)
void DoubleRangeProperty::on_value_changed(Glib::VariantBase gvar_base)
{
auto gvar = Glib::VariantBase::cast_dynamic<Glib::VariantContainerBase>(gvar_base);
Glib::VariantIter iter(gvar);
iter.next_value(gvar);
double low =
Expand Down
3 changes: 2 additions & 1 deletion src/data/properties/rationalproperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ void RationalProperty::change_value(const QVariant &qvar)
Q_EMIT value_changed(qvar);
}

void RationalProperty::on_value_changed(Glib::VariantBase gvar)
void RationalProperty::on_value_changed(Glib::VariantBase gvar_base)
{
auto gvar = Glib::VariantBase::cast_dynamic<Glib::VariantContainerBase>(gvar_base);
Glib::VariantIter iter(gvar);
iter.next_value(gvar);
uint64_t p =
Expand Down
3 changes: 2 additions & 1 deletion src/data/properties/uint64rangeproperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ void UInt64RangeProperty::change_value(const QVariant &qvar)
Q_EMIT value_changed(qvar);
}

void UInt64RangeProperty::on_value_changed(Glib::VariantBase gvar)
void UInt64RangeProperty::on_value_changed(Glib::VariantBase gvar_base)
{
auto gvar = Glib::VariantBase::cast_dynamic<Glib::VariantContainerBase>(gvar_base);
Glib::VariantIter iter(gvar);
iter.next_value(gvar);
uint64_t low =
Expand Down
5 changes: 5 additions & 0 deletions src/devices/configurable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ using std::string;
using std::vector;
using sv::devices::ConfigKey;

QDebug operator << (QDebug dbg, Glib::VariantBase const &v)
{
return dbg << v.print().c_str();
}

namespace sv {
namespace devices {

Expand Down