diff options
author | Robert Griebl <rgriebl@trolltech.com> | 2009-04-02 20:44:54 (GMT) |
---|---|---|
committer | Robert Griebl <rgriebl@trolltech.com> | 2009-04-02 20:54:30 (GMT) |
commit | d0f2051a8fe7cb44a04b0a540baafd1aeed06092 (patch) | |
tree | bae3c24f83c9ba27da14c06954e7eca2dffa0daa /src/gui/kernel | |
parent | 3f51c30f030a5517273a62bdd48dfe96c98852ee (diff) | |
download | Qt-d0f2051a8fe7cb44a04b0a540baafd1aeed06092.zip Qt-d0f2051a8fe7cb44a04b0a540baafd1aeed06092.tar.gz Qt-d0f2051a8fe7cb44a04b0a540baafd1aeed06092.tar.bz2 |
Make QWS a bit more OS independent.
Some patches needed to support QWS on non-Linux platforms.
Reviewed-by: Paul Olav Tvete
Reviewed-by: Harald Fernengel
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_qws.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp index 2deda8e..fcfd2a4 100644 --- a/src/gui/kernel/qapplication_qws.cpp +++ b/src/gui/kernel/qapplication_qws.cpp @@ -195,14 +195,14 @@ QString qws_dataDir() if (!result.isEmpty()) return result; QByteArray dataDir = QString(QLatin1String("/tmp/qtembedded-%1")).arg(qws_display_id).toLocal8Bit(); - if (mkdir(dataDir, 0700)) { + if (QT_MKDIR(dataDir, 0700)) { if (errno != EEXIST) { qFatal("Cannot create Qt for Embedded Linux data directory: %s", dataDir.constData()); } } - struct stat buf; - if (lstat(dataDir, &buf)) + QT_STATBUF buf; + if (QT_LSTAT(dataDir, &buf)) qFatal("stat failed for Qt for Embedded Linux data directory: %s", dataDir.constData()); if (!S_ISDIR(buf.st_mode)) @@ -2280,7 +2280,8 @@ void qt_init(QApplicationPrivate *priv, int type) qt_appType = QApplication::Type(type); qws_single_process = true; QWSServer::startup(flags); - setenv("QWS_DISPLAY", qws_display_spec.constData(), 0); + if (!display) // if not already set + qputenv("QWS_DISPLAY", qws_display_spec); } if(qt_is_gui_used) { |