Commit 9988f26d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

About: Don't make the about window a singleton

parent fd614fb9
......@@ -50,30 +50,6 @@ About::About( QWidget *parent ) : QDialog( parent )
m_ui.labelCopyright->setText(
m_ui.labelCopyright->text().arg( PROJECT_COPYRIGHT, PROJECT_CONTACT,
ORG_WEBSITE ) );
connect( qApp, SIGNAL( aboutToQuit() ), this, SLOT( deleteLater() ) );
}
void
About::changeEvent( QEvent *e )
{
QDialog::changeEvent( e );
switch ( e->type() )
{
case QEvent::LanguageChange:
m_ui.retranslateUi( this );
m_ui.labelTitle->setText(
m_ui.labelTitle->text().arg( PROJECT_VERSION, CODENAME ) );
m_ui.labelBuild->setText(
m_ui.labelBuild->text().arg( HOSTNAME, SYSNAME,
QT_VERSION_STR, qVersion() ) );
m_ui.labelCopyright->setText(
m_ui.labelCopyright->text().arg( PROJECT_COPYRIGHT,
PROJECT_CONTACT, ORG_WEBSITE ) );
break;
default:
break;
}
}
void
......
......@@ -31,18 +31,15 @@
class QPlainTextEdit;
class About : public QDialog, public QSingleton<About>
class About : public QDialog
{
Q_OBJECT
Q_DISABLE_COPY( About )
friend class QSingleton<About>;
protected:
virtual void changeEvent( QEvent *e );
public:
explicit About( QWidget *parent = 0 );
private:
explicit About( QWidget *parent = 0 );
void setText( const QString& filename, QPlainTextEdit* widget );
Ui::AboutVLMC m_ui;
};
......
......@@ -566,7 +566,8 @@ MainWindow::on_actionPreferences_triggered()
void
MainWindow::on_actionAbout_triggered()
{
About::getInstance()->exec();
About about( this );
about.exec();
}
bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment