diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-03 13:49:53 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-04 07:56:58 +0000 |
commit | 97af2386566f5d7f2c209a991c91b5055200fb87 (patch) | |
tree | bdeab40cf539e591165e985740a164f5b0ad7a84 /src/plugins/bookmarks | |
parent | 30b1e70c4238a757afb93c247240911c71e620d8 (diff) | |
download | qt-creator-97af2386566f5d7f2c209a991c91b5055200fb87.tar.gz |
Preferably use QStringRef::toInt().
Avoid allocations for converting to int.
Change-Id: Id8c79334f4809ec075ffe7e6b7635be4873eafd8
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/bookmarks')
-rw-r--r-- | src/plugins/bookmarks/bookmarkmanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp index aeaa2ff862..ec9c2f7f49 100644 --- a/src/plugins/bookmarks/bookmarkmanager.cpp +++ b/src/plugins/bookmarks/bookmarkmanager.cpp @@ -809,7 +809,7 @@ void BookmarkManager::addBookmark(const QString &s) if (index3 != -1 || index2 != -1 || index1 != -1) { const QString &filePath = s.mid(index1+1, index2-index1-1); const QString ¬e = s.mid(index3 + 1); - const int lineNumber = s.mid(index2 + 1, index3 - index2 - 1).toInt(); + const int lineNumber = s.midRef(index2 + 1, index3 - index2 - 1).toInt(); if (!filePath.isEmpty() && !findBookmark(filePath, lineNumber)) { Bookmark *b = new Bookmark(lineNumber, this); b->updateFileName(filePath); |