diff options
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 17 | ||||
-rw-r--r-- | src/gui/kernel/qt_x11_p.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 4 |
4 files changed, 6 insertions, 19 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 5269841..509f5fd 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -1400,7 +1400,7 @@ void QApplication::setStyle(QStyle *style) #endif // QT_NO_STYLE_STYLESHEET QApplicationPrivate::app_style = style; QApplicationPrivate::app_style->setParent(qApp); // take ownership - + // take care of possible palette requirements of certain gui // styles. Do it before polishing the application since the style // might call QApplication::setPalette() itself diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 9d8625c..27ee6d8 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -134,7 +134,7 @@ extern "C" { # include <errno.h> #endif -#if defined(Q_OS_BSD4) || _POSIX_VERSION+0 < 200112L +#if _POSIX_VERSION+0 < 200112L && !defined(Q_OS_BSD4) # define QT_NO_UNSETENV #endif @@ -1767,7 +1767,7 @@ void qt_init(QApplicationPrivate *priv, int, X11->pattern_fills[i].screen = -1; #endif - X11->startupId = X11->originalStartupId = X11->startupIdString = 0; + X11->startupId = 0; int argc = priv->argc; char **argv = priv->argv; @@ -2565,15 +2565,13 @@ void qt_init(QApplicationPrivate *priv, int, #endif // QT_NO_TABLET X11->startupId = getenv("DESKTOP_STARTUP_ID"); - X11->originalStartupId = X11->startupId; if (X11->startupId) { #ifndef QT_NO_UNSETENV unsetenv("DESKTOP_STARTUP_ID"); #else // it's a small memory leak, however we won't crash if Qt is // unloaded and someones tries to use the envoriment. - X11->startupIdString = strdup("DESKTOP_STARTUP_ID="); - putenv(X11->startupIdString); + putenv(strdup("DESKTOP_STARTUP_ID=")); #endif } } else { @@ -2707,15 +2705,6 @@ void qt_cleanup() #endif } -#ifdef QT_NO_UNSETENV - // restore original value back. - if (X11->originalStartupId && X11->startupIdString) { - putenv(X11->originalStartupId); - free(X11->startupIdString); - X11->startupIdString = 0; - } -#endif - #ifndef QT_NO_XRENDER for (int i = 0; i < X11->solid_fill_count; ++i) { if (X11->solid_fills[i].picture) diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h index b480f34..3493a8b 100644 --- a/src/gui/kernel/qt_x11_p.h +++ b/src/gui/kernel/qt_x11_p.h @@ -506,8 +506,6 @@ struct QX11Data int fc_hint_style; char *startupId; - char *originalStartupId; - char *startupIdString; DesktopEnvironment desktopEnvironment; diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index f95372b..6e12540 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1,4 +1,4 @@ -/**************************************************************************** +**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Qt Software Information (qt-info@nokia.com) @@ -5638,7 +5638,7 @@ bool QWidget::hasFocus() const called from focusOutEvent() or focusInEvent(), you may get an infinite recursion. - \sa focus(), hasFocus(), clearFocus(), focusInEvent(), focusOutEvent(), + \sa hasFocus(), clearFocus(), focusInEvent(), focusOutEvent(), setFocusPolicy(), focusWidget(), QApplication::focusWidget(), grabKeyboard(), grabMouse(), {Keyboard Focus} */ |