X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=mainwindow.cpp;h=f44c9e72a01150195cb543b0746f7a90ed9b9653;hb=HEAD;hp=24a61a531036aa4eb5ffa4d283b7d2c00fd7ac30;hpb=0e652e9e47d47fc43b05fddd95fbea8bf8053819;p=fapman diff --git a/mainwindow.cpp b/mainwindow.cpp index 24a61a5..f44c9e7 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -19,7 +19,8 @@ extern "C" extern "C" { - #include +#include +#include } #include "mainwindow.h" @@ -120,6 +121,16 @@ MainWindow::MainWindow(QWidget *parent) : } } + // workaround for Trolltech.conf getting owned by root.. +#ifdef Q_WS_MAEMO_5 + QFileInfo trollConf("/home/user/.config/Trolltech.conf"); + if( trollConf.exists() && trollConf.ownerId() == 0 ) + { + uint uid = 29999; // "user" (maemo5) + uint gid = 29999; // "users" (maemo5) + chown(trollConf.absoluteFilePath().toAscii(), uid, gid); + } +#endif iMediaObject = new Phonon::MediaObject(this); Phonon::AudioOutput* aout = new Phonon::AudioOutput(Phonon::NotificationCategory, this);