[Interest] Contributor agreement rundown

Nikos Chantziaras realnc at gmail.com
Wed Apr 18 22:02:38 CEST 2012


On 18/04/12 22:17, Quim Gil wrote:
> Sorry, I didn't get it.

Currently, in my code I need to:

     QDialogButtonBox::ButtonLayout layoutPolicy = 
QDialogButtonBox::ButtonLayout(ui->buttonBox->style()->styleHint(QStyle::SH_DialogButtonLayout));
     if (layoutPolicy == QDialogButtonBox::GnomeLayout) {
         // We're running in Gnome.
     } else {
         // Not Gnome.
     }

Qt already detects the environment, but it's all kept private.  What I 
had in mind is exposing this to the user through QSysInfo when he needs 
to provide different behavior for Gnome, KDE, Xfce, and others. 
QSysInfo currently provides the windowsVersion() and macVersion() 
routines, and I wanted to extend it with desktopEnvironment() and a new 
enum DesktopEnvironment { Gnome, KDE, Xfce, /* ... */ }.  A 
DesktopEnvironmentVersion enum might also make sense.




More information about the Interest mailing list