QString name;
// If nothing is selected, act on the current dir
- if (m_activeViewContainer->view()->selectedItems().count() == 0) {
+ if (m_activeViewContainer->view()->selectedItems().isEmpty()) {
url = m_activeViewContainer->url();
name = m_activeViewContainer->placesText();
} else {
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)));
}