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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
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 (community) Approve
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.
Revision history for this message
Gerry Boland (gerboland) wrote :

Looks good, thank you!

review: Approve
Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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

Merge lp:unity-2d

1074. By Albert Astals Cid

Merge lp:unity-2d

Revision history for this message
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
=== added file 'libunity-2d-private/tests/gimageutilstest.cpp'
--- libunity-2d-private/tests/gimageutilstest.cpp 1970-01-01 00:00:00 +0000
+++ libunity-2d-private/tests/gimageutilstest.cpp 2012-04-30 13:56:20 +0000
@@ -0,0 +1,46 @@
1 /*
2 * This file is part of unity-2d
3 *
4 * Copyright 2012 Canonical Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 3.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include <QObject>
20#include <unitytestmacro.h>
21
22#include <gdk-pixbuf/gdk-pixbuf.h>
23
24#include "gimageutils.h"
25#include <config.h>
26
27class GImageUtilsTest : public QObject
28{
29 Q_OBJECT
30private Q_SLOTS:
31 void test24bit()
32 {
33 GError *err = NULL;
34 const QString path = unity2dDirectory() + "/libunity-2d-private/tests/verification/24bit.png";
35 const GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(path.toLocal8Bit().constData(), &err);
36 QVERIFY(!err);
37 const QImage image = GImageUtils::imageForPixbuf(pixbuf, path);
38 QCOMPARE(image.width(), 32);
39 QCOMPARE(image.height(), 32);
40 QVERIFY(!image.isNull());
41 }
42};
43
44QAPP_TEST_MAIN(GImageUtilsTest)
45
46#include "gimageutilstest.moc"
047
=== added file 'libunity-2d-private/tests/verification/24bit.png'
1Binary 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 differ48Binary 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
=== modified file 'tests/manual-tests/launcher.txt'
--- tests/manual-tests/launcher.txt 2012-04-26 08:16:18 +0000
+++ tests/manual-tests/launcher.txt 2012-04-30 13:56:20 +0000
@@ -148,10 +148,6 @@
148148
149Verify that the progress bar appears and that the filler looks correctly centered inside the bar149Verify that the progress bar appears and that the filler looks correctly centered inside the bar
150----150----
151 * Launch an application whose icon uses 24 bit per pixel instead of 32 (e.g. kmag in precise)
152
153Verify that the icon shows correctly in the launcher
154----
155 * Have the launcher in always shown mode151 * Have the launcher in always shown mode
156 * Have the launcher with more items that it can hold in screen (i.e. it is scrollable)152 * Have the launcher with more items that it can hold in screen (i.e. it is scrollable)
157 * 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)153 * 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