Trolltech Home | Qtopia-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qtopia-interest Archive, March 2007
Missing icons


Message 1 in thread

Hello,
I am running qtopia 4.2.1 on an ARM-based board, but am missing icons. 
On the screen which should look something like:
http://www.trolltech.com/images/products/qtopia/phone_edition_4_gridshot.jpg/image

, I see the background image and button outlines, but no icons (see 
attached image).

When I press an arrow button, I guess qpe wants to redraw some icons and 
  I see messages like this on stdout:

QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::save: Painter not active
QPainter::setMatrix: Painter not active
QPainter::setMatrix: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setMatrix: Painter not active
QPainter::setMatrix: Painter not active

I'm not sure if it matters, but on my target file system, I have the 
file /opt/Qtopia/pics/qpe/SettingsIcon.svg, but no corresponding PNG 
file.  I noticed in some cases there are both SVG and PNG versions of a 
file:

/opt/Qtopia/pics/appearance/icons/background.png
/opt/Qtopia/pics/appearance/icons/background.svg

, so as an experiment, I created SettingsIcon.png and restarted qpe, but 
saw no change.

Is there something simple I missed during configuration or in the 
environment?


Thanks!
,
John Faith
Freescale Semiconductor

PNG image

PNG image


Message 2 in thread

John Faith wrote:
> Hello,
> I am running qtopia 4.2.1 on an ARM-based board, but am missing icons. 
> On the screen which should look something like:
> http://www.trolltech.com/images/products/qtopia/phone_edition_4_gridshot.jpg/image 
> 
> 
> , I see the background image and button outlines, but no icons (see 
> attached image).
> 
> When I press an arrow button, I guess qpe wants to redraw some icons and 
>  I see messages like this on stdout:
> 
> QPainter::begin: Paint device returned engine == 0, type: 3
> QPainter::save: Painter not active
> QPainter::setMatrix: Painter not active
> QPainter::setMatrix: Painter not active
> QPainter::setRenderHint: Painter must be active to set rendering hints
> QPainter::setRenderHint: Painter must be active to set rendering hints
> QPainter::setMatrix: Painter not active
> QPainter::setMatrix: Painter not active
> 
> I'm not sure if it matters, but on my target file system, I have the 
> file /opt/Qtopia/pics/qpe/SettingsIcon.svg, but no corresponding PNG 
> file.  I noticed in some cases there are both SVG and PNG versions of a 
> file:
> 
> /opt/Qtopia/pics/appearance/icons/background.png
> /opt/Qtopia/pics/appearance/icons/background.svg
> 
> , so as an experiment, I created SettingsIcon.png and restarted qpe, but 
> saw no change.
> 
> Is there something simple I missed during configuration or in the 
> environment?
> 
> 
> Thanks!
> ,
> John Faith
> Freescale Semiconductor
> 
> ------------------------------------------------------------------------
> 

Did you run 'make install'? and then use Qtopia as well as the sqlite db 
that was created in image/ ?

Icons and application paths are now stored in the database, .desktop 
files are only used at compile/install time for Qtopia.



-- 
 [ signature omitted ] 

Message 3 in thread

Lorn Potter wrote:
> John Faith wrote:
>> Hello,
>> I am running qtopia 4.2.1 on an ARM-based board, but am missing icons. 
>> On the screen which should look something like:
>> http://www.trolltech.com/images/products/qtopia/phone_edition_4_gridshot.jpg/image 
>>
>>
>> , I see the background image and button outlines, but no icons (see 
>> attached image).
>>
>> When I press an arrow button, I guess qpe wants to redraw some icons 
>> and  I see messages like this on stdout:
>>
>> QPainter::begin: Paint device returned engine == 0, type: 3
>> QPainter::save: Painter not active
>> QPainter::setMatrix: Painter not active
>> QPainter::setMatrix: Painter not active
>> QPainter::setRenderHint: Painter must be active to set rendering hints
>> QPainter::setRenderHint: Painter must be active to set rendering hints
>> QPainter::setMatrix: Painter not active
>> QPainter::setMatrix: Painter not active
>>
>> I'm not sure if it matters, but on my target file system, I have the 
>> file /opt/Qtopia/pics/qpe/SettingsIcon.svg, but no corresponding PNG 
>> file.  I noticed in some cases there are both SVG and PNG versions of 
>> a file:
>>
>> /opt/Qtopia/pics/appearance/icons/background.png
>> /opt/Qtopia/pics/appearance/icons/background.svg
>>
>> , so as an experiment, I created SettingsIcon.png and restarted qpe, 
>> but saw no change.
>>
>> Is there something simple I missed during configuration or in the 
>> environment?
>>
>>
>> Thanks!
>> ,
>> John Faith
>> Freescale Semiconductor
>>
>> ------------------------------------------------------------------------
>>
> 
> Did you run 'make install'? and then use Qtopia as well as the sqlite db 
> that was created in image/ ?
> 
> Icons and application paths are now stored in the database, .desktop 
> files are only used at compile/install time for Qtopia.
> 
> 
> 

Hi Lorn,
Yes, I did do 'make install' and the timestanp on image/qtopia_db.sqlite 
looks correct, but we have other steps in our build system which puts 
files in a target binary RPM, so maybe that has messed up paths.

Are there host tools in qtopia to modify the database file, or is there 
a place in the build where I might need to make changes?  The file is 
created in src/tools/content_installer/main.cpp, right?

Thanks,
John Faith
Freescale Semiconductor

--
 [ signature omitted ] 

Message 4 in thread

John Faith wrote:
> Lorn Potter wrote:
>> John Faith wrote:
>>> Hello,
>>> I am running qtopia 4.2.1 on an ARM-based board, but am missing 
>>> icons. On the screen which should look something like:
>>> http://www.trolltech.com/images/products/qtopia/phone_edition_4_gridshot.jpg/image 
>>>
>>>
>>> , I see the background image and button outlines, but no icons (see 
>>> attached image).
>>>
>>> When I press an arrow button, I guess qpe wants to redraw some icons 
>>> and  I see messages like this on stdout:
>>>
>>> QPainter::begin: Paint device returned engine == 0, type: 3
>>> QPainter::save: Painter not active
>>> QPainter::setMatrix: Painter not active
>>> QPainter::setMatrix: Painter not active
>>> QPainter::setRenderHint: Painter must be active to set rendering hints
>>> QPainter::setRenderHint: Painter must be active to set rendering hints
>>> QPainter::setMatrix: Painter not active
>>> QPainter::setMatrix: Painter not active
>>>
>>> I'm not sure if it matters, but on my target file system, I have the 
>>> file /opt/Qtopia/pics/qpe/SettingsIcon.svg, but no corresponding PNG 
>>> file.  I noticed in some cases there are both SVG and PNG versions of 
>>> a file:
>>>
>>> /opt/Qtopia/pics/appearance/icons/background.png
>>> /opt/Qtopia/pics/appearance/icons/background.svg
>>>
>>> , so as an experiment, I created SettingsIcon.png and restarted qpe, 
>>> but saw no change.
>>>
>>> Is there something simple I missed during configuration or in the 
>>> environment?
>>>
>>>
>>> Thanks!
>>> ,
>>> John Faith
>>> Freescale Semiconductor
>>>
>>> ------------------------------------------------------------------------
>>>
>>
>> Did you run 'make install'? and then use Qtopia as well as the sqlite 
>> db that was created in image/ ?
>>
>> Icons and application paths are now stored in the database, .desktop 
>> files are only used at compile/install time for Qtopia.
>>
>>
>>
> 
> Hi Lorn,
> Yes, I did do 'make install' and the timestanp on image/qtopia_db.sqlite 
> looks correct, but we have other steps in our build system which puts 
> files in a target binary RPM, so maybe that has messed up paths.
> 
> Are there host tools in qtopia to modify the database file, or is there 
> a place in the build where I might need to make changes?  The file is 
> created in src/tools/content_installer/main.cpp, right?
> 
> Thanks,
> John Faith
> Freescale Semiconductor
> 
> -- 
> To unsubscribe - send "unsubscribe" in the subject to 
> qtopia-interest-request@xxxxxxxxxxxxx
> 

Hi Lorn,
I used the SQLite command line tools and dumped the (6) tables in 
qtopia_db.sqlite.  In the locationLookup table (assuming it's the right 
place to look), I have:

INSERT INTO "locationLookup" VALUES(1, '/opt/Qtopia/apps/Settings');
INSERT INTO "locationLookup" VALUES(2, '/opt/Qtopia/etc/SystemRingTones');
INSERT INTO "locationLookup" VALUES(3, '/opt/Qtopia/plugins/inputmethods');
INSERT INTO "locationLookup" VALUES(4, '/opt/Qtopia/apps/Applications');
INSERT INTO "locationLookup" VALUES(5, '/opt/Qtopia/apps/Games');

The SystemRingTones and inputmethods paths exist on my target, but 
there's no "/opt/Qtopia/apps".  I only see the apps directory in the 
source, which has the .desktop files.

Thanks,
John Faith
Freescale Semiconductor

--
 [ signature omitted ] 

Message 5 in thread

John Faith wrote:
> John Faith wrote:
>> Lorn Potter wrote:
>>> John Faith wrote:
>>>> Hello,
>>>> I am running qtopia 4.2.1 on an ARM-based board, but am missing 
>>>> icons. On the screen which should look something like:
>>>> http://www.trolltech.com/images/products/qtopia/phone_edition_4_gridshot.jpg/image 
>>>>
>>>>
>>>> , I see the background image and button outlines, but no icons (see 
>>>> attached image).
>>>>
>>>> When I press an arrow button, I guess qpe wants to redraw some icons 
>>>> and  I see messages like this on stdout:
>>>>
>>>> QPainter::begin: Paint device returned engine == 0, type: 3
>>>> QPainter::save: Painter not active
>>>> QPainter::setMatrix: Painter not active
>>>> QPainter::setMatrix: Painter not active
>>>> QPainter::setRenderHint: Painter must be active to set rendering hints
>>>> QPainter::setRenderHint: Painter must be active to set rendering hints
>>>> QPainter::setMatrix: Painter not active
>>>> QPainter::setMatrix: Painter not active
>>>>
>>>> I'm not sure if it matters, but on my target file system, I have the 
>>>> file /opt/Qtopia/pics/qpe/SettingsIcon.svg, but no corresponding PNG 
>>>> file.  I noticed in some cases there are both SVG and PNG versions 
>>>> of a file:
>>>>
>>>> /opt/Qtopia/pics/appearance/icons/background.png
>>>> /opt/Qtopia/pics/appearance/icons/background.svg
>>>>
>>>> , so as an experiment, I created SettingsIcon.png and restarted qpe, 
>>>> but saw no change.
>>>>
>>>> Is there something simple I missed during configuration or in the 
>>>> environment?
>>>>
>>>>
>>>> Thanks!
>>>> ,
>>>> John Faith
>>>> Freescale Semiconductor
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>
>>> Did you run 'make install'? and then use Qtopia as well as the sqlite 
>>> db that was created in image/ ?
>>>
>>> Icons and application paths are now stored in the database, .desktop 
>>> files are only used at compile/install time for Qtopia.
>>>
>>>
>>>
>>
>> Hi Lorn,
>> Yes, I did do 'make install' and the timestanp on 
>> image/qtopia_db.sqlite looks correct, but we have other steps in our 
>> build system which puts files in a target binary RPM, so maybe that 
>> has messed up paths.
>>
>> Are there host tools in qtopia to modify the database file, or is 
>> there a place in the build where I might need to make changes?  The 
>> file is created in src/tools/content_installer/main.cpp, right?
>>
>> Thanks,
>> John Faith
>> Freescale Semiconductor
>>
>> -- 
>> To unsubscribe - send "unsubscribe" in the subject to 
>> qtopia-interest-request@xxxxxxxxxxxxx
>>
> 
> Hi Lorn,
> I used the SQLite command line tools and dumped the (6) tables in 
> qtopia_db.sqlite.  In the locationLookup table (assuming it's the right 
> place to look), I have:
> 
> INSERT INTO "locationLookup" VALUES(1, '/opt/Qtopia/apps/Settings');
> INSERT INTO "locationLookup" VALUES(2, '/opt/Qtopia/etc/SystemRingTones');
> INSERT INTO "locationLookup" VALUES(3, '/opt/Qtopia/plugins/inputmethods');
> INSERT INTO "locationLookup" VALUES(4, '/opt/Qtopia/apps/Applications');
> INSERT INTO "locationLookup" VALUES(5, '/opt/Qtopia/apps/Games');
> 
> The SystemRingTones and inputmethods paths exist on my target, but 
> there's no "/opt/Qtopia/apps".  I only see the apps directory in the 
> source, which has the .desktop files.
> 

There should also be a db in $HOME/Applications/Qtopia. You should be 
able to just rename or delete this.



-- 
 [ signature omitted ] 

Message 6 in thread

Lorn Potter wrote:
> John Faith wrote:
>> John Faith wrote:
>>> Lorn Potter wrote:
>>>> John Faith wrote:
>>>>> Hello,
>>>>> I am running qtopia 4.2.1 on an ARM-based board, but am missing 
>>>>> icons. On the screen which should look something like:
>>>>> http://www.trolltech.com/images/products/qtopia/phone_edition_4_gridshot.jpg/image 
>>>>>
>>>>>
>>>>> , I see the background image and button outlines, but no icons (see 
>>>>> attached image).
>>>>>
>>>>> When I press an arrow button, I guess qpe wants to redraw some 
>>>>> icons and  I see messages like this on stdout:
>>>>>
>>>>> QPainter::begin: Paint device returned engine == 0, type: 3
>>>>> QPainter::save: Painter not active
>>>>> QPainter::setMatrix: Painter not active
>>>>> QPainter::setMatrix: Painter not active
>>>>> QPainter::setRenderHint: Painter must be active to set rendering hints
>>>>> QPainter::setRenderHint: Painter must be active to set rendering hints
>>>>> QPainter::setMatrix: Painter not active
>>>>> QPainter::setMatrix: Painter not active
>>>>>
>>>>> I'm not sure if it matters, but on my target file system, I have 
>>>>> the file /opt/Qtopia/pics/qpe/SettingsIcon.svg, but no 
>>>>> corresponding PNG file.  I noticed in some cases there are both SVG 
>>>>> and PNG versions of a file:
>>>>>
>>>>> /opt/Qtopia/pics/appearance/icons/background.png
>>>>> /opt/Qtopia/pics/appearance/icons/background.svg
>>>>>
>>>>> , so as an experiment, I created SettingsIcon.png and restarted 
>>>>> qpe, but saw no change.
>>>>>
>>>>> Is there something simple I missed during configuration or in the 
>>>>> environment?
>>>>>
>>>>>
>>>>> Thanks!
>>>>> ,
>>>>> John Faith
>>>>> Freescale Semiconductor
>>>>>
>>>>> ------------------------------------------------------------------------ 
>>>>>
>>>>>
>>>>
>>>> Did you run 'make install'? and then use Qtopia as well as the 
>>>> sqlite db that was created in image/ ?
>>>>
>>>> Icons and application paths are now stored in the database, .desktop 
>>>> files are only used at compile/install time for Qtopia.
>>>>
>>>>
>>>>
>>>
>>> Hi Lorn,
>>> Yes, I did do 'make install' and the timestanp on 
>>> image/qtopia_db.sqlite looks correct, but we have other steps in our 
>>> build system which puts files in a target binary RPM, so maybe that 
>>> has messed up paths.
>>>
>>> Are there host tools in qtopia to modify the database file, or is 
>>> there a place in the build where I might need to make changes?  The 
>>> file is created in src/tools/content_installer/main.cpp, right?
>>>
>>> Thanks,
>>> John Faith
>>> Freescale Semiconductor
>>>
>>> -- 
>>> To unsubscribe - send "unsubscribe" in the subject to 
>>> qtopia-interest-request@xxxxxxxxxxxxx
>>>
>>
>> Hi Lorn,
>> I used the SQLite command line tools and dumped the (6) tables in 
>> qtopia_db.sqlite.  In the locationLookup table (assuming it's the 
>> right place to look), I have:
>>
>> INSERT INTO "locationLookup" VALUES(1, '/opt/Qtopia/apps/Settings');
>> INSERT INTO "locationLookup" VALUES(2, 
>> '/opt/Qtopia/etc/SystemRingTones');
>> INSERT INTO "locationLookup" VALUES(3, 
>> '/opt/Qtopia/plugins/inputmethods');
>> INSERT INTO "locationLookup" VALUES(4, '/opt/Qtopia/apps/Applications');
>> INSERT INTO "locationLookup" VALUES(5, '/opt/Qtopia/apps/Games');
>>
>> The SystemRingTones and inputmethods paths exist on my target, but 
>> there's no "/opt/Qtopia/apps".  I only see the apps directory in the 
>> source, which has the .desktop files.
>>
> 
> There should also be a db in $HOME/Applications/Qtopia. You should be 
> able to just rename or delete this.
> 
> 
> 

Hi Lorn,
Thanks for the suggestion.  I tried renaming 
$HOME/Applications/Qtopia/qtopia_db.sqlite, but there are still no icons.

After grepping for "iconpath" in the source and putting a couple of 
printfs in QtopiaApplication::applyStyle(), at runtime I got:

qpe config file=/root/Settings/Trolltech/qpe.conf
theme=smart.conf
themeCfg file=/opt/Qtopia/etc/themes/smart.conf
iconPathText=


Any idea if an empty path at this point is a bad thing?

Thanks,
John Faith
Freescale Semiconductor

--
 [ signature omitted ] 

Message 7 in thread

A bit more information on this problem in case anyone is interested.

I found that the icons were not being rendered from SVG because the icon 
size returned by GridItem::getBasicImageSize() was zero.  I tracked this 
back to QtopiaStyle::pixelMetric(PM_IconViewIconSize, ..)'s setting 
'size' to zero since  QApplication::desktop()->screen()->logicalDpiY() 
returned zero.

As an experiment, I hardcoded 'size' to '20' in pixelMetric() and icons 
were drawn.

I'm still looking for the root cause, but at least I'm getting closer.

,
John Faith
Freescale Semiconductor

--
 [ signature omitted ] 

Message 8 in thread

John Faith wrote:
> A bit more information on this problem in case anyone is interested.
> 
> I found that the icons were not being rendered from SVG because the icon 
> size returned by GridItem::getBasicImageSize() was zero.  I tracked this 
> back to QtopiaStyle::pixelMetric(PM_IconViewIconSize, ..)'s setting 
> 'size' to zero since  QApplication::desktop()->screen()->logicalDpiY() 
> returned zero.
> 
> As an experiment, I hardcoded 'size' to '20' in pixelMetric() and icons 
> were drawn.
> 
> I'm still looking for the root cause, but at least I'm getting closer.


I found that this problem was simply a matter of a missing environment 
variable $QWS_DISPLAY.  I've set the display, restarted qpe, and it 
looks much better.

,
John Faith
Freescale Semiconductor


--
 [ signature omitted ]