All your uses of toUtf8().data() actually just need a const char*
So use constData() that is semantically more correct, and documented
to be faster.
From http://doc.qt.io/qt-5/qbytearray.html#data
"For read-only access, constData() is faster because it never
causes a deep copy to occur."
* make QgsWkbTypes a Q_GADGET and declare GeometryType as Q_ENUM
* include QObject
* remove extra include
* move QgsWkbTypes to moc headers
* run sip_include
Fixes an issue identified in the upcoming QGIS Map Design 2nd ed
(spoiler alert!) where it's impossible to utilise label text
substitutions if you also want to use word wrapping.
This isn't possible to directly fix, because we need to evaluate
the full label expression (including the word wrapping component)
in order to actually HAVE text to substitute into.
So, a new setting has been added to the label formatting tab
allowing users to directly set an auto-wrapping line ideal
line size. This is applied AFTER label text evaluation, substitutions,
and the 'wrap text on' character, so it can play correctly well with
all these other settings. This also has the nice side-effect
of making auto label text wrapping more accessible to new
users/those unfamiliar with the wordwrap expression function.
Fixes#20007, and cleans up a chapter of QMD 2ed ;)
QStyle::standardPixmap is deprecated and not hi-dpi friendly.
Unfortunately, there's no equivalent of QIcon::addPixmap
for QIcons themselves -- so it's **impossible** in current Qt
API to handle the ON/OFF icon states.
Believe me... there's NOOOOOOO way. I've looked. I've tried.
It's not possible.
This means we have to change the logic for showing open/closed
folders in browser. This commit revises the logic to show the
open icon for any *populated* folders, regardless of whether
they are opened or not.
Avoid conversion to/from WKB at OGR/QGIS side, and just directly
utilise OGR geometry API to construct QGIS geometries.
Shaves ~10% off rendering time for a large point layer (GPKG)
The issue was that during drag&drop, we first connect to layer's signal
for the second time, but then the disconnect() call on removal of the original
layer node would disconnect all connections (not just one). For that reason
now we only connect/disconnect when the layer is in the tree only once.
to control if changes can be saved or not. This signal is emitted before a layer is being saved and if a connected slot marks the canCommit variable as False, the layer will not be saved
And require that showing help is opt-in. Apart from a handful
of built-in providers, most providers will not have help pages
available within the QGIS documentation (including model and
script algorithms). Accordingly, we should hide the help button
by default and only show it for these selected providers.
Note that 3rd party algorithms can still specify custom helpUrl
urls, in which case the button WILL be shown.