Removed old strstream code and switch to sstream permanently.

Inspired by similar work on tdeadmin.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit d9b6e0bda4)
r14.0.x
Michele Calgaro 6 years ago
parent e80dd1194d
commit bd3f7cb384

@ -15,8 +15,3 @@ pkg_search_module( XXF86VM xxf86vm )
if( NOT XXF86VM_FOUND ) if( NOT XXF86VM_FOUND )
tde_message_fatal( "xxf86vm is required, but was not found on your system" ) tde_message_fatal( "xxf86vm is required, but was not found on your system" )
endif( ) endif( )
tde_save( CMAKE_REQUIRED_INCLUDES )
set( CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIRS} )
check_include_file_cxx( sstream HAVE_SSTREAM )
tde_restore( CMAKE_REQUIRED_INCLUDES )

@ -58,8 +58,3 @@ fi
if eval "test \"`echo $ac_cv_lib_vm`\" = no"; then if eval "test \"`echo $ac_cv_lib_vm`\" = no"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE kgamma" DO_NOT_COMPILE="$DO_NOT_COMPILE kgamma"
fi fi
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
KDE_CHECK_HEADERS(sstream)
AC_LANG_RESTORE

@ -30,10 +30,6 @@ install( FILES kgamma.desktop DESTINATION ${APPS_INSTALL_DIR}/.hidden )
#### kcmkgamma (module) ######################### #### kcmkgamma (module) #########################
if( HAVE_SSTREAM )
set_source_files_properties( xvidextwrap.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_SSTREAM" )
endif( )
tde_add_kpart( kcm_kgamma AUTOMOC tde_add_kpart( kcm_kgamma AUTOMOC
SOURCES SOURCES
xf86configpath.cpp xvidextwrap.cpp xf86configpath.cpp xvidextwrap.cpp

@ -28,15 +28,10 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include <sstream>
#include <config.h> #include <config.h>
#ifdef HAVE_SSTREAM
#include <sstream>
#else
#include <strstream.h>
#define istringstream istrstream
#endif
#include <kdebug.h> #include <kdebug.h>

@ -17,10 +17,6 @@ include_directories(
#### xf86gammacfg (executable) ################## #### xf86gammacfg (executable) ##################
if( HAVE_SSTREAM )
set_source_files_properties( xf86gammacfg.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_SSTREAM" )
endif( )
tde_add_executable( xf86gammacfg tde_add_executable( xf86gammacfg
SOURCES xf86gammacfg.cpp SOURCES xf86gammacfg.cpp
DESTINATION ${BIN_INSTALL_DIR} DESTINATION ${BIN_INSTALL_DIR}

@ -23,15 +23,10 @@
#include <fstream> #include <fstream>
#include <string> #include <string>
#include <vector> #include <vector>
#include <sstream>
#include <config.h> #include <config.h>
#ifdef HAVE_SSTREAM
#include <sstream>
#else
#include <strstream.h>
#define istringstream istrstream
#endif
using namespace std; using namespace std;

@ -24,12 +24,7 @@
#include <list> #include <list>
#include <string> #include <string>
#include <config.h> #include <config.h>
#ifdef HAVE_SSTREAM #include <sstream>
# include <sstream>
#else
# include <strstream>
# define ostringstream ostrstream
#endif
#define T2PMAX(a, b) ((b) < (a) ? (a) : (b)) #define T2PMAX(a, b) ((b) < (a) ? (a) : (b))
#define T2PMIN(a, b) ((a) < (b) ? (a) : (b)) #define T2PMIN(a, b) ((a) < (b) ? (a) : (b))

Loading…
Cancel
Save