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
Nyall Dawson
7c5aa050d1
(q)ceil -> std::ceil
2017-08-25 03:01:48 +10:00
Juergen E. Fischer
0a1517bfaa
header cleanups
2017-03-04 02:38:15 +01:00
Juergen E. Fischer
a10c890383
More QgsSettings updates:
...
* revives WMS
* QgsSettings::clear() added
* section added to QgsSettings::contains()
* type parameter added to sip binding of QgsSettings.value()
* TODO: customization & evis
2017-03-04 02:37:59 +01:00
Juergen E. Fischer
b9162dccdf
scripts/astyle-all.sh run
2017-03-03 15:37:12 +01:00
Nyall Dawson
b0bc763475
Bump minimum GDAL version to 2.0, remove old version #ifdefs
2017-01-03 15:10:28 +10:00
Matthias Kuhn
dfd9833467
Let all tests work with a proper QgsApplication instance
2016-12-20 01:20:08 +01: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
c628c0f434
Rework includes to forward declare as much as possible
...
Should speed up recompilation when headers change
2016-07-18 19:10:19 +10:00
Juergen E. Fischer
8214608169
more nullptr updates (folloup 320c696)
2015-12-16 16:29:29 +01:00
Nyall Dawson
ee720796a3
Change size()/count() == 0 and count() > 0 to isEmpty() checks
...
Because:
- easier to read
- follows recommendations by clazy/KDAB
- potentially performance benefits
2015-12-08 22:45:06 +11:00
Nyall Dawson
4f7509530a
Remove some unnecessary trailing ;
...
(Gets rid of annoying squiggle warnings from Qt Creator!)
2015-11-02 18:07:04 +11:00
Nyall Dawson
5ed3d1b73f
Use QString::arg multi argument method to avoid extra heap allocations
2015-10-15 17:51:06 +11:00
Nyall Dawson
c49b5b777f
Change a lot of arguments to const references in core/gui
...
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Nyall Dawson
fefd85adef
Fix some leaks
2015-09-28 18:42:24 +10:00
Nyall Dawson
f628ebd423
Replace foreach with Q_FOREACH
...
For:
- consistency
- to make it immediately clear that this is a Qt macro and that it
works slightly differently to c++ for loops
2015-09-09 19:17:29 +10:00
Nyall Dawson
7c10760225
Followup 73ffb83a, finishing changing all Q_FOREACH to references
2015-09-09 19:17:19 +10:00
Juergen E. Fischer
9b976cfe26
test cleanups and some fixes
2015-07-02 04:22:52 +02:00
Juergen E. Fischer
ed581aee78
indentation update II
2015-06-10 15:50:41 +02:00
Denis Rouzaud
9e3183c63f
Revert "sort includes"
...
This reverts commit 2b7d3d3c73b50ba6dc74abec6dd652ff1b87c0ec.
2015-06-10 14:54:47 +02:00
Denis Rouzaud
2b7d3d3c73
sort includes
2015-06-10 13:59:08 +02:00
Juergen E. Fischer
a3668f5853
more coverity fixes
2015-02-07 02:31:42 +01:00
Nyall Dawson
cb5ef020f3
Avoid 'array compared against 0' error for QgsRasterLayer constructor
...
... by explicitly passing QString arguments. Otherwise the string
literals are implictly converted to bool and the wrong constructor
is called.
This is not an ideal solution as the API is still misleading, but I
can't see an alternative solution without breaking API and making
one of the constructors explicit or changing their signature.
2015-02-04 17:18:35 +11:00
Juergen E. Fischer
bff64fdef9
indentation update
2014-12-30 22:47:09 +01:00
Radim Blazek
69b27f04be
ziplayertest fix
2014-12-12 19:27:41 +01:00
Matthias Kuhn
cae6baea90
Formatting of tests
2014-11-21 11:45:33 +01:00
Matthias Kuhn
95f6483855
Fix some race condition segfaults of tests on exit
2014-11-21 11:45:32 +01:00
Matthias Kuhn
78c519546a
Add Qt5 support
2014-11-21 11:45:32 +01:00
Matthias Kuhn
1c2bdf1ea3
Switch tests to automoc
...
Required for Qt5 compatibility
Raises minimum CMake version to 2.8.6
2014-11-04 09:18:26 +01:00
Juergen E. Fischer
10f3cf38fa
more QuantumGIS => QGIS updates
2013-06-09 18:52:05 +02:00
Juergen E. Fischer
d0aa1e47e8
indentation update
2013-05-02 00:02:25 +02:00
Etienne Tourigny
ddbfb2e8ea
restore zip raster layer style test - still needs a test for vector layers
2013-04-28 11:55:45 -03:00
Etienne Tourigny
785f614a4e
remove invalid layers from zip test files
2013-04-28 11:19:14 -03:00
Etienne Tourigny
02fa7292c6
add temporary output for zip test
2013-04-26 09:01:33 -03:00
Juergen E. Fischer
c9c3aa03ac
also remove transparency tests
2013-04-08 22:46:16 +02:00
Martin Dobias
7cc3031f88
[API] Removed old symbology's QgsRenderer
2013-04-07 23:46:57 +02:00
Etienne Tourigny
7d0d5d3267
scanItemsInBrowser2/scanZipInBrowser2 : remove QgsApplication::upgradeConfig() and fix tests
2012-11-15 16:30:42 -02:00
Etienne Tourigny
b754f0771f
add QgsApplication::upgradeConfig to upgrade any configs that changed from 1.8
...
use different keys for scanItemsInBrowser and scanZipInBrowser in qgis-1.9 because new storage type (string vs. int) causes conflicts with 1.8
2012-11-06 18:17:54 -02:00
Juergen E. Fischer
97309b1ec6
test fixes:
...
- fix TestQgsRectangle build error
- disable TestStyleV2::testSaveLoad() test while QgsStyleV2::save() is defunct
- used temporary copy of testzip.zip in TestZipLayer so that original is not modified
2012-08-17 20:22:21 +02:00
Juergen E. Fischer
5ae312cfad
add 'foreach' to astyle and re-run indentation
2012-08-03 06:57:11 +02:00
Etienne Tourigny
dabc492151
tidy up tests/testdata dir
2012-07-14 15:42:07 -03:00
Juergen E. Fischer
0d4d1fc206
run TestZipLayer::testTarItemSubfolder() only on GDAL>=1.8
2012-06-21 10:02:45 +02:00
Etienne Tourigny
a4a85cbf37
add support for .tar/.tgz files and relevant tests ; delay scan of .tgz files and large .zip files until requested
2012-06-17 00:06:03 +02:00
Etienne Tourigny
4aab209400
remove Passthru option and change storage of options scanZipInBrowser and scanItemsInBrowser
2012-06-17 00:06:03 +02:00
Juergen E. Fischer
a1bf57adfb
fix test debug output
2012-05-30 14:19:12 +02:00
Etienne Tourigny
8a6e88dfec
skip vrt-in-zip test for gdal<1.7
2012-05-30 14:14:18 +02:00
Etienne Tourigny
589460b2dc
add tests for QgsDataItem - verify that .gz and .vrt files are not recognized as both gdal and ogr items (bug #5636 )
2012-05-28 00:16:50 -03:00
Etienne Tourigny
f11878b627
fix zip file reading for gdal<1.9 and add test for folder-in-zip
2012-05-20 12:45:11 +02:00
Etienne Tourigny
f60d40aa10
use VSIReadDir() from gdal instead of quazip for listing .zip files and remove quazip entirely, including HAVE_ZLIB variable ; set default scanZip to 2 (Basic Scan)
2012-05-08 13:24:03 -03:00
Etienne Tourigny
e23e21f907
fix ziplayer handling for windows
2012-05-08 13:20:00 -03:00