maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Help me to code for Sailfish OS (https://talk.maemo.org/showthread.php?t=100817)

coderus 2019-08-26 21:04

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by levone1 (Post 1559528)
/usr/share/lipstick-jolla-home-qt/compositor/ApplicationWallpaper.qml;
previous mod shown in screenshot, from this thread - https://together.jolla.com/question/...odding-system/

I think I remember ApplicationWindow qml is in /usr/lib/qt5/qml/Sailfish/Silica/private

what you saying is just works for me:
Code:

import QtQuick 2.2
import Sailfish.Silica 1.0
import org.nemomobile.lipstick 0.1

Wallpaper {
    id: wallpaper

    // All properties are applied to the rasterized texture. Changing it
    // means updating the texture and is thus very expensive. So don't go
    // animating them.
    textureSize: Qt.size(isLegacyWallpaper ? Screen.width : Screen.height, Screen.height)
//    effect: "glass"
    overlayColor: Theme.colorScheme === Theme.DarkOnLight
                  ? Qt.rgba(1.0, 1.0, 1.0, 0.35)
//                  : Qt.rgba(0.0, 0.0, 0.0, 0.6)
                  : Qt.rgba(0.18, 0.21, 0.24, 1.0)
    source: Theme.backgroundImage
}


levone1 2019-08-26 21:55

Re: Help me to code for Sailfish OS
 
2 Attachment(s)
Quote:

Originally Posted by coderus (Post 1559538)
what you saying is just works for me:
Code:

import QtQuick 2.2
import Sailfish.Silica 1.0
import org.nemomobile.lipstick 0.1

Wallpaper {
    id: wallpaper

    // All properties are applied to the rasterized texture. Changing it
    // means updating the texture and is thus very expensive. So don't go
    // animating them.
    textureSize: Qt.size(isLegacyWallpaper ? Screen.width : Screen.height, Screen.height)
//    effect: "glass"
    overlayColor: Theme.colorScheme === Theme.DarkOnLight
                  ? Qt.rgba(1.0, 1.0, 1.0, 0.35)
//                  : Qt.rgba(0.0, 0.0, 0.0, 0.6)
                  : Qt.rgba(0.18, 0.21, 0.24, 1.0)
    source: Theme.backgroundImage
}


And you get a colored bg?

For me, the 1.0 opacity works properly, but the bg ends up being black. 121518 rgb color should be a flat, dark navy-bluish color, (like the previous screenshot). Also, I can tell something's funny, because when I slowly swipe from the side, (as if to peek), it goes straight from black to totally transparent, with no fade, (whereas the normal behavior is a steady fade from the open app to the home screen)

levone1 2019-08-26 23:49

Re: Help me to code for Sailfish OS
 
screenshot came out funky in last attachment - in reality it was a solid black background on the settings app...

coderus 2019-08-27 07:56

Re: Help me to code for Sailfish OS
 
1 Attachment(s)
as i said works like you described, check attach

levone1 2019-08-27 09:28

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1559553)
as i said works like you described, check attach

strange - maybe one of my other mods is tripping it up (GlassBackground ?)...
Thanks

bobsikus 2019-09-10 08:00

Re: Help me to code for Sailfish OS
 
Hello guys, about coding, I have latest SDK 2.2.4. When I try to debug with gdb everything seems to work, except I does not have loaded correct symbols. Unfortunately there is a LOT of information about gdb, but I do not undestand them completely..

I can easily reproduce the problem and the memory address is always the same, journactl points to libQt5Quick.so.5.6.3
Code:

segfault at 4 ip 6fae6efa sp 77ae7c30 error 4 in libQt5Quick.so.5.6.3[6fa05000+264000]
Sep 09 16:27:59 SailfishEmul kernel: Code: e0 01 e9 a8 fe ff ff 90 8d b4 26 00 00 00 00 90 55 89 e5 57 56 53 e8 a5 57 f2 ff 81 c3 15 c1 25 00 83 ec 5c 8b 7d 08 8b 45 0c <8b> 77 04 39 46 74 0f 84 7f 02 00 00 85 c0 74 1e 8b 45 0c 8d 76 00

unfortunately then SDK doesn't show anything more specific, which should lead me somewhere, or at least I'm too dumb to understand it :) :
Code:

0x6fb90efa    8b 77 04    mov  0x4 (%edi),%esi
I would like to know step by step for idiots how to properly set up loading symbols in SDK, on emulator, wherever it is needed.

Thank you a lot

juiceme 2019-09-10 08:20

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by bobsikus (Post 1560116)
Hello guys, about coding, I have latest SDK 2.2.4. When I try to debug with gdb everything seems to work, except I does not have loaded correct symbols. Unfortunately there is a LOT of information about gdb, but I do not undestand them completely..

If the symbols are stripped there's probably a debuginfo rpm to install them.
What's the component that you are missing symbols on?

bobsikus 2019-09-10 08:44

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by juiceme (Post 1560121)
If the symbols are stripped there's probably a debuginfo rpm to install them.
What's the component that you are missing symbols on?

unfortunately, code is not originally my own, it is former Dax's WebPirate, I am still using the app, but closing tabs in tab segment's view sometimes crash the app and it annoys me. I would like to repair it if possible and with Dax's agreement publish it later on.

Where could I find out on which component it is failing ? From what I have said it seems to be QtQuick 2.6 (it was 2.2 before, same crash)

Fuzzillogic 2019-09-17 19:03

Re: Help me to code for Sailfish OS
 
I'm trying to listen for a call from a specific phone number to act upon. It seems almost trivial to make in QtQuick, analogous to how PhoneHook handles it:

QML:
Code:

DBusInterface {
    id:              activeCall
    service:        'org.nemomobile.voicecall'
    path:            '/calls/active'
    iface:          'org.nemomobile.voicecall.VoiceCall'
    signalsEnabled:  true

    function lineIdChanged() {
        console.log("Got: " + activeCall.getProperty("lineId"));
    }
}

Yet, this doesn't work. Possibly because that path doesn't exist until an call becomes active. I have a work around, by first listening for a active call, then rebinding the VoiceCall interface from above:

Code:

DBusInterface {
    service:        'org.nemomobile.voicecall'
    path:            '/'
    iface:          'org.nemomobile.voicecall.VoiceCallManager'
    signalsEnabled:  true

    function activeVoiceCallChanged() {
        activeCall.path = "/calls/active";
        if (activeCall.getProperty("isIncoming")) {
        …
        }
    }
}

The magic here is in the activeCall.path = "/calls/active";.

But this method is ugly, and isn't reliable because it seems the (correct) lineId isn't always immediately available when an incoming call arrives.

So, is this a bug in the DBusInterface plug-in, or am I missing something?

Fuzzillogic 2019-09-20 21:07

Re: Help me to code for Sailfish OS
 
To follow up my own question: I just noticed PhoneHook uses the empty string as service, whereas I used org.nemomobile.voicecall. According to the Qt documentation: "The arguments service and path can be empty, denoting a connection to any signal of the (interface, name) pair, from any remote application."

So, I tried to use

Code:

DBusInterface {
    id:              activeCall
    service:        ''
    path:            '/calls/active'
    iface:          'org.nemomobile.voicecall.VoiceCall'
    signalsEnabled:  true

    function lineIdChanged() {
        console.log("Got: " + activeCall.getProperty("lineId"));
    }
}

but this didn't seem to make a difference.

Also, DBusInterface has an undocumented property watchServiceStatus. This however seems irrelevant, as the service org.nemomobile.voicecall is already available, just not the /calls/active path.


All times are GMT. The time now is 08:21.

vBulletin® Version 3.8.8