6.5.3 clean

This commit is contained in:
kleuter
2023-11-01 18:02:52 +01:00
parent bbe896803b
commit 7018d9e6c8
2170 changed files with 57471 additions and 43550 deletions

View File

@ -56,6 +56,10 @@ set(tst_qicon_resource_files
"./icons/themeparent/index.theme"
"./icons/themeparent/scalable/actions/address-book-new.svg"
"./icons/themeparent/scalable/actions/appointment-new.svg"
"./icons/fallbacktheme/index.theme"
"./icons/fallbacktheme/16x16/edit-cut.png"
"./icons/hicolor/index.theme"
"./icons/hicolor/16x16/hicolor-icon.png"
"./second_icons/testtheme/32x32/actions/appointment-new.png"
"./styles/commonstyle/images/standardbutton-open-128.png"
"./styles/commonstyle/images/standardbutton-open-16.png"

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

View File

@ -0,0 +1,8 @@
[Icon Theme]
Name=fallbacktheme
Directories=16x16
[16x16]
Size=16
Type=Fixed

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

View File

@ -0,0 +1,11 @@
[Icon Theme]
Name=hicolor
# Provide a minimal hicolor theme, so that our hicolor fallback
# lookup during testing will find that theme on all systems.
Directories=16x16
[16x16]
Size=16
Type=Fixed

View File

@ -1,7 +1,7 @@
[Icon Theme]
_Name=Test
_Comment=Test Theme
Inherits=crystalsvg, themeparent
Inherits=themeparent
Example=x-directory-normal
# KDE Specific Stuff

View File

@ -1,7 +1,6 @@
[Icon Theme]
_Name=Test
_Comment=Test Theme
Inherits=gnome,crystalsvg
Example=x-directory-normal
# KDE Specific Stuff

View File

@ -717,14 +717,38 @@ void tst_QIcon::fromTheme()
QCOMPARE(i.availableSizes(), abIcon.availableSizes());
}
// Check that setting a fallback theme invalidates earlier lookups
QVERIFY(QIcon::fromTheme("edit-cut").isNull());
QIcon::setFallbackThemeName("fallbacktheme");
QVERIFY(!QIcon::fromTheme("edit-cut").isNull());
// Make sure setting the theme name clears the state
QIcon::setThemeName("");
abIcon = QIcon::fromTheme("address-book-new");
QVERIFY(abIcon.isNull());
// Test fallback icon behavior for empty theme names.
// Can only reliably test this on systems that don't have a
// named system icon theme.
QIcon::setThemeName(""); // Reset user-theme
if (QIcon::themeName().isEmpty()) {
// Test icon from fallback theme even when theme name is empty
QIcon::setFallbackThemeName("fallbacktheme");
QVERIFY(!QIcon::fromTheme("edit-cut").isNull());
// Test icon from fallback path even when theme name is empty
fallbackIcon = QIcon::fromTheme("red");
QVERIFY(!fallbackIcon.isNull());
QVERIFY(QIcon::hasThemeIcon("red"));
QCOMPARE(fallbackIcon.availableSizes().size(), 1);
}
// Passing a full path to fromTheme is not very useful, but should work anyway
QIcon fullPathIcon = QIcon::fromTheme(m_pngImageFileName);
QVERIFY(!fullPathIcon.isNull());
// Restore to system fallback theme
QIcon::setFallbackThemeName("");
}
static inline QString findGtkUpdateIconCache()