void 
Ut_ThemeDialog::testAccept ()
{
    QList<ThemeDescriptor *>   themes;
    QPointer<ThemeDialog>      dialog;
    
    /*
     * Getting the themes so we have at least one theme descriptor. The data
     * source is stubbed, no file manpulation here.
     */
    themes = m_ThemeBusinessLogic->availableThemes ();
    QVERIFY (themes.size() > 0);

    /*
     * Creating and showing the dialog. The MDialog is stubbed, no window will
     * appear here.
     */
    dialog = new ThemeDialog (m_ThemeBusinessLogic, themes[0]);
    dialog->showDialog ();
    QVERIFY (dialog->m_SelectButton);
    QVERIFY (dialog->m_CancelButton);
    QCOMPARE (lastDialogTitle, themes[0]->name());

    /*
     * Clicking the button and checking if everything is all right. The
     * MGConfitem is stubbed, no file manipulation here.
     */
    GConfLastKey = "";
    GConfLastValue = "";
    //dialog->m_SelectButton->click();

    dialog->accept ();
    dialog->dialogDisappeared ();

    QCOMPARE (GConfLastKey, themeKey);
    QCOMPARE (GConfLastValue, themes[0]->codeName());
}