From 653d5714a7690bd2dca36a39fc92c0ab1926fab5 Mon Sep 17 00:00:00 2001 From: Méven Car Date: Tue, 24 Nov 2020 18:07:56 +0100 Subject: Tabs: ensure to have folder icons for remote folders KIO::iconForUrl relies on filename to find the icon for remote files. Appending / at the end of the filename allows it to interpret it as a folder. This causes inconsistent tab icons. To reproduce: Open in a tab a url on a smb or sftp folder, i.e sftp:/my-server/photos Before: Icon is a cloud. After: Icon is a folder Previously a folder icon could be presented if the tab was first opened with a url with a trailing / --- src/tests/dolphinmainwindowtest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/tests') diff --git a/src/tests/dolphinmainwindowtest.cpp b/src/tests/dolphinmainwindowtest.cpp index 40f8f6bcd..b40d3dbbf 100644 --- a/src/tests/dolphinmainwindowtest.cpp +++ b/src/tests/dolphinmainwindowtest.cpp @@ -211,7 +211,8 @@ void DolphinMainWindowTest::testOpenInNewTabTitle() QCOMPARE(tabWidget->count(), 2); QVERIFY(tabWidget->tabText(0) != tabWidget->tabText(1)); if (!tabWidget->tabIcon(0).isNull() && !tabWidget->tabIcon(1).isNull()) { - QVERIFY(tabWidget->tabIcon(0).name() != tabWidget->tabIcon(1).name()); + QCOMPARE(QStringLiteral("inode-directory"), tabWidget->tabIcon(0).name()); + QCOMPARE(QStringLiteral("inode-directory"), tabWidget->tabIcon(1).name()); } } -- cgit v1.3