Merge lp:~aacid/unity-2d/load_24bit_pixbuf_icons into lp:unity-2d

Proposed by Albert Astals Cid on 2012-04-18
Status: Merged
Approved by: Gerry Boland on 2012-05-15
Approved revision: 1074
Merged at revision: 1096
Proposed branch: lp:~aacid/unity-2d/load_24bit_pixbuf_icons
Merge into: lp:unity-2d
Diff against target: 67 lines (+46/-4)
2 files modified
libunity-2d-private/tests/gimageutilstest.cpp (+46/-0)
tests/manual-tests/launcher.txt (+0/-4)
To merge this branch: bzr merge lp:~aacid/unity-2d/load_24bit_pixbuf_icons
Reviewer Review Type Date Requested Status
Gerry Boland 2012-04-18 Approve on 2012-05-15
Review via email: mp+102471@code.launchpad.net

Commit message

[lib] Support 24 bit pixbuf to QImage conversion (e.g. for kmag icon in Launcher)

Description of the change

Support 24 bit pixbuf to QImage conversion (e.g. for kmag icon)
UNBLOCK

To post a comment you must log in.
Gerry Boland (gerboland) wrote :

Looks good, thank you!

review: Approve
Unity Merger (unity-merger) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity-2d/275/console reported an error when processing this lp:~aacid/unity-2d/load_24bit_pixbuf_icons branch.
Not merging it.

Gerry Boland (gerboland) wrote :

Test failed with this output:

********* Start testing of GImageUtilsTest *********
Config: Using QTest library 4.8.1, Qt 4.8.1
PASS : GImageUtilsTest::initTestCase()

(process:3931): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.32.1/./gobject/gtype.c:2722: You forgot to call g_type_init()

(process:3931): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.32.1/./gobject/gtype.c:2722: You forgot to call g_type_init()

(process:3931): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion `G_TYPE_IS_INTERFACE (interface_type)' failed

(process:3931): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

(process:3931): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(process:3931): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

(process:3931): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
QFATAL : GImageUtilsTest::test24bit() Received signal 11
FAIL! : GImageUtilsTest::test24bit() Received a fatal error.
   Loc: [Unknown file(0)]
Totals: 1 passed, 1 failed, 0 skipped
********* Finished testing of GImageUtilsTest *********
/tmp/buildd/unity-2d-5.10.0+bzr1078ubuntu0+inline/tests/misc/run-with-xvfb.sh: line 19: 3931 Aborted DISPLAY=:$XID $1

Anticipate some configuration needed with Jenkins.

Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity-2d/277/console reported an error when processing this lp:~aacid/unity-2d/load_24bit_pixbuf_icons branch.
Not merging it.

1073. By Albert Astals Cid on 2012-04-25

Merge lp:unity-2d

1074. By Albert Astals Cid on 2012-04-30

Merge lp:unity-2d

Gerry Boland (gerboland) wrote :

Ok, let's try merging again.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'libunity-2d-private/tests/gimageutilstest.cpp'
2--- libunity-2d-private/tests/gimageutilstest.cpp 1970-01-01 00:00:00 +0000
3+++ libunity-2d-private/tests/gimageutilstest.cpp 2012-04-30 13:56:20 +0000
4@@ -0,0 +1,46 @@
5+ /*
6+ * This file is part of unity-2d
7+ *
8+ * Copyright 2012 Canonical Ltd.
9+ *
10+ * This program is free software; you can redistribute it and/or modify
11+ * it under the terms of the GNU General Public License as published by
12+ * the Free Software Foundation; version 3.
13+ *
14+ * This program is distributed in the hope that it will be useful,
15+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+ * GNU General Public License for more details.
18+ *
19+ * You should have received a copy of the GNU General Public License
20+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21+ */
22+
23+#include <QObject>
24+#include <unitytestmacro.h>
25+
26+#include <gdk-pixbuf/gdk-pixbuf.h>
27+
28+#include "gimageutils.h"
29+#include <config.h>
30+
31+class GImageUtilsTest : public QObject
32+{
33+ Q_OBJECT
34+private Q_SLOTS:
35+ void test24bit()
36+ {
37+ GError *err = NULL;
38+ const QString path = unity2dDirectory() + "/libunity-2d-private/tests/verification/24bit.png";
39+ const GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(path.toLocal8Bit().constData(), &err);
40+ QVERIFY(!err);
41+ const QImage image = GImageUtils::imageForPixbuf(pixbuf, path);
42+ QCOMPARE(image.width(), 32);
43+ QCOMPARE(image.height(), 32);
44+ QVERIFY(!image.isNull());
45+ }
46+};
47+
48+QAPP_TEST_MAIN(GImageUtilsTest)
49+
50+#include "gimageutilstest.moc"
51
52=== added file 'libunity-2d-private/tests/verification/24bit.png'
53Binary files libunity-2d-private/tests/verification/24bit.png 1970-01-01 00:00:00 +0000 and libunity-2d-private/tests/verification/24bit.png 2012-04-30 13:56:20 +0000 differ
54=== modified file 'tests/manual-tests/launcher.txt'
55--- tests/manual-tests/launcher.txt 2012-04-26 08:16:18 +0000
56+++ tests/manual-tests/launcher.txt 2012-04-30 13:56:20 +0000
57@@ -148,10 +148,6 @@
58
59 Verify that the progress bar appears and that the filler looks correctly centered inside the bar
60 ----
61- * Launch an application whose icon uses 24 bit per pixel instead of 32 (e.g. kmag in precise)
62-
63-Verify that the icon shows correctly in the launcher
64-----
65 * Have the launcher in always shown mode
66 * Have the launcher with more items that it can hold in screen (i.e. it is scrollable)
67 * Put the mouse in the area of the launcher that makes it autoscroll down (and don't move it for the rest of the test)

Subscribers

People subscribed via source and target branches