From ef5732c89bc5a898941f959a7de33fa6a62b1723 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Wed, 11 Sep 2019 01:09:30 +0200 Subject: DolphinTabWidget: cleanup index-by-URL API usage Summary: Follow-up of D23655 where we didn't have time to polish the code: - add a couple of variables to make the code more clear. - remove the `get` prefix which we usually don't use in Qt code. - make the function private since it's very tied to implementation. - add a new isUrlOpen public method as wrapper. Reviewers: feverfew Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23860 --- src/dolphinmainwindow.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 32ac0e0fd..f4d5ba1d3 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -2160,10 +2160,6 @@ void DolphinMainWindow::UndoUiInterface::jobError(KIO::Job* job) bool DolphinMainWindow::isUrlOpen(const QString& url) { - if (m_tabWidget->getIndexByUrl(QUrl::fromUserInput((url))).first >= 0) { - return true; - } else { - return false; - } + return m_tabWidget->isUrlOpen(QUrl::fromUserInput((url))); } -- cgit v1.3