From kde-commits Thu Dec 30 10:14:14 2010 From: Tobias Koenig Date: Thu, 30 Dec 2010 10:14:14 +0000 To: kde-commits Subject: KDE/kdepimlibs/akonadi Message-Id: <20101230101414.9BBECAC8AC () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129370409507140 SVN commit 1210266 by tokoe: Add a 'Quit' button to error overlay In mobile UI mode there will be a Quit button available in the error overlay to quit the application. This is necessary if the server fails to restart and the error overlay therefor won't vanish. BUG: 251473 M +11 -0 erroroverlay.cpp M +8 -1 erroroverlay.ui M +1 -0 erroroverlay_p.h --- trunk/KDE/kdepimlibs/akonadi/erroroverlay.cpp #1210265:1210266 @@ -93,8 +93,14 @@ ui->notRunningIcon->setPixmap( KIcon( QLatin1String( "akonadi" ) ).pixmap( 64 ) ); ui->brokenIcon->setPixmap( KIcon( QString::fromLatin1( "dialog-error" ) ).pixmap( 64 ) ); ui->progressIcon->setPixmap( KIcon( QLatin1String( "akonadi" ) ).pixmap( 32 ) ); + ui->quitButton->setText( KStandardGuiItem::quit().text() ); +#ifndef KDEPIM_MOBILE_UI + ui->quitButton->hide(); +#endif + connect( ui->startButton, SIGNAL( clicked() ), SLOT( startClicked() ) ); + connect( ui->quitButton, SIGNAL( clicked() ), SLOT( quitClicked() ) ); connect( ui->selfTestButton, SIGNAL( clicked() ), SLOT( selfTestClicked() ) ); const ServerManager::State state = ServerManager::state(); @@ -165,6 +171,11 @@ ServerManager::start(); } +void ErrorOverlay::quitClicked() +{ + qApp->quit(); +} + void ErrorOverlay::selfTestClicked() { SelfTestDialog dlg; --- trunk/KDE/kdepimlibs/akonadi/erroroverlay.ui #1210265:1210266 @@ -20,7 +20,7 @@ The Akonadi personal information management service is not running. This application cannot be used without it. - + @@ -73,6 +73,8 @@ + + Start @@ -80,6 +82,11 @@ + + + + + Qt::Horizontal --- trunk/KDE/kdepimlibs/akonadi/erroroverlay_p.h #1210265:1210266 @@ -60,6 +60,7 @@ private slots: void startClicked(); + void quitClicked(); void selfTestClicked(); void serverStateChanged( Akonadi::ServerManager::State state );