Sune Vuorela: Debconf 2015 2
It is amazing at debconf when your Application Manager is rocking the dance floor!
It is amazing at debconf when your Application Manager is rocking the dance floor!
Unfortunately, with all the normal magic of QML property bindings, getting a property updated in a setup that involves return values from functions isn t really doable, like this:
Text
text: qtobject.calculatedValue()
Text
text: qtobject.calculatedValue() + qtobject.emptyNotifierThing
Q_PROPERTY(QString emptyNotifierThing READ emptyString NOTIFY valueChanged)
QString emptyString() const
return QString();
This is a bit more code to write and to remember to use, but it does get the job done.
Intermediate layer
Text
text: qtobject.dataAccess.calculatedValue()
Q_PROPERTY(QObject* dataAccess READ dataAccess NOTIFY valueChanged)
QObject* dataAccess()
return this;
It seems a bit simpler for the reader on the QML side, but also gets the job done.
I am not sure which way is the best one, but the intermediate layer has a nicer feeling to it when more complicated types are involved.
While evaluating the cross-platform accessibility of Qt5, I stumbled
across this deficiency:
#include <QApplication>
#include <QTextEdit>
int main(int argv, char **args)
QApplication app(argv, args);
QTextEdit textEdit;
textEdit.setText(u8"\u28FF");
textEdit.show();
return app.exec();
For reasons I don t know, apparantly a Qt Quick Item that can show a QImage or a QPixmap is kind of missing. The current Image QML item only works with data that can be represented by a URL.
So I wrote one that kind of works. Comments most welcome.
It is found on git.kde.org: http://quickgit.kde.org/?p=scratch/sune/imageitem.git
Oh, and the KDE End of Year fundraiser is still running. https://www.kde.org/fundraisers/yearend2014/. Go support it if you haven t already.
Occasionally, various quotes from people having an opinion if linux is about choice or not. Even pages like http://www.islinuxaboutchoice.com/ has shown up.
My short answer is YES . Linux is about choice. And you get all your choices directly from your f/loss definition of choice (FSF s 4 freedoms / OSI s opensource definition / Debian Free Software Guidelines)
It doesn t mean that you get all the gui configuration bits that you want. It doesn t mean that you without any problems can switch out any component. But it does mean that you can get it exactly your way. But it might require you to edit some source code and compile some stuff.
Recently I was trying some statistics on the qtbase-module (where QtCore, QtGui, QtWidgets and so on lives) and was wondering who made them.
So, KDE people makes up for 40-60% of the weekly commits to QtBase. This is again shows that KDE is important to Qt, just as the reverse is. So, let s keep KDE healthy.
KDE is running a end-of-year fundraiser over here https://www.kde.org/fundraisers/yearend2014/. Go ahead and donate, and help KDE stay healthy. For your own sake. And for Qt s.
Occasionally, one gets in touch with kind of foreign technologies and needs to get stuff working anyways.
Recently, I had to do some various hacking with and around .bat files. Bat files are a kind of script files for Microsoft Windows.
Calling external commands
Imagine need to call some other command, let s say git diff. So from a cmd thing, you would write
git diffsimilar to writing shell scripts on unixes. But there is a catch. If the thing you want to call is another bat-script, just calling it ensures it replaces the current script and never returns. So you need
call git diffif the command you want to run is a bat file and you want to return to your script. Calling an external helper next to your script
call %~dp0helper.batis the very self-explanatory way of doing that. Stopping execution of your script If you somehow encounter some condition in your script that requires you to stop your script, there is a command exit handy. It even takes a argument for what error code there is.
exit 2stops your script with return code 2. But it also have the nice added feature that if you do it in a script you run by hand in a terminal, it also exits the terminal. Luckily there is also a fix for that:
exit /b 2and it doesn t exit your interactive terminal, and it sets the %ERRORLEVEL% variable to the exit code. Fortunately, the fun doesn t stop here. If the script is run non-interactively, exit /b doesn t set the exit code for for example perl s system() call. You need to use exit without /b for that. So now you need two scripts. one for interactive use that calls exit /b and a similar one using exit for use by other apps/scripts. Or, we can combine some of our knowledge and add a extra layer of indirection.
call %~dp0script.bat
exit %ERRORLEVEL%
Today I am very happy to announce the release of AppStream 0.7, the second-largest release (judging by commit number) after 0.6. AppStream 0.7 brings many new features for the specification, adds lots of good stuff to libappstream, introduces a new libappstream-qt library for Qt developers and, as always, fixes some bugs.
Unfortunately we broke the API/ABI of libappstream, so please adjust your code accordingly. Apart from that, any other changes are backwards-compatible. So, here is an overview of what s new in AppStream 0.7:
Specification changes
Distributors may now specify a new <languages/> tag in their distribution XML, providing information about the languages a component supports and the completion-percentage for the language. This allows software-centers to apply smart filtering on applications to highlight the ones which are available in the users native language.
A new addon component type was added to represent software which is designed to be used together with a specific other application (think of a Firefox addon or GNOME-Shell extension). Software-center applications can group the addons together with their main application to provide an easy way for users to install additional functionality for existing applications.
The <provides/> tag gained a new dbus item-type to expose D-Bus interface names the component provides to the outside world. This means in future it will be possible to search for components providing a specific dbus service:
$ appstream-index what-provides dbus org.freedesktop.PackageKit.desktop system |
When writing libraries with CMake, you need to set a couple of properties, especially the VERSION and SOVERSION properties. For library libbar, it could look like:
set_property(TARGET bar PROPERTY VERSION 0.0.0 )This will give you a libbar.so => libbar.so.0 => libbar.so.0.0.0 symlink chain with a SONAME of libbar.so.0 encoded into the library. The SOVERSION target property controls the number in the middle part of the symlink chain as well as the numeric part of the SONAME encoded into the library. The VERSION target property controls the last part of the last element of the symlink chain This also means that the first part of VERSION should match what you put in SOVERSION to avoid surprises for others and for the future you. Both these properties control Technical parts and should be looked at from a technical perspective. They should not be used for the version of the software , but purely for the technical versioning of the library. In the kdeexamples git repository, it is handled like this:
set_property(TARGET bar PROPERTY SOVERSION 0 )
set(BAR_VERSION_MAJOR 1)And a bit later:
set(BAR_VERSION_MINOR 2)
set(BAR_VERSION_PATCH 3)
set(BAR_VERSION $ BAR_VERSION_MAJOR .$ BAR_VERSION_MINOR .$ BAR_VERSION_PATCH )
set_target_properties(bar PROPERTIES VERSION $ BAR_VERSIONwhich is a fine way to ensure that things actually matches. Oh. And these components is not something that should be inherited from other external projects. So people, please be careful to use these correct.
SOVERSION $ BAR_VERSION_MAJOR )
After I finish the apt-listbugs integration, I will get started on writing up some apt unit tests as suggested by Aleix. Also, I will work with Sune on updating the qapt package as well.
In a nutshell:
This week:
The almost-yearly large KDE-sprint in Randa, Switzerland is doing a fundraiser to get this year s event running. See http://www.kde.org/fundraisers/randameetings2014/
This year, it is besides the recurring multimedia topics, a lot about improving the new KDE Frameworks, the related documentation and the development experience with IDE s and such.
It is also a good way to come full circle, since it was back in 2011 when I was at the Randa Meetings that the KDE Frameworks initiative was started.
So once again: http://www.kde.org/fundraisers/randameetings2014/
And below are some screens of Muon in the wild, running on Debian:
My hard-working KDE friend Mario asked me to help him to get Debian people to help him with his thesis. Here is what he writes:
Dear Free Software contributor*
I m currently in the process of writing my diploma thesis. I ve worked hard during the last few weeks and months on a questionnaire which shall collect some data for my thesis. Furthermore the data of this survey will be interesting for the Free Software communities as well.
So please take some time or add it to your todo list or, even better, go directly to my questionnaire and help me make a great diploma thesis and improve the Free Software community in some ways.
The questionnaire takes some 20 to 30 minutes. At the end of the questionnaire you ll find a way to participate in a draw where you can even win something nice.
In a first round I got the feedback that the length of the questionnaire and that some questions (mostly the ones at the beginning of the questionnaire about the 12 different tasks) are quite abstract and difficult. But please try it, try your best and take the time and brain power. The remaining part of the questionnaire [1] (after these two pages with the tasks questions) is quite
I welcome Debian 9.0 Zurg!
Thanks to Phoronix and to Wikipedia editor at 213.81.201.123 and 149.255.97.132 for their high quality fact checking.
I have always loved Drum and Bass.
In 2013 I rediscovered my love for
Darkstep and
Neurofunk, and found
that these genres have developed quite a lot in the recent years.
Some labels like
Black Sun Empire and
Evol Intent
produce mixes/sets on a regular basis as podcasts these days.
This article aggregates some neurofunk podcasts I like a lot, most recent first.
Enjoy 33 hours and 57 minutes of fun with dark and energizing beats.
Thanks to BSE Contrax and Evol Intent for providing such high quality sets.
For small Qt-projects, I have for a long time been using qmake, mostly because qmake -project gives me a working build in most cases, but once the project grows a bit, I have switched to cmake because there is just things there I like better.
So, I thought how to start with cmake instead, and ended up writing a small script. I guess I should share it:
#! /bin/sh # Simple script that generates a cmake project file for a Qt project #I ve saved it locally as cmake-qtproject and it works with at least cmake 2.8.11. I hope wordpress doesn t make too much mess of it. Have fun.
# Copyright (c) 2013 Sune Vuorela
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the Software ), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED AS IS , WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# CPPFILES= $(ls *.cpp 2>/dev/null) UIFILES= $(ls *.ui 2>/dev/null) QRCFILES= $(ls *.qrc 2>/dev/null) NAME= $(basename $(pwd)) error()
echo ERROR: $@
exit 1
debug()
[ -z "$ DEBUG " ] && return
echo DEBUG: $@ 1>&2
# sanity checks if [ -e "CMakeLists.txt" ]
then
error CMakeLists.txt found. Doing nothing.
fi if [ -z "$ CPPFILES " ]
then
error No cpp files found
fi debug NAME $ NAME
debug CPPFILES $ CPPFILES
debug UIFILES $ UIFILES
debug QRCFILES $ QRCFILES # First part of cmake files
cat >> CMakeLists.txt << __EOHEADER__
project($ NAME ) cmake_minimum_required(VERSION 2.8.11) find_package(Qt5 CONFIG REQUIRED Widgets) set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON) __EOHEADER__ # Handle ui files if any
if [ -n "$ UIFILES " ]
then
cat >> CMakeLists.txt << __EOUI__
set($ NAME _ui $ UIFILES )
qt5_wrap_ui($ NAME _wrapped_ui \$ $ NAME _ui ) __EOUI__ UIWRAPPED="\$ $ NAME _wrapped_ui "
debug prepared UIWRAPPED $ UIWRAPPED
fi # Handle qrc files if any
if [ -n "$ QRCFILES " ]
then cat >> CMakeLists.txt << __EOQRC__
set($ NAME _qrc $ QRCFILES )
qt5_add_resources($ NAME _wrapped_qrc \$ $ NAME _qrc ) __EOQRC__ QRCWRAPPED="\$ $ NAME _wrapped_qrc "
debug prepared QRCWRAPPED $ QRCWRAPPED
fi # Build the actual library
cat >> CMakeLists.txt << __EOCPP__
set($ NAME _src $ CPPFILES ) add_executable($ NAME \$ $ NAME _src $ UIWRAPPED $ QRCWRAPPED ) target_link_libraries($ NAME Qt5::Widgets )
__EOCPP__
Hi everyone! We now have both Qt4 and Qt5 in the archive. Those using Qt4 should not need to make any changes in their packages, although you can be extra-safe with a few steps. Don't rush, just read below.Next.