summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2016-02-05 12:22:26 +0100
committerDavid Faure <david.faure@kdab.com>2016-02-15 13:53:54 +0000
commitbbc830ce3e9933767924452d416923a4fa6fa5da (patch)
tree96d16cea6a0e293ebc01c514f2b304f45e6fb7d8 /tests
parente8ed29d67922264e9e986cbc9b9b4de701e26d36 (diff)
QIcon::fromTheme(): add support for absolute paths.
This allows methods that return an icon name, to sometimes also return an icon full path (e.g. because the icon was dynamically generated and stored into a local cache on disk) Change-Id: Ib01c3955f4b64236463846241d9814b2d0686634 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp
index ff88b62c32..079b14a64e 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.cpp
+++ b/tests/auto/gui/image/qicon/tst_qicon.cpp
@@ -642,6 +642,10 @@ void tst_QIcon::fromTheme()
QIcon::setThemeName("");
abIcon = QIcon::fromTheme("address-book-new");
QVERIFY(abIcon.isNull());
+
+ // Passing a full path to fromTheme is not very useful, but should work anyway
+ QIcon fullPathIcon = QIcon::fromTheme(m_pngImageFileName);
+ QVERIFY(!fullPathIcon.isNull());
}
void tst_QIcon::fromThemeCache()