diff options
| author | Marc Mutz <[email protected]> | 2015-12-29 21:51:39 +0100 |
|---|---|---|
| committer | Marc Mutz <[email protected]> | 2016-01-01 23:32:13 +0000 |
| commit | be94e009ae5d89d97456f5d1389d2a017dd2e69e (patch) | |
| tree | 179e13c32668bad6db0983a2a8cdb0d71f65b60a /src/opengl/qglshaderprogram.cpp | |
| parent | 024a52d0d12aaceffd67d0a1423408fb1f377d11 (diff) | |
QFileDialog: optimize string handling in qt_tildeExpansion
- Instead of QString::split()-ing the path, just to inspect the
first item in the list returned, simply find the location of
the first separator and work with that.
-> saves creating a QList, and its QString elements
-> saves attempted detaches of that list when calling
first()
- When extracting the user name, don't do it in a QString, do
it in a QStringRef.
- When constructing the result, don't use QString::replace(),
use QStringBuilder with a QStringRef into the original string.
- Eradicate the out parameter, it is easily calculated from the
return value.
- Don't calculate userName on VXWORKS and INTEGRITY, where it
is not used. Requires a different #ifdef sequence. Fixed
preprocessor directives' indention as a drive-by.
Costs 84b in text size on optimized GCC 4.9 Linux AMD64 builds.
Change-Id: I61f1e8d558db7fb0c5c1170bdfd6f5ac1f1a9e62
Reviewed-by: Olivier Goffart (Woboq GmbH) <[email protected]>
Diffstat (limited to 'src/opengl/qglshaderprogram.cpp')
0 files changed, 0 insertions, 0 deletions
