95 Commits

Author SHA1 Message Date
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
Juergen E. Fischer
21f81fb2a2 fix 98c89ccab 2017-04-30 12:01:58 +02:00
Juergen E. Fischer
98c89ccabe also accept uppercase .qgs as project extension (fixes #15871) 2017-04-29 13:53:28 +02:00
Nyall Dawson
3c4a9fd419 Daily connectification 2017-04-05 09:53:50 +10:00
Juergen E. Fischer
b9162dccdf scripts/astyle-all.sh run 2017-03-03 15:37:12 +01:00
Nyall Dawson
20c07a58e6 Remove support for disabling OTF reprojection
Because
- OTF reprojection is mature and stable
- Should be no cost when not required - transforms are shortcut
when not required
- Reduces code complexity
- Canvas OTF support was being incorrectly used as a flag for
whether measurements should be made in ellipsoidal mode. Instead
the project's ellipsoid setting should be checked for this.
- Should simplify behavior for new users
2017-03-01 07:29:35 +10:00
Andreas Sturmlechner
f9a064310a Don't link to QtWebKit when it's disabled 2017-02-24 11:10:11 +01:00
Denis Rouzaud
7812d4fb17 remove the-prefix from source code
this might result in variables having the same name as some methods
2017-02-21 18:14:58 +01:00
Nyall Dawson
d19e70700f Ensure all pointer variables are initialized to nullptr 2017-02-18 20:23:18 +10:00
Nyall Dawson
7b14373a8e Fix some coverity uninitialized variable warnings 2017-01-27 09:55:12 +10:00
Juergen E. Fischer
6a56cb0dd0 updates and fixes for windows qt5/py3 build 2017-01-24 01:25:59 +01:00
Denis Rouzaud
0a63d1f2c2 [spellcheck] properly look into various cases and add more fixes" 2017-01-16 16:39:20 +01:00
Nyall Dawson
b5480633e4 Standardise names for static variables
All non-const variables are prefixed with "s", all const
statics are ALL_CAPS
2017-01-14 16:40:24 +10:00
Denis Rouzaud
6c74e4ea5d spelling fixes 2017-01-12 22:01:50 +01:00
Denis Rouzaud
748be8de71 [spelling] replace behaviour by behavior 2017-01-11 11:35:19 +01:00
Matthias Kuhn
0302719cf0 Add qgis_core.h to with CORE_EXPORT macro
This removes complexity from the compiler flags because defines
happen in a file.
2017-01-05 00:12:11 +01:00
Martin Dobias
6c5956b22b QgsProject: cleanup of read/write method + removal of unused bad layer handler class 2017-01-04 20:29:53 +08:00
Matthias Kuhn
dfd9833467 Let all tests work with a proper QgsApplication instance 2016-12-20 01:20:08 +01:00
Martin Dobias
c143be7a73 QgsMapSettings and QgsComposerMap store layers for rendering as weak pointers
... instead of using layer IDs which need to be resolved using QgsProject
2016-12-10 18:50:52 +08:00
Martin Dobias
d56a97d4fe Merge QgsMapLayerRegistry into QgsProject
All methods/signals of QgsMapLayerRegistry moved verbatim to QgsProject.
2016-12-10 15:18:12 +08:00
Nyall Dawson
4166a3ea62 Fix most clazy qstring-unneeded-heap-allocations warnings
By flipping string literals to QStringLiteral/QLatin1String

see

https://woboq.com/blog/qstringliteral.html
2016-10-24 15:26:24 +10:00
Nyall Dawson
ef5110732b Fix clazy "qstring-ref" warnings
From the clazy docs:

Finds places where QString::fooRef() should be used instead of
QString::foo(), to avoid temporary heap allocations

eg

str.mid(5).toInt(ok) // BAD

str.midRef(5).toInt(ok) // GOOD
2016-10-22 22:46:14 +10:00
Juergen E. Fischer
d9349e5bbb update configuration settings to qgis3 2016-10-06 11:40:42 +02:00
Nyall Dawson
83ad380bd6 Switch QT4_* macros to QT5 2016-09-21 09:12:54 +10:00
Nyall Dawson
06d2d79185 Make sure files are truncated before writing 2016-09-14 15:12:36 +10:00
Nyall Dawson
4cfacf14e3 Make API more consistent
- rename methods with XML to Xml, CRS to Crs, WMS to Wms, ID to Id
- rename methods with SRS to Crs
- rename methods with abbreviations like "dest" to "destination"
- rename methods with abbreviations like "src" to "source"
2016-07-21 08:40:50 +10:00
Matthias Kuhn
7b3e667282 Remove more debug noise 2016-06-12 16:05:40 +02:00