[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Fixing 49564 - dependency/BC problem?
From:       David Faure <dfaure () klaralvdalens-datakonsult ! se>
Date:       2003-03-10 18:37:12
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 10 March 2003 00:58, Ravikiran Rajagopal wrote:
> Actually, there seems to be an easier way. Tracing through the code for
> setting up the global configuration object, here is what we need to add to
> the KApplication constructor (the first two lines are already present):
> 
>   KConfig* config = KGlobal::config();
>   d->actionRestrictions = config->hasGroup("KDE Action Restrictions" );
> #ifdef Q_WS_X11
Why X11 only?

>   // Here the user's local config file is not writable.
>   if (!(d->actionRestrictions) && config->isReadOnly())
>   {
>     WarnTheUserSomehow("Cannot save config. Ask sysadmin.");
>   }
> #endif
> 
> Now, how do I go about warning the user in a portable manner? I cannot use a
> QMessageBox (even though it is supposed to have its own private event loop)
> because it leads to problems with KUniqueApplication. At this point, the
> QApplication has been created already. 
Off hand I don't see where the problem is...

> So should I fork, show a QMessageBox
> in the child (or do some sort of execve("kdialog",...)) and then exit in the
> child? Unix process handling is not an area I am familiar with. Can someone
> suggest an alternative?

KProcess makes "unix process handling" very easy ;)

- -- 
David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+bNtY72KcVAmwbhARArCyAJ9Xbdw9gRl5rqZGuxYQP+ohTJ4YxgCgoZPm
Uu/9nyRtrz5UlL/wZw68/w8=
=E5rU
-----END PGP SIGNATURE-----


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic