]> git.sesse.net Git - vlc/commitdiff
Qt: firstrun: use QDialogButtonsBox
authorFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 19 Jul 2011 20:43:53 +0000 (22:43 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 19 Jul 2011 20:44:41 +0000 (22:44 +0200)
modules/gui/qt4/dialogs/firstrun.cpp

index c97835c7be2921cf43b40359f5b88c59980981c8..4e3487f3ef0726c65c353d040a5e96aee9f85c35 100644 (file)
@@ -27,6 +27,7 @@
 #include <QGroupBox>
 #include <QCheckBox>
 #include <QLabel>
+#include <QDialogButtonBox>
 #include <QPushButton>
 #include <QSettings>
 
@@ -106,11 +107,12 @@ void FirstRun::buildPrivDialog()
     optionsLayout->addWidget( checkbox2, line++, 0 );
 #endif
 
-    QPushButton *ok = new QPushButton( qtr( "Save and Continue" ) );
+    QDialogButtonBox *buttonsBox = new QDialogButtonBox( this );
+    buttonsBox->addButton( qtr( "Save and Continue" ), QDialogButtonBox::AcceptRole );
 
-    gLayout->addWidget( ok, 2, 2 );
+    gLayout->addWidget( buttonsBox, 2, 0, 2, 3 );
 
-    CONNECT( ok, clicked(), this, save() );
-    ok->setFocus();
+    CONNECT( buttonsBox, accepted(), this, save() );
+    buttonsBox->setFocus();
 }