@@ -1275,7 +1275,7 @@ void KsMainWindow::_load(const QString& fileName, bool append)
pbLabel += fileName;
} else {
pbLabel += "...";
- pbLabel += fileName.mid(fileName.size() - 37, 37);
+ pbLabel += fileName.sliced(fileName.size() - 37);
}
setWindowTitle("Kernel Shark");
@@ -534,8 +534,8 @@ QVector<int> parseIdList(QString v_str)
int i = item.indexOf('-');
if (i > 0) {
/* This item is an interval. */
- int to = item.right(item.size() - i - 1).toInt();
- int from = item.left(i).toInt();
+ int to = item.sliced(i + 1).toInt();
+ int from = item.first(i).toInt();
int s = v.size();
v.resize(s + to - from + 1);
Fix Clazy warning and it is faster. Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr> --- src/KsMainWindow.cpp | 2 +- src/KsUtils.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)