summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/desktop.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 5ecc8bf..ba4fd66 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -719,61 +719,61 @@ void Desktop::toggleCapsLockState()
void Desktop::styleChange( QStyle &s )
{
QWidget::styleChange( s );
int displayw = qApp->desktop() ->width();
int displayh = qApp->desktop() ->height();
QSize sz = tb->sizeHint();
tb->setGeometry( 0, displayh - sz.height(), displayw, sz.height() );
}
void DesktopApplication::shutdown()
{
if ( type() != GuiServer )
return ;
ShutdownImpl *sd = new ShutdownImpl( 0, 0, WDestructiveClose );
connect( sd, SIGNAL( shutdown( ShutdownImpl::Type ) ),
this, SLOT( shutdown( ShutdownImpl::Type ) ) );
sd->showMaximized();
}
void DesktopApplication::shutdown( ShutdownImpl::Type t )
{
- char *path[] = { "/sbin", "/usr/sbin", 0 };
char *opt = 0;
switch ( t ) {
case ShutdownImpl::ShutdownSystem:
opt = "-h";
// fall through
case ShutdownImpl::RebootSystem:
if ( opt == 0 )
opt = "-r";
- if ( execle( "shutdown", "shutdown", opt, "now", ( void* ) 0, path ) < 0 )
- ::syslog ( LOG_ERR, "Erroring execing shutdown\n" );
+ if ( execl( "/sbin/shutdown", "shutdown", opt, "now", ( void* ) 0) < 0 )
+ perror("shutdown");
+// ::syslog ( LOG_ERR, "Erroring execing shutdown\n" );
break;
case ShutdownImpl::RestartDesktop:
restart();
break;
case ShutdownImpl::TerminateDesktop:
prepareForTermination( FALSE );
// This is a workaround for a Qt bug
// clipboard applet has to stop its poll timer, or Qt/E
// will hang on quit() right before it emits aboutToQuit()
emit aboutToQuit ( );
quit();
break;
}
}
void DesktopApplication::restart()
{
prepareForTermination( TRUE );
#ifdef Q_WS_QWS