Skip to content
Permalink
Browse files

remove more msvc deprecation pragmas

  • Loading branch information
jef-n committed Mar 4, 2014
1 parent 100f972 commit 284685715bc5db2f6f4361668125b2a74c22c78f
@@ -498,6 +498,18 @@ if(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8)
SET_TARGET_PROPERTIES(qgis_app PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
ENDIF(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8)

# disable deprecation warnings for classes re-exporting deprecated methods
IF(MSVC)
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_BINARY_DIR}/src/app/moc_qgisappinterface.cxx
PROPERTIES COMPILE_FLAGS "-wd4996")
ELSE(MSVC)
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_BINARY_DIR}/src/app/moc_qgisappinterface.cxx
PROPERTIES COMPILE_FLAGS "-w -Wno-deprecated-declarations")
ENDIF(MSVC)


TARGET_LINK_LIBRARIES(${QGIS_APP_NAME}
${QWT_LIBRARY}
${QT_QTSQL_LIBRARY}
@@ -24,10 +24,6 @@

class QgisApp;

#ifdef _MSC_VER
# pragma warning( push )
# pragma warning( disable: 4996 ) // declared deprecated
#endif

/** \class QgisAppInterface
* \brief Interface class to provide access to private methods in QgisApp
@@ -157,6 +153,9 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
* @param useQgisDocDirectory If true, the URL will be formed by concatenating
* url to the QGIS documentation directory path (<prefix>/share/doc)
*/
#ifndef Q_MOC_RUN
Q_DECL_DEPRECATED
#endif
void openURL( QString url, bool useQgisDocDirectory = true );

/** Return a pointer to the map canvas used by qgisapp */
@@ -504,8 +503,4 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
QgsAppPluginManagerInterface pluginManagerIface;
};

#ifdef _MSC_VER
# pragma warning( pop )
#endif

#endif //#define QGISAPPINTERFACE_H
@@ -45,10 +45,6 @@
# define NMEA_UNI
#endif

#if defined(NMEA_WIN) && (_MSC_VER >= 1400)
# pragma warning(disable: 4996) /* declared deprecated */
#endif

#if defined(_MSC_VER)
# define NMEA_POSIX(x) _##x
# define NMEA_INLINE __inline
@@ -432,7 +432,7 @@ ELSE(MSVC)
${CMAKE_BINARY_DIR}/src/gui/moc_qgisinterface.cxx
${CMAKE_BINARY_DIR}/src/gui/moc_qgsgenericprojectionselector.cxx
${CMAKE_BINARY_DIR}/src/gui/moc_qgsprojectionselector.cxx
PROPERTIES COMPILE_FLAGS "-w")
PROPERTIES COMPILE_FLAGS "-w -Wno-deprecated-declarations")
ENDIF(MSVC)

#############################################################
@@ -43,10 +43,6 @@ class QgsVectorLayerTools;

#include <qgis.h>

#ifdef _MSC_VER
# pragma warning( push )
# pragma warning( disable: 4996 ) // was declared deprecated
#endif

/** \ingroup gui
* QgisInterface
@@ -531,6 +527,9 @@ class GUI_EXPORT QgisInterface : public QObject
virtual QAction *actionCancelAllEdits() = 0;
virtual QAction *actionLayerSaveAs() = 0;
/** @note deprecated in 2.4 - returns null pointer */
#ifndef Q_MOC_RUN
Q_DECL_DEPRECATED
#endif
virtual QAction *actionLayerSelectionSaveAs() = 0;
virtual QAction *actionRemoveLayer() = 0;
/** @note added in 1.9 */
@@ -625,11 +624,6 @@ class GUI_EXPORT QgisInterface : public QObject
void newProjectCreated();
};

#ifdef _MSC_VER
# pragma warning( pop )
# pragma warning( disable: 4190 )
#endif

// FIXME: also in core/qgis.h
#ifndef QGISEXTERN
#ifdef WIN32
@@ -202,7 +202,7 @@ void QgsGrassTools::runModule( QString name, bool direct )
if ( name.length() == 0 )
return; // Section

#ifdef HAVE_OPENPTY
#if defined(HAVE_OPENPTY) && !defined(Q_OS_WIN)
QgsGrassShell* sh = 0;
#endif

@@ -211,7 +211,7 @@ void QgsGrassTools::runModule( QString name, bool direct )
QWidget *m;
if ( name == "shell" )
{
#ifdef WIN32
#ifdef Q_OS_WIN
QgsGrass::putEnv( "GRASS_HTML_BROWSER", QgsApplication::libexecPath() + "grass/bin/qgis.g.browser" );
if ( !QProcess::startDetached( getenv( "COMSPEC" ) ) )
{
@@ -227,7 +227,7 @@ void QgsGrassTools::runModule( QString name, bool direct )
QMessageBox::warning( 0, tr( "Warning" ), tr( "GRASS Shell is not compiled." ) );
#endif // HAVE_OPENPTY

#endif // ! WIN32
#endif // ! Q_OS_WIN
}
else
{
@@ -471,7 +471,7 @@ QgsGrassTools::~QgsGrassTools()

QString QgsGrassTools::appDir( void )
{
#if defined(WIN32)
#if defined(Q_OS_WIN)
return QgsGrass::shortPath( QgsApplication::applicationDirPath() );
#else
return QgsApplication::applicationDirPath();

0 comments on commit 2846857

Please sign in to comment.
You can’t perform that action at this time.