diff --git a/CMakeLists.txt b/CMakeLists.txt index 234d55a0d77..2d7d6c85093 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -219,20 +219,44 @@ SET (HAVE_MSSQL TRUE) ############################################################# # search for Qt4 SET(QT_MIN_VERSION 4.7.0) -FIND_PACKAGE(Qt4 ${QT_MIN_VERSION} REQUIRED) -MESSAGE(STATUS "Found Qt version: ${QTVERSION}") -SET(QT_USE_QTXML 1) -SET(QT_USE_QTNETWORK 1) -SET(QT_USE_QTSVG 1) -SET(QT_USE_QTSQL 1) -SET(QT_USE_QTWEBKIT 1) -IF (WITH_CUSTOM_WIDGETS) - SET(QT_USE_QTDESIGNER 1) -ENDIF (WITH_CUSTOM_WIDGETS) +SET (ENABLE_QT5 FALSE CACHE BOOL "If enabled will try to find Qt5 before looking for Qt4") +IF (ENABLE_QT5) + FIND_PACKAGE(Qt5Core QUIET) + FIND_PACKAGE(Qt5Gui REQUIRED) + FIND_PACKAGE(Qt5Widgets REQUIRED) + FIND_PACKAGE(Qt5Network REQUIRED) + FIND_PACKAGE(Qt5Xml REQUIRED) + FIND_PACKAGE(Qt5Svg REQUIRED) + FIND_PACKAGE(Qt5Concurrent REQUIRED) + FIND_PACKAGE(Qt5PrintSupport REQUIRED) + FIND_PACKAGE(Qt5WebKit REQUIRED) + FIND_PACKAGE(Qt5WebKitWidgets REQUIRED) + FIND_PACKAGE(Qt5Test REQUIRED) + FIND_PACKAGE(Qt5UiTools REQUIRED) + FIND_PACKAGE(Qt5Script REQUIRED) + FIND_PACKAGE(Qt5Sql REQUIRED) + SET(QT5_BUILD TRUE) -IF (NOT QT_QTXML_FOUND OR NOT QT_QTNETWORK_FOUND OR NOT QT_QTSVG_FOUND OR NOT QT_QTSQL_FOUND OR NOT QT_QTWEBKIT_FOUND OR (WITH_CUSTOM_WIDGETS AND NOT QT_QTDESIGNER_FOUND)) - MESSAGE(SEND_ERROR "Some Qt4 modules haven't been found!") -ENDIF (NOT QT_QTXML_FOUND OR NOT QT_QTNETWORK_FOUND OR NOT QT_QTSVG_FOUND OR NOT QT_QTSQL_FOUND OR NOT QT_QTWEBKIT_FOUND OR (WITH_CUSTOM_WIDGETS AND NOT QT_QTDESIGNER_FOUND)) + INCLUDE("cmake/modules/ECMQt4To5Porting.cmake") +ELSE() + FIND_PACKAGE(Qt4 ${QT_MIN_VERSION} REQUIRED) + SET(QT_USE_QTXML 1) + SET(QT_USE_QTNETWORK 1) + SET(QT_USE_QTSVG 1) + SET(QT_USE_QTSQL 1) + SET(QT_USE_QTWEBKIT 1) + IF (WITH_CUSTOM_WIDGETS) + SET(QT_USE_QTDESIGNER 1) + ENDIF (WITH_CUSTOM_WIDGETS) + + IF (NOT QT_QTXML_FOUND OR NOT QT_QTNETWORK_FOUND OR NOT QT_QTSVG_FOUND OR NOT QT_QTSQL_FOUND OR NOT QT_QTWEBKIT_FOUND OR (WITH_CUSTOM_WIDGETS AND NOT QT_QTDESIGNER_FOUND)) + MESSAGE(SEND_ERROR "Some Qt4 modules haven't been found!") + ENDIF (NOT QT_QTXML_FOUND OR NOT QT_QTNETWORK_FOUND OR NOT QT_QTSVG_FOUND OR NOT QT_QTSQL_FOUND OR NOT QT_QTWEBKIT_FOUND OR (WITH_CUSTOM_WIDGETS AND NOT QT_QTDESIGNER_FOUND)) + + INCLUDE( ${QT_USE_FILE} ) +ENDIF() + +MESSAGE(STATUS "Found Qt version: ${QTVERSION}") IF (WITH_QTMOBILITY) FIND_PACKAGE(QtMobility 1.1.0) @@ -282,8 +306,6 @@ IF (SUPPRESS_QT_WARNINGS) INCLUDE_DIRECTORIES(SYSTEM ${QT_INCLUDE_DIR}) ENDIF (SUPPRESS_QT_WARNINGS) -INCLUDE( ${QT_USE_FILE} ) - # Disable automatic conversion from QString to ASCII 8-bit strings (char *) # (Keeps code compatible with Qt/Mac/64bit) ADD_DEFINITIONS(-DQT_NO_CAST_TO_ASCII) diff --git a/cmake/modules/ECMQt4To5Porting.cmake b/cmake/modules/ECMQt4To5Porting.cmake new file mode 100644 index 00000000000..53e291d222e --- /dev/null +++ b/cmake/modules/ECMQt4To5Porting.cmake @@ -0,0 +1,245 @@ +#============================================================================= +# Copyright 2005-2011 Kitware, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of Kitware, Inc. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#============================================================================= + +# The automoc_qt4 macro is superceded by CMAKE_AUTOMOC from CMake 2.8.6 +# A Qt 5 version is not provided by CMake or Qt. + +include(MacroAddFileDependencies) + +MACRO (QT4_GET_MOC_FLAGS _moc_flags) + SET(${_moc_flags}) + GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES) + + FOREACH(_current ${_inc_DIRS}) + IF("${_current}" MATCHES "\\.framework/?$") + STRING(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}") + SET(${_moc_flags} ${${_moc_flags}} "-F${framework_path}") + ELSE("${_current}" MATCHES "\\.framework/?$") + SET(${_moc_flags} ${${_moc_flags}} "-I${_current}") + ENDIF("${_current}" MATCHES "\\.framework/?$") + ENDFOREACH(_current ${_inc_DIRS}) + + GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS) + FOREACH(_current ${_defines}) + SET(${_moc_flags} ${${_moc_flags}} "-D${_current}") + ENDFOREACH(_current ${_defines}) + + IF(Q_OS_WIN) + SET(${_moc_flags} ${${_moc_flags}} -DWIN32) + ENDIF(Q_OS_WIN) + +ENDMACRO(QT4_GET_MOC_FLAGS) + +# helper macro to set up a moc rule +MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options) + # For Windows, create a parameters file to work around command line length limit + IF (WIN32) + # Pass the parameters in a file. Set the working directory to + # be that containing the parameters file and reference it by + # just the file name. This is necessary because the moc tool on + # MinGW builds does not seem to handle spaces in the path to the + # file given with the @ syntax. + GET_FILENAME_COMPONENT(_moc_outfile_name "${outfile}" NAME) + GET_FILENAME_COMPONENT(_moc_outfile_dir "${outfile}" PATH) + IF(_moc_outfile_dir) + SET(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir}) + ENDIF(_moc_outfile_dir) + SET (_moc_parameters_file ${outfile}_parameters) + SET (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}") + STRING (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}") + FILE (WRITE ${_moc_parameters_file} "${_moc_parameters}") + ADD_CUSTOM_COMMAND(OUTPUT ${outfile} + COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters + DEPENDS ${infile} + ${_moc_working_dir} + VERBATIM) + ELSE (WIN32) + ADD_CUSTOM_COMMAND(OUTPUT ${outfile} + COMMAND ${QT_MOC_EXECUTABLE} + ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile} + DEPENDS ${infile} VERBATIM) + ENDIF (WIN32) +ENDMACRO (QT4_CREATE_MOC_COMMAND) + + +MACRO(QT4_AUTOMOC) + QT4_GET_MOC_FLAGS(_moc_INCS) + + SET(_matching_FILES ) + FOREACH (_current_FILE ${ARGN}) + + GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) + # if "SKIP_AUTOMOC" is set to true, we will not handle this file here. + # This is required to make uic work correctly: + # we need to add generated .cpp files to the sources (to compile them), + # but we cannot let automoc handle them, as the .cpp files don't exist yet when + # cmake is run for the very first time on them -> however the .cpp files might + # exist at a later run. at that time we need to skip them, so that we don't add two + # different rules for the same moc file + GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC) + + IF ( NOT _skip AND EXISTS ${_abs_FILE} ) + + FILE(READ ${_abs_FILE} _contents) + + GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH) + + STRING(REGEX MATCHALL "# *include +[^ ]+\\.moc[\">]" _match "${_contents}") + IF(_match) + FOREACH (_current_MOC_INC ${_match}) + STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}") + + GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE) + IF(EXISTS ${_abs_PATH}/${_basename}.hpp) + SET(_header ${_abs_PATH}/${_basename}.hpp) + ELSE(EXISTS ${_abs_PATH}/${_basename}.hpp) + SET(_header ${_abs_PATH}/${_basename}.h) + ENDIF(EXISTS ${_abs_PATH}/${_basename}.hpp) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC}) + QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "") + MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc}) + ENDFOREACH (_current_MOC_INC) + ENDIF(_match) + ENDIF ( NOT _skip AND EXISTS ${_abs_FILE} ) + ENDFOREACH (_current_FILE) +ENDMACRO(QT4_AUTOMOC) + + +# Portability helpers. + +set(QT_QTGUI_LIBRARIES + ${Qt5Gui_LIBRARIES} + ${Qt5Widgets_LIBRARIES} + ${Qt5PrintSupport_LIBRARIES} + ${Qt5Svg_LIBRARIES} +) + +set(QT_INCLUDES + ${Qt5Gui_INCLUDE_DIRS} + ${Qt5Widgets_INCLUDE_DIRS} + ${Qt5PrintSupport_INCLUDE_DIRS} + ${Qt5Svg_INCLUDE_DIRS} +) +set(QT_QTGUI_LIBRARY ${QT_QTGUI_LIBRARIES}) + +set(_qt_modules + Core + Declarative + Widgets + Script + ScriptTools + Network + Test + Designer + Concurrent + Xml + XmlPatterns + UiTools + Qml + Quick1 + WebKit + WebKitWidgets + Sql + OpenGL +) + +foreach(_module ${_qt_modules}) + string(TOUPPER ${_module} _module_upper) + set(QT_QT${_module_upper}_LIBRARIES ${Qt5${_module}_LIBRARIES}) + set(QT_QT${_module_upper}_LIBRARY ${QT_QT${_module_upper}_LIBRARIES}) + list(APPEND QT_INCLUDES ${Qt5${_module}_INCLUDE_DIRS}) + set(QT_QT${_module_upper}_FOUND ${Qt5${_module}_FOUND}) +endforeach() + +list(APPEND QT_QTCORE_LIBRARIES ${Qt5Concurrent_LIBRARIES}) +list(APPEND QT_QTCORE_LIBRARY ${Qt5Concurrent_LIBRARIES}) + +list(APPEND QT_QTWEBKIT_LIBRARIES ${Qt5WebKitWidgets_LIBRARIES}) +list(APPEND QT_QTWEBKIT_LIBRARY ${Qt5WebKitWidgets_LIBRARIES}) + +set(QT_QTDECLARATIVE_LIBRARIES ${Qt5Quick1_LIBRARIES}) +set(QT_QTDECLARATIVE_LIBRARY ${Qt5Quick1_LIBRARIES}) + +set(QT_LRELEASE_EXECUTABLE lrelease-qt5) +set(QT_LUPDATE_EXECUTABLE lupdate-qt5) + +set(QT_INSTALL_PREFIX ${_qt5Core_install_prefix}) + +get_target_property(QT_QMAKE_EXECUTABLE Qt5::qmake LOCATION) +set(QT_RCC_EXECUTABLE Qt5::rcc LOCATION) +if (TARGET Qt5::uic) + get_target_property(QT_UIC_EXECUTABLE Qt5::uic LOCATION) +endif() + + +if (TARGET Qt5::qdbuscpp2xml) + get_target_property(QT_QDBUSCPP2XML_EXECUTABLE Qt5::qdbuscpp2xml LOCATION) +endif() + +if (TARGET Qt5::qdbusxml2cpp) + get_target_property(QT_QDBUSXML2CPP_EXECUTABLE Qt5::qdbusxml2cpp LOCATION) +endif() + +add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0) + +macro(qt4_wrap_ui) + qt5_wrap_ui(${ARGN}) +endmacro() + +macro(qt4_wrap_cpp) + qt5_wrap_cpp(${ARGN}) +endmacro() + +macro(qt4_generate_moc) + qt5_generate_moc(${ARGN}) +endmacro() + +macro(qt4_add_dbus_adaptor) + qt5_add_dbus_adaptor(${ARGN}) +endmacro() + +macro(qt4_add_dbus_interfaces) + qt5_add_dbus_interfaces(${ARGN}) +endmacro() + +macro(qt4_add_dbus_interface) + qt5_add_dbus_interface(${ARGN}) +endmacro() + +macro(qt4_generate_dbus_interface) + qt5_generate_dbus_interface(${ARGN}) +endmacro() + +macro(qt4_add_resources) + qt5_add_resources(${ARGN}) +endmacro() + diff --git a/src/app/main.cpp b/src/app/main.cpp index 28238cadc01..c693b3ab8f3 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index ad8c4fa05d5..0e2f2c2bc91 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -94,7 +94,6 @@ SET(QGIS_CORE_SRCS qgsgeometryvalidator.cpp qgsgml.cpp qgsgmlschema.cpp - qgshttptransaction.cpp qgslabel.cpp qgslabelattributes.cpp qgslabelsearchtree.cpp @@ -268,9 +267,14 @@ SET(QGIS_CORE_SRCS raster/qgssinglebandpseudocolorrenderer.cpp raster/qgsbrightnesscontrastfilter.cpp raster/qgshuesaturationfilter.cpp - ) +IF (NOT QT5_BUILD) + SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS} + qgshttptransaction.cpp + ) +ENDIF (NOT QT5_BUILD) + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # spatialindex headers produce warnings SET_SOURCE_FILES_PROPERTIES(qgsspatialindex.cpp PROPERTIES COMPILE_FLAGS -Wno-overloaded-virtual) @@ -351,7 +355,6 @@ SET(QGIS_CORE_MOC_HDRS qgsdataprovider.h qgsgml.h qgsgmlschema.h - qgshttptransaction.h qgsmaplayer.h qgsmaplayerlegend.h qgsmaplayerregistry.h @@ -428,6 +431,12 @@ SET(QGIS_CORE_MOC_HDRS layertree/qgslayertreeregistrybridge.h ) +IF (NOT QT5_BUILD) + SET(QGIS_CORE_MOC_HDRS ${QGIS_CORE_MOC_HDRS} + qgshttptransaction.h + ) +ENDIF (NOT QT5_BUILD) + IF (WITH_INTERNAL_QEXTSERIALPORT) SET(QGIS_CORE_MOC_HDRS ${QGIS_CORE_MOC_HDRS} gps/qextserialport/qextserialport.h @@ -493,7 +502,6 @@ SET(QGIS_CORE_HDRS qgsgml.h qgsgmlschema.h qgsgeometrycache.h - qgshttptransaction.h qgslabel.h qgslabelattributes.h qgslabelsearchtree.h @@ -664,6 +672,12 @@ SET(QGIS_CORE_HDRS layertree/qgslayertreeutils.h ) +IF (NOT QT5_BUILD) + SET(QGIS_CORE_HDRS ${QGIS_CORE_HDRS} + qgshttptransaction.h + ) +ENDIF (NOT QT5_BUILD) + IF (QT_MOBILITY_LOCATION_FOUND) SET(QGIS_CORE_HDRS ${QGIS_CORE_HDRS} gps/qgsqtlocationconnection.h diff --git a/src/core/composer/qgscomposerattributetablemodel.cpp b/src/core/composer/qgscomposerattributetablemodel.cpp index 01f154a528f..76b618f0bc8 100644 --- a/src/core/composer/qgscomposerattributetablemodel.cpp +++ b/src/core/composer/qgscomposerattributetablemodel.cpp @@ -188,7 +188,7 @@ bool QgsComposerAttributeTableColumnModel::setData( const QModelIndex& index, co if ( column->heading().isEmpty() || ( column->heading() == column->attribute() ) ) { column->setHeading( value.toString() ); - emit dataChanged( createIndex( index.row(), 1, 0 ), createIndex( index.row(), 1, 0 ) ); + emit dataChanged( createIndex( index.row(), 1 ), createIndex( index.row(), 1 ) ); } column->setAttribute( value.toString() ); emit dataChanged( index, index ); diff --git a/src/core/composer/qgscomposerattributetablemodelv2.cpp b/src/core/composer/qgscomposerattributetablemodelv2.cpp index 6ddc143de68..4b5aac6bd71 100644 --- a/src/core/composer/qgscomposerattributetablemodelv2.cpp +++ b/src/core/composer/qgscomposerattributetablemodelv2.cpp @@ -202,7 +202,7 @@ bool QgsComposerAttributeTableColumnModelV2::setData( const QModelIndex& index, if ( column->heading().isEmpty() || ( column->heading() == column->attribute() ) ) { column->setHeading( value.toString() ); - emit dataChanged( createIndex( index.row(), 1, 0 ), createIndex( index.row(), 1, 0 ) ); + emit dataChanged( createIndex( index.row(), 1 ), createIndex( index.row(), 1 ) ); } column->setAttribute( value.toString() ); emit dataChanged( index, index ); diff --git a/src/core/qgis.h b/src/core/qgis.h index 6cb8e7b44be..722ed30c726 100644 --- a/src/core/qgis.h +++ b/src/core/qgis.h @@ -295,6 +295,9 @@ class CORE_EXPORT QGis // retrieved from QLibrary::resolve to function pointers. // It's assumed that this works on all systems supporting // QLibrary +#if QT_VERSION >= 0x050000 + #define cast_to_fptr(f) f +#else inline void ( *cast_to_fptr( void *p ) )() { union @@ -306,6 +309,7 @@ inline void ( *cast_to_fptr( void *p ) )() u.p = p; return u.f; } +#endif // // return a string representation of a double diff --git a/src/core/qgsexpressionlexer.ll b/src/core/qgsexpressionlexer.ll index c5db1ece617..38132dcefaa 100644 --- a/src/core/qgsexpressionlexer.ll +++ b/src/core/qgsexpressionlexer.ll @@ -162,7 +162,7 @@ string "'"{str_char}*"'" {num_float} { yylval->numberFloat = cLocale.toDouble( QString::fromAscii(yytext) ); return NUMBER_FLOAT; } {num_int} { bool ok; - yylval->numberInt = cLocale.toInt( QString::fromAscii(yytext), &ok, 10 ); + yylval->numberInt = cLocale.toInt( QString::fromAscii(yytext), &ok ); if( ok ) return NUMBER_INT; diff --git a/src/core/qgsmaprendererparalleljob.cpp b/src/core/qgsmaprendererparalleljob.cpp index d456f17899a..270b8d26ac2 100644 --- a/src/core/qgsmaprendererparalleljob.cpp +++ b/src/core/qgsmaprendererparalleljob.cpp @@ -19,6 +19,8 @@ #include "qgsmaplayerrenderer.h" #include "qgspallabeling.h" +#include + QgsMapRendererParallelJob::QgsMapRendererParallelJob( const QgsMapSettings& settings ) : QgsMapRendererQImageJob( settings ) diff --git a/src/core/qgsproviderregistry.cpp b/src/core/qgsproviderregistry.cpp index b07fe139210..505ef2c5d74 100644 --- a/src/core/qgsproviderregistry.cpp +++ b/src/core/qgsproviderregistry.cpp @@ -403,6 +403,25 @@ QWidget* QgsProviderRegistry::selectWidget( const QString & providerKey, return selectFactory( parent, fl ); } +#if QT_VERSION >= 0x050000 +QFunctionPointer QgsProviderRegistry::function( QString const & providerKey, + QString const & functionName ) +{ + QLibrary myLib( library( providerKey ) ); + + QgsDebugMsg( "Library name is " + myLib.fileName() ); + + if ( myLib.load() ) + { + return myLib.resolve( functionName.toAscii().data() ); + } + else + { + QgsDebugMsg( "Cannot load library: " + myLib.errorString() ); + return 0; + } +} +#else void *QgsProviderRegistry::function( QString const & providerKey, QString const & functionName ) { @@ -420,6 +439,7 @@ void *QgsProviderRegistry::function( QString const & providerKey, return 0; } } +#endif QLibrary *QgsProviderRegistry::providerLibrary( QString const & providerKey ) const { diff --git a/src/core/qgsproviderregistry.h b/src/core/qgsproviderregistry.h index aeb57d16e66..7d101047322 100644 --- a/src/core/qgsproviderregistry.h +++ b/src/core/qgsproviderregistry.h @@ -77,6 +77,15 @@ class CORE_EXPORT QgsProviderRegistry QWidget *selectWidget( const QString & providerKey, QWidget * parent = 0, Qt::WindowFlags fl = 0 ); +#if QT_VERSION >= 0x050000 + /** Get pointer to provider function + @param providerKey identificator of the provider + @param functionName name of function + @return pointer to function or NULL on error + */ + QFunctionPointer function( const QString & providerKey, + const QString & functionName ); +#else /** Get pointer to provider function @param providerKey identificator of the provider @param functionName name of function @@ -84,6 +93,7 @@ class CORE_EXPORT QgsProviderRegistry */ void *function( const QString & providerKey, const QString & functionName ); +#endif QLibrary *providerLibrary( const QString & providerKey ) const; diff --git a/src/core/qgsspatialindex.cpp b/src/core/qgsspatialindex.cpp index dd8bdd9c05b..c3effa687e1 100644 --- a/src/core/qgsspatialindex.cpp +++ b/src/core/qgsspatialindex.cpp @@ -241,7 +241,7 @@ QList QgsSpatialIndex::nearestNeighbor( QgsPoint point, int neighb return list; } -int QgsSpatialIndex::refs() const +QAtomicInt QgsSpatialIndex::refs() const { return d->ref; } diff --git a/src/core/qgsspatialindex.h b/src/core/qgsspatialindex.h index 5c3c4bc0863..784d852fd8e 100644 --- a/src/core/qgsspatialindex.h +++ b/src/core/qgsspatialindex.h @@ -80,7 +80,7 @@ class CORE_EXPORT QgsSpatialIndex /* debugging */ //! get reference count - just for debugging! - int refs() const; + QAtomicInt refs() const; protected: // @note not available in python bindings diff --git a/src/core/symbology-ng/qgscptcityarchive.cpp b/src/core/symbology-ng/qgscptcityarchive.cpp index 7df5ce776da..490109062f8 100644 --- a/src/core/symbology-ng/qgscptcityarchive.cpp +++ b/src/core/symbology-ng/qgscptcityarchive.cpp @@ -811,7 +811,7 @@ QIcon QgsCptCityColorRampItem::icon( const QSize& size ) return icon; } - QIcon icon( size ); + QIcon icon; init(); diff --git a/src/gui/qgisgui.h b/src/gui/qgisgui.h index bc0c0ad24d3..cf07eb8e6a2 100644 --- a/src/gui/qgisgui.h +++ b/src/gui/qgisgui.h @@ -17,8 +17,7 @@ #include #include - -class QStringList; +#include /** \ingroup gui * /namespace QgisGui @@ -81,7 +80,7 @@ namespace QgisGui * @return QPair where first is the file name and second is * the file type */ - QPair GUI_EXPORT getSaveAsImageName( QWidget * theParent, QString theMessage, QString defaultFilename = QString::null ); + QPair getSaveAsImageName( QWidget * theParent, QString theMessage, QString defaultFilename = QString::null ); /** Convenience function for readily creating file filters. diff --git a/src/gui/qgsactionmenu.cpp b/src/gui/qgsactionmenu.cpp index 4921169056a..aed98c84bb1 100644 --- a/src/gui/qgsactionmenu.cpp +++ b/src/gui/qgsactionmenu.cpp @@ -16,8 +16,6 @@ #include "qgsactionmenu.h" #include "qgsvectorlayer.h" -#include - QgsActionMenu::QgsActionMenu( QgsVectorLayer* layer, const QgsFeature* feature, QWidget* parent ) : QMenu( parent ) , mLayer( layer ) diff --git a/src/gui/qgscolorwidgets.cpp b/src/gui/qgscolorwidgets.cpp index 537923e9c56..fb5b582258e 100644 --- a/src/gui/qgscolorwidgets.cpp +++ b/src/gui/qgscolorwidgets.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include diff --git a/src/gui/qgsfiledropedit.cpp b/src/gui/qgsfiledropedit.cpp index d05820121d9..d3ee7ceac4d 100644 --- a/src/gui/qgsfiledropedit.cpp +++ b/src/gui/qgsfiledropedit.cpp @@ -18,6 +18,7 @@ #include #include #include +#include /*! \class QgsFileDropEdit diff --git a/src/gui/qgsmapcanvasitem.cpp b/src/gui/qgsmapcanvasitem.cpp index 80ab8f911e7..55f89488542 100644 --- a/src/gui/qgsmapcanvasitem.cpp +++ b/src/gui/qgsmapcanvasitem.cpp @@ -27,7 +27,7 @@ #include "qgslogger.h" QgsMapCanvasItem::QgsMapCanvasItem( QgsMapCanvas* mapCanvas ) - : QGraphicsItem( 0, mapCanvas->scene() ), mMapCanvas( mapCanvas ), + : QGraphicsItem(), mMapCanvas( mapCanvas ), mPanningOffset( 0, 0 ), mItemSize( 0, 0 ) { } diff --git a/src/gui/symbology-ng/characterwidget.cpp b/src/gui/symbology-ng/characterwidget.cpp index e2233768f9c..b87f71c3663 100644 --- a/src/gui/symbology-ng/characterwidget.cpp +++ b/src/gui/symbology-ng/characterwidget.cpp @@ -141,7 +141,7 @@ void CharacterWidget::mousePressEvent( QMouseEvent *event ) if ( event->button() == Qt::LeftButton ) { lastKey = ( event->y() / squareSize ) * columns + event->x() / squareSize; - if ( QChar( lastKey ).category() != QChar::NoCategory ) + if ( QChar( lastKey ).category() != QChar::Other_NotAssigned ) emit characterSelected( QChar( lastKey ) ); update(); } diff --git a/src/gui/symbology-ng/qgsbrushstylecombobox.cpp b/src/gui/symbology-ng/qgsbrushstylecombobox.cpp index 4cdf90456a7..94649900b24 100644 --- a/src/gui/symbology-ng/qgsbrushstylecombobox.cpp +++ b/src/gui/symbology-ng/qgsbrushstylecombobox.cpp @@ -48,7 +48,7 @@ QgsBrushStyleComboBox::QgsBrushStyleComboBox( QWidget* parent ) { Qt::BrushStyle style = styles.at( i ).first; QString name = styles.at( i ).second; - addItem( iconForBrush( style ), name, QVariant( style ) ); + addItem( iconForBrush( style ), name, QVariant( (int)style ) ); } setCurrentIndex( 1 ); @@ -63,7 +63,7 @@ Qt::BrushStyle QgsBrushStyleComboBox::brushStyle() const void QgsBrushStyleComboBox::setBrushStyle( Qt::BrushStyle style ) { - int idx = findData( QVariant( style ) ); + int idx = findData( QVariant( (int)style ) ); setCurrentIndex( idx == -1 ? 0 : idx ); } diff --git a/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp b/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp index 957c380532a..f653356e9f3 100644 --- a/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp +++ b/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp @@ -222,7 +222,7 @@ QModelIndex QgsCategorizedSymbolRendererV2Model::index( int row, int column, con { if ( hasIndex( row, column, parent ) ) { - return createIndex( row, column, 0 ); + return createIndex( row, column ); } return QModelIndex(); } @@ -297,7 +297,7 @@ bool QgsCategorizedSymbolRendererV2Model::dropMimeData( const QMimeData *data, Q // removed under 'to' so the target shifted down if ( rows[i] < to ) to--; } - emit dataChanged( createIndex( 0, 0, 0 ), createIndex( mRenderer->categories().size(), 0 ) ); + emit dataChanged( createIndex( 0, 0 ), createIndex( mRenderer->categories().size(), 0 ) ); emit rowsMoved(); return false; } @@ -334,13 +334,13 @@ void QgsCategorizedSymbolRendererV2Model::sort( int column, Qt::SortOrder order { mRenderer->sortByLabel( order ); } - emit dataChanged( createIndex( 0, 0, 0 ), createIndex( mRenderer->categories().size(), 0 ) ); + emit dataChanged( createIndex( 0, 0 ), createIndex( mRenderer->categories().size(), 0 ) ); QgsDebugMsg( "Done" ); } void QgsCategorizedSymbolRendererV2Model::updateSymbology() { - emit dataChanged( createIndex( 0, 0, 0 ), createIndex( mRenderer->categories().size(), 0 ) ); + emit dataChanged( createIndex( 0, 0 ), createIndex( mRenderer->categories().size(), 0 ) ); } // ------------------------------ View style -------------------------------- diff --git a/src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp b/src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp index 0bd0f44ec2d..214e180f0c8 100644 --- a/src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp +++ b/src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp @@ -218,7 +218,7 @@ QModelIndex QgsGraduatedSymbolRendererV2Model::index( int row, int column, const { if ( hasIndex( row, column, parent ) ) { - return createIndex( row, column, 0 ); + return createIndex( row, column ); } return QModelIndex(); } @@ -293,7 +293,7 @@ bool QgsGraduatedSymbolRendererV2Model::dropMimeData( const QMimeData *data, Qt: // removed under 'to' so the target shifted down if ( rows[i] < to ) to--; } - emit dataChanged( createIndex( 0, 0, 0 ), createIndex( mRenderer->ranges().size(), 0 ) ); + emit dataChanged( createIndex( 0, 0 ), createIndex( mRenderer->ranges().size(), 0 ) ); emit rowsMoved(); return false; } @@ -331,13 +331,13 @@ void QgsGraduatedSymbolRendererV2Model::sort( int column, Qt::SortOrder order ) mRenderer->sortByLabel( order ); } emit rowsMoved(); - emit dataChanged( createIndex( 0, 0, 0 ), createIndex( mRenderer->ranges().size(), 0 ) ); + emit dataChanged( createIndex( 0, 0 ), createIndex( mRenderer->ranges().size(), 0 ) ); QgsDebugMsg( "Done" ); } void QgsGraduatedSymbolRendererV2Model::updateSymbology() { - emit dataChanged( createIndex( 0, 0, 0 ), createIndex( mRenderer->ranges().size(), 0 ) ); + emit dataChanged( createIndex( 0, 0 ), createIndex( mRenderer->ranges().size(), 0 ) ); } void QgsGraduatedSymbolRendererV2Model::updateLabels() diff --git a/src/gui/symbology-ng/qgspenstylecombobox.cpp b/src/gui/symbology-ng/qgspenstylecombobox.cpp index b39ed88e989..21920f84e54 100644 --- a/src/gui/symbology-ng/qgspenstylecombobox.cpp +++ b/src/gui/symbology-ng/qgspenstylecombobox.cpp @@ -40,7 +40,7 @@ QgsPenStyleComboBox::QgsPenStyleComboBox( QWidget* parent ) { Qt::PenStyle style = styles.at( i ).first; QString name = styles.at( i ).second; - addItem( iconForPen( style ), name, QVariant( style ) ); + addItem( iconForPen( style ), name, QVariant( (int) style ) ); } } @@ -51,7 +51,7 @@ Qt::PenStyle QgsPenStyleComboBox::penStyle() const void QgsPenStyleComboBox::setPenStyle( Qt::PenStyle style ) { - int idx = findData( QVariant( style ) ); + int idx = findData( QVariant( (int) style ) ); setCurrentIndex( idx == -1 ? 0 : idx ); } diff --git a/src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp b/src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp index cc6ff164b3c..aad9247385b 100644 --- a/src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp +++ b/src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp @@ -91,9 +91,14 @@ eVisImageDisplayWidget::eVisImageDisplayWidget( QWidget* parent, Qt::WindowFlags //setup http connection mHttpBuffer = new QBuffer(); +#if QT_VERSION < 0x050000 mHttpConnection = new QHttp(); +#endif mHttpBuffer->open( QBuffer::ReadWrite ); +// TODO +#if QT_VERSION < 0x050000 connect( mHttpConnection, SIGNAL( requestFinished( int, bool ) ), this, SLOT( displayUrlImage( int, bool ) ) ); +#endif //initialize remaining variables mScaleByHeight = false; @@ -108,7 +113,9 @@ eVisImageDisplayWidget::~eVisImageDisplayWidget() delete mImageLabel; delete mImage; delete mHttpBuffer; +#if QT_VERSION < 0x050000 delete mHttpConnection; +#endif delete pbtnZoomIn; delete pbtnZoomOut; delete pbtnZoomFull; @@ -186,8 +193,10 @@ void eVisImageDisplayWidget::displayImage() void eVisImageDisplayWidget::displayUrlImage( QString url ) { QUrl myUrl( url ); +#if QT_VERSION < 0x050000 mHttpConnection->setHost( myUrl.host() ); mCurrentHttpImageRequestId = mHttpConnection->get( myUrl.path().replace( "\\", "/" ), mHttpBuffer ); +#endif } /** diff --git a/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h b/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h index 33ad307b615..9b1f6129a14 100644 --- a/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h +++ b/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h @@ -32,7 +32,11 @@ #include #include #include +// TODO: Update to QNetworkAccessManager +#if QT_VERSION < 0x050000 #include +#endif + #include /** @@ -90,8 +94,11 @@ class eVisImageDisplayWidget : public QWidget /** \brief Pointer to the http buffer */ QBuffer* mHttpBuffer; +// TODO: Update to QNetworkAccessManager +#if QT_VERSION < 0x050000 /** \brief Pointer to the http connection if needed */ QHttp* mHttpConnection; +#endif /** \brief This is a point to the actual image being displayed */ QPixmap* mImage; diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp index cd70d277c26..e0ee43e6cc1 100644 --- a/src/providers/postgres/qgspostgresprovider.cpp +++ b/src/providers/postgres/qgspostgresprovider.cpp @@ -248,7 +248,8 @@ QString QgsPostgresProvider::storageType() const return "PostgreSQL database with PostGIS extension"; } - +// Qt5 has that built in +#if QT_VERSION < 0x050000 static bool operator<( const QVariant &a, const QVariant &b ) { if ( a.isNull() || b.isNull() ) @@ -325,7 +326,7 @@ static bool operator<( const QVariant &a, const QVariant &b ) return a.canConvert( QVariant::String ) && b.canConvert( QVariant::String ) && a.toString() < b.toString(); } - +#endif QgsFeatureIterator QgsPostgresProvider::getFeatures( const QgsFeatureRequest& request ) { diff --git a/tests/bench/main.cpp b/tests/bench/main.cpp index 249b0bcac47..d47597eaa5b 100644 --- a/tests/bench/main.cpp +++ b/tests/bench/main.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include diff --git a/tests/src/analysis/testopenstreetmap.cpp b/tests/src/analysis/testopenstreetmap.cpp index c1afafd156a..e49bfdbe482 100644 --- a/tests/src/analysis/testopenstreetmap.cpp +++ b/tests/src/analysis/testopenstreetmap.cpp @@ -13,8 +13,8 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include //#include diff --git a/tests/src/analysis/testqgsvectoranalyzer.cpp b/tests/src/analysis/testqgsvectoranalyzer.cpp index b3bb9359994..a68d9dc0a6e 100644 --- a/tests/src/analysis/testqgsvectoranalyzer.cpp +++ b/tests/src/analysis/testqgsvectoranalyzer.cpp @@ -12,7 +12,7 @@ Email : sherman at mrcc dot com * (at your option) any later version. * * * ***************************************************************************/ -#include +#include //header for class being tested #include diff --git a/tests/src/analysis/testqgszonalstatistics.cpp b/tests/src/analysis/testqgszonalstatistics.cpp index 039ed606aa0..3deb46d8aa3 100644 --- a/tests/src/analysis/testqgszonalstatistics.cpp +++ b/tests/src/analysis/testqgszonalstatistics.cpp @@ -14,7 +14,7 @@ ***************************************************************************/ #include -#include +#include #include "qgsapplication.h" #include "qgsvectorlayer.h" diff --git a/tests/src/app/testqgisappclipboard.cpp b/tests/src/app/testqgisappclipboard.cpp index 5ebd87dcc1c..20691dca1e9 100644 --- a/tests/src/app/testqgisappclipboard.cpp +++ b/tests/src/app/testqgisappclipboard.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include diff --git a/tests/src/core/regression1141.cpp b/tests/src/core/regression1141.cpp index 42cab0d5c5b..8679c53b72f 100644 --- a/tests/src/core/regression1141.cpp +++ b/tests/src/core/regression1141.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/regression992.cpp b/tests/src/core/regression992.cpp index 4f17156ce74..2e96b8e4f59 100644 --- a/tests/src/core/regression992.cpp +++ b/tests/src/core/regression992.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/test_template.cpp b/tests/src/core/test_template.cpp index 9dfa280e37e..8a2561c80b1 100644 --- a/tests/src/core/test_template.cpp +++ b/tests/src/core/test_template.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testcontrastenhancements.cpp b/tests/src/core/testcontrastenhancements.cpp index 67fc1a5fd80..d5ffa822723 100644 --- a/tests/src/core/testcontrastenhancements.cpp +++ b/tests/src/core/testcontrastenhancements.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testmaprendererjob.cpp b/tests/src/core/testmaprendererjob.cpp index bafa69942e2..9bfea899015 100644 --- a/tests/src/core/testmaprendererjob.cpp +++ b/tests/src/core/testmaprendererjob.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include "qgsapplication.h" diff --git a/tests/src/core/testqgsapplication.cpp b/tests/src/core/testqgsapplication.cpp index 1bebd380a5f..25cbb4194b9 100644 --- a/tests/src/core/testqgsapplication.cpp +++ b/tests/src/core/testqgsapplication.cpp @@ -12,7 +12,7 @@ Email : sherman at mrcc dot com * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include diff --git a/tests/src/core/testqgsatlascomposition.cpp b/tests/src/core/testqgsatlascomposition.cpp index a640de24162..07576d0e04c 100644 --- a/tests/src/core/testqgsatlascomposition.cpp +++ b/tests/src/core/testqgsatlascomposition.cpp @@ -30,8 +30,8 @@ #include "qgssinglesymbolrendererv2.h" #include "qgsfontutils.h" #include -#include -#include +#include +#include class TestQgsAtlasComposition: public QObject { diff --git a/tests/src/core/testqgsblendmodes.cpp b/tests/src/core/testqgsblendmodes.cpp index e5f33a8fac7..302b6808db7 100644 --- a/tests/src/core/testqgsblendmodes.cpp +++ b/tests/src/core/testqgsblendmodes.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsclipper.cpp b/tests/src/core/testqgsclipper.cpp index 13ba7f55267..d36f68e5ab8 100644 --- a/tests/src/core/testqgsclipper.cpp +++ b/tests/src/core/testqgsclipper.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgscolorscheme.cpp b/tests/src/core/testqgscolorscheme.cpp index 7591e7d19bb..bcdaf09f715 100644 --- a/tests/src/core/testqgscolorscheme.cpp +++ b/tests/src/core/testqgscolorscheme.cpp @@ -17,7 +17,7 @@ #include "qgscolorscheme.h" #include -#include +#include //dummy color scheme for testing class DummyColorScheme : public QgsColorScheme diff --git a/tests/src/core/testqgscolorschemeregistry.cpp b/tests/src/core/testqgscolorschemeregistry.cpp index bd6b2fe1b9d..51e638d64e2 100644 --- a/tests/src/core/testqgscolorschemeregistry.cpp +++ b/tests/src/core/testqgscolorschemeregistry.cpp @@ -18,7 +18,7 @@ #include "qgscolorschemeregistry.h" #include "qgscolorscheme.h" #include -#include +#include //dummy color scheme for testing class DummyColorScheme : public QgsColorScheme diff --git a/tests/src/core/testqgscomposerdd.cpp b/tests/src/core/testqgscomposerdd.cpp index b0448f9ca99..7835ea5e0d7 100644 --- a/tests/src/core/testqgscomposerdd.cpp +++ b/tests/src/core/testqgscomposerdd.cpp @@ -30,7 +30,7 @@ #include "qgsdatadefined.h" #include -#include +#include class TestQgsComposerDD: public QObject { diff --git a/tests/src/core/testqgscomposereffects.cpp b/tests/src/core/testqgscomposereffects.cpp index 371cf71f237..469bc3f728b 100644 --- a/tests/src/core/testqgscomposereffects.cpp +++ b/tests/src/core/testqgscomposereffects.cpp @@ -21,7 +21,7 @@ #include "qgscomposershape.h" #include "qgsmaprenderer.h" #include -#include +#include #include #include diff --git a/tests/src/core/testqgscomposergroup.cpp b/tests/src/core/testqgscomposergroup.cpp index dd414c2a2e7..9cc629bc120 100644 --- a/tests/src/core/testqgscomposergroup.cpp +++ b/tests/src/core/testqgscomposergroup.cpp @@ -20,7 +20,7 @@ #include "qgscomposition.h" #include "qgscompositionchecker.h" #include -#include +#include class TestQgsComposerGroup: public QObject { diff --git a/tests/src/core/testqgscomposerhtml.cpp b/tests/src/core/testqgscomposerhtml.cpp index bda18ccb2d9..97e93be3395 100644 --- a/tests/src/core/testqgscomposerhtml.cpp +++ b/tests/src/core/testqgscomposerhtml.cpp @@ -22,7 +22,7 @@ #include "qgscompositionchecker.h" #include "qgsfontutils.h" #include -#include +#include class TestQgsComposerHtml: public QObject { diff --git a/tests/src/core/testqgscomposerlabel.cpp b/tests/src/core/testqgscomposerlabel.cpp index eb4a218041d..37250853e7c 100644 --- a/tests/src/core/testqgscomposerlabel.cpp +++ b/tests/src/core/testqgscomposerlabel.cpp @@ -24,7 +24,7 @@ #include "qgsvectordataprovider.h" #include -#include +#include class TestQgsComposerLabel: public QObject { diff --git a/tests/src/core/testqgscomposermap.cpp b/tests/src/core/testqgscomposermap.cpp index e747f1f9d06..a0c56e0e6e1 100644 --- a/tests/src/core/testqgscomposermap.cpp +++ b/tests/src/core/testqgscomposermap.cpp @@ -24,7 +24,7 @@ #include "qgsmultibandcolorrenderer.h" #include "qgsrasterlayer.h" #include -#include +#include class TestQgsComposerMap: public QObject { diff --git a/tests/src/core/testqgscomposermapgrid.cpp b/tests/src/core/testqgscomposermapgrid.cpp index 51059be13ef..cd46e82eac4 100644 --- a/tests/src/core/testqgscomposermapgrid.cpp +++ b/tests/src/core/testqgscomposermapgrid.cpp @@ -24,7 +24,7 @@ #include "qgsmaprenderer.h" #include "qgsfontutils.h" #include -#include +#include class TestQgsComposerMapGrid: public QObject { diff --git a/tests/src/core/testqgscomposermapoverview.cpp b/tests/src/core/testqgscomposermapoverview.cpp index 809888a1d0a..65adecac406 100644 --- a/tests/src/core/testqgscomposermapoverview.cpp +++ b/tests/src/core/testqgscomposermapoverview.cpp @@ -26,7 +26,7 @@ #include "qgsrasterlayer.h" #include "qgsfontutils.h" #include -#include +#include class TestQgsComposerMapOverview: public QObject { diff --git a/tests/src/core/testqgscomposermodel.cpp b/tests/src/core/testqgscomposermodel.cpp index 66702395f78..871d31c72f4 100644 --- a/tests/src/core/testqgscomposermodel.cpp +++ b/tests/src/core/testqgscomposermodel.cpp @@ -19,7 +19,7 @@ #include "qgscomposermodel.h" #include "qgscomposerlabel.h" #include -#include +#include #include class TestQgsComposerModel: public QObject diff --git a/tests/src/core/testqgscomposermultiframe.cpp b/tests/src/core/testqgscomposermultiframe.cpp index 942f9fe2dac..de1ee4790da 100644 --- a/tests/src/core/testqgscomposermultiframe.cpp +++ b/tests/src/core/testqgscomposermultiframe.cpp @@ -21,7 +21,7 @@ #include "qgscomposition.h" #include "qgscompositionchecker.h" #include -#include +#include class TestQgsComposerMultiFrame: public QObject { diff --git a/tests/src/core/testqgscomposerobject.cpp b/tests/src/core/testqgscomposerobject.cpp index 9717b655729..c4c2975737e 100644 --- a/tests/src/core/testqgscomposerobject.cpp +++ b/tests/src/core/testqgscomposerobject.cpp @@ -20,7 +20,7 @@ #include "qgscompositionchecker.h" #include "qgsdatadefined.h" #include -#include +#include class TestQgsComposerObject: public QObject { diff --git a/tests/src/core/testqgscomposerpaper.cpp b/tests/src/core/testqgscomposerpaper.cpp index 01a0da678db..cca985b2322 100644 --- a/tests/src/core/testqgscomposerpaper.cpp +++ b/tests/src/core/testqgscomposerpaper.cpp @@ -25,7 +25,7 @@ #include "qgslinesymbollayerv2.h" #include -#include +#include #include #include diff --git a/tests/src/core/testqgscomposerpicture.cpp b/tests/src/core/testqgscomposerpicture.cpp index 53331ec174d..20560e43780 100644 --- a/tests/src/core/testqgscomposerpicture.cpp +++ b/tests/src/core/testqgscomposerpicture.cpp @@ -20,7 +20,7 @@ #include "qgscompositionchecker.h" #include "qgscomposerpicture.h" #include -#include +#include #include #include diff --git a/tests/src/core/testqgscomposerrotation.cpp b/tests/src/core/testqgscomposerrotation.cpp index 53e0623f0b1..e20edd8d1f2 100644 --- a/tests/src/core/testqgscomposerrotation.cpp +++ b/tests/src/core/testqgscomposerrotation.cpp @@ -27,7 +27,7 @@ #include "qgsmaplayerregistry.h" #include "qgsfontutils.h" #include -#include +#include #include #include diff --git a/tests/src/core/testqgscomposerscalebar.cpp b/tests/src/core/testqgscomposerscalebar.cpp index 44bf3d15b4b..2490465c0da 100644 --- a/tests/src/core/testqgscomposerscalebar.cpp +++ b/tests/src/core/testqgscomposerscalebar.cpp @@ -26,7 +26,7 @@ #include "qgsrasterlayer.h" #include "qgsfontutils.h" #include -#include +#include class TestQgsComposerScaleBar: public QObject { diff --git a/tests/src/core/testqgscomposershapes.cpp b/tests/src/core/testqgscomposershapes.cpp index 02dd94b1dfa..9bfa38fefee 100644 --- a/tests/src/core/testqgscomposershapes.cpp +++ b/tests/src/core/testqgscomposershapes.cpp @@ -24,7 +24,7 @@ #include "qgssinglesymbolrendererv2.h" #include "qgsfillsymbollayerv2.h" #include -#include +#include #include #include diff --git a/tests/src/core/testqgscomposertable.cpp b/tests/src/core/testqgscomposertable.cpp index 6d122ca6766..09d948f9c3f 100644 --- a/tests/src/core/testqgscomposertable.cpp +++ b/tests/src/core/testqgscomposertable.cpp @@ -26,7 +26,7 @@ #include "qgsfeature.h" #include -#include +#include class TestQgsComposerTable: public QObject { diff --git a/tests/src/core/testqgscomposertablev2.cpp b/tests/src/core/testqgscomposertablev2.cpp index 8bcd1326228..4bdda589fbe 100644 --- a/tests/src/core/testqgscomposertablev2.cpp +++ b/tests/src/core/testqgscomposertablev2.cpp @@ -32,7 +32,7 @@ #include "qgsrelationmanager.h" #include -#include +#include class TestQgsComposerTableV2: public QObject { diff --git a/tests/src/core/testqgscomposerutils.cpp b/tests/src/core/testqgscomposerutils.cpp index 90646bd8a1b..d68913fe770 100644 --- a/tests/src/core/testqgscomposerutils.cpp +++ b/tests/src/core/testqgscomposerutils.cpp @@ -22,7 +22,7 @@ #include "qgsdatadefined.h" #include "qgsfontutils.h" #include -#include +#include #include class TestQgsComposerUtils: public QObject diff --git a/tests/src/core/testqgscomposition.cpp b/tests/src/core/testqgscomposition.cpp index 642e1a767b6..9799ddab2a6 100644 --- a/tests/src/core/testqgscomposition.cpp +++ b/tests/src/core/testqgscomposition.cpp @@ -25,7 +25,7 @@ #include "qgsmapsettings.h" #include -#include +#include class TestQgsComposition: public QObject { diff --git a/tests/src/core/testqgscoordinatereferencesystem.cpp b/tests/src/core/testqgscoordinatereferencesystem.cpp index 7901a51e90c..bddf916a2d4 100644 --- a/tests/src/core/testqgscoordinatereferencesystem.cpp +++ b/tests/src/core/testqgscoordinatereferencesystem.cpp @@ -12,7 +12,7 @@ Email : sherman at mrcc dot com * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include diff --git a/tests/src/core/testqgscoordinatetransform.cpp b/tests/src/core/testqgscoordinatetransform.cpp index 61a80bb792c..7fb9e40e1a2 100644 --- a/tests/src/core/testqgscoordinatetransform.cpp +++ b/tests/src/core/testqgscoordinatetransform.cpp @@ -17,7 +17,7 @@ #include "qgscoordinatetransform.h" #include "qgsapplication.h" #include -#include +#include class TestQgsCoordinateTransform: public QObject { diff --git a/tests/src/core/testqgsdatadefined.cpp b/tests/src/core/testqgsdatadefined.cpp index f6d6d1a3ed5..2c488e3cf0f 100644 --- a/tests/src/core/testqgsdatadefined.cpp +++ b/tests/src/core/testqgsdatadefined.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsdataitem.cpp b/tests/src/core/testqgsdataitem.cpp index 30717101498..2ac6453dedd 100644 --- a/tests/src/core/testqgsdataitem.cpp +++ b/tests/src/core/testqgsdataitem.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsdiagram.cpp b/tests/src/core/testqgsdiagram.cpp index 67b0f25c439..363c1aa2fb3 100644 --- a/tests/src/core/testqgsdiagram.cpp +++ b/tests/src/core/testqgsdiagram.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsdiagramexpression.cpp b/tests/src/core/testqgsdiagramexpression.cpp index 9fd5841b7b1..9694af1b838 100644 --- a/tests/src/core/testqgsdiagramexpression.cpp +++ b/tests/src/core/testqgsdiagramexpression.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsdistancearea.cpp b/tests/src/core/testqgsdistancearea.cpp index d2305b69ead..6149fa06651 100644 --- a/tests/src/core/testqgsdistancearea.cpp +++ b/tests/src/core/testqgsdistancearea.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsexpression.cpp b/tests/src/core/testqgsexpression.cpp index 47fa99c423c..0b92f254a2b 100644 --- a/tests/src/core/testqgsexpression.cpp +++ b/tests/src/core/testqgsexpression.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsgeometry.cpp b/tests/src/core/testqgsgeometry.cpp index 408cdee74cc..f966c019777 100644 --- a/tests/src/core/testqgsgeometry.cpp +++ b/tests/src/core/testqgsgeometry.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsgeometryimport.cpp b/tests/src/core/testqgsgeometryimport.cpp index 64badf47f9a..8786a9924bd 100644 --- a/tests/src/core/testqgsgeometryimport.cpp +++ b/tests/src/core/testqgsgeometryimport.cpp @@ -18,7 +18,7 @@ #include "qgspoint.h" #include -#include +#include #include class TestQgsGeometryImport: public QObject diff --git a/tests/src/core/testqgsgradients.cpp b/tests/src/core/testqgsgradients.cpp index 9625f9fc49d..f455b03bd3b 100644 --- a/tests/src/core/testqgsgradients.cpp +++ b/tests/src/core/testqgsgradients.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsinvertedpolygonrenderer.cpp b/tests/src/core/testqgsinvertedpolygonrenderer.cpp index 30d297b3a17..feba43ccfc7 100644 --- a/tests/src/core/testqgsinvertedpolygonrenderer.cpp +++ b/tests/src/core/testqgsinvertedpolygonrenderer.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgslegendrenderer.cpp b/tests/src/core/testqgslegendrenderer.cpp index e74b00c5cbc..047b299cff3 100644 --- a/tests/src/core/testqgslegendrenderer.cpp +++ b/tests/src/core/testqgslegendrenderer.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include "qgsapplication.h" diff --git a/tests/src/core/testqgsmaplayer.cpp b/tests/src/core/testqgsmaplayer.cpp index 894ca15b893..52f2e32b0a1 100644 --- a/tests/src/core/testqgsmaplayer.cpp +++ b/tests/src/core/testqgsmaplayer.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsmaprenderer.cpp b/tests/src/core/testqgsmaprenderer.cpp index 96896ed2fc5..5f265975f23 100644 --- a/tests/src/core/testqgsmaprenderer.cpp +++ b/tests/src/core/testqgsmaprenderer.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsnetworkcontentfetcher.cpp b/tests/src/core/testqgsnetworkcontentfetcher.cpp index 8e48b632462..a6d7edd6df0 100644 --- a/tests/src/core/testqgsnetworkcontentfetcher.cpp +++ b/tests/src/core/testqgsnetworkcontentfetcher.cpp @@ -18,7 +18,7 @@ #include "qgsnetworkcontentfetcher.h" #include "qgsapplication.h" #include -#include +#include #include class TestQgsNetworkContentFetcher: public QObject diff --git a/tests/src/core/testqgsogcutils.cpp b/tests/src/core/testqgsogcutils.cpp index 133a010b450..2359fb857f2 100644 --- a/tests/src/core/testqgsogcutils.cpp +++ b/tests/src/core/testqgsogcutils.cpp @@ -14,7 +14,7 @@ * * ***************************************************************************/ -#include +#include //qgis includes... #include diff --git a/tests/src/core/testqgspoint.cpp b/tests/src/core/testqgspoint.cpp index 497a31552ab..8a4cd469106 100644 --- a/tests/src/core/testqgspoint.cpp +++ b/tests/src/core/testqgspoint.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsproject.cpp b/tests/src/core/testqgsproject.cpp index a04c4ca8d56..a2acac4f676 100644 --- a/tests/src/core/testqgsproject.cpp +++ b/tests/src/core/testqgsproject.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include diff --git a/tests/src/core/testqgsrasterfilewriter.cpp b/tests/src/core/testqgsrasterfilewriter.cpp index b4317a77597..70c8a98a793 100644 --- a/tests/src/core/testqgsrasterfilewriter.cpp +++ b/tests/src/core/testqgsrasterfilewriter.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsrasterfill.cpp b/tests/src/core/testqgsrasterfill.cpp index 69f56d0a68d..69c4131533f 100644 --- a/tests/src/core/testqgsrasterfill.cpp +++ b/tests/src/core/testqgsrasterfill.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsrasterlayer.cpp b/tests/src/core/testqgsrasterlayer.cpp index e29bcc0dfb2..20931cdd08c 100644 --- a/tests/src/core/testqgsrasterlayer.cpp +++ b/tests/src/core/testqgsrasterlayer.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsrastersublayer.cpp b/tests/src/core/testqgsrastersublayer.cpp index c1a90c52a27..9f2a6e34d0c 100644 --- a/tests/src/core/testqgsrastersublayer.cpp +++ b/tests/src/core/testqgsrastersublayer.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsrectangle.cpp b/tests/src/core/testqgsrectangle.cpp index ef4275822d8..a2bdaf6b1ed 100644 --- a/tests/src/core/testqgsrectangle.cpp +++ b/tests/src/core/testqgsrectangle.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsrenderers.cpp b/tests/src/core/testqgsrenderers.cpp index 867ffe2b86b..232dfb3faf6 100644 --- a/tests/src/core/testqgsrenderers.cpp +++ b/tests/src/core/testqgsrenderers.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsrulebasedrenderer.cpp b/tests/src/core/testqgsrulebasedrenderer.cpp index efbe096d422..2f181df4895 100644 --- a/tests/src/core/testqgsrulebasedrenderer.cpp +++ b/tests/src/core/testqgsrulebasedrenderer.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include //header for class being tested diff --git a/tests/src/core/testqgsshapeburst.cpp b/tests/src/core/testqgsshapeburst.cpp index de595fc86ba..d976406322d 100644 --- a/tests/src/core/testqgsshapeburst.cpp +++ b/tests/src/core/testqgsshapeburst.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsspatialindex.cpp b/tests/src/core/testqgsspatialindex.cpp index a9e8ab2f39b..a678167c49a 100644 --- a/tests/src/core/testqgsspatialindex.cpp +++ b/tests/src/core/testqgsspatialindex.cpp @@ -13,7 +13,7 @@ * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsstylev2.cpp b/tests/src/core/testqgsstylev2.cpp index 84893ecc27c..94953cb9f80 100644 --- a/tests/src/core/testqgsstylev2.cpp +++ b/tests/src/core/testqgsstylev2.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsvectordataprovider.cpp b/tests/src/core/testqgsvectordataprovider.cpp index 4720b7977f6..bc4fbf1afe7 100644 --- a/tests/src/core/testqgsvectordataprovider.cpp +++ b/tests/src/core/testqgsvectordataprovider.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsvectorfilewriter.cpp b/tests/src/core/testqgsvectorfilewriter.cpp index a58edbf0c77..74346bfa4c5 100644 --- a/tests/src/core/testqgsvectorfilewriter.cpp +++ b/tests/src/core/testqgsvectorfilewriter.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsvectorlayer.cpp b/tests/src/core/testqgsvectorlayer.cpp index d76f93d65c8..9173a383667 100644 --- a/tests/src/core/testqgsvectorlayer.cpp +++ b/tests/src/core/testqgsvectorlayer.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/core/testqgsvectorlayercache.cpp b/tests/src/core/testqgsvectorlayercache.cpp index ab8e388cece..06a39567104 100644 --- a/tests/src/core/testqgsvectorlayercache.cpp +++ b/tests/src/core/testqgsvectorlayercache.cpp @@ -14,7 +14,7 @@ ***************************************************************************/ -#include +#include #include #include diff --git a/tests/src/core/testqgsvectorlayerjoinbuffer.cpp b/tests/src/core/testqgsvectorlayerjoinbuffer.cpp index 9a9e53091da..3bbed0d2759 100644 --- a/tests/src/core/testqgsvectorlayerjoinbuffer.cpp +++ b/tests/src/core/testqgsvectorlayerjoinbuffer.cpp @@ -14,7 +14,7 @@ ***************************************************************************/ -#include +#include #include //qgis includes... diff --git a/tests/src/core/testziplayer.cpp b/tests/src/core/testziplayer.cpp index b3322fcbd72..6c2eac8b772 100644 --- a/tests/src/core/testziplayer.cpp +++ b/tests/src/core/testziplayer.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/gui/testprojectionissues.cpp b/tests/src/gui/testprojectionissues.cpp index 3c21232b13d..db32171b800 100644 --- a/tests/src/gui/testprojectionissues.cpp +++ b/tests/src/gui/testprojectionissues.cpp @@ -22,7 +22,7 @@ #include "qgsmultibandcolorrenderer.h" #include "qgsrasterlayer.h" #include -#include +#include class TestProjectionIssues: public QObject { diff --git a/tests/src/gui/testqgsdualview.cpp b/tests/src/gui/testqgsdualview.cpp index e423d9d3d27..8c44a04fa0e 100644 --- a/tests/src/gui/testqgsdualview.cpp +++ b/tests/src/gui/testqgsdualview.cpp @@ -14,7 +14,7 @@ ***************************************************************************/ -#include +#include #include #include diff --git a/tests/src/gui/testqgsmapcanvas.cpp b/tests/src/gui/testqgsmapcanvas.cpp index 6f05fb67557..6b1a0bb382e 100644 --- a/tests/src/gui/testqgsmapcanvas.cpp +++ b/tests/src/gui/testqgsmapcanvas.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include diff --git a/tests/src/gui/testqgsmaptoolzoom.cpp b/tests/src/gui/testqgsmaptoolzoom.cpp index 4712df0b227..a79b89bb9b7 100644 --- a/tests/src/gui/testqgsmaptoolzoom.cpp +++ b/tests/src/gui/testqgsmaptoolzoom.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/gui/testqgsquickprint.cpp b/tests/src/gui/testqgsquickprint.cpp index 84b3ebd63ef..7610809413e 100644 --- a/tests/src/gui/testqgsquickprint.cpp +++ b/tests/src/gui/testqgsquickprint.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/gui/testqgsrasterhistogram.cpp b/tests/src/gui/testqgsrasterhistogram.cpp index e4caf331aa1..44f506beab7 100644 --- a/tests/src/gui/testqgsrasterhistogram.cpp +++ b/tests/src/gui/testqgsrasterhistogram.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/gui/testqgsrubberband.cpp b/tests/src/gui/testqgsrubberband.cpp index cb2f7d484cc..1e7ec9cc0e1 100644 --- a/tests/src/gui/testqgsrubberband.cpp +++ b/tests/src/gui/testqgsrubberband.cpp @@ -14,7 +14,7 @@ ***************************************************************************/ -#include +#include #include #include #include diff --git a/tests/src/gui/testqgsscalecombobox.cpp b/tests/src/gui/testqgsscalecombobox.cpp index 5b75e5805d1..b20ebe35d79 100644 --- a/tests/src/gui/testqgsscalecombobox.cpp +++ b/tests/src/gui/testqgsscalecombobox.cpp @@ -21,8 +21,8 @@ #include #include #include -#include -#include +#include +#include class TestQgsScaleComboBox: public QObject { diff --git a/tests/src/providers/testqgswcsprovider.cpp b/tests/src/providers/testqgswcsprovider.cpp index 8b224b5cab1..119bdbcd483 100644 --- a/tests/src/providers/testqgswcsprovider.cpp +++ b/tests/src/providers/testqgswcsprovider.cpp @@ -14,7 +14,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include