121 Commits

Author SHA1 Message Date
Denis Rouzaud
33ea41a100 run pre-commit 2024-11-30 15:07:24 +01:00
Denis Rouzaud
96855dcb9f
fix deprecated Q_OS_MACX (#58987) 2024-10-07 18:39:59 +02:00
Simon Lopez
c06c7c938e Use CMake's SQLite targets
This uses the same targets and variables introduced in
the FindSQLite3 module in CMake starting with version 3.14.

The other CMakeFiles.txt are modified accordingly.
2024-09-13 20:59:46 +02:00
Julien Cabieces
46d656b09d auto fix tests 2024-05-31 08:46:33 +10:00
Nyall Dawson
d764c34f28 Bump minimum Qt version to 5.15.2
and remove code for Qt < 5.15.2
2023-12-05 01:35:06 +10:00
Nyall Dawson
8a2c0e3561 Replace QgsDebugMsg(...) with QgsDebugError(...) and ensure it
is ONLY used for error message reporting

Everything else gets bumped to QgsDebugMsg(..., >= 2)
2023-05-20 16:19:17 +10:00
Juergen E. Fischer
a69fa25eaa remove unused msvc cruft 2022-10-21 08:28:59 +10:00
Peter Petrik
3c4ccab1e5 try to fix bench test 2022-10-12 08:22:19 +10:00
Nyall Dawson
4bfef0c7fc Bump minimum Qt version to 5.14 2022-08-29 16:44:31 +10:00
Nyall Dawson
0ab6113e88 Promote QgsMapSettings and QgsRenderContext enums to enum class, move to Qgis 2021-09-26 11:24:51 +10:00
Nyall Dawson
19565032e3 const ALL the things
Use clang-tidy const correctness fixit to add const to all
variables which it can
2021-08-13 15:25:15 +10:00
Denis Rouzaud
80cf804db6
[cmake] modernize Qt libraries linking (#44416) 2021-07-28 11:27:22 +02:00
Nyall Dawson
0e72e012fe Bulk qt6 cmake updates
Remove more qt5 specific cmake config. Note that most of these are
untested on qt6, as the corresponding libraries cannot be built
with qt6 yet.
2021-07-28 13:44:59 +10:00
Matthias Kuhn
ce2bce52fd Switch QString ref functions to QStringView 2021-03-27 06:17:06 +10:00
Nyall Dawson
25595557c1 Definitely no more Q_FOREACH 2021-03-21 14:14:44 +10:00
Nyall Dawson
c6370c7f52
Speed up QGIS compilation by removing all Qt Module-wide includes
Refs https://www.kdab.com/beware-of-qt-module-wide-includes/
2021-03-05 11:23:15 +10:00
Nyall Dawson
a54efae892 Require c++17 to build 2021-02-25 11:08:56 +10:00
Denis Rouzaud
76a2869211 remove includes of binary dirs 2021-01-14 08:09:36 +10:00
Denis Rouzaud
23b50ab264
[cmake] remove of redundant includes (#40993) 2021-01-13 19:48:58 +01:00
Denis Rouzaud
e305a98417 [cmake] remove left-over of includes of src/core 2021-01-13 09:50:06 +01:00
Nyall Dawson
a9c80e5740 Code shuffle
Move vector, project and network related core .cpp/.h files into
dedicated subdirectories.

An attempt to organise src/core better to make things easier to find.
2020-12-29 11:38:11 +10:00
Denis Rouzaud
eddf6feb45 modernize CMakeLists.txt files 2020-11-12 07:14:46 +10:00
Even Rouault
a76670e521 QStringLiteral -> QLatin1String changes generated by scripts/qstringfixup.sh --all 2020-10-11 12:30:58 +10:00
Nyall Dawson
6da6a4521e Remove all use of deprecated Qt methods up to Qt 5.14 2020-10-07 20:16:33 +10:00
Nyall Dawson
9924b15baf Avoid a bunch of useless string parsing 2020-09-15 05:06:25 +10:00
Nyall Dawson
3717adcef6 Fix all Qt 5.14 deprecation warnings 2020-06-16 13:57:45 +10:00
Nyall Dawson
9fb02d6ba7 Remove last traces of obsolete Qt4 API usage (from c++ -- may still be some in Python!) 2020-02-08 15:17:47 +10:00
Nyall Dawson
a8adb2d6c2 Code shuffle: move all labeling related code into src/core/labeling
So that these files are all grouped together, making it easier to locate
all the components of the labeling engine and hopefully making things
easier to navigate
2019-12-11 14:05:44 +10:00
Denis Rouzaud
e214ea7ba6
Missing include 2019-11-07 20:37:14 +01:00
Even Rouault
e5c41b492c Fix compilation issues related to automoc'ification
Not sure why they trigger on my end and not on CI... Perhaps
because I didn't make clean. The symptoms are the linker complaining
about double definition of symbols.
2019-11-06 13:38:39 +10:00
Juergen E. Fischer
b81d306047 spelling fixes (closes #32408) 2019-10-26 10:50:30 +10:00
Denis Rouzaud
8ef8efa7fb
include nlohmann/json_fwd.hpp in core source headers (#32294)
the file was manually added later to the installted headers, but not on mac

it is not possible to install a file in a Headers subfolder within a framework if the original header is not in the same cmake current directory

installing a header in a subdirectory is achieved by setting the MACOSX_PACKAGE_LOCATION property of the source file
but setting a property can only be achieved if it is in the same cmake directory (from the docs: Source file properties are visible only to targets added in the same directory [0])

[0] https://cmake.org/cmake/help/latest/command/set_source_files_properties.html
2019-10-18 09:08:12 +02:00
Alessandro Pasotti
63711510b6 Dear Qt, I love you but ...
... you are too slow and QJson API is so ugly.

Now using this wonderful json lib:
https://github.com/nlohmann/json

Results in release mode (QJson tests are not shown but
QJson was even slower than string concat).

PASS   : TestQgsJsonUtils::testExportAttributesJson(Use json)
RESULT : TestQgsJsonUtils::testExportAttributesJson():"Use json":
     0.0022 msecs per iteration (total: 75, iterations: 32768)
PASS   : TestQgsJsonUtils::testExportAttributesJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportAttributesJson():"Use old string concat":
     0.0032 msecs per iteration (total: 54, iterations: 16384)
PASS   : TestQgsJsonUtils::testExportFeatureJson(Use json)
RESULT : TestQgsJsonUtils::testExportFeatureJson():"Use json":
     0.011 msecs per iteration (total: 96, iterations: 8192)
PASS   : TestQgsJsonUtils::testExportFeatureJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportFeatureJson():"Use old string concat":
     0.015 msecs per iteration (total: 64, iterations: 4096)
PASS   : TestQgsJsonUtils::testExportGeomToJson(Use json)
RESULT : TestQgsJsonUtils::testExportGeomToJson():"Use json":
     0.76 msecs per iteration (total: 98, iterations: 128)
PASS   : TestQgsJsonUtils::testExportGeomToJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportGeomToJson():"Use old string concat":
     0.85 msecs per iteration (total: 55, iterations: 64)
PASS   : TestQgsJsonUtils::cleanupTestCase()
2019-04-18 17:04:30 +02:00
Nyall Dawson
51f6fb0667 QStringLiteral 2018-10-16 13:32:05 +10:00
Nyall Dawson
46b6ffadda Fix a bunch of QString warnings 2018-10-15 19:02:48 +10:00
Nyall Dawson
2f214c66fa Fix qgis_bench 2018-09-28 13:17:12 +10:00
Nyall Dawson
ac17d300ca DBL_MAX -> std::numeric_limits 2018-06-17 09:24:37 +10:00
Alessandro Pasotti
bf2542e8ea Also load .qgz files 2018-06-11 14:45:40 +02:00
Nyall Dawson
b69389b650 Run clang-tidy modernization checks 2018-06-05 12:50:39 +10:00
Nyall Dawson
3f6e411edb Remove some redundant geos includes 2018-04-26 17:28:59 +12:00
Nyall Dawson
3e1b99be69 Remove a bunch of Qt4 compatibility code 2018-02-06 22:39:42 +11:00
Nyall Dawson
04a9cd9211 Add more consistency to doxygen formatting 2017-10-06 08:19:00 +10:00
Nyall Dawson
92af1dacaf Replace default constructors/destructors with = default 2017-10-01 06:52:14 +10:00
Nyall Dawson
8c3939e756 More efficient use of QStrings
- use .isEmpty() instead of == QLatin1String( "" ) to check for
empty strings
- use .clear() instead of = QLatin1String( "" ) to empty a string
- remove unnecessary QString initializations
2017-09-28 05:25:51 +10:00
David Marteau
5534d743f1 Execute ln command with GNU compatible options
On some OSX macport installation, GNU commands may be used in favor
    of native commands and 'make install' fail with
         'ln: invalid option -- 'h'"

    As BSD ln support the GNU -n option as an equivalent of the -h option
    it shoud be preferred over the specific BSD option.
2017-09-15 09:27:31 +02:00
Nyall Dawson
b5ca4b4ea8 (q)sqrt -> std::sqrt 2017-08-25 03:22:15 +10:00
Nyall Dawson
031bf41d1b Swap q(pow) -> std::pow 2017-08-25 02:53:39 +10:00
Nyall Dawson
77c3be97e3 Make sure (f)abs are prefixed with std:: 2017-08-25 02:35:28 +10:00
Matthias Kuhn
82455588c8 General include cleanup
This unifies the way the include directories are handled in the
CMakeLists.txt files.
Paths are now normally relative to the root of the source- or build dir.
They may still be relative for paths withing a plugin subdirectory but
should no longer be relative to paths outside of the current source- or
build-directory.

The previous approach had resultet in many different styles which are
hard to wrap ones head around if new to the build system.
It sometimes defined includes twice
By using relative paths, it was not possible to copy paste the paths
between different files.
2017-05-19 07:13:11 +02:00
Juergen E. Fischer
135882259c include metadata headers in install (followup 3a965e6d) 2017-05-08 13:21:23 +02:00