Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Thomas Schöps
kdevelop
Commits
089d0c88
Commit
089d0c88
authored
Aug 25, 2019
by
Friedrich W. H. Kossebau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop static caching of result of QDir::separator(), no real gain
GIT_SILENT
parent
9c2057f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
kdevplatform/language/backgroundparser/backgroundparser.cpp
kdevplatform/language/backgroundparser/backgroundparser.cpp
+1
-2
No files found.
kdevplatform/language/backgroundparser/backgroundparser.cpp
View file @
089d0c88
...
...
@@ -68,7 +68,6 @@ const bool separateThreadForHighPriority = true;
*/
QString
elidedPathLeft
(
const
QString
&
path
,
int
width
)
{
static
const
QChar
separator
=
QDir
::
separator
();
static
const
QString
placeholder
=
QStringLiteral
(
"..."
);
if
(
path
.
size
()
<=
width
)
{
...
...
@@ -76,7 +75,7 @@ QString elidedPathLeft(const QString& path, int width)
}
int
start
=
(
path
.
size
()
-
width
)
+
placeholder
.
size
();
int
pos
=
path
.
indexOf
(
separator
,
start
);
int
pos
=
path
.
indexOf
(
QDir
::
separator
()
,
start
);
if
(
pos
==
-
1
)
{
pos
=
start
;
// no separator => just cut off the path at the beginning
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment