diff --git a/src/core/BookmarksManager.cpp b/src/core/BookmarksManager.cpp index 53e500d46..7d39fa9c0 100644 --- a/src/core/BookmarksManager.cpp +++ b/src/core/BookmarksManager.cpp @@ -158,12 +158,12 @@ BookmarksModel::Bookmark* BookmarksManager::getBookmark(const QString &text) if (text.startsWith(QLatin1Char('#'))) { - return m_model->getBookmark(text.midRef(1).toULongLong()); + return m_model->getBookmark(text.mid(1).toULongLong()); } if (text.startsWith(QLatin1String("bookmarks:"))) { - return (text.startsWith(QLatin1String("bookmarks:/")) ? m_model->getBookmarkByPath(text.mid(11)) : getBookmark(text.midRef(10).toULongLong())); + return (text.startsWith(QLatin1String("bookmarks:/")) ? m_model->getBookmarkByPath(text.mid(11)) : getBookmark(text.mid(10).toULongLong())); } return m_model->getBookmarkByKeyword(text); diff --git a/src/core/BookmarksModel.cpp b/src/core/BookmarksModel.cpp index 4c5d8213a..8e088f62f 100644 --- a/src/core/BookmarksModel.cpp +++ b/src/core/BookmarksModel.cpp @@ -1169,7 +1169,7 @@ BookmarksModel::Bookmark* BookmarksModel::getBookmarkByPath(const QString &path, if (path.startsWith(QLatin1Char('#'))) { - return getBookmark(path.midRef(1).toULongLong()); + return getBookmark(path.mid(1).toULongLong()); } Bookmark *bookmark(m_rootItem); diff --git a/src/core/InputInterpreter.cpp b/src/core/InputInterpreter.cpp index 26bf4f5dc..43242d4d9 100644 --- a/src/core/InputInterpreter.cpp +++ b/src/core/InputInterpreter.cpp @@ -71,7 +71,7 @@ InputInterpreter::InterpreterResult InputInterpreter::interpret(const QString &t if (text.startsWith(QLatin1String("bookmarks:"))) { - BookmarksModel::Bookmark *bookmark(text.startsWith(QLatin1String("bookmarks:/")) ? BookmarksManager::getModel()->getBookmarkByPath(text.mid(11)) : BookmarksManager::getBookmark(text.midRef(10).toULongLong())); + BookmarksModel::Bookmark *bookmark(text.startsWith(QLatin1String("bookmarks:/")) ? BookmarksManager::getModel()->getBookmarkByPath(text.mid(11)) : BookmarksManager::getBookmark(text.mid(10).toULongLong())); if (bookmark) { diff --git a/src/core/NetworkAutomaticProxy.cpp b/src/core/NetworkAutomaticProxy.cpp index 4a9d12b9b..d716b18b9 100644 --- a/src/core/NetworkAutomaticProxy.cpp +++ b/src/core/NetworkAutomaticProxy.cpp @@ -78,7 +78,7 @@ int PacUtils::dnsDomainLevels(const QString &host) const { if (host.startsWith(QLatin1String("www."), Qt::CaseInsensitive)) { - return host.midRef(4).count(QLatin1Char('.')); + return host.mid(4).count(QLatin1Char('.')); } return host.count(QLatin1Char('.')); diff --git a/src/ui/ToolBarDialog.cpp b/src/ui/ToolBarDialog.cpp index 02d5e7321..c08839b41 100644 --- a/src/ui/ToolBarDialog.cpp +++ b/src/ui/ToolBarDialog.cpp @@ -445,7 +445,7 @@ void ToolBarDialog::editEntry() } else if (identifier.startsWith(QLatin1String("bookmarks:"))) { - const BookmarksModel::Bookmark *bookmark(identifier.startsWith(QLatin1String("bookmarks:/")) ? BookmarksManager::getModel()->getBookmarkByPath(identifier.mid(11)) : BookmarksManager::getBookmark(identifier.midRef(10).toULongLong())); + const BookmarksModel::Bookmark *bookmark(identifier.startsWith(QLatin1String("bookmarks:/")) ? BookmarksManager::getModel()->getBookmarkByPath(identifier.mid(11)) : BookmarksManager::getBookmark(identifier.mid(10).toULongLong())); if (bookmark) { @@ -791,7 +791,7 @@ QMap ToolBarDialog::createEntryData(const QString &identifier, co } else if (identifier.startsWith(QLatin1String("bookmarks:"))) { - const BookmarksModel::Bookmark *bookmark(identifier.startsWith(QLatin1String("bookmarks:/")) ? BookmarksManager::getModel()->getBookmarkByPath(identifier.mid(11)) : BookmarksManager::getBookmark(identifier.midRef(10).toULongLong())); + const BookmarksModel::Bookmark *bookmark(identifier.startsWith(QLatin1String("bookmarks:/")) ? BookmarksManager::getModel()->getBookmarkByPath(identifier.mid(11)) : BookmarksManager::getBookmark(identifier.mid(10).toULongLong())); if (bookmark) { diff --git a/src/ui/WidgetFactory.cpp b/src/ui/WidgetFactory.cpp index 3b2d4d984..da82387c9 100644 --- a/src/ui/WidgetFactory.cpp +++ b/src/ui/WidgetFactory.cpp @@ -164,7 +164,7 @@ QWidget* createToolBarItem(const ToolBarsManager::ToolBarDefinition::Entry &defi if (definition.action.startsWith(QLatin1String("bookmarks:"))) { - BookmarksModel::Bookmark *bookmark(definition.action.startsWith(QLatin1String("bookmarks:/")) ? BookmarksManager::getModel()->getBookmarkByPath(definition.action.mid(11)) : BookmarksManager::getBookmark(definition.action.midRef(10).toULongLong())); + BookmarksModel::Bookmark *bookmark(definition.action.startsWith(QLatin1String("bookmarks:/")) ? BookmarksManager::getModel()->getBookmarkByPath(definition.action.mid(11)) : BookmarksManager::getBookmark(definition.action.mid(10).toULongLong())); if (bookmark) {