mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
shush compiler warning
the QString length is checked by the above QString::isEmpty() call but the compiler knows not what it does Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
bdd67963ec
commit
6666303f27
1 changed files with 2 additions and 2 deletions
|
@ -1608,7 +1608,7 @@ QString QDir::cleanPath(const QString &path)
|
|||
|
||||
int used = 0, levels = 0;
|
||||
const int len = path.length();
|
||||
QSTACKARRAY(QChar, out, len);
|
||||
QStdVector<QChar> out(len);
|
||||
|
||||
const QChar *p = path.unicode();
|
||||
for (int i = 0, last = -1, iwrite = 0; i < len; ++i) {
|
||||
|
@ -1698,7 +1698,7 @@ QString QDir::cleanPath(const QString &path)
|
|||
used++;
|
||||
}
|
||||
|
||||
QString ret = (used == len ? path : QString(out, used));
|
||||
QString ret = (used == len ? path : QString(out.constData(), used));
|
||||
// Strip away last slash except for root directories
|
||||
if (ret.length() > 1 && ret.endsWith(QLatin1Char('/'))) {
|
||||
ret.chop(1);
|
||||
|
|
Loading…
Add table
Reference in a new issue