diff options
| author | Elvis Angelaccio <[email protected]> | 2019-09-11 01:09:30 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2019-09-14 13:37:09 +0200 |
| commit | ef5732c89bc5a898941f959a7de33fa6a62b1723 (patch) | |
| tree | fa8af7dc7e9f0fed91b4f7bf0bd3e904f73330fb /src/dolphinmainwindow.cpp | |
| parent | abbb98f57b67063dda973817985aefac6ee35409 (diff) | |
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
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
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))); } |
