Re: [SailfishDevel] CLI update

2017-04-25 Thread Ove Kåven
Den 11. april 2017 23:10, skrev E.S. Rosenberg:
> Can I somehow run the update process from CLI?

If you have to, you can try the "pkcon" command (e.g. pkcon update),
though I'm not sure it would do the same thing as the standard updater.

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Long term TCP connection

2017-01-18 Thread Ove Kåven
Den 17. jan. 2017 19:55, skrev george b:
> My xmpp client [1] makes progress and works very well. But I have
> problems with connection drops after about half an hour of device
> inactivity. I tried to send xmpp pings to the server in regular
> intervalls to keep the connection on. Then I tried to set the keepalive
> flag on the tcp socket. Nothing seems to help with this issue.

When the Jolla enters deep sleep, pretty much everything is suspended,
including timers and keepalives. You can prevent the Jolla from entering
deep sleep by either 1) pinging the network very, very often (I seem to
recall you need to receive packets at least every 30 seconds, but I
could be wrong about that), or 2) pinging the "IP heartbeat daemon",
using, for example, libiphb or nemokeepalive. There are some pointers at
https://together.jolla.com/question/54271/timer-slows-down-when-screen-is-off/

Ove

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] App doenst launch in intex aqua fish

2016-11-21 Thread Ove Kåven
Den 22. nov. 2016 01:04, skrev joao morgado:
> I do prefer a linux enviroment for development, so I'm guessing that to
> avoid this same problems in linux I will have to install Sailfish sdk
> with a different user than the one I use for Qt sdk.

I don't think you do. At least I haven't had a problem with it. Probably
the configuration backend is different between Windows and Linux, since
Linux doesn't have a registry.

Ove

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] monitor systemd unit from qml

2016-01-27 Thread Ove Kåven

Den 27. jan. 2016 17:03, skrev Michael Fuchs:

There is a signal "PropertiesChanged" defined but it doesn't get
emitted, when I start or stop the service.


http://www.freedesktop.org/wiki/Software/systemd/dbus/

You could see whether calling "Subscribe()" enables these signals for you.

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Sending SMS via Telepathy: Error Channel Dispatcher .. does not support interface CD.I.Messages

2015-08-12 Thread Ove Kåven

Den 12. aug. 2015 14:26, skrev christopher.l...@thurweb.ch:

One thing that did not click until this morning is that the telepathy
code in the Collabora git is C, while the equivalent in nemomobile is
C++. I wonder how is the one translated to the other?


D-Bus is rather language-agnostic, you know. Qt has its own tool for 
generating C++ wrappers from D-Bus interface definition files 
(qdbusxml2cpp, I think). For C code using the GLib/GObject framework, 
there may be an equivalent tool (maybe gdbus-codegen). Thus, you can 
access the D-Bus interface in either language.


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Running application with customized environment using invoker

2015-04-22 Thread Ove Kåven

Den 22. april 2015 18:56, skrev Dmitriy Purgin:

$ LANG=ru_RU invoker --type=silica-qt5 appbin

does not  change the app locale, it behaves as if there were no
LANG=ru_RU at all. So does QLocale::setDefault().


I think setting environment variables and calling QLocale::setDefault 
only works if Qt has not yet been initialized. Since the invoker has 
already initialized Qt, changing the default locale is probably impossible.


It seems possible to force Qt to use different translations, though, 
with QApplication::installTranslator. Just load the necessary Russian 
translations and install them, and Qt will use them. There's an example 
on http://wiki.qt.io/How_to_create_a_multi_language_application, but not 
sure how it would work on Sailfish...


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] SSH listen address

2015-04-19 Thread Ove Kåven

Den 19. april 2015 18:50, skrev E.S. Rosenberg:

So this leaves an, I think, interesting question: how do we on the one
hand allow SSH access while on the other hand preventing access from
GSM/3G/4G?


Is it important? Most likely your carrier is going to firewall you anyway.

As an experiment, I just tried pinging and ssh-ing to my 4G-connected 
phone, but neither worked. That is, I tried to connect to the IP address 
shown in ifconfig rmnet0 (which is showing a real IP address, not 
NAT), but apparently something is blocking it. (And my ssh seems to be 
listening on all interfaces.) So at least for me, there seems to be no 
need to do anything to prevent such access. I'm guessing it's pretty 
much the same for all carriers.


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Installation trouble with the SDK

2015-01-09 Thread Ove Kåven

Den 09. jan. 2015 00:42, skrev Kim Foder:

[ 1148.207675]  [c0a2ae49] wl_proc_read+0x89/0xa0 [wl]


wl_proc_read seems to be in the non-free Broadcom wireless driver, or 
something. It has to do with reading things from /proc (perhaps for 
ifconfig or something like that), which apparently deadlocked inside the 
driver.


(So I guess it did have something to do with networking... though 
perhaps not with actual network communication, just configuration?)


The non-free driver used to have a reputation for being unstable, and 
perhaps not all its bugs have been worked out yet. What if you tried the 
free Broadcom driver instead of the non-free one?


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Installation trouble with the SDK

2014-12-10 Thread Ove Kåven

On 10. des. 2014 10:41, k...@foder.dk wrote:

I have had this problem since I upgraded Ubuntu to 14.10, and have recently 
come to the conclusion that the problem probably is entropy.

A test has shown that the entropy pool always is extremely low (about 1000 with 
heavy disk access, less than 800 otherwise)

I have tried to generate more entropy by starting programs with heavy disk or 
net acces, and fidling with the mouse, but the installation still hangs at 76%, 
and after a short while everything on the desktop freezes, even the mouse.

The only way to get out of it is a long press on the power button.


These symptoms do not sound like it has anything at all to do with 
entropy. I don't know where you could have gotten that idea.


The symptoms sound more like what would happen if there was too much 
I/O, too many programs running, too much memory used, and perhaps too 
much swap space: the system would start swapping so heavily it would 
become totally unresponsive.


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Discrimination and abuse from Jolla employee Thomas Perl

2014-05-22 Thread Ove Kåven

On 22. mai 2014 15:05, Jarko Vihriala wrote:

This is not about sweeping dust but please take your epistola to some other 
channel.


I would rather this thread continued right here.

As an owner of a preordered Jolla phone, and as an app developer, I'm 
quite interested in the behaviour and ethics of the company I have been 
supporting with both my money and my programming efforts.


If it turns out that this company is behaving as recklessly as it sounds 
like it is, then people like me should have a right to know that, 
nothing should be hidden from us.


In the time since Jolla's launch, many have complained that Sailfish 
isn't as open-source, and Jolla not as open and community-oriented, as 
advertised. Some of that appear to be changing now, which is good. But 
when the company officially treats a contributor and supporter as an 
adversary, and attempts to evade and hide the conflict, then that's a 
step backwards again in the openness department.


To some of us, openness is important for all kinds of reasons, not just 
for software, but in general. People like me want to work for a better 
tomorrow, a more open, tolerant, and inclusive world, with peace and 
prosperity, but that takes more than just good code. It also takes a 
good attitude.


And Jolla's attitude doesn't seem right. So now I'm starting to doubt 
that helping Jolla will help achieve my goal of a better tomorrow.


Sure, by his actions, Filip has probably harmed you and your image. But 
is that inherently wrong? Reporting a thief to the police or something 
will harm the thief, but it's still the right thing to do. For similar 
reasons, I think Filip has done the right thing here, regardless of the 
damage. It seems Jolla had several chances of preventing the problem 
from escalating this far, but evidently Jolla just wasn't a responsible 
enough company to do that. There's no reason the consequences for being 
irresponsible shouldn't be harmful.


Perhaps Jolla will improve. But whether they do or not is information 
that's interesting to me, in order to decide if this community is for me 
or not. Thus, I'd like to see what happens next, I don't want it hidden 
from me.


You could argue that this kind of thing should be on a mailing list 
without devel in its name, and that I could subscribe to that. 
However, if it comes to the point where Jolla decides it does have to 
create a whole new mailing list just for this one issue, that would 
imply that Jolla has been utterly unable to resolve the issue in any 
other way before that. (This would have been easy to resolve for most 
responsible companies, but Jolla just can't do it, apparently.)


So, if such a mailing list appears, I will take that as more evidence of 
Jolla's incompetence when it comes to dealing with people in a 
respectful and constructive fashion.


I'd rather see you go ahead and show that Jolla is still a respectable 
company. Express a willingness to do the right thing, even if you think 
all the proof is circumstantial or something. If you truly want your 
company to be unlike, then following the rule book isn't the answer - 
being responsible is the answer.


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Where did devel-su come from and what's its purpose?

2014-05-13 Thread Ove Kåven

On 13. mai 2014 15:14, Mehdi El Gueddari wrote:

Back in the Meego days, 'devel-su' would let you switch to, quite
literally, a developer super user account, which had more privileges
than a normal user but wasn't quite root (or at least it seems that way
from the few user complaints I could find).


Well, not quite. Under Aegis, devel-su escalated your privileges to the 
max, but did not actually change to another account. (You could set up a 
developer account for interaction with the SDK, but it had no special 
privileges.) Also, under Aegis, root didn't have any special 
permissions, you were actually more privileged as a regular user than 
you were as root. Thus, regular su was useless. You just needed 
devel-su if you wanted to do stuff.


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Calibration level of the compass sensor always 1.0?

2014-05-01 Thread Ove Kåven

Den 29. april 2014 21:59, skrev Jussi Vuorisalmi:

Hello,

I am using the QML compass sensor in my QML application.

The compass sensor and azimuth reading work as expected, but the
calibration level (reading.calibrationLevel) always seems to give just
the same value: 1.0 (i.e. 100%, perfectly calibrated). According to the
documentation the value should vary between 0.0-1.0.


Does it also say *when* it should vary? As I understand the 
documentation, it is only likely to ever go below 1.0 if you fix it to a 
car (or a bike, whatever) and drive across the city in a straight line 
without turning, or if you turn the device off and then back on. 
(Rotating the device always helps the device calibrate itself, so in 
normal usage a loss of calibration won't happen.)


Also, if it ever gets below 1.0, then you're supposed to explicitly ask 
the user to wave the phone around a bit. When the calibration level gets 
back to 1.0, the calibration process is complete, and you should tell 
the user about that. This is not supposed to be something the user 
should be bothered with very often, so the sensor will, of course, try 
to keep the level at 1.0 until recalibration is *really* necessary.


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] No QSerialPort

2014-03-27 Thread Ove Kåven

Den 27. mars 2014 10:11, skrev Wim de Vries:

Don't know why is there a difference between Sailfisch and MeeGo.


I don't think there is. You're running on different hardware, though; 
the N900 and N9 did have the wiring to support USB OTG.



Can I enable power on the USB port? (escape would be a battery powered
USB hub)


No, Jonni already gave you a link which answered this. The Jolla just 
doesn't have the necessary wires.



Will Sailfish automatically set a up a /dev/ttyUSBsomething when the
device (like an external GPS) is plugged in?


Perhaps, if you compile the necessary kernel modules, assuming you can 
power up the devices without power from the Jolla.


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] How to make vCard

2014-03-27 Thread Ove Kåven

Den 27. mars 2014 18:33, skrev Andrey Kozhevnikov:

How to generate vCard for contact? What is preferred way to do it (if
many)?


If you're using QtContacts, then it's best to also use QtVersit.

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] No QSerialPort

2014-03-26 Thread Ove Kåven

Den 27. mars 2014 00:39, skrev Philippe De Swert:

Hi,

As this is getting very confused and we are mixing connecting devices to
the Jolla and connecting the Jolla to the pc.

So which one is it?


Personally I don't see why there's any confusion.

The OP (wsvries) has always talked about connecting the Jolla to a USB 
device, never about connecting it to a PC (only about connecting those 
USB devices to a PC, not the Jolla). Then, for no reason, Radek started 
talking about connecting the Jolla to a PC, and a couple of others 
followed suit.


On the other hand, wsvries apparently did not understand the message 
when he was told that USG OTG is not supported. He didn't seem to get 
that it really *means* that it isn't supported, and thus that this isn't 
going to work and the Jolla isn't going to supply power, and kept 
forging ahead anyway (and apparently got surprised when it didn't supply 
power).


It's actually fascinating, from where I'm standing.

Anyway, yes, probably an externally-powered USB hub (or, perhaps more 
elegantly, the TOH i2c connections) are the only hopes of achieving what 
he wants to do.


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Problem with OpenGL

2014-03-19 Thread Ove Kåven

Den 18. mars 2014 23:11, skrev Iosif Hamlatzis:

In SailfishOS the call to




 glGenTextures(  1,  (pSurfaceNode-g_surfaceID)  );

 GLenum  err_  =  glGetError();


fails and it returns error code 1280.


Not necessarily. This is the first call to glGetError in that function. 
Since old GL errors aren't cleared before the next call to glGetError, 
the error could already have been set long before you called glGenTextures.


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Scheduling code for execution at x seconds since epoch

2014-03-16 Thread Ove Kåven

Den 16. mars 2014 14:14, skrev Arvid Fahlström Myrman:

Yes, I've been playing around with BackgroundJob from nemo-keepalive a little
since I wrote that. It seems to mostly work similarly to Insomniac, with the
added benefit of preventing suspend after triggering until BackgroundJob's
finished() method is called. It's a bit finicky to use though, since it seems to
always trigger once immediately upon being enabled, and it doesn't have a
repeat property that can be set to false, so to prevent it from running more
than once you have to set enabled to true when it's triggered and hope that it
doesn't have time to schedule the next event


Set enabled to true? Do you mean setting it to false? Or how exactly 
are you using it? As far as I can tell, you should set enabled to true 
to start the timer, and enabled to false to stop it.


You should probably set enabled to false *after* your job is done, 
because setting it to false will also do what finished() does.


If the timer were to elapse again before you're done, this would be 
ignored as long as you haven't called finished or set enabled to false. 
So you shouldn't be getting more than one trigger of this kind (in theory).


To start the timer using a range (instead of just a frequency), set the 
minimumWait and maximumWait properties as desired, and the frequency 
property to Range. Then start the timer by setting enabled to true. 
(The timer should not be enabled before you've set all these properties, 
or you might risk funny effects.)



Regarding timed, I have looked at nemo-qml-plugin-alarms previously, but from
what I could tell (though I'll admit I didn't really take the time to actually
understand how it works, so it's very possible that I wasn't using it
correctly) it is not really possible to schedule a specified piece of code for
execution using it;


With the C++ interface it's possible (well, at least it's possible to 
start any program or send any D-Bus message). Perhaps the QML interface 
is less flexible in that regard...


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Wrong symbolic link

2014-03-14 Thread Ove Kåven

Den 14. mars 2014 19:37, skrev Iosif Hamlatzis:

 ssize_t  chars  =  readlink(/proc/self/exe,full_path,PATH_MAX);


The usual (portable) way to find the executable name is to use argv[0], 
not to read /proc/self/exe. (If it's a relative path, then you may need 
to search for it in the PATH or something.)


If you're using Qt, then you can use something like 
QApplication::applicationFilePath() to get this information.



when tapping the game's icon to start it the code above returns as a value:

*/usr/libexec/mapplauncherd/booster-silica-qt5*


which is wrong.


Not really. It's because your program is started by the silica-qt5 
booster, not directly by the OS, which makes loading Silica/QML 
applications faster and use less memory, because the same in-RAM copy of 
Silica is used by all running apps.


I think that if you had used argv[0], you wouldn't have had a problem.

If you're not using QML, update or remove the X-Nemo-Application-Type 
field in your .desktop file to use a different booster, or to not use a 
booster at all.


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Infinity count of pages

2014-03-11 Thread Ove Kåven

Den 11. mars 2014 21:18, skrev Oleg Linkin:

Hello.
How I can realize in sailfish infinity pages loop.
For example: MyProfilePage - MyFriendsList - MyFriendProfilePage - 
MyFriend'sFriendsList - MyFriend'sFriendProfilePage - (...)
But there are about 8 menus in profile and each can be opened (in this case 
using horizontal listview with snap mode to one item doesn't give profit).


I don't understand the question.

What's wrong with using, e.g., pageStack.push(profilepage.qml, 
profileproperties) and such? Or don't you want people to be able to 
backtrack? If not, you could use replace/replaceAbove instead of push, 
would that work?


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] show/hide pulley menu items

2014-03-10 Thread Ove Kåven

Den 10. mars 2014 20:43, skrev Vivian Brégier:

Thank you, this works just fine.

And I always have at least one menuitem visible, so there is no need to
hide the menu itself, but it is a good thing to keep in mind.

Strangely,
https://sailfishos.org/sailfish-silica/qml-sailfishsilica-menuitem-members.html
does not reference this attribute.


I don't think the Silica documentation links to anything outside Silica. 
The doc generation tool used by Jolla probably didn't know where to find 
QtQuick or something. Inconvenient, but what can you do... Just read the 
description to find what it inherits from. For example, MenuItem 
inherits from Label, and the docs for Label says it inherits from 
QtQuick's Text type.


With that knowledge, you can look up Text in the QtQuick docs to find 
out what's in there: 
http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-text-members.html


And there, inherited from Item, is the visible property.

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Folder permissions

2014-03-09 Thread Ove Kåven

Den 09. mars 2014 18:33, skrev Iosif Hamlatzis:

When deploying a game/application where should its resources
(images/sounds/settings files) be stored so that the game/application
can have both read and write permissions?


You should clarify why you need write permissions, so that it's possible 
to suggest the best way to handle your situation. In general, files 
distributed as part of the rpm should never be written to.


If it's only things like config files or high scores that you need to 
write, then there's standard ways to do it. They should be placed into 
the user's home directory on first startup of your game, either by being 
created from scratch, or by copying an initial version from your 
/usr/share directory. (But don't hardcode /home. The best way to get the 
path is to use QStandardPaths::writableLocation.)



I tried to use the /usr/share/$$(TARGET) folder where $$(TARGET) is the
name of my game but it seams the game doesn't have permissions on this
folder. Not even read permissions.


No, you should have read permissions. You just can't write.


I use:

FILE* pFile = fopen(/usr/share/MyGame/Home/settings.bin, r+b);


That's not read permissions, You're asking for *both* read and write 
permissions, which is denied because you can only have read permissions, 
not write. To request read permissions only, use just rb, not r+b.


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] SilicaListView and SparqlListModel

2014-03-07 Thread Ove Kåven

Den 07. mars 2014 13:46, skrev Michele Tameni:

Any advice on this? I'm stuck with this problem.


I doubt it has anything to do with the list model.

First, note that SilicaListView is a SilicaFlickable. With the Silica 
UI, you're not really meant to nest flickables inside other flickables 
(and as far as I can tell, the Jolla apps don't do it). If you want to 
do it anyway, you should be very careful about it.


In this case, you didn't get your height constraints right. Since your 
column does not have a height constraint, it will size itself after its 
children. But then you're telling one of its children, the 
SilicaListView, to use its parent's height! Because of this infinite 
loop, your inner flickable is probably constantly growing and your outer 
flickable constantly adjusting its scroll range to fit. I bet this could 
cause all kinds of funny effects.


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] SilicaListView and SparqlListModel

2014-03-07 Thread Ove Kåven

Den 07. mars 2014 18:30, skrev Ove Kåven:

First, note that SilicaListView is a SilicaFlickable.


Hmm. I should probably correct myself, just in case: I meant that it is 
*like* a SilicaFlickable, able to do everything a SilicaFlickable can 
do, including having pulley menus. So it's a SilicaFlickable for all 
*practical* purposes, but it isn't *technically*...


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Hardware compatibility

2014-03-06 Thread Ove Kåven

Den 06. mars 2014 16:09, skrev SRK Services:

I am just doing some pre-development research and am having trouble
finding some information. Does anyone know of a link that has a list of
compatible hardware for SailfishOS. I did not see any while browsing the
site.


If the question isn't whether there's already a version of Sailfish that 
runs on this chipset, but whether Sailfish could ever run on it, then I 
suspect the answer, for now, is:


SailfishOS is based on the Linux kernel, just like Android; if your 
chipset can run Android, then it can most likely also run SailfishOS. 
How much work it would be to port may depend on how friendly the chipset 
manufacturer is towards the idea.


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Some API and sailfish app development questions

2014-03-04 Thread Ove Kåven

Den 04. mars 2014 12:18, skrev Thomas Amler:

Hi,

I can't answer all of your questions, so directly to the last one:

4. Currently there is no notification API which can be used directly.
nemomobile notifications is not allowed in harbour, altough all system
apps use it to deal with notifications. There is a way to load it via QT
resource files, which some apps use to workaround the harbour test
mechanisms.


But the Harbour FAQ says this:

What about the notifications DBus API?
There are no plans to restrict the access to the DBus API interface 
org.freedesktop.Notifications in future.


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Sailfish OS alarm scheduler - where do find source, headers, docs?

2014-02-23 Thread Ove Kåven

Den 24. feb. 2014 00:20, skrev Artem Marchenko:

Hi All

I seem to remember somebody telling that Sailfish/Nemo scheduler is the
same timed as in Harmattan (or a little modified timed?).

I fail to find links to the Jolla's timed sources-headers-docs, however.
Could somebody, please, point me there?

I'd use it for setting custom alarms via dbus. In Harmattan it was going
via Maemo::Timed::Event, Maemo::Timed::Interface, etc.


https://github.com/nemomobile/timed/tree/master/src

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Preventing auto sleep and detecting sleep mode

2014-02-20 Thread Ove Kåven

Den 20. feb. 2014 19:16, skrev Arvid Fahlström Myrman:

Well, I've at least solved the first problem by implementing a timer similar to
the one used by ScreenBlank in Sailfish.Media (see
/usr/lib/qt5/qml/Sailfish/Media/ScreenBlank.qml for reference), and it seems to
work properly. I wonder though, how are we developers supposed to know about
these DBus services? Are they documented somewhere?


Similar questions have already been answered in the past on this list, 
at least. From the answers I got earlier, I understand that


- all the MCE D-Bus calls are documented in 
https://github.com/nemomobile/mce-dev/blob/master/include/mce/dbus-names.h


- there's a more friendly API under development at 
https://github.com/nemomobile/nemo-keepalive, which seems to have both 
C++ and QML interfaces (which both does exactly what you're asking for, 
including telling you when the screen goes blank). Presumably, when it's 
ready and deployed, that is what Jolla will tell developers about, and 
allow imports of.


In the meantime, you may just have to write some C++ code that you can 
use from your QML (or copy what you need of that nemo-keepalive into 
your C++ code).


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] How to access the viewfinder of the QCamera?

2014-02-02 Thread Ove Kåven

Den 25. jan. 2014 21:22, skrev Marcel:

Or if I use C++ implementing an own QAbstractVideoSurface as viewfinder for a
QCamera object (which would be my prefered way as I want to precess the image
data) I get the following error:

[W] CameraBinSession::processBusMessage:912 - CameraBin error: No common
caps

After some digging in the gstreamer debug log it seems that the camera source
is just supporting the data format video/x-android-buffer and there is no
equivalent QVideoFrame::PixelFormat for this.


Have you tried making gstreamer use droidcamsrc instead of camerabin2?

___
SailfishOS.org Devel mailing list


[SailfishDevel] Preventing deep sleep for a few seconds?

2014-02-01 Thread Ove Kåven
If a synchronization starts with the screen off, there's a chance that 
the phone enters deep suspend during the synchronization. If so, the 
other side might time out and the sync will fail.


So I want prevent the CPU from suspending before the synchronization is 
complete, which might take a few seconds (and there might not be network 
activity all the time while it's running). I've read that to get 
periodic wakeups, you could use libiphb or maybe timed, but what's the 
recommended way to temporarily prevent suspending completely for a few 
seconds?

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Listening to Connman DBUS signals

2014-01-22 Thread Ove Kåven

Den 22. jan. 2014 17:18, skrev Julius Loman:

Hi

this is for sure a beginners question, but I hope somebody can help me to sort
it out. I want to listen to connman dbus events to determine connection changes
(I'm interested in receiving signal as soon as device connects to particular
WLAN network).

Using some examples I was able to capture dbus events on my KDE desktop (albeit
not connman related), but same code for SailfishOS does nothing. I guess my
understanding of Dbus or QtBus is bad :)

Here is my piece of code:


I don't think the signature of your propertyChanged slot is correct.

Apparently, the connman technology API is described here:

http://git.kernel.org/cgit/network/connman/connman.git/tree/doc/technology-api.txt?id=HEAD

You can see in there that PropertyChanged takes a string and a variant 
(which presumably maps to QString and QVariant), not a D-Bus object path.


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Listening to Connman DBUS signals

2014-01-22 Thread Ove Kåven

Den 22. jan. 2014 22:11, skrev Ove Kåven:

You can see in there that PropertyChanged takes a string and a variant
(which presumably maps to QString and QVariant), not a D-Bus object path.


I think I should have said QDBusVariant, not QVariant.

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] QML Timer stops running

2014-01-13 Thread Ove Kåven

Den 13. jan. 2014 23:04, skrev Thomas Tanghus:

Just after having my tiny Kitchen Timer app approved I realized that the
timer slows down and eventually stops running - burned food as result :(

The timer is set to trigger each 1000 ms. When applicationActive becomes
false the timer slows down to being triggered appr. each 5000 ms and after
about a minute more it stops running all together.

Am I missing something obvious?


No matter what OS or platform you're on, counting the number of times 
your timer callback is called is *never* a good idea, even on desktop 
PCs. Timer callbacks can be skipped for any number of reasons (heavy 
system load, laptop suspend, etc).


If you look at the QML example code for Timer, they don't do that. They 
use Date() to get the current time. You should do something like that, 
too. Then your clock would always show the correct time (as long as it's 
running at all, at least).


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Cannot access phone book on phone when starting app from QtCreator

2014-01-06 Thread Ove Kåven

Den 05. jan. 2014 23:10, skrev Matthias Barmeier:

Hi,

I am unable to access the phone book when running my app from QtCreator
on the phone.
Is this a security feature ?


I've needed to access PIM data myself, so, as far as I can tell from my 
own investigations, yes, it's Unix security. The directory 
.local/share/system/privileged is only accessible to processes that are 
in the privileged group.


The standard boosters (used by mapplauncherd) seem to be sgid 
privileged, thus automatically giving Qt/QML apps that use them the 
necessary privileges (at least when launched from the phone menu, I 
suppose). But when you just launch something using ssh (not 
mapplauncherd), the apps probably won't belong to that group automatically.


___
SailfishOS.org Devel mailing list