maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Sailfish SDK version 1608 (2.0.2) Qt5 released (https://talk.maemo.org/showthread.php?t=89294)

Morpog 2013-08-04 22:15

Re: Sailfish SDK Alpha released
 
As if it was important which package manager is used...
Try zypper, I really like it.

zypper ar, zypper ref, zypper up, zypper in :)

shmerl 2013-08-04 22:49

Re: Sailfish SDK Alpha released
 
Quote:

Originally Posted by RX-51 (Post 1364934)
Just read that Sailfish will use
instead of
on https://sailfishos.org/wiki/Porting/Harmattan

That was new to me...no .deb and apt-get? Oh come one!

This isn't news at all. It's since Meego days. apt-get is great, but zypper is good too.

pycage 2013-08-05 15:53

Re: Sailfish SDK Alpha released
 
Watch the N9, N900, or any of the Nokia Internet Tablets choke when installing packages. Watch poor Ubuntu netbooks choke when installing packages. I'm really glad that Jolla did not continue with Nokia's tradition with the awful deb package management with apt-get.

Zypper is way faster than apt-get and thus more suitable for a mobile device.

qwazix 2013-08-05 16:04

Re: Sailfish SDK Alpha released
 
Does it still lack autoremove? It's unacceptable to install a package with XXXMb of dependencies, and then to have to reflash to get rid of them, especially on size constrained mobile devices...

shmerl 2013-08-05 16:19

Re: Sailfish SDK Alpha released
 
zypper supposedly supports this: http://en.opensuse.org/SDB:Zypper_us...oving_packages

mikecomputing 2013-08-05 18:07

Re: Sailfish SDK Alpha released
 
Quote:

Originally Posted by RX-51 (Post 1364934)
Just read that Sailfish will use



instead of



on https://sailfishos.org/wiki/Porting/Harmattan

That was new to me...no .deb and apt-get? Oh come one!

zypper is definitivly better than apt-get because you can also search with same app. Thats another reason I swirch to kde suse instead of kubuntu.

shmerl 2013-08-05 18:39

Re: Sailfish SDK Alpha released
 
apt-get is just a higher level framework on top of dpkg (native Debian packaging). aptitude is another one, and can search from the same tool. So this isn't really essential.

Fuzzillogic 2013-08-05 19:07

Re: Sailfish SDK Alpha released
 
Quote:

Originally Posted by mikecomputing (Post 1365090)
zypper is definitivly better than apt-get because you can also search with same app. Thats another reason I swirch to kde suse instead of kubuntu.

If that is *the* most prominent feature of zypper vs apt, then I guess it's safe to say: they both rock :)

Using Kubuntu myself, and it's partially due to my n00bness (running Linux desktop since beginning of this year, didn't had previous experience) and partly due to both Kubuntu and N9 have Debian/Ubuntu roots, so there is some overlap in tech. (apt, upstart) I might switch to SUSE someday, as it has KDE as first class DE and shares more tech with Mer/Sailfish (systemd, rpm/zypper)

For the most part I don't really care what's ticking underneath Sailfish. From what I've seen it up-to-date versions of battle-tested technology. (Ok, Wayland is "new", but even that isn't developed overnight). I'm actually glad they've chosen to drop the legacy-stuff. Yeah it might sting a bit now, but remember this platform is new, it should last a decade or so (if Symbian, Android, iOS give a clue) so to start with supporting legacy which will be really obsolete in a year or two would be stupid imo.

RX-51 2013-08-05 19:36

Re: Sailfish SDK Alpha released
 
Thanks for the explanations regarding the package managers!
I didn't knew that Sailfish goes with Fedora (Mer) vs.Debian (Maemo). Using .rpm instead of .deb is self-explanatory then.

shmerl 2013-08-05 21:49

Re: Sailfish SDK Alpha released
 
I'd say more OpenSUSE's style, than Fedora's. But it's a minor detail.

wicket 2013-08-06 02:49

Re: Sailfish SDK Alpha released
 
Quote:

Originally Posted by shmerl (Post 1365069)

You would think that after reading that doc however that doesn't seem to be the case (at least with the zypper included in the Mer SDK):

Code:

$ sudo zypper in xorg-x11-server-devel
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW packages are going to be installed:
  libX11 libXau libXext libXfixes libdrm libdrm-devel libdrm-intel libdrm-nouveau libdrm-omap libdrm-radeon libpciaccess libpciaccess-devel libxcb mesa-llvmpipe
  mesa-llvmpipe-dri-drivers-devel mesa-llvmpipe-dri-swrast-driver mesa-llvmpipe-libEGL mesa-llvmpipe-libglapi xorg-x11-filesystem xorg-x11-proto-dri2proto xorg-x11-proto-fontsproto
  xorg-x11-proto-glproto xorg-x11-proto-inputproto xorg-x11-proto-kbproto xorg-x11-proto-randrproto xorg-x11-proto-renderproto xorg-x11-proto-resourceproto xorg-x11-proto-scrnsaverproto
  xorg-x11-proto-videoproto xorg-x11-proto-xextproto xorg-x11-proto-xf86bigfontproto xorg-x11-proto-xf86driproto xorg-x11-proto-xproto xorg-x11-server xorg-x11-server-devel

35 new packages to install.
Overall download size: 12.4 MiB. After the operation, additional 51.4 MiB will be used.
Continue? [y/n/?] (y):

(Output truncated)

Code:

$ sudo zypper rm xorg-x11-server-devel
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following package is going to be REMOVED:
  xorg-x11-server-devel

1 package to remove.
After the operation, 1.2 MiB will be freed.
Continue? [y/n/?] (y):

The other feature I miss is apt-file search which must have saved me a shitload of time over the years. zypper wp just isn't as powerful. Of course Maemo doesn't have apt-file either, I'm not sure why, I wouldn't have thought that it would be too difficult to implement.

shmerl 2013-08-06 03:12

Re: Sailfish SDK Alpha released
 
Just checked. By default zypper does not remove dependencies which were pulled with the package, but you can force it to do it. Example (tested that in Mer SDK):

Code:

sudo zypper install ruby
sudo zypper remove -u ruby

Try:
Code:

zypper remove
for all options to the remove command.

And manually installed packages aren't removed when you specify -u option.

shmerl 2013-08-06 03:22

Re: Sailfish SDK Alpha released
 
See also /etc/zypp/zypp.conf
Code:

##
## EXPERTS ONLY: Cleanup when deleting packages. Whether the solver should
## per default try to remove packages exclusively required by the ones he's
## asked to delete.
##
## This option should be used on a case by case basis, enabled via
## command line options or switches the applications offer. Changing
## the global default on a system where unattended actions are performed,
## may easily damage your system.
##
## CHANGING THE DEFAULT IS NOT RECOMMENDED.
##
## Valid values:  boolean
## Default value: false
##
# solver.cleandepsOnRemove = false

zypper recommends to keep it false by default.

rcolistete 2013-08-16 16:58

Re: Sailfish SDK Alpha Qt5 released
 
Updated the 1st post with new features of Sailfish SDK Alpha Qt5.

marmistrz 2013-08-17 14:34

Re: Sailfish SDK Alpha Qt5 released
 
it's qt 5.1 now, not 5.0

rcolistete 2013-08-17 14:55

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by marmistrz (Post 1367868)
it's qt 5.1 now, not 5.0

I don't think so, as "mersdk@SailfishSDK:~$ zypper if qt5-qtcore" shows version "5.0.2git13604.9095210-1.5.2". The same version on Sailfish Emulator.
"SDK Alpha Qt5 Known Issues" cites this issue :
Quote:

QtCreator
Some of documentation point to Qt 5.1 although setup runs on patched Qt5.0.

MartinK 2013-08-17 15:33

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by rcolistete (Post 1367872)
I don't think so, as "mersdk@SailfishSDK:~$ zypper if qt5-qtcore" shows version "5.0.2git13604.9095210-1.5.2". The same version on Sailfish Emulator.
"SDK Alpha Qt5 Known Issues" cites this issue :

According to the mailing list, the 5.0.2git version should be "almost" 5.1 and "real" 5.1 should come in a SDK update.

marmistrz 2013-08-17 15:52

Re: Sailfish SDK Alpha Qt5 released
 
settings->building->qt versions tells about 5.1

Morpog 2013-08-17 17:40

Re: Sailfish SDK Alpha Qt5 released
 
Jolla guys say, it's almost a 5.1, almost all stuff is 5.1 already, they freezed code just before 5.1 was released.

mikecomputing 2013-08-17 19:33

Re: Sailfish SDK Alpha Qt5 released
 
just a notice but it seems like qt5.2 will be releases in november. Since nokia wiped qt it seems like qtdevs has gone nuts with releases :p

MartinK 2013-08-18 14:18

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by mikecomputing (Post 1367912)
just a notice but it seems like qt5.2 will be releases in november. Since nokia wiped qt it seems like qtdevs has gone nuts with releases :p

Also checkout the newly supported mobile platforms:
Sailfish, Android, BB10, Tizen, Ubuntu-Touch, WinRT, iOS,...

Not really possible until the conflict of interest caused by Nokia owning Qt & having their own mobile platform/s at the same time.

shmerl 2013-08-18 17:22

Re: Sailfish SDK Alpha Qt5 released
 
Picking up pace is good. It was really unusual that Nokia let Qt go so easily. Knowing their latest trollish attitude (with attacking VP8 codec with patents for example), they could easily create a lot of problems for Qt.

marmistrz 2013-08-21 08:41

Re: Sailfish SDK Alpha Qt5 released
 
How can I access all the icons that can be used in Sailfish apps? e.g. icon-cover-pause

================

In my Sailfish app, my main.cpp looks like that

Code:

#include <QGuiApplication>
#include <QQuickView>
#include <QtQml>

#include "sailfishapplication.h"
#include "settings.h"

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));
    QScopedPointer<QQuickView> view(Sailfish::createView("main.qml"));
    qmlRegisterType<Settings>("BigText", 1, 0, "Settings");
   
    Sailfish::showView(view.data());

    return app->exec();
}

And in main.qml I import the module like that:

Code:

import QtQuick 2.0
import Sailfish.Silica 1.0
import BigText 1.0
import "pages"

ApplicationWindow
{
    initialPage: MainPage { }
    Settings {id: settings}
}

The error is:
Code:

file:///opt/sdk/BigText/usr/share/BigText/main.qml:3:1: module "BigText" is not installed
    import BigText 1.0
    ^

QtCreator doesn't show up an error while editing. Such calls were 100% valid in com.nokia.meego.

What am I doing wrong?

thanks

rainisto 2013-08-21 11:52

Re: Sailfish SDK Alpha Qt5 released
 
marmistrz are you trying to use qmlRegisterType from QtQuick1 vs QtQuick2. Atleast I dont see you including #include <QQmlEngine>

http://qt-project.org/forums/viewthread/28488

And icons you can easily find in filesystem if you login.

marmistrz 2013-08-21 12:33

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by rainisto (Post 1368521)
marmistrz are you trying to use qmlRegisterType from QtQuick1 vs QtQuick2. Atleast I dont see you including #include <QQmlEngine>

http://qt-project.org/forums/viewthread/28488

And icons you can easily find in filesystem if you login.

Adding <QQmlEngine> fixes nothing. Or should the 5-arg qmlRegisterType be used for QtQuick2. Or do I have to do something else than qmlRegisterType to register a QObject-inheriting class in QML.

Code:

#include <QGuiApplication>
#include <QQuickView>
#include <QQmlEngine>
#include <QtQml>

Where exactly are the icons? (They aren't in /usr/share/themes)

/edit: when going to sb2, it's indeed there. How can I copy it onto local hard disk?

rainisto 2013-08-22 07:37

Re: Sailfish SDK Alpha Qt5 released
 
If your not able to get qmlRegisterType working, then you can always use setContextProperty().

And ofcourse you have tested to move qmlRegisterType line before creating the view? Since otherwise it tries to import things that dont exist yet? :)

marmistrz 2013-08-22 08:24

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by rainisto (Post 1368656)
If your not able to get qmlRegisterType working, then you can always use setContextProperty().

And ofcourse you have tested to move qmlRegisterType line before creating the view? Since otherwise it tries to import things that dont exist yet? :)

Code:

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));
    QScopedPointer<QQuickView> view(Sailfish::createView("main.qml"));
    qmlRegisterType<Settings>("BigText", 1, 0, "Settings");
   
    Sailfish::showView(view.data());

    return app->exec();
}

There are situations where setContextProperty won't be an option (when the properties change on the fly and the UI has to respond to the changes)

youngcalihottie 2013-08-22 10:52

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by rcolistete (Post 1325075)
3) How do I copy files between host PC and Sailfish SDK Emulator ?
The host PC folder "~/SailfishOS/vmshare/" is shared to "/etc/mersdk/share/" in Sailfish Emulator. So you can copy files and folders there. Be careful to not delete the folder "ssh" and file "devices.xml".

I can only get files from my PC to show in the emulator. How do I move something from the emulator to the PC? I'm being told the folder is read only.

Thanks to anyone who can help.

rainisto 2013-08-22 11:14

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by marmistrz (Post 1368660)
Code:

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));
    QScopedPointer<QQuickView> view(Sailfish::createView("main.qml"));
    qmlRegisterType<Settings>("BigText", 1, 0, "Settings");
   
    Sailfish::showView(view.data());

    return app->exec();
}

There are situations where setContextProperty won't be an option (when the properties change on the fly and the UI has to respond to the changes)

Code:

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));
    qmlRegisterType<Settings>("BigText", 1, 0, "Settings");
    QScopedPointer<QQuickView> view(Sailfish::createView("main.qml"));
   
    Sailfish::showView(view.data());

    return app->exec();
}

Just double checking that you already tried to register before createView?

You can use setContextProperty just fine when properties change on the fly and make UI respond to changes. Nothing prevents that.

marmistrz 2013-08-22 12:41

Re: Sailfish SDK Alpha Qt5 released
 
Well, indeed... create != show ;P Bad habits from Qt 4.7 ;)
Sorry for polling the thread ;P and thanks!

Btw. if a textfield is on the bottom, the vkb covers it whole. Will it be fixed in the final release?

rainisto 2013-08-23 07:24

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by marmistrz (Post 1368696)
Btw. if a textfield is on the bottom, the vkb covers it whole. Will it be fixed in the final release?

When using right silica components, its autoscrolled to visible area when focused, yes.

marmistrz 2013-08-23 08:06

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by rainisto (Post 1368864)
When using right silica components, its autoscrolled to visible area when focused, yes.

So, is it my mistake that it doesn't scroll, or do I have to wait for a more mature release of Silica? :)

rcolistete 2013-08-26 05:16

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by youngcalihottie (Post 1368671)
I can only get files from my PC to show in the emulator. How do I move something from the emulator to the PC? I'm being told the folder is read only.

Thanks to anyone who can help.

You are rigth. The solution is to use "scp". I've updated the 1st post, see 3rd tip.

marmistrz 2013-08-27 13:45

Re: Sailfish SDK Alpha Qt5 released
 
Please add to the OP:

Where are the emulator filesystem files?

(when ssh-ed to the emulator) /srv/mer/targets/<target name>

marmistrz 2013-08-29 18:00

Re: Sailfish SDK Alpha Qt5 released
 
I'm trying to see how the separator works. I included it into the Column, and defined it like that

Code:

        Separator { color: "red" }
but no changes visible. What am I doing wrong?

marmistrz 2013-08-31 15:32

Re: Sailfish SDK Alpha Qt5 released
 
Hi,

I have a problem with exposing a C++ object to QML. It inherits QSettings,

Code:

class Settings : public QSettings
{
    Q_OBJECT
    /**/
public:
    explicit Settings() : QSettings("Marcin Mielniczuk", "BigText") {}
    ~Settings() { qDebug() << "Dying"; }

    /**/
};

I noticed that the destructor isn't called at all. (there's not destructor output)

I create the object like that:
Code:

import QtQuick 2.0
import Sailfish.Silica 1.0
import BigText 1.0
import "pages"

ApplicationWindow
{
    initialPage: MainPage { }
    Settings {id: settings}
}

What am I doing wrong?

rainisto 2013-09-02 07:19

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by marmistrz (Post 1370867)
What am I doing wrong?

http://qt-project.org/doc/qt-5.0/qtq...finetypes.html

marmistrz 2013-09-02 18:24

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by rainisto (Post 1371238)

I'm doing everything like in the doc page... (or do I just think I'm doing like that?)

rainisto 2013-09-03 11:05

Re: Sailfish SDK Alpha Qt5 released
 
At least your example copypaste was lacking qmlRegisterType and import statements in qml for the Settings type. Or you just didn't copypaste all your code.

And if your settings class is a singleton, like settings usually are, you most likely want to use setContextProperty instead.

marmistrz 2013-09-03 15:23

Re: Sailfish SDK Alpha Qt5 released
 
Quote:

Originally Posted by rainisto (Post 1371594)
At least your example copypaste was lacking qmlRegisterType and import statements in qml for the Settings type. Or you just didn't copypaste all your code.

And if your settings class is a singleton, like settings usually are, you most likely want to use setContextProperty instead.

Yep, I didn't copy main.cpp. If I didn't register the type, I couldn't use it at all :)

This is a workaround which might work at this case, but what if it wasn't a signleton object? Is there some special magic about non-singleton objects and destructors?

/edit: I tried to use the context property approach, but it says that settings is not defined:

Code:

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));

    qmlRegisterType<Settings>("BigText", 1, 0, "Settings");

    QScopedPointer<QQuickView> view(Sailfish::createView("main.qml"));
    Settings settings_object;
    view->rootContext()->setContextProperty("settings", &settings_object);
   
    Sailfish::showView(view.data());

    return app->exec();
}

Guess it's because of too late setting the context property, but I have no idea how to fix it.


All times are GMT. The time now is 13:12.

vBulletin® Version 3.8.8