18
18
#include < QtWidgets/QLabel>
19
19
#include < QtWidgets/QPushButton>
20
20
21
+ #include " WbApplicationInfo.hpp"
21
22
#include " WbUpdatedDialog.hpp"
23
+ #include " WbVersion.hpp"
22
24
23
25
WbUpdatedDialog::WbUpdatedDialog (QWidget *parent) : QDialog(parent) {
24
- setWindowTitle (tr (" Welcome to Webots R2025a " ));
26
+ setWindowTitle (tr (" Welcome to Webots %1 " ). arg ( WbApplicationInfo::version (). toString () ));
25
27
26
28
QPixmap webotsLogo (" images:webots.png" );
27
29
QLabel *image = new QLabel (this );
@@ -31,7 +33,7 @@ WbUpdatedDialog::WbUpdatedDialog(QWidget *parent) : QDialog(parent) {
31
33
32
34
QLabel *label = new QLabel (this );
33
35
label->setGeometry (QRect (75 , 30 , 330 , 30 ));
34
- label->setText (tr (" <b>Thank you for using Webots R2025a .</b>" ));
36
+ label->setText (tr (" <b>Thank you for using Webots %1 .</b>" ). arg ( WbApplicationInfo::version (). toString () ));
35
37
label->setStyleSheet (" font-size: 15px;" );
36
38
label->setAlignment (Qt::AlignLeading | Qt::AlignLeft | Qt::AlignTop);
37
39
label->setWordWrap (true );
@@ -56,8 +58,10 @@ WbUpdatedDialog::WbUpdatedDialog(QWidget *parent) : QDialog(parent) {
56
58
57
59
label = new QLabel (this );
58
60
label->setGeometry (QRect (35 , 200 , 283 , 44 ));
59
- label->setText (tr (" Find out the new features, enhancements and bug fixes of Webots R2025a in the <a style='color: #5DADE2;' "
60
- " href='https://cyberbotics.com/doc/reference/changelog-r2023'>changelog</a>." ));
61
+ label->setText (tr (" Find out the new features, enhancements and bug fixes of Webots %1 in the <a style='color: #5DADE2;' "
62
+ " href='https://cyberbotics.com/doc/reference/changelog-r%2'>changelog</a>." )
63
+ .arg (WbApplicationInfo::version ().toString ())
64
+ .arg (WbApplicationInfo::version ().majorNumber ()));
61
65
label->setOpenExternalLinks (true );
62
66
label->setAlignment (Qt::AlignLeading | Qt::AlignLeft | Qt::AlignTop);
63
67
label->setWordWrap (true );
0 commit comments